@pstdio/ui 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +8 -1
  2. package/dist/{MermaidComponent-BVdDqDRU.js → MermaidComponent-X__B6qib.js} +3 -3
  3. package/dist/{MermaidComponent-BVdDqDRU.js.map → MermaidComponent-X__B6qib.js.map} +1 -1
  4. package/dist/activity-timeline-BynMjXSB.js +283 -0
  5. package/dist/activity-timeline-BynMjXSB.js.map +1 -0
  6. package/dist/alert-ubcrW24X.js +33 -0
  7. package/dist/alert-ubcrW24X.js.map +1 -0
  8. package/dist/browser-storage-BinyFNJX.js +40 -0
  9. package/dist/browser-storage-BinyFNJX.js.map +1 -0
  10. package/dist/chat-ui.js +1515 -1429
  11. package/dist/chat-ui.js.map +1 -1
  12. package/dist/components/activity/index.d.ts +1 -3
  13. package/dist/components/chat-ui/components/chat-history-story.d.ts +14 -0
  14. package/dist/components/chat-ui/components/chat-input-history.d.ts +6 -0
  15. package/dist/components/chat-ui/components/chat-input.d.ts +2 -0
  16. package/dist/components/chat-ui/components/chat-panel-composer.d.ts +49 -0
  17. package/dist/components/chat-ui/components/use-chat-input-history.d.ts +16 -0
  18. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +1 -1
  19. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  20. package/dist/components/diff-viewer/code-editor.d.ts +2 -0
  21. package/dist/components/rich-text/index.d.ts +2 -0
  22. package/dist/components/rich-text/markdown-editor/markdown-editor-scrolling.play.d.ts +4 -0
  23. package/dist/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +3 -1
  24. package/dist/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +2 -0
  25. package/dist/components/rich-text/prompt-input/prompt-input.d.ts +2 -0
  26. package/dist/components/{activity → rich-text/resource-activity-feed}/resource-activity-feed.d.ts +1 -1
  27. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +1 -0
  28. package/dist/data-table.js +6 -6
  29. package/dist/diff.js +524 -522
  30. package/dist/diff.js.map +1 -1
  31. package/dist/{edit-mode-data-table-B8UpWb7i.js → edit-mode-data-table-Nfmfi7bz.js} +23 -22
  32. package/dist/{edit-mode-data-table-B8UpWb7i.js.map → edit-mode-data-table-Nfmfi7bz.js.map} +1 -1
  33. package/dist/index.d.ts +2 -3
  34. package/dist/index.js +1766 -2232
  35. package/dist/index.js.map +1 -1
  36. package/dist/{kanban-renderer-toolbar-DzY6THJY.js → kanban-renderer-toolbar-Buek4icz.js} +34 -33
  37. package/dist/{kanban-renderer-toolbar-DzY6THJY.js.map → kanban-renderer-toolbar-Buek4icz.js.map} +1 -1
  38. package/dist/kanban-renderer.js +31 -30
  39. package/dist/kanban-renderer.js.map +1 -1
  40. package/dist/lazy-markdown-editor-PzIBc9-l.js +42 -0
  41. package/dist/lazy-markdown-editor-PzIBc9-l.js.map +1 -0
  42. package/dist/{list-row-BDoV_iMV.js → list-row-DHzRa9-O.js} +2 -2
  43. package/dist/{list-row-BDoV_iMV.js.map → list-row-DHzRa9-O.js.map} +1 -1
  44. package/dist/{markdown-gNucAjnF.js → markdown-BCfPxNpb.js} +323 -303
  45. package/dist/markdown-BCfPxNpb.js.map +1 -0
  46. package/dist/markdown-editor-CsJ4KNGu.js +1034 -0
  47. package/dist/markdown-editor-CsJ4KNGu.js.map +1 -0
  48. package/dist/{mermaid-renderer-CVnuKs-A.js → mermaid-renderer-D0YP0FmJ.js} +3 -3
  49. package/dist/{mermaid-renderer-CVnuKs-A.js.map → mermaid-renderer-D0YP0FmJ.js.map} +1 -1
  50. package/dist/mermaid.js +1 -1
  51. package/dist/{param-editor-CTx3mDxQ.js → param-editor-CFM2Nf3l.js} +2 -2
  52. package/dist/{param-editor-CTx3mDxQ.js.map → param-editor-CFM2Nf3l.js.map} +1 -1
  53. package/dist/param-editor-field-Bj-AGUY6.js +1728 -0
  54. package/dist/param-editor-field-Bj-AGUY6.js.map +1 -0
  55. package/dist/param-editor.d.ts +2 -0
  56. package/dist/param-editor.js +47 -0
  57. package/dist/param-editor.js.map +1 -0
  58. package/dist/prism-n5gcERyD.js +202 -0
  59. package/dist/prism-n5gcERyD.js.map +1 -0
  60. package/dist/radio-BfjibByI.js +51 -0
  61. package/dist/radio-BfjibByI.js.map +1 -0
  62. package/dist/rich-message-q6Y6QJOq.js +633 -0
  63. package/dist/rich-message-q6Y6QJOq.js.map +1 -0
  64. package/dist/rich-text.js +342 -178
  65. package/dist/rich-text.js.map +1 -1
  66. package/dist/scroll-area-BMbg1WcD.js +91 -0
  67. package/dist/scroll-area-BMbg1WcD.js.map +1 -0
  68. package/dist/slider-DBHjdxsU.js +1092 -0
  69. package/dist/slider-DBHjdxsU.js.map +1 -0
  70. package/dist/style.css +1 -1
  71. package/dist/terminal.js +96 -93
  72. package/dist/terminal.js.map +1 -1
  73. package/dist/theme/recipes/timeline.d.ts +9 -0
  74. package/dist/{theme-Dc7hVvMC.js → theme-AzJH4Om3.js} +10 -1
  75. package/dist/theme-AzJH4Om3.js.map +1 -0
  76. package/dist/{theme-preference-Bpobguh4.js → theme-preference-DxGW1qg-.js} +2 -2
  77. package/dist/{theme-preference-Bpobguh4.js.map → theme-preference-DxGW1qg-.js.map} +1 -1
  78. package/dist/theme.js +1 -1
  79. package/dist/{tree-list-CZvcg3_6.js → tree-list-CPjbGTvs.js} +2 -2
  80. package/dist/{tree-list-CZvcg3_6.js.map → tree-list-CPjbGTvs.js.map} +1 -1
  81. package/dist/{workspace-badge-BR_GgsAG.js → workspace-badge-CuOcmnZc.js} +2 -2
  82. package/dist/{workspace-badge-BR_GgsAG.js.map → workspace-badge-CuOcmnZc.js.map} +1 -1
  83. package/package.json +7 -2
  84. package/dist/browser-storage-DPtOQJx0.js +0 -127
  85. package/dist/browser-storage-DPtOQJx0.js.map +0 -1
  86. package/dist/lazy-markdown-editor-ClZPZuaU.js +0 -235
  87. package/dist/lazy-markdown-editor-ClZPZuaU.js.map +0 -1
  88. package/dist/markdown-editor-CAVqJ9yR.js +0 -1019
  89. package/dist/markdown-editor-CAVqJ9yR.js.map +0 -1
  90. package/dist/markdown-gNucAjnF.js.map +0 -1
  91. package/dist/param-editor-field-DteDEyeU.js +0 -2810
  92. package/dist/param-editor-field-DteDEyeU.js.map +0 -1
  93. package/dist/prompt-input-DNpRL5tI.js +0 -564
  94. package/dist/prompt-input-DNpRL5tI.js.map +0 -1
  95. package/dist/radio-cLMEBBZk.js +0 -76
  96. package/dist/radio-cLMEBBZk.js.map +0 -1
  97. package/dist/rich-message-CuPiKxKX.js +0 -78
  98. package/dist/rich-message-CuPiKxKX.js.map +0 -1
  99. package/dist/theme-Dc7hVvMC.js.map +0 -1
package/dist/diff.js CHANGED
@@ -1,25 +1,25 @@
1
- import { jsx as r, jsxs as G, Fragment as Et } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as W, Fragment as Et } from "react/jsx-runtime";
2
2
  import { c as F } from "react/compiler-runtime";
3
3
  import { Editor as It, DiffEditor as Lt } from "@monaco-editor/react";
4
- import { useRef as Z, useEffect as oe, lazy as lt, Suspense as ot, useState as X, useLayoutEffect as Ge } from "react";
5
- import { u as _t } from "./theme-preference-Bpobguh4.js";
6
- import { D as Tt, b as it, a as st } from "./diff-bubble-DvUPRnfB.js";
7
- import { Box as O, Grid as We, Button as rt, Text as q, Image as Ft, Stack as be, Skeleton as at, IconButton as Ke, Menu as J, Badge as At, Icon as Mt, InputGroup as zt, Input as kt, HStack as Rt, Flex as Bt } from "@chakra-ui/react";
8
- import { useVirtualizer as Nt, defaultRangeExtractor as Ht } from "@tanstack/react-virtual";
9
- import { T as Ot, S as qe } from "./browser-storage-DPtOQJx0.js";
10
- import { ChevronRight as Ye, ChevronDown as $t, Check as dt, Copy as Vt, Settings2 as jt, ListTree as Gt, List as Wt, PanelLeftClose as Kt, PanelLeftOpen as Qt, Rows2 as qt, SquareSplitHorizontal as Ut, ChevronsUpDown as Yt, ChevronsDownUp as Xt, FileText as Jt, Search as Zt } from "lucide-react";
4
+ import { useId as _t, useRef as Z, useEffect as le, lazy as ot, Suspense as lt, useState as X, useLayoutEffect as We } from "react";
5
+ import { u as Tt } from "./theme-preference-DxGW1qg-.js";
6
+ import { D as Ft, b as it, a as st } from "./diff-bubble-DvUPRnfB.js";
7
+ import { Box as O, Grid as Ge, Button as rt, Text as Q, Image as At, Stack as be, Skeleton as at, IconButton as Ke, Menu as J, Badge as Mt, Icon as zt, InputGroup as Rt, Input as kt, HStack as Bt, Flex as Nt } from "@chakra-ui/react";
8
+ import { useVirtualizer as Ht, defaultRangeExtractor as Ot } from "@tanstack/react-virtual";
9
+ import { T as $t, S as Qe } from "./scroll-area-BMbg1WcD.js";
10
+ import { ChevronRight as Ye, ChevronDown as Vt, Check as dt, Copy as jt, Settings2 as Wt, ListTree as Gt, List as Kt, PanelLeftClose as Ut, PanelLeftOpen as Qt, Rows2 as qt, SquareSplitHorizontal as Yt, ChevronsUpDown as Xt, ChevronsDownUp as Jt, FileText as Zt, Search as en } from "lucide-react";
11
11
  import { E as Se } from "./empty-state-Bo4HVrgr.js";
12
- import { L as en, H as ct } from "./list-row-BDoV_iMV.js";
13
- import { T as tn, R as nn } from "./tree-list-CZvcg3_6.js";
12
+ import { L as tn, H as ct } from "./list-row-DHzRa9-O.js";
13
+ import { T as nn, R as on } from "./tree-list-CPjbGTvs.js";
14
14
  import { create as ln } from "zustand";
15
- const on = (n) => {
15
+ const sn = (n) => {
16
16
  let e;
17
17
  return () => (e ??= n(), e);
18
- }, ft = on(() => import("./monaco-browser-l82HnffN.js").then((n) => n.initializeMonaco())), sn = lt(async () => (await ft(), {
18
+ }, ft = sn(() => import("./monaco-browser-l82HnffN.js").then((n) => n.initializeMonaco())), rn = ot(async () => (await ft(), {
19
19
  default: It
20
- })), rn = lt(async () => (await ft(), {
20
+ })), an = ot(async () => (await ft(), {
21
21
  default: Lt
22
- })), an = {
22
+ })), dn = {
23
23
  base: "vs-dark",
24
24
  inherit: !0,
25
25
  rules: [],
@@ -32,52 +32,53 @@ const on = (n) => {
32
32
  "editorIndentGuide.background": "#404040",
33
33
  "editorIndentGuide.activeBackground": "#707070"
34
34
  }
35
- }, dn = (n) => typeof n == "object" && n !== null && "base" in n && "colors" in n, ge = "ps-theme", ht = () => {
35
+ }, cn = (n) => typeof n == "object" && n !== null && "base" in n && "colors" in n, ge = "ps-theme", ht = () => {
36
36
  const n = F(5), {
37
37
  themePreference: e,
38
38
  themePreferences: t
39
- } = _t();
40
- let o;
39
+ } = Tt();
40
+ let l;
41
41
  if (n[0] !== e || n[1] !== t) {
42
- let l;
43
- n[3] !== e ? (l = (i) => i.id === e, n[3] = e, n[4] = l) : l = n[4];
44
- const s = t.find(l);
45
- o = dn(s?.monacoTheme) ? s.monacoTheme : an, n[0] = e, n[1] = t, n[2] = o;
42
+ let o;
43
+ n[3] !== e ? (o = (i) => i.id === e, n[3] = e, n[4] = o) : o = n[4];
44
+ const s = t.find(o);
45
+ l = cn(s?.monacoTheme) ? s.monacoTheme : dn, n[0] = e, n[1] = t, n[2] = l;
46
46
  } else
47
- o = n[2];
48
- return o;
47
+ l = n[2];
48
+ return l;
49
49
  }, ut = (n) => {
50
50
  const e = F(5), t = Z(null);
51
- let o, l;
52
- e[0] !== n ? (o = () => {
51
+ let l, o;
52
+ e[0] !== n ? (l = () => {
53
53
  const i = t.current;
54
54
  i && (i.editor.defineTheme(ge, n), i.editor.setTheme(ge));
55
- }, l = [n], e[0] = n, e[1] = o, e[2] = l) : (o = e[1], l = e[2]), oe(o, l);
55
+ }, o = [n], e[0] = n, e[1] = l, e[2] = o) : (l = e[1], o = e[2]), le(l, o);
56
56
  let s;
57
57
  return e[3] !== n ? (s = (i) => {
58
58
  t.current = i, i.editor.defineTheme(ge, n), i.editor.setTheme(ge);
59
59
  }, e[3] = n, e[4] = s) : s = e[4], s;
60
- }, cn = (n, e) => {
60
+ }, fn = (n, e) => {
61
61
  n.addCommand(e.KeyMod.CtrlCmd | e.KeyCode.KeyS, async () => {
62
62
  await n.getAction("editor.action.formatDocument")?.run();
63
63
  });
64
- }, Bl = (n) => {
65
- const e = F(20), {
64
+ }, Ho = (n) => {
65
+ const e = F(21), {
66
66
  defaultCode: t,
67
- code: o,
68
- showLineNumbers: l,
67
+ code: l,
68
+ showLineNumbers: o,
69
69
  isEditable: s,
70
70
  language: i,
71
- onChange: a,
72
- disableScroll: c
73
- } = n, f = i === void 0 ? "javascript" : i, m = ht(), u = ut(m);
74
- let d;
75
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
71
+ fileName: a,
72
+ onChange: c,
73
+ disableScroll: f
74
+ } = n, m = i === void 0 ? "javascript" : i, u = _t(), d = a ? `inmemory://editor/${encodeURIComponent(u)}/${encodeURIComponent(a)}` : void 0, g = ht(), D = ut(g);
75
+ let S;
76
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
76
77
  enabled: !1
77
- }, e[0] = d) : d = e[0];
78
- const p = !s, D = l ? "on" : "off";
79
- let g;
80
- e[1] !== c ? (g = c ? {
78
+ }, e[0] = S) : S = e[0];
79
+ const h = !s, w = o ? "on" : "off";
80
+ let C;
81
+ e[1] !== f ? (C = f ? {
81
82
  scrollbar: {
82
83
  vertical: "hidden",
83
84
  horizontal: "hidden",
@@ -87,34 +88,35 @@ const on = (n) => {
87
88
  scrollBeyondLastLine: !1,
88
89
  mouseWheelScrollSensitivity: 0,
89
90
  overviewRulerLanes: 0
90
- } : {}, e[1] = c, e[2] = g) : g = e[2];
91
- let h;
92
- e[3] !== p || e[4] !== D || e[5] !== g ? (h = {
91
+ } : {}, e[1] = f, e[2] = C) : C = e[2];
92
+ let y;
93
+ e[3] !== h || e[4] !== w || e[5] !== C ? (y = {
93
94
  tabSize: 2,
94
- minimap: d,
95
+ fixedOverflowWidgets: !0,
96
+ minimap: S,
95
97
  fontSize: 12,
96
- readOnly: p,
97
- lineNumbers: D,
98
- ...g
99
- }, e[3] = p, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
100
- const S = h;
101
- let C;
102
- e[7] !== a ? (C = (E) => {
103
- a?.(E || "");
104
- }, e[7] = a, e[8] = C) : C = e[8];
105
- let y, P;
106
- e[9] !== u ? (y = (E) => {
107
- u(E);
108
- }, P = (E, b) => {
109
- u(b), cn(E, b);
110
- }, e[9] = u, e[10] = y, e[11] = P) : (y = e[10], P = e[11]);
98
+ readOnly: h,
99
+ lineNumbers: w,
100
+ ...C
101
+ }, e[3] = h, e[4] = w, e[5] = C, e[6] = y) : y = e[6];
102
+ const v = y;
111
103
  let x;
112
- return e[12] !== o || e[13] !== t || e[14] !== f || e[15] !== S || e[16] !== C || e[17] !== y || e[18] !== P ? (x = /* @__PURE__ */ r(ot, { fallback: null, children: /* @__PURE__ */ r(sn, { width: "100%", height: "100%", language: f, defaultValue: t, value: o, theme: ge, options: S, onChange: C, beforeMount: y, onMount: P }) }), e[12] = o, e[13] = t, e[14] = f, e[15] = S, e[16] = C, e[17] = y, e[18] = P, e[19] = x) : x = e[19], x;
113
- }, Nl = (n) => {
104
+ e[7] !== c ? (x = (b) => {
105
+ c?.(b || "");
106
+ }, e[7] = c, e[8] = x) : x = e[8];
107
+ let E, p;
108
+ e[9] !== D ? (E = (b) => {
109
+ D(b);
110
+ }, p = (b, I) => {
111
+ D(I), fn(b, I);
112
+ }, e[9] = D, e[10] = E, e[11] = p) : (E = e[10], p = e[11]);
113
+ let P;
114
+ return e[12] !== l || e[13] !== t || e[14] !== m || e[15] !== d || e[16] !== v || e[17] !== x || e[18] !== E || e[19] !== p ? (P = /* @__PURE__ */ r(lt, { fallback: null, children: /* @__PURE__ */ r(rn, { width: "100%", height: "100%", language: m, path: d, defaultValue: t, value: l, theme: ge, options: v, onChange: x, beforeMount: E, onMount: p }) }), e[12] = l, e[13] = t, e[14] = m, e[15] = d, e[16] = v, e[17] = x, e[18] = E, e[19] = p, e[20] = P) : P = e[20], P;
115
+ }, Oo = (n) => {
114
116
  const e = F(16), {
115
117
  original: t,
116
- modified: o,
117
- showLineNumbers: l,
118
+ modified: l,
119
+ showLineNumbers: o,
118
120
  language: s,
119
121
  disableScroll: i
120
122
  } = n, a = s === void 0 ? "javascript" : s, c = ht(), f = ut(c);
@@ -122,7 +124,7 @@ const on = (n) => {
122
124
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
123
125
  enabled: !1
124
126
  }, e[0] = m) : m = e[0];
