webmux 0.30.0 → 0.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/webmux.js CHANGED
@@ -440,6 +440,7 @@ _webmux() {
440
440
  'close:Close a worktree session'
441
441
  'archive:Hide a worktree from the default list'
442
442
  'unarchive:Show an archived worktree again'
443
+ 'label:Set or clear a workspace label'
443
444
  'remove:Remove a worktree'
444
445
  'merge:Merge a worktree into main'
445
446
  'send:Send a prompt to a running worktree agent'
@@ -453,7 +454,7 @@ _webmux() {
453
454
  fi
454
455
 
455
456
  case "\${words[2]}" in
456
- open|close|archive|unarchive|remove|merge|send)
457
+ open|close|archive|unarchive|label|remove|merge|send)
457
458
  if (( CURRENT == 3 )); then
458
459
  local -a branches
459
460
  branches=(\${(f)"$(webmux --completions "\${words[2]}" 2>/dev/null)"})
@@ -491,12 +492,12 @@ compdef _webmux webmux`, BASH_SCRIPT = `_webmux() {
491
492
  prev="\${COMP_WORDS[COMP_CWORD-1]}"
492
493
 
493
494
  if [[ \${COMP_CWORD} -eq 1 ]]; then
494
- COMPREPLY=($(compgen -W "serve init service update add list open close archive unarchive remove merge send prune completion" -- "\${cur}"))
495
+ COMPREPLY=($(compgen -W "serve init service update add list open close archive unarchive label remove merge send prune completion" -- "\${cur}"))
495
496
  return
496
497
  fi
497
498
 
498
499
  case "\${COMP_WORDS[1]}" in
499
- open|close|archive|unarchive|remove|merge|send)
500
+ open|close|archive|unarchive|label|remove|merge|send)
500
501
  if [[ \${COMP_CWORD} -eq 2 ]]; then
501
502
  local branches
502
503
  branches=$(webmux --completions "\${COMP_WORDS[1]}" 2>/dev/null)
@@ -519,32 +520,49 @@ compdef _webmux webmux`, BASH_SCRIPT = `_webmux() {
519
520
  complete -F _webmux webmux`;
520
521
  var init_completions = __esm(() => {
521
522
  init_git();
522
- BRANCH_SUBCOMMANDS = new Set(["open", "close", "archive", "unarchive", "remove", "merge", "send"]);
523
+ BRANCH_SUBCOMMANDS = new Set(["open", "close", "archive", "unarchive", "label", "remove", "merge", "send"]);
523
524
  });
524
525
 
525
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
526
- var isAmbiguous = (x) => {
527
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
528
- }, isFullWidth = (x) => {
526
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
527
+ var getCodePointsLength, isFullWidth = (x) => {
529
528
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
530
- }, isWide = (x) => {
531
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
529
+ }, isWideNotCJKTNotEmoji = (x) => {
530
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
532
531
  };
533
- var init_utils = () => {};
532
+ var init_utils = __esm(() => {
533
+ getCodePointsLength = (() => {
534
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
535
+ return (input) => {
536
+ let surrogatePairsNr = 0;
537
+ SURROGATE_PAIR_RE.lastIndex = 0;
538
+ while (SURROGATE_PAIR_RE.test(input)) {
539
+ surrogatePairsNr += 1;
540
+ }
541
+ return input.length - surrogatePairsNr;
542
+ };
543
+ })();
544
+ });
534
545
 
535
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
536
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
546
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
547
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
537
548
  const LIMIT = truncationOptions.limit ?? Infinity;
538
549
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
539
550
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
540
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
551
+ const ANSI_WIDTH = 0;
541
552
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
542
553
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
543
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
544
554
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
545
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
555
+ const FULL_WIDTH_WIDTH = 2;
546
556
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
547
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
557
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
558
+ const PARSE_BLOCKS = [
559
+ [LATIN_RE, REGULAR_WIDTH],
560
+ [ANSI_RE, ANSI_WIDTH],
561
+ [CONTROL_RE, CONTROL_WIDTH],
562
+ [TAB_RE, TAB_WIDTH],
563
+ [EMOJI_RE, EMOJI_WIDTH],
564
+ [CJKT_WIDE_RE, WIDE_WIDTH]
565
+ ];
548
566
  let indexPrev = 0;
549
567
  let index = 0;
550
568
  let length = input.length;
@@ -565,10 +583,8 @@ var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION,
565
583
  const codePoint = char.codePointAt(0) || 0;
566
584
  if (isFullWidth(codePoint)) {
567
585
  widthExtra = FULL_WIDTH_WIDTH;
568
- } else if (isWide(codePoint)) {
586
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
569
587
  widthExtra = WIDE_WIDTH;
570
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
571
- widthExtra = AMBIGUOUS_WIDTH;
572
588
  } else {
573
589
  widthExtra = REGULAR_WIDTH;
574
590
  }
@@ -584,88 +600,28 @@ var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION,
584
600
  }
585
601
  unmatchedStart = unmatchedEnd = 0;
586
602
  }
587
- if (index >= length)
588
- break;
589
- LATIN_RE.lastIndex = index;
590
- if (LATIN_RE.test(input)) {
591
- lengthExtra = LATIN_RE.lastIndex - index;
592
- widthExtra = lengthExtra * REGULAR_WIDTH;
593
- if (width + widthExtra > truncationLimit) {
594
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
595
- }
596
- if (width + widthExtra > LIMIT) {
597
- truncationEnabled = true;
598
- break;
599
- }
600
- width += widthExtra;
601
- unmatchedStart = indexPrev;
602
- unmatchedEnd = index;
603
- index = indexPrev = LATIN_RE.lastIndex;
604
- continue;
605
- }
606
- ANSI_RE.lastIndex = index;
607
- if (ANSI_RE.test(input)) {
608
- if (width + ANSI_WIDTH > truncationLimit) {
609
- truncationIndex = Math.min(truncationIndex, index);
610
- }
611
- if (width + ANSI_WIDTH > LIMIT) {
612
- truncationEnabled = true;
613
- break;
614
- }
615
- width += ANSI_WIDTH;
616
- unmatchedStart = indexPrev;
617
- unmatchedEnd = index;
618
- index = indexPrev = ANSI_RE.lastIndex;
619
- continue;
620
- }
621
- CONTROL_RE.lastIndex = index;
622
- if (CONTROL_RE.test(input)) {
623
- lengthExtra = CONTROL_RE.lastIndex - index;
624
- widthExtra = lengthExtra * CONTROL_WIDTH;
625
- if (width + widthExtra > truncationLimit) {
626
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
627
- }
628
- if (width + widthExtra > LIMIT) {
629
- truncationEnabled = true;
630
- break;
631
- }
632
- width += widthExtra;
633
- unmatchedStart = indexPrev;
634
- unmatchedEnd = index;
635
- index = indexPrev = CONTROL_RE.lastIndex;
636
- continue;
603
+ if (index >= length) {
604
+ break outer;
637
605
  }
638
- TAB_RE.lastIndex = index;
639
- if (TAB_RE.test(input)) {
640
- lengthExtra = TAB_RE.lastIndex - index;
641
- widthExtra = lengthExtra * TAB_WIDTH;
642
- if (width + widthExtra > truncationLimit) {
643
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
644
- }
645
- if (width + widthExtra > LIMIT) {
646
- truncationEnabled = true;
647
- break;
648
- }
649
- width += widthExtra;
650
- unmatchedStart = indexPrev;
651
- unmatchedEnd = index;
652
- index = indexPrev = TAB_RE.lastIndex;
653
- continue;
654
- }
655
- EMOJI_RE.lastIndex = index;
656
- if (EMOJI_RE.test(input)) {
657
- if (width + EMOJI_WIDTH > truncationLimit) {
658
- truncationIndex = Math.min(truncationIndex, index);
659
- }
660
- if (width + EMOJI_WIDTH > LIMIT) {
661
- truncationEnabled = true;
662
- break;
606
+ for (let i = 0, l = PARSE_BLOCKS.length;i < l; i++) {
607
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
608
+ BLOCK_RE.lastIndex = index;
609
+ if (BLOCK_RE.test(input)) {
610
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
611
+ widthExtra = lengthExtra * BLOCK_WIDTH;
612
+ if (width + widthExtra > truncationLimit) {
613
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
614
+ }
615
+ if (width + widthExtra > LIMIT) {
616
+ truncationEnabled = true;
617
+ break outer;
618
+ }
619
+ width += widthExtra;
620
+ unmatchedStart = indexPrev;
621
+ unmatchedEnd = index;
622
+ index = indexPrev = BLOCK_RE.lastIndex;
623
+ continue outer;
663
624
  }
664
- width += EMOJI_WIDTH;
665
- unmatchedStart = indexPrev;
666
- unmatchedEnd = index;
667
- index = indexPrev = EMOJI_RE.lastIndex;
668
- continue;
669
625
  }
670
626
  index += 1;
671
627
  }
@@ -678,8 +634,9 @@ var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION,
678
634
  }, dist_default;
679
635
  var init_dist = __esm(() => {
680
636
  init_utils();
681
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
637
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
682
638
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
639
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
683
640
  TAB_RE = /\t{1,1000}/y;
684
641
  EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
685
642
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -688,7 +645,7 @@ var init_dist = __esm(() => {
688
645
  dist_default = getStringTruncatedWidth;
689
646
  });
690
647
 
691
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
648
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
692
649
  var NO_TRUNCATION2, fastStringWidth = (input, options = {}) => {
693
650
  return dist_default(input, NO_TRUNCATION2, options).width;
694
651
  }, dist_default2;
@@ -702,7 +659,7 @@ var init_dist2 = __esm(() => {
702
659
  dist_default2 = fastStringWidth;
703
660
  });
704
661
 
705
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
662
+ // node_modules/.bun/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
706
663
  function wrapAnsi(string, columns, options) {
707
664
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join(`
708
665
  `);
@@ -860,8 +817,11 @@ var ESC = "\x1B", CSI = "\x9B", END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_C
860
817
  returnValue += character;
861
818
  if (!inSurrogate) {
862
819
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
820
+ if (inSurrogate) {
821
+ continue;
822
+ }
863
823
  } else {
864
- continue;
824
+ inSurrogate = false;
865
825
  }
866
826
  if (character === ESC || character === CSI) {
867
827
  GROUP_REGEX.lastIndex = i + 1;
@@ -960,96 +920,118 @@ var require_src = __commonJS((exports, module) => {
960
920
  module.exports = { cursor, scroll, erase, beep };
961
921
  });
962
922
 
963
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
964
- import { styleText as y } from "util";
965
- import { stdout as S, stdin as $ } from "process";
966
- import P from "readline";
967
- function d(r, t, e) {
968
- if (!e.some((o) => !o.disabled))
923
+ // node_modules/.bun/@clack+core@1.3.1/node_modules/@clack/core/dist/index.mjs
924
+ import { styleText as v } from "util";
925
+ import { stdout as x, stdin as D } from "process";
926
+ import E from "readline";
927
+ function f(r, t, s) {
928
+ if (!s.some((o) => !o.disabled))
969
929
  return r;
970
- const s = r + t, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
971
- return e[n].disabled ? d(n, t < 0 ? -1 : 1, e) : n;
930
+ const e = r + t, i = Math.max(s.length - 1, 0), n = e < 0 ? i : e > i ? 0 : e;
931
+ return s[n].disabled ? f(n, t < 0 ? -1 : 1, s) : n;
972
932
  }
973
- function V(r, t) {
933
+ function I(r, t, s, e) {
934
+ const i = e.split(`
935
+ `);
936
+ let n = 0, o = r;
937
+ for (const a of i) {
938
+ if (o <= a.length)
939
+ break;
940
+ o -= a.length + 1, n++;
941
+ }
942
+ for (n = Math.max(0, Math.min(i.length - 1, n + s)), o = Math.min(o, i[n].length) + t;o < 0 && n > 0; )
943
+ n--, o += i[n].length + 1;
944
+ for (;o > i[n].length && n < i.length - 1; )
945
+ o -= i[n].length + 1, n++;
946
+ o = Math.max(0, Math.min(i[n].length, o));
947
+ let u = 0;
948
+ for (let a = 0;a < n; a++)
949
+ u += i[a].length + 1;
950
+ return u + o;
951
+ }
952
+ function C(r, t) {
974
953
  if (typeof r == "string")
975
- return u.aliases.get(r) === t;
976
- for (const e of r)
977
- if (e !== undefined && V(e, t))
954
+ return h.aliases.get(r) === t;
955
+ for (const s of r)
956
+ if (s !== undefined && C(s, t))
978
957
  return true;
979
958
  return false;
980
959
  }
981
- function j(r, t) {
960
+ function z(r, t) {
982
961
  if (r === t)
983
962
  return;
984
- const e = r.split(`
985
- `), s = t.split(`
986
- `), i = Math.max(e.length, s.length), n = [];
963
+ const s = r.split(`
964
+ `), e = t.split(`
965
+ `), i = Math.max(s.length, e.length), n = [];
987
966
  for (let o = 0;o < i; o++)
988
- e[o] !== s[o] && n.push(o);
989
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
967
+ s[o] !== e[o] && n.push(o);
968
+ return { lines: n, numLinesBefore: s.length, numLinesAfter: e.length, numLines: i };
990
969
  }
991
970
  function q(r) {
992
- return r === C;
971
+ return r === k;
993
972
  }
994
973
  function w(r, t) {
995
- const e = r;
996
- e.isTTY && e.setRawMode(t);
997
- }
998
- function R(r, t, e, s = e) {
999
- const i = O(r ?? S);
1000
- return wrapAnsi(t, i - e.length, { hard: true, trim: false }).split(`
1001
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
974
+ const s = r;
975
+ s.isTTY && s.setRawMode(t);
976
+ }
977
+ function W(r, t, s, e = s, i = s, n) {
978
+ const o = A(r ?? x);
979
+ return wrapAnsi(t, o - s.length, { hard: true, trim: false }).split(`
980
+ `).map((u, a, l) => {
981
+ const c = n ? n(u, a) : u;
982
+ return a === 0 ? `${e}${c}` : a === l.length - 1 ? `${i}${c}` : `${s}${c}`;
983
+ }).join(`
1002
984
  `);
1003
985
  }
