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