125
- const u = l ? "on" : "off";
127
+ const u = o ? "on" : "off";
126
128
  let d;
127
129
  e[1] !== i ? (d = i ? {
128
130
  scrollbar: {
@@ -135,8 +137,8 @@ const on = (n) => {
135
137
  mouseWheelScrollSensitivity: 0,
136
138
  overviewRulerLanes: 0
137
139
  } : {}, e[1] = i, e[2] = d) : d = e[2];
138
- let p;
139
- e[3] !== u || e[4] !== d ? (p = {
140
+ let g;
141
+ e[3] !== u || e[4] !== d ? (g = {
140
142
  tabSize: 2,
141
143
  minimap: m,
142
144
  fontSize: 12,
@@ -146,17 +148,17 @@ const on = (n) => {
146
148
  useInlineViewWhenSpaceIsTooSmall: !0,
147
149
  lineNumbers: u,
148
150
  ...d
149
- }, e[3] = u, e[4] = d, e[5] = p) : p = e[5];
150
- const D = p;
151
- let g, h;
152
- e[6] !== f ? (g = (C) => {
151
+ }, e[3] = u, e[4] = d, e[5] = g) : g = e[5];
152
+ const D = g;
153
+ let S, h;
154
+ e[6] !== f ? (S = (C) => {
153
155
  f(C);
154
156
  }, h = (C, y) => {
155
157
  f(y);
156
- }, e[6] = f, e[7] = g, e[8] = h) : (g = e[7], h = e[8]);
157
- let S;
158
- return e[9] !== a || e[10] !== o || e[11] !== D || e[12] !== t || e[13] !== g || e[14] !== h ? (S = /* @__PURE__ */ r(ot, { fallback: null, children: /* @__PURE__ */ r(rn, { width: "100%", height: "100%", language: a, original: t, modified: o, theme: ge, options: D, beforeMount: g, onMount: h }) }), e[9] = a, e[10] = o, e[11] = D, e[12] = t, e[13] = g, e[14] = h, e[15] = S) : S = e[15], S;
159
- }, pt = {
158
+ }, e[6] = f, e[7] = S, e[8] = h) : (S = e[7], h = e[8]);
159
+ let w;
160
+ return e[9] !== a || e[10] !== l || e[11] !== D || e[12] !== t || e[13] !== S || e[14] !== h ? (w = /* @__PURE__ */ r(lt, { fallback: null, children: /* @__PURE__ */ r(an, { width: "100%", height: "100%", language: a, original: t, modified: l, theme: ge, options: D, beforeMount: S, onMount: h }) }), e[9] = a, e[10] = l, e[11] = D, e[12] = t, e[13] = S, e[14] = h, e[15] = w) : w = e[15], w;
161
+ }, mt = {
160
162
  avif: "image/avif",
161
163
  bmp: "image/bmp",
162
164
  gif: "image/gif",
@@ -168,32 +170,32 @@ const on = (n) => {
168
170
  tif: "image/tiff",
169
171
  tiff: "image/tiff",
170
172
  webp: "image/webp"
171
- }, fn = Object.keys(pt), mt = (n) => {
173
+ }, hn = Object.keys(mt), pt = (n) => {
172
174
  const t = (n.split(/[\\/]/).pop() ?? n).split(".").pop();
173
175
  return t ? t.toLowerCase() : "";
174
- }, hn = (n) => {
175
- const e = mt(n);
176
- return pt[e] ?? null;
177
- }, un = (n) => hn(n) !== null, pn = 1e3, mn = /* @__PURE__ */ new Set(["bun.lock", "bun.lockb", "package-lock.json", "pnpm-lock.yaml", "yarn.lock"]), gn = /* @__PURE__ */ new Set([...fn, "pdf", "zip", "tar", "gz", "tgz", "rar", "7z", "exe", "dll", "so", "dylib", "wasm", "class", "jar", "mp3", "mp4", "mov", "ogg", "wav", "webm", "flac", "ttf", "otf", "woff", "woff2", "eot"]), gt = (n) => (n.additions ?? 0) + (n.deletions ?? 0), bt = (n) => gt(n) > pn, bn = (n) => {
176
+ }, un = (n) => {
177
+ const e = pt(n);
178
+ return mt[e] ?? null;
179
+ }, mn = (n) => un(n) !== null, pn = 1e3, gn = /* @__PURE__ */ new Set(["bun.lock", "bun.lockb", "package-lock.json", "pnpm-lock.yaml", "yarn.lock"]), bn = /* @__PURE__ */ new Set([...hn, "pdf", "zip", "tar", "gz", "tgz", "rar", "7z", "exe", "dll", "so", "dylib", "wasm", "class", "jar", "mp3", "mp4", "mov", "ogg", "wav", "webm", "flac", "ttf", "otf", "woff", "woff2", "eot"]), gt = (n) => (n.additions ?? 0) + (n.deletions ?? 0), bt = (n) => gt(n) > pn, Sn = (n) => {
178
180
  const e = n.split(/[\\/]/).pop() ?? n;
179
- return mn.has(e) || e.endsWith(".min.js") || e.endsWith(".generated.ts");
180
- }, Ue = (n) => {
181
- const e = mt(n);
182
- return e.length > 0 && gn.has(e);
183
- }, we = un, Sn = (n) => {
181
+ return gn.has(e) || e.endsWith(".min.js") || e.endsWith(".generated.ts");
182
+ }, qe = (n) => {
183
+ const e = pt(n);
184
+ return e.length > 0 && bn.has(e);
185
+ }, we = mn, xn = (n) => {
184
186
  const {
185
187
  diff: e,
186
188
  filePath: t,
187
- oldContent: o,
188
- newContent: l,
189
+ oldContent: l,
190
+ newContent: o,
189
191
  isLargeDiff: s,
190
192
  hasOptedIntoLargeDiff: i,
191
193
  onShowFullDiff: a,
192
194
  diffViewMode: c = "unified",
193
195
  buildViewData: f
194
196
  } = n;
195
- if (Ue(t)) {
196
- const u = Xe(o), d = Xe(l);
197
+ if (qe(t)) {
198
+ const u = Xe(l), d = Xe(o);
197
199
  return we(t) && (u || d) ? {
198
200
  kind: "image",
199
201
  filePath: t,
@@ -213,8 +215,8 @@ const on = (n) => {
213
215
  } : {
214
216
  kind: "editor",
215
217
  diffViewData: (f ?? it)({
216
- original: o,
217
- modified: l,
218
+ original: l,
219
+ modified: o,
218
220
  oldPath: e.oldPath,
219
221
  newPath: e.newPath
220
222
  }),
@@ -223,8 +225,8 @@ const on = (n) => {
223
225
  }, Xe = (n) => n.startsWith("data:image/") ? n : "", Je = (n) => {
224
226
  const e = F(22), {
225
227
  diff: t,
226
- filePath: o,
227
- oldContent: l,
228
+ filePath: l,
229
+ oldContent: o,
228
230
  newContent: s,
229
231
  isLargeDiff: i,
230
232
  hasOptedIntoLargeDiff: a,
@@ -232,115 +234,115 @@ const on = (n) => {
232
234
  diffViewMode: f
233
235
  } = n, m = f === void 0 ? "unified" : f;
234
236
  let u;
235
- e[0] !== t || e[1] !== m || e[2] !== o || e[3] !== a || e[4] !== i || e[5] !== s || e[6] !== l || e[7] !== c ? (u = Sn({
237
+ e[0] !== t || e[1] !== m || e[2] !== l || e[3] !== a || e[4] !== i || e[5] !== s || e[6] !== o || e[7] !== c ? (u = xn({
236
238
  diff: t,
237
- filePath: o,
238
- oldContent: l,
239
+ filePath: l,
240
+ oldContent: o,
239
241
  newContent: s,
240
242
  isLargeDiff: i,
241
243
  hasOptedIntoLargeDiff: a,
242
244
  onShowFullDiff: c,
243
245
  diffViewMode: m
244
- }), e[0] = t, e[1] = m, e[2] = o, e[3] = a, e[4] = i, e[5] = s, e[6] = l, e[7] = c, e[8] = u) : u = e[8];
246
+ }), e[0] = t, e[1] = m, e[2] = l, e[3] = a, e[4] = i, e[5] = s, e[6] = o, e[7] = c, e[8] = u) : u = e[8];
245
247
  const d = u;
246
- let p;
247
- return e[9] !== t || e[10] !== d.diffViewData || e[11] !== d.filePath || e[12] !== d.isImage || e[13] !== d.kind || e[14] !== d.newSrc || e[15] !== d.oldSrc || e[16] !== d.onShowFullDiff || e[17] !== d.renderedLineCount || e[18] !== d.sideBySide || e[19] !== s || e[20] !== l ? (p = /* @__PURE__ */ r(O, { bg: "bg", borderBottomRadius: "xs", overflow: "hidden", children: d.kind === "editor" ? /* @__PURE__ */ r(Tt, { original: l, modified: s, oldPath: t.oldPath, newPath: t.newPath, sideBySide: d.sideBySide, data: d.diffViewData }) : d.kind === "image" ? /* @__PURE__ */ r(xn, { oldSrc: d.oldSrc, newSrc: d.newSrc }) : d.kind === "binary" ? /* @__PURE__ */ r(Dn, { isImage: d.isImage }) : /* @__PURE__ */ r(wn, { filePath: d.filePath, renderedLineCount: d.renderedLineCount, onShowFullDiff: d.onShowFullDiff }) }), e[9] = t, e[10] = d.diffViewData, e[11] = d.filePath, e[12] = d.isImage, e[13] = d.kind, e[14] = d.newSrc, e[15] = d.oldSrc, e[16] = d.onShowFullDiff, e[17] = d.renderedLineCount, e[18] = d.sideBySide, e[19] = s, e[20] = l, e[21] = p) : p = e[21], p;
248
- }, xn = (n) => {
248
+ let g;
249
+ return e[9] !== t || e[10] !== d.diffViewData || e[11] !== d.filePath || e[12] !== d.isImage || e[13] !== d.kind || e[14] !== d.newSrc || e[15] !== d.oldSrc || e[16] !== d.onShowFullDiff || e[17] !== d.renderedLineCount || e[18] !== d.sideBySide || e[19] !== s || e[20] !== o ? (g = /* @__PURE__ */ r(O, { bg: "bg", borderBottomRadius: "xs", overflow: "hidden", children: d.kind === "editor" ? /* @__PURE__ */ r(Ft, { original: o, modified: s, oldPath: t.oldPath, newPath: t.newPath, sideBySide: d.sideBySide, data: d.diffViewData }) : d.kind === "image" ? /* @__PURE__ */ r(wn, { oldSrc: d.oldSrc, newSrc: d.newSrc }) : d.kind === "binary" ? /* @__PURE__ */ r(Cn, { isImage: d.isImage }) : /* @__PURE__ */ r(Dn, { filePath: d.filePath, renderedLineCount: d.renderedLineCount, onShowFullDiff: d.onShowFullDiff }) }), e[9] = t, e[10] = d.diffViewData, e[11] = d.filePath, e[12] = d.isImage, e[13] = d.kind, e[14] = d.newSrc, e[15] = d.oldSrc, e[16] = d.onShowFullDiff, e[17] = d.renderedLineCount, e[18] = d.sideBySide, e[19] = s, e[20] = o, e[21] = g) : g = e[21], g;
250
+ }, wn = (n) => {
249
251
  const e = F(8), {
250
252
  oldSrc: t,
251
- newSrc: o
253
+ newSrc: l
252
254
  } = n;
253
- let l;
254
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
255
+ let o;
256
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {
255
257
  base: "1fr",
256
258
  md: "1fr 1fr"
257
- }, e[0] = l) : l = e[0];
259
+ }, e[0] = o) : o = e[0];
258
260
  let s;
259
261
  e[1] !== t ? (s = /* @__PURE__ */ r(Ze, { label: "Old", src: t, fallback: "No old image" }), e[1] = t, e[2] = s) : s = e[2];
260
262
  let i;
261
- e[3] !== o ? (i = /* @__PURE__ */ r(Ze, { label: "New", src: o, fallback: "No new image" }), e[3] = o, e[4] = i) : i = e[4];
263
+ e[3] !== l ? (i = /* @__PURE__ */ r(Ze, { label: "New", src: l, fallback: "No new image" }), e[3] = l, e[4] = i) : i = e[4];
262
264
  let a;
263
- return e[5] !== s || e[6] !== i ? (a = /* @__PURE__ */ G(We, { templateColumns: l, gap: "sm", p: "sm", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: [
265
+ return e[5] !== s || e[6] !== i ? (a = /* @__PURE__ */ W(Ge, { templateColumns: o, gap: "sm", p: "sm", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: [
264
266
  s,
265
267
  i
266
268
  ] }), e[5] = s, e[6] = i, e[7] = a) : a = e[7], a;
267
269
  }, Ze = (n) => {
268
270
  const e = F(9), {
269
271
  label: t,
270
- src: o,
271
- fallback: l
272
+ src: l,
273
+ fallback: o
272
274
  } = n;
273
275
  let s;
274
- e[0] !== t ? (s = /* @__PURE__ */ r(q, { px: "xs", py: "2xs", textStyle: "label/S/medium", color: "fg.muted", borderBottom: "1px solid", borderColor: "border.subtle", children: t }), e[0] = t, e[1] = s) : s = e[1];
276
+ e[0] !== t ? (s = /* @__PURE__ */ r(Q, { px: "xs", py: "2xs", textStyle: "label/S/medium", color: "fg.muted", borderBottom: "1px solid", borderColor: "border.subtle", children: t }), e[0] = t, e[1] = s) : s = e[1];
275
277
  let i;
276
- e[2] !== l || e[3] !== t || e[4] !== o ? (i = /* @__PURE__ */ r(O, { display: "grid", placeItems: "center", minH: "180px", p: "sm", children: o ? /* @__PURE__ */ r(Ft, { src: o, alt: `${t} image diff`, maxH: "260px", maxW: "100%", objectFit: "contain" }) : /* @__PURE__ */ r(q, { color: "fg.muted", textStyle: "body/S/regular", children: l }) }), e[2] = l, e[3] = t, e[4] = o, e[5] = i) : i = e[5];
278
+ e[2] !== o || e[3] !== t || e[4] !== l ? (i = /* @__PURE__ */ r(O, { display: "grid", placeItems: "center", minH: "180px", p: "sm", children: l ? /* @__PURE__ */ r(At, { src: l, alt: `${t} image diff`, maxH: "260px", maxW: "100%", objectFit: "contain" }) : /* @__PURE__ */ r(Q, { color: "fg.muted", textStyle: "body/S/regular", children: o }) }), e[2] = o, e[3] = t, e[4] = l, e[5] = i) : i = e[5];
277
279
  let a;
278
- return e[6] !== s || e[7] !== i ? (a = /* @__PURE__ */ G(O, { border: "1px solid", borderColor: "border.subtle", borderRadius: "xs", overflow: "hidden", bg: "bg.subtle", minW: "0", children: [
280
+ return e[6] !== s || e[7] !== i ? (a = /* @__PURE__ */ W(O, { border: "1px solid", borderColor: "border.subtle", borderRadius: "xs", overflow: "hidden", bg: "bg.subtle", minW: "0", children: [
279
281
  s,
280
282
  i
281
283
  ] }), e[6] = s, e[7] = i, e[8] = a) : a = e[8], a;
282
- }, wn = (n) => {
284
+ }, Dn = (n) => {
283
285
  const e = F(5), {
284
286
  filePath: t,
285
- onShowFullDiff: o
287
+ onShowFullDiff: l
286
288
  } = n;
287
- let l;
288
- e[0] !== t || e[1] !== o ? (l = o ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", "aria-label": `Render full diff for ${t}`, onClick: o, children: "Show full diff" }) : null, e[0] = t, e[1] = o, e[2] = l) : l = e[2];
289
+ let o;
290
+ e[0] !== t || e[1] !== l ? (o = l ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", "aria-label": `Render full diff for ${t}`, onClick: l, children: "Show full diff" }) : null, e[0] = t, e[1] = l, e[2] = o) : o = e[2];
289
291
  let s;
290
- return e[3] !== l ? (s = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: "Large diffs are hidden by default", paddingY: "sm", children: l }) }), e[3] = l, e[4] = s) : s = e[4], s;
291
- }, Dn = (n) => {
292
+ return e[3] !== o ? (s = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: "Large diffs are hidden by default", paddingY: "sm", children: o }) }), e[3] = o, e[4] = s) : s = e[4], s;
293
+ }, Cn = (n) => {
292
294
  const e = F(2), {
293
295
  isImage: t
294
- } = n, o = t ? "Image diffs are not shown" : "Binary diffs are not shown";
295
- let l;
296
- return e[0] !== o ? (l = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: o, paddingY: "sm" }) }), e[0] = o, e[1] = l) : l = e[1], l;
297
- }, Cn = (n) => {
296
+ } = n, l = t ? "Image diffs are not shown" : "Binary diffs are not shown";
297
+ let o;
298
+ return e[0] !== l ? (o = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: l, paddingY: "sm" }) }), e[0] = l, e[1] = o) : o = e[1], o;
299
+ }, yn = (n) => {
298
300
  const e = F(7), {
299
301
  title: t,
300
- actionLabel: o,
301
- isLoadingDiff: l,
302
+ actionLabel: l,
303
+ isLoadingDiff: o,
302
304
  onAction: s
303
305
  } = n;
304
306
  let i;
305
- e[0] !== o || e[1] !== l || e[2] !== s ? (i = o ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", loading: l, onClick: s, children: o }) : null, e[0] = o, e[1] = l, e[2] = s, e[3] = i) : i = e[3];
307
+ e[0] !== l || e[1] !== o || e[2] !== s ? (i = l ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", loading: o, onClick: s, children: l }) : null, e[0] = l, e[1] = o, e[2] = s, e[3] = i) : i = e[3];
306
308
  let a;
307
309
  return e[4] !== i || e[5] !== t ? (a = /* @__PURE__ */ r(O, { bg: "bg", p: "md", borderTop: "1px solid", borderColor: "border.subtle", children: /* @__PURE__ */ r(Se, { title: t, paddingY: "sm", children: i }) }), e[4] = i, e[5] = t, e[6] = a) : a = e[6], a;
308
- }, yn = ["first", "second", "third"], Pn = () => {
310
+ }, Pn = ["first", "second", "third"], vn = () => {
309
311
  const n = F(1);
310
312
  let e;
311
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "280px", bg: "bg", borderTop: "1px solid", borderColor: "border.subtle", p: "xs", gap: "2xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff", children: yn.map(vn) }), n[0] = e) : e = n[0], e;
313
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "280px", bg: "bg", borderTop: "1px solid", borderColor: "border.subtle", p: "xs", gap: "2xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff", children: Pn.map(En) }), n[0] = e) : e = n[0], e;
312
314
  };
