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