@pstdio/ui 0.19.0 → 0.20.1

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