313
- function vn(n) {
315
+ function En(n) {
314
316
  return /* @__PURE__ */ r(at, { h: "20px", w: "full", borderRadius: "xs" }, n);
315
317
  }
316
- const En = (n) => {
318
+ const In = (n) => {
317
319
  const {
318
320
  isLargeDiff: e,
319
321
  isGeneratedDiff: t,
320
- loadError: o,
321
- canLoadDiff: l,
322
+ loadError: l,
323
+ canLoadDiff: o,
322
324
  onLoadDiff: s,
323
325
  onShowFullDiff: i
324
326
  } = n;
325
- let a = "Diff content is not loaded yet.", c = l ? "Load diff" : void 0, f = l ? () => {
327
+ let a = "Diff content is not loaded yet.", c = o ? "Load diff" : void 0, f = o ? () => {
326
328
  s();
327
329
  } : void 0;
328
- return e && (a = "Large diffs are hidden by default", c = l ? "Show full diff" : void 0, f = () => {
330
+ return e && (a = "Large diffs are hidden by default", c = o ? "Show full diff" : void 0, f = () => {
329
331
  i?.(), s();
330
- }), t && (a = "Generated diffs are hidden by default", c = l ? "Load diff" : void 0, f = l ? () => {
332
+ }), t && (a = "Generated diffs are hidden by default", c = o ? "Load diff" : void 0, f = o ? () => {
331
333
  s();
332
- } : void 0), o && (a = "Diff failed to load. Try again.", c = l ? "Load diff" : void 0, f = l ? () => {
334
+ } : void 0), l && (a = "Diff failed to load. Try again.", c = o ? "Load diff" : void 0, f = o ? () => {
333
335
  s();
334
336
  } : void 0), {
335
337
  title: a,
336
338
  actionLabel: c,
337
339
  onAction: f
338
340
  };
339
- }, In = (n) => {
341
+ }, Ln = (n) => {
340
342
  const e = F(30), {
341
343
  diff: t,
342
- filePath: o,
343
- oldContent: l,
344
+ filePath: l,
345
+ oldContent: o,
344
346
  newContent: s,
345
347
  isExpanded: i,
346
348
  isLargeDiff: a,
@@ -349,73 +351,73 @@ const En = (n) => {
349
351
  hasDiffContent: m,
350
352
  canLoadDiff: u,
351
353
  shouldAutoLoadDiff: d,
352
- loadError: p,
354
+ loadError: g,
353
355
  isLoadingDiff: D,
354
- onLoadDiff: g,
356
+ onLoadDiff: S,
355
357
  hasOptedIntoLargeDiff: h,
356
- onShowFullDiff: S,
358
+ onShowFullDiff: w,
357
359
  diffViewMode: C
358
360
  } = n, y = C === void 0 ? "unified" : C;
359
361
  if (!i)
360
362
  return null;
361
363
  if (f) {
362
364
  let x;
363
- return e[0] !== t || e[1] !== y || e[2] !== o || e[3] !== h || e[4] !== s || e[5] !== l || e[6] !== S ? (x = /* @__PURE__ */ r(Je, { diff: t, filePath: o, oldContent: l, newContent: s, isLargeDiff: !1, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: y }), e[0] = t, e[1] = y, e[2] = o, e[3] = h, e[4] = s, e[5] = l, e[6] = S, e[7] = x) : x = e[7], x;
365
+ return e[0] !== t || e[1] !== y || e[2] !== l || e[3] !== h || e[4] !== s || e[5] !== o || e[6] !== w ? (x = /* @__PURE__ */ r(Je, { diff: t, filePath: l, oldContent: o, newContent: s, isLargeDiff: !1, hasOptedIntoLargeDiff: h, onShowFullDiff: w, diffViewMode: y }), e[0] = t, e[1] = y, e[2] = l, e[3] = h, e[4] = s, e[5] = o, e[6] = w, e[7] = x) : x = e[7], x;
364
366
  }
365
367
  if (!m && !d) {
366
368
  let x;
367
- e[8] !== u || e[9] !== c || e[10] !== a || e[11] !== p || e[12] !== g || e[13] !== S ? (x = En({
369
+ e[8] !== u || e[9] !== c || e[10] !== a || e[11] !== g || e[12] !== S || e[13] !== w ? (x = In({
368
370
  isLargeDiff: a,
369
371
  isGeneratedDiff: c,
370
- loadError: p,
372
+ loadError: g,
371
373
  canLoadDiff: u,
372
- onLoadDiff: g,
373
- onShowFullDiff: S
374
- }), e[8] = u, e[9] = c, e[10] = a, e[11] = p, e[12] = g, e[13] = S, e[14] = x) : x = e[14];
374
+ onLoadDiff: S,
375
+ onShowFullDiff: w
376
+ }), e[8] = u, e[9] = c, e[10] = a, e[11] = g, e[12] = S, e[13] = w, e[14] = x) : x = e[14];
375
377
  const {
376
378
  title: E,
377
- actionLabel: b,
378
- onAction: v
379
+ actionLabel: p,
380
+ onAction: P
379
381
  } = x;
380
- let w;
381
- return e[15] !== b || e[16] !== D || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(Cn, { title: E, actionLabel: b, isLoadingDiff: D, onAction: v }), e[15] = b, e[16] = D, e[17] = v, e[18] = E, e[19] = w) : w = e[19], w;
382
+ let b;
383
+ return e[15] !== p || e[16] !== D || e[17] !== P || e[18] !== E ? (b = /* @__PURE__ */ r(yn, { title: E, actionLabel: p, isLoadingDiff: D, onAction: P }), e[15] = p, e[16] = D, e[17] = P, e[18] = E, e[19] = b) : b = e[19], b;
382
384
  }
383
385
  if (d) {
384
386
  let x;
385
- return e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ r(Pn, {}), e[20] = x) : x = e[20], x;
387
+ return e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ r(vn, {}), e[20] = x) : x = e[20], x;
386
388
  }
387
- let P;
388
- return e[21] !== t || e[22] !== y || e[23] !== o || e[24] !== h || e[25] !== a || e[26] !== s || e[27] !== l || e[28] !== S ? (P = /* @__PURE__ */ r(Je, { diff: t, filePath: o, oldContent: l, newContent: s, isLargeDiff: a, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: y }), e[21] = t, e[22] = y, e[23] = o, e[24] = h, e[25] = a, e[26] = s, e[27] = l, e[28] = S, e[29] = P) : P = e[29], P;
389
- }, Ln = (n) => {
389
+ let v;
390
+ return e[21] !== t || e[22] !== y || e[23] !== l || e[24] !== h || e[25] !== a || e[26] !== s || e[27] !== o || e[28] !== w ? (v = /* @__PURE__ */ r(Je, { diff: t, filePath: l, oldContent: o, newContent: s, isLargeDiff: a, hasOptedIntoLargeDiff: h, onShowFullDiff: w, diffViewMode: y }), e[21] = t, e[22] = y, e[23] = l, e[24] = h, e[25] = a, e[26] = s, e[27] = o, e[28] = w, e[29] = v) : v = e[29], v;
391
+ }, _n = (n) => {
390
392
  const {
391
393
  isExpanded: e,
392
394
  isSelected: t,
393
- hasDiffContent: o,
394
- isLargeDiff: l,
395
+ hasDiffContent: l,
396
+ isLargeDiff: o,
395
397
  isGeneratedDiff: s,
396
398
  isBinaryDiff: i,
397
399
  requestedPath: a,
398
400
  filePath: c
399
401
  } = n;
400
- return e && t && !o && !l && !s && !i && a !== c;
401
- }, _n = (n) => {
402
+ return e && t && !l && !o && !s && !i && a !== c;
403
+ }, Tn = (n) => {
402
404
  const {
403
405
  requestedPath: e,
404
406
  filePath: t,
405
- hasDiffContent: o
407
+ hasDiffContent: l
406
408
  } = n;
407
- return e === t && o ? null : e;
408
- }, Tn = (n) => !we(n), St = (n) => n.newPath || n.oldPath || "unknown", Fn = (n) => {
409
+ return e === t && l ? null : e;
410
+ }, Fn = (n) => !we(n), St = (n) => n.newPath || n.oldPath || "unknown", An = (n) => {
409
411
  const {
410
412
  filePath: e,
411
413
  isExpanded: t,
412
- isSelected: o,
413
- hasDiffContent: l,
414
+ isSelected: l,
415
+ hasDiffContent: o,
414
416
  isLargeDiff: s,
415
417
  isGeneratedDiff: i,
416
418
  isBinaryDiff: a,
417
419
  onLoadDiff: c
418
- } = n, [f, m] = X(!1), [u, d] = X(null), [p, D] = X(!1), g = async () => {
420
+ } = n, [f, m] = X(!1), [u, d] = X(null), [g, D] = X(!1), S = async () => {
419
421
  if (!(!c || f)) {
420
422
  d(e), D(!1), m(!0);
421
423
  try {
@@ -426,119 +428,119 @@ const En = (n) => {
426
428
  m(!1);
427
429
  }
428
430
  }
429
- }, h = Ln({
431
+ }, h = _n({
430
432
  isExpanded: t,
431
- isSelected: o,
432
- hasDiffContent: l,
433
+ isSelected: l,
434
+ hasDiffContent: o,
433
435
  isLargeDiff: s,
434
436
  isGeneratedDiff: i,
435
437
  isBinaryDiff: a,
436
438
  requestedPath: u,
437
439
  filePath: e
438
440
  });
439
- return oe(() => {
440
- d((S) => _n({
441
- requestedPath: S,
441
+ return le(() => {
442
+ d((w) => Tn({
443
+ requestedPath: w,
442
444
  filePath: e,
443
- hasDiffContent: l
445
+ hasDiffContent: o
444
446
  }));
445
- }, [e, l]), oe(() => {
446
- !c || !h || p || g();
447
+ }, [e, o]), le(() => {
448
+ !c || !h || g || S();
447
449
  }), {
448
450
  isLoadingDiff: f,
449
- loadError: p,
450
- shouldAutoLoadDiff: !!c && h && !p,
451
- loadDiff: g
451
+ loadError: g,
452
+ shouldAutoLoadDiff: !!c && h && !g,
453
+ loadDiff: S
452
454
  };
453
- }, An = (n) => {
455
+ }, Mn = (n) => {
454
456
  const e = F(44), {
455
457
  diff: t,
456
- isSelected: o,
457
- isExpanded: l,
458
+ isSelected: l,
459
+ isExpanded: o,
458
460
  onToggleExpanded: s,
459
461
  onSelect: i,
460
462
  onLoadDiff: a,
461
463
  hasOptedIntoLargeDiff: c,
462
464
  onShowFullDiff: f,
463
465
  diffViewMode: m
464
- } = n, u = o === void 0 ? !1 : o, d = l === void 0 ? !0 : l, p = c === void 0 ? !1 : c, D = m === void 0 ? "unified" : m;
465
- let g, h, S, C, y, P;
466
- e[0] !== t ? (g = St(t), y = t.oldContent || "", C = t.newContent || "", S = bt(t), h = bn(g), P = Ue(g) && !we(g), e[0] = t, e[1] = g, e[2] = h, e[3] = S, e[4] = C, e[5] = y, e[6] = P) : (g = e[1], h = e[2], S = e[3], C = e[4], y = e[5], P = e[6]);
467
- const x = P, E = t.oldContent !== void 0 || t.newContent !== void 0, b = S && !p;
468
- let v;
469
- e[7] !== x || e[8] !== g || e[9] !== E || e[10] !== d || e[11] !== h || e[12] !== u || e[13] !== a || e[14] !== b ? (v = {
470
- filePath: g,
466
+ } = n, u = l === void 0 ? !1 : l, d = o === void 0 ? !0 : o, g = c === void 0 ? !1 : c, D = m === void 0 ? "unified" : m;
467
+ let S, h, w, C, y, v;
468
+ e[0] !== t ? (S = St(t), y = t.oldContent || "", C = t.newContent || "", w = bt(t), h = Sn(S), v = qe(S) && !we(S), e[0] = t, e[1] = S, e[2] = h, e[3] = w, e[4] = C, e[5] = y, e[6] = v) : (S = e[1], h = e[2], w = e[3], C = e[4], y = e[5], v = e[6]);
469
+ const x = v, E = t.oldContent !== void 0 || t.newContent !== void 0, p = w && !g;
470
+ let P;
471
+ e[7] !== x || e[8] !== S || e[9] !== E || e[10] !== d || e[11] !== h || e[12] !== u || e[13] !== a || e[14] !== p ? (P = {
472
+ filePath: S,
471
473
  isExpanded: d,
472
474
  isSelected: u,
473
475
  hasDiffContent: E,
474
- isLargeDiff: b,
476
+ isLargeDiff: p,
475
477
  isGeneratedDiff: h,
476
478
  isBinaryDiff: x,
477
479
  onLoadDiff: a
478
- }, e[7] = x, e[8] = g, e[9] = E, e[10] = d, e[11] = h, e[12] = u, e[13] = a, e[14] = b, e[15] = v) : v = e[15];
480
+ }, e[7] = x, e[8] = S, e[9] = E, e[10] = d, e[11] = h, e[12] = u, e[13] = a, e[14] = p, e[15] = P) : P = e[15];
479
481
  const {
480
- isLoadingDiff: w,
482
+ isLoadingDiff: b,
481
483
  loadError: I,
482
484
  shouldAutoLoadDiff: L,
483
485
  loadDiff: M
484
- } = Fn(v), z = u ? "border.accent" : "border.subtle";
486
+ } = An(P), z = u ? "border.accent" : "border.subtle";
485
487
  let T;
486
488
  e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
487
489
  borderColor: "border.accent"
488
490
  }, e[16] = T) : T = e[16];
489
491
  let _;
490
- e[17] !== t || e[18] !== d || e[19] !== s ? (_ = /* @__PURE__ */ r(Mn, { diff: t, isExpanded: d, onToggleExpanded: s }), e[17] = t, e[18] = d, e[19] = s, e[20] = _) : _ = e[20];
492
+ e[17] !== t || e[18] !== d || e[19] !== s ? (_ = /* @__PURE__ */ r(zn, { diff: t, isExpanded: d, onToggleExpanded: s }), e[17] = t, e[18] = d, e[19] = s, e[20] = _) : _ = e[20];
491
493
  const A = !!a;
492
- let k;
493
- e[21] !== x || e[22] !== t || e[23] !== D || e[24] !== g || e[25] !== E || e[26] !== p || e[27] !== d || e[28] !== h || e[29] !== S || e[30] !== w || e[31] !== M || e[32] !== I || e[33] !== C || e[34] !== y || e[35] !== f || e[36] !== L || e[37] !== A ? (k = /* @__PURE__ */ r(In, { diff: t, filePath: g, oldContent: y, newContent: C, isExpanded: d, isLargeDiff: S, isGeneratedDiff: h, isBinaryDiff: x, hasDiffContent: E, canLoadDiff: A, shouldAutoLoadDiff: L, loadError: I, isLoadingDiff: w, onLoadDiff: M, hasOptedIntoLargeDiff: p, onShowFullDiff: f, diffViewMode: D }), e[21] = x, e[22] = t, e[23] = D, e[24] = g, e[25] = E, e[26] = p, e[27] = d, e[28] = h, e[29] = S, e[30] = w, e[31] = M, e[32] = I, e[33] = C, e[34] = y, e[35] = f, e[36] = L, e[37] = A, e[38] = k) : k = e[38];
494
494
  let R;
495
- return e[39] !== i || e[40] !== k || e[41] !== z || e[42] !== _ ? (R = /* @__PURE__ */ G(O, { "data-testid": "diff-card", border: "1px solid", borderColor: z, borderRadius: "xs", overflow: "visible", bg: "bg", width: "100%", maxW: "100%", transition: "border-color 0.14s ease", _hover: T, onClick: i, children: [
495
+ e[21] !== x || e[22] !== t || e[23] !== D || e[24] !== S || e[25] !== E || e[26] !== g || e[27] !== d || e[28] !== h || e[29] !== w || e[30] !== b || e[31] !== M || e[32] !== I || e[33] !== C || e[34] !== y || e[35] !== f || e[36] !== L || e[37] !== A ? (R = /* @__PURE__ */ r(Ln, { diff: t, filePath: S, oldContent: y, newContent: C, isExpanded: d, isLargeDiff: w, isGeneratedDiff: h, isBinaryDiff: x, hasDiffContent: E, canLoadDiff: A, shouldAutoLoadDiff: L, loadError: I, isLoadingDiff: b, onLoadDiff: M, hasOptedIntoLargeDiff: g, onShowFullDiff: f, diffViewMode: D }), e[21] = x, e[22] = t, e[23] = D, e[24] = S, e[25] = E, e[26] = g, e[27] = d, e[28] = h, e[29] = w, e[30] = b, e[31] = M, e[32] = I, e[33] = C, e[34] = y, e[35] = f, e[36] = L, e[37] = A, e[38] = R) : R = e[38];
496
+ let k;
497
+ return e[39] !== i || e[40] !== R || e[41] !== z || e[42] !== _ ? (k = /* @__PURE__ */ W(O, { "data-testid": "diff-card", border: "1px solid", borderColor: z, borderRadius: "xs", overflow: "visible", bg: "bg", width: "100%", maxW: "100%", transition: "border-color 0.14s ease", _hover: T, onClick: i, children: [
496
498
  _,
497
- k
498
- ] }), e[39] = i, e[40] = k, e[41] = z, e[42] = _, e[43] = R) : R = e[43], R;
499
- }, Mn = (n) => {
499
+ R
500
+ ] }), e[39] = i, e[40] = R, e[41] = z, e[42] = _, e[43] = k) : k = e[43], k;
501
+ }, zn = (n) => {
500
502
  const e = F(58), {
501
503
  diff: t,
502
- isExpanded: o,
503
- onToggleExpanded: l
504
- } = n, s = o === void 0 ? !0 : o;
504
+ isExpanded: l,
505
+ onToggleExpanded: o
506
+ } = n, s = l === void 0 ? !0 : l;
505
507
  let i, a, c, f;
506
- e[0] !== t ? (c = St(t), i = t.additions ?? 0, a = t.deletions ?? 0, f = Tn(c), e[0] = t, e[1] = i, e[2] = a, e[3] = c, e[4] = f) : (i = e[1], a = e[2], c = e[3], f = e[4]);
507
- const m = f, [u, d] = X(!1), p = Z(null);
508
- let D, g;
508
+ e[0] !== t ? (c = St(t), i = t.additions ?? 0, a = t.deletions ?? 0, f = Fn(c), e[0] = t, e[1] = i, e[2] = a, e[3] = c, e[4] = f) : (i = e[1], a = e[2], c = e[3], f = e[4]);
509
+ const m = f, [u, d] = X(!1), g = Z(null);
510
+ let D, S;
509
511
  e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = () => () => {
510
- p.current !== null && window.clearTimeout(p.current);
511
- }, g = [], e[5] = D, e[6] = g) : (D = e[5], g = e[6]), oe(D, g);
512
+ g.current !== null && window.clearTimeout(g.current);
513
+ }, S = [], e[5] = D, e[6] = S) : (D = e[5], S = e[6]), le(D, S);
512
514
  let h;
513
515
  e[7] !== c ? (h = async () => {
514
516
  try {
515
- await navigator.clipboard.writeText(c), d(!0), p.current !== null && window.clearTimeout(p.current), p.current = window.setTimeout(() => d(!1), 1200);
517
+ await navigator.clipboard.writeText(c), d(!0), g.current !== null && window.clearTimeout(g.current), g.current = window.setTimeout(() => d(!1), 1200);
516
518
  } catch {
517
519
  d(!1);
518
520
  }
519
521
  }, e[7] = c, e[8] = h) : h = e[8];
520
- const S = h, C = s ? "1px solid" : "none", y = s ? "0" : "xs";
521
- let P;
522
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
522
+ const w = h, C = s ? "1px solid" : "none", y = s ? "0" : "xs";
523
+ let v;
524
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = {
523
525
  bg: "bg"
524
- }, e[9] = P) : P = e[9];
526
+ }, e[9] = v) : v = e[9];
525
527
  let x;
