@_davideast/stitch-mcp 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +1766 -1028
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -84335,6 +84335,102 @@ var init_wrap_ansi = __esm(() => {
84335
84335
  ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
84336
84336
  });
84337
84337
 
84338
+ // node_modules/terminal-size/index.js
84339
+ import process19 from "node:process";
84340
+ import { execFileSync } from "node:child_process";
84341
+ import fs9 from "node:fs";
84342
+ import tty4 from "node:tty";
84343
+ function terminalSize() {
84344
+ const { env: env4, stdout, stderr } = process19;
84345
+ if (stdout?.columns && stdout?.rows) {
84346
+ return create(stdout.columns, stdout.rows);
84347
+ }
84348
+ if (stderr?.columns && stderr?.rows) {
84349
+ return create(stderr.columns, stderr.rows);
84350
+ }
84351
+ if (env4.COLUMNS && env4.LINES) {
84352
+ return create(env4.COLUMNS, env4.LINES);
84353
+ }
84354
+ const fallback = {
84355
+ columns: defaultColumns,
84356
+ rows: defaultRows
84357
+ };
84358
+ if (process19.platform === "win32") {
84359
+ return tput() ?? fallback;
84360
+ }
84361
+ if (process19.platform === "darwin") {
84362
+ return devTty() ?? tput() ?? fallback;
84363
+ }
84364
+ return devTty() ?? tput() ?? resize() ?? fallback;
84365
+ }
84366
+ var defaultColumns = 80, defaultRows = 24, exec2 = (command, arguments_, { shell, env: env4 } = {}) => execFileSync(command, arguments_, {
84367
+ encoding: "utf8",
84368
+ stdio: ["ignore", "pipe", "ignore"],
84369
+ timeout: 500,
84370
+ shell,
84371
+ env: env4
84372
+ }).trim(), create = (columns, rows) => ({
84373
+ columns: Number.parseInt(columns, 10),
84374
+ rows: Number.parseInt(rows, 10)
84375
+ }), createIfNotDefault = (maybeColumns, maybeRows) => {
84376
+ const { columns, rows } = create(maybeColumns, maybeRows);
84377
+ if (Number.isNaN(columns) || Number.isNaN(rows)) {
84378
+ return;
84379
+ }
84380
+ if (columns === defaultColumns && rows === defaultRows) {
84381
+ return;
84382
+ }
84383
+ return { columns, rows };
84384
+ }, isForegroundProcess = () => {
84385
+ if (process19.platform !== "linux") {
84386
+ return true;
84387
+ }
84388
+ try {
84389
+ const statContents = fs9.readFileSync("/proc/self/stat", "utf8");
84390
+ const closingParenthesisIndex = statContents.lastIndexOf(") ");
84391
+ if (closingParenthesisIndex === -1) {
84392
+ return false;
84393
+ }
84394
+ const statFields = statContents.slice(closingParenthesisIndex + 2).trim().split(/\s+/);
84395
+ const processGroupId = Number.parseInt(statFields[2], 10);
84396
+ const foregroundProcessGroupId = Number.parseInt(statFields[5], 10);
84397
+ if (Number.isNaN(processGroupId) || Number.isNaN(foregroundProcessGroupId)) {
84398
+ return false;
84399
+ }
84400
+ if (foregroundProcessGroupId <= 0) {
84401
+ return false;
84402
+ }
84403
+ return processGroupId === foregroundProcessGroupId;
84404
+ } catch {
84405
+ return false;
84406
+ }
84407
+ }, devTty = () => {
84408
+ try {
84409
+ const flags = process19.platform === "darwin" ? fs9.constants.O_EVTONLY | fs9.constants.O_NONBLOCK : fs9.constants.O_NONBLOCK;
84410
+ const { columns, rows } = tty4.WriteStream(fs9.openSync("/dev/tty", flags));
84411
+ return { columns, rows };
84412
+ } catch {}
84413
+ }, tput = () => {
84414
+ try {
84415
+ const columns = exec2("tput", ["cols"], { env: { TERM: "dumb", ...process19.env } });
84416
+ const rows = exec2("tput", ["lines"], { env: { TERM: "dumb", ...process19.env } });
84417
+ if (columns && rows) {
84418
+ return createIfNotDefault(columns, rows);
84419
+ }
84420
+ } catch {}
84421
+ }, resize = () => {
84422
+ try {
84423
+ if (!isForegroundProcess()) {
84424
+ return;
84425
+ }
84426
+ const size = exec2("resize", ["-u"]).match(/\d+/g);
84427
+ if (size.length === 2) {
84428
+ return createIfNotDefault(size[0], size[1]);
84429
+ }
84430
+ } catch {}
84431
+ };
84432
+ var init_terminal_size = () => {};
84433
+
84338
84434
  // node_modules/scheduler/cjs/scheduler.development.js
84339
84435
  var require_scheduler_development = __commonJS((exports) => {
84340
84436
  (function() {
@@ -88114,8 +88210,8 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
88114
88210
  if (cachedSnapshot = !objectIs((currentHook || hook).memoizedState, getServerSnapshot))
88115
88211
  hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
88116
88212
  hook = hook.queue;
88117
- var create = subscribeToStore.bind(null, fiber, hook, subscribe);
88118
- updateEffectImpl(2048, Passive, create, [subscribe]);
88213
+ var create2 = subscribeToStore.bind(null, fiber, hook, subscribe);
88214
+ updateEffectImpl(2048, Passive, create2, [subscribe]);
88119
88215
  if (hook.getSnapshot !== getSnapshot || cachedSnapshot || workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {
88120
88216
  fiber.flags |= 2048;
88121
88217
  pushSimpleEffect(HasEffect | Passive, { destroy: undefined }, updateStoreInstance.bind(null, fiber, hook, getServerSnapshot, getSnapshot), null);
@@ -88380,12 +88476,12 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
88380
88476
  currentStateHook.memoizedState = action;
88381
88477
  return [stateHook, dispatch, false];
88382
88478
  }
88383
- function pushSimpleEffect(tag, inst, create, deps) {
88384
- tag = { tag, create, deps, inst, next: null };
88479
+ function pushSimpleEffect(tag, inst, create2, deps) {
88480
+ tag = { tag, create: create2, deps, inst, next: null };
88385
88481
  inst = currentlyRenderingFiber.updateQueue;
88386
88482
  inst === null && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
88387
- create = inst.lastEffect;
88388
- create === null ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag);
88483
+ create2 = inst.lastEffect;
88484
+ create2 === null ? inst.lastEffect = tag.next = tag : (deps = create2.next, create2.next = tag, tag.next = deps, inst.lastEffect = tag);
88389
88485
  return tag;
88390
88486
  }
88391
88487
  function mountRef(initialValue) {
@@ -88393,19 +88489,19 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
88393
88489
  initialValue = { current: initialValue };
88394
88490
  return hook.memoizedState = initialValue;
88395
88491
  }
88396
- function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
88492
+ function mountEffectImpl(fiberFlags, hookFlags, create2, deps) {
88397
88493
  var hook = mountWorkInProgressHook();
88398
88494
  currentlyRenderingFiber.flags |= fiberFlags;
88399
- hook.memoizedState = pushSimpleEffect(HasEffect | hookFlags, { destroy: undefined }, create, deps === undefined ? null : deps);
88495
+ hook.memoizedState = pushSimpleEffect(HasEffect | hookFlags, { destroy: undefined }, create2, deps === undefined ? null : deps);
88400
88496
  }
88401
- function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
88497
+ function updateEffectImpl(fiberFlags, hookFlags, create2, deps) {
88402
88498
  var hook = updateWorkInProgressHook();
88403
88499
  deps = deps === undefined ? null : deps;
88404
88500
  var inst = hook.memoizedState.inst;
88405
- currentHook !== null && deps !== null && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(HasEffect | hookFlags, inst, create, deps));
88501
+ currentHook !== null && deps !== null && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(HasEffect | hookFlags, inst, create2, deps));
88406
88502
  }
88407
- function mountEffect(create, deps) {
88408
- (currentlyRenderingFiber.mode & 16) !== NoMode ? mountEffectImpl(276826112, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps);
88503
+ function mountEffect(create2, deps) {
88504
+ (currentlyRenderingFiber.mode & 16) !== NoMode ? mountEffectImpl(276826112, Passive, create2, deps) : mountEffectImpl(8390656, Passive, create2, deps);
88409
88505
  }
88410
88506
  function useEffectEventImpl(payload) {
88411
88507
  currentlyRenderingFiber.flags |= 4;
@@ -88435,35 +88531,35 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
88435
88531
  return ref.impl.apply(undefined, arguments);
88436
88532
  };
88437
88533
  }
88438
- function mountLayoutEffect(create, deps) {
88534
+ function mountLayoutEffect(create2, deps) {
88439
88535
  var fiberFlags = 4194308;
88440
88536
  (currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 134217728);
88441
- return mountEffectImpl(fiberFlags, Layout, create, deps);
88537
+ return mountEffectImpl(fiberFlags, Layout, create2, deps);
88442
88538
  }
88443
- function imperativeHandleEffect(create, ref) {
88539
+ function imperativeHandleEffect(create2, ref) {
88444
88540
  if (typeof ref === "function") {
88445
- create = create();
88446
- var refCleanup = ref(create);
88541
+ create2 = create2();
88542
+ var refCleanup = ref(create2);
88447
88543
  return function() {
88448
88544
  typeof refCleanup === "function" ? refCleanup() : ref(null);
88449
88545
  };
88450
88546
  }
88451
88547
  if (ref !== null && ref !== undefined)
88452
- return ref.hasOwnProperty("current") || console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(ref).join(", ") + "}"), create = create(), ref.current = create, function() {
88548
+ return ref.hasOwnProperty("current") || console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(ref).join(", ") + "}"), create2 = create2(), ref.current = create2, function() {
88453
88549
  ref.current = null;
88454
88550
  };
88455
88551
  }
88456
- function mountImperativeHandle(ref, create, deps) {
88457
- typeof create !== "function" && console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", create !== null ? typeof create : "null");
88552
+ function mountImperativeHandle(ref, create2, deps) {
88553
+ typeof create2 !== "function" && console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", create2 !== null ? typeof create2 : "null");
88458
88554
  deps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
88459
88555
  var fiberFlags = 4194308;
88460
88556
  (currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 134217728);
88461
- mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), deps);
88557
+ mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create2, ref), deps);
88462
88558
  }
88463
- function updateImperativeHandle(ref, create, deps) {
88464
- typeof create !== "function" && console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", create !== null ? typeof create : "null");
88559
+ function updateImperativeHandle(ref, create2, deps) {
88560
+ typeof create2 !== "function" && console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", create2 !== null ? typeof create2 : "null");
88465
88561
  deps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
88466
- updateEffectImpl(4, Layout, imperativeHandleEffect.bind(null, create, ref), deps);
88562
+ updateEffectImpl(4, Layout, imperativeHandleEffect.bind(null, create2, ref), deps);
88467
88563
  }
88468
88564
  function mountCallback(callback, deps) {
88469
88565
  mountWorkInProgressHook().memoizedState = [
@@ -93521,10 +93617,10 @@ Learn more about this warning here: https://react.dev/link/legacy-context`, sort
93521
93617
  }
93522
93618
  }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(callComponentWillUnmount), callCreate = {
93523
93619
  react_stack_bottom_frame: function(effect) {
93524
- var create = effect.create;
93620
+ var create2 = effect.create;
93525
93621
  effect = effect.inst;
93526
- create = create();
93527
- return effect.destroy = create;
93622
+ create2 = create2();
93623
+ return effect.destroy = create2;
93528
93624
  }
93529
93625
  }, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
93530
93626
  react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
@@ -93624,38 +93720,38 @@ Check the top-level render call using <` + componentName2 + ">.");
93624
93720
  mountHookTypesDev();
93625
93721
  return readContext(context);
93626
93722
  },
93627
- useEffect: function(create, deps) {
93723
+ useEffect: function(create2, deps) {
93628
93724
  currentHookNameInDev = "useEffect";
93629
93725
  mountHookTypesDev();
93630
93726
  checkDepsAreArrayDev(deps);
93631
- return mountEffect(create, deps);
93727
+ return mountEffect(create2, deps);
93632
93728
  },
93633
- useImperativeHandle: function(ref, create, deps) {
93729
+ useImperativeHandle: function(ref, create2, deps) {
93634
93730
  currentHookNameInDev = "useImperativeHandle";
93635
93731
  mountHookTypesDev();
93636
93732
  checkDepsAreArrayDev(deps);
93637
- return mountImperativeHandle(ref, create, deps);
93733
+ return mountImperativeHandle(ref, create2, deps);
93638
93734
  },
93639
- useInsertionEffect: function(create, deps) {
93735
+ useInsertionEffect: function(create2, deps) {
93640
93736
  currentHookNameInDev = "useInsertionEffect";
93641
93737
  mountHookTypesDev();
93642
93738
  checkDepsAreArrayDev(deps);
93643
- mountEffectImpl(4, Insertion, create, deps);
93739
+ mountEffectImpl(4, Insertion, create2, deps);
93644
93740
  },
93645
- useLayoutEffect: function(create, deps) {
93741
+ useLayoutEffect: function(create2, deps) {
93646
93742
  currentHookNameInDev = "useLayoutEffect";
93647
93743
  mountHookTypesDev();
93648
93744
  checkDepsAreArrayDev(deps);
93649
- return mountLayoutEffect(create, deps);
93745
+ return mountLayoutEffect(create2, deps);
93650
93746
  },
93651
- useMemo: function(create, deps) {
93747
+ useMemo: function(create2, deps) {
93652
93748
  currentHookNameInDev = "useMemo";
93653
93749
  mountHookTypesDev();
93654
93750
  checkDepsAreArrayDev(deps);
93655
93751
  var prevDispatcher = ReactSharedInternals.H;
93656
93752
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
93657
93753
  try {
93658
- return mountMemo(create, deps);
93754
+ return mountMemo(create2, deps);
93659
93755
  } finally {
93660
93756
  ReactSharedInternals.H = prevDispatcher;
93661
93757
  }
@@ -93755,33 +93851,33 @@ Check the top-level render call using <` + componentName2 + ">.");
93755
93851
  updateHookTypesDev();
93756
93852
  return readContext(context);
93757
93853
  },