1004
- function W(r, t) {
986
+ function B(r, t) {
1005
987
  if (r === undefined || t.length === 0)
1006
988
  return 0;
1007
- const e = t.findIndex((s) => s.value === r);
1008
- return e !== -1 ? e : 0;
989
+ const s = t.findIndex((e) => e.value === r);
990
+ return s !== -1 ? s : 0;
1009
991
  }
1010
- function B(r, t) {
992
+ function J(r, t) {
1011
993
  return (t.label ?? String(t.value)).toLowerCase().includes(r.toLowerCase());
1012
994
  }
1013
- function J(r, t) {
995
+ function H(r, t) {
1014
996
  if (t)
1015
997
  return r ? t : t[0];
1016
998
  }
1017
- function L(r) {
1018
- return [...r].map((t) => X[t]);
999
+ function P(r) {
1000
+ return [...r].map((t) => Z[t]);
1019
1001
  }
1020
- function Z(r) {
1021
- const t = new Intl.DateTimeFormat(r, { year: "numeric", month: "2-digit", day: "2-digit" }).formatToParts(new Date(2000, 0, 15)), e = [];
1022
- let s = "/";
1002
+ function tt(r) {
1003
+ const t = new Intl.DateTimeFormat(r, { year: "numeric", month: "2-digit", day: "2-digit" }).formatToParts(new Date(2000, 0, 15)), s = [];
1004
+ let e = "/";
1023
1005
  for (const i of t)
1024
- i.type === "literal" ? s = i.value.trim() || i.value : (i.type === "year" || i.type === "month" || i.type === "day") && e.push({ type: i.type, len: i.type === "year" ? 4 : 2 });
1025
- return { segments: e, separator: s };
1006
+ i.type === "literal" ? e = i.value.trim() || i.value : (i.type === "year" || i.type === "month" || i.type === "day") && s.push({ type: i.type, len: i.type === "year" ? 4 : 2 });
1007
+ return { segments: s, separator: e };
1026
1008
  }
1027
- function k(r) {
1009
+ function $(r) {
1028
1010
  return Number.parseInt((r || "0").replace(/_/g, "0"), 10) || 0;
1029
1011
  }
1030
- function I(r) {
1031
- return { year: k(r.year), month: k(r.month), day: k(r.day) };
1012
+ function S(r) {
1013
+ return { year: $(r.year), month: $(r.month), day: $(r.day) };
1032
1014
  }
1033
- function T(r, t) {
1015
+ function U(r, t) {
1034
1016
  return new Date(r || 2001, t || 1, 0).getDate();
1035
1017
  }
1036
1018
  function F(r) {
1037
- const { year: t, month: e, day: s } = I(r);
1038
- if (!t || t < 0 || t > 9999 || !e || e < 1 || e > 12 || !s || s < 1)
1019
+ const { year: t, month: s, day: e } = S(r);
1020
+ if (!t || t < 0 || t > 9999 || !s || s < 1 || s > 12 || !e || e < 1)
1039
1021
  return;
1040
- const i = new Date(Date.UTC(t, e - 1, s));
1041
- if (!(i.getUTCFullYear() !== t || i.getUTCMonth() !== e - 1 || i.getUTCDate() !== s))
1042
- return { year: t, month: e, day: s };
1022
+ const i = new Date(Date.UTC(t, s - 1, e));
1023
+ if (!(i.getUTCFullYear() !== t || i.getUTCMonth() !== s - 1 || i.getUTCDate() !== e))
1024
+ return { year: t, month: s, day: e };
1043
1025
  }
1044
1026
  function N(r) {
1045
1027
  const t = F(r);
1046
1028
  return t ? new Date(Date.UTC(t.year, t.month - 1, t.day)) : undefined;
1047
1029
  }
1048
- function tt(r, t, e, s) {
1049
- const i = e ? { year: e.getUTCFullYear(), month: e.getUTCMonth() + 1, day: e.getUTCDate() } : null, n = s ? { year: s.getUTCFullYear(), month: s.getUTCMonth() + 1, day: s.getUTCDate() } : null;
1050
- return r === "year" ? { min: i?.year ?? 1, max: n?.year ?? 9999 } : r === "month" ? { min: i && t.year === i.year ? i.month : 1, max: n && t.year === n.year ? n.month : 12 } : { min: i && t.year === i.year && t.month === i.month ? i.day : 1, max: n && t.year === n.year && t.month === n.month ? n.day : T(t.year, t.month) };
1030
+ function st(r, t, s, e) {
1031
+ const i = s ? { year: s.getUTCFullYear(), month: s.getUTCMonth() + 1, day: s.getUTCDate() } : null, n = e ? { year: e.getUTCFullYear(), month: e.getUTCMonth() + 1, day: e.getUTCDate() } : null;
1032
+ return r === "year" ? { min: i?.year ?? 1, max: n?.year ?? 9999 } : r === "month" ? { min: i && t.year === i.year ? i.month : 1, max: n && t.year === n.year ? n.month : 12 } : { min: i && t.year === i.year && t.month === i.month ? i.day : 1, max: n && t.year === n.year && t.month === n.month ? n.day : U(t.year, t.month) };
1051
1033
  }
1052
- var import_sisteransi, E, G, u, Y, C, O = (r) => ("columns" in r) && typeof r.columns == "number" ? r.columns : 80, A = (r) => ("rows" in r) && typeof r.rows == "number" ? r.rows : 20, p = class {
1034
+ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.columns == "number" ? r.columns : 80, L = (r) => ("rows" in r) && typeof r.rows == "number" ? r.rows : 20, m = class {
1053
1035
  input;
1054
1036
  output;
1055
1037
  _abortSignal;
@@ -1064,27 +1046,27 @@ var import_sisteransi, E, G, u, Y, C, O = (r) => ("columns" in r) && typeof r.co
1064
1046
  error = "";
1065
1047
  value;
1066
1048
  userInput = "";
1067
- constructor(t, e = true) {
1068
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t;
1069
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
1049
+ constructor(t, s = true) {
1050
+ const { input: e = D, output: i = x, render: n, signal: o, ...u } = t;
1051
+ this.opts = u, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = o, this.input = e, this.output = i;
1070
1052
  }
1071
1053
  unsubscribe() {
1072
1054
  this._subscribers.clear();
1073
1055
  }
1074
- setSubscriber(t, e) {
1075
- const s = this._subscribers.get(t) ?? [];
1076
- s.push(e), this._subscribers.set(t, s);
1056
+ setSubscriber(t, s) {
1057
+ const e = this._subscribers.get(t) ?? [];
1058
+ e.push(s), this._subscribers.set(t, e);
1077
1059
  }
1078
- on(t, e) {
1079
- this.setSubscriber(t, { cb: e });
1060
+ on(t, s) {
1061
+ this.setSubscriber(t, { cb: s });
1080
1062
  }
1081
- once(t, e) {
1082
- this.setSubscriber(t, { cb: e, once: true });
1063
+ once(t, s) {
1064
+ this.setSubscriber(t, { cb: s, once: true });
1083
1065
  }
1084
- emit(t, ...e) {
1085
- const s = this._subscribers.get(t) ?? [], i = [];
1086
- for (const n of s)
1087
- n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
1066
+ emit(t, ...s) {
1067
+ const e = this._subscribers.get(t) ?? [], i = [];
1068
+ for (const n of e)
1069
+ n.cb(...s), n.once && i.push(() => e.splice(e.indexOf(n), 1));
1088
1070
  for (const n of i)
1089
1071
  n();
1090
1072
  }
@@ -1092,39 +1074,42 @@ var import_sisteransi, E, G, u, Y, C, O = (r) => ("columns" in r) && typeof r.co
1092
1074
  return new Promise((t) => {
1093
1075
  if (this._abortSignal) {
1094
1076
  if (this._abortSignal.aborted)
1095
- return this.state = "cancel", this.close(), t(C);
1077
+ return this.state = "cancel", this.close(), t(k);
1096
1078
  this._abortSignal.addEventListener("abort", () => {
1097
1079
  this.state = "cancel", this.close();
1098
1080
  }, { once: true });
1099
1081
  }
1100
- this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== undefined && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
1082
+ this.rl = E.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== undefined && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
1101
1083
  this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(this.value);
1102
1084
  }), this.once("cancel", () => {
1103
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(C);
1085
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(k);
1104
1086
  });
1105
1087
  });
1106
1088
  }
1107
- _isActionKey(t, e) {
1089
+ _isActionKey(t, s) {
1108
1090
  return t === "\t";
1109
1091
  }
1092
+ _shouldSubmit(t, s) {
1093
+ return true;
1094
+ }
1110
1095
  _setValue(t) {
1111
1096
  this.value = t, this.emit("value", this.value);
1112
1097
  }
1113
- _setUserInput(t, e) {
1114
- this.userInput = t ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
1098
+ _setUserInput(t, s) {
1099
+ this.userInput = t ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
1115
1100
  }
1116
1101
  _clearUserInput() {
1117
1102
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
1118
1103
  }
1119
- onKeypress(t, e) {
1120
- if (this._track && e.name !== "return" && (e.name && this._isActionKey(t, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), e), e?.name === "return") {
1104
+ onKeypress(t, s) {
1105
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(t, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && h.aliases.has(s.name) && this.emit("cursor", h.aliases.get(s.name)), h.actions.has(s.name) && this.emit("cursor", s.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), s), s?.name === "return" && this._shouldSubmit(t, s)) {
1121
1106
  if (this.opts.validate) {
1122
- const s = this.opts.validate(this.value);
1123
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
1107
+ const e = this.opts.validate(this.value);
1108
+ e && (this.error = e instanceof Error ? e.message : e, this.state = "error", this.rl?.write(this.userInput));
1124
1109
  }
1125
1110
  this.state !== "error" && (this.state = "submit");
1126
1111
  }
1127
- V([t, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1112
+ C([t, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1128
1113
  }
1129
1114
  close() {
1130
1115
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
@@ -1141,31 +1126,31 @@ var import_sisteransi, E, G, u, Y, C, O = (r) => ("columns" in r) && typeof r.co
1141
1126
  if (this.state === "initial")
1142
1127
  this.output.write(import_sisteransi.cursor.hide);
1143
1128
  else {
1144
- const e = j(this._prevFrame, t), s = A(this.output);
1145
- if (this.restoreCursor(), e) {
1146
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
1147
- let o = e.lines.find((a) => a >= i);
1129
+ const s = z(this._prevFrame, t), e = L(this.output);
1130
+ if (this.restoreCursor(), s) {
1131
+ const i = Math.max(0, s.numLinesAfter - e), n = Math.max(0, s.numLinesBefore - e);
1132
+ let o = s.lines.find((u) => u >= i);
1148
1133
  if (o === undefined) {
1149
1134
  this._prevFrame = t;
1150
1135
  return;
1151
1136
  }
1152
- if (e.lines.length === 1) {
1137
+ if (s.lines.length === 1) {
1153
1138
  this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
1154
- const a = t.split(`
1139
+ const u = t.split(`
1155
1140
  `);
1156
- this.output.write(a[o]), this._prevFrame = t, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
1141
+ this.output.write(u[o]), this._prevFrame = t, this.output.write(import_sisteransi.cursor.move(0, u.length - o - 1));
1157
1142
  return;
1158
- } else if (e.lines.length > 1) {
1143
+ } else if (s.lines.length > 1) {
1159
1144
  if (i < n)
1160
1145
  o = i;
1161
1146
  else {
1162
- const h = o - n;
1163
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
1147
+ const a = o - n;
1148
+ a > 0 && this.output.write(import_sisteransi.cursor.move(0, a));
1164
1149
  }
1165
1150
  this.output.write(import_sisteransi.erase.down());
1166
- const a = t.split(`
1151
+ const u = t.split(`
1167
1152
  `).slice(o);
1168
- this.output.write(a.join(`
1153
+ this.output.write(u.join(`
1169
1154
  `)), this._prevFrame = t;
1170
1155
  return;
1171
1156
  }
@@ -1175,82 +1160,82 @@ var import_sisteransi, E, G, u, Y, C, O = (r) => ("columns" in r) && typeof r.co
1175
1160
  this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
1176
1161
  }
1177
1162
  }
1178
- }, H, Q, X, et, st, nt;
1163
+ }, Q, X, Z, et, it, rt, ut;
1179
1164
  var init_dist3 = __esm(() => {
1180
1165
  init_main();
1181
1166
  import_sisteransi = __toESM(require_src(), 1);
1182
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
1183
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
1184
- u = { actions: new Set(E), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
1167
+ G = ["up", "down", "left", "right", "space", "enter", "cancel"];
1168
+ K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
1169
+ h = { actions: new Set(G), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...K], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
1185
1170
  Y = globalThis.process.platform.startsWith("win");
1186
- C = Symbol("clack:cancel");
1187
- H = class extends p {
1171
+ k = Symbol("clack:cancel");
1172
+ Q = class extends m {
1188
1173
  filteredOptions;
1189
1174
  multiple;
1190
1175
  isNavigating = false;
1191
1176
  selectedValues = [];
1192
1177
  focusedValue;
1193
- #e = 0;
1194
- #o = "";
1178
+ #s = 0;
1179
+ #r = "";
1195
1180
  #t;
1196
1181
  #n;
1197
- #a;
1182
+ #u;
1198
1183
  get cursor() {
1199
- return this.#e;
1184
+ return this.#s;
1200
1185
  }
1201
1186
  get userInputWithCursor() {
1202
1187
  if (!this.userInput)
1203
- return y(["inverse", "hidden"], "_");
1188
+ return v(["inverse", "hidden"], "_");
1204
1189
  if (this._cursor >= this.userInput.length)
1205
1190
  return `${this.userInput}\u2588`;
1206
- const t = this.userInput.slice(0, this._cursor), [e, ...s] = this.userInput.slice(this._cursor);
1207
- return `${t}${y("inverse", e)}${s.join("")}`;
1191
+ const t = this.userInput.slice(0, this._cursor), [s, ...e] = this.userInput.slice(this._cursor);
1192
+ return `${t}${v("inverse", s)}${e.join("")}`;
1208
1193
  }
1209
1194
  get options() {
1210
1195
  return typeof this.#n == "function" ? this.#n() : this.#n;
1211
1196
  }
1212
1197
  constructor(t) {
1213
- super(t), this.#n = t.options, this.#a = t.placeholder;
1214
- const e = this.options;
1215
- this.filteredOptions = [...e], this.multiple = t.multiple === true, this.#t = typeof t.options == "function" ? t.filter : t.filter ?? B;
1216
- let s;
1217
- if (t.initialValue && Array.isArray(t.initialValue) ? this.multiple ? s = t.initialValue : s = t.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (s = [this.options[0].value]), s)
1218
- for (const i of s) {
1219
- const n = e.findIndex((o) => o.value === i);
1220
- n !== -1 && (this.toggleSelected(i), this.#e = n);
1198
+ super(t), this.#n = t.options, this.#u = t.placeholder;
1199
+ const s = this.options;
1200
+ this.filteredOptions = [...s], this.multiple = t.multiple === true, this.#t = typeof t.options == "function" ? t.filter : t.filter ?? J;
1201
+ let e;
1202
+ if (t.initialValue && Array.isArray(t.initialValue) ? this.multiple ? e = t.initialValue : e = t.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (e = [this.options[0].value]), e)
1203
+ for (const i of e) {
1204
+ const n = s.findIndex((o) => o.value === i);
1205
+ n !== -1 && (this.toggleSelected(i), this.#s = n);
1221
1206
  }
1222
- this.focusedValue = this.options[this.#e]?.value, this.on("key", (i, n) => this.#s(i, n)), this.on("userInput", (i) => this.#i(i));
1207
+ this.focusedValue = this.options[this.#s]?.value, this.on("key", (i, n) => this.#e(i, n)), this.on("userInput", (i) => this.#i(i));
1223
1208
  }
1224
- _isActionKey(t, e) {
1225
- return t === "\t" || this.multiple && this.isNavigating && e.name === "space" && t !== undefined && t !== "";
1209
+ _isActionKey(t, s) {
1210
+ return t === "\t" || this.multiple && this.isNavigating && s.name === "space" && t !== undefined && t !== "";
1226
1211
  }
1227
- #s(t, e) {
1228
- const s = e.name === "up", i = e.name === "down", n = e.name === "return", o = this.userInput === "" || this.userInput === "\t", a = this.#a, h = this.options, l = a !== undefined && a !== "" && h.some((f) => !f.disabled && (this.#t ? this.#t(a, f) : true));
1229
- if (e.name === "tab" && o && l) {
1230
- this.userInput === "\t" && this._clearUserInput(), this._setUserInput(a, true), this.isNavigating = false;
1212
+ #e(t, s) {
1213
+ const e = s.name === "up", i = s.name === "down", n = s.name === "return", o = this.userInput === "" || this.userInput === "\t", u = this.#u, a = this.options, l = u !== undefined && u !== "" && a.some((c) => !c.disabled && (this.#t ? this.#t(u, c) : true));
1214
+ if (s.name === "tab" && o && l) {
1215
+ this.userInput === "\t" && this._clearUserInput(), this._setUserInput(u, true), this.isNavigating = false;
1231
1216
  return;
1232
1217
  }
1233
- s || i ? (this.#e = d(this.#e, s ? -1 : 1, this.filteredOptions), this.focusedValue = this.filteredOptions[this.#e]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n ? this.value = J(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== undefined && (e.name === "tab" || this.isNavigating && e.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
1218
+ e || i ? (this.#s = f(this.#s, e ? -1 : 1, this.filteredOptions), this.focusedValue = this.filteredOptions[this.#s]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n ? this.value = H(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== undefined && (s.name === "tab" || this.isNavigating && s.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
1234
1219
  }
1235
1220
  deselectAll() {
1236
1221
  this.selectedValues = [];
1237
1222
  }
1238
1223
  toggleSelected(t) {
1239
- this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(t) ? this.selectedValues = this.selectedValues.filter((e) => e !== t) : this.selectedValues = [...this.selectedValues, t] : this.selectedValues = [t]);
1224
+ this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(t) ? this.selectedValues = this.selectedValues.filter((s) => s !== t) : this.selectedValues = [...this.selectedValues, t] : this.selectedValues = [t]);
1240
1225
  }
1241
1226
  #i(t) {
1242
- if (t !== this.#o) {
1243
- this.#o = t;
1244
- const e = this.options;
1245
- t && this.#t ? this.filteredOptions = e.filter((n) => this.#t?.(t, n)) : this.filteredOptions = [...e];
1246
- const s = W(this.focusedValue, this.filteredOptions);
1247
- this.#e = d(s, 0, this.filteredOptions);
1248
- const i = this.filteredOptions[this.#e];
1227
+ if (t !== this.#r) {
1228
+ this.#r = t;
1229
+ const s = this.options;
1230
+ t && this.#t ? this.filteredOptions = s.filter((n) => this.#t?.(t, n)) : this.filteredOptions = [...s];
1231
+ const e = B(this.focusedValue, this.filteredOptions);
1232
+ this.#s = f(e, 0, this.filteredOptions);
1233
+ const i = this.filteredOptions[this.#s];
1249
1234
  i && !i.disabled ? this.focusedValue = i.value : this.focusedValue = undefined, this.multiple || (this.focusedValue !== undefined ? this.toggleSelected(this.focusedValue) : this.deselectAll());
1250
1235
  }
1251
1236
  }
1252
1237
  };
1253
- Q = class Q extends p {
1238
+ X = class X extends m {
1254
1239
  get cursor() {
1255
1240
  return this.value ? 0 : 1;
1256
1241
  }
@@ -1260,66 +1245,66 @@ var init_dist3 = __esm(() => {
1260
1245
  constructor(t) {
1261
1246
  super(t, false), this.value = !!t.initialValue, this.on("userInput", () => {
1262
1247
  this.value = this._value;
1263
- }), this.on("confirm", (e) => {
1264
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
1248
+ }), this.on("confirm", (s) => {
1249
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
1265
1250
  }), this.on("cursor", () => {
1266
1251
  this.value = !this.value;
1267
1252
  });
1268
1253
  }
1269
1254
  };
1270
- X = { Y: { type: "year", len: 4 }, M: { type: "month", len: 2 }, D: { type: "day", len: 2 } };
1271
- et = class et extends p {
1272
- #e;
1273
- #o;
1255
+ Z = { Y: { type: "year", len: 4 }, M: { type: "month", len: 2 }, D: { type: "day", len: 2 } };
1256
+ et = class et extends m {
1257
+ #s;
1258
+ #r;
1274
1259
  #t;
1275
1260
  #n;
1276
- #a;
1277
- #s = { segmentIndex: 0, positionInSegment: 0 };
1261
+ #u;
1262
+ #e = { segmentIndex: 0, positionInSegment: 0 };
1278
1263
  #i = true;
1279
- #r = null;
1264
+ #o = null;
1280
1265
  inlineError = "";
1281
1266
  get segmentCursor() {
1282
- return { ...this.#s };
1267
+ return { ...this.#e };
1283
1268
  }
1284
1269
  get segmentValues() {
1285
1270
  return { ...this.#t };
1286
1271
  }
1287
1272
  get segments() {
1288
- return this.#e;
1273
+ return this.#s;
1289
1274
  }
1290
1275
  get separator() {
1291
- return this.#o;
1276
+ return this.#r;
1292
1277
  }
1293
1278
  get formattedValue() {
1294
1279
  return this.#c(this.#t);
1295
1280
  }
1296
1281
  #c(t) {
1297
- return this.#e.map((e) => t[e.type]).join(this.#o);
1282
+ return this.#s.map((s) => t[s.type]).join(this.#r);
1298
1283
  }
1299
- #h() {
1284
+ #a() {
1300
1285
  this._setUserInput(this.#c(this.#t)), this._setValue(N(this.#t) ?? undefined);
1301
1286
  }
1302
1287
  constructor(t) {
1303
- const e = t.format ? { segments: L(t.format), separator: t.separator ?? "/" } : Z(t.locale), s = t.separator ?? e.separator, i = t.format ? L(t.format) : e.segments, n = t.initialValue ?? t.defaultValue, o = n ? { year: String(n.getUTCFullYear()).padStart(4, "0"), month: String(n.getUTCMonth() + 1).padStart(2, "0"), day: String(n.getUTCDate()).padStart(2, "0") } : { year: "____", month: "__", day: "__" }, a = i.map((h) => o[h.type]).join(s);
1304
- super({ ...t, initialUserInput: a }, false), this.#e = i, this.#o = s, this.#t = o, this.#n = t.minDate, this.#a = t.maxDate, this.#h(), this.on("cursor", (h) => this.#d(h)), this.on("key", (h, l) => this.#f(h, l)), this.on("finalize", () => this.#g(t));
1288
+ const s = t.format ? { segments: P(t.format), separator: t.separator ?? "/" } : tt(t.locale), e = t.separator ?? s.separator, i = t.format ? P(t.format) : s.segments, n = t.initialValue ?? t.defaultValue, o = n ? { year: String(n.getUTCFullYear()).padStart(4, "0"), month: String(n.getUTCMonth() + 1).padStart(2, "0"), day: String(n.getUTCDate()).padStart(2, "0") } : { year: "____", month: "__", day: "__" }, u = i.map((a) => o[a.type]).join(e);
1289
+ super({ ...t, initialUserInput: u }, false), this.#s = i, this.#r = e, this.#t = o, this.#n = t.minDate, this.#u = t.maxDate, this.#a(), this.on("cursor", (a) => this.#d(a)), this.on("key", (a, l) => this.#f(a, l)), this.on("finalize", () => this.#g(t));
1305
1290
  }
1306
- #u() {
1307
- const t = Math.max(0, Math.min(this.#s.segmentIndex, this.#e.length - 1)), e = this.#e[t];
1308
- if (e)
1309
- return this.#s.positionInSegment = Math.max(0, Math.min(this.#s.positionInSegment, e.len - 1)), { segment: e, index: t };
1291
+ #h() {
1292
+ const t = Math.max(0, Math.min(this.#e.segmentIndex, this.#s.length - 1)), s = this.#s[t];
1293
+ if (s)
1294
+ return this.#e.positionInSegment = Math.max(0, Math.min(this.#e.positionInSegment, s.len - 1)), { segment: s, index: t };
1310
1295
  }
1311
1296
  #l(t) {
1312
- this.inlineError = "", this.#r = null;
1313
- const e = this.#u();
1314
- e && (this.#s.segmentIndex = Math.max(0, Math.min(this.#e.length - 1, e.index + t)), this.#s.positionInSegment = 0, this.#i = true);
1297
+ this.inlineError = "", this.#o = null;
1298
+ const s = this.#h();
1299
+ s && (this.#e.segmentIndex = Math.max(0, Math.min(this.#s.length - 1, s.index + t)), this.#e.positionInSegment = 0, this.#i = true);
1315
1300
  }
1316
1301
  #p(t) {
1317
- const e = this.#u();
1318
- if (!e)
1302
+ const s = this.#h();
1303
+ if (!s)
1319
1304
  return;
1320
- const { segment: s } = e, i = this.#t[s.type], n = !i || i.replace(/_/g, "") === "", o = Number.parseInt((i || "0").replace(/_/g, "0"), 10) || 0, a = tt(s.type, I(this.#t), this.#n, this.#a);
1321
- let h;
1322
- n ? h = t === 1 ? a.min : a.max : h = Math.max(Math.min(a.max, o + t), a.min), this.#t = { ...this.#t, [s.type]: h.toString().padStart(s.len, "0") }, this.#i = true, this.#r = null, this.#h();
1305
+ const { segment: e } = s, i = this.#t[e.type], n = !i || i.replace(/_/g, "") === "", o = Number.parseInt((i || "0").replace(/_/g, "0"), 10) || 0, u = st(e.type, S(this.#t), this.#n, this.#u);
1306
+ let a;
1307
+ n ? a = t === 1 ? u.min : u.max : a = Math.max(Math.min(u.max, o + t), u.min), this.#t = { ...this.#t, [e.type]: a.toString().padStart(e.len, "0") }, this.#i = true, this.#o = null, this.#a();
1323
1308
  }
1324
1309
  #d(t) {
1325
1310
  if (t)
@@ -1334,123 +1319,123 @@ var init_dist3 = __esm(() => {
1334
1319
  return this.#p(-1);
1335
1320
  }
1336
1321
  }
1337
- #f(t, e) {
1338
- if (e?.name === "backspace" || e?.sequence === "\x7F" || e?.sequence === "\b" || t === "\x7F" || t === "\b") {
1322
+ #f(t, s) {
1323
+ if (s?.name === "backspace" || s?.sequence === "\x7F" || s?.sequence === "\b" || t === "\x7F" || t === "\b") {
1339
1324
  this.inlineError = "";
1340
- const s = this.#u();
1341
- if (!s)
1325
+ const e = this.#h();
1326
+ if (!e)
1342
1327
  return;
1343
- if (!this.#t[s.segment.type].replace(/_/g, "")) {
1328
+ if (!this.#t[e.segment.type].replace(/_/g, "")) {
1344
1329
  this.#l(-1);
1345
1330
  return;
1346
1331
  }
1347
- this.#t[s.segment.type] = "_".repeat(s.segment.len), this.#i = true, this.#s.positionInSegment = 0, this.#h();
1332
+ this.#t[e.segment.type] = "_".repeat(e.segment.len), this.#i = true, this.#e.positionInSegment = 0, this.#a();
1348
1333
  return;
1349
1334
  }
1350
- if (e?.name === "tab") {
1335
+ if (s?.name === "tab") {
1351
1336
  this.inlineError = "";
1352
- const s = this.#u();
1353
- if (!s)
1337
+ const e = this.#h();
1338
+ if (!e)
1354
1339
  return;
1355
- const i = e.shift ? -1 : 1, n = s.index + i;
1356
- n >= 0 && n < this.#e.length && (this.#s.segmentIndex = n, this.#s.positionInSegment = 0, this.#i = true);
1340
+ const i = s.shift ? -1 : 1, n = e.index + i;
1341
+ n >= 0 && n < this.#s.length && (this.#e.segmentIndex = n, this.#e.positionInSegment = 0, this.#i = true);
1357
1342
  return;
1358
1343
  }
1359
1344
  if (t && /^[0-9]$/.test(t)) {
1360
- const s = this.#u();
1361
- if (!s)
1345
+ const e = this.#h();
1346
+ if (!e)
1362
1347
  return;
1363
- const { segment: i } = s, n = !this.#t[i.type].replace(/_/g, "");
1364
- if (this.#i && this.#r !== null && !n) {
1365
- const m = this.#r + t, g = { ...this.#t, [i.type]: m }, b = this.#m(g, i);
1366
- if (b) {
1367
- this.inlineError = b, this.#r = null, this.#i = false;
1348
+ const { segment: i } = e, n = !this.#t[i.type].replace(/_/g, "");
1349
+ if (this.#i && this.#o !== null && !n) {
1350
+ const d = this.#o + t, g = { ...this.#t, [i.type]: d }, _ = this.#m(g, i);
1351
+ if (_) {
1352
+ this.inlineError = _, this.#o = null, this.#i = false;
1368
1353
  return;
1369
1354
  }
1370
- this.inlineError = "", this.#t[i.type] = m, this.#r = null, this.#i = false, this.#h(), s.index < this.#e.length - 1 && (this.#s.segmentIndex = s.index + 1, this.#s.positionInSegment = 0, this.#i = true);
1355
+ this.inlineError = "", this.#t[i.type] = d, this.#o = null, this.#i = false, this.#a(), e.index < this.#s.length - 1 && (this.#e.segmentIndex = e.index + 1, this.#e.positionInSegment = 0, this.#i = true);
1371
1356
  return;
1372
1357
  }
1373
- this.#i && !n && (this.#t[i.type] = "_".repeat(i.len), this.#s.positionInSegment = 0), this.#i = false, this.#r = null;
1374
- const o = this.#t[i.type], a = o.indexOf("_"), h = a >= 0 ? a : Math.min(this.#s.positionInSegment, i.len - 1);
1375
- if (h < 0 || h >= i.len)
1358
+ this.#i && !n && (this.#t[i.type] = "_".repeat(i.len), this.#e.positionInSegment = 0), this.#i = false, this.#o = null;
1359
+ const o = this.#t[i.type], u = o.indexOf("_"), a = u >= 0 ? u : Math.min(this.#e.positionInSegment, i.len - 1);
1360
+ if (a < 0 || a >= i.len)
1376
1361
  return;
1377
- let l = o.slice(0, h) + t + o.slice(h + 1), f = false;
1378
- if (h === 0 && o === "__" && (i.type === "month" || i.type === "day")) {
1379
- const m = Number.parseInt(t, 10);
1380
- l = `0${t}`, f = m <= (i.type === "month" ? 1 : 2);
1362
+ let l = o.slice(0, a) + t + o.slice(a + 1), c = false;
1363
+ if (a === 0 && o === "__" && (i.type === "month" || i.type === "day")) {
1364
+ const d = Number.parseInt(t, 10);
1365
+ l = `0${t}`, c = d <= (i.type === "month" ? 1 : 2);
1381
1366
  }
1382
1367
  if (i.type === "year" && (l = (o.replace(/_/g, "") + t).padStart(i.len, "_")), !l.includes("_")) {
1383
- const m = { ...this.#t, [i.type]: l }, g = this.#m(m, i);
1368
+ const d = { ...this.#t, [i.type]: l }, g = this.#m(d, i);
1384
1369
  if (g) {
1385
1370
  this.inlineError = g;
1386
1371
  return;
1387
1372
  }
1388
1373
  }
1389
1374
  this.inlineError = "", this.#t[i.type] = l;
1390
- const v = l.includes("_") ? undefined : F(this.#t);
1391
- if (v) {
1392
- const { year: m, month: g } = v, b = T(m, g);
1393
- this.#t = { year: String(Math.max(0, Math.min(9999, m))).padStart(4, "0"), month: String(Math.max(1, Math.min(12, g))).padStart(2, "0"), day: String(Math.max(1, Math.min(b, v.day))).padStart(2, "0") };
1375
+ const y = l.includes("_") ? undefined : F(this.#t);
1376
+ if (y) {
1377
+ const { year: d, month: g } = y, _ = U(d, g);
1378
+ this.#t = { year: String(Math.max(0, Math.min(9999, d))).padStart(4, "0"), month: String(Math.max(1, Math.min(12, g))).padStart(2, "0"), day: String(Math.max(1, Math.min(_, y.day))).padStart(2, "0") };
1394
1379
  }
1395
- this.#h();
1396
- const U = l.indexOf("_");
1397
- f ? (this.#i = true, this.#r = t) : U >= 0 ? this.#s.positionInSegment = U : a >= 0 && s.index < this.#e.length - 1 ? (this.#s.segmentIndex = s.index + 1, this.#s.positionInSegment = 0, this.#i = true) : this.#s.positionInSegment = Math.min(h + 1, i.len - 1);
1380
+ this.#a();
1381
+ const T = l.indexOf("_");
1382
+ c ? (this.#i = true, this.#o = t) : T >= 0 ? this.#e.positionInSegment = T : u >= 0 && e.index < this.#s.length - 1 ? (this.#e.segmentIndex = e.index + 1, this.#e.positionInSegment = 0, this.#i = true) : this.#e.positionInSegment = Math.min(a + 1, i.len - 1);
1398
1383
  }
1399
1384
  }
1400
- #m(t, e) {
1401
- const { month: s, day: i } = I(t);
1402
- if (e.type === "month" && (s < 0 || s > 12))
1403
- return u.date.messages.invalidMonth;
1404
- if (e.type === "day" && (i < 0 || i > 31))
1405
- return u.date.messages.invalidDay(31, "any month");
1385
+ #m(t, s) {
1386
+ const { month: e, day: i } = S(t);
1387
+ if (s.type === "month" && (e < 0 || e > 12))
1388
+ return h.date.messages.invalidMonth;
1389
+ if (s.type === "day" && (i < 0 || i > 31))
1390
+ return h.date.messages.invalidDay(31, "any month");
1406
1391
  }
1407
1392
  #g(t) {
1408
- const { year: e, month: s, day: i } = I(this.#t);
1409
- if (e && s && i) {
1410
- const n = T(e, s);
1393
+ const { year: s, month: e, day: i } = S(this.#t);
1394
+ if (s && e && i) {
1395
+ const n = U(s, e);
1411
1396
  this.#t = { ...this.#t, day: String(Math.min(i, n)).padStart(2, "0") };
1412
1397
  }
1413
1398
  this.value = N(this.#t) ?? t.defaultValue ?? undefined;
1414
1399
  }
1415
1400
  };
1416
- st = class st extends p {
1401
+ it = class it extends m {
1417
1402
  options;
1418
1403
  cursor = 0;
1419
- #e;
1404
+ #s;
1420
1405
  getGroupItems(t) {
1421
- return this.options.filter((e) => e.group === t);
1406
+ return this.options.filter((s) => s.group === t);
1422
1407
  }
1423
1408
  isGroupSelected(t) {
1424
- const e = this.getGroupItems(t), s = this.value;
1425
- return s === undefined ? false : e.every((i) => s.includes(i.value));
1409
+ const s = this.getGroupItems(t), e = this.value;
1410
+ return e === undefined ? false : s.every((i) => e.includes(i.value));
1426
1411
  }
1427
1412
  toggleValue() {
1428
1413
  const t = this.options[this.cursor];
1429
1414
  if (this.value === undefined && (this.value = []), t.group === true) {
1430
- const e = t.value, s = this.getGroupItems(e);
1431
- this.isGroupSelected(e) ? this.value = this.value.filter((i) => s.findIndex((n) => n.value === i) === -1) : this.value = [...this.value, ...s.map((i) => i.value)], this.value = Array.from(new Set(this.value));
1415
+ const s = t.value, e = this.getGroupItems(s);
1416
+ this.isGroupSelected(s) ? this.value = this.value.filter((i) => e.findIndex((n) => n.value === i) === -1) : this.value = [...this.value, ...e.map((i) => i.value)], this.value = Array.from(new Set(this.value));
1432
1417
  } else {
1433
- const e = this.value.includes(t.value);
1434
- this.value = e ? this.value.filter((s) => s !== t.value) : [...this.value, t.value];
1418
+ const s = this.value.includes(t.value);
1419
+ this.value = s ? this.value.filter((e) => e !== t.value) : [...this.value, t.value];
1435
1420
  }
1436
1421
  }
1437
1422
  constructor(t) {
1438
1423
  super(t, false);
1439
- const { options: e } = t;
1440
- this.#e = t.selectableGroups !== false, this.options = Object.entries(e).flatMap(([s, i]) => [{ value: s, group: true, label: s }, ...i.map((n) => ({ ...n, group: s }))]), this.value = [...t.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: s }) => s === t.cursorAt), this.#e ? 0 : 1), this.on("cursor", (s) => {
1441
- switch (s) {
1424
+ const { options: s } = t;
1425
+ this.#s = t.selectableGroups !== false, this.options = Object.entries(s).flatMap(([e, i]) => [{ value: e, group: true, label: e }, ...i.map((n) => ({ ...n, group: e }))]), this.value = [...t.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e }) => e === t.cursorAt), this.#s ? 0 : 1), this.on("cursor", (e) => {
1426
+ switch (e) {
1442
1427
  case "left":
1443
1428
  case "up": {
1444
1429
  this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1445
1430
  const i = this.options[this.cursor]?.group === true;
1446
- !this.#e && i && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
1431
+ !this.#s && i && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
1447
1432
  break;
1448
1433
  }
1449
1434
  case "down":
1450
1435
  case "right": {
1451
1436
  this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1452
1437
  const i = this.options[this.cursor]?.group === true;
1453
- !this.#e && i && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
1438
+ !this.#s && i && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
1454
1439
  break;
1455
1440
  }
1456
1441
  case "space":
@@ -1460,7 +1445,86 @@ var init_dist3 = __esm(() => {
1460
1445
  });
1461
1446
  }
1462
1447
  };
1463
- nt = class nt extends p {
1448
+ rt = class rt extends m {
1449
+ #s = false;
1450
+ #r;
1451
+ focused = "editor";
1452
+ get userInputWithCursor() {
1453
+ if (this.state === "submit")
1454
+ return this.userInput;
1455
+ const t = this.userInput;
1456
+ if (this.cursor >= t.length)
1457
+ return `${t}\u2588`;
1458
+ const s = t.slice(0, this.cursor), e = t[this.cursor], i = t.slice(this.cursor + 1);
1459
+ return e === `
1460
+ ` ? `${s}\u2588
1461
+ ${i}` : `${s}${v("inverse", e)}${i}`;
1462
+ }
1463
+ get cursor() {
1464
+ return this._cursor;
1465
+ }
1466
+ #t(t) {
1467
+ if (this.userInput.length === 0) {
1468
+ this._setUserInput(t);
1469
+ return;
1470
+ }
1471
+ this._setUserInput(this.userInput.slice(0, this.cursor) + t + this.userInput.slice(this.cursor));
1472
+ }
1473
+ #n(t) {
1474
+ const s = this.value ?? "";
1475
+ switch (t) {
1476
+ case "up":
1477
+ this._cursor = I(this._cursor, 0, -1, s);
1478
+ return;
1479
+ case "down":
1480
+ this._cursor = I(this._cursor, 0, 1, s);
1481
+ return;
1482
+ case "left":
1483
+ this._cursor = I(this._cursor, -1, 0, s);
1484
+ return;
1485
+ case "right":
1486
+ this._cursor = I(this._cursor, 1, 0, s);
1487
+ return;
1488
+ }
1489
+ }
1490
+ _shouldSubmit(t, s) {
1491
+ if (this.#r)
1492
+ return this.focused === "submit" ? true : (this.#t(`
1493
+ `), this._cursor++, false);
1494
+ const e = this.#s;
1495
+ return this.#s = true, e ? (this.userInput[this.cursor - 1] === `
1496
+ ` && (this._setUserInput(this.userInput.slice(0, this.cursor - 1) + this.userInput.slice(this.cursor)), this._cursor--), true) : (this.#t(`
1497
+ `), this._cursor++, false);
1498
+ }
1499
+ constructor(t) {
1500
+ super(t, false), this.#r = t.showSubmit ?? false, this.on("key", (s, e) => {
1501
+ if (e?.name && h.actions.has(e.name)) {
1502
+ this.#n(e.name);
1503
+ return;
1504
+ }
1505
+ if (s === "\t" && this.#r) {
1506
+ this.focused = this.focused === "editor" ? "submit" : "editor";
1507
+ return;
1508
+ }
1509
+ if (e?.name !== "return") {
1510
+ if (this.#s = false, e?.name === "backspace" && this.cursor > 0) {
1511
+ this._setUserInput(this.userInput.slice(0, this.cursor - 1) + this.userInput.slice(this.cursor)), this._cursor--;
1512
+ return;
1513
+ }
1514
+ if (e?.name === "delete" && this.cursor < this.userInput.length) {
1515
+ this._setUserInput(this.userInput.slice(0, this.cursor) + this.userInput.slice(this.cursor + 1));
1516
+ return;
1517
+ }
1518
+ s && (this.#r && this.focused === "submit" && (this.focused = "editor"), this.#t(s ?? ""), this._cursor++);
1519
+ }
1520
+ }), this.on("userInput", (s) => {
1521
+ this._setValue(s);
1522
+ }), this.on("finalize", () => {
1523
+ this.value || (this.value = t.defaultValue), this.value === undefined && (this.value = "");
1524
+ });
1525
+ }
1526
+ };
1527
+ ut = class ut extends m {
1464
1528
  options;
1465
1529
  cursor = 0;
1466
1530
  get _selectedValue() {
@@ -1471,16 +1535,16 @@ var init_dist3 = __esm(() => {
1471
1535
  }
1472
1536
  constructor(t) {
1473
1537
  super(t, false), this.options = t.options;
1474
- const e = this.options.findIndex(({ value: i }) => i === t.initialValue), s = e === -1 ? 0 : e;
1475
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
1538
+ const s = this.options.findIndex(({ value: i }) => i === t.initialValue), e = s === -1 ? 0 : s;
1539
+ this.cursor = this.options[e].disabled ? f(e, 1, this.options) : e, this.changeValue(), this.on("cursor", (i) => {
1476
1540
  switch (i) {
1477
1541
  case "left":
1478
1542
  case "up":
1479
- this.cursor = d(this.cursor, -1, this.options);
1543
+ this.cursor = f(this.cursor, -1, this.options);
1480
1544
  break;
1481
1545
  case "down":
1482
1546
  case "right":
1483
- this.cursor = d(this.cursor, 1, this.options);
1547
+ this.cursor = f(this.cursor, 1, this.options);
1484
1548
  break;
1485
1549
  }
1486
1550
  this.changeValue();
@@ -1489,227 +1553,230 @@ var init_dist3 = __esm(() => {
1489
1553
  };
1490
1554
  });
1491
1555
 
1492
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
1493
- import { styleText as t, stripVTControlCharacters as ne } from "util";
1494
- import P2 from "process";
1495
- function Ze() {
1496
- return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1497
- }
1498
- var import_sisteransi2, ee, w2 = (e, i) => ee ? e : i, _e, oe, ue, F2, le, d2, E2, Ie, Ee, z2, H2, te, U, J2, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2 = (e) => {
1499
- switch (e) {
1556
+ // node_modules/.bun/@clack+prompts@1.4.0/node_modules/@clack/prompts/dist/index.mjs
1557
+ import { styleText as e, stripVTControlCharacters as nt2 } from "util";
1558
+ import V2 from "process";
1559
+ function ee() {
1560
+ return V2.platform !== "win32" ? V2.env.TERM !== "linux" : !!V2.env.CI || !!V2.env.WT_SESSION || !!V2.env.TERMINUS_SUBLIME || V2.env.ConEmuTask === "{cmd::Cmder}" || V2.env.TERM_PROGRAM === "Terminus-Sublime" || V2.env.TERM_PROGRAM === "vscode" || V2.env.TERM === "xterm-256color" || V2.env.TERM === "alacritty" || V2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1561
+ }
1562
+ var import_sisteransi2, tt2, w2 = (t, i) => tt2 ? t : i, Tt, at2, ut2, H2, lt, $2, x2, _t, xt, z2, U2, et2, K2, Y2, Et, st2, ct, Gt, $t, dt, Mt, ht2, pt, mt, gt, P2 = (t) => {
1563
+ switch (t) {
1500
1564
  case "initial":
1501
1565
  case "active":
1502
- return t("cyan", _e);
1566
+ return e("cyan", Tt);
1503
1567
  case "cancel":
1504
- return t("red", oe);
1568
+ return e("red", at2);
1505
1569
  case "error":
1506
- return t("yellow", ue);
1570
+ return e("yellow", ut2);
1507
1571
  case "submit":
1508
- return t("green", F2);
1572
+ return e("green", H2);
1509
1573
  }
1510
- }, ye = (e) => {
1511
- switch (e) {
1574
+ }, yt = (t) => {
1575
+ switch (t) {
1512
1576
  case "initial":
1513
1577
  case "active":
1514
- return t("cyan", d2);
1578
+ return e("cyan", $2);
1515
1579
  case "cancel":
1516
- return t("red", d2);
1580
+ return e("red", $2);
1517
1581
  case "error":
1518
- return t("yellow", d2);
1582
+ return e("yellow", $2);
1519
1583
  case "submit":
1520
- return t("green", d2);
1521
- }
1522
- }, et2 = (e, i, s, r, u2) => {
1523
- let n = i, o = 0;
1524
- for (let c2 = s;c2 < r; c2++) {
1525
- const a = e[c2];
1526
- if (n = n - a.length, o++, n <= u2)
1527
- break;
1528
- }
1529
- return { lineCount: n, removals: o };
1530
- }, Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
1531
- const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
1584
+ return e("green", $2);
1585
+ }
1586
+ }, Ot = (t, i, s, r, u, n = false) => {
1587
+ let a = i, c = 0;
1588
+ if (n)
1589
+ for (let o = r - 1;o >= s && (a -= t[o].length, c++, !(a <= u)); o--)
1590
+ ;
1591
+ else
1592
+ for (let o = s;o < r && (a -= t[o].length, c++, !(a <= u)); o++)
1593
+ ;
1594
+ return { lineCount: a, removals: c };
1595
+ }, F2 = ({ cursor: t, options: i, style: s, output: r = process.stdout, maxItems: u = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: a = 4 }) => {
1596
+ const c = A(r) - n, o = L(r), l = e("dim", "..."), d = Math.max(o - a, 0), g = Math.max(Math.min(u, d), 5);
1532
1597
  let p2 = 0;
1533
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
1534
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
1535
- const S2 = Math.min(p2 + y2, i.length), h = [];
1536
- let f = 0;
1537
- m && f++, g && f++;
1538
- const v = p2 + (m ? 1 : 0), T2 = S2 - (g ? 1 : 0);
1539
- for (let b = v;b < T2; b++) {
1540
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
1598
+ t >= g - 3 && (p2 = Math.max(Math.min(t - g + 3, i.length - g), 0));
1599
+ let f2 = g < i.length && p2 > 0, h2 = g < i.length && p2 + g < i.length;
1600
+ const I2 = Math.min(p2 + g, i.length), m2 = [];
1601
+ let y = 0;
1602
+ f2 && y++, h2 && y++;
1603
+ const v2 = p2 + (f2 ? 1 : 0), C2 = I2 - (h2 ? 1 : 0);
1604
+ for (let b = v2;b < C2; b++) {
1605
+ const G2 = wrapAnsi(s(i[b], b === t), c, { hard: true, trim: false }).split(`
1541
1606
  `);
1542
- h.push(x), f += x.length;
1543
- }
1544
- if (f > $2) {
1545
- let b = 0, x = 0, G2 = f;
1546
- const M2 = e - v, R2 = (j2, D) => et2(h, G2, j2, D, $2);
1547
- m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
1548
- }
1549
- const C2 = [];
1550
- m && C2.push(l);
1551
- for (const b of h)
1552
- for (const x of b)
1553
- C2.push(x);
1554
- return g && C2.push(l), C2;
1555
- }, ot2 = (e) => {
1556
- const i = e.active ?? "Yes", s = e.inactive ?? "No";
1557
- return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
1558
- const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
1559
- ` : ""}${o}
1560
- `, a = this.value ? i : s;
1607
+ m2.push(G2), y += G2.length;
1608
+ }
1609
+ if (y > d) {
1610
+ let b = 0, G2 = 0, M = y;
1611
+ const N2 = t - v2;
1612
+ let O = d;
1613
+ const j2 = () => Ot(m2, M, 0, N2, O), k2 = () => Ot(m2, M, N2 + 1, m2.length, O, true);
1614
+ f2 ? ({ lineCount: M, removals: b } = j2(), M > O && (h2 || (O -= 1), { lineCount: M, removals: G2 } = k2())) : (h2 || (O -= 1), { lineCount: M, removals: G2 } = k2(), M > O && (O -= 1, { lineCount: M, removals: b } = j2())), b > 0 && (f2 = true, m2.splice(0, b)), G2 > 0 && (h2 = true, m2.splice(m2.length - G2, G2));
1615
+ }
1616
+ const S2 = [];
1617
+ f2 && S2.push(l);
1618
+ for (const b of m2)
1619
+ for (const G2 of b)
1620
+ S2.push(G2);
1621
+ return h2 && S2.push(l), S2;
1622
+ }, ue = (t) => {
1623
+ const i = t.active ?? "Yes", s = t.inactive ?? "No";
1624
+ return new X({ active: i, inactive: s, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue ?? true, render() {
1625
+ const r = t.withGuide ?? h.withGuide, u = `${P2(this.state)} `, n = r ? `${e("gray", $2)} ` : "", a = W(t.output, t.message, n, u), c = `${r ? `${e("gray", $2)}
1626
+ ` : ""}${a}
1627
+ `, o = this.value ? i : s;
1561
1628
  switch (this.state) {
1562
1629
  case "submit": {
1563
- const l = r ? `${t("gray", d2)} ` : "";
1564
- return `${c2}${l}${t("dim", a)}`;
1630
+ const l = r ? `${e("gray", $2)} ` : "";
1631
+ return `${c}${l}${e("dim", o)}`;
1565
1632
  }
1566
1633
  case "cancel": {
1567
- const l = r ? `${t("gray", d2)} ` : "";
1568
- return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
1569
- ${t("gray", d2)}` : ""}`;
1634
+ const l = r ? `${e("gray", $2)} ` : "";
1635
+ return `${c}${l}${e(["strikethrough", "dim"], o)}${r ? `
1636
+ ${e("gray", $2)}` : ""}`;
1570
1637
  }
1571
1638
  default: {
1572
- const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
1573
- return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
1574
- ${t("cyan", d2)} ` : `
1575
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
1576
- ${$2}
1639
+ const l = r ? `${e("cyan", $2)} ` : "", d = r ? e("cyan", x2) : "";
1640
+ return `${c}${l}${this.value ? `${e("green", z2)} ${i}` : `${e("dim", U2)} ${e("dim", i)}`}${t.vertical ? r ? `
1641
+ ${e("cyan", $2)} ` : `
1642
+ ` : ` ${e("dim", "/")} `}${this.value ? `${e("dim", U2)} ${e("dim", s)}` : `${e("green", z2)} ${s}`}
1643
+ ${d}
1577
1644
  `;
1578
1645
  }
1579
1646
  }
1580
1647
  } }).prompt();
1581
- }, O2, mt = (e = "", i) => {
1582
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
1583
- s.write(`${r}${e}
1648
+ }, R2, ge = (t = "", i) => {
1649
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? h.withGuide ? `${e("gray", lt)} ` : "";
1650
+ s.write(`${r}${t}
1584
1651
  `);
1585
- }, gt = (e = "", i) => {
1586
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
1587
- ${t("gray", E2)} ` : "";
1588
- s.write(`${r}${e}
1652
+ }, ye = (t = "", i) => {
1653
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? h.withGuide ? `${e("gray", $2)}
1654
+ ${e("gray", x2)} ` : "";
1655
+ s.write(`${r}${t}
1589
1656
 
1590
1657
  `);
1591
- }, ft = (e) => t("dim", e), vt = (e, i, s) => {
1592
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
1593
- `), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
1594
- return wrapAnsi(e, c2, r);
1595
- }, wt = (e = "", i = "", s) => {
1596
- const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
1597
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
1598
- const g = dist_default2(m);
1599
- return g > p2 ? g : p2;
1600
- }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
1601
- `), $2 = u2 ? `${t("gray", d2)}
1602
- ` : "", y2 = u2 ? Ge : de;
1603
- r.write(`${$2}${t("green", F2)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
1658
+ }, we = (t) => e("dim", t), be = (t, i, s) => {
1659
+ const r = { hard: true, trim: false }, u = wrapAnsi(t, i, r).split(`
1660
+ `), n = u.reduce((o, l) => Math.max(dist_default2(l), o), 0), a = u.map(s).reduce((o, l) => Math.max(dist_default2(l), o), 0), c = i - (a - n);
1661
+ return wrapAnsi(t, c, r);
1662
+ }, Se = (t = "", i = "", s) => {
1663
+ const r = s?.output ?? V2.stdout, u = s?.withGuide ?? h.withGuide, n = s?.format ?? we, a = ["", ...be(t, A(r) - 6, n).split(`
1664
+ `).map(n), ""], c = dist_default2(i), o = Math.max(a.reduce((p2, f2) => {
1665
+ const h2 = dist_default2(f2);
1666
+ return h2 > p2 ? h2 : p2;
1667
+ }, 0), c) + 2, l = a.map((p2) => `${e("gray", $2)} ${p2}${" ".repeat(o - dist_default2(p2))}${e("gray", $2)}`).join(`
1668
+ `), d = u ? `${e("gray", $2)}
1669
+ ` : "", g = u ? Gt : dt;
1670
+ r.write(`${d}${e("green", H2)} ${e("reset", i)} ${e("gray", st2.repeat(Math.max(o - c - 1, 1)) + ct)}
1604
1671
  ${l}
1605
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
1672
+ ${e("gray", g + st2.repeat(o + 2) + $t)}
1606
1673
  `);
1607
- }, Ve, re = (e, i) => e.includes(`
1608
- `) ? e.split(`
1674
+ }, jt, it2 = (t, i) => t.includes(`
1675
+ `) ? t.split(`
1609
1676
  `).map((s) => i(s)).join(`
1610
- `) : i(e), _t = (e) => {
1677
+ `) : i(t), xe = (t) => {
1611
1678
  const i = (s, r) => {
1612
- const u2 = s.label ?? String(s.value);
1679
+ const u = s.label ?? String(s.value);
1613
1680
  switch (r) {
1614
1681
  case "disabled":
1615
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1682
+ return `${e("gray", U2)} ${it2(u, (n) => e("gray", n))}${s.hint ? ` ${e("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1616
1683
  case "selected":
1617
- return `${re(u2, (n) => t("dim", n))}`;
1684
+ return `${it2(u, (n) => e("dim", n))}`;
1618
1685
  case "active":
1619
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1686
+ return `${e("green", z2)} ${u}${s.hint ? ` ${e("dim", `(${s.hint})`)}` : ""}`;
1620
1687
  case "cancelled":
1621
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1688
+ return `${it2(u, (n) => e(["strikethrough", "dim"], n))}`;
1622
1689
  default:
1623
- return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
1690
+ return `${e("dim", U2)} ${it2(u, (n) => e("dim", n))}`;
1624
1691
  }
1625
1692
  };
1626
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1627
- const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
1693
+ return new ut({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue, render() {
1694
+ const s = t.withGuide ?? h.withGuide, r = `${P2(this.state)} `, u = `${yt(this.state)} `, n = W(t.output, t.message, u, r), a = `${s ? `${e("gray", $2)}
1628
1695
  ` : ""}${n}
1629
1696
  `;
1630
1697
  switch (this.state) {
1631
1698
  case "submit": {
1632
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
1633
- return `${o}${a}`;
1699
+ const c = s ? `${e("gray", $2)} ` : "", o = W(t.output, i(this.options[this.cursor], "selected"), c);
1700
+ return `${a}${o}`;
1634
1701
  }
1635
1702
  case "cancel": {
1636
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
1637
- return `${o}${a}${s ? `
1638
- ${t("gray", d2)}` : ""}`;
1703
+ const c = s ? `${e("gray", $2)} ` : "", o = W(t.output, i(this.options[this.cursor], "cancelled"), c);
1704
+ return `${a}${o}${s ? `
1705
+ ${e("gray", $2)}` : ""}`;
1639
1706
  }
1640
1707
  default: {
1641
- const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
1642
- `).length, $2 = s ? 2 : 1;
1643
- return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
1644
- ${c2}`)}
1645
- ${a}
1708
+ const c = s ? `${e("cyan", $2)} ` : "", o = s ? e("cyan", x2) : "", l = a.split(`
1709
+ `).length, d = s ? 2 : 1;
1710
+ return `${a}${c}${F2({ output: t.output, cursor: this.cursor, options: this.options, maxItems: t.maxItems, columnPadding: c.length, rowPadding: l + d, style: (g, p2) => i(g, g.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
1711
+ ${c}`)}
1712
+ ${o}
1646
1713
  `;
1647
1714
  }
1648
1715
  }
1649
1716
  } }).prompt();
1650
- }, je;
1717
+ }, Nt;
1651
1718
  var init_dist4 = __esm(() => {
1652
1719
  init_dist3();
1653
1720
  init_dist3();
1654
1721
  init_main();
1655
1722
  init_dist2();
1656
1723
  import_sisteransi2 = __toESM(require_src(), 1);
1657
- ee = Ze();
1658
- _e = w2("\u25C6", "*");
1659
- oe = w2("\u25A0", "x");
1660
- ue = w2("\u25B2", "x");
1661
- F2 = w2("\u25C7", "o");
1662
- le = w2("\u250C", "T");
1663
- d2 = w2("\u2502", "|");
1664
- E2 = w2("\u2514", "\u2014");
1665
- Ie = w2("\u2510", "T");
1666
- Ee = w2("\u2518", "\u2014");
1724
+ tt2 = ee();
1725
+ Tt = w2("\u25C6", "*");
1726
+ at2 = w2("\u25A0", "x");
1727
+ ut2 = w2("\u25B2", "x");
1728
+ H2 = w2("\u25C7", "o");
1729
+ lt = w2("\u250C", "T");
1730
+ $2 = w2("\u2502", "|");
1731
+ x2 = w2("\u2514", "\u2014");
1732
+ _t = w2("\u2510", "T");
1733
+ xt = w2("\u2518", "\u2014");
1667
1734
  z2 = w2("\u25CF", ">");
1668
- H2 = w2("\u25CB", " ");
1669
- te = w2("\u25FB", "[\u2022]");
1670
- U = w2("\u25FC", "[+]");
1671
- J2 = w2("\u25FB", "[ ]");
1672
- xe = w2("\u25AA", "\u2022");
1673
- se = w2("\u2500", "-");
1674
- ce = w2("\u256E", "+");
1675
- Ge = w2("\u251C", "+");
1676
- $e = w2("\u256F", "+");
1677
- de = w2("\u2570", "+");
1678
- Oe = w2("\u256D", "+");
1679
- he = w2("\u25CF", "\u2022");
1680
- pe = w2("\u25C6", "*");
1681
- me = w2("\u25B2", "!");
1682
- ge = w2("\u25A0", "x");
1683
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
1684
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
1685
- for (let p2 = 0;p2 < u2; p2++)
1686
- o.push(a);
1687
- const y2 = Array.isArray(e) ? e : e.split(`
1735
+ U2 = w2("\u25CB", " ");
1736
+ et2 = w2("\u25FB", "[\u2022]");
1737
+ K2 = w2("\u25FC", "[+]");
1738
+ Y2 = w2("\u25FB", "[ ]");
1739
+ Et = w2("\u25AA", "\u2022");
1740
+ st2 = w2("\u2500", "-");
1741
+ ct = w2("\u256E", "+");
1742
+ Gt = w2("\u251C", "+");
1743
+ $t = w2("\u256F", "+");
1744
+ dt = w2("\u2570", "+");
1745
+ Mt = w2("\u256D", "+");
1746
+ ht2 = w2("\u25CF", "\u2022");
1747
+ pt = w2("\u25C6", "*");
1748
+ mt = w2("\u25B2", "!");
1749
+ gt = w2("\u25A0", "x");
1750
+ R2 = { message: (t = [], { symbol: i = e("gray", $2), secondarySymbol: s = e("gray", $2), output: r = process.stdout, spacing: u = 1, withGuide: n } = {}) => {
1751
+ const a = [], c = n ?? h.withGuide, o = c ? s : "", l = c ? `${i} ` : "", d = c ? `${s} ` : "";
1752
+ for (let p2 = 0;p2 < u; p2++)
1753
+ a.push(o);
1754
+ const g = Array.isArray(t) ? t : t.split(`
1688
1755
  `);
1689
- if (y2.length > 0) {
1690
- const [p2, ...m] = y2;
1691
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
1692
- for (const g of m)
1693
- g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
1756
+ if (g.length > 0) {
1757
+ const [p2, ...f2] = g;
1758
+ p2.length > 0 ? a.push(`${l}${p2}`) : a.push(c ? i : "");
1759
+ for (const h2 of f2)
1760
+ h2.length > 0 ? a.push(`${d}${h2}`) : a.push(c ? s : "");
1694
1761
  }
1695
- r.write(`${o.join(`
1762
+ r.write(`${a.join(`
1696
1763
  `)}
1697
1764
  `);
1698
- }, info: (e, i) => {
1699
- O2.message(e, { ...i, symbol: t("blue", he) });
1700
- }, success: (e, i) => {
1701
- O2.message(e, { ...i, symbol: t("green", pe) });
1702
- }, step: (e, i) => {
1703
- O2.message(e, { ...i, symbol: t("green", F2) });
1704
- }, warn: (e, i) => {
1705
- O2.message(e, { ...i, symbol: t("yellow", me) });
1706
- }, warning: (e, i) => {
1707
- O2.warn(e, i);
1708
- }, error: (e, i) => {
1709
- O2.message(e, { ...i, symbol: t("red", ge) });
1765
+ }, info: (t, i) => {
1766
+ R2.message(t, { ...i, symbol: e("blue", ht2) });
1767
+ }, success: (t, i) => {
1768
+ R2.message(t, { ...i, symbol: e("green", pt) });
1769
+ }, step: (t, i) => {
1770
+ R2.message(t, { ...i, symbol: e("green", H2) });
1771
+ }, warn: (t, i) => {
1772
+ R2.message(t, { ...i, symbol: e("yellow", mt) });
1773
+ }, warning: (t, i) => {
1774
+ R2.warn(t, i);
1775
+ }, error: (t, i) => {
1776
+ R2.message(t, { ...i, symbol: e("red", gt) });
1710
1777
  } };
1711
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
1712
- je = `${t("gray", d2)} `;
1778
+ jt = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
1779
+ Nt = `${e("gray", $2)} `;
1713
1780
  });
1714
1781
 
1715
1782
  // bin/src/shared.ts
@@ -2432,21 +2499,21 @@ var init_init = __esm(async () => {
2432
2499
  { tool: "codex", required: false, hint: "Install the Codex CLI to let Codex scaffold .webmux.yaml" },
2433
2500
  { tool: "docker", required: false, hint: "https://docs.docker.com/get-started/get-docker/" }
2434
2501
  ];
2435
- mt("webmux init");
2502
+ ge("webmux init");
2436
2503
  gitRoot = getGitRoot();
2437
2504
  if (!gitRoot) {
2438
- O2.error("Not inside a git repository. Run this from within a project.");
2439
- gt("Aborted.");
2505
+ R2.error("Not inside a git repository. Run this from within a project.");
2506
+ ye("Aborted.");
2440
2507
  process.exit(1);
2441
2508
  }
2442
- O2.success(`Git root: ${gitRoot}`);
2443
- O2.step("Checking dependencies...");
2509
+ R2.success(`Git root: ${gitRoot}`);
2510
+ R2.step("Checking dependencies...");
2444
2511
  missing = checkDeps();
2445
2512
  if (missing.length > 0) {
2446
- const lines = missing.map((d3) => ` ${d3.tool}: ${d3.hint}`).join(`
2513
+ const lines = missing.map((d) => ` ${d.tool}: ${d.hint}`).join(`
2447
2514
  `);
2448
- wt(lines, "Install these required dependencies, then re-run webmux init");
2449
- gt("Setup incomplete.");
2515
+ Se(lines, "Install these required dependencies, then re-run webmux init");
2516
+ ye("Setup incomplete.");
2450
2517
  process.exit(1);
2451
2518
  }
2452
2519
  bunVersionResult = run("bun", ["--version"]);
@@ -2456,28 +2523,28 @@ var init_init = __esm(async () => {
2456
2523
  const [reqMajor, reqMinor, reqPatch] = MIN_BUN_VERSION.split(".").map(Number);
2457
2524
  const tooOld = major < reqMajor || major === reqMajor && minor < reqMinor || major === reqMajor && minor === reqMinor && patch < reqPatch;
2458
2525
  if (tooOld) {
2459
- O2.error(`Bun ${bunVersion} is too old. webmux requires Bun >= ${MIN_BUN_VERSION}.`);
2460
- O2.info("Upgrade with: bun upgrade");
2461
- gt("Setup incomplete.");
2526
+ R2.error(`Bun ${bunVersion} is too old. webmux requires Bun >= ${MIN_BUN_VERSION}.`);
2527
+ R2.info("Upgrade with: bun upgrade");
2528
+ ye("Setup incomplete.");
2462
2529
  process.exit(1);
2463
2530
  }
2464
2531
  }
2465
2532
  if (which("gh")) {
2466
2533
  const ghAuth = run("gh", ["auth", "status"]);
2467
2534
  if (!ghAuth.success) {
2468
- O2.warning("gh is installed but not authenticated. Run: gh auth login");
2535
+ R2.warning("gh is installed but not authenticated. Run: gh auth login");
2469
2536
  } else {
2470
- O2.success("gh \u2014 authenticated");
2537
+ R2.success("gh \u2014 authenticated");
2471
2538
  }
2472
2539
  }
2473
- O2.step("Checking config files...");
2540
+ R2.step("Checking config files...");
2474
2541
  webmuxYaml = join4(gitRoot, ".webmux.yaml");
2475
2542
  if (existsSync3(webmuxYaml)) {
2476
- O2.info(".webmux.yaml already exists, skipping");
2543
+ R2.info(".webmux.yaml already exists, skipping");
2477
2544
  } else {
2478
2545
  const claudeAvailable = which("claude");
2479
2546
  const codexAvailable = which("codex");
2480
- const choice = await _t({
2547
+ const choice = await xe({
2481
2548
  message: "No .webmux.yaml found. How should webmux create it?",
2482
2549
  initialValue: claudeAvailable ? "claude" : codexAvailable ? "codex" : "manual",
2483
2550
  options: [
@@ -2501,7 +2568,7 @@ var init_init = __esm(async () => {
2501
2568
  ]
2502
2569
  });
2503
2570
  if (q(choice)) {
2504
- gt("Aborted.");
2571
+ ye("Aborted.");
2505
2572
  process.exit(1);
2506
2573
  }
2507
2574
  const selectedAgent = choice === "codex" ? "codex" : defaultTemplateAgent();
@@ -2513,7 +2580,7 @@ var init_init = __esm(async () => {
2513
2580
  defaultAgent: context.defaultAgent,
2514
2581
  packageManager: context.packageManager
2515
2582
  }));
2516
- O2.success(".webmux.yaml starter template created");
2583
+ R2.success(".webmux.yaml starter template created");
2517
2584
  } else {
2518
2585
  const label = agentLabel(choice);
2519
2586
  const starterTemplate = buildStarterTemplate({
@@ -2526,11 +2593,11 @@ var init_init = __esm(async () => {
2526
2593
  const prompt = buildInitPromptSpec({ ...context, defaultAgent: choice });
2527
2594
  const command = buildInitAgentCommand(choice, prompt);
2528
2595
  const streamPrinter = createAgentStreamPrinter(label);
2529
- O2.step(`Running ${label} to adapt the starter .webmux.yaml...`);
2596
+ R2.step(`Running ${label} to adapt the starter .webmux.yaml...`);
2530
2597
  const result = await runInitAgentCommand(command, gitRoot, { onEvent: streamPrinter.onEvent });
2531
2598
  streamPrinter.finish();
2532
2599
  if (!existsSync3(webmuxYaml)) {
2533
- O2.error(`${label} removed .webmux.yaml`);
2600
+ R2.error(`${label} removed .webmux.yaml`);
2534
2601
  const details = [
2535
2602
  result.summary ? `Summary:
2536
2603
  ${result.summary}` : "",
@@ -2540,35 +2607,35 @@ ${result.stderr.trim()}` : ""
2540
2607
 
2541
2608
  `);
2542
2609
  if (details) {
2543
- wt(details, `${label} output`);
2610
+ Se(details, `${label} output`);
2544
2611
  }
2545
- gt("Setup incomplete.");
2612
+ ye("Setup incomplete.");
2546
2613
  process.exit(1);
2547
2614
  }
2548
2615
  const finalYaml = await Bun.file(webmuxYaml).text();
2549
2616
  const changedTemplate = finalYaml !== starterTemplate;
2550
2617
  if (result.exitCode === 0 && changedTemplate) {
2551
- O2.success(`${label} adapted .webmux.yaml`);
2618
+ R2.success(`${label} adapted .webmux.yaml`);
2552
2619
  } else if (result.exitCode === 0) {
2553
- O2.warning(`${label} left the starter template unchanged`);
2554
- O2.warning(`${label} did not change the starter template. Review .webmux.yaml manually.`);
2620
+ R2.warning(`${label} left the starter template unchanged`);
2621
+ R2.warning(`${label} did not change the starter template. Review .webmux.yaml manually.`);
2555
2622
  } else if (changedTemplate) {
2556
- O2.warning(`${label} updated .webmux.yaml`);
2557
- O2.warning(`${label} exited with code ${result.exitCode}. Review the generated file before using it.`);
2623
+ R2.warning(`${label} updated .webmux.yaml`);
2624
+ R2.warning(`${label} exited with code ${result.exitCode}. Review the generated file before using it.`);
2558
2625
  } else {
2559
- O2.warning(`${label} left the starter template in place`);
2560
- O2.warning(`${label} exited with code ${result.exitCode}. The starter template is still there for manual editing.`);
2626
+ R2.warning(`${label} left the starter template in place`);
2627
+ R2.warning(`${label} exited with code ${result.exitCode}. The starter template is still there for manual editing.`);
2561
2628
  }
2562
2629
  if (result.summary && !streamPrinter.sawAssistantText()) {
2563
- wt(result.summary, `${label} summary`);
2630
+ Se(result.summary, `${label} summary`);
2564
2631
  }
2565
2632
  const trimmedStderr = result.stderr.trim();
2566
2633
  if (trimmedStderr) {
2567
- wt(trimmedStderr, `${label} stderr`);
2634
+ Se(trimmedStderr, `${label} stderr`);
2568
2635
  }
2569
2636
  }
2570
2637
  }
2571
- gt("You're all set! Next steps:");
2638
+ ye("You're all set! Next steps:");
2572
2639
  console.log();
2573
2640
  console.log(" 1. Review .webmux.yaml and adjust panes, ports, and profiles if needed");
2574
2641
  console.log(" 2. Run: webmux");
@@ -2714,9 +2781,9 @@ function isInstalled(config) {
2714
2781
  async function install(config) {
2715
2782
  const filePath = serviceFilePath(config);
2716
2783
  if (isInstalled(config)) {
2717
- const reinstall = await ot2({ message: "Service is already installed. Reinstall?" });
2784
+ const reinstall = await ue({ message: "Service is already installed. Reinstall?" });
2718
2785
  if (q(reinstall) || !reinstall) {
2719
- O2.info("Aborted.");
2786
+ R2.info("Aborted.");
2720
2787
  return;
2721
2788
  }
2722
2789
  for (const cmd of uninstallCommands(config)) {
@@ -2725,77 +2792,77 @@ async function install(config) {
2725
2792
  }
2726
2793
  const content = generateServiceFile(config);
2727
2794
  const commands = installCommands(config);
2728
- wt([
2795
+ Se([
2729
2796
  `File: ${filePath}`,
2730
2797
  "",
2731
2798
  "Contents:",
2732
2799
  content,
2733
2800
  "Commands to run:",
2734
- ...commands.map((c2) => ` $ ${formatCommand(c2)}`)
2801
+ ...commands.map((c) => ` $ ${formatCommand(c)}`)
2735
2802
  ].join(`
2736
2803
  `), "Install service");
2737
- const ok = await ot2({ message: "Proceed?" });
2804
+ const ok = await ue({ message: "Proceed?" });
2738
2805
  if (q(ok) || !ok) {
2739
- O2.info("Aborted.");
2806
+ R2.info("Aborted.");
2740
2807
  return;
2741
2808
  }
2742
2809
  mkdirSync(filePath.substring(0, filePath.lastIndexOf("/")), { recursive: true });
2743
2810
  await Bun.write(filePath, content);
2744
- O2.success(`Wrote ${filePath}`);
2811
+ R2.success(`Wrote ${filePath}`);
2745
2812
  for (const cmd of commands) {
2746
2813
  const result = runCommand(cmd);
2747
2814
  if (!result.success) {
2748
- O2.error(`Command failed: ${formatCommand(cmd)}
2815
+ R2.error(`Command failed: ${formatCommand(cmd)}
2749
2816
  ${result.stderr.toString()}`);
2750
2817
  return;
2751
2818
  }
2752
- O2.success(`$ ${formatCommand(cmd)}`);
2819
+ R2.success(`$ ${formatCommand(cmd)}`);
2753
2820
  }
2754
- O2.success("Service installed and started!");
2821
+ R2.success("Service installed and started!");
2755
2822
  if (config.platform === "linux") {
2756
- wt(`To keep the service running after logout, run:
2823
+ Se(`To keep the service running after logout, run:
2757
2824
  loginctl enable-linger $USER
2758
2825
 
2759
2826
  (May require admin privileges on some systems.)`, "Tip");
2760
2827
  }
2761
- O2.info(`Check status: webmux service status`);
2762
- O2.info(`View logs: webmux service logs`);
2828
+ R2.info(`Check status: webmux service status`);
2829
+ R2.info(`View logs: webmux service logs`);
2763
2830
  }
2764
2831
  async function uninstall(config) {
2765
2832
  const filePath = serviceFilePath(config);
2766
2833
  if (!isInstalled(config)) {
2767
- O2.error("Service is not installed.");
2834
+ R2.error("Service is not installed.");
2768
2835
  return;
2769
2836
  }
2770
2837
  const commands = uninstallCommands(config);
2771
- wt([
2838
+ Se([
2772
2839
  `File to remove: ${filePath}`,
2773
2840
  "",
2774
2841
  "Commands to run:",
2775
- ...commands.map((c2) => ` $ ${formatCommand(c2)}`)
2842
+ ...commands.map((c) => ` $ ${formatCommand(c)}`)
2776
2843
  ].join(`
2777
2844
  `), "Uninstall service");
2778
- const ok = await ot2({ message: "Proceed?" });
2845
+ const ok = await ue({ message: "Proceed?" });
2779
2846
  if (q(ok) || !ok) {
2780
- O2.info("Aborted.");
2847
+ R2.info("Aborted.");
2781
2848
  return;
2782
2849
  }
2783
2850
  for (const cmd of commands) {
2784
2851
  const result = runCommand(cmd);
2785
2852
  if (!result.success) {
2786
- O2.warning(`Command failed: ${formatCommand(cmd)}
2853
+ R2.warning(`Command failed: ${formatCommand(cmd)}
2787
2854
  ${result.stderr.toString()}`);
2788
2855
  } else {
2789
- O2.success(`$ ${formatCommand(cmd)}`);
2856
+ R2.success(`$ ${formatCommand(cmd)}`);
2790
2857
  }
2791
2858
  }
2792
2859
  unlinkSync(filePath);
2793
- O2.success(`Removed ${filePath}`);
2794
- O2.success("Service uninstalled.");
2860
+ R2.success(`Removed ${filePath}`);
2861
+ R2.success("Service uninstalled.");
2795
2862
  }
2796
2863
  function status(config) {
2797
2864
  if (!isInstalled(config)) {
2798
- O2.error("Service is not installed.");
2865
+ R2.error("Service is not installed.");
2799
2866
  return;
2800
2867
  }
2801
2868
  if (config.platform === "linux") {
@@ -2806,7 +2873,7 @@ function status(config) {
2806
2873
  }
2807
2874
  function logs(config) {
2808
2875
  if (!isInstalled(config)) {
2809
- O2.error("Service is not installed.");
2876
+ R2.error("Service is not installed.");
2810
2877
  return;
2811
2878
  }
2812
2879
  let proc;
@@ -2815,7 +2882,7 @@ function logs(config) {
2815
2882
  } else {
2816
2883
  const logPath = join5(homedir(), "Library", "Logs", `webmux-${config.serviceName}.log`);
2817
2884
  if (!existsSync4(logPath)) {
2818
- O2.error(`Log file not found: ${logPath}`);
2885
+ R2.error(`Log file not found: ${logPath}`);
2819
2886
  return;
2820
2887
  }
2821
2888
  proc = Bun.spawn(["tail", "-f", logPath], {
@@ -2844,29 +2911,29 @@ async function service(args) {
2844
2911
  return;
2845
2912
  }
2846
2913
  if (!["install", "uninstall", "status", "logs"].includes(action)) {
2847
- O2.error(`Unknown action: ${action}`);
2914
+ R2.error(`Unknown action: ${action}`);
2848
2915
  usage();
2849
2916
  return;
2850
2917
  }
2851
2918
  const platform = getPlatform();
2852
2919
  if (!platform) {
2853
- O2.error(`Unsupported platform: ${process.platform}. Only linux and macOS are supported.`);
2920
+ R2.error(`Unsupported platform: ${process.platform}. Only linux and macOS are supported.`);
2854
2921
  return;
2855
2922
  }
2856
2923
  const gitRoot2 = getGitRoot();
2857
2924
  if (!gitRoot2) {
2858
- O2.error("Not inside a git repository.");
2925
+ R2.error("Not inside a git repository.");
2859
2926
  return;
2860
2927
  }
2861
2928
  const serviceManager = platform === "linux" ? "systemctl" : "launchctl";
2862
2929
  const smResult = run("which", [serviceManager]);
2863
2930
  if (!smResult.success) {
2864
- O2.error(`${serviceManager} not found. Cannot manage services on this system.`);
2931
+ R2.error(`${serviceManager} not found. Cannot manage services on this system.`);
2865
2932
  return;
2866
2933
  }
2867
2934
  const webmuxPath = resolveWebmuxPath();
2868
2935
  if (!webmuxPath) {
2869
- O2.error("Could not find webmux in PATH.");
2936
+ R2.error("Could not find webmux in PATH.");
2870
2937
  return;
2871
2938
  }
2872
2939
  let port = parseInt(process.env.PORT || "5111");
@@ -2874,7 +2941,7 @@ async function service(args) {
2874
2941
  if (args[i] === "--port" && args[i + 1]) {
2875
2942
  const parsed = parseInt(args[++i]);
2876
2943
  if (Number.isNaN(parsed)) {
2877
- O2.error("--port requires a numeric value");
2944
+ R2.error("--port requires a numeric value");
2878
2945
  return;
2879
2946
  }
2880
2947
  port = parsed;
@@ -2912,8 +2979,8 @@ var init_service = __esm(() => {
2912
2979
 
2913
2980
  // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
2914
2981
  var util, objectUtil, ZodParsedType, getParsedType = (data) => {
2915
- const t2 = typeof data;
2916
- switch (t2) {
2982
+ const t = typeof data;
2983
+ switch (t) {
2917
2984
  case "undefined":
2918
2985
  return ZodParsedType.undefined;
2919
2986
  case "string":
@@ -2977,8 +3044,8 @@ var init_util = __esm(() => {
2977
3044
  return util2.objectValues(filtered);
2978
3045
  };
2979
3046
  util2.objectValues = (obj) => {
2980
- return util2.objectKeys(obj).map(function(e) {
2981
- return obj[e];
3047
+ return util2.objectKeys(obj).map(function(e2) {
3048
+ return obj[e2];
2982
3049
  });
2983
3050
  };
2984
3051
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
@@ -3294,7 +3361,7 @@ function addIssueToContext(ctx, issueData) {
3294
3361
  ctx.schemaErrorMap,
3295
3362
  overrideMap,
3296
3363
  overrideMap === en_default ? undefined : en_default
3297
- ].filter((x) => !!x)
3364
+ ].filter((x3) => !!x3)
3298
3365
  });
3299
3366
  ctx.common.issues.push(issue);
3300
3367
  }
@@ -3368,7 +3435,7 @@ var makeIssue = (params) => {
3368
3435
  };
3369
3436
  }
3370
3437
  let errorMessage2 = "";
3371
- const maps = errorMaps.filter((m) => !!m).slice().reverse();
3438
+ const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
3372
3439
  for (const map of maps) {
3373
3440
  errorMessage2 = map(fullIssue, { data, defaultError: errorMessage2 }).message;
3374
3441
  }
@@ -3377,7 +3444,7 @@ var makeIssue = (params) => {
3377
3444
  path: fullPath,
3378
3445
  message: errorMessage2
3379
3446
  };
3380
- }, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x) => x.status === "aborted", isDirty = (x) => x.status === "dirty", isValid = (x) => x.status === "valid", isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
3447
+ }, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x3) => x3.status === "aborted", isDirty = (x3) => x3.status === "dirty", isValid = (x3) => x3.status === "valid", isAsync = (x3) => typeof Promise !== "undefined" && x3 instanceof Promise;
3381
3448
  var init_parseUtil = __esm(() => {
3382
3449
  init_errors();
3383
3450
  init_en();
@@ -5781,7 +5848,7 @@ var init_types = __esm(() => {
5781
5848
  if (!schema)
5782
5849
  return null;
5783
5850
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
5784
- }).filter((x) => !!x);
5851
+ }).filter((x3) => !!x3);
5785
5852
  if (ctx.common.async) {
5786
5853
  return Promise.all(items).then((results) => {
5787
5854
  return ParseStatus.mergeArray(status2, results);
@@ -6034,7 +6101,7 @@ var init_types = __esm(() => {
6034
6101
  return makeIssue({
6035
6102
  data: args,
6036
6103
  path: ctx.path,
6037
- errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
6104
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x3) => !!x3),
6038
6105
  issueData: {
6039
6106
  code: ZodIssueCode.invalid_arguments,
6040
6107
  argumentsError: error
@@ -6045,7 +6112,7 @@ var init_types = __esm(() => {
6045
6112
  return makeIssue({
6046
6113
  data: returns,
6047
6114
  path: ctx.path,
6048
- errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
6115
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x3) => !!x3),
6049
6116
  issueData: {
6050
6117
  code: ZodIssueCode.invalid_return_type,
6051
6118
  returnTypeError: error
@@ -6055,29 +6122,29 @@ var init_types = __esm(() => {
6055
6122
  const params = { errorMap: ctx.common.contextualErrorMap };
6056
6123
  const fn = ctx.data;
6057
6124
  if (this._def.returns instanceof ZodPromise) {
6058
- const me2 = this;
6125
+ const me = this;
6059
6126
  return OK(async function(...args) {
6060
6127
  const error = new ZodError([]);
6061
- const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
6062
- error.addIssue(makeArgsIssue(args, e));
6128
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {
6129
+ error.addIssue(makeArgsIssue(args, e2));
6063
6130
  throw error;
6064
6131
  });
6065
6132
  const result = await Reflect.apply(fn, this, parsedArgs);
6066
- const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
6067
- error.addIssue(makeReturnsIssue(result, e));
6133
+ const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {
6134
+ error.addIssue(makeReturnsIssue(result, e2));
6068
6135
  throw error;
6069
6136
  });
6070
6137
  return parsedReturns;
6071
6138
  });
6072
6139
  } else {
6073
- const me2 = this;
6140
+ const me = this;
6074
6141
  return OK(function(...args) {
6075
- const parsedArgs = me2._def.args.safeParse(args, params);
6142
+ const parsedArgs = me._def.args.safeParse(args, params);
6076
6143
  if (!parsedArgs.success) {
6077
6144
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
6078
6145
  }
6079
6146
  const result = Reflect.apply(fn, this, parsedArgs.data);
6080
- const parsedReturns = me2._def.returns.safeParse(result, params);
6147
+ const parsedReturns = me._def.returns.safeParse(result, params);
6081
6148
  if (!parsedReturns.success) {
6082
6149
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
6083
6150
  }
@@ -6876,7 +6943,7 @@ var init_zod = __esm(() => {
6876
6943
  init_external();
6877
6944
  });
6878
6945
 
6879
- // node_modules/.bun/@ts-rest+core@3.52.1+63a57e97cf90626f/node_modules/@ts-rest/core/index.esm.mjs
6946
+ // node_modules/.bun/@ts-rest+core@3.52.1+1c8a9bbc689bc595/node_modules/@ts-rest/core/index.esm.mjs
6880
6947
  var isZodType = (obj) => {
6881
6948
  return typeof (obj === null || obj === undefined ? undefined : obj.safeParse) === "function";
6882
6949
  }, isZodObjectStrict = (obj) => {
@@ -6963,7 +7030,7 @@ var isZodType = (obj) => {
6963
7030
  }).join("&");
6964
7031
  }, tokeniseValue = (key, value) => {
6965
7032
  if (Array.isArray(value)) {
6966
- return value.flatMap((v, idx) => tokeniseValue(`${key}[${idx}]`, v));
7033
+ return value.flatMap((v2, idx) => tokeniseValue(`${key}[${idx}]`, v2));
6967
7034
  }
6968
7035
  if (value instanceof Date) {
6969
7036
  return [[`${key}`, value.toISOString()]];
@@ -7033,7 +7100,7 @@ var isZodType = (obj) => {
7033
7100
  });
7034
7101
  return formData;
7035
7102
  }, normalizeHeaders = (headers) => {
7036
- return Object.fromEntries(Object.entries(headers).map(([k2, v]) => [k2.toLowerCase(), v]));
7103
+ return Object.fromEntries(Object.entries(headers).map(([k2, v2]) => [k2.toLowerCase(), v2]));
7037
7104
  }, fetchApi = (options) => {
7038
7105
  const { path, clientArgs, route, body, query, extraInputArgs, headers, fetchOptions } = options;
7039
7106
  const apiFetcher = clientArgs.api || tsRestFetchApi;
@@ -7190,7 +7257,7 @@ var init_index_esm = __esm(() => {
7190
7257
  });
7191
7258
 
7192
7259
  // packages/api-contract/src/schemas.ts
7193
- var BooleanLikeSchema, ErrorResponseSchema, OkResponseSchema, EnabledResponseSchema, BuiltInAgentIdSchema, AgentIdSchema, WorktreeCreateModeSchema, AgentCapabilitiesSchema, AgentSummarySchema, AgentDetailsSchema, AgentListResponseSchema, UpsertCustomAgentRequestSchema, AgentResponseSchema, ValidateCustomAgentResponseSchema, WorktreeCreationPhaseSchema, AvailableBranchSchema, AvailableBranchesQuerySchema, NumberLikePathParamSchema, BranchListResponseSchema, CreateWorktreeRequestSchema, CreateWorktreeResponseSchema, SetWorktreeArchivedRequestSchema, SetWorktreeArchivedResponseSchema, ToggleEnabledRequestSchema, SendWorktreePromptRequestSchema, AgentsSendMessageRequestSchema, PullMainRequestSchema, PullMainStatusSchema, PullMainResponseSchema, ServiceStatusSchema, PrCommentSchema, CiCheckSchema, PrEntrySchema, LinearIssueLabelSchema, LinearIssueStateSchema, LinkedLinearIssueSchema, LinearIssueSchema, LinearIssueAvailabilitySchema, LinearIssuesResponseSchema, WorktreeCreationStateSchema, AppNotificationSchema, ProjectWorktreeSnapshotSchema, ProjectSnapshotSchema, WorktreeConversationProviderSchema, CodexWorktreeConversationRefSchema, ClaudeWorktreeConversationRefSchema, WorktreeConversationRefSchema, AgentsUiWorktreeSummarySchema, AgentsUiConversationMessageRoleSchema, AgentsUiConversationMessageStatusSchema, AgentsUiConversationMessageSchema, AgentsUiConversationStateSchema, AgentsUiWorktreeConversationResponseSchema, AgentsUiSendMessageResponseSchema, AgentsUiInterruptResponseSchema, AgentsUiConversationSnapshotEventSchema, AgentsUiConversationMessageDeltaEventSchema, AgentsUiConversationErrorEventSchema, AgentsUiConversationEventSchema, WorktreeListResponseSchema, UnpushedCommitSchema, WorktreeDiffResponseSchema, ServiceConfigSchema, ProfileConfigSchema, LinkedRepoInfoSchema, AppConfigSchema, CiLogsResponseSchema, WorktreeNameParamsSchema, NotificationIdParamsSchema, AgentIdParamsSchema, RunIdParamsSchema;
7260
+ var BooleanLikeSchema, ErrorResponseSchema, OkResponseSchema, EnabledResponseSchema, BuiltInAgentIdSchema, AgentIdSchema, WorktreeCreateModeSchema, AgentCapabilitiesSchema, AgentSummarySchema, AgentDetailsSchema, AgentListResponseSchema, UpsertCustomAgentRequestSchema, AgentResponseSchema, ValidateCustomAgentResponseSchema, WorktreeCreationPhaseSchema, AvailableBranchSchema, AvailableBranchesQuerySchema, NumberLikePathParamSchema, BranchListResponseSchema, CreateWorktreeRequestSchema, CreateWorktreeResponseSchema, SetWorktreeArchivedRequestSchema, SetWorktreeArchivedResponseSchema, SetWorktreeLabelRequestSchema, SetWorktreeLabelResponseSchema, ToggleEnabledRequestSchema, SendWorktreePromptRequestSchema, AgentsSendMessageRequestSchema, PullMainRequestSchema, PullMainStatusSchema, PullMainResponseSchema, ServiceStatusSchema, PrCommentSchema, CiCheckSchema, PrEntrySchema, LinearIssueLabelSchema, LinearIssueStateSchema, LinkedLinearIssueSchema, LinearIssueSchema, LinearIssueAvailabilitySchema, LinearIssuesResponseSchema, WorktreeCreationStateSchema, AppNotificationSchema, ProjectWorktreeSnapshotSchema, ProjectSnapshotSchema, WorktreeConversationProviderSchema, CodexWorktreeConversationRefSchema, ClaudeWorktreeConversationRefSchema, WorktreeConversationRefSchema, AgentsUiWorktreeSummarySchema, AgentsUiConversationMessageRoleSchema, AgentsUiConversationMessageStatusSchema, AgentsUiConversationMessageSchema, AgentsUiConversationStateSchema, AgentsUiWorktreeConversationResponseSchema, AgentsUiSendMessageResponseSchema, AgentsUiInterruptResponseSchema, AgentsUiConversationSnapshotEventSchema, AgentsUiConversationMessageDeltaEventSchema, AgentsUiConversationErrorEventSchema, AgentsUiConversationEventSchema, WorktreeListResponseSchema, UnpushedCommitSchema, WorktreeDiffResponseSchema, ServiceConfigSchema, ProfileConfigSchema, LinkedRepoInfoSchema, AppConfigSchema, CiLogsResponseSchema, WorktreeNameParamsSchema, NotificationIdParamsSchema, AgentIdParamsSchema, RunIdParamsSchema;
7194
7261
  var init_schemas = __esm(() => {
7195
7262
  init_zod();
7196
7263
  BooleanLikeSchema = exports_external.union([
@@ -7290,6 +7357,13 @@ var init_schemas = __esm(() => {
7290
7357
  ok: exports_external.literal(true),
7291
7358
  archived: exports_external.boolean()
7292
7359
  });
7360
+ SetWorktreeLabelRequestSchema = exports_external.object({
7361
+ label: exports_external.string().trim().max(80).nullable()
7362
+ });
7363
+ SetWorktreeLabelResponseSchema = exports_external.object({
7364
+ ok: exports_external.literal(true),
7365
+ label: exports_external.string().nullable()
7366
+ });
7293
7367
  ToggleEnabledRequestSchema = exports_external.object({
7294
7368
  enabled: exports_external.boolean()
7295
7369
  });
@@ -7399,6 +7473,7 @@ var init_schemas = __esm(() => {
7399
7473
  });
7400
7474
  ProjectWorktreeSnapshotSchema = exports_external.object({
7401
7475
  branch: exports_external.string(),
7476
+ label: exports_external.string().nullable(),
7402
7477
  baseBranch: exports_external.string().optional(),
7403
7478
  path: exports_external.string(),
7404
7479
  dir: exports_external.string(),
@@ -7573,11 +7648,11 @@ var init_schemas = __esm(() => {
7573
7648
  });
7574
7649
 
7575
7650
  // packages/api-contract/src/contract.ts
7576
- var c2, apiPaths, commonErrorResponses, apiContract;
7651
+ var c, apiPaths, commonErrorResponses, apiContract;
7577
7652
  var init_contract = __esm(() => {
7578
7653
  init_index_esm();
7579
7654
  init_schemas();
7580
- c2 = initContract();
7655
+ c = initContract();
7581
7656
  apiPaths = {
7582
7657
  fetchConfig: "/api/config",
7583
7658
  fetchAvailableBranches: "/api/branches",
@@ -7599,6 +7674,7 @@ var init_contract = __esm(() => {
7599
7674
  openWorktree: "/api/worktrees/:name/open",
7600
7675
  closeWorktree: "/api/worktrees/:name/close",
7601
7676
  setWorktreeArchived: "/api/worktrees/:name/archive",
7677
+ setWorktreeLabel: "/api/worktrees/:name/label",
7602
7678
  sendWorktreePrompt: "/api/worktrees/:name/send",
7603
7679
  mergeWorktree: "/api/worktrees/:name/merge",
7604
7680
  fetchWorktreeDiff: "/api/worktrees/:name/diff",
@@ -7617,7 +7693,7 @@ var init_contract = __esm(() => {
7617
7693
  502: ErrorResponseSchema,
7618
7694
  503: ErrorResponseSchema
7619
7695
  };
7620
- apiContract = c2.router({
7696
+ apiContract = c.router({
7621
7697
  fetchConfig: {
7622
7698
  method: "GET",
7623
7699
  path: apiPaths.fetchConfig,
@@ -7688,7 +7764,7 @@ var init_contract = __esm(() => {
7688
7764
  method: "DELETE",
7689
7765
  path: apiPaths.deleteAgent,
7690
7766
  pathParams: AgentIdParamsSchema,
7691
- body: c2.noBody(),
7767
+ body: c.noBody(),
7692
7768
  responses: {
7693
7769
  200: OkResponseSchema,
7694
7770
  400: ErrorResponseSchema,
@@ -7710,7 +7786,7 @@ var init_contract = __esm(() => {
7710
7786
  method: "POST",
7711
7787
  path: apiPaths.attachAgentsWorktreeConversation,
7712
7788
  pathParams: WorktreeNameParamsSchema,
7713
- body: c2.noBody(),
7789
+ body: c.noBody(),
7714
7790
  responses: {
7715
7791
  200: AgentsUiWorktreeConversationResponseSchema,
7716
7792
  ...commonErrorResponses
@@ -7739,7 +7815,7 @@ var init_contract = __esm(() => {
7739
7815
  method: "POST",
7740
7816
  path: apiPaths.interruptAgentsWorktreeConversation,
7741
7817
  pathParams: WorktreeNameParamsSchema,
7742
- body: c2.noBody(),
7818
+ body: c.noBody(),
7743
7819
  responses: {
7744
7820
  200: AgentsUiInterruptResponseSchema,
7745
7821
  ...commonErrorResponses
@@ -7776,7 +7852,7 @@ var init_contract = __esm(() => {
7776
7852
  method: "POST",
7777
7853
  path: apiPaths.openWorktree,
7778
7854
  pathParams: WorktreeNameParamsSchema,
7779
- body: c2.noBody(),
7855
+ body: c.noBody(),
7780
7856
  responses: {
7781
7857
  200: OkResponseSchema,
7782
7858
  ...commonErrorResponses
@@ -7786,7 +7862,7 @@ var init_contract = __esm(() => {
7786
7862
  method: "POST",
7787
7863
  path: apiPaths.closeWorktree,
7788
7864
  pathParams: WorktreeNameParamsSchema,
7789
- body: c2.noBody(),
7865
+ body: c.noBody(),
7790
7866
  responses: {
7791
7867
  200: OkResponseSchema,
7792
7868
  ...commonErrorResponses
@@ -7802,6 +7878,16 @@ var init_contract = __esm(() => {
7802
7878
  ...commonErrorResponses
7803
7879
  }
7804
7880
  },
7881
+ setWorktreeLabel: {
7882
+ method: "PUT",
7883
+ path: apiPaths.setWorktreeLabel,
7884
+ pathParams: WorktreeNameParamsSchema,
7885
+ body: SetWorktreeLabelRequestSchema,
7886
+ responses: {
7887
+ 200: SetWorktreeLabelResponseSchema,
7888
+ ...commonErrorResponses
7889
+ }
7890
+ },
7805
7891
  sendWorktreePrompt: {
7806
7892
  method: "POST",
7807
7893
  path: apiPaths.sendWorktreePrompt,
@@ -7816,7 +7902,7 @@ var init_contract = __esm(() => {
7816
7902
  method: "POST",
7817
7903
  path: apiPaths.mergeWorktree,
7818
7904
  pathParams: WorktreeNameParamsSchema,
7819
- body: c2.noBody(),
7905
+ body: c.noBody(),
7820
7906
  responses: {
7821
7907
  200: OkResponseSchema,
7822
7908
  ...commonErrorResponses
@@ -7880,7 +7966,7 @@ var init_contract = __esm(() => {
7880
7966
  method: "POST",
7881
7967
  path: apiPaths.dismissNotification,
7882
7968
  pathParams: NotificationIdParamsSchema,
7883
- body: c2.noBody(),
7969
+ body: c.noBody(),
7884
7970
  responses: {
7885
7971
  200: OkResponseSchema,
7886
7972
  400: ErrorResponseSchema,
@@ -8147,11 +8233,22 @@ function normalizeConversationMeta(raw) {
8147
8233
  };
8148
8234
  return normalized;
8149
8235
  }
8236
+ function normalizeOptionalString(raw) {
8237
+ return typeof raw === "string" && raw.trim() ? raw.trim() : undefined;
8238
+ }
8150
8239
  function normalizeWorktreeMeta(meta) {
8151
8240
  const conversation = normalizeConversationMeta(meta.conversation);
8152
- return conversation === meta.conversation ? meta : {
8153
- ...meta,
8154
- conversation
8241
+ const normalizedLabel = normalizeOptionalString(meta.label);
8242
+ if (conversation === meta.conversation && normalizedLabel === meta.label) {
8243
+ return meta;
8244
+ }
8245
+ const rest = { ...meta };
8246
+ delete rest.label;
8247
+ delete rest.conversation;
8248
+ return {
8249
+ ...rest,
8250
+ ...normalizedLabel ? { label: normalizedLabel } : {},
8251
+ ...conversation !== undefined ? { conversation } : {}
8155
8252
  };
8156
8253
  }
8157
8254
  function isPrComment(raw) {
@@ -8370,7 +8467,7 @@ function pruneArchivedWorktreeState(input) {
8370
8467
  }
8371
8468
  var init_archive_service = () => {};
8372
8469
 
8373
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
8470
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/identity.js
8374
8471
  var require_identity = __commonJS((exports) => {
8375
8472
  var ALIAS = Symbol.for("yaml.alias");
8376
8473
  var DOC = Symbol.for("yaml.document");
@@ -8424,7 +8521,7 @@ var require_identity = __commonJS((exports) => {
8424
8521
  exports.isSeq = isSeq;
8425
8522
  });
8426
8523
 
8427
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
8524
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/visit.js
8428
8525
  var require_visit = __commonJS((exports) => {
8429
8526
  var identity = require_identity();
8430
8527
  var BREAK = Symbol("break visit");
@@ -8571,15 +8668,15 @@ var require_visit = __commonJS((exports) => {
8571
8668
  } else if (identity.isDocument(parent)) {
8572
8669
  parent.contents = node;
8573
8670
  } else {
8574
- const pt = identity.isAlias(parent) ? "alias" : "scalar";
8575
- throw new Error(`Cannot replace node with ${pt} parent`);
8671
+ const pt2 = identity.isAlias(parent) ? "alias" : "scalar";
8672
+ throw new Error(`Cannot replace node with ${pt2} parent`);
8576
8673
  }
8577
8674
  }
8578
8675
  exports.visit = visit;
8579
8676
  exports.visitAsync = visitAsync;
8580
8677
  });
8581
8678
 
8582
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
8679
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/doc/directives.js
8583
8680
  var require_directives = __commonJS((exports) => {
8584
8681
  var identity = require_identity();
8585
8682
  var visit = require_visit();
@@ -8731,7 +8828,7 @@ var require_directives = __commonJS((exports) => {
8731
8828
  exports.Directives = Directives;
8732
8829
  });
8733
8830
 
8734
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
8831
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/doc/anchors.js
8735
8832
  var require_anchors = __commonJS((exports) => {
8736
8833
  var identity = require_identity();
8737
8834
  var visit = require_visit();
@@ -8793,7 +8890,7 @@ var require_anchors = __commonJS((exports) => {
8793
8890
  exports.findNewAnchor = findNewAnchor;
8794
8891
  });
8795
8892
 
8796
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
8893
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/doc/applyReviver.js
8797
8894
  var require_applyReviver = __commonJS((exports) => {
8798
8895
  function applyReviver(reviver, obj, key, val) {
8799
8896
  if (val && typeof val === "object") {
@@ -8840,12 +8937,12 @@ var require_applyReviver = __commonJS((exports) => {
8840
8937
  exports.applyReviver = applyReviver;
8841
8938
  });
8842
8939
 
8843
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
8940
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/toJS.js
8844
8941
  var require_toJS = __commonJS((exports) => {
8845
8942
  var identity = require_identity();
8846
8943
  function toJS(value, arg, ctx) {
8847
8944
  if (Array.isArray(value))
8848
- return value.map((v, i) => toJS(v, String(i), ctx));
8945
+ return value.map((v2, i) => toJS(v2, String(i), ctx));
8849
8946
  if (value && typeof value.toJSON === "function") {
8850
8947
  if (!ctx || !identity.hasAnchor(value))
8851
8948
  return value.toJSON(arg, ctx);
@@ -8867,7 +8964,7 @@ var require_toJS = __commonJS((exports) => {
8867
8964
  exports.toJS = toJS;
8868
8965
  });
8869
8966
 
8870
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
8967
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/Node.js
8871
8968
  var require_Node = __commonJS((exports) => {
8872
8969
  var applyReviver = require_applyReviver();
8873
8970
  var identity = require_identity();
@@ -8904,7 +9001,7 @@ var require_Node = __commonJS((exports) => {
8904
9001
  exports.NodeBase = NodeBase;
8905
9002
  });
8906
9003
 
8907
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
9004
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/Alias.js
8908
9005
  var require_Alias = __commonJS((exports) => {
8909
9006
  var anchors = require_anchors();
8910
9007
  var visit = require_visit();
@@ -8923,6 +9020,8 @@ var require_Alias = __commonJS((exports) => {
8923
9020
  });
8924
9021
  }
8925
9022
  resolve(doc, ctx) {
9023
+ if (ctx?.maxAliasCount === 0)
9024
+ throw new ReferenceError("Alias resolution is disabled");
8926
9025
  let nodes;
8927
9026
  if (ctx?.aliasResolveCache) {
8928
9027
  nodes = ctx.aliasResolveCache;
@@ -8997,9 +9096,9 @@ var require_Alias = __commonJS((exports) => {
8997
9096
  } else if (identity.isCollection(node)) {
8998
9097
  let count = 0;
8999
9098
  for (const item of node.items) {
9000
- const c3 = getAliasCount(doc, item, anchors2);
9001
- if (c3 > count)
9002
- count = c3;
9099
+ const c2 = getAliasCount(doc, item, anchors2);
9100
+ if (c2 > count)
9101
+ count = c2;
9003
9102
  }
9004
9103
  return count;
9005
9104
  } else if (identity.isPair(node)) {
@@ -9012,7 +9111,7 @@ var require_Alias = __commonJS((exports) => {
9012
9111
  exports.Alias = Alias;
9013
9112
  });
9014
9113
 
9015
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
9114
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/Scalar.js
9016
9115
  var require_Scalar = __commonJS((exports) => {
9017
9116
  var identity = require_identity();
9018
9117
  var Node = require_Node();
@@ -9040,7 +9139,7 @@ var require_Scalar = __commonJS((exports) => {
9040
9139
  exports.isScalarValue = isScalarValue;
9041
9140
  });
9042
9141
 
9043
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
9142
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/doc/createNode.js
9044
9143
  var require_createNode = __commonJS((exports) => {
9045
9144
  var Alias = require_Alias();
9046
9145
  var identity = require_identity();
@@ -9048,13 +9147,13 @@ var require_createNode = __commonJS((exports) => {
9048
9147
  var defaultTagPrefix = "tag:yaml.org,2002:";
9049
9148
  function findTagObject(value, tagName, tags) {
9050
9149
  if (tagName) {
9051
- const match = tags.filter((t2) => t2.tag === tagName);
9052
- const tagObj = match.find((t2) => !t2.format) ?? match[0];
9150
+ const match = tags.filter((t) => t.tag === tagName);
9151
+ const tagObj = match.find((t) => !t.format) ?? match[0];
9053
9152
  if (!tagObj)
9054
9153
  throw new Error(`Tag ${tagName} not found`);
9055
9154
  return tagObj;
9056
9155
  }
9057
- return tags.find((t2) => t2.identify?.(value) && !t2.format);
9156
+ return tags.find((t) => t.identify?.(value) && !t.format);
9058
9157
  }
9059
9158
  function createNode(value, tagName, ctx) {
9060
9159
  if (identity.isDocument(value))
@@ -9112,24 +9211,24 @@ var require_createNode = __commonJS((exports) => {
9112
9211
  exports.createNode = createNode;
9113
9212
  });
9114
9213
 
9115
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
9214
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/Collection.js
9116
9215
  var require_Collection = __commonJS((exports) => {
9117
9216
  var createNode = require_createNode();
9118
9217
  var identity = require_identity();
9119
9218
  var Node = require_Node();
9120
9219
  function collectionFromPath(schema, path, value) {
9121
- let v = value;
9220
+ let v2 = value;
9122
9221
  for (let i = path.length - 1;i >= 0; --i) {
9123
9222
  const k2 = path[i];
9124
9223
  if (typeof k2 === "number" && Number.isInteger(k2) && k2 >= 0) {
9125
9224
  const a = [];
9126
- a[k2] = v;
9127
- v = a;
9225
+ a[k2] = v2;
9226
+ v2 = a;
9128
9227
  } else {
9129
- v = new Map([[k2, v]]);
9228
+ v2 = new Map([[k2, v2]]);
9130
9229
  }
9131
9230
  }
9132
- return createNode.createNode(v, undefined, {
9231
+ return createNode.createNode(v2, undefined, {
9133
9232
  aliasDuplicateObjects: false,
9134
9233
  keepUndefined: false,
9135
9234
  onAnchor: () => {
@@ -9155,7 +9254,7 @@ var require_Collection = __commonJS((exports) => {
9155
9254
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
9156
9255
  if (schema)
9157
9256
  copy.schema = schema;
9158
- copy.items = copy.items.map((it2) => identity.isNode(it2) || identity.isPair(it2) ? it2.clone(schema) : it2);
9257
+ copy.items = copy.items.map((it3) => identity.isNode(it3) || identity.isPair(it3) ? it3.clone(schema) : it3);
9159
9258
  if (this.range)
9160
9259
  copy.range = this.range.slice();
9161
9260
  return copy;
@@ -9227,7 +9326,7 @@ var require_Collection = __commonJS((exports) => {
9227
9326
  exports.isEmptyPath = isEmptyPath;
9228
9327
  });
9229
9328
 
9230
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
9329
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyComment.js
9231
9330
  var require_stringifyComment = __commonJS((exports) => {
9232
9331
  var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
9233
9332
  function indentComment(comment, indent) {
@@ -9244,7 +9343,7 @@ var require_stringifyComment = __commonJS((exports) => {
9244
9343
  exports.stringifyComment = stringifyComment;
9245
9344
  });
9246
9345
 
9247
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
9346
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/foldFlowLines.js
9248
9347
  var require_foldFlowLines = __commonJS((exports) => {
9249
9348
  var FOLD_FLOW = "flow";
9250
9349
  var FOLD_BLOCK = "block";
@@ -9381,7 +9480,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
9381
9480
  exports.foldFlowLines = foldFlowLines;
9382
9481
  });
9383
9482
 
9384
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
9483
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyString.js
9385
9484
  var require_stringifyString = __commonJS((exports) => {
9386
9485
  var Scalar = require_Scalar();
9387
9486
  var foldFlowLines = require_foldFlowLines();
@@ -9669,17 +9768,17 @@ ${indent}`);
9669
9768
  let res = _stringify(type);
9670
9769
  if (res === null) {
9671
9770
  const { defaultKeyType, defaultStringType } = ctx.options;
9672
- const t2 = implicitKey && defaultKeyType || defaultStringType;
9673
- res = _stringify(t2);
9771
+ const t = implicitKey && defaultKeyType || defaultStringType;
9772
+ res = _stringify(t);
9674
9773
  if (res === null)
9675
- throw new Error(`Unsupported default string type ${t2}`);
9774
+ throw new Error(`Unsupported default string type ${t}`);
9676
9775
  }
9677
9776
  return res;
9678
9777
  }
9679
9778
  exports.stringifyString = stringifyString;
9680
9779
  });
9681
9780
 
9682
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
9781
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringify.js
9683
9782
  var require_stringify = __commonJS((exports) => {
9684
9783
  var anchors = require_anchors();
9685
9784
  var identity = require_identity();
@@ -9729,24 +9828,24 @@ var require_stringify = __commonJS((exports) => {
9729
9828
  }
9730
9829
  function getTagObject(tags, item) {
9731
9830
  if (item.tag) {
9732
- const match = tags.filter((t2) => t2.tag === item.tag);
9831
+ const match = tags.filter((t) => t.tag === item.tag);
9733
9832
  if (match.length > 0)
9734
- return match.find((t2) => t2.format === item.format) ?? match[0];
9833
+ return match.find((t) => t.format === item.format) ?? match[0];
9735
9834
  }
9736
9835
  let tagObj = undefined;
9737
9836
  let obj;
9738
9837
  if (identity.isScalar(item)) {
9739
9838
  obj = item.value;
9740
- let match = tags.filter((t2) => t2.identify?.(obj));
9839
+ let match = tags.filter((t) => t.identify?.(obj));
9741
9840
  if (match.length > 1) {
9742
- const testMatch = match.filter((t2) => t2.test);
9841
+ const testMatch = match.filter((t) => t.test);
9743
9842
  if (testMatch.length > 0)
9744
9843
  match = testMatch;
9745
9844
  }
9746
- tagObj = match.find((t2) => t2.format === item.format) ?? match.find((t2) => !t2.format);
9845
+ tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);
9747
9846
  } else {
9748
9847
  obj = item;
9749
- tagObj = tags.find((t2) => t2.nodeClass && obj instanceof t2.nodeClass);
9848
+ tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
9750
9849
  }
9751
9850
  if (!tagObj) {
9752
9851
  const name = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
@@ -9800,7 +9899,7 @@ ${ctx.indent}${str}`;
9800
9899
  exports.stringify = stringify;
9801
9900
  });
9802
9901
 
9803
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
9902
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyPair.js
9804
9903
  var require_stringifyPair = __commonJS((exports) => {
9805
9904
  var identity = require_identity();
9806
9905
  var Scalar = require_Scalar();
@@ -9936,7 +10035,7 @@ ${ctx.indent}`;
9936
10035
  exports.stringifyPair = stringifyPair;
9937
10036
  });
9938
10037
 
9939
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
10038
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/log.js
9940
10039
  var require_log = __commonJS((exports) => {
9941
10040
  var node_process = __require("process");
9942
10041
  function debug(logLevel, ...messages) {
@@ -9955,7 +10054,7 @@ var require_log = __commonJS((exports) => {
9955
10054
  exports.warn = warn;
9956
10055
  });
9957
10056
 
9958
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
10057
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/merge.js
9959
10058
  var require_merge = __commonJS((exports) => {
9960
10059
  var identity = require_identity();
9961
10060
  var Scalar = require_Scalar();
@@ -9972,18 +10071,18 @@ var require_merge = __commonJS((exports) => {
9972
10071
  };
9973
10072
  var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
9974
10073
  function addMergeToJSMap(ctx, map, value) {
9975
- value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
9976
- if (identity.isSeq(value))
9977
- for (const it2 of value.items)
9978
- mergeValue(ctx, map, it2);
9979
- else if (Array.isArray(value))
9980
- for (const it2 of value)
9981
- mergeValue(ctx, map, it2);
10074
+ const source = resolveAliasValue(ctx, value);
10075
+ if (identity.isSeq(source))
10076
+ for (const it3 of source.items)
10077
+ mergeValue(ctx, map, it3);
10078
+ else if (Array.isArray(source))
10079
+ for (const it3 of source)
10080
+ mergeValue(ctx, map, it3);
9982
10081
  else
9983
- mergeValue(ctx, map, value);
10082
+ mergeValue(ctx, map, source);
9984
10083
  }
9985
10084
  function mergeValue(ctx, map, value) {
9986
- const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
10085
+ const source = resolveAliasValue(ctx, value);
9987
10086
  if (!identity.isMap(source))
9988
10087
  throw new Error("Merge sources must be maps or map aliases");
9989
10088
  const srcMap = source.toJSON(null, ctx, Map);
@@ -10004,12 +10103,15 @@ var require_merge = __commonJS((exports) => {
10004
10103
  }
10005
10104
  return map;
10006
10105
  }
10106
+ function resolveAliasValue(ctx, value) {
10107
+ return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
10108
+ }
10007
10109
  exports.addMergeToJSMap = addMergeToJSMap;
10008
10110
  exports.isMergeKey = isMergeKey;
10009
10111
  exports.merge = merge;
10010
10112
  });
10011
10113
 
10012
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
10114
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/addPairToJSMap.js
10013
10115
  var require_addPairToJSMap = __commonJS((exports) => {
10014
10116
  var log = require_log();
10015
10117
  var merge = require_merge();
@@ -10070,7 +10172,7 @@ var require_addPairToJSMap = __commonJS((exports) => {
10070
10172
  exports.addPairToJSMap = addPairToJSMap;
10071
10173
  });
10072
10174
 
10073
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
10175
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/Pair.js
10074
10176
  var require_Pair = __commonJS((exports) => {
10075
10177
  var createNode = require_createNode();
10076
10178
  var stringifyPair = require_stringifyPair();
@@ -10078,8 +10180,8 @@ var require_Pair = __commonJS((exports) => {
10078
10180
  var identity = require_identity();
10079
10181
  function createPair(key, value, ctx) {
10080
10182
  const k2 = createNode.createNode(key, undefined, ctx);
10081
- const v = createNode.createNode(value, undefined, ctx);
10082
- return new Pair(k2, v);
10183
+ const v2 = createNode.createNode(value, undefined, ctx);
10184
+ return new Pair(k2, v2);
10083
10185
  }
10084
10186
 
10085
10187
  class Pair {
@@ -10108,7 +10210,7 @@ var require_Pair = __commonJS((exports) => {
10108
10210
  exports.createPair = createPair;
10109
10211
  });
10110
10212
 
10111
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
10213
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyCollection.js
10112
10214
  var require_stringifyCollection = __commonJS((exports) => {
10113
10215
  var identity = require_identity();
10114
10216
  var stringify = require_stringify();
@@ -10260,7 +10362,7 @@ ${indent}${end}`;
10260
10362
  exports.stringifyCollection = stringifyCollection;
10261
10363
  });
10262
10364
 
10263
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
10365
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/YAMLMap.js
10264
10366
  var require_YAMLMap = __commonJS((exports) => {
10265
10367
  var stringifyCollection = require_stringifyCollection();
10266
10368
  var addPairToJSMap = require_addPairToJSMap();
@@ -10270,12 +10372,12 @@ var require_YAMLMap = __commonJS((exports) => {
10270
10372
  var Scalar = require_Scalar();
10271
10373
  function findPair(items, key) {
10272
10374
  const k2 = identity.isScalar(key) ? key.value : key;
10273
- for (const it2 of items) {
10274
- if (identity.isPair(it2)) {
10275
- if (it2.key === key || it2.key === k2)
10276
- return it2;
10277
- if (identity.isScalar(it2.key) && it2.key.value === k2)
10278
- return it2;
10375
+ for (const it3 of items) {
10376
+ if (identity.isPair(it3)) {
10377
+ if (it3.key === key || it3.key === k2)
10378
+ return it3;
10379
+ if (identity.isScalar(it3.key) && it3.key.value === k2)
10380
+ return it3;
10279
10381
  }
10280
10382
  }
10281
10383
  return;
@@ -10340,15 +10442,15 @@ var require_YAMLMap = __commonJS((exports) => {
10340
10442
  }
10341
10443
  }
10342
10444
  delete(key) {
10343
- const it2 = findPair(this.items, key);
10344
- if (!it2)
10445
+ const it3 = findPair(this.items, key);
10446
+ if (!it3)
10345
10447
  return false;
10346
- const del = this.items.splice(this.items.indexOf(it2), 1);
10448
+ const del = this.items.splice(this.items.indexOf(it3), 1);
10347
10449
  return del.length > 0;
10348
10450
  }
10349
10451
  get(key, keepScalar) {
10350
- const it2 = findPair(this.items, key);
10351
- const node = it2?.value;
10452
+ const it3 = findPair(this.items, key);
10453
+ const node = it3?.value;
10352
10454
  return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;
10353
10455
  }
10354
10456
  has(key) {
@@ -10387,7 +10489,7 @@ var require_YAMLMap = __commonJS((exports) => {
10387
10489
  exports.findPair = findPair;
10388
10490
  });
10389
10491
 
10390
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
10492
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/common/map.js
10391
10493
  var require_map = __commonJS((exports) => {
10392
10494
  var identity = require_identity();
10393
10495
  var YAMLMap = require_YAMLMap();
@@ -10406,7 +10508,7 @@ var require_map = __commonJS((exports) => {
10406
10508
  exports.map = map;
10407
10509
  });
10408
10510
 
10409
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
10511
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/YAMLSeq.js
10410
10512
  var require_YAMLSeq = __commonJS((exports) => {
10411
10513
  var createNode = require_createNode();
10412
10514
  var stringifyCollection = require_stringifyCollection();
@@ -10437,8 +10539,8 @@ var require_YAMLSeq = __commonJS((exports) => {
10437
10539
  const idx = asItemIndex(key);
10438
10540
  if (typeof idx !== "number")
10439
10541
  return;
10440
- const it2 = this.items[idx];
10441
- return !keepScalar && identity.isScalar(it2) ? it2.value : it2;
10542
+ const it3 = this.items[idx];
10543
+ return !keepScalar && identity.isScalar(it3) ? it3.value : it3;
10442
10544
  }
10443
10545
  has(key) {
10444
10546
  const idx = asItemIndex(key);
@@ -10479,12 +10581,12 @@ var require_YAMLSeq = __commonJS((exports) => {
10479
10581
  const seq = new this(schema);
10480
10582
  if (obj && Symbol.iterator in Object(obj)) {
10481
10583
  let i = 0;
10482
- for (let it2 of obj) {
10584
+ for (let it3 of obj) {
10483
10585
  if (typeof replacer === "function") {
10484
- const key = obj instanceof Set ? it2 : String(i++);
10485
- it2 = replacer.call(obj, key, it2);
10586
+ const key = obj instanceof Set ? it3 : String(i++);
10587
+ it3 = replacer.call(obj, key, it3);
10486
10588
  }
10487
- seq.items.push(createNode.createNode(it2, undefined, ctx));
10589
+ seq.items.push(createNode.createNode(it3, undefined, ctx));
10488
10590
  }
10489
10591
  }
10490
10592
  return seq;
@@ -10499,7 +10601,7 @@ var require_YAMLSeq = __commonJS((exports) => {
10499
10601
  exports.YAMLSeq = YAMLSeq;
10500
10602
  });
10501
10603
 
10502
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
10604
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/common/seq.js
10503
10605
  var require_seq = __commonJS((exports) => {
10504
10606
  var identity = require_identity();
10505
10607
  var YAMLSeq = require_YAMLSeq();
@@ -10518,7 +10620,7 @@ var require_seq = __commonJS((exports) => {
10518
10620
  exports.seq = seq;
10519
10621
  });
10520
10622
 
10521
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
10623
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/common/string.js
10522
10624
  var require_string = __commonJS((exports) => {
10523
10625
  var stringifyString = require_stringifyString();
10524
10626
  var string = {
@@ -10534,7 +10636,7 @@ var require_string = __commonJS((exports) => {
10534
10636
  exports.string = string;
10535
10637
  });
10536
10638
 
10537
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
10639
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/common/null.js
10538
10640
  var require_null = __commonJS((exports) => {
10539
10641
  var Scalar = require_Scalar();
10540
10642
  var nullTag = {
@@ -10549,7 +10651,7 @@ var require_null = __commonJS((exports) => {
10549
10651
  exports.nullTag = nullTag;
10550
10652
  });
10551
10653
 
10552
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
10654
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/core/bool.js
10553
10655
  var require_bool = __commonJS((exports) => {
10554
10656
  var Scalar = require_Scalar();
10555
10657
  var boolTag = {
@@ -10570,7 +10672,7 @@ var require_bool = __commonJS((exports) => {
10570
10672
  exports.boolTag = boolTag;
10571
10673
  });
10572
10674
 
10573
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
10675
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyNumber.js
10574
10676
  var require_stringifyNumber = __commonJS((exports) => {
10575
10677
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
10576
10678
  if (typeof value === "bigint")
@@ -10579,14 +10681,14 @@ var require_stringifyNumber = __commonJS((exports) => {
10579
10681
  if (!isFinite(num))
10580
10682
  return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
10581
10683
  let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
10582
- if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
10684
+ if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
10583
10685
  let i = n.indexOf(".");
10584
10686
  if (i < 0) {
10585
10687
  i = n.length;
10586
10688
  n += ".";
10587
10689
  }
10588
- let d3 = minFractionDigits - (n.length - i - 1);
10589
- while (d3-- > 0)
10690
+ let d = minFractionDigits - (n.length - i - 1);
10691
+ while (d-- > 0)
10590
10692
  n += "0";
10591
10693
  }
10592
10694
  return n;
@@ -10594,7 +10696,7 @@ var require_stringifyNumber = __commonJS((exports) => {
10594
10696
  exports.stringifyNumber = stringifyNumber;
10595
10697
  });
10596
10698
 
10597
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
10699
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/core/float.js
10598
10700
  var require_float = __commonJS((exports) => {
10599
10701
  var Scalar = require_Scalar();
10600
10702
  var stringifyNumber = require_stringifyNumber();
@@ -10637,7 +10739,7 @@ var require_float = __commonJS((exports) => {
10637
10739
  exports.floatNaN = floatNaN;
10638
10740
  });
10639
10741
 
10640
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
10742
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/core/int.js
10641
10743
  var require_int = __commonJS((exports) => {
10642
10744
  var stringifyNumber = require_stringifyNumber();
10643
10745
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -10679,7 +10781,7 @@ var require_int = __commonJS((exports) => {
10679
10781
  exports.intOct = intOct;
10680
10782
  });
10681
10783
 
10682
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
10784
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/core/schema.js
10683
10785
  var require_schema = __commonJS((exports) => {
10684
10786
  var map = require_map();
10685
10787
  var _null = require_null();
@@ -10704,7 +10806,7 @@ var require_schema = __commonJS((exports) => {
10704
10806
  exports.schema = schema;
10705
10807
  });
10706
10808
 
10707
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
10809
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/json/schema.js
10708
10810
  var require_schema2 = __commonJS((exports) => {
10709
10811
  var Scalar = require_Scalar();
10710
10812
  var map = require_map();
@@ -10768,7 +10870,7 @@ var require_schema2 = __commonJS((exports) => {
10768
10870
  exports.schema = schema;
10769
10871
  });
10770
10872
 
10771
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
10873
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/binary.js
10772
10874
  var require_binary = __commonJS((exports) => {
10773
10875
  var node_buffer = __require("buffer");
10774
10876
  var Scalar = require_Scalar();
@@ -10823,7 +10925,7 @@ var require_binary = __commonJS((exports) => {
10823
10925
  exports.binary = binary;
10824
10926
  });
10825
10927
 
10826
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
10928
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
10827
10929
  var require_pairs = __commonJS((exports) => {
10828
10930
  var identity = require_identity();
10829
10931
  var Pair = require_Pair();
@@ -10861,26 +10963,26 @@ ${cn.comment}` : item.comment;
10861
10963
  pairs2.tag = "tag:yaml.org,2002:pairs";
10862
10964
  let i = 0;
10863
10965
  if (iterable && Symbol.iterator in Object(iterable))
10864
- for (let it2 of iterable) {
10966
+ for (let it3 of iterable) {
10865
10967
  if (typeof replacer === "function")
10866
- it2 = replacer.call(iterable, String(i++), it2);
10968
+ it3 = replacer.call(iterable, String(i++), it3);
10867
10969
  let key, value;
10868
- if (Array.isArray(it2)) {
10869
- if (it2.length === 2) {
10870
- key = it2[0];
10871
- value = it2[1];
10970
+ if (Array.isArray(it3)) {
10971
+ if (it3.length === 2) {
10972
+ key = it3[0];
10973
+ value = it3[1];
10872
10974
  } else
10873
- throw new TypeError(`Expected [key, value] tuple: ${it2}`);
10874
- } else if (it2 && it2 instanceof Object) {
10875
- const keys = Object.keys(it2);
10975
+ throw new TypeError(`Expected [key, value] tuple: ${it3}`);
10976
+ } else if (it3 && it3 instanceof Object) {
10977
+ const keys = Object.keys(it3);
10876
10978
  if (keys.length === 1) {
10877
10979
  key = keys[0];
10878
- value = it2[key];
10980
+ value = it3[key];
10879
10981
  } else {
10880
10982
  throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
10881
10983
  }
10882
10984
  } else {
10883
- key = it2;
10985
+ key = it3;
10884
10986
  }
10885
10987
  pairs2.items.push(Pair.createPair(key, value, ctx));
10886
10988
  }
@@ -10898,7 +11000,7 @@ ${cn.comment}` : item.comment;
10898
11000
  exports.resolvePairs = resolvePairs;
10899
11001
  });
10900
11002
 
10901
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
11003
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/omap.js
10902
11004
  var require_omap = __commonJS((exports) => {
10903
11005
  var identity = require_identity();
10904
11006
  var toJS = require_toJS();
@@ -10970,7 +11072,7 @@ var require_omap = __commonJS((exports) => {
10970
11072
  exports.omap = omap;
10971
11073
  });
10972
11074
 
10973
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
11075
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/bool.js
10974
11076
  var require_bool2 = __commonJS((exports) => {
10975
11077
  var Scalar = require_Scalar();
10976
11078
  function boolStringify({ value, source }, ctx) {
@@ -10999,7 +11101,7 @@ var require_bool2 = __commonJS((exports) => {
10999
11101
  exports.trueTag = trueTag;
11000
11102
  });
11001
11103
 
11002
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
11104
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/float.js
11003
11105
  var require_float2 = __commonJS((exports) => {
11004
11106
  var Scalar = require_Scalar();
11005
11107
  var stringifyNumber = require_stringifyNumber();
@@ -11032,9 +11134,9 @@ var require_float2 = __commonJS((exports) => {
11032
11134
  const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
11033
11135
  const dot = str.indexOf(".");
11034
11136
  if (dot !== -1) {
11035
- const f = str.substring(dot + 1).replace(/_/g, "");
11036
- if (f[f.length - 1] === "0")
11037
- node.minFractionDigits = f.length;
11137
+ const f2 = str.substring(dot + 1).replace(/_/g, "");
11138
+ if (f2[f2.length - 1] === "0")
11139
+ node.minFractionDigits = f2.length;
11038
11140
  }
11039
11141
  return node;
11040
11142
  },
@@ -11045,7 +11147,7 @@ var require_float2 = __commonJS((exports) => {
11045
11147
  exports.floatNaN = floatNaN;
11046
11148
  });
11047
11149
 
11048
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
11150
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/int.js
11049
11151
  var require_int2 = __commonJS((exports) => {
11050
11152
  var stringifyNumber = require_stringifyNumber();
11051
11153
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -11121,7 +11223,7 @@ var require_int2 = __commonJS((exports) => {
11121
11223
  exports.intOct = intOct;
11122
11224
  });
11123
11225
 
11124
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
11226
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/set.js
11125
11227
  var require_set = __commonJS((exports) => {
11126
11228
  var identity = require_identity();
11127
11229
  var Pair = require_Pair();
@@ -11204,7 +11306,7 @@ var require_set = __commonJS((exports) => {
11204
11306
  exports.set = set;
11205
11307
  });
11206
11308
 
11207
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
11309
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
11208
11310
  var require_timestamp = __commonJS((exports) => {
11209
11311
  var stringifyNumber = require_stringifyNumber();
11210
11312
  function parseSexagesimal(str, asBigInt) {
@@ -11272,10 +11374,10 @@ var require_timestamp = __commonJS((exports) => {
11272
11374
  let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
11273
11375
  const tz = match[8];
11274
11376
  if (tz && tz !== "Z") {
11275
- let d3 = parseSexagesimal(tz, false);
11276
- if (Math.abs(d3) < 30)
11277
- d3 *= 60;
11278
- date -= 60000 * d3;
11377
+ let d = parseSexagesimal(tz, false);
11378
+ if (Math.abs(d) < 30)
11379
+ d *= 60;
11380
+ date -= 60000 * d;
11279
11381
  }
11280
11382
  return new Date(date);
11281
11383
  },
@@ -11286,7 +11388,7 @@ var require_timestamp = __commonJS((exports) => {
11286
11388
  exports.timestamp = timestamp;
11287
11389
  });
11288
11390
 
11289
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
11391
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/schema.js
11290
11392
  var require_schema3 = __commonJS((exports) => {
11291
11393
  var map = require_map();
11292
11394
  var _null = require_null();
@@ -11327,7 +11429,7 @@ var require_schema3 = __commonJS((exports) => {
11327
11429
  exports.schema = schema;
11328
11430
  });
11329
11431
 
11330
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
11432
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/tags.js
11331
11433
  var require_tags = __commonJS((exports) => {
11332
11434
  var map = require_map();
11333
11435
  var _null = require_null();
@@ -11418,7 +11520,7 @@ var require_tags = __commonJS((exports) => {
11418
11520
  exports.getTags = getTags;
11419
11521
  });
11420
11522
 
11421
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
11523
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/schema/Schema.js
11422
11524
  var require_Schema = __commonJS((exports) => {
11423
11525
  var identity = require_identity();
11424
11526
  var map = require_map();
@@ -11448,7 +11550,7 @@ var require_Schema = __commonJS((exports) => {
11448
11550
  exports.Schema = Schema;
11449
11551
  });
11450
11552
 
11451
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
11553
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyDocument.js
11452
11554
  var require_stringifyDocument = __commonJS((exports) => {
11453
11555
  var identity = require_identity();
11454
11556
  var stringify = require_stringify();
@@ -11528,7 +11630,7 @@ var require_stringifyDocument = __commonJS((exports) => {
11528
11630
  exports.stringifyDocument = stringifyDocument;
11529
11631
  });
11530
11632
 
11531
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
11633
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/doc/Document.js
11532
11634
  var require_Document = __commonJS((exports) => {
11533
11635
  var Alias = require_Alias();
11534
11636
  var Collection = require_Collection();
@@ -11615,7 +11717,7 @@ var require_Document = __commonJS((exports) => {
11615
11717
  value = replacer.call({ "": value }, "", value);
11616
11718
  _replacer = replacer;
11617
11719
  } else if (Array.isArray(replacer)) {
11618
- const keyToStr = (v) => typeof v === "number" || v instanceof String || v instanceof Number;
11720
+ const keyToStr = (v2) => typeof v2 === "number" || v2 instanceof String || v2 instanceof Number;
11619
11721
  const asStr = replacer.filter(keyToStr).map(String);
11620
11722
  if (asStr.length > 0)
11621
11723
  replacer = replacer.concat(asStr);
@@ -11643,8 +11745,8 @@ var require_Document = __commonJS((exports) => {
11643
11745
  }
11644
11746
  createPair(key, value, options = {}) {
11645
11747
  const k2 = this.createNode(key, null, options);
11646
- const v = this.createNode(value, null, options);
11647
- return new Pair.Pair(k2, v);
11748
+ const v2 = this.createNode(value, null, options);
11749
+ return new Pair.Pair(k2, v2);
11648
11750
  }
11649
11751
  delete(key) {
11650
11752
  return assertCollection(this.contents) ? this.contents.delete(key) : false;
@@ -11763,7 +11865,7 @@ var require_Document = __commonJS((exports) => {
11763
11865
  exports.Document = Document;
11764
11866
  });
11765
11867
 
11766
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
11868
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/errors.js
11767
11869
  var require_errors = __commonJS((exports) => {
11768
11870
  class YAMLError extends Error {
11769
11871
  constructor(name, pos, code, message) {
@@ -11828,7 +11930,7 @@ ${pointer}
11828
11930
  exports.prettifyError = prettifyError;
11829
11931
  });
11830
11932
 
11831
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
11933
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-props.js
11832
11934
  var require_resolve_props = __commonJS((exports) => {
11833
11935
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
11834
11936
  let spaceBefore = false;
@@ -11958,7 +12060,7 @@ var require_resolve_props = __commonJS((exports) => {
11958
12060
  exports.resolveProps = resolveProps;
11959
12061
  });
11960
12062
 
11961
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
12063
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/util-contains-newline.js
11962
12064
  var require_util_contains_newline = __commonJS((exports) => {
11963
12065
  function containsNewline(key) {
11964
12066
  if (!key)
@@ -11972,22 +12074,22 @@ var require_util_contains_newline = __commonJS((exports) => {
11972
12074
  `))
11973
12075
  return true;
11974
12076
  if (key.end) {
11975
- for (const st2 of key.end)
11976
- if (st2.type === "newline")
12077
+ for (const st3 of key.end)
12078
+ if (st3.type === "newline")
11977
12079
  return true;
11978
12080
  }
11979
12081
  return false;
11980
12082
  case "flow-collection":
11981
- for (const it2 of key.items) {
11982
- for (const st2 of it2.start)
11983
- if (st2.type === "newline")
12083
+ for (const it3 of key.items) {
12084
+ for (const st3 of it3.start)
12085
+ if (st3.type === "newline")
11984
12086
  return true;
11985
- if (it2.sep) {
11986
- for (const st2 of it2.sep)
11987
- if (st2.type === "newline")
12087
+ if (it3.sep) {
12088
+ for (const st3 of it3.sep)
12089
+ if (st3.type === "newline")
11988
12090
  return true;
11989
12091
  }
11990
- if (containsNewline(it2.key) || containsNewline(it2.value))
12092
+ if (containsNewline(it3.key) || containsNewline(it3.value))
11991
12093
  return true;
11992
12094
  }
11993
12095
  return false;
@@ -11998,7 +12100,7 @@ var require_util_contains_newline = __commonJS((exports) => {
11998
12100
  exports.containsNewline = containsNewline;
11999
12101
  });
12000
12102
 
12001
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
12103
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/util-flow-indent-check.js
12002
12104
  var require_util_flow_indent_check = __commonJS((exports) => {
12003
12105
  var utilContainsNewline = require_util_contains_newline();
12004
12106
  function flowIndentCheck(indent, fc, onError) {
@@ -12013,7 +12115,7 @@ var require_util_flow_indent_check = __commonJS((exports) => {
12013
12115
  exports.flowIndentCheck = flowIndentCheck;
12014
12116
  });
12015
12117
 
12016
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
12118
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/util-map-includes.js
12017
12119
  var require_util_map_includes = __commonJS((exports) => {
12018
12120
  var identity = require_identity();
12019
12121
  function mapIncludes(ctx, items, search) {
@@ -12026,7 +12128,7 @@ var require_util_map_includes = __commonJS((exports) => {
12026
12128
  exports.mapIncludes = mapIncludes;
12027
12129
  });
12028
12130
 
12029
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
12131
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-map.js
12030
12132
  var require_resolve_block_map = __commonJS((exports) => {
12031
12133
  var Pair = require_Pair();
12032
12134
  var YAMLMap = require_YAMLMap();
@@ -12133,7 +12235,7 @@ var require_resolve_block_map = __commonJS((exports) => {
12133
12235
  exports.resolveBlockMap = resolveBlockMap;
12134
12236
  });
12135
12237
 
12136
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
12238
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-seq.js
12137
12239
  var require_resolve_block_seq = __commonJS((exports) => {
12138
12240
  var YAMLSeq = require_YAMLSeq();
12139
12241
  var resolveProps = require_resolve_props();
@@ -12181,7 +12283,7 @@ var require_resolve_block_seq = __commonJS((exports) => {
12181
12283
  exports.resolveBlockSeq = resolveBlockSeq;
12182
12284
  });
12183
12285
 
12184
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
12286
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-end.js
12185
12287
  var require_resolve_end = __commonJS((exports) => {
12186
12288
  function resolveEnd(end, offset, reqSpace, onError) {
12187
12289
  let comment = "";
@@ -12221,7 +12323,7 @@ var require_resolve_end = __commonJS((exports) => {
12221
12323
  exports.resolveEnd = resolveEnd;
12222
12324
  });
12223
12325
 
12224
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
12326
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-flow-collection.js
12225
12327
  var require_resolve_flow_collection = __commonJS((exports) => {
12226
12328
  var identity = require_identity();
12227
12329
  var Pair = require_Pair();
@@ -12285,13 +12387,13 @@ var require_resolve_flow_collection = __commonJS((exports) => {
12285
12387
  if (props.comment) {
12286
12388
  let prevItemComment = "";
12287
12389
  loop:
12288
- for (const st2 of start) {
12289
- switch (st2.type) {
12390
+ for (const st3 of start) {
12391
+ switch (st3.type) {
12290
12392
  case "comma":
12291
12393
  case "space":
12292
12394
  break;
12293
12395
  case "comment":
12294
- prevItemComment = st2.source.substring(1);
12396
+ prevItemComment = st3.source.substring(1);
12295
12397
  break loop;
12296
12398
  default:
12297
12399
  break loop;
@@ -12335,11 +12437,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
12335
12437
  if (valueProps.found) {
12336
12438
  if (!isMap && !props.found && ctx.options.strict) {
12337
12439
  if (sep)
12338
- for (const st2 of sep) {
12339
- if (st2 === valueProps.found)
12440
+ for (const st3 of sep) {
12441
+ if (st3 === valueProps.found)
12340
12442
  break;
12341
- if (st2.type === "newline") {
12342
- onError(st2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
12443
+ if (st3.type === "newline") {
12444
+ onError(st3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
12343
12445
  break;
12344
12446
  }
12345
12447
  }
@@ -12383,16 +12485,16 @@ var require_resolve_flow_collection = __commonJS((exports) => {
12383
12485
  }
12384
12486
  }
12385
12487
  const expectedEnd = isMap ? "}" : "]";
12386
- const [ce2, ...ee2] = fc.end;
12488
+ const [ce, ...ee2] = fc.end;
12387
12489
  let cePos = offset;
12388
- if (ce2?.source === expectedEnd)
12389
- cePos = ce2.offset + ce2.source.length;
12490
+ if (ce?.source === expectedEnd)
12491
+ cePos = ce.offset + ce.source.length;
12390
12492
  else {
12391
12493
  const name = fcName[0].toUpperCase() + fcName.substring(1);
12392
12494
  const msg = atRoot ? `${name} must end with a ${expectedEnd}` : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;
12393
12495
  onError(offset, atRoot ? "MISSING_CHAR" : "BAD_INDENT", msg);
12394
- if (ce2 && ce2.source.length !== 1)
12395
- ee2.unshift(ce2);
12496
+ if (ce && ce.source.length !== 1)
12497
+ ee2.unshift(ce);
12396
12498
  }
12397
12499
  if (ee2.length > 0) {
12398
12500
  const end = resolveEnd.resolveEnd(ee2, cePos, ctx.options.strict, onError);
@@ -12412,7 +12514,7 @@ var require_resolve_flow_collection = __commonJS((exports) => {
12412
12514
  exports.resolveFlowCollection = resolveFlowCollection;
12413
12515
  });
12414
12516
 
12415
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
12517
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/compose-collection.js
12416
12518
  var require_compose_collection = __commonJS((exports) => {
12417
12519
  var identity = require_identity();
12418
12520
  var Scalar = require_Scalar();
@@ -12447,7 +12549,7 @@ var require_compose_collection = __commonJS((exports) => {
12447
12549
  if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq") {
12448
12550
  return resolveCollection(CN, ctx, token, onError, tagName);
12449
12551
  }
12450
- let tag = ctx.schema.tags.find((t2) => t2.tag === tagName && t2.collection === expType);
12552
+ let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);
12451
12553
  if (!tag) {
12452
12554
  const kt = ctx.schema.knownTags[tagName];
12453
12555
  if (kt?.collection === expType) {
@@ -12474,7 +12576,7 @@ var require_compose_collection = __commonJS((exports) => {
12474
12576
  exports.composeCollection = composeCollection;
12475
12577
  });
12476
12578
 
12477
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
12579
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-scalar.js
12478
12580
  var require_resolve_block_scalar = __commonJS((exports) => {
12479
12581
  var Scalar = require_Scalar();
12480
12582
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -12657,8 +12759,8 @@ var require_resolve_block_scalar = __commonJS((exports) => {
12657
12759
  function splitLines(source) {
12658
12760
  const split = source.split(/\n( *)/);
12659
12761
  const first = split[0];
12660
- const m = first.match(/^( *)/);
12661
- const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
12762
+ const m2 = first.match(/^( *)/);
12763
+ const line0 = m2?.[1] ? [m2[1], first.slice(m2[1].length)] : ["", first];
12662
12764
  const lines = [line0];
12663
12765
  for (let i = 1;i < split.length; i += 2)
12664
12766
  lines.push([split[i], split[i + 1]]);
@@ -12667,7 +12769,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
12667
12769
  exports.resolveBlockScalar = resolveBlockScalar;
12668
12770
  });
12669
12771
 
12670
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
12772
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-flow-scalar.js
12671
12773
  var require_resolve_flow_scalar = __commonJS((exports) => {
12672
12774
  var Scalar = require_Scalar();
12673
12775
  var resolveEnd = require_resolve_end();
@@ -12699,12 +12801,12 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
12699
12801
  };
12700
12802
  }
12701
12803
  const valueEnd = offset + source.length;
12702
- const re2 = resolveEnd.resolveEnd(end, valueEnd, strict, onError);
12804
+ const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);
12703
12805
  return {
12704
12806
  value,
12705
12807
  type: _type,
12706
- comment: re2.comment,
12707
- range: [offset, valueEnd, re2.offset]
12808
+ comment: re.comment,
12809
+ range: [offset, valueEnd, re.offset]
12708
12810
  };
12709
12811
  }
12710
12812
  function plainValue(source, onError) {
@@ -12804,7 +12906,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
12804
12906
  while (next === " " || next === "\t")
12805
12907
  next = source[++i + 1];
12806
12908
  } else if (next === "x" || next === "u" || next === "U") {
12807
- const length = { x: 2, u: 4, U: 8 }[next];
12909
+ const length = next === "x" ? 2 : next === "u" ? 4 : 8;
12808
12910
  res += parseCharCode(source, i + 1, length, onError);
12809
12911
  i += length;
12810
12912
  } else {
@@ -12873,17 +12975,18 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
12873
12975
  const cc = source.substr(offset, length);
12874
12976
  const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
12875
12977
  const code = ok ? parseInt(cc, 16) : NaN;
12876
- if (isNaN(code)) {
12978
+ try {
12979
+ return String.fromCodePoint(code);
12980
+ } catch {
12877
12981
  const raw = source.substr(offset - 2, length + 2);
12878
12982
  onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
12879
12983
  return raw;
12880
12984
  }
12881
- return String.fromCodePoint(code);
12882
12985
  }
12883
12986
  exports.resolveFlowScalar = resolveFlowScalar;
12884
12987
  });
12885
12988
 
12886
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
12989
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/compose-scalar.js
12887
12990
  var require_compose_scalar = __commonJS((exports) => {
12888
12991
  var identity = require_identity();
12889
12992
  var Scalar = require_Scalar();
@@ -12961,24 +13064,24 @@ var require_compose_scalar = __commonJS((exports) => {
12961
13064
  exports.composeScalar = composeScalar;
12962
13065
  });
12963
13066
 
12964
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
13067
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/util-empty-scalar-position.js
12965
13068
  var require_util_empty_scalar_position = __commonJS((exports) => {
12966
13069
  function emptyScalarPosition(offset, before, pos) {
12967
13070
  if (before) {
12968
13071
  pos ?? (pos = before.length);
12969
13072
  for (let i = pos - 1;i >= 0; --i) {
12970
- let st2 = before[i];
12971
- switch (st2.type) {
13073
+ let st3 = before[i];
13074
+ switch (st3.type) {
12972
13075
  case "space":
12973
13076
  case "comment":
12974
13077
  case "newline":
12975
- offset -= st2.source.length;
13078
+ offset -= st3.source.length;
12976
13079
  continue;
12977
13080
  }
12978
- st2 = before[++i];
12979
- while (st2?.type === "space") {
12980
- offset += st2.source.length;
12981
- st2 = before[++i];
13081
+ st3 = before[++i];
13082
+ while (st3?.type === "space") {
13083
+ offset += st3.source.length;
13084
+ st3 = before[++i];
12982
13085
  }
12983
13086
  break;
12984
13087
  }
@@ -12988,7 +13091,7 @@ var require_util_empty_scalar_position = __commonJS((exports) => {
12988
13091
  exports.emptyScalarPosition = emptyScalarPosition;
12989
13092
  });
12990
13093
 
12991
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
13094
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/compose-node.js
12992
13095
  var require_compose_node = __commonJS((exports) => {
12993
13096
  var Alias = require_Alias();
12994
13097
  var identity = require_identity();
@@ -13081,17 +13184,17 @@ var require_compose_node = __commonJS((exports) => {
13081
13184
  if (alias.source.endsWith(":"))
13082
13185
  onError(offset + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true);
13083
13186
  const valueEnd = offset + source.length;
13084
- const re2 = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);
13085
- alias.range = [offset, valueEnd, re2.offset];
13086
- if (re2.comment)
13087
- alias.comment = re2.comment;
13187
+ const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);
13188
+ alias.range = [offset, valueEnd, re.offset];
13189
+ if (re.comment)
13190
+ alias.comment = re.comment;
13088
13191
  return alias;
13089
13192
  }
13090
13193
  exports.composeEmptyNode = composeEmptyNode;
13091
13194
  exports.composeNode = composeNode;
13092
13195
  });
13093
13196
 
13094
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
13197
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/compose-doc.js
13095
13198
  var require_compose_doc = __commonJS((exports) => {
13096
13199
  var Document = require_Document();
13097
13200
  var composeNode = require_compose_node();
@@ -13122,16 +13225,16 @@ var require_compose_doc = __commonJS((exports) => {
13122
13225
  }
13123
13226
  doc.contents = value ? composeNode.composeNode(ctx, value, props, onError) : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);
13124
13227
  const contentEnd = doc.contents.range[2];
13125
- const re2 = resolveEnd.resolveEnd(end, contentEnd, false, onError);
13126
- if (re2.comment)
13127
- doc.comment = re2.comment;
13128
- doc.range = [offset, contentEnd, re2.offset];
13228
+ const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);
13229
+ if (re.comment)
13230
+ doc.comment = re.comment;
13231
+ doc.range = [offset, contentEnd, re.offset];
13129
13232
  return doc;
13130
13233
  }
13131
13234
  exports.composeDoc = composeDoc;
13132
13235
  });
13133
13236
 
13134
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
13237
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/compose/composer.js
13135
13238
  var require_composer = __commonJS((exports) => {
13136
13239
  var node_process = __require("process");
13137
13240
  var directives = require_directives();
@@ -13204,11 +13307,11 @@ ${comment}` : comment;
13204
13307
  } else if (afterEmptyLine || doc.directives.docStart || !dc) {
13205
13308
  doc.commentBefore = comment;
13206
13309
  } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
13207
- let it2 = dc.items[0];
13208
- if (identity.isPair(it2))
13209
- it2 = it2.key;
13210
- const cb = it2.commentBefore;
13211
- it2.commentBefore = cb ? `${comment}
13310
+ let it3 = dc.items[0];
13311
+ if (identity.isPair(it3))
13312
+ it3 = it3.key;
13313
+ const cb = it3.commentBefore;
13314
+ it3.commentBefore = cb ? `${comment}
13212
13315
  ${cb}` : comment;
13213
13316
  } else {
13214
13317
  const cb = dc.commentBefore;
@@ -13217,8 +13320,10 @@ ${cb}` : comment;
13217
13320
  }
13218
13321
  }
13219
13322
  if (afterDoc) {
13220
- Array.prototype.push.apply(doc.errors, this.errors);
13221
- Array.prototype.push.apply(doc.warnings, this.warnings);
13323
+ for (let i = 0;i < this.errors.length; ++i)
13324
+ doc.errors.push(this.errors[i]);
13325
+ for (let i = 0;i < this.warnings.length; ++i)
13326
+ doc.warnings.push(this.warnings[i]);
13222
13327
  } else {
13223
13328
  doc.errors = this.errors;
13224
13329
  doc.warnings = this.warnings;
@@ -13320,7 +13425,7 @@ ${end.comment}` : end.comment;
13320
13425
  exports.Composer = Composer;
13321
13426
  });
13322
13427
 
13323
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
13428
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/cst-scalar.js
13324
13429
  var require_cst_scalar = __commonJS((exports) => {
13325
13430
  var resolveBlockScalar = require_resolve_block_scalar();
13326
13431
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -13361,10 +13466,10 @@ var require_cst_scalar = __commonJS((exports) => {
13361
13466
  switch (source[0]) {
13362
13467
  case "|":
13363
13468
  case ">": {
13364
- const he2 = source.indexOf(`
13469
+ const he = source.indexOf(`
13365
13470
  `);
13366
- const head = source.substring(0, he2);
13367
- const body = source.substring(he2 + 1) + `
13471
+ const head = source.substring(0, he);
13472
+ const body = source.substring(he + 1) + `
13368
13473
  `;
13369
13474
  const props = [
13370
13475
  { type: "block-scalar-header", offset, indent, source: head }
@@ -13427,10 +13532,10 @@ var require_cst_scalar = __commonJS((exports) => {
13427
13532
  }
13428
13533
  }
13429
13534
  function setBlockScalarValue(token, source) {
13430
- const he2 = source.indexOf(`
13535
+ const he = source.indexOf(`
13431
13536
  `);
13432
- const head = source.substring(0, he2);
13433
- const body = source.substring(he2 + 1) + `
13537
+ const head = source.substring(0, he);
13538
+ const body = source.substring(he + 1) + `
13434
13539
  `;
13435
13540
  if (token.type === "block-scalar") {
13436
13541
  const header = token.props[0];
@@ -13455,14 +13560,14 @@ var require_cst_scalar = __commonJS((exports) => {
13455
13560
  }
13456
13561
  function addEndtoBlockProps(props, end) {
13457
13562
  if (end)
13458
- for (const st2 of end)
13459
- switch (st2.type) {
13563
+ for (const st3 of end)
13564
+ switch (st3.type) {
13460
13565
  case "space":
13461
13566
  case "comment":
13462
- props.push(st2);
13567
+ props.push(st3);
13463
13568
  break;
13464
13569
  case "newline":
13465
- props.push(st2);
13570
+ props.push(st3);
13466
13571
  return true;
13467
13572
  }
13468
13573
  return false;
@@ -13497,7 +13602,7 @@ var require_cst_scalar = __commonJS((exports) => {
13497
13602
  }
13498
13603
  default: {
13499
13604
  const indent = "indent" in token ? token.indent : -1;
13500
- const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
13605
+ const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st3) => st3.type === "space" || st3.type === "comment" || st3.type === "newline") : [];
13501
13606
  for (const key of Object.keys(token))
13502
13607
  if (key !== "type" && key !== "offset")
13503
13608
  delete token[key];
@@ -13510,7 +13615,7 @@ var require_cst_scalar = __commonJS((exports) => {
13510
13615
  exports.setScalarValue = setScalarValue;
13511
13616
  });
13512
13617
 
13513
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
13618
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/cst-stringify.js
13514
13619
  var require_cst_stringify = __commonJS((exports) => {
13515
13620
  var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
13516
13621
  function stringifyToken(token) {
@@ -13532,35 +13637,35 @@ var require_cst_stringify = __commonJS((exports) => {
13532
13637
  let res = token.start.source;
13533
13638
  for (const item of token.items)
13534
13639
  res += stringifyItem(item);
13535
- for (const st2 of token.end)
13536
- res += st2.source;
13640
+ for (const st3 of token.end)
13641
+ res += st3.source;
13537
13642
  return res;
13538
13643
  }
13539
13644
  case "document": {
13540
13645
  let res = stringifyItem(token);
13541
13646
  if (token.end)
13542
- for (const st2 of token.end)
13543
- res += st2.source;
13647
+ for (const st3 of token.end)
13648
+ res += st3.source;
13544
13649
  return res;
13545
13650
  }
13546
13651
  default: {
13547
13652
  let res = token.source;
13548
13653
  if ("end" in token && token.end)
13549
- for (const st2 of token.end)
13550
- res += st2.source;
13654
+ for (const st3 of token.end)
13655
+ res += st3.source;
13551
13656
  return res;
13552
13657
  }
13553
13658
  }
13554
13659
  }
13555
13660
  function stringifyItem({ start, key, sep, value }) {
13556
13661
  let res = "";
13557
- for (const st2 of start)
13558
- res += st2.source;
13662
+ for (const st3 of start)
13663
+ res += st3.source;
13559
13664
  if (key)
13560
13665
  res += stringifyToken(key);
13561
13666
  if (sep)
13562
- for (const st2 of sep)
13563
- res += st2.source;
13667
+ for (const st3 of sep)
13668
+ res += st3.source;
13564
13669
  if (value)
13565
13670
  res += stringifyToken(value);
13566
13671
  return res;
@@ -13568,7 +13673,7 @@ var require_cst_stringify = __commonJS((exports) => {
13568
13673
  exports.stringify = stringify;
13569
13674
  });
13570
13675
 
13571
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
13676
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/cst-visit.js
13572
13677
  var require_cst_visit = __commonJS((exports) => {
13573
13678
  var BREAK = Symbol("break visit");
13574
13679
  var SKIP = Symbol("skip children");
@@ -13627,7 +13732,7 @@ var require_cst_visit = __commonJS((exports) => {
13627
13732
  exports.visit = visit;
13628
13733
  });
13629
13734
 
13630
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
13735
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/cst.js
13631
13736
  var require_cst = __commonJS((exports) => {
13632
13737
  var cstScalar = require_cst_scalar();
13633
13738
  var cstStringify = require_cst_stringify();
@@ -13728,7 +13833,7 @@ var require_cst = __commonJS((exports) => {
13728
13833
  exports.tokenType = tokenType;
13729
13834
  });
13730
13835
 
13731
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
13836
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/lexer.js
13732
13837
  var require_lexer = __commonJS((exports) => {
13733
13838
  var cst = require_cst();
13734
13839
  function isEmpty(ch) {
@@ -13809,8 +13914,8 @@ var require_lexer = __commonJS((exports) => {
13809
13914
  ` || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1;
13810
13915
  }
13811
13916
  if (ch === "-" || ch === ".") {
13812
- const dt = this.buffer.substr(offset, 3);
13813
- if ((dt === "---" || dt === "...") && isEmpty(this.buffer[offset + 3]))
13917
+ const dt2 = this.buffer.substr(offset, 3);
13918
+ if ((dt2 === "---" || dt2 === "...") && isEmpty(this.buffer[offset + 3]))
13814
13919
  return -1;
13815
13920
  }
13816
13921
  return offset;
@@ -13930,7 +14035,7 @@ var require_lexer = __commonJS((exports) => {
13930
14035
  const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
13931
14036
  this.indentNext = this.indentValue + 1;
13932
14037
  this.indentValue += n;
13933
- return yield* this.parseBlockStart();
14038
+ return "block-start";
13934
14039
  }
13935
14040
  return "doc";
13936
14041
  }
@@ -14237,26 +14342,37 @@ var require_lexer = __commonJS((exports) => {
14237
14342
  return 0;
14238
14343
  }
14239
14344
  *pushIndicators() {
14240
- switch (this.charAt(0)) {
14241
- case "!":
14242
- return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
14243
- case "&":
14244
- return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
14245
- case "-":
14246
- case "?":
14247
- case ":": {
14248
- const inFlow = this.flowLevel > 0;
14249
- const ch1 = this.charAt(1);
14250
- if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
14251
- if (!inFlow)
14252
- this.indentNext = this.indentValue + 1;
14253
- else if (this.flowKey)
14254
- this.flowKey = false;
14255
- return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
14345
+ let n = 0;
14346
+ loop:
14347
+ while (true) {
14348
+ switch (this.charAt(0)) {
14349
+ case "!":
14350
+ n += yield* this.pushTag();
14351
+ n += yield* this.pushSpaces(true);
14352
+ continue loop;
14353
+ case "&":
14354
+ n += yield* this.pushUntil(isNotAnchorChar);
14355
+ n += yield* this.pushSpaces(true);
14356
+ continue loop;
14357
+ case "-":
14358
+ case "?":
14359
+ case ":": {
14360
+ const inFlow = this.flowLevel > 0;
14361
+ const ch1 = this.charAt(1);
14362
+ if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
14363
+ if (!inFlow)
14364
+ this.indentNext = this.indentValue + 1;
14365
+ else if (this.flowKey)
14366
+ this.flowKey = false;
14367
+ n += yield* this.pushCount(1);
14368
+ n += yield* this.pushSpaces(true);
14369
+ continue loop;
14370
+ }
14371
+ }
14256
14372
  }
14373
+ break loop;
14257
14374
  }
14258
- }
14259
- return 0;
14375
+ return n;
14260
14376
  }
14261
14377
  *pushTag() {
14262
14378
  if (this.charAt(1) === "<") {
@@ -14314,7 +14430,7 @@ var require_lexer = __commonJS((exports) => {
14314
14430
  exports.Lexer = Lexer;
14315
14431
  });
14316
14432
 
14317
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
14433
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/line-counter.js
14318
14434
  var require_line_counter = __commonJS((exports) => {
14319
14435
  class LineCounter {
14320
14436
  constructor() {
@@ -14342,7 +14458,7 @@ var require_line_counter = __commonJS((exports) => {
14342
14458
  exports.LineCounter = LineCounter;
14343
14459
  });
14344
14460
 
14345
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
14461
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/parser.js
14346
14462
  var require_parser = __commonJS((exports) => {
14347
14463
  var node_process = __require("process");
14348
14464
  var cst = require_cst();
@@ -14383,8 +14499,8 @@ var require_parser = __commonJS((exports) => {
14383
14499
  case "document":
14384
14500
  return parent.start;
14385
14501
  case "block-map": {
14386
- const it2 = parent.items[parent.items.length - 1];
14387
- return it2.sep ?? it2.start;
14502
+ const it3 = parent.items[parent.items.length - 1];
14503
+ return it3.sep ?? it3.start;
14388
14504
  }
14389
14505
  case "block-seq":
14390
14506
  return parent.items[parent.items.length - 1].start;
@@ -14410,21 +14526,28 @@ var require_parser = __commonJS((exports) => {
14410
14526
  while (prev[++i]?.type === "space") {}
14411
14527
  return prev.splice(i, prev.length);
14412
14528
  }
14529
+ function arrayPushArray(target, source) {
14530
+ if (source.length < 1e5)
14531
+ Array.prototype.push.apply(target, source);
14532
+ else
14533
+ for (let i = 0;i < source.length; ++i)
14534
+ target.push(source[i]);
14535
+ }
14413
14536
  function fixFlowSeqItems(fc) {
14414
14537
  if (fc.start.type === "flow-seq-start") {
14415
- for (const it2 of fc.items) {
14416
- if (it2.sep && !it2.value && !includesToken(it2.start, "explicit-key-ind") && !includesToken(it2.sep, "map-value-ind")) {
14417
- if (it2.key)
14418
- it2.value = it2.key;
14419
- delete it2.key;
14420
- if (isFlowToken(it2.value)) {
14421
- if (it2.value.end)
14422
- Array.prototype.push.apply(it2.value.end, it2.sep);
14538
+ for (const it3 of fc.items) {
14539
+ if (it3.sep && !it3.value && !includesToken(it3.start, "explicit-key-ind") && !includesToken(it3.sep, "map-value-ind")) {
14540
+ if (it3.key)
14541
+ it3.value = it3.key;
14542
+ delete it3.key;
14543
+ if (isFlowToken(it3.value)) {
14544
+ if (it3.value.end)
14545
+ arrayPushArray(it3.value.end, it3.sep);
14423
14546
  else
14424
- it2.value.end = it2.sep;
14547
+ it3.value.end = it3.sep;
14425
14548
  } else
14426
- Array.prototype.push.apply(it2.start, it2.sep);
14427
- delete it2.sep;
14549
+ arrayPushArray(it3.start, it3.sep);
14550
+ delete it3.sep;
14428
14551
  }
14429
14552
  }
14430
14553
  }
@@ -14504,13 +14627,13 @@ var require_parser = __commonJS((exports) => {
14504
14627
  yield* this.pop();
14505
14628
  }
14506
14629
  get sourceToken() {
14507
- const st2 = {
14630
+ const st3 = {
14508
14631
  type: this.type,
14509
14632
  offset: this.offset,
14510
14633
  indent: this.indent,
14511
14634
  source: this.source
14512
14635
  };
14513
- return st2;
14636
+ return st3;
14514
14637
  }
14515
14638
  *step() {
14516
14639
  const top = this.peek(1);
@@ -14574,36 +14697,36 @@ var require_parser = __commonJS((exports) => {
14574
14697
  top.props.push(token);
14575
14698
  break;
14576
14699
  case "block-map": {
14577
- const it2 = top.items[top.items.length - 1];
14578
- if (it2.value) {
14700
+ const it3 = top.items[top.items.length - 1];
14701
+ if (it3.value) {
14579
14702
  top.items.push({ start: [], key: token, sep: [] });
14580
14703
  this.onKeyLine = true;
14581
14704
  return;
14582
- } else if (it2.sep) {
14583
- it2.value = token;
14705
+ } else if (it3.sep) {
14706
+ it3.value = token;
14584
14707
  } else {
14585
- Object.assign(it2, { key: token, sep: [] });
14586
- this.onKeyLine = !it2.explicitKey;
14708
+ Object.assign(it3, { key: token, sep: [] });
14709
+ this.onKeyLine = !it3.explicitKey;
14587
14710
  return;
14588
14711
  }
14589
14712
  break;
14590
14713
  }
14591
14714
  case "block-seq": {
14592
- const it2 = top.items[top.items.length - 1];
14593
- if (it2.value)
14715
+ const it3 = top.items[top.items.length - 1];
14716
+ if (it3.value)
14594
14717
  top.items.push({ start: [], value: token });
14595
14718
  else
14596
- it2.value = token;
14719
+ it3.value = token;
14597
14720
  break;
14598
14721
  }
14599
14722
  case "flow-collection": {
14600
- const it2 = top.items[top.items.length - 1];
14601
- if (!it2 || it2.value)
14723
+ const it3 = top.items[top.items.length - 1];
14724
+ if (!it3 || it3.value)
14602
14725
  top.items.push({ start: [], key: token, sep: [] });
14603
- else if (it2.sep)
14604
- it2.value = token;
14726
+ else if (it3.sep)
14727
+ it3.value = token;
14605
14728
  else
14606
- Object.assign(it2, { key: token, sep: [] });
14729
+ Object.assign(it3, { key: token, sep: [] });
14607
14730
  return;
14608
14731
  }
14609
14732
  default:
@@ -14612,7 +14735,7 @@ var require_parser = __commonJS((exports) => {
14612
14735
  }
14613
14736
  if ((top.type === "document" || top.type === "block-map" || top.type === "block-seq") && (token.type === "block-map" || token.type === "block-seq")) {
14614
14737
  const last = token.items[token.items.length - 1];
14615
- if (last && !last.sep && !last.value && last.start.length > 0 && findNonEmptyIndex(last.start) === -1 && (token.indent === 0 || last.start.every((st2) => st2.type !== "comment" || st2.indent < token.indent))) {
14738
+ if (last && !last.sep && !last.value && last.start.length > 0 && findNonEmptyIndex(last.start) === -1 && (token.indent === 0 || last.start.every((st3) => st3.type !== "comment" || st3.indent < token.indent))) {
14616
14739
  if (top.type === "document")
14617
14740
  top.end = last.start;
14618
14741
  else
@@ -14735,60 +14858,60 @@ var require_parser = __commonJS((exports) => {
14735
14858
  }
14736
14859
  }
14737
14860
  *blockMap(map) {
14738
- const it2 = map.items[map.items.length - 1];
14861
+ const it3 = map.items[map.items.length - 1];
14739
14862
  switch (this.type) {
14740
14863
  case "newline":
14741
14864
  this.onKeyLine = false;
14742
- if (it2.value) {
14743
- const end = "end" in it2.value ? it2.value.end : undefined;
14865
+ if (it3.value) {
14866
+ const end = "end" in it3.value ? it3.value.end : undefined;
14744
14867
  const last = Array.isArray(end) ? end[end.length - 1] : undefined;
14745
14868
  if (last?.type === "comment")
14746
14869
  end?.push(this.sourceToken);
14747
14870
  else
14748
14871
  map.items.push({ start: [this.sourceToken] });
14749
- } else if (it2.sep) {
14750
- it2.sep.push(this.sourceToken);
14872
+ } else if (it3.sep) {
14873
+ it3.sep.push(this.sourceToken);
14751
14874
  } else {
14752
- it2.start.push(this.sourceToken);
14875
+ it3.start.push(this.sourceToken);
14753
14876
  }
14754
14877
  return;
14755
14878
  case "space":
14756
14879
  case "comment":
14757
- if (it2.value) {
14880
+ if (it3.value) {
14758
14881
  map.items.push({ start: [this.sourceToken] });
14759
- } else if (it2.sep) {
14760
- it2.sep.push(this.sourceToken);
14882
+ } else if (it3.sep) {
14883
+ it3.sep.push(this.sourceToken);
14761
14884
  } else {
14762
- if (this.atIndentedComment(it2.start, map.indent)) {
14885
+ if (this.atIndentedComment(it3.start, map.indent)) {
14763
14886
  const prev = map.items[map.items.length - 2];
14764
14887
  const end = prev?.value?.end;
14765
14888
  if (Array.isArray(end)) {
14766
- Array.prototype.push.apply(end, it2.start);
14889
+ arrayPushArray(end, it3.start);
14767
14890
  end.push(this.sourceToken);
14768
14891
  map.items.pop();
14769
14892
  return;
14770
14893
  }
14771
14894
  }
14772
- it2.start.push(this.sourceToken);
14895
+ it3.start.push(this.sourceToken);
14773
14896
  }
14774
14897
  return;
14775
14898
  }
14776
14899
  if (this.indent >= map.indent) {
14777
14900
  const atMapIndent = !this.onKeyLine && this.indent === map.indent;
14778
- const atNextItem = atMapIndent && (it2.sep || it2.explicitKey) && this.type !== "seq-item-ind";
14901
+ const atNextItem = atMapIndent && (it3.sep || it3.explicitKey) && this.type !== "seq-item-ind";
14779
14902
  let start = [];
14780
- if (atNextItem && it2.sep && !it2.value) {
14903
+ if (atNextItem && it3.sep && !it3.value) {
14781
14904
  const nl = [];
14782
- for (let i = 0;i < it2.sep.length; ++i) {
14783
- const st2 = it2.sep[i];
14784
- switch (st2.type) {
14905
+ for (let i = 0;i < it3.sep.length; ++i) {
14906
+ const st3 = it3.sep[i];
14907
+ switch (st3.type) {
14785
14908
  case "newline":
14786
14909
  nl.push(i);
14787
14910
  break;
14788
14911
  case "space":
14789
14912
  break;
14790
14913
  case "comment":
14791
- if (st2.indent > map.indent)
14914
+ if (st3.indent > map.indent)
14792
14915
  nl.length = 0;
14793
14916
  break;
14794
14917
  default:
@@ -14796,26 +14919,26 @@ var require_parser = __commonJS((exports) => {
14796
14919
  }
14797
14920
  }
14798
14921
  if (nl.length >= 2)
14799
- start = it2.sep.splice(nl[1]);
14922
+ start = it3.sep.splice(nl[1]);
14800
14923
  }
14801
14924
  switch (this.type) {
14802
14925
  case "anchor":
14803
14926
  case "tag":
14804
- if (atNextItem || it2.value) {
14927
+ if (atNextItem || it3.value) {
14805
14928
  start.push(this.sourceToken);
14806
14929
  map.items.push({ start });
14807
14930
  this.onKeyLine = true;
14808
- } else if (it2.sep) {
14809
- it2.sep.push(this.sourceToken);
14931
+ } else if (it3.sep) {
14932
+ it3.sep.push(this.sourceToken);
14810
14933
  } else {
14811
- it2.start.push(this.sourceToken);
14934
+ it3.start.push(this.sourceToken);
14812
14935
  }
14813
14936
  return;
14814
14937
  case "explicit-key-ind":
14815
- if (!it2.sep && !it2.explicitKey) {
14816
- it2.start.push(this.sourceToken);
14817
- it2.explicitKey = true;
14818
- } else if (atNextItem || it2.value) {
14938
+ if (!it3.sep && !it3.explicitKey) {
14939
+ it3.start.push(this.sourceToken);
14940
+ it3.explicitKey = true;
14941
+ } else if (atNextItem || it3.value) {
14819
14942
  start.push(this.sourceToken);
14820
14943
  map.items.push({ start, explicitKey: true });
14821
14944
  } else {
@@ -14829,12 +14952,12 @@ var require_parser = __commonJS((exports) => {
14829
14952
  this.onKeyLine = true;
14830
14953
  return;
14831
14954
  case "map-value-ind":
14832
- if (it2.explicitKey) {
14833
- if (!it2.sep) {
14834
- if (includesToken(it2.start, "newline")) {
14835
- Object.assign(it2, { key: null, sep: [this.sourceToken] });
14955
+ if (it3.explicitKey) {
14956
+ if (!it3.sep) {
14957
+ if (includesToken(it3.start, "newline")) {
14958
+ Object.assign(it3, { key: null, sep: [this.sourceToken] });
14836
14959
  } else {
14837
- const start2 = getFirstKeyStartProps(it2.start);
14960
+ const start2 = getFirstKeyStartProps(it3.start);
14838
14961
  this.stack.push({
14839
14962
  type: "block-map",
14840
14963
  offset: this.offset,
@@ -14842,22 +14965,22 @@ var require_parser = __commonJS((exports) => {
14842
14965
  items: [{ start: start2, key: null, sep: [this.sourceToken] }]
14843
14966
  });
14844
14967
  }
14845
- } else if (it2.value) {
14968
+ } else if (it3.value) {
14846
14969
  map.items.push({ start: [], key: null, sep: [this.sourceToken] });
14847
- } else if (includesToken(it2.sep, "map-value-ind")) {
14970
+ } else if (includesToken(it3.sep, "map-value-ind")) {
14848
14971
  this.stack.push({
14849
14972
  type: "block-map",
14850
14973
  offset: this.offset,
14851
14974
  indent: this.indent,
14852
14975
  items: [{ start, key: null, sep: [this.sourceToken] }]
14853
14976
  });
14854
- } else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
14855
- const start2 = getFirstKeyStartProps(it2.start);
14856
- const key = it2.key;
14857
- const sep = it2.sep;
14977
+ } else if (isFlowToken(it3.key) && !includesToken(it3.sep, "newline")) {
14978
+ const start2 = getFirstKeyStartProps(it3.start);
14979
+ const key = it3.key;
14980
+ const sep = it3.sep;
14858
14981
  sep.push(this.sourceToken);
14859
- delete it2.key;
14860
- delete it2.sep;
14982
+ delete it3.key;
14983
+ delete it3.sep;
14861
14984
  this.stack.push({
14862
14985
  type: "block-map",
14863
14986
  offset: this.offset,
@@ -14865,16 +14988,16 @@ var require_parser = __commonJS((exports) => {
14865
14988
  items: [{ start: start2, key, sep }]
14866
14989
  });
14867
14990
  } else if (start.length > 0) {
14868
- it2.sep = it2.sep.concat(start, this.sourceToken);
14991
+ it3.sep = it3.sep.concat(start, this.sourceToken);
14869
14992
  } else {
14870
- it2.sep.push(this.sourceToken);
14993
+ it3.sep.push(this.sourceToken);
14871
14994
  }
14872
14995
  } else {
14873
- if (!it2.sep) {
14874
- Object.assign(it2, { key: null, sep: [this.sourceToken] });
14875
- } else if (it2.value || atNextItem) {
14996
+ if (!it3.sep) {
14997
+ Object.assign(it3, { key: null, sep: [this.sourceToken] });
14998
+ } else if (it3.value || atNextItem) {
14876
14999
  map.items.push({ start, key: null, sep: [this.sourceToken] });
14877
- } else if (includesToken(it2.sep, "map-value-ind")) {
15000
+ } else if (includesToken(it3.sep, "map-value-ind")) {
14878
15001
  this.stack.push({
14879
15002
  type: "block-map",
14880
15003
  offset: this.offset,
@@ -14882,7 +15005,7 @@ var require_parser = __commonJS((exports) => {
14882
15005
  items: [{ start: [], key: null, sep: [this.sourceToken] }]
14883
15006
  });
14884
15007
  } else {
14885
- it2.sep.push(this.sourceToken);
15008
+ it3.sep.push(this.sourceToken);
14886
15009
  }
14887
15010
  }
14888
15011
  this.onKeyLine = true;
@@ -14892,13 +15015,13 @@ var require_parser = __commonJS((exports) => {
14892
15015
  case "single-quoted-scalar":
14893
15016
  case "double-quoted-scalar": {
14894
15017
  const fs = this.flowScalar(this.type);
14895
- if (atNextItem || it2.value) {
15018
+ if (atNextItem || it3.value) {
14896
15019
  map.items.push({ start, key: fs, sep: [] });
14897
15020
  this.onKeyLine = true;
14898
- } else if (it2.sep) {
15021
+ } else if (it3.sep) {
14899
15022
  this.stack.push(fs);
14900
15023
  } else {
14901
- Object.assign(it2, { key: fs, sep: [] });
15024
+ Object.assign(it3, { key: fs, sep: [] });
14902
15025
  this.onKeyLine = true;
14903
15026
  }
14904
15027
  return;
@@ -14907,7 +15030,7 @@ var require_parser = __commonJS((exports) => {
14907
15030
  const bv = this.startBlockValue(map);
14908
15031
  if (bv) {
14909
15032
  if (bv.type === "block-seq") {
14910
- if (!it2.explicitKey && it2.sep && !includesToken(it2.sep, "newline")) {
15033
+ if (!it3.explicitKey && it3.sep && !includesToken(it3.sep, "newline")) {
14911
15034
  yield* this.pop({
14912
15035
  type: "error",
14913
15036
  offset: this.offset,
@@ -14929,50 +15052,50 @@ var require_parser = __commonJS((exports) => {
14929
15052
  yield* this.step();
14930
15053
  }
14931
15054
  *blockSequence(seq) {
14932
- const it2 = seq.items[seq.items.length - 1];
15055
+ const it3 = seq.items[seq.items.length - 1];
14933
15056
  switch (this.type) {
14934
15057
  case "newline":
14935
- if (it2.value) {
14936
- const end = "end" in it2.value ? it2.value.end : undefined;
15058
+ if (it3.value) {
15059
+ const end = "end" in it3.value ? it3.value.end : undefined;
14937
15060
  const last = Array.isArray(end) ? end[end.length - 1] : undefined;
14938
15061
  if (last?.type === "comment")
14939
15062
  end?.push(this.sourceToken);
14940
15063
  else
14941
15064
  seq.items.push({ start: [this.sourceToken] });
14942
15065
  } else
14943
- it2.start.push(this.sourceToken);
15066
+ it3.start.push(this.sourceToken);
14944
15067
  return;
14945
15068
  case "space":
14946
15069
  case "comment":
14947
- if (it2.value)
15070
+ if (it3.value)
14948
15071
  seq.items.push({ start: [this.sourceToken] });
14949
15072
  else {
14950
- if (this.atIndentedComment(it2.start, seq.indent)) {
15073
+ if (this.atIndentedComment(it3.start, seq.indent)) {
14951
15074
  const prev = seq.items[seq.items.length - 2];
14952
15075
  const end = prev?.value?.end;
14953
15076
  if (Array.isArray(end)) {
14954
- Array.prototype.push.apply(end, it2.start);
15077
+ arrayPushArray(end, it3.start);
14955
15078
  end.push(this.sourceToken);
14956
15079
  seq.items.pop();
14957
15080
  return;
14958
15081
  }
14959
15082
  }
14960
- it2.start.push(this.sourceToken);
15083
+ it3.start.push(this.sourceToken);
14961
15084
  }
14962
15085
  return;
14963
15086
  case "anchor":
14964
15087
  case "tag":
14965
- if (it2.value || this.indent <= seq.indent)
15088
+ if (it3.value || this.indent <= seq.indent)
14966
15089
  break;
14967
- it2.start.push(this.sourceToken);
15090
+ it3.start.push(this.sourceToken);
14968
15091
  return;
14969
15092
  case "seq-item-ind":
14970
15093
  if (this.indent !== seq.indent)
14971
15094
  break;
14972
- if (it2.value || includesToken(it2.start, "seq-item-ind"))
15095
+ if (it3.value || includesToken(it3.start, "seq-item-ind"))
14973
15096
  seq.items.push({ start: [this.sourceToken] });
14974
15097
  else
14975
- it2.start.push(this.sourceToken);
15098
+ it3.start.push(this.sourceToken);
14976
15099
  return;
14977
15100
  }
14978
15101
  if (this.indent > seq.indent) {
@@ -14986,7 +15109,7 @@ var require_parser = __commonJS((exports) => {
14986
15109
  yield* this.step();
14987
15110
  }
14988
15111
  *flowCollection(fc) {
14989
- const it2 = fc.items[fc.items.length - 1];
15112
+ const it3 = fc.items[fc.items.length - 1];
14990
15113
  if (this.type === "flow-error-end") {
14991
15114
  let top;
14992
15115
  do {
@@ -14997,42 +15120,42 @@ var require_parser = __commonJS((exports) => {
14997
15120
  switch (this.type) {
14998
15121
  case "comma":
14999
15122
  case "explicit-key-ind":
15000
- if (!it2 || it2.sep)
15123
+ if (!it3 || it3.sep)
15001
15124
  fc.items.push({ start: [this.sourceToken] });
15002
15125
  else
15003
- it2.start.push(this.sourceToken);
15126
+ it3.start.push(this.sourceToken);
15004
15127
  return;
15005
15128
  case "map-value-ind":
15006
- if (!it2 || it2.value)
15129
+ if (!it3 || it3.value)
15007
15130
  fc.items.push({ start: [], key: null, sep: [this.sourceToken] });
15008
- else if (it2.sep)
15009
- it2.sep.push(this.sourceToken);
15131
+ else if (it3.sep)
15132
+ it3.sep.push(this.sourceToken);
15010
15133
  else
15011
- Object.assign(it2, { key: null, sep: [this.sourceToken] });
15134
+ Object.assign(it3, { key: null, sep: [this.sourceToken] });
15012
15135
  return;
15013
15136
  case "space":
15014
15137
  case "comment":
15015
15138
  case "newline":
15016
15139
  case "anchor":
15017
15140
  case "tag":
15018
- if (!it2 || it2.value)
15141
+ if (!it3 || it3.value)
15019
15142
  fc.items.push({ start: [this.sourceToken] });
15020
- else if (it2.sep)
15021
- it2.sep.push(this.sourceToken);
15143
+ else if (it3.sep)
15144
+ it3.sep.push(this.sourceToken);
15022
15145
  else
15023
- it2.start.push(this.sourceToken);
15146
+ it3.start.push(this.sourceToken);
15024
15147
  return;
15025
15148
  case "alias":
15026
15149
  case "scalar":
15027
15150
  case "single-quoted-scalar":
15028
15151
  case "double-quoted-scalar": {
15029
15152
  const fs = this.flowScalar(this.type);
15030
- if (!it2 || it2.value)
15153
+ if (!it3 || it3.value)
15031
15154
  fc.items.push({ start: [], key: fs, sep: [] });
15032
- else if (it2.sep)
15155
+ else if (it3.sep)
15033
15156
  this.stack.push(fs);
15034
15157
  else
15035
- Object.assign(it2, { key: fs, sep: [] });
15158
+ Object.assign(it3, { key: fs, sep: [] });
15036
15159
  return;
15037
15160
  }
15038
15161
  case "flow-map-end":
@@ -15151,7 +15274,7 @@ var require_parser = __commonJS((exports) => {
15151
15274
  return false;
15152
15275
  if (this.indent <= indent)
15153
15276
  return false;
15154
- return start.every((st2) => st2.type === "newline" || st2.type === "space");
15277
+ return start.every((st3) => st3.type === "newline" || st3.type === "space");
15155
15278
  }
15156
15279
  *documentEnd(docEnd) {
15157
15280
  if (this.type !== "doc-mode") {
@@ -15191,7 +15314,7 @@ var require_parser = __commonJS((exports) => {
15191
15314
  exports.Parser = Parser;
15192
15315
  });
15193
15316
 
15194
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
15317
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/public-api.js
15195
15318
  var require_public_api = __commonJS((exports) => {
15196
15319
  var composer = require_composer();
15197
15320
  var Document = require_Document();
@@ -15285,7 +15408,7 @@ var require_public_api = __commonJS((exports) => {
15285
15408
  exports.stringify = stringify;
15286
15409
  });
15287
15410
 
15288
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
15411
+ // node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/index.js
15289
15412
  var composer, Document, Schema, errors2, Alias, identity, Pair, Scalar, YAMLMap, YAMLSeq, cst, lexer, lineCounter, parser, publicApi, visit, $Composer, $Document, $Schema, $YAMLError, $YAMLParseError, $YAMLWarning, $Alias, $isAlias, $isCollection, $isDocument, $isMap, $isNode, $isPair, $isScalar, $isSeq, $Pair, $Scalar, $YAMLMap, $YAMLSeq, $Lexer, $LineCounter, $Parser, $parse, $parseAllDocuments, $parseDocument, $stringify, $visit, $visitAsync;
15290
15413
  var init_dist5 = __esm(() => {
15291
15414
  composer = require_composer();
@@ -15968,8 +16091,8 @@ async function launchContainer(opts) {
15968
16091
  let sshAuthSock = Bun.env.SSH_AUTH_SOCK;
15969
16092
  if (sshAuthSock) {
15970
16093
  try {
15971
- const st2 = await stat(sshAuthSock);
15972
- if (!st2.isSocket() || (st2.mode & 7) === 0) {
16094
+ const st3 = await stat(sshAuthSock);
16095
+ if (!st3.isSocket() || (st3.mode & 7) === 0) {
15973
16096
  log.debug(`[docker] skipping SSH_AUTH_SOCK (not world-accessible): ${sshAuthSock}`);
15974
16097
  sshAuthSock = undefined;
15975
16098
  }
@@ -17336,6 +17459,15 @@ function stringifyStartupEnvValue(value) {
17336
17459
  function trimTrailingSlashes(value) {
17337
17460
  return value.replace(/\/+$/, "");
17338
17461
  }
17462
+ function normalizeWorktreeLabel(label) {
17463
+ const trimmed = label?.trim() ?? "";
17464
+ if (!trimmed)
17465
+ return null;
17466
+ if (trimmed.length > MAX_WORKTREE_LABEL_LENGTH) {
17467
+ throw new LifecycleError(`Worktree label must be ${MAX_WORKTREE_LABEL_LENGTH} characters or fewer`, 400);
17468
+ }
17469
+ return trimmed;
17470
+ }
17339
17471
  function isLoopbackHostname(hostname) {
17340
17472
  return hostname === "127.0.0.1" || hostname === "localhost" || hostname === "::1" || hostname === "[::1]";
17341
17473
  }
@@ -17502,6 +17634,21 @@ class LifecycleService {
17502
17634
  throw this.wrapOperationError(error);
17503
17635
  }
17504
17636
  }
17637
+ async setWorktreeLabel(branch, label) {
17638
+ try {
17639
+ const normalizedLabel = normalizeWorktreeLabel(label);
17640
+ const resolved = await this.resolveExistingWorktree(branch);
17641
+ if (!resolved.meta) {
17642
+ throw new LifecycleError(`Worktree ${branch} has no managed metadata to label`, 409);
17643
+ }
17644
+ const nextMeta = this.withUpdatedLabel(resolved.meta, normalizedLabel);
17645
+ await writeWorktreeMeta(resolved.gitDir, nextMeta);
17646
+ await this.deps.reconciliation.reconcile(this.deps.projectRoot, { force: true });
17647
+ return { label: normalizedLabel };
17648
+ } catch (error) {
17649
+ throw this.wrapOperationError(error);
17650
+ }
17651
+ }
17505
17652
  listAvailableBranches(options = {}) {
17506
17653
  const localBranches = this.listLocalBranches().filter((branch) => isValidBranchName(branch));
17507
17654
  const remoteBranches = options.includeRemote ? this.listRemoteBranches().filter((branch) => isValidBranchName(branch)) : [];
@@ -17683,6 +17830,15 @@ class LifecycleService {
17683
17830
  async updateWorktreeArchivedState(path, archived) {
17684
17831
  await this.deps.archiveState.setArchived(path, archived);
17685
17832
  }
17833
+ withUpdatedLabel(meta, label) {
17834
+ const nextMeta = { ...meta };
17835
+ if (label) {
17836
+ nextMeta.label = label;
17837
+ } else {
17838
+ delete nextMeta.label;
17839
+ }
17840
+ return nextMeta;
17841
+ }
17686
17842
  async closeBranchWindow(branch) {
17687
17843
  this.deps.tmux.killWindow(buildProjectSessionName(this.deps.projectRoot), buildWorktreeWindowName(branch));
17688
17844
  await this.deps.reconciliation.reconcile(this.deps.projectRoot, { force: true });
@@ -17975,7 +18131,7 @@ class LifecycleService {
17975
18131
  return new LifecycleError(toErrorMessage2(error), 422);
17976
18132
  }
17977
18133
  }
17978
- var DOCKER_CONTROL_HOST = "host.docker.internal", LifecycleError;
18134
+ var DOCKER_CONTROL_HOST = "host.docker.internal", MAX_WORKTREE_LABEL_LENGTH = 80, LifecycleError;
17979
18135
  var init_lifecycle_service = __esm(() => {
17980
18136
  init_agent_runtime();
17981
18137
  init_fs();
@@ -18102,6 +18258,7 @@ function makeDefaultState(input) {
18102
18258
  return {
18103
18259
  worktreeId: input.worktreeId,
18104
18260
  branch: input.branch,
18261
+ label: input.label ?? null,
18105
18262
  baseBranch: input.baseBranch ?? null,
18106
18263
  path: input.path,
18107
18264
  profile: input.profile ?? null,
@@ -18147,6 +18304,8 @@ class ProjectRuntime {
18147
18304
  this.reindexBranch(existing.branch, input.branch, input.worktreeId);
18148
18305
  existing.path = input.path;
18149
18306
  existing.branch = input.branch;
18307
+ if (input.label !== undefined)
18308
+ existing.label = input.label;
18150
18309
  if (input.baseBranch !== undefined)
18151
18310
  existing.baseBranch = input.baseBranch;
18152
18311
  existing.profile = input.profile ?? existing.profile;
@@ -18368,6 +18527,7 @@ class ReconciliationService {
18368
18527
  return {
18369
18528
  worktreeId,
18370
18529
  branch,
18530
+ label: meta?.label ?? null,
18371
18531
  baseBranch: meta?.baseBranch ?? null,
18372
18532
  path: entry.path,
18373
18533
  profile: meta?.profile ?? null,
@@ -18400,6 +18560,7 @@ class ReconciliationService {
18400
18560
  this.deps.runtime.upsertWorktree({
18401
18561
  worktreeId: state.worktreeId,
18402
18562
  branch: state.branch,
18563
+ label: state.label,
18403
18564
  baseBranch: state.baseBranch,
18404
18565
  path: state.path,
18405
18566
  profile: state.profile,
@@ -18539,6 +18700,7 @@ __export(exports_worktree_commands, {
18539
18700
  runWorktreeCommand: () => runWorktreeCommand,
18540
18701
  parseSendCommandArgs: () => parseSendCommandArgs,
18541
18702
  parseListCommandArgs: () => parseListCommandArgs,
18703
+ parseLabelCommandArgs: () => parseLabelCommandArgs,
18542
18704
  parseBranchCommandArgs: () => parseBranchCommandArgs,
18543
18705
  parseAddCommandArgs: () => parseAddCommandArgs,
18544
18706
  getWorktreeCommandUsage: () => getWorktreeCommandUsage
@@ -18586,6 +18748,18 @@ function getWorktreeCommandUsage(command) {
18586
18748
  case "unarchive":
18587
18749
  return `Usage:
18588
18750
  webmux unarchive <branch>`;
18751
+ case "label":
18752
+ return [
18753
+ "Usage:",
18754
+ " webmux label <branch> <label>",
18755
+ " webmux label <branch> --clear",
18756
+ "",
18757
+ "Options:",
18758
+ " --clear Clear the workspace label",
18759
+ " --label <text> Label text",
18760
+ " --help Show this help message"
18761
+ ].join(`
18762
+ `);
18589
18763
  case "remove":
18590
18764
  return `Usage:
18591
18765
  webmux remove <branch>`;
@@ -18728,6 +18902,64 @@ function parseBranchCommandArgs(args) {
18728
18902
  }
18729
18903
  return branch;
18730
18904
  }
18905
+ function parseLabelCommandArgs(args) {
18906
+ let branch = null;
18907
+ let clear = false;
18908
+ let optionLabel = null;
18909
+ const labelParts = [];
18910
+ for (let index = 0;index < args.length; index++) {
18911
+ const arg = args[index];
18912
+ if (!arg)
18913
+ continue;
18914
+ if (arg === "--help" || arg === "-h") {
18915
+ return null;
18916
+ }
18917
+ if (arg === "--clear") {
18918
+ clear = true;
18919
+ continue;
18920
+ }
18921
+ if (arg === "--label" || arg.startsWith("--label=")) {
18922
+ if (optionLabel !== null) {
18923
+ throw new CommandUsageError("Cannot use --label more than once");
18924
+ }
18925
+ const { value, nextIndex } = readOptionValue(args, index, "--label");
18926
+ optionLabel = value;
18927
+ index = nextIndex;
18928
+ continue;
18929
+ }
18930
+ if (arg.startsWith("-")) {
18931
+ throw new CommandUsageError(`Unknown option: ${arg}`);
18932
+ }
18933
+ if (!branch) {
18934
+ branch = arg;
18935
+ continue;
18936
+ }
18937
+ if (optionLabel !== null) {
18938
+ throw new CommandUsageError("Cannot use --label with a positional label");
18939
+ }
18940
+ labelParts.push(arg);
18941
+ }
18942
+ if (!branch) {
18943
+ throw new CommandUsageError("Missing required argument: <branch>");
18944
+ }
18945
+ if (!isValidWorktreeName(branch)) {
18946
+ throw new CommandUsageError("Invalid worktree name");
18947
+ }
18948
+ if (optionLabel !== null && labelParts.length > 0) {
18949
+ throw new CommandUsageError("Cannot use --label with a positional label");
18950
+ }
18951
+ const label = (optionLabel ?? labelParts.join(" ")).trim();
18952
+ if (clear && label) {
18953
+ throw new CommandUsageError("Cannot use --clear with a label");
18954
+ }
18955
+ if (!clear && !label) {
18956
+ throw new CommandUsageError("Missing required argument: <label>");
18957
+ }
18958
+ return {
18959
+ branch,
18960
+ label: clear ? null : label
18961
+ };
18962
+ }
18731
18963
  function parseSendCommandArgs(args) {
18732
18964
  let branch = null;
18733
18965
  let text = null;
@@ -18828,7 +19060,7 @@ function listProjectWorktrees(runtime) {
18828
19060
  return runtime.git.listWorktrees(projectDir).filter((entry) => !entry.bare && resolve10(entry.path) !== projectDir);
18829
19061
  }
18830
19062
  async function defaultConfirmPrune(worktreeCount) {
18831
- const response = await ot2({
19063
+ const response = await ue({
18832
19064
  message: `Prune all ${worktreeCount} worktree${worktreeCount === 1 ? "" : "s"}? This action cannot be undone.`,
18833
19065
  initialValue: false
18834
19066
  });
@@ -18891,10 +19123,12 @@ async function listWorktrees(runtime, stdout, options) {
18891
19123
  const info = meta ? `${meta.profile} / ${meta.agent}` : "";
18892
19124
  return {
18893
19125
  branch,
19126
+ label: meta?.label ?? null,
18894
19127
  isOpen,
18895
19128
  archived: archivedPaths.has(resolve10(entry.path)),
18896
19129
  info,
18897
19130
  searchText: [
19131
+ meta?.label ?? "",
18898
19132
  branch,
18899
19133
  meta?.baseBranch ?? "",
18900
19134
  meta?.profile ?? "",
@@ -18923,10 +19157,11 @@ async function listWorktrees(runtime, stdout, options) {
18923
19157
  stdout(options.search.trim() ? `No worktrees found for "${options.search.trim()}".` : "No worktrees found.");
18924
19158
  return;
18925
19159
  }
18926
- const maxBranch = Math.max(...visibleRows.map((row) => row.branch.length));
19160
+ const maxName = Math.max(...visibleRows.map((row) => (row.label ? `${row.label} (${row.branch})` : row.branch).length));
18927
19161
  for (const row of visibleRows) {
18928
19162
  const status2 = `${row.isOpen ? "open" : "closed"}${row.archived ? " archived" : ""}`;
18929
- stdout(`${row.branch.padEnd(maxBranch + 2)} ${status2.padEnd(15)} ${row.info}`.trimEnd());
19163
+ const name = row.label ? `${row.label} (${row.branch})` : row.branch;
19164
+ stdout(`${name.padEnd(maxName + 2)} ${status2.padEnd(15)} ${row.info}`.trimEnd());
18930
19165
  }
18931
19166
  if (options.mode === "active") {
18932
19167
  const hiddenArchivedCount = matchingRows.filter((row) => row.archived).length;
@@ -19033,6 +19268,20 @@ async function runWorktreeCommand(context, deps2 = {}) {
19033
19268
  stdout(`Sent prompt to ${parsed.branch}`);
19034
19269
  return 0;
19035
19270
  }
19271
+ if (context.command === "label") {
19272
+ const parsed = parseLabelCommandArgs(context.args);
19273
+ if (!parsed) {
19274
+ stdout(getWorktreeCommandUsage("label"));
19275
+ return 0;
19276
+ }
19277
+ const runtime2 = createRuntime({
19278
+ projectDir: context.projectDir,
19279
+ port: context.port
19280
+ });
19281
+ const result = await runtime2.lifecycleService.setWorktreeLabel(parsed.branch, parsed.label);
19282
+ stdout(result.label ? `Labeled worktree ${parsed.branch} as "${result.label}"` : `Cleared label for ${parsed.branch}`);
19283
+ return 0;
19284
+ }
19036
19285
  const command = context.command;
19037
19286
  const branch = parseBranchCommandArgs(context.args);
19038
19287
  if (!branch) {
@@ -19102,7 +19351,7 @@ import { fileURLToPath } from "url";
19102
19351
  // package.json
19103
19352
  var package_default = {
19104
19353
  name: "webmux",
19105
- version: "0.30.0",
19354
+ version: "0.31.1",
19106
19355
  description: "Web dashboard for workmux \u2014 browser UI with embedded terminals, PR monitoring, and CI integration",
19107
19356
  type: "module",
19108
19357
  repository: {
@@ -19175,6 +19424,7 @@ Usage:
19175
19424
  webmux close Close a worktree session without removing it
19176
19425
  webmux archive Hide a worktree from the default list
19177
19426
  webmux unarchive Show an archived worktree again
19427
+ webmux label Set or clear a workspace label
19178
19428
  webmux remove Remove a worktree
19179
19429
  webmux merge Merge a worktree into the main branch and remove it
19180
19430
  webmux send Send a prompt to a running worktree agent
@@ -19193,7 +19443,7 @@ Environment:
19193
19443
  `);
19194
19444
  }
19195
19445
  function isRootCommand(value) {
19196
- return value === "serve" || value === "init" || value === "service" || value === "update" || value === "add" || value === "list" || value === "open" || value === "close" || value === "archive" || value === "unarchive" || value === "remove" || value === "merge" || value === "send" || value === "prune" || value === "completion";
19446
+ return value === "serve" || value === "init" || value === "service" || value === "update" || value === "add" || value === "list" || value === "open" || value === "close" || value === "archive" || value === "unarchive" || value === "label" || value === "remove" || value === "merge" || value === "send" || value === "prune" || value === "completion";
19197
19447
  }
19198
19448
  function isServeRootOption(value) {
19199
19449
  return value === "--port" || value === "--app" || value === "--debug" || value === "--help" || value === "-h" || value === "--version" || value === "-V";
@@ -19257,7 +19507,7 @@ Run webmux --help for usage.`);
19257
19507
  };
19258
19508
  }
19259
19509
  function isWorktreeCommand(command) {
19260
- return command === "add" || command === "list" || command === "open" || command === "close" || command === "archive" || command === "unarchive" || command === "remove" || command === "merge" || command === "send" || command === "prune";
19510
+ return command === "add" || command === "list" || command === "open" || command === "close" || command === "archive" || command === "unarchive" || command === "label" || command === "remove" || command === "merge" || command === "send" || command === "prune";
19261
19511
  }
19262
19512
  async function loadEnvFile(path) {
19263
19513
  if (!existsSync5(path))
@@ -19431,22 +19681,22 @@ async function main(args = process.argv.slice(2)) {
19431
19681
  process.exit(1);
19432
19682
  }
19433
19683
  console.log(`Starting webmux on port ${parsed.port}...`);
19434
- const be = Bun.spawn(["bun", backendEntry], {
19684
+ const be2 = Bun.spawn(["bun", backendEntry], {
19435
19685
  env: { ...baseEnv, WEBMUX_STATIC_DIR: staticDir },
19436
19686
  stdout: "pipe",
19437
19687
  stderr: "pipe"
19438
19688
  });
19439
- children.push(be);
19689
+ children.push(be2);
19440
19690
  if (parsed.app) {
19441
- pipeWithPrefix(be.stdout, "[BE]", {
19691
+ pipeWithPrefix(be2.stdout, "[BE]", {
19442
19692
  text: "Dev Dashboard API running at",
19443
19693
  callback: () => openAppMode(`http://localhost:${parsed.port}`)
19444
19694
  });
19445
19695
  } else {
19446
- pipeWithPrefix(be.stdout, "[BE]");
19696
+ pipeWithPrefix(be2.stdout, "[BE]");
19447
19697
  }
19448
- pipeWithPrefix(be.stderr, "[BE]");
19449
- cleanup(await be.exited);
19698
+ pipeWithPrefix(be2.stderr, "[BE]");
19699
+ cleanup(await be2.exited);
19450
19700
  }
19451
19701
  if (import.meta.main) {
19452
19702
  await main();