526
- e[10] !== l ? (x = () => l?.(), e[10] = l, e[11] = x) : x = e[11];
528
+ e[10] !== o ? (x = () => o?.(), e[10] = o, e[11] = x) : x = e[11];
527
529
  const E = s ? "Collapse" : "Expand";
530
+ let p;
531
+ e[12] !== o ? (p = (q) => {
532
+ q.stopPropagation(), o?.();
533
+ }, e[12] = o, e[13] = p) : p = e[13];
534
+ let P;
535
+ e[14] !== s ? (P = s ? /* @__PURE__ */ r(Vt, { size: 16 }) : /* @__PURE__ */ r(Ye, { size: 16 }), e[14] = s, e[15] = P) : P = e[15];
528
536
  let b;
529
- e[12] !== l ? (b = (U) => {
530
- U.stopPropagation(), l?.();
531
- }, e[12] = l, e[13] = b) : b = e[13];
532
- let v;
533
- e[14] !== s ? (v = s ? /* @__PURE__ */ r($t, { size: 16 }) : /* @__PURE__ */ r(Ye, { size: 16 }), e[14] = s, e[15] = v) : v = e[15];
534
- let w;
535
- e[16] !== b || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(Ke, { "aria-label": E, variant: "ghost", size: "2xs", onClick: b, flexShrink: 0, children: v }), e[16] = b, e[17] = v, e[18] = E, e[19] = w) : w = e[19];
537
+ e[16] !== p || e[17] !== P || e[18] !== E ? (b = /* @__PURE__ */ r(Ke, { "aria-label": E, variant: "ghost", size: "2xs", onClick: p, flexShrink: 0, children: P }), e[16] = p, e[17] = P, e[18] = E, e[19] = b) : b = e[19];
536
538
  let I;