93758
- useEffect: function(create, deps) {
93854
+ useEffect: function(create2, deps) {
93759
93855
  currentHookNameInDev = "useEffect";
93760
93856
  updateHookTypesDev();
93761
- return mountEffect(create, deps);
93857
+ return mountEffect(create2, deps);
93762
93858
  },
93763
- useImperativeHandle: function(ref, create, deps) {
93859
+ useImperativeHandle: function(ref, create2, deps) {
93764
93860
  currentHookNameInDev = "useImperativeHandle";
93765
93861
  updateHookTypesDev();
93766
- return mountImperativeHandle(ref, create, deps);
93862
+ return mountImperativeHandle(ref, create2, deps);
93767
93863
  },
93768
- useInsertionEffect: function(create, deps) {
93864
+ useInsertionEffect: function(create2, deps) {
93769
93865
  currentHookNameInDev = "useInsertionEffect";
93770
93866
  updateHookTypesDev();
93771
- mountEffectImpl(4, Insertion, create, deps);
93867
+ mountEffectImpl(4, Insertion, create2, deps);
93772
93868
  },
93773
- useLayoutEffect: function(create, deps) {
93869
+ useLayoutEffect: function(create2, deps) {
93774
93870
  currentHookNameInDev = "useLayoutEffect";
93775
93871
  updateHookTypesDev();
93776
- return mountLayoutEffect(create, deps);
93872
+ return mountLayoutEffect(create2, deps);
93777
93873
  },
93778
- useMemo: function(create, deps) {
93874
+ useMemo: function(create2, deps) {
93779
93875
  currentHookNameInDev = "useMemo";
93780
93876
  updateHookTypesDev();
93781
93877
  var prevDispatcher = ReactSharedInternals.H;
93782
93878
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
93783
93879
  try {
93784
- return mountMemo(create, deps);
93880
+ return mountMemo(create2, deps);
93785
93881
  } finally {
93786
93882
  ReactSharedInternals.H = prevDispatcher;
93787
93883
  }
@@ -93881,33 +93977,33 @@ Check the top-level render call using <` + componentName2 + ">.");
93881
93977
  updateHookTypesDev();
93882
93978
  return readContext(context);
93883
93979
  },
93884
- useEffect: function(create, deps) {
93980
+ useEffect: function(create2, deps) {
93885
93981
  currentHookNameInDev = "useEffect";
93886
93982
  updateHookTypesDev();
93887
- updateEffectImpl(2048, Passive, create, deps);
93983
+ updateEffectImpl(2048, Passive, create2, deps);
93888
93984
  },
93889
- useImperativeHandle: function(ref, create, deps) {
93985
+ useImperativeHandle: function(ref, create2, deps) {
93890
93986
  currentHookNameInDev = "useImperativeHandle";
93891
93987
  updateHookTypesDev();
93892
- return updateImperativeHandle(ref, create, deps);
93988
+ return updateImperativeHandle(ref, create2, deps);
93893
93989
  },
93894
- useInsertionEffect: function(create, deps) {
93990
+ useInsertionEffect: function(create2, deps) {
93895
93991
  currentHookNameInDev = "useInsertionEffect";
93896
93992
  updateHookTypesDev();
93897
- return updateEffectImpl(4, Insertion, create, deps);
93993
+ return updateEffectImpl(4, Insertion, create2, deps);
93898
93994
  },
93899
- useLayoutEffect: function(create, deps) {
93995
+ useLayoutEffect: function(create2, deps) {
93900
93996
  currentHookNameInDev = "useLayoutEffect";
93901
93997
  updateHookTypesDev();
93902
- return updateEffectImpl(4, Layout, create, deps);
93998
+ return updateEffectImpl(4, Layout, create2, deps);
93903
93999
  },
93904
- useMemo: function(create, deps) {
94000
+ useMemo: function(create2, deps) {
93905
94001
  currentHookNameInDev = "useMemo";
93906
94002
  updateHookTypesDev();
93907
94003
  var prevDispatcher = ReactSharedInternals.H;
93908
94004
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
93909
94005
  try {
93910
- return updateMemo(create, deps);
94006
+ return updateMemo(create2, deps);
93911
94007
  } finally {
93912
94008
  ReactSharedInternals.H = prevDispatcher;
93913
94009
  }
@@ -94007,33 +94103,33 @@ Check the top-level render call using <` + componentName2 + ">.");
94007
94103
  updateHookTypesDev();
94008
94104
  return readContext(context);
94009
94105
  },
94010
- useEffect: function(create, deps) {
94106
+ useEffect: function(create2, deps) {
94011
94107
  currentHookNameInDev = "useEffect";
94012
94108
  updateHookTypesDev();
94013
- updateEffectImpl(2048, Passive, create, deps);
94109
+ updateEffectImpl(2048, Passive, create2, deps);
94014
94110
  },
94015
- useImperativeHandle: function(ref, create, deps) {
94111
+ useImperativeHandle: function(ref, create2, deps) {
94016
94112
  currentHookNameInDev = "useImperativeHandle";
94017
94113
  updateHookTypesDev();
94018
- return updateImperativeHandle(ref, create, deps);
94114
+ return updateImperativeHandle(ref, create2, deps);
94019
94115
  },
94020
- useInsertionEffect: function(create, deps) {
94116
+ useInsertionEffect: function(create2, deps) {
94021
94117
  currentHookNameInDev = "useInsertionEffect";
94022
94118
  updateHookTypesDev();
94023
- return updateEffectImpl(4, Insertion, create, deps);
94119
+ return updateEffectImpl(4, Insertion, create2, deps);
94024
94120
  },
94025
- useLayoutEffect: function(create, deps) {
94121
+ useLayoutEffect: function(create2, deps) {
94026
94122
  currentHookNameInDev = "useLayoutEffect";
94027
94123
  updateHookTypesDev();
94028
- return updateEffectImpl(4, Layout, create, deps);
94124
+ return updateEffectImpl(4, Layout, create2, deps);
94029
94125
  },
94030
- useMemo: function(create, deps) {
94126
+ useMemo: function(create2, deps) {
94031
94127
  currentHookNameInDev = "useMemo";
94032
94128
  updateHookTypesDev();
94033
94129
  var prevDispatcher = ReactSharedInternals.H;
94034
94130
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
94035
94131
  try {
94036
- return updateMemo(create, deps);
94132
+ return updateMemo(create2, deps);
94037
94133
  } finally {
94038
94134
  ReactSharedInternals.H = prevDispatcher;
94039
94135
  }
@@ -94139,38 +94235,38 @@ Check the top-level render call using <` + componentName2 + ">.");
94139
94235
  mountHookTypesDev();
94140
94236
  return readContext(context);
94141
94237
  },
94142
- useEffect: function(create, deps) {
94238
+ useEffect: function(create2, deps) {
94143
94239
  currentHookNameInDev = "useEffect";
94144
94240
  warnInvalidHookAccess();
94145
94241
  mountHookTypesDev();
94146
- return mountEffect(create, deps);
94242
+ return mountEffect(create2, deps);
94147
94243
  },
94148
- useImperativeHandle: function(ref, create, deps) {
94244
+ useImperativeHandle: function(ref, create2, deps) {
94149
94245
  currentHookNameInDev = "useImperativeHandle";
94150
94246
  warnInvalidHookAccess();
94151
94247
  mountHookTypesDev();
94152
- return mountImperativeHandle(ref, create, deps);
94248
+ return mountImperativeHandle(ref, create2, deps);
94153
94249
  },
94154
- useInsertionEffect: function(create, deps) {
94250
+ useInsertionEffect: function(create2, deps) {
94155
94251
  currentHookNameInDev = "useInsertionEffect";
94156
94252
  warnInvalidHookAccess();
94157
94253
  mountHookTypesDev();
94158
- mountEffectImpl(4, Insertion, create, deps);
94254
+ mountEffectImpl(4, Insertion, create2, deps);
94159
94255
  },
94160
- useLayoutEffect: function(create, deps) {
94256
+ useLayoutEffect: function(create2, deps) {
94161
94257
  currentHookNameInDev = "useLayoutEffect";
94162
94258
  warnInvalidHookAccess();
94163
94259
  mountHookTypesDev();
94164
- return mountLayoutEffect(create, deps);
94260
+ return mountLayoutEffect(create2, deps);
94165
94261
  },
94166
- useMemo: function(create, deps) {
94262
+ useMemo: function(create2, deps) {
94167
94263
  currentHookNameInDev = "useMemo";
94168
94264
  warnInvalidHookAccess();
94169
94265
  mountHookTypesDev();
94170
94266
  var prevDispatcher = ReactSharedInternals.H;
94171
94267
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
94172
94268
  try {
94173
- return mountMemo(create, deps);
94269
+ return mountMemo(create2, deps);
94174
94270
  } finally {
94175
94271
  ReactSharedInternals.H = prevDispatcher;
94176
94272
  }
@@ -94290,38 +94386,38 @@ Check the top-level render call using <` + componentName2 + ">.");
94290
94386
  updateHookTypesDev();
94291
94387
  return readContext(context);
94292
94388
  },
94293
- useEffect: function(create, deps) {
94389
+ useEffect: function(create2, deps) {
94294
94390
  currentHookNameInDev = "useEffect";
94295
94391
  warnInvalidHookAccess();
94296
94392
  updateHookTypesDev();
94297
- updateEffectImpl(2048, Passive, create, deps);
94393
+ updateEffectImpl(2048, Passive, create2, deps);
94298
94394
  },
94299
- useImperativeHandle: function(ref, create, deps) {
94395
+ useImperativeHandle: function(ref, create2, deps) {
94300
94396
  currentHookNameInDev = "useImperativeHandle";
94301
94397
  warnInvalidHookAccess();
94302
94398
  updateHookTypesDev();
94303
- return updateImperativeHandle(ref, create, deps);
94399
+ return updateImperativeHandle(ref, create2, deps);
94304
94400
  },
94305
- useInsertionEffect: function(create, deps) {
94401
+ useInsertionEffect: function(create2, deps) {
94306
94402
  currentHookNameInDev = "useInsertionEffect";
94307
94403
  warnInvalidHookAccess();
94308
94404
  updateHookTypesDev();
94309
- return updateEffectImpl(4, Insertion, create, deps);
94405
+ return updateEffectImpl(4, Insertion, create2, deps);
94310
94406
  },
94311
- useLayoutEffect: function(create, deps) {
94407
+ useLayoutEffect: function(create2, deps) {
94312
94408
  currentHookNameInDev = "useLayoutEffect";
94313
94409
  warnInvalidHookAccess();
94314
94410
  updateHookTypesDev();
94315
- return updateEffectImpl(4, Layout, create, deps);
94411
+ return updateEffectImpl(4, Layout, create2, deps);
94316
94412
  },
94317
- useMemo: function(create, deps) {
94413
+ useMemo: function(create2, deps) {
94318
94414
  currentHookNameInDev = "useMemo";
94319
94415
  warnInvalidHookAccess();
94320
94416
  updateHookTypesDev();
94321
94417
  var prevDispatcher = ReactSharedInternals.H;
94322
94418
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
94323
94419
  try {
94324
- return updateMemo(create, deps);
94420
+ return updateMemo(create2, deps);
94325
94421
  } finally {
94326
94422
  ReactSharedInternals.H = prevDispatcher;
94327
94423
  }
@@ -94441,38 +94537,38 @@ Check the top-level render call using <` + componentName2 + ">.");
94441
94537
  updateHookTypesDev();
94442
94538
  return readContext(context);
94443
94539
  },
94444
- useEffect: function(create, deps) {
94540
+ useEffect: function(create2, deps) {
94445
94541
  currentHookNameInDev = "useEffect";
94446
94542
  warnInvalidHookAccess();
94447
94543
  updateHookTypesDev();
94448
- updateEffectImpl(2048, Passive, create, deps);
94544
+ updateEffectImpl(2048, Passive, create2, deps);
94449
94545
  },
94450
- useImperativeHandle: function(ref, create, deps) {
94546
+ useImperativeHandle: function(ref, create2, deps) {
94451
94547
  currentHookNameInDev = "useImperativeHandle";
94452
94548
  warnInvalidHookAccess();
94453
94549
  updateHookTypesDev();
94454
- return updateImperativeHandle(ref, create, deps);
94550
+ return updateImperativeHandle(ref, create2, deps);
94455
94551
  },
94456
- useInsertionEffect: function(create, deps) {
94552
+ useInsertionEffect: function(create2, deps) {
94457
94553
  currentHookNameInDev = "useInsertionEffect";
94458
94554
  warnInvalidHookAccess();
94459
94555
  updateHookTypesDev();
94460
- return updateEffectImpl(4, Insertion, create, deps);
94556
+ return updateEffectImpl(4, Insertion, create2, deps);
94461
94557
  },
94462
- useLayoutEffect: function(create, deps) {
94558
+ useLayoutEffect: function(create2, deps) {
94463
94559
  currentHookNameInDev = "useLayoutEffect";
94464
94560
  warnInvalidHookAccess();
94465
94561
  updateHookTypesDev();
94466
- return updateEffectImpl(4, Layout, create, deps);
94562
+ return updateEffectImpl(4, Layout, create2, deps);
94467
94563
  },
94468
- useMemo: function(create, deps) {
94564
+ useMemo: function(create2, deps) {
94469
94565
  currentHookNameInDev = "useMemo";
94470
94566
  warnInvalidHookAccess();
94471
94567
  updateHookTypesDev();
94472
94568
  var prevDispatcher = ReactSharedInternals.H;
94473
94569
  ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
94474
94570
  try {
94475
- return updateMemo(create, deps);
94571
+ return updateMemo(create2, deps);
94476
94572
  } finally {
94477
94573
  ReactSharedInternals.H = prevDispatcher;
94478
94574
  }
@@ -95055,7 +95151,7 @@ var require_react_reconciler = __commonJS((exports, module) => {
95055
95151
  }
95056
95152
  });
95057
95153
 
95058
- // node_modules/widest-line/node_modules/ansi-regex/index.js
95154
+ // node_modules/string-width/node_modules/ansi-regex/index.js
95059
95155
  function ansiRegex2({ onlyFirst = false } = {}) {
95060
95156
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
95061
95157
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
@@ -95064,7 +95160,7 @@ function ansiRegex2({ onlyFirst = false } = {}) {
95064
95160
  return new RegExp(pattern, onlyFirst ? undefined : "g");
95065
95161
  }
95066
95162
 
95067
- // node_modules/widest-line/node_modules/strip-ansi/index.js
95163
+ // node_modules/string-width/node_modules/strip-ansi/index.js
95068
95164
  function stripAnsi2(string5) {
95069
95165
  if (typeof string5 !== "string") {
95070
95166
  throw new TypeError(`Expected a \`string\`, got \`${typeof string5}\``);
@@ -95076,272 +95172,6 @@ var init_strip_ansi2 = __esm(() => {
95076
95172
  regex2 = ansiRegex2();
95077
95173
  });
95078
95174
 
95079
- // node_modules/widest-line/node_modules/emoji-regex/index.js
95080
- var require_emoji_regex2 = __commonJS((exports, module) => {
95081
- module.exports = () => {
95082
- return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
95083
- };
95084
- });
95085
-
95086
- // node_modules/widest-line/node_modules/string-width/index.js
95087
- function stringWidth2(string5, options = {}) {
95088
- if (typeof string5 !== "string" || string5.length === 0) {
95089
- return 0;
95090
- }
95091
- const {
95092
- ambiguousIsNarrow = true,
95093
- countAnsiEscapeCodes = false
95094
- } = options;
95095
- if (!countAnsiEscapeCodes) {
95096
- string5 = stripAnsi2(string5);
95097
- }
95098
- if (string5.length === 0) {
95099
- return 0;
95100
- }
95101
- let width = 0;
95102
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
95103
- for (const { segment: character } of segmenter2.segment(string5)) {
95104
- const codePoint = character.codePointAt(0);
95105
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
95106
- continue;
95107
- }
95108
- if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
95109
- continue;
95110
- }
95111
- if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
95112
- continue;
95113
- }
95114
- if (codePoint >= 55296 && codePoint <= 57343) {
95115
- continue;
95116
- }
95117
- if (codePoint >= 65024 && codePoint <= 65039) {
95118
- continue;
95119
- }
95120
- if (defaultIgnorableCodePointRegex2.test(character)) {
95121
- continue;
95122
- }
95123
- if (import_emoji_regex2.default().test(character)) {
95124
- width += 2;
95125
- continue;
95126
- }
95127
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
95128
- }
95129
- return width;
95130
- }
95131
- var import_emoji_regex2, segmenter2, defaultIgnorableCodePointRegex2;
95132
- var init_string_width2 = __esm(() => {
95133
- init_strip_ansi2();
95134
- init_get_east_asian_width();
95135
- import_emoji_regex2 = __toESM(require_emoji_regex2(), 1);
95136
- segmenter2 = new Intl.Segmenter;
95137
- defaultIgnorableCodePointRegex2 = /^\p{Default_Ignorable_Code_Point}$/u;
95138
- });
95139
-
95140
- // node_modules/widest-line/index.js
95141
- function widestLine(string5) {
95142
- let lineWidth = 0;
95143
- for (const line of string5.split(`
95144
- `)) {
95145
- lineWidth = Math.max(lineWidth, stringWidth2(line));
95146
- }
95147
- return lineWidth;
95148
- }
95149
- var init_widest_line = __esm(() => {
95150
- init_string_width2();
95151
- });
95152
-
95153
- // node_modules/ink/build/measure-text.js
95154
- var cache, measureText = (text3) => {
95155
- if (text3.length === 0) {
95156
- return {
95157
- width: 0,
95158
- height: 0
95159
- };
95160
- }
95161
- const cachedDimensions = cache.get(text3);
95162
- if (cachedDimensions) {
95163
- return cachedDimensions;
95164
- }
95165
- const width = widestLine(text3);
95166
- const height = text3.split(`
95167
- `).length;
95168
- const dimensions = { width, height };
95169
- cache.set(text3, dimensions);
95170
- return dimensions;
95171
- }, measure_text_default;
95172
- var init_measure_text = __esm(() => {
95173
- init_widest_line();
95174
- cache = new Map;
95175
- measure_text_default = measureText;
95176
- });
95177
-
95178
- // node_modules/is-fullwidth-code-point/index.js
95179
- function isFullwidthCodePoint(codePoint) {
95180
- if (!Number.isInteger(codePoint)) {
95181
- return false;
95182
- }
95183
- return isFullWidth(codePoint) || isWide(codePoint);
95184
- }
95185
- var init_is_fullwidth_code_point = __esm(() => {
95186
- init_get_east_asian_width();
95187
- });
95188
-
95189
- // node_modules/slice-ansi/index.js
95190
- function getEndCode(code) {
95191
- if (endCodesSet.has(code)) {
95192
- return code;
95193
- }
95194
- if (endCodesMap.has(code)) {
95195
- return endCodesMap.get(code);
95196
- }
95197
- code = code.slice(2);
95198
- if (code.includes(";")) {
95199
- code = code[0] + "0";
95200
- }
95201
- const returnValue = ansi_styles_default2.codes.get(Number.parseInt(code, 10));
95202
- if (returnValue) {
95203
- return ansi_styles_default2.color.ansi(returnValue);
95204
- }
95205
- return ansi_styles_default2.reset.open;
95206
- }
95207
- function findNumberIndex(string5) {
95208
- for (let index2 = 0;index2 < string5.length; index2++) {
95209
- const codePoint = string5.codePointAt(index2);
95210
- if (codePoint >= CODE_POINT_0 && codePoint <= CODE_POINT_9) {
95211
- return index2;
95212
- }
95213
- }
95214
- return -1;
95215
- }
95216
- function parseAnsiCode(string5, offset) {
95217
- string5 = string5.slice(offset, offset + MAX_ANSI_SEQUENCE_LENGTH);
95218
- const startIndex = findNumberIndex(string5);
95219
- if (startIndex !== -1) {
95220
- let endIndex = string5.indexOf("m", startIndex);
95221
- if (endIndex === -1) {
95222
- endIndex = string5.length;
95223
- }
95224
- return string5.slice(0, endIndex + 1);
95225
- }
95226
- }
95227
- function tokenize(string5, endCharacter = Number.POSITIVE_INFINITY) {
95228
- const returnValue = [];
95229
- let index2 = 0;
95230
- let visibleCount = 0;
95231
- while (index2 < string5.length) {
95232
- const codePoint = string5.codePointAt(index2);
95233
- if (ESCAPES2.has(codePoint)) {
95234
- const code = parseAnsiCode(string5, index2);
95235
- if (code) {
95236
- returnValue.push({
95237
- type: "ansi",
95238
- code,
95239
- endCode: getEndCode(code)
95240
- });
95241
- index2 += code.length;
95242
- continue;
95243
- }
95244
- }
95245
- const isFullWidth2 = isFullwidthCodePoint(codePoint);
95246
- const character = String.fromCodePoint(codePoint);
95247
- returnValue.push({
95248
- type: "character",
95249
- value: character,
95250
- isFullWidth: isFullWidth2
95251
- });
95252
- index2 += character.length;
95253
- visibleCount += isFullWidth2 ? 2 : character.length;
95254
- if (visibleCount >= endCharacter) {
95255
- break;
95256
- }
95257
- }
95258
- return returnValue;
95259
- }
95260
- function reduceAnsiCodes(codes) {
95261
- let returnValue = [];
95262
- for (const code of codes) {
95263
- if (code.code === ansi_styles_default2.reset.open) {
95264
- returnValue = [];
95265
- } else if (endCodesSet.has(code.code)) {
95266
- returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.code);
95267
- } else {
95268
- returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.endCode);
95269
- returnValue.push(code);
95270
- }
95271
- }
95272
- return returnValue;
95273
- }
95274
- function undoAnsiCodes(codes) {
95275
- const reduced = reduceAnsiCodes(codes);
95276
- const endCodes = reduced.map(({ endCode }) => endCode);
95277
- return endCodes.reverse().join("");
95278
- }
95279
- function sliceAnsi(string5, start, end2) {
95280
- const tokens = tokenize(string5, end2);
95281
- let activeCodes = [];
95282
- let position = 0;
95283
- let returnValue = "";
95284
- let include = false;
95285
- for (const token of tokens) {
95286
- if (end2 !== undefined && position >= end2) {
95287
- break;
95288
- }
95289
- if (token.type === "ansi") {
95290
- activeCodes.push(token);
95291
- if (include) {
95292
- returnValue += token.code;
95293
- }
95294
- } else {
95295
- if (!include && position >= start) {
95296
- include = true;
95297
- activeCodes = reduceAnsiCodes(activeCodes);
95298
- returnValue = activeCodes.map(({ code }) => code).join("");
95299
- }
95300
- if (include) {
95301
- returnValue += token.value;
95302
- }
95303
- position += token.isFullWidth ? 2 : token.value.length;
95304
- }
95305
- }
95306
- returnValue += undoAnsiCodes(activeCodes);
95307
- return returnValue;
95308
- }
95309
- var ESCAPES2, CODE_POINT_0, CODE_POINT_9, MAX_ANSI_SEQUENCE_LENGTH = 19, endCodesSet, endCodesMap;
95310
- var init_slice_ansi = __esm(() => {
95311
- init_ansi_styles2();
95312
- init_is_fullwidth_code_point();
95313
- ESCAPES2 = new Set([27, 155]);
95314
- CODE_POINT_0 = "0".codePointAt(0);
95315
- CODE_POINT_9 = "9".codePointAt(0);
95316
- endCodesSet = new Set;
95317
- endCodesMap = new Map;
95318
- for (const [start, end2] of ansi_styles_default2.codes) {
95319
- endCodesSet.add(ansi_styles_default2.color.ansi(end2));
95320
- endCodesMap.set(ansi_styles_default2.color.ansi(start), ansi_styles_default2.color.ansi(end2));
95321
- }
95322
- });
95323
-
95324
- // node_modules/string-width/node_modules/ansi-regex/index.js
95325
- function ansiRegex3({ onlyFirst = false } = {}) {
95326
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
95327
- const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
95328
- const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
95329
- const pattern = `${osc}|${csi}`;
95330
- return new RegExp(pattern, onlyFirst ? undefined : "g");
95331
- }
95332
-
95333
- // node_modules/string-width/node_modules/strip-ansi/index.js
95334
- function stripAnsi3(string5) {
95335
- if (typeof string5 !== "string") {
95336
- throw new TypeError(`Expected a \`string\`, got \`${typeof string5}\``);
95337
- }
95338
- return string5.replace(regex3, "");
95339
- }
95340
- var regex3;
95341
- var init_strip_ansi3 = __esm(() => {
95342
- regex3 = ansiRegex3();
95343
- });
95344
-
95345
95175
  // node_modules/string-width/index.js
95346
95176
  function baseVisible(segment) {
95347
95177
  return segment.replace(leadingNonPrintingRegex, "");
@@ -95360,7 +95190,7 @@ function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
95360
95190
  }
95361
95191
  return extra;
95362
95192
  }
95363
- function stringWidth3(input, options = {}) {
95193
+ function stringWidth2(input, options = {}) {
95364
95194
  if (typeof input !== "string" || input.length === 0) {
95365
95195
  return 0;
95366
95196
  }
@@ -95370,14 +95200,14 @@ function stringWidth3(input, options = {}) {
95370
95200
  } = options;
95371
95201
  let string5 = input;
95372
95202
  if (!countAnsiEscapeCodes) {
95373
- string5 = stripAnsi3(string5);
95203
+ string5 = stripAnsi2(string5);
95374
95204
  }
95375
95205
  if (string5.length === 0) {
95376
95206
  return 0;
95377
95207
  }
95378
95208
  let width = 0;
95379
95209
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
95380
- for (const { segment } of segmenter3.segment(string5)) {
95210
+ for (const { segment } of segmenter2.segment(string5)) {
95381
95211
  if (isZeroWidthCluster(segment)) {
95382
95212
  continue;
95383
95213
  }
@@ -95391,16 +95221,200 @@ function stringWidth3(input, options = {}) {
95391
95221
  }
95392
95222
  return width;
95393
95223
  }
95394
- var segmenter3, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex;
95395
- var init_string_width3 = __esm(() => {
95396
- init_strip_ansi3();
95224
+ var segmenter2, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex;
95225
+ var init_string_width2 = __esm(() => {
95226
+ init_strip_ansi2();
95397
95227
  init_get_east_asian_width();
95398
- segmenter3 = new Intl.Segmenter;
95228
+ segmenter2 = new Intl.Segmenter;
95399
95229
  zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v;
95400
95230
  leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
95401
95231
  rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
95402
95232
  });
95403
95233
 
95234
+ // node_modules/widest-line/index.js
95235
+ function widestLine(string5) {
95236
+ let lineWidth = 0;
95237
+ for (const line of string5.split(`
95238
+ `)) {
95239
+ lineWidth = Math.max(lineWidth, stringWidth2(line));
95240
+ }
95241
+ return lineWidth;
95242
+ }
95243
+ var init_widest_line = __esm(() => {
95244
+ init_string_width2();
95245
+ });
95246
+
95247
+ // node_modules/ink/build/measure-text.js
95248
+ var cache, measureText = (text3) => {
95249
+ if (text3.length === 0) {
95250
+ return {
95251
+ width: 0,
95252
+ height: 0
95253
+ };
95254
+ }
95255
+ const cachedDimensions = cache.get(text3);
95256
+ if (cachedDimensions) {
95257
+ return cachedDimensions;
95258
+ }
95259
+ const width = widestLine(text3);
95260
+ const height = text3.split(`
95261
+ `).length;
95262
+ const dimensions = { width, height };
95263
+ cache.set(text3, dimensions);
95264
+ return dimensions;
95265
+ }, measure_text_default;
95266
+ var init_measure_text = __esm(() => {
95267
+ init_widest_line();
95268
+ cache = new Map;
95269
+ measure_text_default = measureText;
95270
+ });
95271
+
95272
+ // node_modules/is-fullwidth-code-point/index.js
95273
+ function isFullwidthCodePoint(codePoint) {
95274
+ if (!Number.isInteger(codePoint)) {
95275
+ return false;
95276
+ }
95277
+ return isFullWidth(codePoint) || isWide(codePoint);
95278
+ }
95279
+ var init_is_fullwidth_code_point = __esm(() => {
95280
+ init_get_east_asian_width();
95281
+ });
95282
+
95283
+ // node_modules/slice-ansi/index.js
95284
+ function getEndCode(code) {
95285
+ if (endCodesSet.has(code)) {
95286
+ return code;
95287
+ }
95288
+ if (endCodesMap.has(code)) {
95289
+ return endCodesMap.get(code);
95290
+ }
95291
+ code = code.slice(2);
95292
+ if (code.includes(";")) {
95293
+ code = code[0] + "0";
95294
+ }
95295
+ const returnValue = ansi_styles_default2.codes.get(Number.parseInt(code, 10));
95296
+ if (returnValue) {
95297
+ return ansi_styles_default2.color.ansi(returnValue);
95298
+ }
95299
+ return ansi_styles_default2.reset.open;
95300
+ }
95301
+ function findNumberIndex(string5) {
95302
+ for (let index2 = 0;index2 < string5.length; index2++) {
95303
+ const codePoint = string5.codePointAt(index2);
95304
+ if (codePoint >= CODE_POINT_0 && codePoint <= CODE_POINT_9) {
95305
+ return index2;
95306
+ }
95307
+ }
95308
+ return -1;
95309
+ }
95310
+ function parseAnsiCode(string5, offset) {
95311
+ string5 = string5.slice(offset, offset + MAX_ANSI_SEQUENCE_LENGTH);
95312
+ const startIndex = findNumberIndex(string5);
95313
+ if (startIndex !== -1) {
95314
+ let endIndex = string5.indexOf("m", startIndex);
95315
+ if (endIndex === -1) {
95316
+ endIndex = string5.length;
95317
+ }
95318
+ return string5.slice(0, endIndex + 1);
95319
+ }
95320
+ }
95321
+ function tokenize(string5, endCharacter = Number.POSITIVE_INFINITY) {
95322
+ const returnValue = [];
95323
+ let index2 = 0;
95324
+ let visibleCount = 0;
95325
+ while (index2 < string5.length) {
95326
+ const codePoint = string5.codePointAt(index2);
95327
+ if (ESCAPES2.has(codePoint)) {
95328
+ const code = parseAnsiCode(string5, index2);
95329
+ if (code) {
95330
+ returnValue.push({
95331
+ type: "ansi",
95332
+ code,
95333
+ endCode: getEndCode(code)
95334
+ });
95335
+ index2 += code.length;
95336
+ continue;
95337
+ }
95338
+ }
95339
+ const isFullWidth2 = isFullwidthCodePoint(codePoint);
95340
+ const character = String.fromCodePoint(codePoint);
95341
+ returnValue.push({
95342
+ type: "character",
95343
+ value: character,
95344
+ isFullWidth: isFullWidth2
95345
+ });
95346
+ index2 += character.length;
95347
+ visibleCount += isFullWidth2 ? 2 : character.length;
95348
+ if (visibleCount >= endCharacter) {
95349
+ break;
95350
+ }
95351
+ }
95352
+ return returnValue;
95353
+ }
95354
+ function reduceAnsiCodes(codes) {
95355
+ let returnValue = [];
95356
+ for (const code of codes) {
95357
+ if (code.code === ansi_styles_default2.reset.open) {
95358
+ returnValue = [];
95359
+ } else if (endCodesSet.has(code.code)) {
95360
+ returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.code);
95361
+ } else {
95362
+ returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.endCode);
95363
+ returnValue.push(code);
95364
+ }
95365
+ }
95366
+ return returnValue;
95367
+ }
95368
+ function undoAnsiCodes(codes) {
95369
+ const reduced = reduceAnsiCodes(codes);
95370
+ const endCodes = reduced.map(({ endCode }) => endCode);
95371
+ return endCodes.reverse().join("");
95372
+ }
95373
+ function sliceAnsi(string5, start, end2) {
95374
+ const tokens = tokenize(string5, end2);
95375
+ let activeCodes = [];
95376
+ let position = 0;
95377
+ let returnValue = "";
95378
+ let include = false;
95379
+ for (const token of tokens) {
95380
+ if (end2 !== undefined && position >= end2) {
95381
+ break;
95382
+ }
95383
+ if (token.type === "ansi") {
95384
+ activeCodes.push(token);
95385
+ if (include) {
95386
+ returnValue += token.code;
95387
+ }
95388
+ } else {
95389
+ if (!include && position >= start) {
95390
+ include = true;
95391
+ activeCodes = reduceAnsiCodes(activeCodes);
95392
+ returnValue = activeCodes.map(({ code }) => code).join("");
95393
+ }
95394
+ if (include) {
95395
+ returnValue += token.value;
95396
+ }
95397
+ position += token.isFullWidth ? 2 : token.value.length;
95398
+ }
95399
+ }
95400
+ returnValue += undoAnsiCodes(activeCodes);
95401
+ return returnValue;
95402
+ }
95403
+ var ESCAPES2, CODE_POINT_0, CODE_POINT_9, MAX_ANSI_SEQUENCE_LENGTH = 19, endCodesSet, endCodesMap;
95404
+ var init_slice_ansi = __esm(() => {
95405
+ init_ansi_styles2();
95406
+ init_is_fullwidth_code_point();
95407
+ ESCAPES2 = new Set([27, 155]);
95408
+ CODE_POINT_0 = "0".codePointAt(0);
95409
+ CODE_POINT_9 = "9".codePointAt(0);
95410
+ endCodesSet = new Set;
95411
+ endCodesMap = new Map;
95412
+ for (const [start, end2] of ansi_styles_default2.codes) {
95413
+ endCodesSet.add(ansi_styles_default2.color.ansi(end2));
95414
+ endCodesMap.set(ansi_styles_default2.color.ansi(start), ansi_styles_default2.color.ansi(end2));
95415
+ }
95416
+ });
95417
+
95404
95418
  // node_modules/cli-truncate/index.js
95405
95419
  function getIndexOfNearestSpace(string5, wantedIndex, shouldSearchRight) {
95406
95420
  if (string5.charAt(wantedIndex) === " ") {
@@ -95431,7 +95445,7 @@ function cliTruncate(text3, columns, options = {}) {
95431
95445
  if (columns < 1) {
95432
95446
  return "";
95433
95447
  }
95434
- const length = stringWidth3(text3);
95448
+ const length = stringWidth2(text3);
95435
95449
  if (length <= columns) {
95436
95450
  return text3;
95437
95451
  }
@@ -95497,7 +95511,7 @@ function cliTruncate(text3, columns, options = {}) {
95497
95511
  if (space) {
95498
95512
  truncationCharacter += " ";
95499
95513
  }
95500
- const right = sliceAnsi(text3, length - columns + stringWidth3(truncationCharacter), length);
95514
+ const right = sliceAnsi(text3, length - columns + stringWidth2(truncationCharacter), length);
95501
95515
  return prependWithInheritedStyleFromStart(truncationCharacter, right);
95502
95516
  }
95503
95517
  if (position === "middle") {
@@ -95510,7 +95524,7 @@ function cliTruncate(text3, columns, options = {}) {
95510
95524
  const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text3, length - (columns - half) + 1, true);
95511
95525
  return sliceAnsi(text3, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text3, spaceNearSecondBreakPoint, length).trim();
95512
95526
  }
95513
- return sliceAnsi(text3, 0, half) + truncationCharacter + sliceAnsi(text3, length - (columns - half) + stringWidth3(truncationCharacter), length);
95527
+ return sliceAnsi(text3, 0, half) + truncationCharacter + sliceAnsi(text3, length - (columns - half) + stringWidth2(truncationCharacter), length);
95514
95528
  }
95515
95529
  if (position === "end") {
95516
95530
  if (preferTruncationOnSpace) {
@@ -95521,14 +95535,14 @@ function cliTruncate(text3, columns, options = {}) {
95521
95535
  if (space) {
95522
95536
  truncationCharacter = ` ${truncationCharacter}`;
95523
95537
  }
95524
- const left = sliceAnsi(text3, 0, columns - stringWidth3(truncationCharacter));
95538
+ const left = sliceAnsi(text3, 0, columns - stringWidth2(truncationCharacter));
95525
95539
  return appendWithInheritedStyleFromEnd(left, truncationCharacter);
95526
95540
  }
95527
95541
  throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
95528
95542
  }
95529
95543
  var init_cli_truncate = __esm(() => {
95530
95544
  init_slice_ansi();
95531
- init_string_width3();
95545
+ init_string_width2();
95532
95546
  });
95533
95547
 
95534
95548
  // node_modules/ink/build/wrap-text.js
@@ -99011,13 +99025,13 @@ var require_backend = __commonJS((exports, module) => {
99011
99025
  });
99012
99026
  return value;
99013
99027
  },
99014
- useEffect: function useEffect(create) {
99028
+ useEffect: function useEffect(create2) {
99015
99029
  nextHook();
99016
99030
  hookLog.push({
99017
99031
  displayName: null,
99018
99032
  primitive: "Effect",
99019
99033
  stackError: Error(),
99020
- value: create,
99034
+ value: create2,
99021
99035
  debugInfo: null,
99022
99036
  dispatcherHookName: "Effect"
99023
99037
  });
@@ -99035,24 +99049,24 @@ var require_backend = __commonJS((exports, module) => {
99035
99049
  dispatcherHookName: "ImperativeHandle"
99036
99050
  });
99037
99051
  },
99038
- useLayoutEffect: function useLayoutEffect(create) {
99052
+ useLayoutEffect: function useLayoutEffect(create2) {
99039
99053
  nextHook();
99040
99054
  hookLog.push({
99041
99055
  displayName: null,
99042
99056
  primitive: "LayoutEffect",
99043
99057
  stackError: Error(),
99044
- value: create,
99058
+ value: create2,
99045
99059
  debugInfo: null,
99046
99060
  dispatcherHookName: "LayoutEffect"
99047
99061
  });
99048
99062
  },
99049
- useInsertionEffect: function useInsertionEffect(create) {
99063
+ useInsertionEffect: function useInsertionEffect(create2) {
99050
99064
  nextHook();
99051
99065
  hookLog.push({
99052
99066
  displayName: null,
99053
99067
  primitive: "InsertionEffect",
99054
99068
  stackError: Error(),
99055
- value: create,
99069
+ value: create2,
99056
99070
  debugInfo: null,
99057
99071
  dispatcherHookName: "InsertionEffect"
99058
99072
  });
@@ -99560,7 +99574,7 @@ var require_backend = __commonJS((exports, module) => {
99560
99574
  } else {}
99561
99575
  },
99562
99576
  126: (__unused_webpack_module, exports2, __webpack_require__2) => {
99563
- var process19 = __webpack_require__2(169);
99577
+ var process20 = __webpack_require__2(169);
99564
99578
  function _typeof(obj) {
99565
99579
  "@babel/helpers - typeof";
99566
99580
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -99759,8 +99773,8 @@ var require_backend = __commonJS((exports, module) => {
99759
99773
  });
99760
99774
  if (!window.dispatchEvent(event))
99761
99775
  return;
99762
- } else if ((typeof process19 === "undefined" ? "undefined" : _typeof(process19)) === "object" && typeof process19.emit === "function") {
99763
- process19.emit("uncaughtException", error2);
99776
+ } else if ((typeof process20 === "undefined" ? "undefined" : _typeof(process20)) === "object" && typeof process20.emit === "function") {
99777
+ process20.emit("uncaughtException", error2);
99764
99778
  return;
99765
99779
  }
99766
99780
  console.error(error2);
@@ -99978,23 +99992,23 @@ var require_backend = __commonJS((exports, module) => {
99978
99992
  exports2.useDeferredValue = function(value, initialValue) {
99979
99993
  return ReactSharedInternals.H.useDeferredValue(value, initialValue);
99980
99994
  };
99981
- exports2.useEffect = function(create, deps) {
99982
- return ReactSharedInternals.H.useEffect(create, deps);
99995
+ exports2.useEffect = function(create2, deps) {
99996
+ return ReactSharedInternals.H.useEffect(create2, deps);
99983
99997
  };
99984
99998
  exports2.useId = function() {
99985
99999
  return ReactSharedInternals.H.useId();
99986
100000
  };
99987
- exports2.useImperativeHandle = function(ref, create, deps) {
99988
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
100001
+ exports2.useImperativeHandle = function(ref, create2, deps) {
100002
+ return ReactSharedInternals.H.useImperativeHandle(ref, create2, deps);
99989
100003
  };
99990
- exports2.useInsertionEffect = function(create, deps) {
99991
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
100004
+ exports2.useInsertionEffect = function(create2, deps) {
100005
+ return ReactSharedInternals.H.useInsertionEffect(create2, deps);
99992
100006
  };
99993
- exports2.useLayoutEffect = function(create, deps) {
99994
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
100007
+ exports2.useLayoutEffect = function(create2, deps) {
100008
+ return ReactSharedInternals.H.useLayoutEffect(create2, deps);
99995
100009
  };
99996
- exports2.useMemo = function(create, deps) {
99997
- return ReactSharedInternals.H.useMemo(create, deps);
100010
+ exports2.useMemo = function(create2, deps) {
100011
+ return ReactSharedInternals.H.useMemo(create2, deps);
99998
100012
  };
99999
100013
  exports2.useOptimistic = useOptimistic;
100000
100014
  exports2.useReducer = function(reducer, initialArg, init) {
@@ -100539,7 +100553,7 @@ var require_backend = __commonJS((exports, module) => {
100539
100553
  module2.exports = LRUCache;
100540
100554
  },
100541
100555
  169: (module2) => {
100542
- var process19 = module2.exports = {};
100556
+ var process20 = module2.exports = {};
100543
100557
  var cachedSetTimeout;
100544
100558
  var cachedClearTimeout;
100545
100559
  function defaultSetTimout() {
@@ -100644,7 +100658,7 @@ var require_backend = __commonJS((exports, module) => {
100644
100658
  draining = false;
100645
100659
  runClearTimeout(timeout);
100646
100660
  }
100647
- process19.nextTick = function(fun) {
100661
+ process20.nextTick = function(fun) {
100648
100662
  var args = new Array(arguments.length - 1);
100649
100663
  if (arguments.length > 1) {
100650
100664
  for (var i2 = 1;i2 < arguments.length; i2++) {
@@ -100663,35 +100677,35 @@ var require_backend = __commonJS((exports, module) => {
100663
100677
  Item.prototype.run = function() {
100664
100678
  this.fun.apply(null, this.array);
100665
100679
  };
100666
- process19.title = "browser";
100667
- process19.browser = true;
100668
- process19.env = {};
100669
- process19.argv = [];
100670
- process19.version = "";
100671
- process19.versions = {};
100680
+ process20.title = "browser";
100681
+ process20.browser = true;
100682
+ process20.env = {};
100683
+ process20.argv = [];
100684
+ process20.version = "";
100685
+ process20.versions = {};
100672
100686
  function noop4() {}
100673
- process19.on = noop4;
100674
- process19.addListener = noop4;
100675
- process19.once = noop4;
100676
- process19.off = noop4;
100677
- process19.removeListener = noop4;
100678
- process19.removeAllListeners = noop4;
100679
- process19.emit = noop4;
100680
- process19.prependListener = noop4;
100681
- process19.prependOnceListener = noop4;
100682
- process19.listeners = function(name) {
100687
+ process20.on = noop4;
100688
+ process20.addListener = noop4;
100689
+ process20.once = noop4;
100690
+ process20.off = noop4;
100691
+ process20.removeListener = noop4;
100692
+ process20.removeAllListeners = noop4;
100693
+ process20.emit = noop4;
100694
+ process20.prependListener = noop4;
100695
+ process20.prependOnceListener = noop4;
100696
+ process20.listeners = function(name) {
100683
100697
  return [];
100684
100698
  };
100685
- process19.binding = function(name) {
100699
+ process20.binding = function(name) {
100686
100700
  throw new Error("process.binding is not supported");
100687
100701
  };
100688
- process19.cwd = function() {
100702
+ process20.cwd = function() {
100689
100703
  return "/";
100690
100704
  };
100691
- process19.chdir = function(dir) {
100705
+ process20.chdir = function(dir) {
100692
100706
  throw new Error("process.chdir is not supported");
100693
100707
  };
100694
- process19.umask = function() {
100708
+ process20.umask = function() {
100695
100709
  return 0;
100696
100710
  };
100697
100711
  },
@@ -101707,7 +101721,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
101707
101721
  var StrictMode = 1;
101708
101722
  var isArray = Array.isArray;
101709
101723
  const src_isArray = isArray;
101710
- var process19 = __webpack_require__(169);
101724
+ var process20 = __webpack_require__(169);
101711
101725
  function ownKeys(object4, enumerableOnly) {
101712
101726
  var keys = Object.keys(object4);
101713
101727
  if (Object.getOwnPropertySymbols) {
@@ -101998,7 +102012,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
101998
102012
  });
101999
102013
  }
102000
102014
  function getDefaultOpenInEditorURL() {
102001
- return typeof process19.env.EDITOR_URL === "string" ? process19.env.EDITOR_URL : "";
102015
+ return typeof process20.env.EDITOR_URL === "string" ? process20.env.EDITOR_URL : "";
102002
102016
  }
102003
102017
  function getOpenInEditorURL() {
102004
102018
  try {
@@ -112884,8 +112898,8 @@ var init_devtools = __esm(() => {
112884
112898
  });
112885
112899
 
112886
112900
  // node_modules/ink/build/reconciler.js
112887
- import process19 from "node:process";
112888
- var import_react_reconciler, import_constants, import_react, diff = (before2, after2) => {
112901
+ import process20 from "node:process";
112902
+ var import_react_reconciler, import_constants, Scheduler, import_react, diff = (before2, after2) => {
112889
112903
  if (before2 === after2) {
112890
112904
  return;
112891
112905
  }
@@ -112917,11 +112931,12 @@ var import_react_reconciler, import_constants, import_react, diff = (before2, af
112917
112931
  var init_reconciler = __esm(async () => {
112918
112932
  import_react_reconciler = __toESM(require_react_reconciler(), 1);
112919
112933
  import_constants = __toESM(require_constants8(), 1);
112934
+ Scheduler = __toESM(require_scheduler(), 1);
112920
112935
  await init_src();
112921
112936
  import_react = __toESM(require_react(), 1);
112922
112937
  await init_dom();
112923
112938
  await init_styles();
112924
- if (process19.env["DEV"] === "true") {
112939
+ if (process20.env["DEV"] === "true") {
112925
112940
  try {
112926
112941
  await Promise.resolve().then(() => (init_devtools(), exports_devtools));
112927
112942
  } catch (error2) {
@@ -113034,6 +113049,12 @@ $ npm install --save-dev react-devtools-core
113034
113049
  supportsMutation: true,
113035
113050
  supportsPersistence: false,
113036
113051
  supportsHydration: false,
113052
+ supportsMicrotasks: true,
113053
+ scheduleMicrotask: queueMicrotask,
113054
+ scheduleCallback: Scheduler.unstable_scheduleCallback,
113055
+ cancelCallback: Scheduler.unstable_cancelCallback,
113056
+ shouldYield: Scheduler.unstable_shouldYield,
113057
+ now: Scheduler.unstable_now,
113037
113058
  scheduleTimeout: setTimeout,
113038
113059
  cancelTimeout: clearTimeout,
113039
113060
  noTimeout: -1,
@@ -113097,7 +113118,7 @@ $ npm install --save-dev react-devtools-core
113097
113118
  return import_constants.DefaultEventPriority;
113098
113119
  },
113099
113120
  maySuspendCommit() {
113100
- return false;
113121
+ return true;
113101
113122
  },
113102
113123
  NotPendingTransition: undefined,
113103
113124
  HostTransitionContext: import_react.createContext(null),
@@ -113145,8 +113166,8 @@ function indentString(string5, count2 = 1, options = {}) {
113145
113166
  if (count2 === 0) {
113146
113167
  return string5;
113147
113168
  }
113148
- const regex4 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
113149
- return string5.replace(regex4, indent.repeat(count2));
113169
+ const regex3 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
113170
+ return string5.replace(regex3, indent.repeat(count2));
113150
113171
  }
113151
113172
 
113152
113173
  // node_modules/ink/build/get-max-width.js
@@ -113252,7 +113273,7 @@ var require_cli_boxes = __commonJS((exports, module) => {
113252
113273
  });
113253
113274
 
113254
113275
  // node_modules/ink/build/colorize.js
113255
- var rgbRegex, ansiRegex4, isNamedColor = (color) => {
113276
+ var rgbRegex, ansiRegex3, isNamedColor = (color) => {
113256
113277
  return color in source_default;
113257
113278
  }, colorize = (str, color, type) => {
113258
113279
  if (!color) {
@@ -113269,7 +113290,7 @@ var rgbRegex, ansiRegex4, isNamedColor = (color) => {
113269
113290
  return type === "foreground" ? source_default.hex(color)(str) : source_default.bgHex(color)(str);
113270
113291
  }
113271
113292
  if (color.startsWith("ansi256")) {
113272
- const matches = ansiRegex4.exec(color);
113293
+ const matches = ansiRegex3.exec(color);
113273
113294
  if (!matches) {
113274
113295
  return str;
113275
113296
  }
@@ -113291,7 +113312,7 @@ var rgbRegex, ansiRegex4, isNamedColor = (color) => {
113291
113312
  var init_colorize = __esm(() => {
113292
113313
  init_source();
113293
113314
  rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
113294
- ansiRegex4 = /^ansi256\(\s?(\d+)\s?\)$/;
113315
+ ansiRegex3 = /^ansi256\(\s?(\d+)\s?\)$/;
113295
113316
  colorize_default = colorize;
113296
113317
  });
113297
113318
 
@@ -113855,7 +113876,7 @@ class Output {
113855
113876
  if (clipHorizontally) {
113856
113877
  lines = lines.map((line) => {
113857
113878
  const from = x < clip.x1 ? clip.x1 - x : 0;
113858
- const width = stringWidth3(line);
113879
+ const width = stringWidth2(line);
113859
113880
  const to = x + width > clip.x2 ? clip.x2 - x : width;
113860
113881
  return sliceAnsi(line, from, to);
113861
113882
  });
@@ -113886,7 +113907,7 @@ class Output {
113886
113907
  let offsetX = x;
113887
113908
  for (const character of characters) {
113888
113909
  currentLine[offsetX] = character;
113889
- const characterWidth = Math.max(1, stringWidth3(character.value));
113910
+ const characterWidth = Math.max(1, stringWidth2(character.value));
113890
113911
  if (characterWidth > 1) {
113891
113912
  for (let index3 = 1;index3 < characterWidth; index3++) {
113892
113913
  currentLine[offsetX + index3] = {
@@ -113916,7 +113937,7 @@ class Output {
113916
113937
  }
113917
113938
  var init_output2 = __esm(() => {
113918
113939
  init_slice_ansi();
113919
- init_string_width3();
113940
+ init_string_width2();
113920
113941
  init_widest_line();
113921
113942
  init_build();
113922
113943
  });
@@ -114046,26 +114067,26 @@ var require_signals4 = __commonJS((exports, module) => {
114046
114067
 
114047
114068
  // node_modules/restore-cursor/node_modules/signal-exit/index.js
114048
114069
  var require_signal_exit3 = __commonJS((exports, module) => {
114049
- var process20 = global.process;
114050
- var processOk2 = function(process21) {
114051
- return process21 && typeof process21 === "object" && typeof process21.removeListener === "function" && typeof process21.emit === "function" && typeof process21.reallyExit === "function" && typeof process21.listeners === "function" && typeof process21.kill === "function" && typeof process21.pid === "number" && typeof process21.on === "function";
114070
+ var process21 = global.process;
114071
+ var processOk2 = function(process22) {
114072
+ return process22 && typeof process22 === "object" && typeof process22.removeListener === "function" && typeof process22.emit === "function" && typeof process22.reallyExit === "function" && typeof process22.listeners === "function" && typeof process22.kill === "function" && typeof process22.pid === "number" && typeof process22.on === "function";
114052
114073
  };
114053
- if (!processOk2(process20)) {
114074
+ if (!processOk2(process21)) {
114054
114075
  module.exports = function() {
114055
114076
  return function() {};
114056
114077
  };
114057
114078
  } else {
114058
114079
  assert2 = __require("assert");
114059
114080
  signals2 = require_signals4();
114060
- isWin = /^win/i.test(process20.platform);
114081
+ isWin = /^win/i.test(process21.platform);
114061
114082
  EE = __require("events");
114062
114083
  if (typeof EE !== "function") {
114063
114084
  EE = EE.EventEmitter;
114064
114085
  }
114065
- if (process20.__signal_exit_emitter__) {
114066
- emitter = process20.__signal_exit_emitter__;
114086
+ if (process21.__signal_exit_emitter__) {
114087
+ emitter = process21.__signal_exit_emitter__;
114067
114088
  } else {
114068
- emitter = process20.__signal_exit_emitter__ = new EE;
114089
+ emitter = process21.__signal_exit_emitter__ = new EE;
114069
114090
  emitter.count = 0;
114070
114091
  emitter.emitted = {};
114071
114092
  }
@@ -114101,11 +114122,11 @@ var require_signal_exit3 = __commonJS((exports, module) => {
114101
114122
  loaded = false;
114102
114123
  signals2.forEach(function(sig) {
114103
114124
  try {
114104
- process20.removeListener(sig, sigListeners[sig]);
114125
+ process21.removeListener(sig, sigListeners[sig]);
114105
114126
  } catch (er) {}
114106
114127
  });
114107
- process20.emit = originalProcessEmit;
114108
- process20.reallyExit = originalProcessReallyExit;
114128
+ process21.emit = originalProcessEmit;
114129
+ process21.reallyExit = originalProcessReallyExit;
114109
114130
  emitter.count -= 1;
114110
114131
  };
114111
114132
  module.exports.unload = unload2;
@@ -114122,7 +114143,7 @@ var require_signal_exit3 = __commonJS((exports, module) => {
114122
114143
  if (!processOk2(global.process)) {
114123
114144
  return;
114124
114145
  }
114125
- var listeners = process20.listeners(sig);
114146
+ var listeners = process21.listeners(sig);
114126
114147
  if (listeners.length === emitter.count) {
114127
114148
  unload2();
114128
114149
  emit("exit", null, sig);
@@ -114130,7 +114151,7 @@ var require_signal_exit3 = __commonJS((exports, module) => {
114130
114151
  if (isWin && sig === "SIGHUP") {
114131
114152
  sig = "SIGINT";
114132
114153
  }
114133
- process20.kill(process20.pid, sig);
114154
+ process21.kill(process21.pid, sig);
114134
114155
  }
114135
114156
  };
114136
114157
  });
@@ -114146,35 +114167,35 @@ var require_signal_exit3 = __commonJS((exports, module) => {
114146
114167
  emitter.count += 1;
114147
114168
  signals2 = signals2.filter(function(sig) {
114148
114169
  try {
114149
- process20.on(sig, sigListeners[sig]);
114170
+ process21.on(sig, sigListeners[sig]);
114150
114171
  return true;
114151
114172
  } catch (er) {
114152
114173
  return false;
114153
114174
  }
114154
114175
  });
114155
- process20.emit = processEmit;
114156
- process20.reallyExit = processReallyExit;
114176
+ process21.emit = processEmit;
114177
+ process21.reallyExit = processReallyExit;
114157
114178
  };
114158
114179
  module.exports.load = load3;
114159
- originalProcessReallyExit = process20.reallyExit;
114180
+ originalProcessReallyExit = process21.reallyExit;
114160
114181
  processReallyExit = function processReallyExit(code) {
114161
114182
  if (!processOk2(global.process)) {
114162
114183
  return;
114163
114184
  }
114164
- process20.exitCode = code || 0;
114165
- emit("exit", process20.exitCode, null);
114166
- emit("afterexit", process20.exitCode, null);
114167
- originalProcessReallyExit.call(process20, process20.exitCode);
114185
+ process21.exitCode = code || 0;
114186
+ emit("exit", process21.exitCode, null);
114187
+ emit("afterexit", process21.exitCode, null);
114188
+ originalProcessReallyExit.call(process21, process21.exitCode);
114168
114189
  };
114169
- originalProcessEmit = process20.emit;
114190
+ originalProcessEmit = process21.emit;
114170
114191
  processEmit = function processEmit(ev, arg) {
114171
114192
  if (ev === "exit" && processOk2(global.process)) {
114172
114193
  if (arg !== undefined) {
114173
- process20.exitCode = arg;
114194
+ process21.exitCode = arg;
114174
114195
  }
114175
114196
  var ret = originalProcessEmit.apply(this, arguments);
114176
- emit("exit", process20.exitCode, null);
114177
- emit("afterexit", process20.exitCode, null);
114197
+ emit("exit", process21.exitCode, null);
114198
+ emit("afterexit", process21.exitCode, null);
114178
114199
  return ret;
114179
114200
  } else {
114180
114201
  return originalProcessEmit.apply(this, arguments);
@@ -114198,33 +114219,33 @@ var require_signal_exit3 = __commonJS((exports, module) => {
114198
114219
  });
114199
114220
 
114200
114221
  // node_modules/restore-cursor/index.js
114201
- import process20 from "node:process";
114222
+ import process21 from "node:process";
114202
114223
  var import_onetime, import_signal_exit2, restoreCursor, restore_cursor_default;
114203
114224
  var init_restore_cursor = __esm(() => {
114204
114225
  import_onetime = __toESM(require_onetime2(), 1);
114205
114226
  import_signal_exit2 = __toESM(require_signal_exit3(), 1);
114206
114227
  restoreCursor = import_onetime.default(() => {
114207
114228
  import_signal_exit2.default(() => {
114208
- process20.stderr.write("\x1B[?25h");
114229
+ process21.stderr.write("\x1B[?25h");
114209
114230
  }, { alwaysLast: true });
114210
114231
  });
114211
114232
  restore_cursor_default = restoreCursor;
114212
114233
  });
114213
114234
 
114214
114235
  // node_modules/cli-cursor/index.js
114215
- import process21 from "node:process";
114236
+ import process22 from "node:process";
114216
114237
  var isHidden = false, cliCursor, cli_cursor_default;
114217
114238
  var init_cli_cursor = __esm(() => {
114218
114239
  init_restore_cursor();
114219
114240
  cliCursor = {};
114220
- cliCursor.show = (writableStream = process21.stderr) => {
114241
+ cliCursor.show = (writableStream = process22.stderr) => {
114221
114242
  if (!writableStream.isTTY) {
114222
114243
  return;
114223
114244
  }
114224
114245
  isHidden = false;
114225
114246
  writableStream.write("\x1B[?25h");
114226
114247
  };
114227
- cliCursor.hide = (writableStream = process21.stderr) => {
114248
+ cliCursor.hide = (writableStream = process22.stderr) => {
114228
114249
  if (!writableStream.isTTY) {
114229
114250
  return;
114230
114251
  }
@@ -114245,113 +114266,248 @@ var init_cli_cursor = __esm(() => {
114245
114266
  cli_cursor_default = cliCursor;
114246
114267
  });
114247
114268
 
114269
+ // node_modules/ink/build/cursor-helpers.js
114270
+ var showCursorEscape = "\x1B[?25h", hideCursorEscape = "\x1B[?25l", cursorPositionChanged = (a2, b) => a2?.x !== b?.x || a2?.y !== b?.y, buildCursorSuffix = (visibleLineCount, cursorPosition) => {
114271
+ if (!cursorPosition) {
114272
+ return "";
114273
+ }
114274
+ const moveUp = visibleLineCount - cursorPosition.y;
114275
+ return (moveUp > 0 ? exports_base2.cursorUp(moveUp) : "") + exports_base2.cursorTo(cursorPosition.x) + showCursorEscape;
114276
+ }, buildReturnToBottom = (previousLineCount, previousCursorPosition) => {
114277
+ if (!previousCursorPosition) {
114278
+ return "";
114279
+ }
114280
+ const down = previousLineCount - 1 - previousCursorPosition.y;
114281
+ return (down > 0 ? exports_base2.cursorDown(down) : "") + exports_base2.cursorTo(0);
114282
+ }, buildCursorOnlySequence = (input) => {
114283
+ const hidePrefix = input.cursorWasShown ? hideCursorEscape : "";
114284
+ const returnToBottom = buildReturnToBottom(input.previousLineCount, input.previousCursorPosition);
114285
+ const cursorSuffix = buildCursorSuffix(input.visibleLineCount, input.cursorPosition);
114286
+ return hidePrefix + returnToBottom + cursorSuffix;
114287
+ }, buildReturnToBottomPrefix = (cursorWasShown, previousLineCount, previousCursorPosition) => {
114288
+ if (!cursorWasShown) {
114289
+ return "";
114290
+ }
114291
+ return hideCursorEscape + buildReturnToBottom(previousLineCount, previousCursorPosition);
114292
+ };
114293
+ var init_cursor_helpers = __esm(() => {
114294
+ init_ansi_escapes();
114295
+ });
114296
+
114248
114297
  // node_modules/ink/build/log-update.js
114249
- var createStandard = (stream, { showCursor = false } = {}) => {
114298
+ var visibleLineCount = (lines, str) => str.endsWith(`
114299
+ `) ? lines.length - 1 : lines.length, createStandard = (stream, { showCursor = false } = {}) => {
114250
114300
  let previousLineCount = 0;
114251
114301
  let previousOutput = "";
114252
114302
  let hasHiddenCursor = false;
114303
+ let cursorPosition;
114304
+ let cursorDirty = false;
114305
+ let previousCursorPosition;
114306
+ let cursorWasShown = false;
114307
+ const getActiveCursor = () => cursorDirty ? cursorPosition : undefined;
114308
+ const hasChanges = (str, activeCursor) => {
114309
+ const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
114310
+ return str !== previousOutput || cursorChanged;
114311
+ };
114253
114312
  const render3 = (str) => {
114254
114313
  if (!showCursor && !hasHiddenCursor) {
114255
- cli_cursor_default.hide();
114314
+ cli_cursor_default.hide(stream);
114256
114315
  hasHiddenCursor = true;
114257
114316
  }
114258
- const output = str + `
114259
- `;
114260
- if (output === previousOutput) {
114261
- return;
114317
+ const activeCursor = getActiveCursor();
114318
+ cursorDirty = false;
114319
+ const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
114320
+ if (!hasChanges(str, activeCursor)) {
114321
+ return false;
114262
114322
  }
114263
- previousOutput = output;
114264
- stream.write(exports_base2.eraseLines(previousLineCount) + output);
114265
- previousLineCount = output.split(`
114266
- `).length;
114323
+ const lines = str.split(`
114324
+ `);
114325
+ const visibleCount = visibleLineCount(lines, str);
114326
+ const cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
114327
+ if (str === previousOutput && cursorChanged) {
114328
+ stream.write(buildCursorOnlySequence({
114329
+ cursorWasShown,
114330
+ previousLineCount,
114331
+ previousCursorPosition,
114332
+ visibleLineCount: visibleCount,
114333
+ cursorPosition: activeCursor
114334
+ }));
114335
+ } else {
114336
+ previousOutput = str;
114337
+ const returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
114338
+ stream.write(returnPrefix + exports_base2.eraseLines(previousLineCount) + str + cursorSuffix);
114339
+ previousLineCount = lines.length;
114340
+ }
114341
+ previousCursorPosition = activeCursor ? { ...activeCursor } : undefined;
114342
+ cursorWasShown = activeCursor !== undefined;
114343
+ return true;
114267
114344
  };
114268
114345
  render3.clear = () => {
114269
- stream.write(exports_base2.eraseLines(previousLineCount));
114346
+ const prefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
114347
+ stream.write(prefix + exports_base2.eraseLines(previousLineCount));
114270
114348
  previousOutput = "";
114271
114349
  previousLineCount = 0;
114350
+ previousCursorPosition = undefined;
114351
+ cursorWasShown = false;
114272
114352
  };
114273
114353
  render3.done = () => {
114274
114354
  previousOutput = "";
114275
114355
  previousLineCount = 0;
114356
+ previousCursorPosition = undefined;
114357
+ cursorWasShown = false;
114276
114358
  if (!showCursor) {
114277
- cli_cursor_default.show();
114359
+ cli_cursor_default.show(stream);
114278
114360
  hasHiddenCursor = false;
114279
114361
  }
114280
114362
  };
114281
114363
  render3.sync = (str) => {
114282
- const output = str + `
114283
- `;
114284
- previousOutput = output;
114285
- previousLineCount = output.split(`
114286
- `).length;
114364
+ const activeCursor = cursorDirty ? cursorPosition : undefined;
114365
+ cursorDirty = false;
114366
+ const lines = str.split(`
114367
+ `);
114368
+ previousOutput = str;
114369
+ previousLineCount = lines.length;
114370
+ if (!activeCursor && cursorWasShown) {
114371
+ stream.write(hideCursorEscape);
114372
+ }
114373
+ if (activeCursor) {
114374
+ stream.write(buildCursorSuffix(visibleLineCount(lines, str), activeCursor));
114375
+ }
114376
+ previousCursorPosition = activeCursor ? { ...activeCursor } : undefined;
114377
+ cursorWasShown = activeCursor !== undefined;
114287
114378
  };
114379
+ render3.setCursorPosition = (position) => {
114380
+ cursorPosition = position;
114381
+ cursorDirty = true;
114382
+ };
114383
+ render3.isCursorDirty = () => cursorDirty;
114384
+ render3.willRender = (str) => hasChanges(str, getActiveCursor());
114288
114385
  return render3;
114289
114386
  }, createIncremental = (stream, { showCursor = false } = {}) => {
114290
114387
  let previousLines = [];
114291
114388
  let previousOutput = "";
114292
114389
  let hasHiddenCursor = false;
114390
+ let cursorPosition;
114391
+ let cursorDirty = false;
114392
+ let previousCursorPosition;
114393
+ let cursorWasShown = false;
114394
+ const getActiveCursor = () => cursorDirty ? cursorPosition : undefined;
114395
+ const hasChanges = (str, activeCursor) => {
114396
+ const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
114397
+ return str !== previousOutput || cursorChanged;
114398
+ };
114293
114399
  const render3 = (str) => {
114294
114400
  if (!showCursor && !hasHiddenCursor) {
114295
- cli_cursor_default.hide();
114401
+ cli_cursor_default.hide(stream);
114296
114402
  hasHiddenCursor = true;
114297
114403
  }
114298
- const output = str + `
114299
- `;
114300
- if (output === previousOutput) {
114301
- return;
114404
+ const activeCursor = getActiveCursor();
114405
+ cursorDirty = false;
114406
+ const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
114407
+ if (!hasChanges(str, activeCursor)) {
114408
+ return false;
114302
114409
  }
114303
- const previousCount = previousLines.length;
114304
- const nextLines = output.split(`
114410
+ const nextLines = str.split(`
114305
114411
  `);
114306
- const nextCount = nextLines.length;
114307
- const visibleCount = nextCount - 1;
114308
- if (output === `
114412
+ const visibleCount = visibleLineCount(nextLines, str);
114413
+ const previousVisible = visibleLineCount(previousLines, previousOutput);
114414
+ if (str === previousOutput && cursorChanged) {
114415
+ stream.write(buildCursorOnlySequence({
114416
+ cursorWasShown,
114417
+ previousLineCount: previousLines.length,
114418
+ previousCursorPosition,
114419
+ visibleLineCount: visibleCount,
114420
+ cursorPosition: activeCursor
114421
+ }));
114422
+ previousCursorPosition = activeCursor ? { ...activeCursor } : undefined;
114423
+ cursorWasShown = activeCursor !== undefined;
114424
+ return true;
114425
+ }
114426
+ const returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
114427
+ if (str === `
114309
114428
  ` || previousOutput.length === 0) {
114310
- stream.write(exports_base2.eraseLines(previousCount) + output);
114311
- previousOutput = output;
114429
+ const cursorSuffix2 = buildCursorSuffix(visibleCount, activeCursor);
114430
+ stream.write(returnPrefix + exports_base2.eraseLines(previousLines.length) + str + cursorSuffix2);
114431
+ cursorWasShown = activeCursor !== undefined;
114432
+ previousCursorPosition = activeCursor ? { ...activeCursor } : undefined;
114433
+ previousOutput = str;
114312
114434
  previousLines = nextLines;
114313
- return;
114435
+ return true;
114314
114436
  }
114437
+ const hasTrailingNewline = str.endsWith(`
114438
+ `);
114315
114439
  const buffer = [];
114316
- if (nextCount < previousCount) {
114317
- buffer.push(exports_base2.eraseLines(previousCount - nextCount + 1), exports_base2.cursorUp(visibleCount));
114440
+ buffer.push(returnPrefix);
114441
+ if (visibleCount < previousVisible) {
114442
+ const previousHadTrailingNewline = previousOutput.endsWith(`
114443
+ `);
114444
+ const extraSlot = previousHadTrailingNewline ? 1 : 0;
114445
+ buffer.push(exports_base2.eraseLines(previousVisible - visibleCount + extraSlot), exports_base2.cursorUp(visibleCount));
114318
114446
  } else {
114319
- buffer.push(exports_base2.cursorUp(previousCount - 1));
114447
+ buffer.push(exports_base2.cursorUp(previousVisible - 1));
114320
114448
  }
114321
114449
  for (let i2 = 0;i2 < visibleCount; i2++) {
114450
+ const isLastLine = i2 === visibleCount - 1;
114322
114451
  if (nextLines[i2] === previousLines[i2]) {
114323
- buffer.push(exports_base2.cursorNextLine);
114452
+ if (!isLastLine || hasTrailingNewline) {
114453
+ buffer.push(exports_base2.cursorNextLine);
114454
+ }
114324
114455
  continue;
114325
114456
  }
114326
- buffer.push(exports_base2.cursorTo(0) + nextLines[i2] + exports_base2.eraseEndLine + `
114327
- `);
114457
+ buffer.push(exports_base2.cursorTo(0) + nextLines[i2] + exports_base2.eraseEndLine + (isLastLine && !hasTrailingNewline ? "" : `
114458
+ `));
114328
114459
  }
114460
+ const cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
114461
+ buffer.push(cursorSuffix);
114329
114462
  stream.write(buffer.join(""));
114330
- previousOutput = output;
114463
+ cursorWasShown = activeCursor !== undefined;
114464
+ previousCursorPosition = activeCursor ? { ...activeCursor } : undefined;
114465
+ previousOutput = str;
114331
114466
  previousLines = nextLines;
114467
+ return true;
114332
114468
  };
114333
114469
  render3.clear = () => {
114334
- stream.write(exports_base2.eraseLines(previousLines.length));
114470
+ const prefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
114471
+ stream.write(prefix + exports_base2.eraseLines(previousLines.length));
114335
114472
  previousOutput = "";
114336
114473
  previousLines = [];
114474
+ previousCursorPosition = undefined;
114475
+ cursorWasShown = false;
114337
114476
  };
114338
114477
  render3.done = () => {
114339
114478
  previousOutput = "";
114340
114479
  previousLines = [];
114480
+ previousCursorPosition = undefined;
114481
+ cursorWasShown = false;
114341
114482
  if (!showCursor) {
114342
- cli_cursor_default.show();
114483
+ cli_cursor_default.show(stream);
114343
114484
  hasHiddenCursor = false;
114344
114485
  }
114345
114486
  };
114346
114487
  render3.sync = (str) => {
114347
- const output = str + `
114348
- `;
114349
- previousOutput = output;
114350
- previousLines = output.split(`
114488
+ const activeCursor = cursorDirty ? cursorPosition : undefined;
114489
+ cursorDirty = false;
114490
+ const lines = str.split(`
114351
114491
  `);
114492
+ previousOutput = str;
114493
+ previousLines = lines;
114494
+ if (!activeCursor && cursorWasShown) {
114495
+ stream.write(hideCursorEscape);
114496
+ }
114497
+ if (activeCursor) {
114498
+ stream.write(buildCursorSuffix(visibleLineCount(lines, str), activeCursor));
114499
+ }
114500
+ previousCursorPosition = activeCursor ? { ...activeCursor } : undefined;
114501
+ cursorWasShown = activeCursor !== undefined;
114502
+ };
114503
+ render3.setCursorPosition = (position) => {
114504
+ cursorPosition = position;
114505
+ cursorDirty = true;
114352
114506
  };
114507
+ render3.isCursorDirty = () => cursorDirty;
114508
+ render3.willRender = (str) => hasChanges(str, getActiveCursor());
114353
114509
  return render3;
114354
- }, create = (stream, { showCursor = false, incremental = false } = {}) => {
114510
+ }, create2 = (stream, { showCursor = false, incremental = false } = {}) => {
114355
114511
  if (incremental) {
114356
114512
  return createIncremental(stream, { showCursor });
114357
114513
  }
@@ -114360,10 +114516,20 @@ var createStandard = (stream, { showCursor = false } = {}) => {
114360
114516
  var init_log_update = __esm(() => {
114361
114517
  init_ansi_escapes();
114362
114518
  init_cli_cursor();
114363
- logUpdate = { create };
114519
+ init_cursor_helpers();
114520
+ logUpdate = { create: create2 };
114364
114521
  log_update_default = logUpdate;
114365
114522
  });
114366
114523
 
114524
+ // node_modules/ink/build/write-synchronized.js
114525
+ function shouldSynchronize(stream) {
114526
+ return "isTTY" in stream && stream.isTTY === true && !is_in_ci_default;
114527
+ }
114528
+ var bsu = "\x1B[?2026h", esu = "\x1B[?2026l";
114529
+ var init_write_synchronized = __esm(() => {
114530
+ init_is_in_ci();
114531
+ });
114532
+
114367
114533
  // node_modules/ink/build/instances.js
114368
114534
  var instances, instances_default;
114369
114535
  var init_instances = __esm(() => {
@@ -114384,12 +114550,12 @@ var init_AppContext = __esm(() => {
114384
114550
 
114385
114551
  // node_modules/ink/build/components/StdinContext.js
114386
114552
  import { EventEmitter as EventEmitter2 } from "node:events";
114387
- import process22 from "node:process";
114553
+ import process23 from "node:process";
114388
114554
  var import_react3, StdinContext, StdinContext_default;
114389
114555
  var init_StdinContext = __esm(() => {
114390
114556
  import_react3 = __toESM(require_react(), 1);
114391
114557
  StdinContext = import_react3.createContext({
114392
- stdin: process22.stdin,
114558
+ stdin: process23.stdin,
114393
114559
  internal_eventEmitter: new EventEmitter2,
114394
114560
  setRawMode() {},
114395
114561
  isRawModeSupported: false,
@@ -114400,12 +114566,12 @@ var init_StdinContext = __esm(() => {
114400
114566
  });
114401
114567
 
114402
114568
  // node_modules/ink/build/components/StdoutContext.js
114403
- import process23 from "node:process";
114569
+ import process24 from "node:process";
114404
114570
  var import_react4, StdoutContext, StdoutContext_default;
114405
114571
  var init_StdoutContext = __esm(() => {
114406
114572
  import_react4 = __toESM(require_react(), 1);
114407
114573
  StdoutContext = import_react4.createContext({
114408
- stdout: process23.stdout,
114574
+ stdout: process24.stdout,
114409
114575
  write() {}
114410
114576
  });
114411
114577
  StdoutContext.displayName = "InternalStdoutContext";
@@ -114413,12 +114579,12 @@ var init_StdoutContext = __esm(() => {
114413
114579
  });
114414
114580
 
114415
114581
  // node_modules/ink/build/components/StderrContext.js
114416
- import process24 from "node:process";
114582
+ import process25 from "node:process";
114417
114583
  var import_react5, StderrContext, StderrContext_default;
114418
114584
  var init_StderrContext = __esm(() => {
114419
114585
  import_react5 = __toESM(require_react(), 1);
114420
114586
  StderrContext = import_react5.createContext({
114421
- stderr: process24.stderr,
114587
+ stderr: process25.stderr,
114422
114588
  write() {}
114423
114589
  });
114424
114590
  StderrContext.displayName = "InternalStderrContext";
@@ -114445,6 +114611,17 @@ var init_FocusContext = __esm(() => {
114445
114611
  FocusContext_default = FocusContext;
114446
114612
  });
114447
114613
 
114614
+ // node_modules/ink/build/components/CursorContext.js
114615
+ var import_react7, CursorContext, CursorContext_default;
114616
+ var init_CursorContext = __esm(() => {
114617
+ import_react7 = __toESM(require_react(), 1);
114618
+ CursorContext = import_react7.createContext({
114619
+ setCursorPosition() {}
114620
+ });
114621
+ CursorContext.displayName = "InternalCursorContext";
114622
+ CursorContext_default = CursorContext;
114623
+ });
114624
+
114448
114625
  // node_modules/stack-utils/node_modules/escape-string-regexp/index.js
114449
114626
  var require_escape_string_regexp = __commonJS((exports, module) => {
114450
114627
  var matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
@@ -114731,34 +114908,34 @@ var init_dist7 = __esm(() => {
114731
114908
  });
114732
114909
 
114733
114910
  // node_modules/ink/build/components/AccessibilityContext.js
114734
- var import_react7, accessibilityContext;
114911
+ var import_react8, accessibilityContext;
114735
114912
  var init_AccessibilityContext = __esm(() => {
114736
- import_react7 = __toESM(require_react(), 1);
114737
- accessibilityContext = import_react7.createContext({
114913
+ import_react8 = __toESM(require_react(), 1);
114914
+ accessibilityContext = import_react8.createContext({
114738
114915
  isScreenReaderEnabled: false
114739
114916
  });
114740
114917
  });
114741
114918
 
114742
114919
  // node_modules/ink/build/components/BackgroundContext.js
114743
- var import_react8, backgroundContext;
114920
+ var import_react9, backgroundContext;
114744
114921
  var init_BackgroundContext = __esm(() => {
114745
- import_react8 = __toESM(require_react(), 1);
114746
- backgroundContext = import_react8.createContext(undefined);
114922
+ import_react9 = __toESM(require_react(), 1);
114923
+ backgroundContext = import_react9.createContext(undefined);
114747
114924
  });
114748
114925
 
114749
114926
  // node_modules/ink/build/components/Box.js
114750
- var import_react9, Box, Box_default;
114927
+ var import_react10, Box, Box_default;
114751
114928
  var init_Box = __esm(() => {
114752
- import_react9 = __toESM(require_react(), 1);
114929
+ import_react10 = __toESM(require_react(), 1);
114753
114930
  init_AccessibilityContext();
114754
114931
  init_BackgroundContext();
114755
- Box = import_react9.forwardRef(({ children: children2, backgroundColor, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "aria-role": role, "aria-state": ariaState, ...style }, ref) => {
114756
- const { isScreenReaderEnabled } = import_react9.useContext(accessibilityContext);
114757
- const label = ariaLabel ? import_react9.default.createElement("ink-text", null, ariaLabel) : undefined;
114932
+ Box = import_react10.forwardRef(({ children: children2, backgroundColor, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "aria-role": role, "aria-state": ariaState, ...style }, ref) => {
114933
+ const { isScreenReaderEnabled } = import_react10.useContext(accessibilityContext);
114934
+ const label = ariaLabel ? import_react10.default.createElement("ink-text", null, ariaLabel) : undefined;
114758
114935
  if (isScreenReaderEnabled && ariaHidden) {
114759
114936
  return null;
114760
114937
  }
114761
- const boxElement = import_react9.default.createElement("ink-box", { ref, style: {
114938
+ const boxElement = import_react10.default.createElement("ink-box", { ref, style: {
114762
114939
  flexWrap: "nowrap",
114763
114940
  flexDirection: "row",
114764
114941
  flexGrow: 0,
@@ -114772,7 +114949,7 @@ var init_Box = __esm(() => {
114772
114949
  state: ariaState
114773
114950
  } }, isScreenReaderEnabled && label ? label : children2);
114774
114951
  if (backgroundColor) {
114775
- return import_react9.default.createElement(backgroundContext.Provider, { value: backgroundColor }, boxElement);
114952
+ return import_react10.default.createElement(backgroundContext.Provider, { value: backgroundColor }, boxElement);
114776
114953
  }
114777
114954
  return boxElement;
114778
114955
  });
@@ -114782,8 +114959,8 @@ var init_Box = __esm(() => {
114782
114959
 
114783
114960
  // node_modules/ink/build/components/Text.js
114784
114961
  function Text3({ color, backgroundColor, dimColor = false, bold: bold2 = false, italic: italic2 = false, underline: underline2 = false, strikethrough: strikethrough2 = false, inverse: inverse2 = false, wrap: wrap2 = "wrap", children: children2, "aria-label": ariaLabel, "aria-hidden": ariaHidden = false }) {
114785
- const { isScreenReaderEnabled } = import_react10.useContext(accessibilityContext);
114786
- const inheritedBackgroundColor = import_react10.useContext(backgroundContext);
114962
+ const { isScreenReaderEnabled } = import_react11.useContext(accessibilityContext);
114963
+ const inheritedBackgroundColor = import_react11.useContext(backgroundContext);
114787
114964
  const childrenOrAriaLabel = isScreenReaderEnabled && ariaLabel ? ariaLabel : children2;
114788
114965
  if (childrenOrAriaLabel === undefined || childrenOrAriaLabel === null) {
114789
114966
  return null;
@@ -114819,11 +114996,11 @@ function Text3({ color, backgroundColor, dimColor = false, bold: bold2 = false,
114819
114996
  if (isScreenReaderEnabled && ariaHidden) {
114820
114997
  return null;
114821
114998
  }
114822
- return import_react10.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap2 }, internal_transform: transform2 }, isScreenReaderEnabled && ariaLabel ? ariaLabel : children2);
114999
+ return import_react11.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap2 }, internal_transform: transform2 }, isScreenReaderEnabled && ariaLabel ? ariaLabel : children2);
114823
115000
  }
114824
- var import_react10;
115001
+ var import_react11;
114825
115002
  var init_Text = __esm(() => {
114826
- import_react10 = __toESM(require_react(), 1);
115003
+ import_react11 = __toESM(require_react(), 1);
114827
115004
  init_source();
114828
115005
  init_colorize();
114829
115006
  init_AccessibilityContext();
@@ -114831,7 +115008,7 @@ var init_Text = __esm(() => {
114831
115008
  });
114832
115009
 
114833
115010
  // node_modules/ink/build/components/ErrorOverview.js
114834
- import * as fs9 from "node:fs";
115011
+ import * as fs10 from "node:fs";
114835
115012
  import { cwd } from "node:process";
114836
115013
  function ErrorOverview({ error: error2 }) {
114837
115014
  const stack = error2.stack ? error2.stack.split(`
@@ -114840,8 +115017,8 @@ function ErrorOverview({ error: error2 }) {
114840
115017
  const filePath = cleanupPath(origin?.file);
114841
115018
  let excerpt;
114842
115019
  let lineWidth = 0;
114843
- if (filePath && origin?.line && fs9.existsSync(filePath)) {
114844
- const sourceCode = fs9.readFileSync(filePath, "utf8");
115020
+ if (filePath && origin?.line && fs10.existsSync(filePath)) {
115021
+ const sourceCode = fs10.readFileSync(filePath, "utf8");
114845
115022
  excerpt = dist_default3(sourceCode, origin.line);
114846
115023
  if (excerpt) {
114847
115024
  for (const { line } of excerpt) {
@@ -114849,20 +115026,20 @@ function ErrorOverview({ error: error2 }) {
114849
115026
  }
114850
115027
  }
114851
115028
  }
114852
- return import_react11.default.createElement(Box_default, { flexDirection: "column", padding: 1 }, import_react11.default.createElement(Box_default, null, import_react11.default.createElement(Text3, { backgroundColor: "red", color: "white" }, " ", "ERROR", " "), import_react11.default.createElement(Text3, null, " ", error2.message)), origin && filePath && import_react11.default.createElement(Box_default, { marginTop: 1 }, import_react11.default.createElement(Text3, { dimColor: true }, filePath, ":", origin.line, ":", origin.column)), origin && excerpt && import_react11.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, excerpt.map(({ line, value }) => import_react11.default.createElement(Box_default, { key: line }, import_react11.default.createElement(Box_default, { width: lineWidth + 1 }, import_react11.default.createElement(Text3, { dimColor: line !== origin.line, backgroundColor: line === origin.line ? "red" : undefined, color: line === origin.line ? "white" : undefined, "aria-label": line === origin.line ? `Line ${line}, error` : `Line ${line}` }, String(line).padStart(lineWidth, " "), ":")), import_react11.default.createElement(Text3, { key: line, backgroundColor: line === origin.line ? "red" : undefined, color: line === origin.line ? "white" : undefined }, " " + value)))), error2.stack && import_react11.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, error2.stack.split(`
115029
+ return import_react12.default.createElement(Box_default, { flexDirection: "column", padding: 1 }, import_react12.default.createElement(Box_default, null, import_react12.default.createElement(Text3, { backgroundColor: "red", color: "white" }, " ", "ERROR", " "), import_react12.default.createElement(Text3, null, " ", error2.message)), origin && filePath && import_react12.default.createElement(Box_default, { marginTop: 1 }, import_react12.default.createElement(Text3, { dimColor: true }, filePath, ":", origin.line, ":", origin.column)), origin && excerpt && import_react12.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, excerpt.map(({ line, value }) => import_react12.default.createElement(Box_default, { key: line }, import_react12.default.createElement(Box_default, { width: lineWidth + 1 }, import_react12.default.createElement(Text3, { dimColor: line !== origin.line, backgroundColor: line === origin.line ? "red" : undefined, color: line === origin.line ? "white" : undefined, "aria-label": line === origin.line ? `Line ${line}, error` : `Line ${line}` }, String(line).padStart(lineWidth, " "), ":")), import_react12.default.createElement(Text3, { key: line, backgroundColor: line === origin.line ? "red" : undefined, color: line === origin.line ? "white" : undefined }, " " + value)))), error2.stack && import_react12.default.createElement(Box_default, { marginTop: 1, flexDirection: "column" }, error2.stack.split(`
114853
115030
  `).slice(1).map((line) => {
114854
115031
  const parsedLine = stackUtils.parseLine(line);
114855
115032
  if (!parsedLine) {
114856
- return import_react11.default.createElement(Box_default, { key: line }, import_react11.default.createElement(Text3, { dimColor: true }, "- "), import_react11.default.createElement(Text3, { dimColor: true, bold: true }, line, "\\t", " "));
115033
+ return import_react12.default.createElement(Box_default, { key: line }, import_react12.default.createElement(Text3, { dimColor: true }, "- "), import_react12.default.createElement(Text3, { dimColor: true, bold: true }, line, "\\t", " "));
114857
115034
  }
114858
- return import_react11.default.createElement(Box_default, { key: line }, import_react11.default.createElement(Text3, { dimColor: true }, "- "), import_react11.default.createElement(Text3, { dimColor: true, bold: true }, parsedLine.function), import_react11.default.createElement(Text3, { dimColor: true, color: "gray", "aria-label": `at ${cleanupPath(parsedLine.file) ?? ""} line ${parsedLine.line} column ${parsedLine.column}` }, " ", "(", cleanupPath(parsedLine.file) ?? "", ":", parsedLine.line, ":", parsedLine.column, ")"));
115035
+ return import_react12.default.createElement(Box_default, { key: line }, import_react12.default.createElement(Text3, { dimColor: true }, "- "), import_react12.default.createElement(Text3, { dimColor: true, bold: true }, parsedLine.function), import_react12.default.createElement(Text3, { dimColor: true, color: "gray", "aria-label": `at ${cleanupPath(parsedLine.file) ?? ""} line ${parsedLine.line} column ${parsedLine.column}` }, " ", "(", cleanupPath(parsedLine.file) ?? "", ":", parsedLine.line, ":", parsedLine.column, ")"));
114859
115036
  })));
114860
115037
  }
114861
- var import_react11, import_stack_utils, cleanupPath = (path10) => {
115038
+ var import_react12, import_stack_utils, cleanupPath = (path10) => {
114862
115039
  return path10?.replace(`file://${cwd()}/`, "");
114863
115040
  }, stackUtils;
114864
115041
  var init_ErrorOverview = __esm(() => {
114865
- import_react11 = __toESM(require_react(), 1);
115042
+ import_react12 = __toESM(require_react(), 1);
114866
115043
  import_stack_utils = __toESM(require_stack_utils(), 1);
114867
115044
  init_dist7();
114868
115045
  init_Box();
@@ -114873,307 +115050,424 @@ var init_ErrorOverview = __esm(() => {
114873
115050
  });
114874
115051
  });
114875
115052
 
114876
- // node_modules/ink/build/components/App.js
114877
- import { EventEmitter as EventEmitter3 } from "node:events";
114878
- import process25 from "node:process";
114879
- var import_react12, tab = "\t", shiftTab = "\x1B[Z", escape3 = "\x1B", App;
114880
- var init_App = __esm(() => {
114881
- import_react12 = __toESM(require_react(), 1);
114882
- init_cli_cursor();
114883
- init_AppContext();
114884
- init_StdinContext();
114885
- init_StdoutContext();
114886
- init_StderrContext();
114887
- init_FocusContext();
115053
+ // node_modules/ink/build/components/ErrorBoundary.js
115054
+ var import_react13, ErrorBoundary;
115055
+ var init_ErrorBoundary = __esm(() => {
115056
+ import_react13 = __toESM(require_react(), 1);
114888
115057
  init_ErrorOverview();
114889
- App = class App extends import_react12.PureComponent {
114890
- static displayName = "InternalApp";
115058
+ ErrorBoundary = class ErrorBoundary extends import_react13.PureComponent {
115059
+ static displayName = "InternalErrorBoundary";
114891
115060
  static getDerivedStateFromError(error2) {
114892
115061
  return { error: error2 };
114893
115062
  }
114894
115063
  state = {
114895
- isFocusEnabled: true,
114896
- activeFocusId: undefined,
114897
- focusables: [],
114898
115064
  error: undefined
114899
115065
  };
114900
- rawModeEnabledCount = 0;
114901
- internal_eventEmitter = new EventEmitter3;
114902
- isRawModeSupported() {
114903
- return this.props.stdin.isTTY;
115066
+ componentDidCatch(error2) {
115067
+ this.props.onError(error2);
114904
115068
  }
114905
115069
  render() {
114906
- return import_react12.default.createElement(AppContext_default.Provider, {
114907
- value: {
114908
- exit: this.handleExit
114909
- }
114910
- }, import_react12.default.createElement(StdinContext_default.Provider, {
114911
- value: {
114912
- stdin: this.props.stdin,
114913
- setRawMode: this.handleSetRawMode,
114914
- isRawModeSupported: this.isRawModeSupported(),
114915
- internal_exitOnCtrlC: this.props.exitOnCtrlC,
114916
- internal_eventEmitter: this.internal_eventEmitter
114917
- }
114918
- }, import_react12.default.createElement(StdoutContext_default.Provider, {
114919
- value: {
114920
- stdout: this.props.stdout,
114921
- write: this.props.writeToStdout
114922
- }
114923
- }, import_react12.default.createElement(StderrContext_default.Provider, {
114924
- value: {
114925
- stderr: this.props.stderr,
114926
- write: this.props.writeToStderr
114927
- }
114928
- }, import_react12.default.createElement(FocusContext_default.Provider, {
114929
- value: {
114930
- activeId: this.state.activeFocusId,
114931
- add: this.addFocusable,
114932
- remove: this.removeFocusable,
114933
- activate: this.activateFocusable,
114934
- deactivate: this.deactivateFocusable,
114935
- enableFocus: this.enableFocus,
114936
- disableFocus: this.disableFocus,
114937
- focusNext: this.focusNext,
114938
- focusPrevious: this.focusPrevious,
114939
- focus: this.focus
114940
- }
114941
- }, this.state.error ? import_react12.default.createElement(ErrorOverview, { error: this.state.error }) : this.props.children)))));
114942
- }
114943
- componentDidMount() {
114944
- cli_cursor_default.hide(this.props.stdout);
114945
- }
114946
- componentWillUnmount() {
114947
- cli_cursor_default.show(this.props.stdout);
114948
- if (this.isRawModeSupported()) {
114949
- this.handleSetRawMode(false);
115070
+ if (this.state.error) {
115071
+ return import_react13.default.createElement(ErrorOverview, { error: this.state.error });
114950
115072
  }
115073
+ return this.props.children;
114951
115074
  }
114952
- componentDidCatch(error2) {
114953
- this.handleExit(error2);
115075
+ };
115076
+ });
115077
+
115078
+ // node_modules/ink/build/components/App.js
115079
+ import { EventEmitter as EventEmitter3 } from "node:events";
115080
+ import process26 from "node:process";
115081
+ function App({ children: children2, stdin, stdout, stderr, writeToStdout, writeToStderr, exitOnCtrlC, onExit: onExit2, setCursorPosition }) {
115082
+ const [isFocusEnabled, setIsFocusEnabled] = import_react14.useState(true);
115083
+ const [activeFocusId, setActiveFocusId] = import_react14.useState(undefined);
115084
+ const [, setFocusables] = import_react14.useState([]);
115085
+ const focusablesCountRef = import_react14.useRef(0);
115086
+ const rawModeEnabledCount = import_react14.useRef(0);
115087
+ const internal_eventEmitter = import_react14.useRef(new EventEmitter3);
115088
+ internal_eventEmitter.current.setMaxListeners(Infinity);
115089
+ const readableListenerRef = import_react14.useRef(undefined);
115090
+ const isRawModeSupported = stdin.isTTY;
115091
+ const handleExit = import_react14.useCallback((error2) => {
115092
+ if (isRawModeSupported && rawModeEnabledCount.current > 0) {
115093
+ stdin.setRawMode(false);
115094
+ if (readableListenerRef.current) {
115095
+ stdin.removeListener("readable", readableListenerRef.current);
115096
+ readableListenerRef.current = undefined;
115097
+ }
115098
+ stdin.unref();
115099
+ rawModeEnabledCount.current = 0;
115100
+ }
115101
+ onExit2(error2);
115102
+ }, [isRawModeSupported, stdin, onExit2]);
115103
+ const handleInput = import_react14.useCallback((input) => {
115104
+ if (input === "\x03" && exitOnCtrlC) {
115105
+ handleExit();
115106
+ return;
115107
+ }
115108
+ if (input === escape3) {
115109
+ setActiveFocusId((currentActiveFocusId) => {
115110
+ if (currentActiveFocusId) {
115111
+ return;
115112
+ }
115113
+ return currentActiveFocusId;
115114
+ });
114954
115115
  }
114955
- handleSetRawMode = (isEnabled) => {
114956
- const { stdin } = this.props;
114957
- if (!this.isRawModeSupported()) {
114958
- if (stdin === process25.stdin) {
114959
- throw new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
115116
+ }, [exitOnCtrlC, handleExit]);
115117
+ const handleReadable = import_react14.useCallback(() => {
115118
+ let chunk;
115119
+ while ((chunk = stdin.read()) !== null) {
115120
+ handleInput(chunk);
115121
+ internal_eventEmitter.current.emit("input", chunk);
115122
+ }
115123
+ }, [stdin, handleInput]);
115124
+ const handleSetRawMode = import_react14.useCallback((isEnabled) => {
115125
+ if (!isRawModeSupported) {
115126
+ if (stdin === process26.stdin) {
115127
+ throw new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
114960
115128
  Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);
114961
- } else {
114962
- throw new Error(`Raw mode is not supported on the stdin provided to Ink.
115129
+ } else {
115130
+ throw new Error(`Raw mode is not supported on the stdin provided to Ink.
114963
115131
  Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);
114964
- }
114965
- }
114966
- stdin.setEncoding("utf8");
114967
- if (isEnabled) {
114968
- if (this.rawModeEnabledCount === 0) {
114969
- stdin.ref();
114970
- stdin.setRawMode(true);
114971
- stdin.addListener("readable", this.handleReadable);
114972
- }
114973
- this.rawModeEnabledCount++;
114974
- return;
114975
115132
  }
114976
- if (--this.rawModeEnabledCount === 0) {
114977
- stdin.setRawMode(false);
114978
- stdin.removeListener("readable", this.handleReadable);
114979
- stdin.unref();
115133
+ }
115134
+ stdin.setEncoding("utf8");
115135
+ if (isEnabled) {
115136
+ if (rawModeEnabledCount.current === 0) {
115137
+ stdin.ref();
115138
+ stdin.setRawMode(true);
115139
+ readableListenerRef.current = handleReadable;
115140
+ stdin.addListener("readable", handleReadable);
114980
115141
  }
114981
- };
114982
- handleReadable = () => {
114983
- let chunk;
114984
- while ((chunk = this.props.stdin.read()) !== null) {
114985
- this.handleInput(chunk);
114986
- this.internal_eventEmitter.emit("input", chunk);
115142
+ rawModeEnabledCount.current++;
115143
+ return;
115144
+ }
115145
+ if (--rawModeEnabledCount.current === 0) {
115146
+ stdin.setRawMode(false);
115147
+ if (readableListenerRef.current) {
115148
+ stdin.removeListener("readable", readableListenerRef.current);
115149
+ readableListenerRef.current = undefined;
114987
115150
  }
114988
- };
114989
- handleInput = (input) => {
114990
- if (input === "\x03" && this.props.exitOnCtrlC) {
114991
- this.handleExit();
115151
+ stdin.unref();
115152
+ }
115153
+ }, [isRawModeSupported, stdin, handleReadable]);
115154
+ const findNextFocusable = import_react14.useCallback((currentFocusables, currentActiveFocusId) => {
115155
+ const activeIndex = currentFocusables.findIndex((focusable) => {
115156
+ return focusable.id === currentActiveFocusId;
115157
+ });
115158
+ for (let index2 = activeIndex + 1;index2 < currentFocusables.length; index2++) {
115159
+ const focusable = currentFocusables[index2];
115160
+ if (focusable?.isActive) {
115161
+ return focusable.id;
114992
115162
  }
114993
- if (input === escape3 && this.state.activeFocusId) {
114994
- this.setState({
114995
- activeFocusId: undefined
114996
- });
115163
+ }
115164
+ return;
115165
+ }, []);
115166
+ const findPreviousFocusable = import_react14.useCallback((currentFocusables, currentActiveFocusId) => {
115167
+ const activeIndex = currentFocusables.findIndex((focusable) => {
115168
+ return focusable.id === currentActiveFocusId;
115169
+ });
115170
+ for (let index2 = activeIndex - 1;index2 >= 0; index2--) {
115171
+ const focusable = currentFocusables[index2];
115172
+ if (focusable?.isActive) {
115173
+ return focusable.id;
114997
115174
  }
114998
- if (this.state.isFocusEnabled && this.state.focusables.length > 0) {
114999
- if (input === tab) {
115000
- this.focusNext();
115001
- }
115002
- if (input === shiftTab) {
115003
- this.focusPrevious();
115004
- }
115175
+ }
115176
+ return;
115177
+ }, []);
115178
+ const focusNext = import_react14.useCallback(() => {
115179
+ setFocusables((currentFocusables) => {
115180
+ setActiveFocusId((currentActiveFocusId) => {
115181
+ const firstFocusableId = currentFocusables.find((focusable) => focusable.isActive)?.id;
115182
+ const nextFocusableId = findNextFocusable(currentFocusables, currentActiveFocusId);
115183
+ return nextFocusableId ?? firstFocusableId;
115184
+ });
115185
+ return currentFocusables;
115186
+ });
115187
+ }, [findNextFocusable]);
115188
+ const focusPrevious = import_react14.useCallback(() => {
115189
+ setFocusables((currentFocusables) => {
115190
+ setActiveFocusId((currentActiveFocusId) => {
115191
+ const lastFocusableId = currentFocusables.findLast((focusable) => focusable.isActive)?.id;
115192
+ const previousFocusableId = findPreviousFocusable(currentFocusables, currentActiveFocusId);
115193
+ return previousFocusableId ?? lastFocusableId;
115194
+ });
115195
+ return currentFocusables;
115196
+ });
115197
+ }, [findPreviousFocusable]);
115198
+ import_react14.useEffect(() => {
115199
+ const handleTabNavigation = (input) => {
115200
+ if (!isFocusEnabled || focusablesCountRef.current === 0)
115201
+ return;
115202
+ if (input === tab) {
115203
+ focusNext();
115005
115204
  }
115006
- };
115007
- handleExit = (error2) => {
115008
- if (this.isRawModeSupported()) {
115009
- this.handleSetRawMode(false);
115205
+ if (input === shiftTab) {
115206
+ focusPrevious();
115010
115207
  }
115011
- this.props.onExit(error2);
115012
115208
  };
115013
- enableFocus = () => {
115014
- this.setState({
115015
- isFocusEnabled: true
115016
- });
115017
- };
115018
- disableFocus = () => {
115019
- this.setState({
115020
- isFocusEnabled: false
115021
- });
115209
+ internal_eventEmitter.current.on("input", handleTabNavigation);
115210
+ const emitter = internal_eventEmitter.current;
115211
+ return () => {
115212
+ emitter.off("input", handleTabNavigation);
115022
115213
  };
115023
- focus = (id) => {
115024
- this.setState((previousState) => {
115025
- const hasFocusableId = previousState.focusables.some((focusable) => focusable?.id === id);
115026
- if (!hasFocusableId) {
115027
- return previousState;
115214
+ }, [isFocusEnabled, focusNext, focusPrevious]);
115215
+ const enableFocus = import_react14.useCallback(() => {
115216
+ setIsFocusEnabled(true);
115217
+ }, []);
115218
+ const disableFocus = import_react14.useCallback(() => {
115219
+ setIsFocusEnabled(false);
115220
+ }, []);
115221
+ const focus = import_react14.useCallback((id) => {
115222
+ setFocusables((currentFocusables) => {
115223
+ const hasFocusableId = currentFocusables.some((focusable) => focusable?.id === id);
115224
+ if (hasFocusableId) {
115225
+ setActiveFocusId(id);
115226
+ }
115227
+ return currentFocusables;
115228
+ });
115229
+ }, []);
115230
+ const addFocusable = import_react14.useCallback((id, { autoFocus }) => {
115231
+ setFocusables((currentFocusables) => {
115232
+ focusablesCountRef.current = currentFocusables.length + 1;
115233
+ return [
115234
+ ...currentFocusables,
115235
+ {
115236
+ id,
115237
+ isActive: true
115028
115238
  }
115029
- return { activeFocusId: id };
115030
- });
115031
- };
115032
- focusNext = () => {
115033
- this.setState((previousState) => {
115034
- const firstFocusableId = previousState.focusables.find((focusable) => focusable.isActive)?.id;
115035
- const nextFocusableId = this.findNextFocusable(previousState);
115036
- return {
115037
- activeFocusId: nextFocusableId ?? firstFocusableId
115038
- };
115039
- });
115040
- };
115041
- focusPrevious = () => {
115042
- this.setState((previousState) => {
115043
- const lastFocusableId = previousState.focusables.findLast((focusable) => focusable.isActive)?.id;
115044
- const previousFocusableId = this.findPreviousFocusable(previousState);
115045
- return {
115046
- activeFocusId: previousFocusableId ?? lastFocusableId
115047
- };
115048
- });
115049
- };
115050
- addFocusable = (id, { autoFocus }) => {
115051
- this.setState((previousState) => {
115052
- let nextFocusId = previousState.activeFocusId;
115053
- if (!nextFocusId && autoFocus) {
115054
- nextFocusId = id;
115239
+ ];
115240
+ });
115241
+ if (autoFocus) {
115242
+ setActiveFocusId((currentActiveFocusId) => {
115243
+ if (!currentActiveFocusId) {
115244
+ return id;
115055
115245
  }
115056
- return {
115057
- activeFocusId: nextFocusId,
115058
- focusables: [
115059
- ...previousState.focusables,
115060
- {
115061
- id,
115062
- isActive: true
115063
- }
115064
- ]
115065
- };
115246
+ return currentActiveFocusId;
115066
115247
  });
115067
- };
115068
- removeFocusable = (id) => {
115069
- this.setState((previousState) => ({
115070
- activeFocusId: previousState.activeFocusId === id ? undefined : previousState.activeFocusId,
115071
- focusables: previousState.focusables.filter((focusable) => {
115072
- return focusable.id !== id;
115073
- })
115074
- }));
115075
- };
115076
- activateFocusable = (id) => {
115077
- this.setState((previousState) => ({
115078
- focusables: previousState.focusables.map((focusable) => {
115079
- if (focusable.id !== id) {
115080
- return focusable;
115081
- }
115082
- return {
115083
- id,
115084
- isActive: true
115085
- };
115086
- })
115087
- }));
115088
- };
115089
- deactivateFocusable = (id) => {
115090
- this.setState((previousState) => ({
115091
- activeFocusId: previousState.activeFocusId === id ? undefined : previousState.activeFocusId,
115092
- focusables: previousState.focusables.map((focusable) => {
115093
- if (focusable.id !== id) {
115094
- return focusable;
115095
- }
115096
- return {
115097
- id,
115098
- isActive: false
115099
- };
115100
- })
115101
- }));
115102
- };
115103
- findNextFocusable = (state) => {
115104
- const activeIndex = state.focusables.findIndex((focusable) => {
115105
- return focusable.id === state.activeFocusId;
115106
- });
115107
- for (let index2 = activeIndex + 1;index2 < state.focusables.length; index2++) {
115108
- const focusable = state.focusables[index2];
115109
- if (focusable?.isActive) {
115110
- return focusable.id;
115111
- }
115248
+ }
115249
+ }, []);
115250
+ const removeFocusable = import_react14.useCallback((id) => {
115251
+ setActiveFocusId((currentActiveFocusId) => {
115252
+ if (currentActiveFocusId === id) {
115253
+ return;
115112
115254
  }
115113
- return;
115114
- };
115115
- findPreviousFocusable = (state) => {
115116
- const activeIndex = state.focusables.findIndex((focusable) => {
115117
- return focusable.id === state.activeFocusId;
115255
+ return currentActiveFocusId;
115256
+ });
115257
+ setFocusables((currentFocusables) => {
115258
+ const filtered = currentFocusables.filter((focusable) => {
115259
+ return focusable.id !== id;
115118
115260
  });
115119
- for (let index2 = activeIndex - 1;index2 >= 0; index2--) {
115120
- const focusable = state.focusables[index2];
115121
- if (focusable?.isActive) {
115122
- return focusable.id;
115261
+ focusablesCountRef.current = filtered.length;
115262
+ return filtered;
115263
+ });
115264
+ }, []);
115265
+ const activateFocusable = import_react14.useCallback((id) => {
115266
+ setFocusables((currentFocusables) => currentFocusables.map((focusable) => {
115267
+ if (focusable.id !== id) {
115268
+ return focusable;
115269
+ }
115270
+ return {
115271
+ id,
115272
+ isActive: true
115273
+ };
115274
+ }));
115275
+ }, []);
115276
+ const deactivateFocusable = import_react14.useCallback((id) => {
115277
+ setActiveFocusId((currentActiveFocusId) => {
115278
+ if (currentActiveFocusId === id) {
115279
+ return;
115280
+ }
115281
+ return currentActiveFocusId;
115282
+ });
115283
+ setFocusables((currentFocusables) => currentFocusables.map((focusable) => {
115284
+ if (focusable.id !== id) {
115285
+ return focusable;
115286
+ }
115287
+ return {
115288
+ id,
115289
+ isActive: false
115290
+ };
115291
+ }));
115292
+ }, []);
115293
+ import_react14.useEffect(() => {
115294
+ return () => {
115295
+ cli_cursor_default.show(stdout);
115296
+ if (isRawModeSupported && rawModeEnabledCount.current > 0) {
115297
+ stdin.setRawMode(false);
115298
+ if (readableListenerRef.current) {
115299
+ stdin.removeListener("readable", readableListenerRef.current);
115300
+ readableListenerRef.current = undefined;
115123
115301
  }
115302
+ stdin.unref();
115124
115303
  }
115125
- return;
115126
115304
  };
115305
+ }, [stdout, stdin, isRawModeSupported]);
115306
+ const appContextValue = import_react14.useMemo(() => ({
115307
+ exit: handleExit
115308
+ }), [handleExit]);
115309
+ const stdinContextValue = import_react14.useMemo(() => ({
115310
+ stdin,
115311
+ setRawMode: handleSetRawMode,
115312
+ isRawModeSupported,
115313
+ internal_exitOnCtrlC: exitOnCtrlC,
115314
+ internal_eventEmitter: internal_eventEmitter.current
115315
+ }), [stdin, handleSetRawMode, isRawModeSupported, exitOnCtrlC]);
115316
+ const stdoutContextValue = import_react14.useMemo(() => ({
115317
+ stdout,
115318
+ write: writeToStdout
115319
+ }), [stdout, writeToStdout]);
115320
+ const stderrContextValue = import_react14.useMemo(() => ({
115321
+ stderr,
115322
+ write: writeToStderr
115323
+ }), [stderr, writeToStderr]);
115324
+ const cursorContextValue = import_react14.useMemo(() => ({
115325
+ setCursorPosition
115326
+ }), [setCursorPosition]);
115327
+ const focusContextValue = import_react14.useMemo(() => ({
115328
+ activeId: activeFocusId,
115329
+ add: addFocusable,
115330
+ remove: removeFocusable,
115331
+ activate: activateFocusable,
115332
+ deactivate: deactivateFocusable,
115333
+ enableFocus,
115334
+ disableFocus,
115335
+ focusNext,
115336
+ focusPrevious,
115337
+ focus
115338
+ }), [
115339
+ activeFocusId,
115340
+ addFocusable,
115341
+ removeFocusable,
115342
+ activateFocusable,
115343
+ deactivateFocusable,
115344
+ enableFocus,
115345
+ disableFocus,
115346
+ focusNext,
115347
+ focusPrevious,
115348
+ focus
115349
+ ]);
115350
+ return import_react14.default.createElement(AppContext_default.Provider, { value: appContextValue }, import_react14.default.createElement(StdinContext_default.Provider, { value: stdinContextValue }, import_react14.default.createElement(StdoutContext_default.Provider, { value: stdoutContextValue }, import_react14.default.createElement(StderrContext_default.Provider, { value: stderrContextValue }, import_react14.default.createElement(FocusContext_default.Provider, { value: focusContextValue }, import_react14.default.createElement(CursorContext_default.Provider, { value: cursorContextValue }, import_react14.default.createElement(ErrorBoundary, { onError: handleExit }, children2)))))));
115351
+ }
115352
+ var import_react14, tab = "\t", shiftTab = "\x1B[Z", escape3 = "\x1B", App_default;
115353
+ var init_App = __esm(() => {
115354
+ import_react14 = __toESM(require_react(), 1);
115355
+ init_cli_cursor();
115356
+ init_AppContext();
115357
+ init_StdinContext();
115358
+ init_StdoutContext();
115359
+ init_StderrContext();
115360
+ init_FocusContext();
115361
+ init_CursorContext();
115362
+ init_ErrorBoundary();
115363
+ App.displayName = "InternalApp";
115364
+ App_default = App;
115365
+ });
115366
+
115367
+ // node_modules/ink/build/kitty-keyboard.js
115368
+ function resolveFlags(flags) {
115369
+ let result = 0;
115370
+ for (const flag of flags) {
115371
+ result |= kittyFlags[flag];
115372
+ }
115373
+ return result;
115374
+ }
115375
+ var kittyFlags, kittyModifiers;
115376
+ var init_kitty_keyboard = __esm(() => {
115377
+ kittyFlags = {
115378
+ disambiguateEscapeCodes: 1,
115379
+ reportEventTypes: 2,
115380
+ reportAlternateKeys: 4,
115381
+ reportAllKeysAsEscapeCodes: 8,
115382
+ reportAssociatedText: 16
115383
+ };
115384
+ kittyModifiers = {
115385
+ shift: 1,
115386
+ alt: 2,
115387
+ ctrl: 4,
115388
+ super: 8,
115389
+ hyper: 16,
115390
+ meta: 32,
115391
+ capsLock: 64,
115392
+ numLock: 128
115127
115393
  };
115128
115394
  });
115129
115395
 
115130
115396
  // node_modules/ink/build/ink.js
115131
- import process26 from "node:process";
115397
+ import process27 from "node:process";
115132
115398
 
115133
115399
  class Ink {
115400
+ isConcurrent;
115134
115401
  options;
115135
115402
  log;
115403
+ cursorPosition;
115136
115404
  throttledLog;
115137
115405
  isScreenReaderEnabled;
115138
115406
  isUnmounted;
115139
115407
  lastOutput;
115408
+ lastOutputToRender;
115140
115409
  lastOutputHeight;
115141
115410
  lastTerminalWidth;
115142
115411
  container;
115143
115412
  rootNode;
115144
115413
  fullStaticOutput;
115145
115414
  exitPromise;
115415
+ beforeExitHandler;
115146
115416
  restoreConsole;
115147
115417
  unsubscribeResize;
115418
+ throttledOnRender;
115419
+ kittyProtocolEnabled = false;
115420
+ cancelKittyDetection;
115148
115421
  constructor(options) {
115149
115422
  autoBind(this);
115150
115423
  this.options = options;
115151
115424
  this.rootNode = createNode("ink-root");
115152
115425
  this.rootNode.onComputeLayout = this.calculateLayout;
115153
- this.isScreenReaderEnabled = options.isScreenReaderEnabled ?? process26.env["INK_SCREEN_READER"] === "true";
115426
+ this.isScreenReaderEnabled = options.isScreenReaderEnabled ?? process27.env["INK_SCREEN_READER"] === "true";
115154
115427
  const unthrottled = options.debug || this.isScreenReaderEnabled;
115155
115428
  const maxFps = options.maxFps ?? 30;
115156
115429
  const renderThrottleMs = maxFps > 0 ? Math.max(1, Math.ceil(1000 / maxFps)) : 0;
115157
- this.rootNode.onRender = unthrottled ? this.onRender : throttle(this.onRender, renderThrottleMs, {
115158
- leading: true,
115159
- trailing: true
115160
- });
115430
+ if (unthrottled) {
115431
+ this.rootNode.onRender = this.onRender;
115432
+ this.throttledOnRender = undefined;
115433
+ } else {
115434
+ const throttled = throttle(this.onRender, renderThrottleMs, {
115435
+ leading: true,
115436
+ trailing: true
115437
+ });
115438
+ this.rootNode.onRender = throttled;
115439
+ this.throttledOnRender = throttled;
115440
+ }
115161
115441
  this.rootNode.onImmediateRender = this.onRender;
115162
115442
  this.log = log_update_default.create(options.stdout, {
115163
115443
  incremental: options.incrementalRendering
115164
115444
  });
115165
- this.throttledLog = unthrottled ? this.log : throttle(this.log, undefined, {
115445
+ this.cursorPosition = undefined;
115446
+ this.throttledLog = unthrottled ? this.log : throttle((output) => {
115447
+ const shouldWrite = this.log.willRender(output);
115448
+ const sync = shouldSynchronize(this.options.stdout);
115449
+ if (sync && shouldWrite) {
115450
+ this.options.stdout.write(bsu);
115451
+ }
115452
+ this.log(output);
115453
+ if (sync && shouldWrite) {
115454
+ this.options.stdout.write(esu);
115455
+ }
115456
+ }, undefined, {
115166
115457
  leading: true,
115167
115458
  trailing: true
115168
115459
  });
115169
115460
  this.isUnmounted = false;
115461
+ this.isConcurrent = options.concurrent ?? false;
115170
115462
  this.lastOutput = "";
115463
+ this.lastOutputToRender = "";
115171
115464
  this.lastOutputHeight = 0;
115172
115465
  this.lastTerminalWidth = this.getTerminalWidth();
115173
115466
  this.fullStaticOutput = "";
115174
- this.container = reconciler_default.createContainer(this.rootNode, import_constants2.LegacyRoot, null, false, null, "id", () => {}, () => {}, () => {}, () => {}, null);
115467
+ const rootTag = options.concurrent ? import_constants2.ConcurrentRoot : import_constants2.LegacyRoot;
115468
+ this.container = reconciler_default.createContainer(this.rootNode, rootTag, null, false, null, "id", () => {}, () => {}, () => {}, () => {});
115175
115469
  this.unsubscribeExit = import_signal_exit3.default(this.unmount, { alwaysLast: false });
115176
- if (process26.env["DEV"] === "true") {
115470
+ if (process27.env["DEV"] === "true") {
115177
115471
  reconciler_default.injectIntoDevTools({
115178
115472
  bundleType: 0,
115179
115473
  version: "16.13.1",
@@ -115189,15 +115483,21 @@ class Ink {
115189
115483
  options.stdout.off("resize", this.resized);
115190
115484
  };
115191
115485
  }
115486
+ this.initKittyKeyboard();
115192
115487
  }
115193
115488
  getTerminalWidth = () => {
115194
- return this.options.stdout.columns || 80;
115489
+ if (this.options.stdout.columns) {
115490
+ return this.options.stdout.columns;
115491
+ }
115492
+ const size = terminalSize();
115493
+ return size?.columns ?? 80;
115195
115494
  };
115196
115495
  resized = () => {
115197
115496
  const currentWidth = this.getTerminalWidth();
115198
115497
  if (currentWidth < this.lastTerminalWidth) {
115199
115498
  this.log.clear();
115200
115499
  this.lastOutput = "";
115500
+ this.lastOutputToRender = "";
115201
115501
  }
115202
115502
  this.calculateLayout();
115203
115503
  this.onRender();
@@ -115206,6 +115506,15 @@ class Ink {
115206
115506
  resolveExitPromise = () => {};
115207
115507
  rejectExitPromise = () => {};
115208
115508
  unsubscribeExit = () => {};
115509
+ setCursorPosition = (position) => {
115510
+ this.cursorPosition = position;
115511
+ this.log.setCursorPosition(position);
115512
+ };
115513
+ restoreLastOutput = () => {
115514
+ this.log.setCursorPosition(this.cursorPosition);
115515
+ this.log(this.lastOutputToRender || this.lastOutput + `
115516
+ `);
115517
+ };
115209
115518
  calculateLayout = () => {
115210
115519
  const terminalWidth = this.getTerminalWidth();
115211
115520
  this.rootNode.yogaNode.setWidth(terminalWidth);
@@ -115232,19 +115541,28 @@ class Ink {
115232
115541
  this.options.stdout.write(staticOutput);
115233
115542
  }
115234
115543
  this.lastOutput = output;
115544
+ this.lastOutputToRender = output + `
115545
+ `;
115235
115546
  this.lastOutputHeight = outputHeight;
115236
115547
  return;
115237
115548
  }
115238
115549
  if (this.isScreenReaderEnabled) {
115550
+ const sync = shouldSynchronize(this.options.stdout);
115551
+ if (sync) {
115552
+ this.options.stdout.write(bsu);
115553
+ }
115239
115554
  if (hasStaticOutput) {
115240
115555
  const erase = this.lastOutputHeight > 0 ? exports_base2.eraseLines(this.lastOutputHeight) : "";
115241
115556
  this.options.stdout.write(erase + staticOutput);
115242
115557
  this.lastOutputHeight = 0;
115243
115558
  }
115244
115559
  if (output === this.lastOutput && !hasStaticOutput) {
115560
+ if (sync) {
115561
+ this.options.stdout.write(esu);
115562
+ }
115245
115563
  return;
115246
115564
  }
115247
- const terminalWidth = this.options.stdout.columns || 80;
115565
+ const terminalWidth = this.getTerminalWidth();
115248
115566
  const wrappedOutput = wrapAnsi(output, terminalWidth, {
115249
115567
  trim: false,
115250
115568
  hard: true
@@ -115256,35 +115574,61 @@ class Ink {
115256
115574
  this.options.stdout.write(erase + wrappedOutput);
115257
115575
  }
115258
115576
  this.lastOutput = output;
115577
+ this.lastOutputToRender = wrappedOutput;
115259
115578
  this.lastOutputHeight = wrappedOutput === "" ? 0 : wrappedOutput.split(`
115260
115579
  `).length;
115580
+ if (sync) {
115581
+ this.options.stdout.write(esu);
115582
+ }
115261
115583
  return;
115262
115584
  }
115263
115585
  if (hasStaticOutput) {
115264
115586
  this.fullStaticOutput += staticOutput;
115265
115587
  }
115588
+ const isFullscreen = this.options.stdout.isTTY && outputHeight >= this.options.stdout.rows;
115589
+ const outputToRender = isFullscreen ? output : output + `
115590
+ `;
115266
115591
  if (this.lastOutputHeight >= this.options.stdout.rows) {
115592
+ const sync = shouldSynchronize(this.options.stdout);
115593
+ if (sync) {
115594
+ this.options.stdout.write(bsu);
115595
+ }
115267
115596
  this.options.stdout.write(exports_base2.clearTerminal + this.fullStaticOutput + output);
115268
115597
  this.lastOutput = output;
115598
+ this.lastOutputToRender = outputToRender;
115269
115599
  this.lastOutputHeight = outputHeight;
115270
- this.log.sync(output);
115600
+ this.log.sync(outputToRender);
115601
+ if (sync) {
115602
+ this.options.stdout.write(esu);
115603
+ }
115271
115604
  return;
115272
115605
  }
115273
115606
  if (hasStaticOutput) {
115607
+ const sync = shouldSynchronize(this.options.stdout);
115608
+ if (sync) {
115609
+ this.options.stdout.write(bsu);
115610
+ }
115274
115611
  this.log.clear();
115275
115612
  this.options.stdout.write(staticOutput);
115276
- this.log(output);
115277
- }
115278
- if (!hasStaticOutput && output !== this.lastOutput) {
115279
- this.throttledLog(output);
115613
+ this.log(outputToRender);
115614
+ if (sync) {
115615
+ this.options.stdout.write(esu);
115616
+ }
115617
+ } else if (output !== this.lastOutput || this.log.isCursorDirty()) {
115618
+ this.throttledLog(outputToRender);
115280
115619
  }
115281
115620
  this.lastOutput = output;
115621
+ this.lastOutputToRender = outputToRender;
115282
115622
  this.lastOutputHeight = outputHeight;
115283
115623
  };
115284
115624
  render(node2) {
115285
- const tree = import_react13.default.createElement(accessibilityContext.Provider, { value: { isScreenReaderEnabled: this.isScreenReaderEnabled } }, import_react13.default.createElement(App, { stdin: this.options.stdin, stdout: this.options.stdout, stderr: this.options.stderr, writeToStdout: this.writeToStdout, writeToStderr: this.writeToStderr, exitOnCtrlC: this.options.exitOnCtrlC, onExit: this.unmount }, node2));
115286
- reconciler_default.updateContainerSync(tree, this.container, null, noop4);
115287
- reconciler_default.flushSyncWork();
115625
+ const tree = import_react15.default.createElement(accessibilityContext.Provider, { value: { isScreenReaderEnabled: this.isScreenReaderEnabled } }, import_react15.default.createElement(App_default, { stdin: this.options.stdin, stdout: this.options.stdout, stderr: this.options.stderr, exitOnCtrlC: this.options.exitOnCtrlC, writeToStdout: this.writeToStdout, writeToStderr: this.writeToStderr, setCursorPosition: this.setCursorPosition, onExit: this.unmount }, node2));
115626
+ if (this.options.concurrent) {
115627
+ reconciler_default.updateContainer(tree, this.container, null, noop4);
115628
+ } else {
115629
+ reconciler_default.updateContainerSync(tree, this.container, null, noop4);
115630
+ reconciler_default.flushSyncWork();
115631
+ }
115288
115632
  }
115289
115633
  writeToStdout(data2) {
115290
115634
  if (this.isUnmounted) {
@@ -115298,9 +115642,16 @@ class Ink {
115298
115642
  this.options.stdout.write(data2);
115299
115643
  return;
115300
115644
  }
115645
+ const sync = shouldSynchronize(this.options.stdout);
115646
+ if (sync) {
115647
+ this.options.stdout.write(bsu);
115648
+ }
115301
115649
  this.log.clear();
115302
115650
  this.options.stdout.write(data2);
115303
- this.log(this.lastOutput);
115651
+ this.restoreLastOutput();
115652
+ if (sync) {
115653
+ this.options.stdout.write(esu);
115654
+ }
115304
115655
  }
115305
115656
  writeToStderr(data2) {
115306
115657
  if (this.isUnmounted) {
@@ -115315,14 +115666,28 @@ class Ink {
115315
115666
  this.options.stderr.write(data2);
115316
115667
  return;
115317
115668
  }
115669
+ const sync = shouldSynchronize(this.options.stdout);
115670
+ if (sync) {
115671
+ this.options.stdout.write(bsu);
115672
+ }
115318
115673
  this.log.clear();
115319
115674
  this.options.stderr.write(data2);
115320
- this.log(this.lastOutput);
115675
+ this.restoreLastOutput();
115676
+ if (sync) {
115677
+ this.options.stdout.write(esu);
115678
+ }
115321
115679
  }
115322
115680
  unmount(error2) {
115323
115681
  if (this.isUnmounted) {
115324
115682
  return;
115325
115683
  }
115684
+ if (this.beforeExitHandler) {
115685
+ process27.off("beforeExit", this.beforeExitHandler);
115686
+ this.beforeExitHandler = undefined;
115687
+ }
115688
+ if (this.throttledOnRender) {
115689
+ this.throttledOnRender.flush();
115690
+ }
115326
115691
  this.calculateLayout();
115327
115692
  this.onRender();
115328
115693
  this.unsubscribeExit();
@@ -115332,6 +115697,19 @@ class Ink {
115332
115697
  if (typeof this.unsubscribeResize === "function") {
115333
115698
  this.unsubscribeResize();
115334
115699
  }
115700
+ const throttledLog = this.throttledLog;
115701
+ if (typeof throttledLog.flush === "function") {
115702
+ throttledLog.flush();
115703
+ }
115704
+ if (this.cancelKittyDetection) {
115705
+ this.cancelKittyDetection();
115706
+ }
115707
+ if (this.kittyProtocolEnabled) {
115708
+ try {
115709
+ this.options.stdout.write("\x1B[<u");
115710
+ } catch {}
115711
+ this.kittyProtocolEnabled = false;
115712
+ }
115335
115713
  if (is_in_ci_default) {
115336
115714
  this.options.stdout.write(this.lastOutput + `
115337
115715
  `);
@@ -115339,13 +115717,27 @@ class Ink {
115339
115717
  this.log.done();
115340
115718
  }
115341
115719
  this.isUnmounted = true;
115342
- reconciler_default.updateContainerSync(null, this.container, null, noop4);
115343
- reconciler_default.flushSyncWork();
115720
+ if (this.options.concurrent) {
115721
+ reconciler_default.updateContainer(null, this.container, null, noop4);
115722
+ } else {
115723
+ reconciler_default.updateContainerSync(null, this.container, null, noop4);
115724
+ reconciler_default.flushSyncWork();
115725
+ }
115344
115726
  instances_default.delete(this.options.stdout);
115345
- if (error2 instanceof Error) {
115346
- this.rejectExitPromise(error2);
115727
+ const resolveOrReject = () => {
115728
+ if (error2 instanceof Error) {
115729
+ this.rejectExitPromise(error2);
115730
+ } else {
115731
+ this.resolveExitPromise();
115732
+ }
115733
+ };
115734
+ const isProcessExiting = error2 !== undefined && !(error2 instanceof Error);
115735
+ if (isProcessExiting) {
115736
+ resolveOrReject();
115737
+ } else if (this.options.stdout._writableState !== undefined || this.options.stdout.writableLength !== undefined) {
115738
+ this.options.stdout.write("", resolveOrReject);
115347
115739
  } else {
115348
- this.resolveExitPromise();
115740
+ setImmediate(resolveOrReject);
115349
115741
  }
115350
115742
  }
115351
115743
  async waitUntilExit() {
@@ -115353,11 +115745,19 @@ class Ink {
115353
115745
  this.resolveExitPromise = resolve;
115354
115746
  this.rejectExitPromise = reject;
115355
115747
  });
115748
+ if (!this.beforeExitHandler) {
115749
+ this.beforeExitHandler = () => {
115750
+ this.unmount();
115751
+ };
115752
+ process27.once("beforeExit", this.beforeExitHandler);
115753
+ }
115356
115754
  return this.exitPromise;
115357
115755
  }
115358
115756
  clear() {
115359
115757
  if (!is_in_ci_default && !this.options.debug) {
115360
115758
  this.log.clear();
115759
+ this.log.sync(this.lastOutputToRender || this.lastOutput + `
115760
+ `);
115361
115761
  }
115362
115762
  }
115363
115763
  patchConsole() {
@@ -115376,10 +115776,62 @@ class Ink {
115376
115776
  }
115377
115777
  });
115378
115778
  }
115779
+ initKittyKeyboard() {
115780
+ if (!this.options.kittyKeyboard) {
115781
+ return;
115782
+ }
115783
+ const opts = this.options.kittyKeyboard;
115784
+ const mode = opts.mode ?? "auto";
115785
+ if (mode === "disabled" || !this.options.stdin.isTTY || !this.options.stdout.isTTY) {
115786
+ return;
115787
+ }
115788
+ const flags = opts.flags ?? ["disambiguateEscapeCodes"];
115789
+ if (mode === "enabled") {
115790
+ this.enableKittyProtocol(flags);
115791
+ return;
115792
+ }
115793
+ const term = process27.env["TERM"] ?? "";
115794
+ const termProgram = process27.env["TERM_PROGRAM"] ?? "";
115795
+ const isKnownSupportingTerminal = "KITTY_WINDOW_ID" in process27.env || term === "xterm-kitty" || termProgram === "WezTerm" || termProgram === "ghostty";
115796
+ if (!is_in_ci_default && isKnownSupportingTerminal) {
115797
+ this.confirmKittySupport(flags);
115798
+ }
115799
+ }
115800
+ confirmKittySupport(flags) {
115801
+ const { stdin, stdout } = this.options;
115802
+ let responseBuffer = "";
115803
+ const cleanup = () => {
115804
+ this.cancelKittyDetection = undefined;
115805
+ clearTimeout(timer);
115806
+ stdin.removeListener("data", onData);
115807
+ const remaining = responseBuffer.replace(/\u001B\[\?\d+u/, "");
115808
+ responseBuffer = "";
115809
+ if (remaining) {
115810
+ stdin.unshift(Buffer.from(remaining));
115811
+ }
115812
+ };
115813
+ const onData = (data2) => {
115814
+ responseBuffer += typeof data2 === "string" ? data2 : Buffer.from(data2).toString();
115815
+ if (/\u001B\[\?\d+u/.test(responseBuffer)) {
115816
+ cleanup();
115817
+ if (!this.isUnmounted) {
115818
+ this.enableKittyProtocol(flags);
115819
+ }
115820
+ }
115821
+ };
115822
+ stdin.on("data", onData);
115823
+ const timer = setTimeout(cleanup, 200);
115824
+ this.cancelKittyDetection = cleanup;
115825
+ stdout.write("\x1B[?u");
115826
+ }
115827
+ enableKittyProtocol(flags) {
115828
+ this.options.stdout.write(`\x1B[>${resolveFlags(flags)}u`);
115829
+ this.kittyProtocolEnabled = true;
115830
+ }
115379
115831
  }
115380
- var import_react13, import_signal_exit3, import_constants2, noop4 = () => {};
115832
+ var import_react15, import_signal_exit3, import_constants2, noop4 = () => {};
115381
115833
  var init_ink = __esm(async () => {
115382
- import_react13 = __toESM(require_react(), 1);
115834
+ import_react15 = __toESM(require_react(), 1);
115383
115835
  init_compat2();
115384
115836
  init_ansi_escapes();
115385
115837
  init_is_in_ci();
@@ -115388,31 +115840,35 @@ var init_ink = __esm(async () => {
115388
115840
  import_constants2 = __toESM(require_constants8(), 1);
115389
115841
  await init_src();
115390
115842
  init_wrap_ansi();
115843
+ init_terminal_size();
115391
115844
  await init_reconciler();
115392
115845
  await init_renderer();
115393
115846
  await init_dom();
115394
115847
  init_log_update();
115848
+ init_write_synchronized();
115395
115849
  init_instances();
115396
115850
  init_App();
115397
115851
  init_AccessibilityContext();
115852
+ init_kitty_keyboard();
115398
115853
  });
115399
115854
 
115400
115855
  // node_modules/ink/build/render.js
115401
115856
  import { Stream } from "node:stream";
115402
- import process27 from "node:process";
115857
+ import process28 from "node:process";
115403
115858
  var render3 = (node2, options) => {
115404
115859
  const inkOptions = {
115405
- stdout: process27.stdout,
115406
- stdin: process27.stdin,
115407
- stderr: process27.stderr,
115860
+ stdout: process28.stdout,
115861
+ stdin: process28.stdin,
115862
+ stderr: process28.stderr,
115408
115863
  debug: false,
115409
115864
  exitOnCtrlC: true,
115410
115865
  patchConsole: true,
115411
115866
  maxFps: 30,
115412
115867
  incrementalRendering: false,
115868
+ concurrent: false,
115413
115869
  ...getOptions(options)
115414
115870
  };
115415
- const instance = getInstance(inkOptions.stdout, () => new Ink(inkOptions));
115871
+ const instance = getInstance(inkOptions.stdout, () => new Ink(inkOptions), inkOptions.concurrent ?? false);
115416
115872
  instance.render(node2);
115417
115873
  return {
115418
115874
  rerender: instance.render,
@@ -115427,15 +115883,17 @@ var render3 = (node2, options) => {
115427
115883
  if (stdout instanceof Stream) {
115428
115884
  return {
115429
115885
  stdout,
115430
- stdin: process27.stdin
115886
+ stdin: process28.stdin
115431
115887
  };
115432
115888
  }
115433
115889
  return stdout;
115434
- }, getInstance = (stdout, createInstance) => {
115890
+ }, getInstance = (stdout, createInstance, concurrent) => {
115435
115891
  let instance = instances_default.get(stdout);
115436
115892
  if (!instance) {
115437
115893
  instance = createInstance();
115438
115894
  instances_default.set(stdout, instance);
115895
+ } else if (instance.isConcurrent !== concurrent) {
115896
+ console.warn(`Warning: render() was called with concurrent: ${concurrent}, but the existing instance for this stdout uses concurrent: ${instance.isConcurrent}. ` + `The concurrent option only takes effect on the first render. Call unmount() first if you need to change the rendering mode.`);
115439
115897
  }
115440
115898
  return instance;
115441
115899
  };
@@ -115448,64 +115906,83 @@ var init_render = __esm(async () => {
115448
115906
  // node_modules/ink/build/components/Static.js
115449
115907
  function Static(props) {
115450
115908
  const { items, children: render4, style: customStyle } = props;
115451
- const [index2, setIndex] = import_react14.useState(0);
115452
- const itemsToRender = import_react14.useMemo(() => {
115909
+ const [index2, setIndex] = import_react16.useState(0);
115910
+ const itemsToRender = import_react16.useMemo(() => {
115453
115911
  return items.slice(index2);
115454
115912
  }, [items, index2]);
115455
- import_react14.useLayoutEffect(() => {
115913
+ import_react16.useLayoutEffect(() => {
115456
115914
  setIndex(items.length);
115457
115915
  }, [items.length]);
115458
115916
  const children2 = itemsToRender.map((item, itemIndex) => {
115459
115917
  return render4(item, index2 + itemIndex);
115460
115918
  });
115461
- const style = import_react14.useMemo(() => ({
115919
+ const style = import_react16.useMemo(() => ({
115462
115920
  position: "absolute",
115463
115921
  flexDirection: "column",
115464
115922
  ...customStyle
115465
115923
  }), [customStyle]);
115466
- return import_react14.default.createElement("ink-box", { internal_static: true, style }, children2);
115924
+ return import_react16.default.createElement("ink-box", { internal_static: true, style }, children2);
115467
115925
  }
115468
- var import_react14;
115926
+ var import_react16;
115469
115927
  var init_Static = __esm(() => {
115470
- import_react14 = __toESM(require_react(), 1);
115928
+ import_react16 = __toESM(require_react(), 1);
115471
115929
  });
115472
115930
 
115473
115931
  // node_modules/ink/build/components/Transform.js
115474
115932
  function Transform2({ children: children2, transform: transform2, accessibilityLabel }) {
115475
- const { isScreenReaderEnabled } = import_react15.useContext(accessibilityContext);
115933
+ const { isScreenReaderEnabled } = import_react17.useContext(accessibilityContext);
115476
115934
  if (children2 === undefined || children2 === null) {
115477
115935
  return null;
115478
115936
  }
115479
- return import_react15.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row" }, internal_transform: transform2 }, isScreenReaderEnabled && accessibilityLabel ? accessibilityLabel : children2);
115937
+ return import_react17.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row" }, internal_transform: transform2 }, isScreenReaderEnabled && accessibilityLabel ? accessibilityLabel : children2);
115480
115938
  }
115481
- var import_react15;
115939
+ var import_react17;
115482
115940
  var init_Transform = __esm(() => {
115483
- import_react15 = __toESM(require_react(), 1);
115941
+ import_react17 = __toESM(require_react(), 1);
115484
115942
  init_AccessibilityContext();
115485
115943
  });
115486
115944
 
115487
115945
  // node_modules/ink/build/components/Newline.js
115488
115946
  function Newline({ count: count2 = 1 }) {
115489
- return import_react16.default.createElement("ink-text", null, `
115947
+ return import_react18.default.createElement("ink-text", null, `
115490
115948
  `.repeat(count2));
115491
115949
  }
115492
- var import_react16;
115950
+ var import_react18;
115493
115951
  var init_Newline = __esm(() => {
115494
- import_react16 = __toESM(require_react(), 1);
115952
+ import_react18 = __toESM(require_react(), 1);
115495
115953
  });
115496
115954
 
115497
115955
  // node_modules/ink/build/components/Spacer.js
115498
115956
  function Spacer() {
115499
- return import_react17.default.createElement(Box_default, { flexGrow: 1 });
115957
+ return import_react19.default.createElement(Box_default, { flexGrow: 1 });
115500
115958
  }
115501
- var import_react17;
115959
+ var import_react19;
115502
115960
  var init_Spacer = __esm(() => {
115503
- import_react17 = __toESM(require_react(), 1);
115961
+ import_react19 = __toESM(require_react(), 1);
115504
115962
  init_Box();
115505
115963
  });
115506
115964
 
115507
115965
  // node_modules/ink/build/parse-keypress.js
115508
115966
  import { Buffer as Buffer6 } from "node:buffer";
115967
+ function resolveEventType(value) {
115968
+ if (value === 3)
115969
+ return "release";
115970
+ if (value === 2)
115971
+ return "repeat";
115972
+ return "press";
115973
+ }
115974
+ function parseKittyModifiers(modifiers) {
115975
+ return {
115976
+ ctrl: !!(modifiers & kittyModifiers.ctrl),
115977
+ shift: !!(modifiers & kittyModifiers.shift),
115978
+ meta: !!(modifiers & kittyModifiers.meta),
115979
+ option: !!(modifiers & kittyModifiers.alt),
115980
+ super: !!(modifiers & kittyModifiers.super),
115981
+ hyper: !!(modifiers & kittyModifiers.hyper),
115982
+ capsLock: !!(modifiers & kittyModifiers.capsLock),
115983
+ numLock: !!(modifiers & kittyModifiers.numLock)
115984
+ };
115985
+ }
115509
115986
  var metaKeyCodeRe, fnKeyRe, keyName, nonAlphanumericKeys, isShiftKey = (code) => {
115510
115987
  return [
115511
115988
  "[a",
@@ -115535,6 +116012,72 @@ var metaKeyCodeRe, fnKeyRe, keyName, nonAlphanumericKeys, isShiftKey = (code) =>
115535
116012
  "[7^",
115536
116013
  "[8^"
115537
116014
  ].includes(code);
116015
+ }, kittyKeyRe, kittySpecialKeyRe, kittySpecialLetterKeys, kittySpecialNumberKeys, kittyCodepointNames, isValidCodepoint = (cp) => cp >= 0 && cp <= 1114111 && !(cp >= 55296 && cp <= 57343), safeFromCodePoint = (cp) => isValidCodepoint(cp) ? String.fromCodePoint(cp) : "?", parseKittyKeypress = (s) => {
116016
+ const match = kittyKeyRe.exec(s);
116017
+ if (!match)
116018
+ return null;
116019
+ const codepoint = parseInt(match[1], 10);
116020
+ const modifiers = match[2] ? Math.max(0, parseInt(match[2], 10) - 1) : 0;
116021
+ const eventType = match[3] ? parseInt(match[3], 10) : 1;
116022
+ const textField = match[4];
116023
+ if (!isValidCodepoint(codepoint)) {
116024
+ return null;
116025
+ }
116026
+ let text3;
116027
+ if (textField) {
116028
+ text3 = textField.split(":").map((cp) => safeFromCodePoint(parseInt(cp, 10))).join("");
116029
+ }
116030
+ let name;
116031
+ let isPrintable;
116032
+ if (codepoint === 32) {
116033
+ name = "space";
116034
+ isPrintable = true;
116035
+ } else if (codepoint === 13) {
116036
+ name = "return";
116037
+ isPrintable = true;
116038
+ } else if (kittyCodepointNames[codepoint]) {
116039
+ name = kittyCodepointNames[codepoint];
116040
+ isPrintable = false;
116041
+ } else if (codepoint >= 1 && codepoint <= 26) {
116042
+ name = String.fromCodePoint(codepoint + 96);
116043
+ isPrintable = false;
116044
+ } else {
116045
+ name = safeFromCodePoint(codepoint).toLowerCase();
116046
+ isPrintable = true;
116047
+ }
116048
+ if (isPrintable && !text3) {
116049
+ text3 = safeFromCodePoint(codepoint);
116050
+ }
116051
+ return {
116052
+ name,
116053
+ ...parseKittyModifiers(modifiers),
116054
+ eventType: resolveEventType(eventType),
116055
+ sequence: s,
116056
+ raw: s,
116057
+ isKittyProtocol: true,
116058
+ isPrintable,
116059
+ text: text3
116060
+ };
116061
+ }, parseKittySpecialKey = (s) => {
116062
+ const match = kittySpecialKeyRe.exec(s);
116063
+ if (!match)
116064
+ return null;
116065
+ const number5 = parseInt(match[1], 10);
116066
+ const modifiers = Math.max(0, parseInt(match[2], 10) - 1);
116067
+ const eventType = parseInt(match[3], 10);
116068
+ const terminator = match[4];
116069
+ const name = terminator === "~" ? kittySpecialNumberKeys[number5] : kittySpecialLetterKeys[terminator];
116070
+ if (!name)
116071
+ return null;
116072
+ return {
116073
+ name,
116074
+ ...parseKittyModifiers(modifiers),
116075
+ eventType: resolveEventType(eventType),
116076
+ sequence: s,
116077
+ raw: s,
116078
+ isKittyProtocol: true,
116079
+ isPrintable: false
116080
+ };
115538
116081
  }, parseKeypress = (s = "") => {
115539
116082
  let parts;
115540
116083
  if (Buffer6.isBuffer(s)) {
@@ -115549,6 +116092,25 @@ var metaKeyCodeRe, fnKeyRe, keyName, nonAlphanumericKeys, isShiftKey = (code) =>
115549
116092
  } else if (!s) {
115550
116093
  s = "";
115551
116094
  }
116095
+ const kittyResult = parseKittyKeypress(s);
116096
+ if (kittyResult)
116097
+ return kittyResult;
116098
+ const kittySpecialResult = parseKittySpecialKey(s);
116099
+ if (kittySpecialResult)
116100
+ return kittySpecialResult;
116101
+ if (kittyKeyRe.test(s)) {
116102
+ return {
116103
+ name: "",
116104
+ ctrl: false,
116105
+ meta: false,
116106
+ shift: false,
116107
+ option: false,
116108
+ sequence: s,
116109
+ raw: s,
116110
+ isKittyProtocol: true,
116111
+ isPrintable: false
116112
+ };
116113
+ }
115552
116114
  const key = {
115553
116115
  name: "",
115554
116116
  ctrl: false,
@@ -115559,9 +116121,10 @@ var metaKeyCodeRe, fnKeyRe, keyName, nonAlphanumericKeys, isShiftKey = (code) =>
115559
116121
  raw: s
115560
116122
  };
115561
116123
  key.sequence = key.sequence || s || key.name;
115562
- if (s === "\r") {
116124
+ if (s === "\r" || s === "\x1B\r") {
115563
116125
  key.raw = undefined;
115564
116126
  key.name = "return";
116127
+ key.option = s.length === 2;
115565
116128
  } else if (s === `
115566
116129
  `) {
115567
116130
  key.name = "enter";
@@ -115610,6 +116173,7 @@ var metaKeyCodeRe, fnKeyRe, keyName, nonAlphanumericKeys, isShiftKey = (code) =>
115610
116173
  return key;
115611
116174
  }, parse_keypress_default;
115612
116175
  var init_parse_keypress = __esm(() => {
116176
+ init_kitty_keyboard();
115613
116177
  metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
115614
116178
  fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/;
115615
116179
  keyName = {
@@ -115683,21 +116247,147 @@ var init_parse_keypress = __esm(() => {
115683
116247
  "[Z": "tab"
115684
116248
  };
115685
116249
  nonAlphanumericKeys = [...Object.values(keyName), "backspace"];
116250
+ kittyKeyRe = /^\x1b\[(\d+)(?:;(\d+)(?::(\d+))?(?:;([\d:]+))?)?u$/;
116251
+ kittySpecialKeyRe = /^\x1b\[(\d+);(\d+):(\d+)([A-Za-z~])$/;
116252
+ kittySpecialLetterKeys = {
116253
+ A: "up",
116254
+ B: "down",
116255
+ C: "right",
116256
+ D: "left",
116257
+ E: "clear",
116258
+ F: "end",
116259
+ H: "home",
116260
+ P: "f1",
116261
+ Q: "f2",
116262
+ R: "f3",
116263
+ S: "f4"
116264
+ };
116265
+ kittySpecialNumberKeys = {
116266
+ 2: "insert",
116267
+ 3: "delete",
116268
+ 5: "pageup",
116269
+ 6: "pagedown",
116270
+ 7: "home",
116271
+ 8: "end",
116272
+ 11: "f1",
116273
+ 12: "f2",
116274
+ 13: "f3",
116275
+ 14: "f4",
116276
+ 15: "f5",
116277
+ 17: "f6",
116278
+ 18: "f7",
116279
+ 19: "f8",
116280
+ 20: "f9",
116281
+ 21: "f10",
116282
+ 23: "f11",
116283
+ 24: "f12"
116284
+ };
116285
+ kittyCodepointNames = {
116286
+ 27: "escape",
116287
+ 9: "tab",
116288
+ 127: "delete",
116289
+ 8: "backspace",
116290
+ 57358: "capslock",
116291
+ 57359: "scrolllock",
116292
+ 57360: "numlock",
116293
+ 57361: "printscreen",
116294
+ 57362: "pause",
116295
+ 57363: "menu",
116296
+ 57376: "f13",
116297
+ 57377: "f14",
116298
+ 57378: "f15",
116299
+ 57379: "f16",
116300
+ 57380: "f17",
116301
+ 57381: "f18",
116302
+ 57382: "f19",
116303
+ 57383: "f20",
116304
+ 57384: "f21",
116305
+ 57385: "f22",
116306
+ 57386: "f23",
116307
+ 57387: "f24",
116308
+ 57388: "f25",
116309
+ 57389: "f26",
116310
+ 57390: "f27",
116311
+ 57391: "f28",
116312
+ 57392: "f29",
116313
+ 57393: "f30",
116314
+ 57394: "f31",
116315
+ 57395: "f32",
116316
+ 57396: "f33",
116317
+ 57397: "f34",
116318
+ 57398: "f35",
116319
+ 57399: "kp0",
116320
+ 57400: "kp1",
116321
+ 57401: "kp2",
116322
+ 57402: "kp3",
116323
+ 57403: "kp4",
116324
+ 57404: "kp5",
116325
+ 57405: "kp6",
116326
+ 57406: "kp7",
116327
+ 57407: "kp8",
116328
+ 57408: "kp9",
116329
+ 57409: "kpdecimal",
116330
+ 57410: "kpdivide",
116331
+ 57411: "kpmultiply",
116332
+ 57412: "kpsubtract",
116333
+ 57413: "kpadd",
116334
+ 57414: "kpenter",
116335
+ 57415: "kpequal",
116336
+ 57416: "kpseparator",
116337
+ 57417: "kpleft",
116338
+ 57418: "kpright",
116339
+ 57419: "kpup",
116340
+ 57420: "kpdown",
116341
+ 57421: "kppageup",
116342
+ 57422: "kppagedown",
116343
+ 57423: "kphome",
116344
+ 57424: "kpend",
116345
+ 57425: "kpinsert",
116346
+ 57426: "kpdelete",
116347
+ 57427: "kpbegin",
116348
+ 57428: "mediaplay",
116349
+ 57429: "mediapause",
116350
+ 57430: "mediaplaypause",
116351
+ 57431: "mediareverse",
116352
+ 57432: "mediastop",
116353
+ 57433: "mediafastforward",
116354
+ 57434: "mediarewind",
116355
+ 57435: "mediatracknext",
116356
+ 57436: "mediatrackprevious",
116357
+ 57437: "mediarecord",
116358
+ 57438: "lowervolume",
116359
+ 57439: "raisevolume",
116360
+ 57440: "mutevolume",
116361
+ 57441: "leftshift",
116362
+ 57442: "leftcontrol",
116363
+ 57443: "leftalt",
116364
+ 57444: "leftsuper",
116365
+ 57445: "lefthyper",
116366
+ 57446: "leftmeta",
116367
+ 57447: "rightshift",
116368
+ 57448: "rightcontrol",
116369
+ 57449: "rightalt",
116370
+ 57450: "rightsuper",
116371
+ 57451: "righthyper",
116372
+ 57452: "rightmeta",
116373
+ 57453: "isoLevel3Shift",
116374
+ 57454: "isoLevel5Shift"
116375
+ };
115686
116376
  parse_keypress_default = parseKeypress;
115687
116377
  });
115688
116378
 
115689
116379
  // node_modules/ink/build/hooks/use-stdin.js
115690
- var import_react18, useStdin = () => import_react18.useContext(StdinContext_default), use_stdin_default;
116380
+ var import_react20, useStdin = () => import_react20.useContext(StdinContext_default), use_stdin_default;
115691
116381
  var init_use_stdin = __esm(() => {
115692
- import_react18 = __toESM(require_react(), 1);
116382
+ import_react20 = __toESM(require_react(), 1);
115693
116383
  init_StdinContext();
115694
116384
  use_stdin_default = useStdin;
115695
116385
  });
115696
116386
 
115697
116387
  // node_modules/ink/build/hooks/use-input.js
115698
- var import_react19, useInput = (inputHandler, options = {}) => {
116388
+ var import_react21, useInput = (inputHandler, options = {}) => {
115699
116389
  const { stdin, setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = use_stdin_default();
115700
- import_react19.useEffect(() => {
116390
+ import_react21.useEffect(() => {
115701
116391
  if (options.isActive === false) {
115702
116392
  return;
115703
116393
  }
@@ -115706,7 +116396,7 @@ var import_react19, useInput = (inputHandler, options = {}) => {
115706
116396
  setRawMode(false);
115707
116397
  };
115708
116398
  }, [options.isActive, setRawMode]);
115709
- import_react19.useEffect(() => {
116399
+ import_react21.useEffect(() => {
115710
116400
  if (options.isActive === false) {
115711
116401
  return;
115712
116402
  }
@@ -115728,10 +116418,28 @@ var import_react19, useInput = (inputHandler, options = {}) => {
115728
116418
  tab: keypress.name === "tab",
115729
116419
  backspace: keypress.name === "backspace",
115730
116420
  delete: keypress.name === "delete",
115731
- meta: keypress.meta || keypress.name === "escape" || keypress.option
116421
+ meta: keypress.meta || keypress.name === "escape" || keypress.option,
116422
+ super: keypress.super ?? false,
116423
+ hyper: keypress.hyper ?? false,
116424
+ capsLock: keypress.capsLock ?? false,
116425
+ numLock: keypress.numLock ?? false,
116426
+ eventType: keypress.eventType
115732
116427
  };
115733
- let input = keypress.ctrl ? keypress.name : keypress.sequence;
115734
- if (nonAlphanumericKeys.includes(keypress.name)) {
116428
+ let input;
116429
+ if (keypress.isKittyProtocol) {
116430
+ if (keypress.isPrintable) {
116431
+ input = keypress.text ?? keypress.name;
116432
+ } else if (keypress.ctrl && keypress.name.length === 1) {
116433
+ input = keypress.name;
116434
+ } else {
116435
+ input = "";
116436
+ }
116437
+ } else if (keypress.ctrl) {
116438
+ input = keypress.name;
116439
+ } else {
116440
+ input = keypress.sequence;
116441
+ }
116442
+ if (!keypress.isKittyProtocol && nonAlphanumericKeys.includes(keypress.name)) {
115735
116443
  input = "";
115736
116444
  }
115737
116445
  if (input.startsWith("\x1B")) {
@@ -115753,7 +116461,7 @@ var import_react19, useInput = (inputHandler, options = {}) => {
115753
116461
  }, [options.isActive, stdin, internal_exitOnCtrlC, inputHandler]);
115754
116462
  }, use_input_default;
115755
116463
  var init_use_input = __esm(async () => {
115756
- import_react19 = __toESM(require_react(), 1);
116464
+ import_react21 = __toESM(require_react(), 1);
115757
116465
  init_parse_keypress();
115758
116466
  await init_reconciler();
115759
116467
  init_use_stdin();
@@ -115761,50 +116469,50 @@ var init_use_input = __esm(async () => {
115761
116469
  });
115762
116470
 
115763
116471
  // node_modules/ink/build/hooks/use-app.js
115764
- var import_react20, useApp = () => import_react20.useContext(AppContext_default), use_app_default;
116472
+ var import_react22, useApp = () => import_react22.useContext(AppContext_default), use_app_default;
115765
116473
  var init_use_app = __esm(() => {
115766
- import_react20 = __toESM(require_react(), 1);
116474
+ import_react22 = __toESM(require_react(), 1);
115767
116475
  init_AppContext();
115768
116476
  use_app_default = useApp;
115769
116477
  });
115770
116478
 
115771
116479
  // node_modules/ink/build/hooks/use-stdout.js
115772
- var import_react21, useStdout = () => import_react21.useContext(StdoutContext_default), use_stdout_default;
116480
+ var import_react23, useStdout = () => import_react23.useContext(StdoutContext_default), use_stdout_default;
115773
116481
  var init_use_stdout = __esm(() => {
115774
- import_react21 = __toESM(require_react(), 1);
116482
+ import_react23 = __toESM(require_react(), 1);
115775
116483
  init_StdoutContext();
115776
116484
  use_stdout_default = useStdout;
115777
116485
  });
115778
116486
 
115779
116487
  // node_modules/ink/build/hooks/use-stderr.js
115780
- var import_react22, useStderr = () => import_react22.useContext(StderrContext_default), use_stderr_default;
116488
+ var import_react24, useStderr = () => import_react24.useContext(StderrContext_default), use_stderr_default;
115781
116489
  var init_use_stderr = __esm(() => {
115782
- import_react22 = __toESM(require_react(), 1);
116490
+ import_react24 = __toESM(require_react(), 1);
115783
116491
  init_StderrContext();
115784
116492
  use_stderr_default = useStderr;
115785
116493
  });
115786
116494
 
115787
116495
  // node_modules/ink/build/hooks/use-focus.js
115788
- var import_react23, useFocus = ({ isActive = true, autoFocus = false, id: customId } = {}) => {
116496
+ var import_react25, useFocus = ({ isActive = true, autoFocus = false, id: customId } = {}) => {
115789
116497
  const { isRawModeSupported, setRawMode } = use_stdin_default();
115790
- const { activeId, add: add2, remove: remove2, activate, deactivate, focus } = import_react23.useContext(FocusContext_default);
115791
- const id = import_react23.useMemo(() => {
116498
+ const { activeId, add: add2, remove: remove2, activate, deactivate, focus } = import_react25.useContext(FocusContext_default);
116499
+ const id = import_react25.useMemo(() => {
115792
116500
  return customId ?? Math.random().toString().slice(2, 7);
115793
116501
  }, [customId]);
115794
- import_react23.useEffect(() => {
116502
+ import_react25.useEffect(() => {
115795
116503
  add2(id, { autoFocus });
115796
116504
  return () => {
115797
116505
  remove2(id);
115798
116506
  };
115799
116507
  }, [id, autoFocus]);
115800
- import_react23.useEffect(() => {
116508
+ import_react25.useEffect(() => {
115801
116509
  if (isActive) {
115802
116510
  activate(id);
115803
116511
  } else {
115804
116512
  deactivate(id);
115805
116513
  }
115806
116514
  }, [isActive, id]);
115807
- import_react23.useEffect(() => {
116515
+ import_react25.useEffect(() => {
115808
116516
  if (!isRawModeSupported || !isActive) {
115809
116517
  return;
115810
116518
  }
@@ -115819,15 +116527,15 @@ var import_react23, useFocus = ({ isActive = true, autoFocus = false, id: custom
115819
116527
  };
115820
116528
  }, use_focus_default;
115821
116529
  var init_use_focus = __esm(() => {
115822
- import_react23 = __toESM(require_react(), 1);
116530
+ import_react25 = __toESM(require_react(), 1);
115823
116531
  init_FocusContext();
115824
116532
  init_use_stdin();
115825
116533
  use_focus_default = useFocus;
115826
116534
  });
115827
116535
 
115828
116536
  // node_modules/ink/build/hooks/use-focus-manager.js
115829
- var import_react24, useFocusManager = () => {
115830
- const focusContext = import_react24.useContext(FocusContext_default);
116537
+ var import_react26, useFocusManager = () => {
116538
+ const focusContext = import_react26.useContext(FocusContext_default);
115831
116539
  return {
115832
116540
  enableFocus: focusContext.enableFocus,
115833
116541
  disableFocus: focusContext.disableFocus,
@@ -115837,22 +116545,43 @@ var import_react24, useFocusManager = () => {
115837
116545
  };
115838
116546
  }, use_focus_manager_default;
115839
116547
  var init_use_focus_manager = __esm(() => {
115840
- import_react24 = __toESM(require_react(), 1);
116548
+ import_react26 = __toESM(require_react(), 1);
115841
116549
  init_FocusContext();
115842
116550
  use_focus_manager_default = useFocusManager;
115843
116551
  });
115844
116552
 
115845
116553
  // node_modules/ink/build/hooks/use-is-screen-reader-enabled.js
115846
- var import_react25, useIsScreenReaderEnabled = () => {
115847
- const { isScreenReaderEnabled } = import_react25.useContext(accessibilityContext);
116554
+ var import_react27, useIsScreenReaderEnabled = () => {
116555
+ const { isScreenReaderEnabled } = import_react27.useContext(accessibilityContext);
115848
116556
  return isScreenReaderEnabled;
115849
116557
  }, use_is_screen_reader_enabled_default;
115850
116558
  var init_use_is_screen_reader_enabled = __esm(() => {
115851
- import_react25 = __toESM(require_react(), 1);
116559
+ import_react27 = __toESM(require_react(), 1);
115852
116560
  init_AccessibilityContext();
115853
116561
  use_is_screen_reader_enabled_default = useIsScreenReaderEnabled;
115854
116562
  });
115855
116563
 
116564
+ // node_modules/ink/build/hooks/use-cursor.js
116565
+ var import_react28, useCursor = () => {
116566
+ const context = import_react28.useContext(CursorContext_default);
116567
+ const positionRef = import_react28.useRef(undefined);
116568
+ const setCursorPosition = import_react28.useCallback((position) => {
116569
+ positionRef.current = position;
116570
+ }, []);
116571
+ import_react28.useInsertionEffect(() => {
116572
+ context.setCursorPosition(positionRef.current);
116573
+ return () => {
116574
+ context.setCursorPosition(undefined);
116575
+ };
116576
+ });
116577
+ return { setCursorPosition };
116578
+ }, use_cursor_default;
116579
+ var init_use_cursor = __esm(() => {
116580
+ import_react28 = __toESM(require_react(), 1);
116581
+ init_CursorContext();
116582
+ use_cursor_default = useCursor;
116583
+ });
116584
+
115856
116585
  // node_modules/ink/build/measure-element.js
115857
116586
  var measureElement = (node2) => ({
115858
116587
  width: node2.yogaNode?.getComputedWidth() ?? 0,
@@ -115872,9 +116601,12 @@ __export(exports_build, {
115872
116601
  useInput: () => use_input_default,
115873
116602
  useFocusManager: () => use_focus_manager_default,
115874
116603
  useFocus: () => use_focus_default,
116604
+ useCursor: () => use_cursor_default,
115875
116605
  useApp: () => use_app_default,
115876
116606
  render: () => render_default,
115877
116607
  measureElement: () => measure_element_default,
116608
+ kittyModifiers: () => kittyModifiers,
116609
+ kittyFlags: () => kittyFlags,
115878
116610
  Transform: () => Transform2,
115879
116611
  Text: () => Text3,
115880
116612
  Static: () => Static,
@@ -115898,7 +116630,9 @@ var init_build2 = __esm(async () => {
115898
116630
  init_use_focus();
115899
116631
  init_use_focus_manager();
115900
116632
  init_use_is_screen_reader_enabled();
116633
+ init_use_cursor();
115901
116634
  init_measure_element();
116635
+ init_kitty_keyboard();
115902
116636
  });
115903
116637
 
115904
116638
  // src/ui/copy-behaviors/handlers.ts
@@ -116148,7 +116882,7 @@ var init_serve_behaviors = __esm(() => {
116148
116882
 
116149
116883
  // node_modules/react/cjs/react-jsx-dev-runtime.development.js
116150
116884
  var require_react_jsx_dev_runtime_development = __commonJS((exports) => {
116151
- var React10 = __toESM(require_react(), 1);
116885
+ var React11 = __toESM(require_react(), 1);
116152
116886
  (function() {
116153
116887
  function getComponentNameFromType(type) {
116154
116888
  if (type == null)
@@ -116340,17 +117074,17 @@ React keys must be passed directly to JSX without using spread:
116340
117074
  function isValidElement(object4) {
116341
117075
  return typeof object4 === "object" && object4 !== null && object4.$$typeof === REACT_ELEMENT_TYPE;
116342
117076
  }
116343
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React10.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
117077
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React11.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
116344
117078
  return null;
116345
117079
  };
116346
- React10 = {
117080
+ React11 = {
116347
117081
  react_stack_bottom_frame: function(callStackForError) {
116348
117082
  return callStackForError();
116349
117083
  }
116350
117084
  };
116351
117085
  var specialPropKeyWarningShown;
116352
117086
  var didWarnAboutElementRef = {};
116353
- var unknownOwnerDebugStack = React10.react_stack_bottom_frame.bind(React10, UnknownOwner)();
117087
+ var unknownOwnerDebugStack = React11.react_stack_bottom_frame.bind(React11, UnknownOwner)();
116354
117088
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
116355
117089
  var didWarnAboutKeySpread = {};
116356
117090
  exports.Fragment = REACT_FRAGMENT_TYPE;
@@ -116422,8 +117156,8 @@ function buildVisibleTree(data2, expandedIds, prefix = "", depth = 0, rootLabel)
116422
117156
  }
116423
117157
  return nodes;
116424
117158
  }
116425
- var import_react26, jsx_dev_runtime, JsonTree = ({ data: data2, rootLabel, onNavigate, onBack }) => {
116426
- const [expandedIds, setExpandedIds] = import_react26.useState(() => {
117159
+ var import_react29, jsx_dev_runtime, JsonTree = ({ data: data2, rootLabel, onNavigate, onBack }) => {
117160
+ const [expandedIds, setExpandedIds] = import_react29.useState(() => {
116427
117161
  const ids = new Set;
116428
117162
  if (rootLabel) {
116429
117163
  ids.add(rootLabel);
@@ -116432,11 +117166,11 @@ var import_react26, jsx_dev_runtime, JsonTree = ({ data: data2, rootLabel, onNav
116432
117166
  }
116433
117167
  return ids;
116434
117168
  });
116435
- const [selectedIndex, setSelectedIndex] = import_react26.useState(0);
116436
- const [feedbackMessage, setFeedbackMessage] = import_react26.useState(null);
116437
- const lastCPressTime = import_react26.useRef(0);
116438
- const feedbackTimeout = import_react26.useRef(null);
116439
- const visibleNodes = import_react26.useMemo(() => {
117169
+ const [selectedIndex, setSelectedIndex] = import_react29.useState(0);
117170
+ const [feedbackMessage, setFeedbackMessage] = import_react29.useState(null);
117171
+ const lastCPressTime = import_react29.useRef(0);
117172
+ const feedbackTimeout = import_react29.useRef(null);
117173
+ const visibleNodes = import_react29.useMemo(() => {
116440
117174
  return buildVisibleTree(data2, expandedIds, "", 0, rootLabel);
116441
117175
  }, [data2, expandedIds, rootLabel]);
116442
117176
  const { exit } = use_app_default();
@@ -116703,7 +117437,7 @@ var import_react26, jsx_dev_runtime, JsonTree = ({ data: data2, rootLabel, onNav
116703
117437
  }, undefined, true, undefined, this);
116704
117438
  };
116705
117439
  var init_JsonTree = __esm(async () => {
116706
- import_react26 = __toESM(require_react(), 1);
117440
+ import_react29 = __toESM(require_react(), 1);
116707
117441
  await init_build2();
116708
117442
  init_copy_behaviors();
116709
117443
  init_navigation_behaviors();
@@ -116716,23 +117450,23 @@ var exports_InteractiveViewer = {};
116716
117450
  __export(exports_InteractiveViewer, {
116717
117451
  InteractiveViewer: () => InteractiveViewer
116718
117452
  });
116719
- var import_react27, jsx_dev_runtime2, InteractiveViewer = ({
117453
+ var import_react30, jsx_dev_runtime2, InteractiveViewer = ({
116720
117454
  initialData,
116721
117455
  initialRootLabel,
116722
117456
  initialHistory,
116723
117457
  onFetch,
116724
117458
  onExit: onExit2
116725
117459
  }) => {
116726
- const [history, setHistory] = import_react27.useState(() => {
117460
+ const [history, setHistory] = import_react30.useState(() => {
116727
117461
  if (initialHistory && initialHistory.length > 0) {
116728
117462
  return [...initialHistory, { data: initialData, rootLabel: initialRootLabel }];
116729
117463
  }
116730
117464
  return [{ data: initialData, rootLabel: initialRootLabel }];
116731
117465
  });
116732
- const [isLoading, setIsLoading] = import_react27.useState(false);
116733
- const [error2, setError] = import_react27.useState(null);
117466
+ const [isLoading, setIsLoading] = import_react30.useState(false);
117467
+ const [error2, setError] = import_react30.useState(null);
116734
117468
  const currentState = history[history.length - 1];
116735
- const handleNavigate = import_react27.useCallback(async (result) => {
117469
+ const handleNavigate = import_react30.useCallback(async (result) => {
116736
117470
  if (!result.target)
116737
117471
  return;
116738
117472
  setIsLoading(true);
@@ -116754,7 +117488,7 @@ var import_react27, jsx_dev_runtime2, InteractiveViewer = ({
116754
117488
  setIsLoading(false);
116755
117489
  }
116756
117490
  }, [onFetch]);
116757
- const handleBack = import_react27.useCallback(() => {
117491
+ const handleBack = import_react30.useCallback(() => {
116758
117492
  if (history.length > 1) {
116759
117493
  setHistory((prev2) => prev2.slice(0, -1));
116760
117494
  setError(null);
@@ -116803,7 +117537,7 @@ var import_react27, jsx_dev_runtime2, InteractiveViewer = ({
116803
117537
  }, undefined, true, undefined, this);
116804
117538
  };
116805
117539
  var init_InteractiveViewer = __esm(async () => {
116806
- import_react27 = __toESM(require_react(), 1);
117540
+ import_react30 = __toESM(require_react(), 1);
116807
117541
  await init_build2();
116808
117542
  await init_JsonTree();
116809
117543
  jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
@@ -116864,7 +117598,7 @@ class ViewCommandHandler {
116864
117598
  }
116865
117599
  async executeInteractiveMode(options) {
116866
117600
  const { render: render4 } = await init_build2().then(() => exports_build);
116867
- const React12 = await Promise.resolve().then(() => __toESM(require_react(), 1));
117601
+ const React13 = await Promise.resolve().then(() => __toESM(require_react(), 1));
116868
117602
  const { InteractiveViewer: InteractiveViewer2 } = await init_InteractiveViewer().then(() => exports_InteractiveViewer);
116869
117603
  const { ViewHandler: ViewHandler2 } = await Promise.resolve().then(() => (init_handler2(), exports_handler));
116870
117604
  const handler2 = new ViewHandler2;
@@ -116880,7 +117614,7 @@ class ViewCommandHandler {
116880
117614
  ${icons.error} View failed: ${result.error.message}`));
116881
117615
  process.exit(1);
116882
117616
  }
116883
- const createElement = React12.createElement || React12.default.createElement;
117617
+ const createElement = React13.createElement || React13.default.createElement;
116884
117618
  let rootLabel;
116885
117619
  if (options.sourceScreen) {
116886
117620
  rootLabel = "screen";
@@ -117081,7 +117815,7 @@ var init_hook_engine = __esm(() => {
117081
117815
 
117082
117816
  // node_modules/@inquirer/core/dist/lib/use-state.js
117083
117817
  import { AsyncResource as AsyncResource2 } from "node:async_hooks";
117084
- function useState4(defaultValue) {
117818
+ function useState5(defaultValue) {
117085
117819
  return withPointer((pointer) => {
117086
117820
  const setState = AsyncResource2.bind(function setState(newValue) {
117087
117821
  if (pointer.get() !== newValue) {
@@ -117102,7 +117836,7 @@ var init_use_state = __esm(() => {
117102
117836
  });
117103
117837
 
117104
117838
  // node_modules/@inquirer/core/dist/lib/use-effect.js
117105
- function useEffect4(cb, depArray) {
117839
+ function useEffect5(cb, depArray) {
117106
117840
  withPointer((pointer) => {
117107
117841
  const oldDeps = pointer.get();
117108
117842
  const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i2) => !Object.is(dep, oldDeps[i2]));
@@ -117117,12 +117851,12 @@ var init_use_effect = __esm(() => {
117117
117851
  });
117118
117852
 
117119
117853
  // node_modules/@inquirer/figures/dist/index.js
117120
- import process28 from "node:process";
117854
+ import process29 from "node:process";
117121
117855
  function isUnicodeSupported2() {
117122
- if (process28.platform !== "win32") {
117123
- return process28.env["TERM"] !== "linux";
117856
+ if (process29.platform !== "win32") {
117857
+ return process29.env["TERM"] !== "linux";
117124
117858
  }
117125
- return Boolean(process28.env["WT_SESSION"]) || Boolean(process28.env["TERMINUS_SUBLIME"]) || process28.env["ConEmuTask"] === "{cmd::Cmder}" || process28.env["TERM_PROGRAM"] === "Terminus-Sublime" || process28.env["TERM_PROGRAM"] === "vscode" || process28.env["TERM"] === "xterm-256color" || process28.env["TERM"] === "alacritty" || process28.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
117859
+ return Boolean(process29.env["WT_SESSION"]) || Boolean(process29.env["TERMINUS_SUBLIME"]) || process29.env["ConEmuTask"] === "{cmd::Cmder}" || process29.env["TERM_PROGRAM"] === "Terminus-Sublime" || process29.env["TERM_PROGRAM"] === "vscode" || process29.env["TERM"] === "xterm-256color" || process29.env["TERM"] === "alacritty" || process29.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
117126
117860
  }
117127
117861
  var common2, specialMainSymbols2, specialFallbackSymbols2, mainSymbols2, fallbackSymbols2, shouldUseMain2, figures2, dist_default4, replacements2;
117128
117862
  var init_dist8 = __esm(() => {
@@ -117467,10 +118201,10 @@ var init_make_theme = __esm(() => {
117467
118201
 
117468
118202
  // node_modules/@inquirer/core/dist/lib/use-prefix.js
117469
118203
  function usePrefix({ status = "idle", theme: theme2 }) {
117470
- const [showLoader, setShowLoader] = useState4(false);
117471
- const [tick, setTick] = useState4(0);
118204
+ const [showLoader, setShowLoader] = useState5(false);
118205
+ const [tick, setTick] = useState5(0);
117472
118206
  const { prefix, spinner } = makeTheme(theme2);
117473
- useEffect4(() => {
118207
+ useEffect5(() => {
117474
118208
  if (status === "loading") {
117475
118209
  let tickInterval;
117476
118210
  let inc = -1;
@@ -117502,7 +118236,7 @@ var init_use_prefix = __esm(() => {
117502
118236
  });
117503
118237
 
117504
118238
  // node_modules/@inquirer/core/dist/lib/use-memo.js
117505
- function useMemo4(fn, dependencies) {
118239
+ function useMemo5(fn, dependencies) {
117506
118240
  return withPointer((pointer) => {
117507
118241
  const prev2 = pointer.get();
117508
118242
  if (!prev2 || prev2.dependencies.length !== dependencies.length || prev2.dependencies.some((dep, i2) => dep !== dependencies[i2])) {
@@ -117518,8 +118252,8 @@ var init_use_memo = __esm(() => {
117518
118252
  });
117519
118253
 
117520
118254
  // node_modules/@inquirer/core/dist/lib/use-ref.js
117521
- function useRef2(val2) {
117522
- return useState4({ current: val2 })[0];
118255
+ function useRef4(val2) {
118256
+ return useState5({ current: val2 })[0];
117523
118257
  }
117524
118258
  var init_use_ref = __esm(() => {
117525
118259
  init_use_state();
@@ -117527,9 +118261,9 @@ var init_use_ref = __esm(() => {
117527
118261
 
117528
118262
  // node_modules/@inquirer/core/dist/lib/use-keypress.js
117529
118263
  function useKeypress(userHandler) {
117530
- const signal = useRef2(userHandler);
118264
+ const signal = useRef4(userHandler);
117531
118265
  signal.current = userHandler;
117532
- useEffect4((rl) => {
118266
+ useEffect5((rl) => {
117533
118267
  let ignore = false;
117534
118268
  const handler2 = withUpdates((_input, event) => {
117535
118269
  if (ignore)
@@ -117608,7 +118342,7 @@ var init_utils2 = __esm(() => {
117608
118342
 
117609
118343
  // node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
117610
118344
  function usePointerPosition({ active, renderedItems, pageSize, loop }) {
117611
- const state = useRef2({
118345
+ const state = useRef4({
117612
118346
  lastPointer: active,
117613
118347
  lastActive: undefined
117614
118348
  });
@@ -118045,8 +118779,8 @@ var init_dist11 = __esm(() => {
118045
118779
  init_dist10();
118046
118780
  dist_default5 = createPrompt((config2, done) => {
118047
118781
  const { transformer = boolToString } = config2;
118048
- const [status, setStatus] = useState4("idle");
118049
- const [value, setValue] = useState4("");
118782
+ const [status, setStatus] = useState5("idle");
118783
+ const [value, setValue] = useState5("");
118050
118784
  const theme2 = makeTheme(config2.theme);
118051
118785
  const prefix = usePrefix({ status, theme: theme2 });
118052
118786
  useKeypress((key, rl) => {
@@ -118088,10 +118822,10 @@ var init_dist12 = __esm(() => {
118088
118822
  dist_default6 = createPrompt((config2, done) => {
118089
118823
  const { prefill = "tab" } = config2;
118090
118824
  const theme2 = makeTheme(inputTheme, config2.theme);
118091
- const [status, setStatus] = useState4("idle");
118092
- const [defaultValue = "", setDefaultValue] = useState4(config2.default);
118093
- const [errorMsg, setError] = useState4();
118094
- const [value, setValue] = useState4("");
118825
+ const [status, setStatus] = useState5("idle");
118826
+ const [defaultValue = "", setDefaultValue] = useState5(config2.default);
118827
+ const [errorMsg, setError] = useState5();
118828
+ const [value, setValue] = useState5("");
118095
118829
  const prefix = usePrefix({ status, theme: theme2 });
118096
118830
  async function validate2(value2) {
118097
118831
  const { required: required2, pattern, patternError = "Invalid input" } = config2;
@@ -118139,7 +118873,7 @@ var init_dist12 = __esm(() => {
118139
118873
  setError(undefined);
118140
118874
  }
118141
118875
  });
118142
- useEffect4((rl) => {
118876
+ useEffect5((rl) => {
118143
118877
  if (prefill === "editable" && defaultValue) {
118144
118878
  rl.write(defaultValue);
118145
118879
  setValue(defaultValue);
@@ -118175,9 +118909,9 @@ var init_dist13 = __esm(() => {
118175
118909
  dist_default7 = createPrompt((config2, done) => {
118176
118910
  const { validate: validate2 = () => true } = config2;
118177
118911
  const theme2 = makeTheme(config2.theme);
118178
- const [status, setStatus] = useState4("idle");
118179
- const [errorMsg, setError] = useState4();
118180
- const [value, setValue] = useState4("");
118912
+ const [status, setStatus] = useState5("idle");
118913
+ const [errorMsg, setError] = useState5();
118914
+ const [value, setValue] = useState5("");
118181
118915
  const prefix = usePrefix({ status, theme: theme2 });
118182
118916
  useKeypress(async (key, rl) => {
118183
118917
  if (status !== "idle") {
@@ -118271,12 +119005,12 @@ var init_dist14 = __esm(() => {
118271
119005
  const { loop = true, pageSize = 7 } = config2;
118272
119006
  const theme2 = makeTheme(selectTheme, config2.theme);
118273
119007
  const { keybindings } = theme2;
118274
- const [status, setStatus] = useState4("idle");
119008
+ const [status, setStatus] = useState5("idle");
118275
119009
  const prefix = usePrefix({ status, theme: theme2 });
118276
- const searchTimeoutRef = useRef2();
119010
+ const searchTimeoutRef = useRef4();
118277
119011
  const searchEnabled = !keybindings.includes("vim");
118278
- const items = useMemo4(() => normalizeChoices(config2.choices), [config2.choices]);
118279
- const bounds = useMemo4(() => {
119012
+ const items = useMemo5(() => normalizeChoices(config2.choices), [config2.choices]);
119013
+ const bounds = useMemo5(() => {
118280
119014
  const first2 = items.findIndex(isSelectable);
118281
119015
  const last2 = items.findLastIndex(isSelectable);
118282
119016
  if (first2 === -1) {
@@ -118284,12 +119018,12 @@ var init_dist14 = __esm(() => {
118284
119018
  }
118285
119019
  return { first: first2, last: last2 };
118286
119020
  }, [items]);
118287
- const defaultItemIndex = useMemo4(() => {
119021
+ const defaultItemIndex = useMemo5(() => {
118288
119022
  if (!("default" in config2))
118289
119023
  return -1;
118290
119024
  return items.findIndex((item) => isSelectable(item) && item.value === config2.default);
118291
119025
  }, [config2.default, items]);
118292
- const [active, setActive] = useState4(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
119026
+ const [active, setActive] = useState5(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
118293
119027
  const selectedChoice = items[active];
118294
119028
  useKeypress((key, rl) => {
118295
119029
  clearTimeout(searchTimeoutRef.current);
@@ -118339,7 +119073,7 @@ var init_dist14 = __esm(() => {
118339
119073
  }, 700);
118340
119074
  }
118341
119075
  });
118342
- useEffect4(() => () => {
119076
+ useEffect5(() => () => {
118343
119077
  clearTimeout(searchTimeoutRef.current);
118344
119078
  }, []);
118345
119079
  const message = theme2.style.message(config2.message, status);
@@ -118665,7 +119399,7 @@ var init_RevokeAdcStep = __esm(() => {
118665
119399
  });
118666
119400
 
118667
119401
  // src/commands/logout/steps/ClearConfigStep.ts
118668
- import fs10 from "node:fs";
119402
+ import fs11 from "node:fs";
118669
119403
 
118670
119404
  class ClearConfigStep {
118671
119405
  id = "clear-config";
@@ -118677,8 +119411,8 @@ class ClearConfigStep {
118677
119411
  context.ui.log(theme.gray("Clearing gcloud configuration directory..."));
118678
119412
  const configPath = getGcloudConfigPath();
118679
119413
  try {
118680
- if (fs10.existsSync(configPath)) {
118681
- fs10.rmSync(configPath, { recursive: true, force: true });
119414
+ if (fs11.existsSync(configPath)) {
119415
+ fs11.rmSync(configPath, { recursive: true, force: true });
118682
119416
  context.ui.log(theme.green(`${icons.success} Configuration directory cleared`));
118683
119417
  context.configCleared = true;
118684
119418
  } else {
@@ -118846,11 +119580,11 @@ __export(exports_ServeView, {
118846
119580
  import { spawn as spawn6 } from "child_process";
118847
119581
  function ServeView({ projectId, projectTitle, screens }) {
118848
119582
  const { exit } = use_app_default();
118849
- const [selectedIndex, setSelectedIndex] = import_react28.useState(0);
118850
- const [serverUrl, setServerUrl] = import_react28.useState(null);
118851
- const [status, setStatus] = import_react28.useState("Starting server...");
118852
- const [server, setServer] = import_react28.useState(null);
118853
- import_react28.useEffect(() => {
119583
+ const [selectedIndex, setSelectedIndex] = import_react31.useState(0);
119584
+ const [serverUrl, setServerUrl] = import_react31.useState(null);
119585
+ const [status, setStatus] = import_react31.useState("Starting server...");
119586
+ const [server, setServer] = import_react31.useState(null);
119587
+ import_react31.useEffect(() => {
118854
119588
  const srv = new StitchViteServer;
118855
119589
  setServer(srv);
118856
119590
  let mounted = true;
@@ -118979,9 +119713,9 @@ function ServeView({ projectId, projectTitle, screens }) {
118979
119713
  ]
118980
119714
  }, undefined, true, undefined, this);
118981
119715
  }
118982
- var import_react28, jsx_dev_runtime3;
119716
+ var import_react31, jsx_dev_runtime3;
118983
119717
  var init_ServeView = __esm(async () => {
118984
- import_react28 = __toESM(require_react(), 1);
119718
+ import_react31 = __toESM(require_react(), 1);
118985
119719
  await init_build2();
118986
119720
  init_StitchViteServer();
118987
119721
  init_clipboard();
@@ -119049,20 +119783,20 @@ __export(exports_ScreensView, {
119049
119783
  import { spawn as spawn7 } from "child_process";
119050
119784
  function ScreensView({ projectId, projectTitle, screens, client }) {
119051
119785
  const { exit } = use_app_default();
119052
- const [selectedIndex, setSelectedIndex] = import_react29.useState(0);
119053
- const [windowStart, setWindowStart] = import_react29.useState(0);
119054
- const [status, setStatus] = import_react29.useState("");
119055
- const [serverUrl, setServerUrl] = import_react29.useState(null);
119056
- const serverRef = import_react29.useRef(null);
119786
+ const [selectedIndex, setSelectedIndex] = import_react32.useState(0);
119787
+ const [windowStart, setWindowStart] = import_react32.useState(0);
119788
+ const [status, setStatus] = import_react32.useState("");
119789
+ const [serverUrl, setServerUrl] = import_react32.useState(null);
119790
+ const serverRef = import_react32.useRef(null);
119057
119791
  const VIEW_HEIGHT = 10;
119058
- import_react29.default.useEffect(() => {
119792
+ import_react32.default.useEffect(() => {
119059
119793
  if (selectedIndex < windowStart) {
119060
119794
  setWindowStart(selectedIndex);
119061
119795
  } else if (selectedIndex >= windowStart + VIEW_HEIGHT) {
119062
119796
  setWindowStart(selectedIndex - VIEW_HEIGHT + 1);
119063
119797
  }
119064
119798
  }, [selectedIndex, windowStart, VIEW_HEIGHT]);
119065
- import_react29.useEffect(() => {
119799
+ import_react32.useEffect(() => {
119066
119800
  return () => {
119067
119801
  if (serverRef.current)
119068
119802
  serverRef.current.stop();
@@ -119286,9 +120020,9 @@ function ScreensView({ projectId, projectTitle, screens, client }) {
119286
120020
  ]
119287
120021
  }, undefined, true, undefined, this);
119288
120022
  }
119289
- var import_react29, jsx_dev_runtime4;
120023
+ var import_react32, jsx_dev_runtime4;
119290
120024
  var init_ScreensView = __esm(async () => {
119291
- import_react29 = __toESM(require_react(), 1);
120025
+ import_react32 = __toESM(require_react(), 1);
119292
120026
  await init_build2();
119293
120027
  init_clipboard();
119294
120028
  init_clipboardy();
@@ -120938,9 +121672,9 @@ var require_cli_spinners = __commonJS((exports, module) => {
120938
121672
 
120939
121673
  // node_modules/ink-spinner/build/index.js
120940
121674
  function Spinner({ type = "dots" }) {
120941
- const [frame, setFrame] = import_react30.useState(0);
121675
+ const [frame, setFrame] = import_react33.useState(0);
120942
121676
  const spinner = import_cli_spinners.default[type];
120943
- import_react30.useEffect(() => {
121677
+ import_react33.useEffect(() => {
120944
121678
  const timer = setInterval(() => {
120945
121679
  setFrame((previousFrame) => {
120946
121680
  const isLastFrame = previousFrame === spinner.frames.length - 1;
@@ -120951,11 +121685,11 @@ function Spinner({ type = "dots" }) {
120951
121685
  clearInterval(timer);
120952
121686
  };
120953
121687
  }, [spinner]);
120954
- return import_react30.default.createElement(Text3, null, spinner.frames[frame]);
121688
+ return import_react33.default.createElement(Text3, null, spinner.frames[frame]);
120955
121689
  }
120956
- var import_react30, import_cli_spinners, build_default;
121690
+ var import_react33, import_cli_spinners, build_default;
120957
121691
  var init_build3 = __esm(async () => {
120958
- import_react30 = __toESM(require_react(), 1);
121692
+ import_react33 = __toESM(require_react(), 1);
120959
121693
  await init_build2();
120960
121694
  import_cli_spinners = __toESM(require_cli_spinners(), 1);
120961
121695
  build_default = Spinner;
@@ -120963,12 +121697,12 @@ var init_build3 = __esm(async () => {
120963
121697
 
120964
121698
  // node_modules/ink-text-input/build/index.js
120965
121699
  function TextInput({ value: originalValue, placeholder = "", focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit }) {
120966
- const [state, setState] = import_react31.useState({
121700
+ const [state, setState] = import_react34.useState({
120967
121701
  cursorOffset: (originalValue || "").length,
120968
121702
  cursorWidth: 0
120969
121703
  });
120970
121704
  const { cursorOffset, cursorWidth } = state;
120971
- import_react31.useEffect(() => {
121705
+ import_react34.useEffect(() => {
120972
121706
  setState((previousState) => {
120973
121707
  if (!focus || !showCursor) {
120974
121708
  return previousState;
@@ -121046,11 +121780,11 @@ function TextInput({ value: originalValue, placeholder = "", focus = true, mask,
121046
121780
  onChange(nextValue);
121047
121781
  }
121048
121782
  }, { isActive: focus });
121049
- return import_react31.default.createElement(Text3, null, placeholder ? value.length > 0 ? renderedValue : renderedPlaceholder : renderedValue);
121783
+ return import_react34.default.createElement(Text3, null, placeholder ? value.length > 0 ? renderedValue : renderedPlaceholder : renderedValue);
121050
121784
  }
121051
- var import_react31, build_default2;
121785
+ var import_react34, build_default2;
121052
121786
  var init_build4 = __esm(async () => {
121053
- import_react31 = __toESM(require_react(), 1);
121787
+ import_react34 = __toESM(require_react(), 1);
121054
121788
  await init_build2();
121055
121789
  init_source();
121056
121790
  build_default2 = TextInput;
@@ -121498,11 +122232,11 @@ var init_p_limit = __esm(() => {
121498
122232
 
121499
122233
  // src/commands/site/hooks/useProjectHydration.ts
121500
122234
  function useProjectHydration(screens, server, syncer, activeScreenId) {
121501
- const [hydrationStatus, setHydrationStatus] = import_react32.useState("idle");
121502
- const [progress, setProgress] = import_react32.useState(0);
121503
- const contentCache = import_react32.useRef(new Map);
121504
- const [htmlContent, setHtmlContent] = import_react32.useState(new Map);
121505
- import_react32.useEffect(() => {
122235
+ const [hydrationStatus, setHydrationStatus] = import_react35.useState("idle");
122236
+ const [progress, setProgress] = import_react35.useState(0);
122237
+ const contentCache = import_react35.useRef(new Map);
122238
+ const [htmlContent, setHtmlContent] = import_react35.useState(new Map);
122239
+ import_react35.useEffect(() => {
121506
122240
  if (!server || screens.length === 0)
121507
122241
  return;
121508
122242
  let mounted = true;
@@ -121562,9 +122296,9 @@ function useProjectHydration(screens, server, syncer, activeScreenId) {
121562
122296
  }, [screens, server, syncer, activeScreenId]);
121563
122297
  return { hydrationStatus, progress, htmlContent };
121564
122298
  }
121565
- var import_react32;
122299
+ var import_react35;
121566
122300
  var init_useProjectHydration = __esm(() => {
121567
- import_react32 = __toESM(require_react(), 1);
122301
+ import_react35 = __toESM(require_react(), 1);
121568
122302
  init_p_limit();
121569
122303
  });
121570
122304
 
@@ -121574,22 +122308,23 @@ __export(exports_SiteBuilder, {
121574
122308
  SiteBuilder: () => SiteBuilder
121575
122309
  });
121576
122310
  import { spawn as spawn8 } from "child_process";
121577
- var import_react33, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit: onExit2 }) => {
122311
+ var import_react36, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit: onExit2 }) => {
121578
122312
  const { exit } = use_app_default();
121579
- const [loading, setLoading] = import_react33.useState(true);
121580
- const [error2, setError] = import_react33.useState(null);
121581
- const [screens, setScreens] = import_react33.useState([]);
121582
- const [showSelectedOnly, setShowSelectedOnly] = import_react33.useState(false);
121583
- const [activeIndex, setActiveIndex] = import_react33.useState(0);
121584
- const [viewMode, setViewMode] = import_react33.useState("default");
121585
- const siteManifest = import_react33.useMemo(() => new SiteManifest(projectId), [projectId]);
121586
- const [isEditingRoute, setIsEditingRoute] = import_react33.useState(false);
121587
- const [routeValue, setRouteValue] = import_react33.useState("");
121588
- const [followMode, setFollowMode] = import_react33.useState(true);
121589
- const [serverUrl, setServerUrl] = import_react33.useState(null);
121590
- const [server, setServer] = import_react33.useState(null);
121591
- const syncer = import_react33.useMemo(() => new ProjectSyncer(client), [client]);
121592
- import_react33.useEffect(() => {
122313
+ const [loading, setLoading] = import_react36.useState(true);
122314
+ const [error2, setError] = import_react36.useState(null);
122315
+ const [screens, setScreens] = import_react36.useState([]);
122316
+ const [showSelectedOnly, setShowSelectedOnly] = import_react36.useState(false);
122317
+ const [activeIndex, setActiveIndex] = import_react36.useState(0);
122318
+ const [viewMode, setViewMode] = import_react36.useState("default");
122319
+ const siteManifest = import_react36.useMemo(() => new SiteManifest(projectId), [projectId]);
122320
+ const [isEditingRoute, setIsEditingRoute] = import_react36.useState(false);
122321
+ const [routeValue, setRouteValue] = import_react36.useState("");
122322
+ const [followMode, setFollowMode] = import_react36.useState(true);
122323
+ const [showAllKeys, setShowAllKeys] = import_react36.useState(false);
122324
+ const [serverUrl, setServerUrl] = import_react36.useState(null);
122325
+ const [server, setServer] = import_react36.useState(null);
122326
+ const syncer = import_react36.useMemo(() => new ProjectSyncer(client), [client]);
122327
+ import_react36.useEffect(() => {
121593
122328
  let mounted = true;
121594
122329
  const srv = new StitchViteServer;
121595
122330
  setServer(srv);
@@ -121623,7 +122358,7 @@ var import_react33, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit
121623
122358
  srv.stop();
121624
122359
  };
121625
122360
  }, [projectId, syncer]);
121626
- const displayList = import_react33.useMemo(() => {
122361
+ const displayList = import_react36.useMemo(() => {
121627
122362
  let list = screens.map((s, i2) => ({ screen: s, sourceIndex: i2 }));
121628
122363
  if (viewMode === "discarded") {
121629
122364
  return list.filter((item) => item.screen.status === "discarded");
@@ -121634,7 +122369,7 @@ var import_react33, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit
121634
122369
  }
121635
122370
  return list;
121636
122371
  }, [screens, viewMode, showSelectedOnly]);
121637
- import_react33.useEffect(() => {
122372
+ import_react36.useEffect(() => {
121638
122373
  setActiveIndex((prev2) => {
121639
122374
  if (displayList.length === 0)
121640
122375
  return 0;
@@ -121644,7 +122379,7 @@ var import_react33, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit
121644
122379
  const activeItem = displayList[activeIndex];
121645
122380
  const activeScreenId = activeItem?.screen.id;
121646
122381
  const { hydrationStatus, progress, htmlContent } = useProjectHydration(screens, server, syncer, activeScreenId);
121647
- import_react33.useEffect(() => {
122382
+ import_react36.useEffect(() => {
121648
122383
  if (server && followMode && hydrationStatus === "ready" && activeScreenId) {
121649
122384
  server.navigate(`/_preview/${activeScreenId}`);
121650
122385
  }
@@ -121759,7 +122494,10 @@ var import_react33, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit
121759
122494
  process.stdout.write(JSON.stringify(exportData, null, 2) + `
121760
122495
  `);
121761
122496
  }
121762
- if (key.escape) {
122497
+ if (input === "?") {
122498
+ setShowAllKeys((prev2) => !prev2);
122499
+ }
122500
+ if (input === "q") {
121763
122501
  onExit2(null);
121764
122502
  exit();
121765
122503
  }
@@ -121928,14 +122666,14 @@ var import_react33, jsx_dev_runtime7, SiteBuilder = ({ projectId, client, onExit
121928
122666
  paddingX: 1,
121929
122667
  children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text3, {
121930
122668
  dimColor: true,
121931
- children: viewMode === "discarded" ? "[↑↓] Navigate [x] Undiscard [d] Back to All [Esc] Quit" : `[↑↓] Navigate [Space] Toggle [Enter] Edit Route [x] Discard [d] View Discarded [t] Filter [f] Follow: ${followMode ? "ON" : "OFF"} [g] Generate [e] Export [Esc] Quit`
122669
+ children: viewMode === "discarded" ? "[x] Undiscard [d] Back to All [q] Quit" : showAllKeys ? `[Space] Toggle [Enter] Edit Route [x] Discard [d] View Discarded [t] Filter [f] Follow: ${followMode ? "ON" : "OFF"} [o] Open [g] Generate [e] Export [q] Quit [?] Less` : "[Space] Toggle [Enter] Edit Route [g] Generate [x] Discard [o] Open [q] Quit [?] More"
121932
122670
  }, undefined, false, undefined, this)
121933
122671
  }, undefined, false, undefined, this)
121934
122672
  ]
121935
122673
  }, undefined, true, undefined, this);
121936
122674
  };
121937
122675
  var init_SiteBuilder = __esm(async () => {
121938
- import_react33 = __toESM(require_react(), 1);
122676
+ import_react36 = __toESM(require_react(), 1);
121939
122677
  await init_build2();
121940
122678
  await init_build3();
121941
122679
  await init_build4();
@@ -122225,7 +122963,7 @@ var init_handler5 = __esm(() => {
122225
122963
  });
122226
122964
 
122227
122965
  // src/services/stitch/handler.ts
122228
- import fs13 from "node:fs";
122966
+ import fs14 from "node:fs";
122229
122967
 
122230
122968
  class StitchHandler {
122231
122969
  getGcloudEnv() {
@@ -122245,7 +122983,7 @@ class StitchHandler {
122245
122983
  const localSdkPath = getGcloudSdkPath();
122246
122984
  const localBinaryPath = joinPath(localSdkPath, "bin", platform3.gcloudBinaryName);
122247
122985
  try {
122248
- await fs13.promises.access(localBinaryPath, fs13.constants.F_OK);
122986
+ await fs14.promises.access(localBinaryPath, fs14.constants.F_OK);
122249
122987
  return localBinaryPath;
122250
122988
  } catch {
122251
122989
  return "gcloud";
@@ -123101,7 +123839,7 @@ class ClientSelectionStep {
123101
123839
  }
123102
123840
 
123103
123841
  // src/commands/init/steps/AuthModeStep.ts
123104
- import fs14 from "node:fs";
123842
+ import fs15 from "node:fs";
123105
123843
  import path12 from "node:path";
123106
123844
 
123107
123845
  class AuthModeStep {
@@ -123127,21 +123865,21 @@ class AuthModeStep {
123127
123865
  STITCH_API_KEY=${inputKey}
123128
123866
  `;
123129
123867
  try {
123130
- if (fs14.existsSync(envPath)) {
123131
- fs14.appendFileSync(envPath, envContent);
123868
+ if (fs15.existsSync(envPath)) {
123869
+ fs15.appendFileSync(envPath, envContent);
123132
123870
  } else {
123133
- fs14.writeFileSync(envPath, envContent);
123871
+ fs15.writeFileSync(envPath, envContent);
123134
123872
  }
123135
123873
  const gitignorePath = path12.join(process.cwd(), ".gitignore");
123136
- if (fs14.existsSync(gitignorePath)) {
123137
- const gitignoreContent = fs14.readFileSync(gitignorePath, "utf8");
123874
+ if (fs15.existsSync(gitignorePath)) {
123875
+ const gitignoreContent = fs15.readFileSync(gitignorePath, "utf8");
123138
123876
  if (!gitignoreContent.includes(".env")) {
123139
- fs14.appendFileSync(gitignorePath, `
123877
+ fs15.appendFileSync(gitignorePath, `
123140
123878
  .env
123141
123879
  `);
123142
123880
  }
123143
123881
  } else {
123144
- fs14.writeFileSync(gitignorePath, `.env
123882
+ fs15.writeFileSync(gitignorePath, `.env
123145
123883
  `);
123146
123884
  }
123147
123885
  } catch (e) {
@@ -123193,10 +123931,10 @@ class GcloudInstallStep {
123193
123931
  }
123194
123932
 
123195
123933
  // src/platform/environment.ts
123196
- import fs15 from "node:fs";
123934
+ import fs16 from "node:fs";
123197
123935
  function detectWSL() {
123198
123936
  try {
123199
- const procVersion = fs15.readFileSync("/proc/version", "utf8").toLowerCase();
123937
+ const procVersion = fs16.readFileSync("/proc/version", "utf8").toLowerCase();
123200
123938
  return procVersion.includes("microsoft") || procVersion.includes("wsl");
123201
123939
  } catch {
123202
123940
  return false;
@@ -123207,7 +123945,7 @@ function detectSSH() {
123207
123945
  }
123208
123946
  function detectDocker() {
123209
123947
  try {
123210
- return fs15.existsSync("/.dockerenv");
123948
+ return fs16.existsSync("/.dockerenv");
123211
123949
  } catch {
123212
123950
  return false;
123213
123951
  }
@@ -123553,12 +124291,12 @@ var init_onetime = __esm(() => {
123553
124291
  });
123554
124292
 
123555
124293
  // node_modules/ora/node_modules/restore-cursor/index.js
123556
- import process29 from "node:process";
124294
+ import process30 from "node:process";
123557
124295
  var terminal, restoreCursor2, restore_cursor_default2;
123558
124296
  var init_restore_cursor2 = __esm(() => {
123559
124297
  init_onetime();
123560
124298
  init_mjs();
123561
- terminal = process29.stderr.isTTY ? process29.stderr : process29.stdout.isTTY ? process29.stdout : undefined;
124299
+ terminal = process30.stderr.isTTY ? process30.stderr : process30.stdout.isTTY ? process30.stdout : undefined;
123562
124300
  restoreCursor2 = terminal ? onetime_default(() => {
123563
124301
  onExit(() => {
123564
124302
  terminal.write("\x1B[?25h");
@@ -123568,19 +124306,19 @@ var init_restore_cursor2 = __esm(() => {
123568
124306
  });
123569
124307
 
123570
124308
  // node_modules/ora/node_modules/cli-cursor/index.js
123571
- import process30 from "node:process";
124309
+ import process31 from "node:process";
123572
124310
  var isHidden2 = false, cliCursor2, cli_cursor_default2;
123573
124311
  var init_cli_cursor2 = __esm(() => {
123574
124312
  init_restore_cursor2();
123575
124313
  cliCursor2 = {};
123576
- cliCursor2.show = (writableStream = process30.stderr) => {
124314
+ cliCursor2.show = (writableStream = process31.stderr) => {
123577
124315
  if (!writableStream.isTTY) {
123578
124316
  return;
123579
124317
  }
123580
124318
  isHidden2 = false;
123581
124319
  writableStream.write("\x1B[?25h");
123582
124320
  };
123583
- cliCursor2.hide = (writableStream = process30.stderr) => {
124321
+ cliCursor2.hide = (writableStream = process31.stderr) => {
123584
124322
  if (!writableStream.isTTY) {
123585
124323
  return;
123586
124324
  }
@@ -123602,12 +124340,12 @@ var init_cli_cursor2 = __esm(() => {
123602
124340
  });
123603
124341
 
123604
124342
  // node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/index.js
123605
- import process31 from "node:process";
124343
+ import process32 from "node:process";
123606
124344
  function isUnicodeSupported3() {
123607
- if (process31.platform !== "win32") {
123608
- return process31.env.TERM !== "linux";
124345
+ if (process32.platform !== "win32") {
124346
+ return process32.env.TERM !== "linux";
123609
124347
  }
123610
- return Boolean(process31.env.CI) || Boolean(process31.env.WT_SESSION) || Boolean(process31.env.TERMINUS_SUBLIME) || process31.env.ConEmuTask === "{cmd::Cmder}" || process31.env.TERM_PROGRAM === "Terminus-Sublime" || process31.env.TERM_PROGRAM === "vscode" || process31.env.TERM === "xterm-256color" || process31.env.TERM === "alacritty" || process31.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
124348
+ return Boolean(process32.env.CI) || Boolean(process32.env.WT_SESSION) || Boolean(process32.env.TERMINUS_SUBLIME) || process32.env.ConEmuTask === "{cmd::Cmder}" || process32.env.TERM_PROGRAM === "Terminus-Sublime" || process32.env.TERM_PROGRAM === "vscode" || process32.env.TERM === "xterm-256color" || process32.env.TERM === "alacritty" || process32.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
123611
124349
  }
123612
124350
  var init_is_unicode_supported2 = () => {};
123613
124351
 
@@ -123633,7 +124371,7 @@ var init_log_symbols = __esm(() => {
123633
124371
  });
123634
124372
 
123635
124373
  // node_modules/ora/node_modules/ansi-regex/index.js
123636
- function ansiRegex5({ onlyFirst = false } = {}) {
124374
+ function ansiRegex4({ onlyFirst = false } = {}) {
123637
124375
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
123638
124376
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
123639
124377
  const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
@@ -123642,26 +124380,26 @@ function ansiRegex5({ onlyFirst = false } = {}) {
123642
124380
  }
123643
124381
 
123644
124382
  // node_modules/ora/node_modules/strip-ansi/index.js
123645
- function stripAnsi4(string5) {
124383
+ function stripAnsi3(string5) {
123646
124384
  if (typeof string5 !== "string") {
123647
124385
  throw new TypeError(`Expected a \`string\`, got \`${typeof string5}\``);
123648
124386
  }
123649
- return string5.replace(regex4, "");
124387
+ return string5.replace(regex3, "");
123650
124388
  }
123651
- var regex4;
123652
- var init_strip_ansi4 = __esm(() => {
123653
- regex4 = ansiRegex5();
124389
+ var regex3;
124390
+ var init_strip_ansi3 = __esm(() => {
124391
+ regex3 = ansiRegex4();
123654
124392
  });
123655
124393
 
123656
124394
  // node_modules/ora/node_modules/emoji-regex/index.js
123657
- var require_emoji_regex3 = __commonJS((exports, module) => {
124395
+ var require_emoji_regex2 = __commonJS((exports, module) => {
123658
124396
  module.exports = () => {
123659
124397
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
123660
124398
  };
123661
124399
  });
123662
124400
 
123663
124401
  // node_modules/ora/node_modules/string-width/index.js
123664
- function stringWidth4(string5, options = {}) {
124402
+ function stringWidth3(string5, options = {}) {
123665
124403
  if (typeof string5 !== "string" || string5.length === 0) {
123666
124404
  return 0;
123667
124405
  }
@@ -123670,14 +124408,14 @@ function stringWidth4(string5, options = {}) {
123670
124408
  countAnsiEscapeCodes = false
123671
124409
  } = options;
123672
124410
  if (!countAnsiEscapeCodes) {
123673
- string5 = stripAnsi4(string5);
124411
+ string5 = stripAnsi3(string5);
123674
124412
  }
123675
124413
  if (string5.length === 0) {
123676
124414
  return 0;
123677
124415
  }
123678
124416
  let width = 0;
123679
124417
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
123680
- for (const { segment: character } of segmenter4.segment(string5)) {
124418
+ for (const { segment: character } of segmenter3.segment(string5)) {
123681
124419
  const codePoint = character.codePointAt(0);
123682
124420
  if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
123683
124421
  continue;
@@ -123694,10 +124432,10 @@ function stringWidth4(string5, options = {}) {
123694
124432
  if (codePoint >= 65024 && codePoint <= 65039) {
123695
124433
  continue;
123696
124434
  }
123697
- if (defaultIgnorableCodePointRegex3.test(character)) {
124435
+ if (defaultIgnorableCodePointRegex2.test(character)) {
123698
124436
  continue;
123699
124437
  }
123700
- if (import_emoji_regex3.default().test(character)) {
124438
+ if (import_emoji_regex2.default().test(character)) {
123701
124439
  width += 2;
123702
124440
  continue;
123703
124441
  }
@@ -123705,13 +124443,13 @@ function stringWidth4(string5, options = {}) {
123705
124443
  }
123706
124444
  return width;
123707
124445
  }
123708
- var import_emoji_regex3, segmenter4, defaultIgnorableCodePointRegex3;
123709
- var init_string_width4 = __esm(() => {
123710
- init_strip_ansi4();
124446
+ var import_emoji_regex2, segmenter3, defaultIgnorableCodePointRegex2;
124447
+ var init_string_width3 = __esm(() => {
124448
+ init_strip_ansi3();
123711
124449
  init_get_east_asian_width();
123712
- import_emoji_regex3 = __toESM(require_emoji_regex3(), 1);
123713
- segmenter4 = new Intl.Segmenter;
123714
- defaultIgnorableCodePointRegex3 = /^\p{Default_Ignorable_Code_Point}$/u;
124450
+ import_emoji_regex2 = __toESM(require_emoji_regex2(), 1);
124451
+ segmenter3 = new Intl.Segmenter;
124452
+ defaultIgnorableCodePointRegex2 = /^\p{Default_Ignorable_Code_Point}$/u;
123715
124453
  });
123716
124454
 
123717
124455
  // node_modules/is-interactive/index.js
@@ -123720,7 +124458,7 @@ function isInteractive({ stream = process.stdout } = {}) {
123720
124458
  }
123721
124459
 
123722
124460
  // node_modules/stdin-discarder/index.js
123723
- import process32 from "node:process";
124461
+ import process33 from "node:process";
123724
124462
 
123725
124463
  class StdinDiscarder {
123726
124464
  #activeCount = 0;
@@ -123740,24 +124478,24 @@ class StdinDiscarder {
123740
124478
  }
123741
124479
  }
123742
124480
  #realStart() {
123743
- if (process32.platform === "win32" || !process32.stdin.isTTY) {
124481
+ if (process33.platform === "win32" || !process33.stdin.isTTY) {
123744
124482
  return;
123745
124483
  }
123746
- process32.stdin.setRawMode(true);
123747
- process32.stdin.on("data", this.#handleInput);
123748
- process32.stdin.resume();
124484
+ process33.stdin.setRawMode(true);
124485
+ process33.stdin.on("data", this.#handleInput);
124486
+ process33.stdin.resume();
123749
124487
  }
123750
124488
  #realStop() {
123751
- if (!process32.stdin.isTTY) {
124489
+ if (!process33.stdin.isTTY) {
123752
124490
  return;
123753
124491
  }
123754
- process32.stdin.off("data", this.#handleInput);
123755
- process32.stdin.pause();
123756
- process32.stdin.setRawMode(false);
124492
+ process33.stdin.off("data", this.#handleInput);
124493
+ process33.stdin.pause();
124494
+ process33.stdin.setRawMode(false);
123757
124495
  }
123758
124496
  #handleInput(chunk) {
123759
124497
  if (chunk[0] === ASCII_ETX_CODE) {
123760
- process32.emit("SIGINT");
124498
+ process33.emit("SIGINT");
123761
124499
  }
123762
124500
  }
123763
124501
  }
@@ -123768,7 +124506,7 @@ var init_stdin_discarder = __esm(() => {
123768
124506
  });
123769
124507
 
123770
124508
  // node_modules/ora/index.js
123771
- import process33 from "node:process";
124509
+ import process34 from "node:process";
123772
124510
 
123773
124511
  class Ora {
123774
124512
  #linesToClear = 0;
@@ -123796,7 +124534,7 @@ class Ora {
123796
124534
  }
123797
124535
  this.#options = {
123798
124536
  color: "cyan",
123799
- stream: process33.stderr,
124537
+ stream: process34.stderr,
123800
124538
  discardStdin: true,
123801
124539
  hideCursor: true,
123802
124540
  ...options
@@ -123811,7 +124549,7 @@ class Ora {
123811
124549
  this.prefixText = this.#options.prefixText;
123812
124550
  this.suffixText = this.#options.suffixText;
123813
124551
  this.indent = this.#options.indent;
123814
- if (process33.env.NODE_ENV === "test") {
124552
+ if (process34.env.NODE_ENV === "test") {
123815
124553
  this._stream = this.#stream;
123816
124554
  this._isEnabled = this.#isEnabled;
123817
124555
  Object.defineProperty(this, "_linesToClear", {
@@ -123916,9 +124654,9 @@ class Ora {
123916
124654
  const fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-");
123917
124655
  const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
123918
124656
  this.#lineCount = 0;
123919
- for (const line of stripAnsi4(fullText).split(`
124657
+ for (const line of stripAnsi3(fullText).split(`
123920
124658
  `)) {
123921
- this.#lineCount += Math.max(1, Math.ceil(stringWidth4(line, { countAnsiEscapeCodes: true }) / columns));
124659
+ this.#lineCount += Math.max(1, Math.ceil(stringWidth3(line, { countAnsiEscapeCodes: true }) / columns));
123922
124660
  }
123923
124661
  }
123924
124662
  get isEnabled() {
@@ -124002,7 +124740,7 @@ class Ora {
124002
124740
  if (this.#options.hideCursor) {
124003
124741
  cli_cursor_default2.hide(this.#stream);
124004
124742
  }
124005
- if (this.#options.discardStdin && process33.stdin.isTTY) {
124743
+ if (this.#options.discardStdin && process34.stdin.isTTY) {
124006
124744
  this.#isDiscardingStdin = true;
124007
124745
  stdin_discarder_default.start();
124008
124746
  }
@@ -124021,7 +124759,7 @@ class Ora {
124021
124759
  if (this.#options.hideCursor) {
124022
124760
  cli_cursor_default2.show(this.#stream);
124023
124761
  }
124024
- if (this.#options.discardStdin && process33.stdin.isTTY && this.#isDiscardingStdin) {
124762
+ if (this.#options.discardStdin && process34.stdin.isTTY && this.#isDiscardingStdin) {
124025
124763
  stdin_discarder_default.stop();
124026
124764
  this.#isDiscardingStdin = false;
124027
124765
  }
@@ -124067,8 +124805,8 @@ var init_ora = __esm(() => {
124067
124805
  init_cli_cursor2();
124068
124806
  import_cli_spinners2 = __toESM(require_cli_spinners(), 1);
124069
124807
  init_log_symbols();
124070
- init_strip_ansi4();
124071
- init_string_width4();
124808
+ init_strip_ansi3();
124809
+ init_string_width3();
124072
124810
  init_is_unicode_supported();
124073
124811
  init_stdin_discarder();
124074
124812
  import_cli_spinners3 = __toESM(require_cli_spinners(), 1);
@@ -124111,7 +124849,7 @@ var init_spinner = __esm(() => {
124111
124849
  });
124112
124850
 
124113
124851
  // src/commands/init/steps/ConfigStep.ts
124114
- import fs16 from "node:fs";
124852
+ import fs17 from "node:fs";
124115
124853
  import os6 from "node:os";
124116
124854
  import path14 from "node:path";
124117
124855
 
@@ -124144,7 +124882,7 @@ class ConfigStep {
124144
124882
  async setupGeminiExtension(context) {
124145
124883
  const spinner = createSpinner();
124146
124884
  const extensionPath = path14.join(os6.homedir(), ".gemini", "extensions", "Stitch", "gemini-extension.json");
124147
- const isInstalled = fs16.existsSync(extensionPath);
124885
+ const isInstalled = fs17.existsSync(extensionPath);
124148
124886
  if (isInstalled) {
124149
124887
  spinner.succeed("Stitch extension is already installed");
124150
124888
  } else {
@@ -124163,13 +124901,13 @@ class ConfigStep {
124163
124901
  }
124164
124902
  }
124165
124903
  spinner.start("Configuring extension...");
124166
- if (!fs16.existsSync(extensionPath)) {
124904
+ if (!fs17.existsSync(extensionPath)) {
124167
124905
  spinner.fail("Extension configuration file not found");
124168
124906
  context.ui.log(theme.gray(` Expected path: ${extensionPath}`));
124169
124907
  return;
124170
124908
  }
124171
124909
  try {
124172
- const content = fs16.readFileSync(extensionPath, "utf8");
124910
+ const content = fs17.readFileSync(extensionPath, "utf8");
124173
124911
  const config2 = JSON.parse(content);
124174
124912
  if (!config2.mcpServers?.stitch) {
124175
124913
  spinner.fail("Invalid extension configuration format detected");
@@ -124189,7 +124927,7 @@ class ConfigStep {
124189
124927
  args: ["@_davideast/stitch-mcp", "proxy"],
124190
124928
  env: env4
124191
124929
  };
124192
- fs16.writeFileSync(extensionPath, JSON.stringify(config2, null, 4));
124930
+ fs17.writeFileSync(extensionPath, JSON.stringify(config2, null, 4));
124193
124931
  const successMsg = context.apiKey ? "Stitch extension configured for STDIO with API Key" : `Stitch extension configured for STDIO: Project ID set to ${theme.blue(context.projectId)}`;
124194
124932
  spinner.succeed(successMsg);
124195
124933
  } else {
@@ -124206,7 +124944,7 @@ class ConfigStep {
124206
124944
  delete config2.mcpServers.stitch.headers["Authorization"];
124207
124945
  if (config2.mcpServers.stitch.headers["X-Goog-User-Project"])
124208
124946
  delete config2.mcpServers.stitch.headers["X-Goog-User-Project"];
124209
- fs16.writeFileSync(extensionPath, JSON.stringify(config2, null, 4));
124947
+ fs17.writeFileSync(extensionPath, JSON.stringify(config2, null, 4));
124210
124948
  spinner.succeed(`Stitch extension configured for HTTP with API Key`);
124211
124949
  } else {
124212
124950
  config2.mcpServers.stitch = {
@@ -124217,7 +124955,7 @@ class ConfigStep {
124217
124955
  "X-Goog-User-Project": context.projectId
124218
124956
  }
124219
124957
  };
124220
- fs16.writeFileSync(extensionPath, JSON.stringify(config2, null, 4));
124958
+ fs17.writeFileSync(extensionPath, JSON.stringify(config2, null, 4));
124221
124959
  spinner.succeed(`Stitch extension configured for HTTP: Project ID set to ${theme.blue(context.projectId)}`);
124222
124960
  }
124223
124961
  }
@@ -124498,7 +125236,7 @@ var require_package = __commonJS((exports, module) => {
124498
125236
 
124499
125237
  // node_modules/dotenv/lib/main.js
124500
125238
  var require_main2 = __commonJS((exports, module) => {
124501
- var fs17 = __require("fs");
125239
+ var fs18 = __require("fs");
124502
125240
  var path15 = __require("path");
124503
125241
  var os7 = __require("os");
124504
125242
  var crypto4 = __require("crypto");
@@ -124642,7 +125380,7 @@ var require_main2 = __commonJS((exports, module) => {
124642
125380
  if (options && options.path && options.path.length > 0) {
124643
125381
  if (Array.isArray(options.path)) {
124644
125382
  for (const filepath of options.path) {
124645
- if (fs17.existsSync(filepath)) {
125383
+ if (fs18.existsSync(filepath)) {
124646
125384
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
124647
125385
  }
124648
125386
  }
@@ -124652,7 +125390,7 @@ var require_main2 = __commonJS((exports, module) => {
124652
125390
  } else {
124653
125391
  possibleVaultPath = path15.resolve(process.cwd(), ".env.vault");
124654
125392
  }
124655
- if (fs17.existsSync(possibleVaultPath)) {
125393
+ if (fs18.existsSync(possibleVaultPath)) {
124656
125394
  return possibleVaultPath;
124657
125395
  }
124658
125396
  return null;
@@ -124705,7 +125443,7 @@ var require_main2 = __commonJS((exports, module) => {
124705
125443
  const parsedAll = {};
124706
125444
  for (const path16 of optionPaths) {
124707
125445
  try {
124708
- const parsed = DotenvModule.parse(fs17.readFileSync(path16, { encoding }));
125446
+ const parsed = DotenvModule.parse(fs18.readFileSync(path16, { encoding }));
124709
125447
  DotenvModule.populate(parsedAll, parsed, options);
124710
125448
  } catch (e) {
124711
125449
  if (debug) {
@@ -125555,10 +126293,10 @@ var init_stdio2 = __esm(() => {
125555
126293
  });
125556
126294
 
125557
126295
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
125558
- import process34 from "node:process";
126296
+ import process35 from "node:process";
125559
126297
 
125560
126298
  class StdioServerTransport {
125561
- constructor(_stdin = process34.stdin, _stdout = process34.stdout) {
126299
+ constructor(_stdin = process35.stdin, _stdout = process35.stdout) {
125562
126300
  this._stdin = _stdin;
125563
126301
  this._stdout = _stdout;
125564
126302
  this._readBuffer = new ReadBuffer;
@@ -126133,9 +126871,9 @@ class SnapshotHandler {
126133
126871
  const mockClient = new MockStitchMCPClient2(mockScreens);
126134
126872
  try {
126135
126873
  const { render: render5 } = await init_build5().then(() => exports_build2);
126136
- const React17 = await Promise.resolve().then(() => __toESM(require_react(), 1));
126874
+ const React18 = await Promise.resolve().then(() => __toESM(require_react(), 1));
126137
126875
  const projectId = data2.inputArgs?.projectId || "mock-project";
126138
- const { lastFrame, unmount } = render5(React17.createElement(SiteBuilder2, {
126876
+ const { lastFrame, unmount } = render5(React18.createElement(SiteBuilder2, {
126139
126877
  projectId,
126140
126878
  client: mockClient,
126141
126879
  onExit: () => {}
@@ -126321,7 +127059,7 @@ var command3 = {
126321
127059
  const { ServeView: ServeView2 } = await init_ServeView().then(() => exports_ServeView);
126322
127060
  const { StitchMCPClient: StitchMCPClient2 } = await Promise.resolve().then(() => (init_client3(), exports_client));
126323
127061
  const { render: render4 } = await init_build2().then(() => exports_build);
126324
- const React13 = await Promise.resolve().then(() => __toESM(require_react(), 1));
127062
+ const React14 = await Promise.resolve().then(() => __toESM(require_react(), 1));
126325
127063
  const client = new StitchMCPClient2;
126326
127064
  const handler2 = new ServeHandler2(client);
126327
127065
  const result = await handler2.execute(options.project);
@@ -126335,7 +127073,7 @@ ${icons.error} Failed: ${result.error}`));
126335
127073
  ${icons.warning} No screens with HTML code found in this project.`));
126336
127074
  process.exit(0);
126337
127075
  }
126338
- const createElement = React13.createElement || React13.default.createElement;
127076
+ const createElement = React14.createElement || React14.default.createElement;
126339
127077
  const instance = render4(createElement(ServeView2, {
126340
127078
  projectId: result.projectId,
126341
127079
  projectTitle: result.projectTitle,
@@ -126365,7 +127103,7 @@ var command4 = {
126365
127103
  const { ScreensView: ScreensView2 } = await init_ScreensView().then(() => exports_ScreensView);
126366
127104
  const { StitchMCPClient: StitchMCPClient2 } = await Promise.resolve().then(() => (init_client3(), exports_client));
126367
127105
  const { render: render4 } = await init_build2().then(() => exports_build);
126368
- const React14 = await Promise.resolve().then(() => __toESM(require_react(), 1));
127106
+ const React15 = await Promise.resolve().then(() => __toESM(require_react(), 1));
126369
127107
  const client = new StitchMCPClient2;
126370
127108
  const handler2 = new ScreensHandler2(client);
126371
127109
  const result = await handler2.execute(options.project);
@@ -126374,7 +127112,7 @@ var command4 = {
126374
127112
  ${icons.error} Failed: ${result.error}`));
126375
127113
  process.exit(1);
126376
127114
  }
126377
- const createElement = React14.createElement || React14.default.createElement;
127115
+ const createElement = React15.createElement || React15.default.createElement;
126378
127116
  const instance = render4(createElement(ScreensView2, {
126379
127117
  projectId: result.projectId,
126380
127118
  projectTitle: result.projectTitle,