537
- e[20] !== t.change || e[21] !== t.newPath || e[22] !== t.oldPath || e[23] !== c ? (I = t.change === "renamed" ? /* @__PURE__ */ G(q, { as: "span", textStyle: "sm", children: [
538
- /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", mr: "xs", children: t.oldPath }),
539
+ e[20] !== t.change || e[21] !== t.newPath || e[22] !== t.oldPath || e[23] !== c ? (I = t.change === "renamed" ? /* @__PURE__ */ W(Q, { as: "span", textStyle: "sm", children: [
540
+ /* @__PURE__ */ r(Q, { as: "span", color: "fg.muted", textDecoration: "line-through", mr: "xs", children: t.oldPath }),
539
541
  /* @__PURE__ */ r(O, { as: "span", display: "inline-flex", alignItems: "center", verticalAlign: "middle", mr: "xs", children: /* @__PURE__ */ r(Ye, { size: 12 }) }),
540
542
  t.newPath
541
- ] }) : t.change === "deleted" ? /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", textStyle: "sm", children: c }) : /* @__PURE__ */ r(q, { as: "span", textStyle: "sm", children: c }), e[20] = t.change, e[21] = t.newPath, e[22] = t.oldPath, e[23] = c, e[24] = I) : I = e[24];
543
+ ] }) : t.change === "deleted" ? /* @__PURE__ */ r(Q, { as: "span", color: "fg.muted", textDecoration: "line-through", textStyle: "sm", children: c }) : /* @__PURE__ */ r(Q, { as: "span", textStyle: "sm", children: c }), e[20] = t.change, e[21] = t.newPath, e[22] = t.oldPath, e[23] = c, e[24] = I) : I = e[24];
542
544
  let L;
543
545
  e[25] !== c || e[26] !== I ? (L = /* @__PURE__ */ r(O, { minW: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", title: c, children: I }), e[25] = c, e[26] = I, e[27] = L) : L = e[27];
544
546
  const M = u ? "1" : "0", z = u ? "auto" : "none";
@@ -550,50 +552,50 @@ const En = (n) => {
550
552
  }
551
553
  }, e[28] = T) : T = e[28];
552
554
  const _ = u ? "Copied" : "Copy file path", A = u ? "Copied" : "Copy file path";
553
- let k;
554
- e[29] !== S ? (k = (U) => {
555
- U.stopPropagation(), S();
556
- }, e[29] = S, e[30] = k) : k = e[30];
557
555
  let R;
558
- e[31] !== u ? (R = u ? /* @__PURE__ */ r(dt, { size: 12 }) : /* @__PURE__ */ r(Vt, { size: 12 }), e[31] = u, e[32] = R) : R = e[32];
556
+ e[29] !== w ? (R = (q) => {
557
+ q.stopPropagation(), w();
558
+ }, e[29] = w, e[30] = R) : R = e[30];
559
+ let k;
560
+ e[31] !== u ? (k = u ? /* @__PURE__ */ r(dt, { size: 12 }) : /* @__PURE__ */ r(jt, { size: 12 }), e[31] = u, e[32] = k) : k = e[32];
559
561
  let $;
560
- e[33] !== A || e[34] !== k || e[35] !== R ? ($ = /* @__PURE__ */ r(Ke, { "aria-label": A, variant: "ghost", size: "2xs", onClick: k, flexShrink: 0, children: R }), e[33] = A, e[34] = k, e[35] = R, e[36] = $) : $ = e[36];
562
+ e[33] !== A || e[34] !== R || e[35] !== k ? ($ = /* @__PURE__ */ r(Ke, { "aria-label": A, variant: "ghost", size: "2xs", onClick: R, flexShrink: 0, children: k }), e[33] = A, e[34] = R, e[35] = k, e[36] = $) : $ = e[36];
561
563
  let N;
562
- e[37] !== _ || e[38] !== $ ? (N = /* @__PURE__ */ r(Ot, { content: _, children: $ }), e[37] = _, e[38] = $, e[39] = N) : N = e[39];
564
+ e[37] !== _ || e[38] !== $ ? (N = /* @__PURE__ */ r($t, { content: _, children: $ }), e[37] = _, e[38] = $, e[39] = N) : N = e[39];
563
565
  let B;
564
566
  e[40] !== M || e[41] !== z || e[42] !== N ? (B = /* @__PURE__ */ r(O, { opacity: M, pointerEvents: z, transition: "opacity 120ms ease", css: T, children: N }), e[40] = M, e[41] = z, e[42] = N, e[43] = B) : B = e[43];
565
567
  let V;
566
- e[44] !== L || e[45] !== B ? (V = /* @__PURE__ */ G(We, { templateColumns: "minmax(0, max-content) auto", alignItems: "center", justifyContent: "start", gap: "2xs", minW: 0, children: [
568
+ e[44] !== L || e[45] !== B ? (V = /* @__PURE__ */ W(Ge, { templateColumns: "minmax(0, max-content) auto", alignItems: "center", justifyContent: "start", gap: "2xs", minW: 0, children: [
567
569
  L,
568
570
  B
569
571
  ] }), e[44] = L, e[45] = B, e[46] = V) : V = e[46];
570
572
  let j;
571
573
  e[47] !== i || e[48] !== a || e[49] !== m ? (j = m ? /* @__PURE__ */ r(O, { flexShrink: 0, children: /* @__PURE__ */ r(st, { variant: "ghost", additions: i, deletions: a }) }) : null, e[47] = i, e[48] = a, e[49] = m, e[50] = j) : j = e[50];
572
- let W;
573
- return e[51] !== w || e[52] !== V || e[53] !== j || e[54] !== C || e[55] !== y || e[56] !== x ? (W = /* @__PURE__ */ G(We, { "data-testid": "diff-card-header", templateColumns: "auto minmax(0, 1fr) auto", px: "xs", py: "2xs", alignItems: "center", justifyContent: "space-between", borderBottom: C, borderColor: "border.subtle", borderTopRadius: "xs", borderBottomRadius: y, position: "sticky", top: "0", zIndex: "1", bg: "bg", cursor: "pointer", transition: "background 0.14s ease", _hover: P, onClick: x, gap: "sm", children: [
574
- w,
574
+ let G;
575
+ return e[51] !== b || e[52] !== V || e[53] !== j || e[54] !== C || e[55] !== y || e[56] !== x ? (G = /* @__PURE__ */ W(Ge, { "data-testid": "diff-card-header", templateColumns: "auto minmax(0, 1fr) auto", px: "xs", py: "2xs", alignItems: "center", justifyContent: "space-between", borderBottom: C, borderColor: "border.subtle", borderTopRadius: "xs", borderBottomRadius: y, position: "sticky", top: "0", zIndex: "1", bg: "bg", cursor: "pointer", transition: "background 0.14s ease", _hover: v, onClick: x, gap: "sm", children: [
576
+ b,
575
577
  V,
576
578
  j
577
- ] }), e[51] = w, e[52] = V, e[53] = j, e[54] = C, e[55] = y, e[56] = x, e[57] = W) : W = e[57], W;
578
- }, zn = () => {
579
+ ] }), e[51] = b, e[52] = V, e[53] = j, e[54] = C, e[55] = y, e[56] = x, e[57] = G) : G = e[57], G;
580
+ }, Rn = () => {
579
581
  const n = F(1);
580
582
  let e;
581
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { flex: "1", minH: "0", contentProps: {
583
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(Qe, { flex: "1", minH: "0", contentProps: {
582
584
  p: "xs",
583
585
  spaceY: "xs"
584
586
  }, children: /* @__PURE__ */ r(Se, { title: "No changes detected", description: "Make some changes to see the diff here.", paddingY: "sm" }) }) }), n[0] = e) : e = n[0], e;
585
- }, Qe = 34, kn = 18, Rn = 28, Bn = 34, Nn = 88, Hn = 338, Me = 8, Ae = () => Qe + Nn + Me, On = (n) => {
587
+ }, Ue = 34, kn = 18, Bn = 28, Nn = 34, Hn = 88, On = 338, Me = 8, Ae = () => Ue + Hn + Me, $n = (n) => {
586
588
  const {
587
589
  diff: e,
588
590
  isCollapsed: t,
589
- hasOptedIntoLargeDiff: o = !1,
590
- diffViewMode: l = "unified"
591
+ hasOptedIntoLargeDiff: l = !1,
592
+ diffViewMode: o = "unified"
591
593
  } = n;
592
- if (t) return Bn + Me;
594
+ if (t) return Nn + Me;
593
595
  const s = e.oldContent !== void 0 || e.newContent !== void 0, i = e.newPath ?? e.oldPath ?? "";
594
596
  if (we(i) && (e.oldContent || e.newContent))
595
- return Qe + Hn + Me;
596
- if (Ue(i) || !s || bt(e) && !o) return Ae();
597
+ return Ue + On + Me;
598
+ if (qe(i) || !s || bt(e) && !l) return Ae();
597
599
  const {
598
600
  unifiedContentRows: a,
599
601
  splitContentRows: c,
@@ -603,27 +605,27 @@ const En = (n) => {
603
605
  modified: e.newContent ?? "",
604
606
  oldPath: e.oldPath,
605
607
  newPath: e.newPath
606
- }), m = l === "split" ? c : a;
608
+ }), m = o === "split" ? c : a;
607
609
  if (m === 0 && f === 0) return Ae();
608
- const u = m * kn + f * Rn;
609
- return Qe + u + Me;
610
- }, $n = (n) => n.newPath ?? n.oldPath ?? "unknown", Vn = 24, jn = (n) => {
610
+ const u = m * kn + f * Bn;
611
+ return Ue + u + Me;
612
+ }, Vn = (n) => n.newPath ?? n.oldPath ?? "unknown", jn = 24, Wn = (n) => {
611
613
  const {
612
614
  diffs: e,
613
615
  selectedDiffPath: t,
614
- collapsedPaths: o,
615
- expansionCommand: l,
616
+ collapsedPaths: l,
617
+ expansionCommand: o,
616
618
  completedScrollCommandId: s
617
619
  } = n;
618
620
  let i = t, a = t ? `selected:${t}` : null;
619
- const c = l?.action === "expand-selected" ? l.id : null, f = c !== null && s === c;
620
- l?.action === "expand-selected" && l.path && (i = l.path, a = `command:${l.id}:${l.path}`);
621
+ const c = o?.action === "expand-selected" ? o.id : null, f = c !== null && s === c;
622
+ o?.action === "expand-selected" && o.path && (i = o.path, a = `command:${o.id}:${o.path}`);
621
623
  let m = a;
622
624
  if (i && a) {
623
- const p = o.has(i) ? "collapsed" : "expanded";
624
- m = `${a}:${p}`;
625
+ const g = l.has(i) ? "collapsed" : "expanded";
626
+ m = `${a}:${g}`;
625
627
  }
626
- const u = i ? e.findIndex((p) => $n(p) === i) : -1, d = u >= 0 && l?.action === "expand-selected" && l.direction === "up" && !f;
628
+ const u = i ? e.findIndex((g) => Vn(g) === i) : -1, d = u >= 0 && o?.action === "expand-selected" && o.direction === "up" && !f;
627
629
  return {
628
630
  selectedScrollPath: i,
629
631
  selectedScrollKey: m,
@@ -636,178 +638,178 @@ const En = (n) => {
636
638
  const {
637
639
  indexes: e,
638
640
  selectedScrollIndex: t,
639
- shouldPinSelectedScrollIndex: o
641
+ shouldPinSelectedScrollIndex: l
640
642
  } = n;
641
- if (!o || e.includes(t)) return e;
642
- const l = Math.max(0, t - Vn), s = Array.from({
643
- length: t - l + 1
644
- }, (i, a) => l + a);
643
+ if (!l || e.includes(t)) return e;
644
+ const o = Math.max(0, t - jn), s = Array.from({
645
+ length: t - o + 1
646
+ }, (i, a) => o + a);
645
647
  return Array.from(/* @__PURE__ */ new Set([...e, ...s])).sort((i, a) => i - a);
646
- }, Wn = 3, Kn = 12, Qn = (n) => n.newPath ?? n.oldPath ?? "unknown", qn = (n) => {
648
+ }, Kn = 3, Un = 12, Qn = (n) => n.newPath ?? n.oldPath ?? "unknown", qn = (n) => {
647
649
  const e = F(20), {
648
650
  diffs: t,
649
- selectedDiffPath: o,
650
- collapsedPaths: l,
651
+ selectedDiffPath: l,
652
+ collapsedPaths: o,
651
653
  expansionCommand: s,
652
654
  scrollRef: i,
653
655
  virtualizerRef: a,
654
656
  suppressScrollAdjustRef: c
655
657
  } = n, [f, m] = X(null);
656
658
  let u;
657
- e[0] !== l || e[1] !== f || e[2] !== t || e[3] !== s || e[4] !== o ? (u = jn({
659
+ e[0] !== o || e[1] !== f || e[2] !== t || e[3] !== s || e[4] !== l ? (u = Wn({
658
660
  diffs: t,
659
- selectedDiffPath: o,
660
- collapsedPaths: l,
661
+ selectedDiffPath: l,
662
+ collapsedPaths: o,
661
663
  expansionCommand: s,
662
664
  completedScrollCommandId: f
663
- }), e[0] = l, e[1] = f, e[2] = t, e[3] = s, e[4] = o, e[5] = u) : u = e[5];
665
+ }), e[0] = o, e[1] = f, e[2] = t, e[3] = s, e[4] = l, e[5] = u) : u = e[5];
664
666
  const {
665
667
  selectedScrollPath: d,
666
- selectedScrollKey: p,
668
+ selectedScrollKey: g,
667
669
  selectedScrollCommandId: D,
668
- selectedScrollIndex: g,
670
+ selectedScrollIndex: S,
669
671
  shouldPinSelectedScrollIndex: h,
670
- hasCompletedSelectedScroll: S
672
+ hasCompletedSelectedScroll: w
671
673
  } = u;
672
674
  let C, y;
673
- e[6] !== l || e[7] !== t || e[8] !== S || e[9] !== i || e[10] !== D || e[11] !== p || e[12] !== d || e[13] !== c || e[14] !== a ? (C = () => {
674
- if (!d || !p || S || l.has(d))
675
+ e[6] !== o || e[7] !== t || e[8] !== w || e[9] !== i || e[10] !== D || e[11] !== g || e[12] !== d || e[13] !== c || e[14] !== a ? (C = () => {
676
+ if (!d || !g || w || o.has(d))
675
677
  return;
676
678
  const x = t.findIndex((T) => Qn(T) === d);
677
679
  if (x < 0)
678
680
  return;
679
- const E = a.current, b = i.current;
680
- if (!E || !b)
681
+ const E = a.current, p = i.current;
682
+ if (!E || !p)
681
683
  return;
682
- const v = [];
683
- let w = !1;
684
+ const P = [];
685
+ let b = !1;
684
686
  c.current = !0;
685
687
  const I = () => {
686
688
  c.current = !1;
687
689
  }, L = () => {
688
- w = !0, I(), D !== null && m(D);
690
+ b = !0, I(), D !== null && m(D);
689
691
  };
690
692
  let M = 0;
691
693
  const z = () => {
692
- if (!w) {
694
+ if (!b) {
693
695
  if (E.scrollToIndex(x, {
694
696
  align: "start"
695
- }), M = M + 1, M >= Wn && D !== null) {
697
+ }), M = M + 1, M >= Kn && D !== null) {
696
698
  I(), m(D);
697
699
  return;
698
700
  }
699
- if (M < Kn) {
700
- v.push(requestAnimationFrame(z));
701
+ if (M < Un) {
702
+ P.push(requestAnimationFrame(z));
701
703
  return;
702
704
  }
703
705
  I();
704
706
  }
705
707
  };
706
- return b.addEventListener("wheel", L, {
708
+ return p.addEventListener("wheel", L, {
707
709
  passive: !0
708
- }), b.addEventListener("touchmove", L, {
710
+ }), p.addEventListener("touchmove", L, {
709
711
  passive: !0
710
712
  }), z(), () => {
711
- I(), b.removeEventListener("wheel", L), b.removeEventListener("touchmove", L);
712
- for (const T of v)
713
+ I(), p.removeEventListener("wheel", L), p.removeEventListener("touchmove", L);
714
+ for (const T of P)
713
715
  cancelAnimationFrame(T);
714
716
  };
715
- }, y = [p, d, D, S, t, l, i, a, c], e[6] = l, e[7] = t, e[8] = S, e[9] = i, e[10] = D, e[11] = p, e[12] = d, e[13] = c, e[14] = a, e[15] = C, e[16] = y) : (C = e[15], y = e[16]), Ge(C, y);
716
- let P;
717
- return e[17] !== g || e[18] !== h ? (P = {
718
- selectedScrollIndex: g,
717
+ }, y = [g, d, D, w, t, o, i, a, c], e[6] = o, e[7] = t, e[8] = w, e[9] = i, e[10] = D, e[11] = g, e[12] = d, e[13] = c, e[14] = a, e[15] = C, e[16] = y) : (C = e[15], y = e[16]), We(C, y);
718
+ let v;
719
+ return e[17] !== S || e[18] !== h ? (v = {
720
+ selectedScrollIndex: S,
719
721
  shouldPinSelectedScrollIndex: h
720
- }, e[17] = g, e[18] = h, e[19] = P) : P = e[19], P;
721
- }, ee = (n) => n.newPath ?? n.oldPath ?? "unknown", et = 10, Un = 100, Yn = (n) => n.length <= et ? /* @__PURE__ */ new Set() : new Set(n.filter((e, t) => {
722
- const o = (e.additions ?? 0) + (e.deletions ?? 0);
723
- return t >= et || o > Un;
724
- }).map((e) => ee(e))), Xn = (n) => new Set(n.map((e) => ee(e))), Jn = (n, e) => {
722
+ }, e[17] = S, e[18] = h, e[19] = v) : v = e[19], v;
723
+ }, ee = (n) => n.newPath ?? n.oldPath ?? "unknown", et = 10, Yn = 100, Xn = (n) => n.length <= et ? /* @__PURE__ */ new Set() : new Set(n.filter((e, t) => {
724
+ const l = (e.additions ?? 0) + (e.deletions ?? 0);
725
+ return t >= et || l > Yn;
726
+ }).map((e) => ee(e))), Jn = (n) => new Set(n.map((e) => ee(e))), Zn = (n, e) => {
725
727
  const t = new Set(n);
726
728
  return t.has(e) ? t.delete(e) : t.add(e), t;
727
729
  }, xt = (n, e, t) => {
728
- if (!t || !e.has(t) || !n.some((l) => ee(l) === t)) return e;
729
- const o = new Set(e);
730
- return o.delete(t), o;
731
- }, Zn = (n, e, t, o) => {
732
- const l = xt(n, e, t);
733
- if (!o || o === t || l.has(o) || !n.some((i) => ee(i) === o))
734
- return l;
735
- const s = l === e ? new Set(e) : l;
736
- return s.add(o), s;
730
+ if (!t || !e.has(t) || !n.some((o) => ee(o) === t)) return e;
731
+ const l = new Set(e);
732
+ return l.delete(t), l;
733
+ }, eo = (n, e, t, l) => {
734
+ const o = xt(n, e, t);
735
+ if (!l || l === t || o.has(l) || !n.some((i) => ee(i) === l))
736
+ return o;
737
+ const s = o === e ? new Set(e) : o;
738
+ return s.add(l), s;
737
739
  };
738
- function el(n) {
740
+ function to(n) {
739
741
  const {
740
742
  diffs: e,
741
743
  selectedDiffPath: t = null,
742
- onLoadDiff: o,
743
- onSelectDiffPath: l,
744
+ onLoadDiff: l,
745
+ onSelectDiffPath: o,
744
746
  onExpansionStateChange: s,
745
747
  expansionCommand: i = null,
746
748
  diffViewMode: a = "unified"
747
- } = n, c = Z(null), f = Z(null), m = Z(null), u = Z(!1), d = Z(null), [p, D] = X(() => Yn(e)), [g, h] = X(() => /* @__PURE__ */ new Set()), {
748
- selectedScrollIndex: S,
749
+ } = n, c = Z(null), f = Z(null), m = Z(null), u = Z(!1), d = Z(null), [g, D] = X(() => Xn(e)), [S, h] = X(() => /* @__PURE__ */ new Set()), {
750
+ selectedScrollIndex: w,
749
751
  shouldPinSelectedScrollIndex: C
750
752
  } = qn({
751
753
  diffs: e,
752
754
  selectedDiffPath: t,
753
- collapsedPaths: p,
755
+ collapsedPaths: g,
754
756
  expansionCommand: i,
755
757
  scrollRef: c,
756
758
  virtualizerRef: m,
757
759
  suppressScrollAdjustRef: u
758
- }), y = Nt({
760
+ }), y = Ht({
759
761
  count: e.length,
760
762
  getScrollElement: () => c.current,
761
- estimateSize: (b) => {
762
- const v = e[b], w = ee(v);
763
- return On({
764
- diff: v,
765
- isCollapsed: p.has(w),
766
- hasOptedIntoLargeDiff: g.has(w),
763
+ estimateSize: (p) => {
764
+ const P = e[p], b = ee(P);
765
+ return $n({
766
+ diff: P,
767
+ isCollapsed: g.has(b),
768
+ hasOptedIntoLargeDiff: S.has(b),
767
769
  diffViewMode: a
768
770
  });
769
771
  },
770
- getItemKey: (b) => ee(e[b]),
772
+ getItemKey: (p) => ee(e[p]),
771
773
  overscan: 3,
772
- rangeExtractor: (b) => {
773
- const v = Ht(b);
774
+ rangeExtractor: (p) => {
775
+ const P = Ot(p);
774
776
  return Gn({
775
- indexes: v,
776
- selectedScrollIndex: S,
777
+ indexes: P,
778
+ selectedScrollIndex: w,
777
779
  shouldPinSelectedScrollIndex: C
778
780
  });
779
781
  }
780
782
  });
781
- if (y.shouldAdjustScrollPositionOnItemSizeChange = (b, v, w) => !w.isScrolling && !u.current, m.current = y, Ge(() => {
782
- t && D((b) => xt(e, b, t));
783
- }, [e, t]), Ge(() => {
783
+ if (y.shouldAdjustScrollPositionOnItemSizeChange = (p, P, b) => !b.isScrolling && !u.current, m.current = y, We(() => {
784
+ t && D((p) => xt(e, p, t));
785
+ }, [e, t]), We(() => {
784
786
  if (i) {
785
787
  if (i.action === "expand-selected") {
786
- const b = i.path;
787
- if (b) {
788
- const v = d.current;
789
- d.current = b, D((w) => Zn(e, w, b, v));
788
+ const p = i.path;
789
+ if (p) {
790
+ const P = d.current;
791
+ d.current = p, D((b) => eo(e, b, p, P));
790
792
  }
791
793
  return;
792
794
  }
793
- d.current = null, D(i.action === "collapse" ? Xn(e) : /* @__PURE__ */ new Set());
795
+ d.current = null, D(i.action === "collapse" ? Jn(e) : /* @__PURE__ */ new Set());
794
796
  }
795
- }, [e, i]), oe(() => {
796
- const b = {
797
- allExpanded: p.size === 0,
798
- allCollapsed: e.length > 0 && e.every((w) => p.has(ee(w)))
799
- }, v = f.current;
800
- v?.allExpanded === b.allExpanded && v.allCollapsed === b.allCollapsed || (f.current = b, s?.(b));
801
- }, [p, e, s]), e.length === 0) return /* @__PURE__ */ r(zn, {});
802
- const P = (b) => {
803
- D((v) => Jn(v, b));
804
- }, x = (b) => {
805
- h((v) => {
806
- const w = new Set(v);
807
- return w.add(b), w;
797
+ }, [e, i]), le(() => {
798
+ const p = {
799
+ allExpanded: g.size === 0,
800
+ allCollapsed: e.length > 0 && e.every((b) => g.has(ee(b)))
801
+ }, P = f.current;
802
+ P?.allExpanded === p.allExpanded && P.allCollapsed === p.allCollapsed || (f.current = p, s?.(p));
803
+ }, [g, e, s]), e.length === 0) return /* @__PURE__ */ r(Rn, {});
804
+ const v = (p) => {
805
+ D((P) => Zn(P, p));
806
+ }, x = (p) => {
807
+ h((P) => {
808
+ const b = new Set(P);
809
+ return b.add(p), b;
808
810
  });
809
811
  }, E = y.getVirtualItems();
810
- return /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(O, { position: "relative", flex: "1", minH: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { position: "absolute", inset: "0", viewportRef: c, viewportProps: {
812
+ return /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(O, { position: "relative", flex: "1", minH: "0", bg: "bg", children: /* @__PURE__ */ r(Qe, { position: "absolute", inset: "0", viewportRef: c, viewportProps: {
811
813
  style: {
812
814
  overflowAnchor: "none"
813
815
  }
@@ -815,29 +817,29 @@ function el(n) {
815
817
  p: "xs"
816
818
  }, children: /* @__PURE__ */ r(O, { position: "relative", width: "100%", style: {
817
819
  height: y.getTotalSize()
818
- }, children: E.map((b) => {
819
- const v = e[b.index], w = ee(v);
820
- return /* @__PURE__ */ r(O, { "data-index": b.index, ref: y.measureElement, position: "absolute", left: "0", width: "100%", pb: "xs", style: {
821
- top: `${b.start}px`
822
- }, children: /* @__PURE__ */ r(An, { diff: v, isSelected: t === w, isExpanded: !p.has(w), onToggleExpanded: () => P(w), onSelect: () => l?.(w), onLoadDiff: o, hasOptedIntoLargeDiff: g.has(w), onShowFullDiff: () => x(w), diffViewMode: a }, w) }, b.key);
820
+ }, children: E.map((p) => {
821
+ const P = e[p.index], b = ee(P);
822
+ return /* @__PURE__ */ r(O, { "data-index": p.index, ref: y.measureElement, position: "absolute", left: "0", width: "100%", pb: "xs", style: {
823
+ top: `${p.start}px`
824
+ }, children: /* @__PURE__ */ r(Mn, { diff: P, isSelected: t === b, isExpanded: !g.has(b), onToggleExpanded: () => v(b), onSelect: () => o?.(b), onLoadDiff: l, hasOptedIntoLargeDiff: S.has(b), onShowFullDiff: () => x(b), diffViewMode: a }, b) }, p.key);
823
825
  }) }) }) }) });
824
826
  }
825
- const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), wt = (n) => (n.sort((e, t) => e.type !== t.type ? e.type === "folder" ? -1 : 1 : e.name.localeCompare(t.name)), n.forEach((e) => {
827
+ const no = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), wt = (n) => (n.sort((e, t) => e.type !== t.type ? e.type === "folder" ? -1 : 1 : e.name.localeCompare(t.name)), n.forEach((e) => {
826
828
  e.children && wt(e.children);
827
- }), n), Dt = (n) => Array.from(new Set(n.map(tl).filter(Boolean))), nl = (n) => Dt(n).map((e) => ({
829
+ }), n), Dt = (n) => Array.from(new Set(n.map(no).filter(Boolean))), oo = (n) => Dt(n).map((e) => ({
828
830
  id: `file:${e}`,
829
831
  name: e,
830
832
  type: "file"
831
833
  })).sort((e, t) => e.name.localeCompare(t.name)), ze = (n, e) => {
832
- if (e === "flat") return nl(n);
833
- const t = /* @__PURE__ */ new Map(), o = [];
834
- return Dt(n).forEach((l) => {
835
- const s = l.split("/");
834
+ if (e === "flat") return oo(n);
835
+ const t = /* @__PURE__ */ new Map(), l = [];
836
+ return Dt(n).forEach((o) => {
837
+ const s = o.split("/");
836
838
  let i = "", a = null;
837
839
  s.forEach((c, f) => {
838
- const m = i ? `${i}/${c}` : c, u = f === s.length - 1, d = `${u ? "file" : "folder"}:${m}`, p = t.get(d);
839
- if (p) {
840
- a = p, i = m;
840
+ const m = i ? `${i}/${c}` : c, u = f === s.length - 1, d = `${u ? "file" : "folder"}:${m}`, g = t.get(d);
841
+ if (g) {
842
+ a = g, i = m;
841
843
  return;
842
844
  }
843
845
  const D = {
@@ -848,28 +850,28 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
848
850
  children: []
849
851
  }
850
852
  };
851
- t.set(d, D), a ? a.children?.push(D) : o.push(D), a = D, i = m;
853
+ t.set(d, D), a ? a.children?.push(D) : l.push(D), a = D, i = m;
852
854
  });
853
- }), wt(o);
855
+ }), wt(l);
854
856
  }, tt = (n) => {
855
- const e = [], t = (o) => {
856
- o.forEach((l) => {
857
- l.type === "folder" && (e.push(l.id), t(l.children ?? []));
857
+ const e = [], t = (l) => {
858
+ l.forEach((o) => {
859
+ o.type === "folder" && (e.push(o.id), t(o.children ?? []));
858
860
  });
859
861
  };
860
862
  return t(n), e;
861
- }, ll = (n) => {
862
- const e = [], t = (o) => {
863
- o.forEach((l) => {
864
- if (l.type === "file") {
865
- e.push(l.id.replace(/^file:/, ""));
863
+ }, lo = (n) => {
864
+ const e = [], t = (l) => {
865
+ l.forEach((o) => {
866
+ if (o.type === "file") {
867
+ e.push(o.id.replace(/^file:/, ""));
866
868
  return;
867
869
  }
868
- t(l.children ?? []);
870
+ t(o.children ?? []);
869
871
  });
870
872
  };
871
873
  return t(n), e;
872
- }, ol = (n, e) => e === "flat" ? [...n].sort((t, o) => t.localeCompare(o)) : ll(ze(n, "nested")), il = ln((n) => ({
874
+ }, io = (n, e) => e === "flat" ? [...n].sort((t, l) => t.localeCompare(l)) : lo(ze(n, "nested")), so = ln((n) => ({
873
875
  isTreePanelOpen: !0,
874
876
  viewMode: "nested",
875
877
  diffViewMode: "unified",
@@ -898,9 +900,9 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
898
900
  expandedFolderIds: new Set(e)
899
901
  }),
900
902
  toggleFolder: (e) => n((t) => {
901
- const o = new Set(t.expandedFolderIds);
902
- return o.has(e) ? o.delete(e) : o.add(e), {
903
- expandedFolderIds: o
903
+ const l = new Set(t.expandedFolderIds);
904
+ return l.has(e) ? l.delete(e) : l.add(e), {
905
+ expandedFolderIds: l
904
906
  };
905
907
  }),
906
908
  expandAll: (e) => n({
@@ -909,32 +911,32 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
909
911
  collapseAll: () => n({
910
912
  expandedFolderIds: /* @__PURE__ */ new Set()
911
913
  })
912
- })), sl = (n) => {
914
+ })), ro = (n) => {
913
915
  const e = F(4);
914
916
  let t;
915
917
  e[0] !== n.selected ? (t = n.selected ? /* @__PURE__ */ r(dt, { size: 14 }) : null, e[0] = n.selected, e[1] = t) : t = e[1];
916
- let o;
917
- return e[2] !== t ? (o = /* @__PURE__ */ r(O, { w: "14px", flexShrink: 0, display: "flex", justifyContent: "center", children: t }), e[2] = t, e[3] = o) : o = e[3], o;
918
+ let l;
919
+ return e[2] !== t ? (l = /* @__PURE__ */ r(O, { w: "14px", flexShrink: 0, display: "flex", justifyContent: "center", children: t }), e[2] = t, e[3] = l) : l = e[3], l;
918
920
  }, ne = (n) => {
919
921
  const e = F(15), {
920
922
  id: t,
921
- label: o,
922
- icon: l,
923
+ label: l,
924
+ icon: o,
923
925
  selected: s,
924
926
  disabled: i,
925
927
  onActivate: a
926
928
  } = n, c = s === void 0 ? void 0 : "menuitemradio";
927
929
  let f;
928
- e[0] !== s ? (f = s === void 0 ? void 0 : /* @__PURE__ */ r(sl, { selected: s }), e[0] = s, e[1] = f) : f = e[1];
930
+ e[0] !== s ? (f = s === void 0 ? void 0 : /* @__PURE__ */ r(ro, { selected: s }), e[0] = s, e[1] = f) : f = e[1];
929
931
  let m;
930
- e[2] !== i || e[3] !== l || e[4] !== t || e[5] !== o || e[6] !== a || e[7] !== s || e[8] !== c || e[9] !== f ? (m = /* @__PURE__ */ r(en, { asChild: !0, role: c, "aria-checked": s, variant: "full-width", id: t, icon: l, label: o, disabled: i, isSelected: s, endContent: f, onActivate: a }), e[2] = i, e[3] = l, e[4] = t, e[5] = o, e[6] = a, e[7] = s, e[8] = c, e[9] = f, e[10] = m) : m = e[10];
932
+ e[2] !== i || e[3] !== o || e[4] !== t || e[5] !== l || e[6] !== a || e[7] !== s || e[8] !== c || e[9] !== f ? (m = /* @__PURE__ */ r(tn, { asChild: !0, role: c, "aria-checked": s, variant: "full-width", id: t, icon: o, label: l, disabled: i, isSelected: s, endContent: f, onActivate: a }), e[2] = i, e[3] = o, e[4] = t, e[5] = l, e[6] = a, e[7] = s, e[8] = c, e[9] = f, e[10] = m) : m = e[10];
931
933
  let u;
932
934
  return e[11] !== i || e[12] !== t || e[13] !== m ? (u = /* @__PURE__ */ r(J.Item, { value: t, disabled: i, asChild: !0, children: m }), e[11] = i, e[12] = t, e[13] = m, e[14] = u) : u = e[14], u;
933
- }, rl = (n) => {
935
+ }, ao = (n) => {
934
936
  const e = F(40), {
935
937
  isTreePanelOpen: t,
936
- hasFilePaths: o,
937
- viewMode: l,
938
+ hasFilePaths: l,
939
+ viewMode: o,
938
940
  diffViewMode: s,
939
941
  isExpandAllDisabled: i,
940
942
  isCollapseAllDisabled: a,
@@ -944,51 +946,51 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
944
946
  onExpandAll: u,
945
947
  onCollapseAll: d
946
948
  } = n;
947
- let p;
948
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ r(J.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Ke, { "aria-label": "Diff view options", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(jt, { size: 14 }) }) }), e[0] = p) : p = e[0];
949
+ let g;
950
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ r(J.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Ke, { "aria-label": "Diff view options", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(Wt, { size: 14 }) }) }), e[0] = g) : g = e[0];
949
951
  let D;
950
- e[1] !== t ? (D = t ? /* @__PURE__ */ r(Kt, { size: 14 }) : /* @__PURE__ */ r(Qt, { size: 14 }), e[1] = t, e[2] = D) : D = e[2];
951
- const g = t ? "Hide file tree" : "Show file tree";
952
+ e[1] !== t ? (D = t ? /* @__PURE__ */ r(Ut, { size: 14 }) : /* @__PURE__ */ r(Qt, { size: 14 }), e[1] = t, e[2] = D) : D = e[2];
953
+ const S = t ? "Hide file tree" : "Show file tree";
952
954
  let h;
953
- e[3] !== c || e[4] !== D || e[5] !== g ? (h = /* @__PURE__ */ r(ne, { id: "toggle-file-tree", icon: D, label: g, onActivate: c }), e[3] = c, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
954
- let S;
955
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ r(J.Separator, {}), e[7] = S) : S = e[7];
955
+ e[3] !== c || e[4] !== D || e[5] !== S ? (h = /* @__PURE__ */ r(ne, { id: "toggle-file-tree", icon: D, label: S, onActivate: c }), e[3] = c, e[4] = D, e[5] = S, e[6] = h) : h = e[6];
956
+ let w;
957
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ r(J.Separator, {}), e[7] = w) : w = e[7];
956
958
  let C;
957
- e[8] !== o || e[9] !== f || e[10] !== l ? (C = o ? /* @__PURE__ */ G(Et, { children: [
958
- /* @__PURE__ */ r(ne, { id: "nested", icon: /* @__PURE__ */ r(Gt, { size: 14 }), label: "Nested", selected: l === "nested", onActivate: () => f("nested") }),
959
- /* @__PURE__ */ r(ne, { id: "flat", icon: /* @__PURE__ */ r(Wt, { size: 14 }), label: "Flat", selected: l === "flat", onActivate: () => f("flat") }),
959
+ e[8] !== l || e[9] !== f || e[10] !== o ? (C = l ? /* @__PURE__ */ W(Et, { children: [
960
+ /* @__PURE__ */ r(ne, { id: "nested", icon: /* @__PURE__ */ r(Gt, { size: 14 }), label: "Nested", selected: o === "nested", onActivate: () => f("nested") }),
961
+ /* @__PURE__ */ r(ne, { id: "flat", icon: /* @__PURE__ */ r(Kt, { size: 14 }), label: "Flat", selected: o === "flat", onActivate: () => f("flat") }),
960
962
  /* @__PURE__ */ r(J.Separator, {})
961
- ] }) : null, e[8] = o, e[9] = f, e[10] = l, e[11] = C) : C = e[11];
963
+ ] }) : null, e[8] = l, e[9] = f, e[10] = o, e[11] = C) : C = e[11];
962
964
  let y;
963
965
  e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ r(qt, { size: 14 }), e[12] = y) : y = e[12];
964
- const P = s === "unified";
966
+ const v = s === "unified";
965
967
  let x;
966
968
  e[13] !== m ? (x = () => m("unified"), e[13] = m, e[14] = x) : x = e[14];
967
969
  let E;
968
- e[15] !== P || e[16] !== x ? (E = /* @__PURE__ */ r(ne, { id: "unified", icon: y, label: "Unified", selected: P, onActivate: x }), e[15] = P, e[16] = x, e[17] = E) : E = e[17];
970
+ e[15] !== v || e[16] !== x ? (E = /* @__PURE__ */ r(ne, { id: "unified", icon: y, label: "Unified", selected: v, onActivate: x }), e[15] = v, e[16] = x, e[17] = E) : E = e[17];
971
+ let p;
972
+ e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ r(Yt, { size: 14 }), e[18] = p) : p = e[18];
973
+ const P = s === "split";
969
974
  let b;
970
- e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ r(Ut, { size: 14 }), e[18] = b) : b = e[18];
971
- const v = s === "split";
972
- let w;
973
- e[19] !== m ? (w = () => m("split"), e[19] = m, e[20] = w) : w = e[20];
975
+ e[19] !== m ? (b = () => m("split"), e[19] = m, e[20] = b) : b = e[20];
974
976
  let I;
975
- e[21] !== v || e[22] !== w ? (I = /* @__PURE__ */ r(ne, { id: "split", icon: b, label: "Split", selected: v, onActivate: w }), e[21] = v, e[22] = w, e[23] = I) : I = e[23];
977
+ e[21] !== P || e[22] !== b ? (I = /* @__PURE__ */ r(ne, { id: "split", icon: p, label: "Split", selected: P, onActivate: b }), e[21] = P, e[22] = b, e[23] = I) : I = e[23];
976
978
  let L;
977
979
  e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ r(J.Separator, {}), e[24] = L) : L = e[24];
978
980
  let M;
979
- e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ r(Yt, { size: 14 }), e[25] = M) : M = e[25];
981
+ e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ r(Xt, { size: 14 }), e[25] = M) : M = e[25];
980
982
  let z;
981
983
  e[26] !== i || e[27] !== u ? (z = /* @__PURE__ */ r(ne, { id: "expand-all", icon: M, label: "Expand all", disabled: i, onActivate: u }), e[26] = i, e[27] = u, e[28] = z) : z = e[28];
982
984
  let T;
983
- e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(Xt, { size: 14 }), e[29] = T) : T = e[29];
985
+ e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(Jt, { size: 14 }), e[29] = T) : T = e[29];
984
986
  let _;
985
987
  e[30] !== a || e[31] !== d ? (_ = /* @__PURE__ */ r(ne, { id: "collapse-all", icon: T, label: "Collapse all", disabled: a, onActivate: d }), e[30] = a, e[31] = d, e[32] = _) : _ = e[32];
986
988
  let A;
987
- return e[33] !== I || e[34] !== z || e[35] !== _ || e[36] !== h || e[37] !== C || e[38] !== E ? (A = /* @__PURE__ */ G(J.Root, { children: [
988
- p,
989
- /* @__PURE__ */ r(J.Positioner, { children: /* @__PURE__ */ G(J.Content, { minW: "190px", bg: "bg", p: "0", gap: "0", children: [
989
+ return e[33] !== I || e[34] !== z || e[35] !== _ || e[36] !== h || e[37] !== C || e[38] !== E ? (A = /* @__PURE__ */ W(J.Root, { children: [
990
+ g,
991
+ /* @__PURE__ */ r(J.Positioner, { children: /* @__PURE__ */ W(J.Content, { minW: "190px", bg: "bg", p: "0", gap: "0", children: [
990
992
  h,
991
- S,
993
+ w,
992
994
  C,
993
995
  E,
994
996
  I,
@@ -997,21 +999,21 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
997
999
  _
998
1000
  ] }) })
999
1001
  ] }), e[33] = I, e[34] = z, e[35] = _, e[36] = h, e[37] = C, e[38] = E, e[39] = A) : A = e[39], A;
1000
- }, al = {
1002
+ }, co = {
1001
1003
  added: "A",
1002
1004
  copied: "C",
1003
1005
  deleted: "D",
1004
1006
  modified: "M",
1005
1007
  permissionChange: "M",
1006
1008
  renamed: "R"
1007
- }, dl = {
1009
+ }, fo = {
1008
1010
  added: "green",
1009
1011
  copied: "purple",
1010
1012
  deleted: "red",
1011
1013
  modified: "blue",
1012
1014
  permissionChange: "yellow",
1013
1015
  renamed: "orange"
1014
- }, cl = {
1016
+ }, ho = {
1015
1017
  added: {
1016
1018
  color: "fg.success",
1017
1019
  backgroundColor: "bg.success"
@@ -1020,18 +1022,18 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
1020
1022
  color: "fg.error",
1021
1023
  backgroundColor: "bg.error"
1022
1024
  }
1023
- }, fl = (n) => {
1025
+ }, uo = (n) => {
1024
1026
  const e = F(5), {
1025
1027
  change: t
1026
1028
  } = n;
1027
- let o;
1028
- e[0] !== t ? (o = cl[t] ?? {
1029
- colorPalette: dl[t] ?? "gray"
1030
- }, e[0] = t, e[1] = o) : o = e[1];
1031
- const l = o, s = al[t] ?? t;
1029
+ let l;
1030
+ e[0] !== t ? (l = ho[t] ?? {
1031
+ colorPalette: fo[t] ?? "gray"
1032
+ }, e[0] = t, e[1] = l) : l = e[1];
1033
+ const o = l, s = co[t] ?? t;
1032
1034
  let i;
1033
- return e[2] !== l || e[3] !== s ? (i = /* @__PURE__ */ r(At, { size: "xs", variant: "subtle", flexShrink: 0, ...l, children: s }), e[2] = l, e[3] = s, e[4] = i) : i = e[4], i;
1034
- }, hl = (n) => {
1035
+ return e[2] !== o || e[3] !== s ? (i = /* @__PURE__ */ r(Mt, { size: "xs", variant: "subtle", flexShrink: 0, ...o, children: s }), e[2] = o, e[3] = s, e[4] = i) : i = e[4], i;
1036
+ }, mo = (n) => {
1035
1037
  const e = n.lastIndexOf("/");
1036
1038
  return e < 0 ? {
1037
1039
  fileName: n,
@@ -1040,22 +1042,22 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
1040
1042
  fileName: n.slice(e + 1),
1041
1043
  dirPath: n.slice(0, e)
1042
1044
  };
1043
- }, ul = (n, e, t) => {
1045
+ }, po = (n, e, t) => {
1044
1046
  const {
1045
- fileName: o,
1046
- dirPath: l
1047
- } = hl(t);
1048
- return e !== "flat" || !l ? n.name : /* @__PURE__ */ G(q, { textStyle: "label/S/regular", truncate: !0, children: [
1049
- /* @__PURE__ */ r(q, { as: "span", color: "fg.default", children: o }),
1047
+ fileName: l,
1048
+ dirPath: o
1049
+ } = mo(t);
1050
+ return e !== "flat" || !o ? n.name : /* @__PURE__ */ W(Q, { textStyle: "label/S/regular", truncate: !0, children: [
1051
+ /* @__PURE__ */ r(Q, { as: "span", color: "fg.default", children: l }),
1050
1052
  " ",
1051
- /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", children: l })
1053
+ /* @__PURE__ */ r(Q, { as: "span", color: "fg.muted", children: o })
1052
1054
  ] });
1053
1055
  }, Ct = (n) => {
1054
1056
  const {
1055
1057
  nodes: e,
1056
1058
  viewMode: t,
1057
- onSelectPath: o,
1058
- resolveFileIcon: l,
1059
+ onSelectPath: l,
1060
+ resolveFileIcon: o,
1059
1061
  changeByPath: s
1060
1062
  } = n;
1061
1063
  return e.map((i) => {
@@ -1067,29 +1069,29 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
1067
1069
  children: Ct({
1068
1070
  nodes: i.children ?? [],
1069
1071
  viewMode: t,
1070
- onSelectPath: o,
1071
- resolveFileIcon: l,
1072
+ onSelectPath: l,
1073
+ resolveFileIcon: o,
1072
1074
  changeByPath: s
1073
1075
  })
1074
1076
  };
1075
- const a = i.id.replace(/^file:/, ""), c = l?.(a) ?? {
1076
- icon: /* @__PURE__ */ r(Mt, { as: Jt, boxSize: "16px" }),
1077
+ const a = i.id.replace(/^file:/, ""), c = o?.(a) ?? {
1078
+ icon: /* @__PURE__ */ r(zt, { as: Zt, boxSize: "16px" }),
1077
1079
  color: "fg.subtle"
1078
1080
  }, f = s?.get(a);
1079
1081
  return {
1080
1082
  id: i.id,
1081
- label: ul(i, t, a),
1083
+ label: po(i, t, a),
1082
1084
  icon: c.icon,
1083
1085
  iconColor: c.color,
1084
- endContent: f ? /* @__PURE__ */ r(fl, { change: f }) : void 0,
1085
- onActivate: () => o(a)
1086
+ endContent: f ? /* @__PURE__ */ r(uo, { change: f }) : void 0,
1087
+ onActivate: () => l(a)
1086
1088
  };
1087
1089
  });
1088
- }, pl = (n) => {
1090
+ }, go = (n) => {
1089
1091
  const e = F(23), {
1090
1092
  paths: t,
1091
- selectedPath: o,
1092
- viewMode: l,
1093
+ selectedPath: l,
1094
+ viewMode: o,
1093
1095
  searchQuery: s,
1094
1096
  expandedFolderIds: i,
1095
1097
  onSelectPath: a,
@@ -1098,204 +1100,204 @@ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), w
1098
1100
  resolveFileIcon: m,
1099
1101
  changeByPath: u
1100
1102
  } = n, d = Z(null);
1101
- let p;
1102
- if (e[0] !== u || e[1] !== a || e[2] !== t || e[3] !== m || e[4] !== l) {
1103
- const E = ze(t, l);
1104
- p = Ct({
1103
+ let g;
1104
+ if (e[0] !== u || e[1] !== a || e[2] !== t || e[3] !== m || e[4] !== o) {
1105
+ const E = ze(t, o);
1106
+ g = Ct({
1105
1107
  nodes: E,
1106
- viewMode: l,
1108
+ viewMode: o,
1107
1109
  onSelectPath: a,
1108
1110
  resolveFileIcon: m,
1109
1111
  changeByPath: u
1110
- }), e[0] = u, e[1] = a, e[2] = t, e[3] = m, e[4] = l, e[5] = p;
1112
+ }), e[0] = u, e[1] = a, e[2] = t, e[3] = m, e[4] = o, e[5] = g;
1111
1113
  } else
1112
- p = e[5];
1113
- const D = p, g = s.trim() ? "No matching files" : "No changed files";
1114
+ g = e[5];
1115
+ const D = g, S = s.trim() ? "No matching files" : "No changed files";
1114
1116
  let h;
1115
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(Zt, { size: 14 }), e[6] = h) : h = e[6];
1116
- let S;
1117
- e[7] !== c ? (S = (E) => c(E.target.value), e[7] = c, e[8] = S) : S = e[8];
1117
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(en, { size: 14 }), e[6] = h) : h = e[6];
1118
+ let w;
1119
+ e[7] !== c ? (w = (E) => c(E.target.value), e[7] = c, e[8] = w) : w = e[8];
1118
1120
  let C;
1119
- e[9] !== s || e[10] !== S ? (C = /* @__PURE__ */ r(ct, { flexShrink: 0, borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(zt, { startElement: h, children: /* @__PURE__ */ r(kt, { size: "sm", variant: "borderless", "aria-label": "Search files", placeholder: "Search files", value: s, onChange: S }) }) }), e[9] = s, e[10] = S, e[11] = C) : C = e[11];
1121
+ e[9] !== s || e[10] !== w ? (C = /* @__PURE__ */ r(ct, { flexShrink: 0, borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Rt, { startElement: h, children: /* @__PURE__ */ r(kt, { size: "sm", variant: "borderless", "aria-label": "Search files", placeholder: "Search files", value: s, onChange: w }) }) }), e[9] = s, e[10] = w, e[11] = C) : C = e[11];
1120
1122
  let y;
1121
1123
  e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
1122
1124
  style: {
1123
1125
  overflowX: "hidden"
1124
1126
  }
1125
1127
  }, e[12] = y) : y = e[12];
1126
- let P;
1127
- e[13] !== g || e[14] !== i || e[15] !== f || e[16] !== t.length || e[17] !== o || e[18] !== D ? (P = /* @__PURE__ */ r(qe, { flex: "1", minH: "0", minW: "0", bg: "bg", viewportRef: d, viewportProps: y, children: t.length > 0 ? /* @__PURE__ */ r(tn, { sections: [{
1128
+ let v;
1129
+ e[13] !== S || e[14] !== i || e[15] !== f || e[16] !== t.length || e[17] !== l || e[18] !== D ? (v = /* @__PURE__ */ r(Qe, { flex: "1", minH: "0", minW: "0", bg: "bg", viewportRef: d, viewportProps: y, children: t.length > 0 ? /* @__PURE__ */ r(nn, { sections: [{
1128
1130
  id: "files",
1129
1131
  nodes: D
1130
- }], expandedNodeIds: [...i], activeNodeId: o ? `file:${o}` : null, rowVariant: "tree", onToggleNode: f, virtualize: !0, scrollRef: d }) : /* @__PURE__ */ r(O, { px: "xs", py: "xs", children: /* @__PURE__ */ r(Se, { title: g, size: "sm", textAlign: "left", alignItems: "flex-start" }) }) }), e[13] = g, e[14] = i, e[15] = f, e[16] = t.length, e[17] = o, e[18] = D, e[19] = P) : P = e[19];
1132
+ }], expandedNodeIds: [...i], activeNodeId: l ? `file:${l}` : null, rowVariant: "tree", onToggleNode: f, virtualize: !0, scrollRef: d }) : /* @__PURE__ */ r(O, { px: "xs", py: "xs", children: /* @__PURE__ */ r(Se, { title: S, size: "sm", textAlign: "left", alignItems: "flex-start" }) }) }), e[13] = S, e[14] = i, e[15] = f, e[16] = t.length, e[17] = l, e[18] = D, e[19] = v) : v = e[19];
1131
1133
  let x;
1132
- return e[20] !== C || e[21] !== P ? (x = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", w: "full", gap: "0", overflow: "hidden", bg: "bg", children: [
1134
+ return e[20] !== C || e[21] !== v ? (x = /* @__PURE__ */ W(be, { h: "full", minH: "0", minW: "0", w: "full", gap: "0", overflow: "hidden", bg: "bg", children: [
1133
1135
  C,
1134
- P
1135
- ] }), e[20] = C, e[21] = P, e[22] = x) : x = e[22], x;
1136
- }, le = (n) => n.newPath ?? n.oldPath ?? "unknown", ml = (n) => new Map(n.map((e) => [le(e), e.change])), gl = (n) => n.reduce((e, t) => ({
1136
+ v
1137
+ ] }), e[20] = C, e[21] = v, e[22] = x) : x = e[22], x;
1138
+ }, oe = (n) => n.newPath ?? n.oldPath ?? "unknown", bo = (n) => new Map(n.map((e) => [oe(e), e.change])), So = (n) => n.reduce((e, t) => ({
1137
1139
  additions: e.additions + (t.additions ?? 0),
1138
1140
  deletions: e.deletions + (t.deletions ?? 0)
1139
1141
  }), {
1140
1142
  additions: 0,
1141
1143
  deletions: 0
1142
- }), bl = (n) => {
1144
+ }), xo = (n) => {
1143
1145
  const {
1144
1146
  diffs: e,
1145
1147
  normalizedSearchQuery: t,
1146
- viewMode: o
1147
- } = n, l = t ? e.filter((a) => le(a).toLowerCase().includes(t)) : e, s = ol(l.map(le), o), i = new Map(s.map((a, c) => [a, c]));
1148
- return [...l].sort((a, c) => {
1149
- const f = i.get(le(a)) ?? Number.MAX_SAFE_INTEGER, m = i.get(le(c)) ?? Number.MAX_SAFE_INTEGER;
1148
+ viewMode: l
1149
+ } = n, o = t ? e.filter((a) => oe(a).toLowerCase().includes(t)) : e, s = io(o.map(oe), l), i = new Map(s.map((a, c) => [a, c]));
1150
+ return [...o].sort((a, c) => {
1151
+ const f = i.get(oe(a)) ?? Number.MAX_SAFE_INTEGER, m = i.get(oe(c)) ?? Number.MAX_SAFE_INTEGER;
1150
1152
  return f - m;
1151
1153
  });
1152
- }, nt = (n, e) => n[0] ?? e[0] ?? null, Sl = ["first", "second", "third"], xl = () => {
1154
+ }, nt = (n, e) => n[0] ?? e[0] ?? null, wo = ["first", "second", "third"], Do = () => {
1153
1155
  const n = F(1);
1154
1156
  let e;
1155
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { flex: "1", minH: "0", bg: "bg", p: "xs", gap: "xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff panel", children: Sl.map(wl) }), n[0] = e) : e = n[0], e;
1156
- }, Hl = (n) => {
1157
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { flex: "1", minH: "0", bg: "bg", p: "xs", gap: "xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff panel", children: wo.map(Co) }), n[0] = e) : e = n[0], e;
1158
+ }, $o = (n) => {
1157
1159
  const e = F(109), {
1158
1160
  diffs: t,
1159
- changedFilePaths: o,
1160
- defaultSelectedPath: l,
1161
+ changedFilePaths: l,
1162
+ defaultSelectedPath: o,
1161
1163
  loading: s,
1162
1164
  onLoadDiff: i,
1163
1165
  resolveFileIcon: a
1164
- } = n, c = l === void 0 ? null : l, f = s === void 0 ? !1 : s, [m, u] = X(null);
1166
+ } = n, c = o === void 0 ? null : o, f = s === void 0 ? !1 : s, [m, u] = X(null);
1165
1167
  let d;
1166
1168
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
1167
1169
  allExpanded: !1,
1168
1170
  allCollapsed: !1
1169
1171
  }, e[0] = d) : d = e[0];
1170
- const [p, D] = X(d), {
1171
- isTreePanelOpen: g,
1172
+ const [g, D] = X(d), {
1173
+ isTreePanelOpen: S,
1172
1174
  viewMode: h,
1173
- diffViewMode: S,
1175
+ diffViewMode: w,
1174
1176
  searchQuery: C,
1175
1177
  selectedPath: y,
1176
- expandedFolderIds: P,
1178
+ expandedFolderIds: v,
1177
1179
  setTreePanelOpen: x,
1178
1180
  setViewMode: E,
1179
- setDiffViewMode: b,
1180
- setSearchQuery: v,
1181
- setSelectedPath: w,
1181
+ setDiffViewMode: p,
1182
+ setSearchQuery: P,
1183
+ setSelectedPath: b,
1182
1184
  setExpandedFolderIds: I,
1183
1185
  toggleFolder: L,
1184
1186
  expandAll: M,
1185
1187
  collapseAll: z
1186
- } = il();
1187
- let T, _, A, k, R, $, N, B, V, j, W, U, H, ie, De, Y;
1188
- if (e[1] !== o || e[2] !== c || e[3] !== t || e[4] !== P || e[5] !== f || e[6] !== C || e[7] !== y || e[8] !== h) {
1189
- const K = t.map(le);
1190
- k = o ?? K;
1191
- const Q = C.trim().toLowerCase();
1192
- V = Q ? k.filter((xe) => xe.toLowerCase().includes(Q)) : k, N = bl({
1188
+ } = so();
1189
+ let T, _, A, R, k, $, N, B, V, j, G, q, H, ie, De, Y;
1190
+ if (e[1] !== l || e[2] !== c || e[3] !== t || e[4] !== v || e[5] !== f || e[6] !== C || e[7] !== y || e[8] !== h) {
1191
+ const K = t.map(oe);
1192
+ R = l ?? K;
1193
+ const U = C.trim().toLowerCase();
1194
+ V = U ? R.filter((xe) => xe.toLowerCase().includes(U)) : R, N = xo({
1193
1195
  diffs: t,
1194
- normalizedSearchQuery: Q,
1196
+ normalizedSearchQuery: U,
1195
1197
  viewMode: h
1196
1198
  });
1197
1199
  let te;
1198
- e[25] !== t ? (te = ml(t), e[25] = t, e[26] = te) : te = e[26], _ = te, $ = N.map(le);
1200
+ e[25] !== t ? (te = bo(t), e[25] = t, e[26] = te) : te = e[26], _ = te, $ = N.map(oe);
1199
1201
  const je = ze(V, h);
1200
- j = h === "nested" ? tt(je) : [], B = V.join("\0"), R = $.join("\0"), H = y ?? c ?? nt($, V), W = N.length > 0, A = Q ? "No matching changes" : "No changes", ie = !f && !W, Y = gl(N), U = j.length > 0 || N.length > 0;
1201
- let me;
1202
- e[27] !== P ? (me = (xe) => P.has(xe), e[27] = P, e[28] = me) : me = e[28], T = j.every(me);
1202
+ j = h === "nested" ? tt(je) : [], B = V.join("\0"), k = $.join("\0"), H = y ?? c ?? nt($, V), G = N.length > 0, A = U ? "No matching changes" : "No changes", ie = !f && !G, Y = So(N), q = j.length > 0 || N.length > 0;
1203
+ let pe;
1204
+ e[27] !== v ? (pe = (xe) => v.has(xe), e[27] = v, e[28] = pe) : pe = e[28], T = j.every(pe);
1203
1205
  let Fe;
1204
- e[29] !== P ? (Fe = (xe) => !P.has(xe), e[29] = P, e[30] = Fe) : Fe = e[30], De = j.every(Fe), e[1] = o, e[2] = c, e[3] = t, e[4] = P, e[5] = f, e[6] = C, e[7] = y, e[8] = h, e[9] = T, e[10] = _, e[11] = A, e[12] = k, e[13] = R, e[14] = $, e[15] = N, e[16] = B, e[17] = V, e[18] = j, e[19] = W, e[20] = U, e[21] = H, e[22] = ie, e[23] = De, e[24] = Y;
1206
+ e[29] !== v ? (Fe = (xe) => !v.has(xe), e[29] = v, e[30] = Fe) : Fe = e[30], De = j.every(Fe), e[1] = l, e[2] = c, e[3] = t, e[4] = v, e[5] = f, e[6] = C, e[7] = y, e[8] = h, e[9] = T, e[10] = _, e[11] = A, e[12] = R, e[13] = k, e[14] = $, e[15] = N, e[16] = B, e[17] = V, e[18] = j, e[19] = G, e[20] = q, e[21] = H, e[22] = ie, e[23] = De, e[24] = Y;
1205
1207
  } else
1206
- T = e[9], _ = e[10], A = e[11], k = e[12], R = e[13], $ = e[14], N = e[15], B = e[16], V = e[17], j = e[18], W = e[19], U = e[20], H = e[21], ie = e[22], De = e[23], Y = e[24];
1207
- const yt = De, Pt = N.length === 0 || p.allExpanded, vt = N.length === 0 || p.allCollapsed, ke = !U || T && Pt, Re = !U || yt && vt;
1208
+ T = e[9], _ = e[10], A = e[11], R = e[12], k = e[13], $ = e[14], N = e[15], B = e[16], V = e[17], j = e[18], G = e[19], q = e[20], H = e[21], ie = e[22], De = e[23], Y = e[24];
1209
+ const yt = De, Pt = N.length === 0 || g.allExpanded, vt = N.length === 0 || g.allCollapsed, Re = !q || T && Pt, ke = !q || yt && vt;
1208
1210
  let Ce, ye;
1209
1211
  e[31] !== B || e[32] !== I || e[33] !== h ? (Ce = () => {
1210
- const K = B ? B.split("\0") : [], Q = ze(K, h);
1211
- I(h === "nested" ? tt(Q) : []);
1212
- }, ye = [B, I, h], e[31] = B, e[32] = I, e[33] = h, e[34] = Ce, e[35] = ye) : (Ce = e[34], ye = e[35]), oe(Ce, ye);
1212
+ const K = B ? B.split("\0") : [], U = ze(K, h);
1213
+ I(h === "nested" ? tt(U) : []);
1214
+ }, ye = [B, I, h], e[31] = B, e[32] = I, e[33] = h, e[34] = Ce, e[35] = ye) : (Ce = e[34], ye = e[35]), le(Ce, ye);
1213
1215
  let Pe, ve;
1214
- e[36] !== R || e[37] !== B || e[38] !== H || e[39] !== w ? (Pe = () => {
1215
- const K = R ? R.split("\0") : [], Q = B ? B.split("\0") : [];
1216
- H && K.includes(H) || w(nt(K, Q));
1217
- }, ve = [R, B, H, w], e[36] = R, e[37] = B, e[38] = H, e[39] = w, e[40] = Pe, e[41] = ve) : (Pe = e[40], ve = e[41]), oe(Pe, ve);
1216
+ e[36] !== k || e[37] !== B || e[38] !== H || e[39] !== b ? (Pe = () => {
1217
+ const K = k ? k.split("\0") : [], U = B ? B.split("\0") : [];
1218
+ H && K.includes(H) || b(nt(K, U));
1219
+ }, ve = [k, B, H, b], e[36] = k, e[37] = B, e[38] = H, e[39] = b, e[40] = Pe, e[41] = ve) : (Pe = e[40], ve = e[41]), le(Pe, ve);
1218
1220
  let Ee;
1219
1221
  e[42] !== M || e[43] !== j ? (Ee = () => {
1220
- M(j), u(Dl);
1222
+ M(j), u(yo);
1221
1223
  }, e[42] = M, e[43] = j, e[44] = Ee) : Ee = e[44];
1222
1224
  const Be = Ee;
1223
1225
  let Ie;
1224
1226
  e[45] !== z ? (Ie = () => {
1225
- z(), u(Cl);
1227
+ z(), u(Po);
1226
1228
  }, e[45] = z, e[46] = Ie) : Ie = e[46];
1227
1229
  const Ne = Ie;
1228
1230
  let Le;
1229
- e[47] !== $ || e[48] !== H || e[49] !== w ? (Le = (K) => {
1230
- const Q = H ? $.indexOf(H) : -1, te = $.indexOf(K), je = Q >= 0 && te >= 0 && te < Q ? "up" : "down";
1231
- w(K), u((me) => ({
1231
+ e[47] !== $ || e[48] !== H || e[49] !== b ? (Le = (K) => {
1232
+ const U = H ? $.indexOf(H) : -1, te = $.indexOf(K), je = U >= 0 && te >= 0 && te < U ? "up" : "down";
1233
+ b(K), u((pe) => ({
1232
1234
  action: "expand-selected",
1233
1235
  direction: je,
1234
- id: (me?.id ?? 0) + 1,
1236
+ id: (pe?.id ?? 0) + 1,
1235
1237
  path: K
1236
1238
  }));
1237
- }, e[47] = $, e[48] = H, e[49] = w, e[50] = Le) : Le = e[50];
1238
- const He = Le, Oe = k.length > 0;
1239
+ }, e[47] = $, e[48] = H, e[49] = b, e[50] = Le) : Le = e[50];
1240
+ const He = Le, Oe = R.length > 0;
1239
1241
  let se;
1240
- e[51] !== g || e[52] !== x ? (se = () => x(!g), e[51] = g, e[52] = x, e[53] = se) : se = e[53];
1242
+ e[51] !== S || e[52] !== x ? (se = () => x(!S), e[51] = S, e[52] = x, e[53] = se) : se = e[53];
1241
1243
  let re;
1242
- e[54] !== Ne || e[55] !== S || e[56] !== Be || e[57] !== Re || e[58] !== ke || e[59] !== g || e[60] !== b || e[61] !== E || e[62] !== Oe || e[63] !== se || e[64] !== h ? (re = /* @__PURE__ */ r(rl, { isTreePanelOpen: g, hasFilePaths: Oe, viewMode: h, diffViewMode: S, isExpandAllDisabled: ke, isCollapseAllDisabled: Re, onToggleTreePanel: se, onViewModeChange: E, onDiffViewModeChange: b, onExpandAll: Be, onCollapseAll: Ne }), e[54] = Ne, e[55] = S, e[56] = Be, e[57] = Re, e[58] = ke, e[59] = g, e[60] = b, e[61] = E, e[62] = Oe, e[63] = se, e[64] = h, e[65] = re) : re = e[65];
1244
+ e[54] !== Ne || e[55] !== w || e[56] !== Be || e[57] !== ke || e[58] !== Re || e[59] !== S || e[60] !== p || e[61] !== E || e[62] !== Oe || e[63] !== se || e[64] !== h ? (re = /* @__PURE__ */ r(ao, { isTreePanelOpen: S, hasFilePaths: Oe, viewMode: h, diffViewMode: w, isExpandAllDisabled: Re, isCollapseAllDisabled: ke, onToggleTreePanel: se, onViewModeChange: E, onDiffViewModeChange: p, onExpandAll: Be, onCollapseAll: Ne }), e[54] = Ne, e[55] = w, e[56] = Be, e[57] = ke, e[58] = Re, e[59] = S, e[60] = p, e[61] = E, e[62] = Oe, e[63] = se, e[64] = h, e[65] = re) : re = e[65];
1243
1245
  let ae;
1244
- e[66] !== A || e[67] !== ie ? (ae = ie ? /* @__PURE__ */ r(q, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: A }) : null, e[66] = A, e[67] = ie, e[68] = ae) : ae = e[68];
1246
+ e[66] !== A || e[67] !== ie ? (ae = ie ? /* @__PURE__ */ r(Q, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: A }) : null, e[66] = A, e[67] = ie, e[68] = ae) : ae = e[68];
1245
1247
  let de;
1246
- e[69] !== re || e[70] !== ae ? (de = /* @__PURE__ */ G(Rt, { gap: "xs", minW: "0", children: [
1248
+ e[69] !== re || e[70] !== ae ? (de = /* @__PURE__ */ W(Bt, { gap: "xs", minW: "0", children: [
1247
1249
  re,
1248
1250
  ae
1249
1251
  ] }), e[69] = re, e[70] = ae, e[71] = de) : de = e[71];
1250
1252
  let ce;
1251
1253
  e[72] !== Y.additions || e[73] !== Y.deletions ? (ce = /* @__PURE__ */ r(st, { variant: "ghost", size: "small", additions: Y.additions, deletions: Y.deletions }), e[72] = Y.additions, e[73] = Y.deletions, e[74] = ce) : ce = e[74];
1252
1254
  let fe;
1253
- e[75] !== de || e[76] !== ce ? (fe = /* @__PURE__ */ G(ct, { variant: "main", borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", justifyContent: "space-between", children: [
1255
+ e[75] !== de || e[76] !== ce ? (fe = /* @__PURE__ */ W(ct, { variant: "main", borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", justifyContent: "space-between", children: [
1254
1256
  de,
1255
1257
  ce
1256
1258
  ] }), e[75] = de, e[76] = ce, e[77] = fe) : fe = e[77];
1257
1259
  let he;
1258
- e[78] !== m || e[79] !== S || e[80] !== A || e[81] !== N || e[82] !== W || e[83] !== f || e[84] !== i || e[85] !== H || e[86] !== w ? (he = f ? /* @__PURE__ */ r(xl, {}) : W ? /* @__PURE__ */ r(O, { flex: "1", minH: "0", children: /* @__PURE__ */ r(el, { diffs: N, selectedDiffPath: H, onLoadDiff: i, onSelectDiffPath: w, onExpansionStateChange: D, expansionCommand: m, diffViewMode: S }) }) : /* @__PURE__ */ r(O, { flex: "1", minH: "0", px: "md", py: "lg", display: "flex", alignItems: "center", justifyContent: "center", bg: "bg", children: /* @__PURE__ */ r(Se, { title: A }) }), e[78] = m, e[79] = S, e[80] = A, e[81] = N, e[82] = W, e[83] = f, e[84] = i, e[85] = H, e[86] = w, e[87] = he) : he = e[87];
1260
+ e[78] !== m || e[79] !== w || e[80] !== A || e[81] !== N || e[82] !== G || e[83] !== f || e[84] !== i || e[85] !== H || e[86] !== b ? (he = f ? /* @__PURE__ */ r(Do, {}) : G ? /* @__PURE__ */ r(O, { flex: "1", minH: "0", children: /* @__PURE__ */ r(to, { diffs: N, selectedDiffPath: H, onLoadDiff: i, onSelectDiffPath: b, onExpansionStateChange: D, expansionCommand: m, diffViewMode: w }) }) : /* @__PURE__ */ r(O, { flex: "1", minH: "0", px: "md", py: "lg", display: "flex", alignItems: "center", justifyContent: "center", bg: "bg", children: /* @__PURE__ */ r(Se, { title: A }) }), e[78] = m, e[79] = w, e[80] = A, e[81] = N, e[82] = G, e[83] = f, e[84] = i, e[85] = H, e[86] = b, e[87] = he) : he = e[87];
1259
1261
  let _e;
1260
- e[88] !== fe || e[89] !== he ? (_e = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", flex: "1", bg: "bg", gap: "0", children: [
1262
+ e[88] !== fe || e[89] !== he ? (_e = /* @__PURE__ */ W(be, { h: "full", minH: "0", minW: "0", flex: "1", bg: "bg", gap: "0", children: [
1261
1263
  fe,
1262
1264
  he
1263
1265
  ] }), e[88] = fe, e[89] = he, e[90] = _e) : _e = e[90];
1264
1266
  const $e = _e;
1265
1267
  let ue;
1266
- e[91] !== _ || e[92] !== P || e[93] !== V || e[94] !== a || e[95] !== H || e[96] !== C || e[97] !== He || e[98] !== v || e[99] !== L || e[100] !== h ? (ue = /* @__PURE__ */ r(pl, { paths: V, selectedPath: H, viewMode: h, searchQuery: C, expandedFolderIds: P, onSelectPath: He, onSearchQueryChange: v, onToggleFolder: L, resolveFileIcon: a, changeByPath: _ }), e[91] = _, e[92] = P, e[93] = V, e[94] = a, e[95] = H, e[96] = C, e[97] = He, e[98] = v, e[99] = L, e[100] = h, e[101] = ue) : ue = e[101];
1267
- const Ve = !g;
1268
- let pe;
1269
- e[102] !== x ? (pe = (K) => x(!K), e[102] = x, e[103] = pe) : pe = e[103];
1268
+ e[91] !== _ || e[92] !== v || e[93] !== V || e[94] !== a || e[95] !== H || e[96] !== C || e[97] !== He || e[98] !== P || e[99] !== L || e[100] !== h ? (ue = /* @__PURE__ */ r(go, { paths: V, selectedPath: H, viewMode: h, searchQuery: C, expandedFolderIds: v, onSelectPath: He, onSearchQueryChange: P, onToggleFolder: L, resolveFileIcon: a, changeByPath: _ }), e[91] = _, e[92] = v, e[93] = V, e[94] = a, e[95] = H, e[96] = C, e[97] = He, e[98] = P, e[99] = L, e[100] = h, e[101] = ue) : ue = e[101];
1269
+ const Ve = !S;
1270
+ let me;
1271
+ e[102] !== x ? (me = (K) => x(!K), e[102] = x, e[103] = me) : me = e[103];
1270
1272
  let Te;
1271
- return e[104] !== $e || e[105] !== ue || e[106] !== Ve || e[107] !== pe ? (Te = /* @__PURE__ */ r(Bt, { flex: "1", minH: "0", minW: "0", bg: "bg", gap: "0", "data-testid": "diff-viewer", children: /* @__PURE__ */ r(nn, { flex: "1", minH: "0", minW: "0", resizablePanel: ue, contentPanel: $e, collapsed: Ve, defaultSizePx: 288, minSizePx: 224, contentMinSizePx: 320, resizeLabel: "Resize file list panel", separator: "line", onCollapsedChange: pe }) }), e[104] = $e, e[105] = ue, e[106] = Ve, e[107] = pe, e[108] = Te) : Te = e[108], Te;
1273
+ return e[104] !== $e || e[105] !== ue || e[106] !== Ve || e[107] !== me ? (Te = /* @__PURE__ */ r(Nt, { flex: "1", minH: "0", minW: "0", bg: "bg", gap: "0", "data-testid": "diff-viewer", children: /* @__PURE__ */ r(on, { flex: "1", minH: "0", minW: "0", resizablePanel: ue, contentPanel: $e, collapsed: Ve, defaultSizePx: 288, minSizePx: 224, contentMinSizePx: 320, resizeLabel: "Resize file list panel", separator: "line", onCollapsedChange: me }) }), e[104] = $e, e[105] = ue, e[106] = Ve, e[107] = me, e[108] = Te) : Te = e[108], Te;
1272
1274
  };
1273
- function wl(n) {
1275
+ function Co(n) {
1274
1276
  return /* @__PURE__ */ r(at, { h: "72px", w: "full", flexShrink: "0", borderRadius: "xs" }, n);
1275
1277
  }
1276
- function Dl(n) {
1278
+ function yo(n) {
1277
1279
  return {
1278
1280
  action: "expand",
1279
1281
  id: (n?.id ?? 0) + 1
1280
1282
  };
1281
1283
  }
1282
- function Cl(n) {
1284
+ function Po(n) {
1283
1285
  return {
1284
1286
  action: "collapse",
1285
1287
  id: (n?.id ?? 0) + 1
1286
1288
  };
1287
1289
  }
1288
1290
  export {
1289
- Nl as CodeDiffEditor,
1290
- Bl as CodeEditor,
1291
+ Oo as CodeDiffEditor,
1292
+ Ho as CodeEditor,
1291
1293
  st as DiffBubble,
1292
- el as DiffDrawer,
1293
- Hl as DiffViewer,
1294
- fl as FileChangeBadge,
1294
+ to as DiffDrawer,
1295
+ $o as DiffViewer,
1296
+ uo as FileChangeBadge,
1295
1297
  pn as LARGE_DIFF_LINE_THRESHOLD,
1296
- Ue as isBinaryDiffPath,
1297
- bn as isGeneratedDiffPath,
1298
+ qe as isBinaryDiffPath,
1299
+ Sn as isGeneratedDiffPath,
1298
1300
  ft as preloadCodeEditor,
1299
- il as useDiffViewerStore
1301
+ so as useDiffViewerStore
1300
1302
  };
1301
1303
  //# sourceMappingURL=diff.js.map