@hanzo/dev 4.2.0 → 4.2.2

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 (115) hide show
  1. package/dist/{BinaryViewer-CmFUK4zZ.js → BinaryViewer-CeQaKnXQ.js} +19 -19
  2. package/dist/{ChatMarkdown-nvEI7iCv.js → ChatMarkdown-DqKVAYd6.js} +2460 -2460
  3. package/dist/{DevicePanel-v5e3sEIf.js → DevicePanel-D-pksK3r.js} +532 -532
  4. package/dist/{DeviceStreamView-CCIfmbxH.js → DeviceStreamView-DsCoOzDV.js} +377 -377
  5. package/dist/{DiffCommentAnnotation-BPTN_2a6.js → DiffCommentAnnotation-CCtanhmq.js} +227 -227
  6. package/dist/{DiffFileTree-B_br90vY.js → DiffFileTree-BhEDIwzm.js} +13 -13
  7. package/dist/{DiffPanel-V5R5TPuK.js → DiffPanel-BPZ6Ru_G.js} +328 -328
  8. package/dist/{DiffWorkerPoolProvider-BwFR-Fc9.js → DiffWorkerPoolProvider-8Qh-Y5iP.js} +3 -3
  9. package/dist/{DocumentPages-VSn83vty.js → DocumentPages-MN1xyIRb.js} +3 -3
  10. package/dist/{ExpandedImageDialog-CAorLacL.js → ExpandedImageDialog-tCY2TFXU.js} +404 -404
  11. package/dist/{FileExplorerPane-CeHulcPz.js → FileExplorerPane-BgJw-BA4.js} +4 -4
  12. package/dist/{FilePreviewPanel-BVNLvWOc.js → FilePreviewPanel-DHteid8j.js} +1089 -1089
  13. package/dist/{FontFilePreview-Dj8Blcay.js → FontFilePreview-COxgoDy5.js} +2 -2
  14. package/dist/{FontViewer-CLDdwhSr.js → FontViewer-jxARaj1f.js} +5 -5
  15. package/dist/{HanzoConnectAccountPages-BEzYfu2l.js → HanzoConnectAccountPages-BM2mB27b.js} +357 -357
  16. package/dist/{HanzoConnectSidebarSignIn-BhD6-Up5.js → HanzoConnectSidebarSignIn-BSOkKAjH.js} +3 -3
  17. package/dist/{Icons-CvSmt8vD.js → Icons-CdegMw5l.js} +1 -1
  18. package/dist/{LargeTextViewer-DfFnYGCw.js → LargeTextViewer-BX5-yWcy.js} +8 -8
  19. package/dist/{MermaidDiagram-CTolIzQD.js → MermaidDiagram-sVLnox7j.js} +8 -8
  20. package/dist/{MermaidFilePreview-CP2zP4FU.js → MermaidFilePreview-BqB2exZU.js} +2 -2
  21. package/dist/{MermaidViewer-BDfYkS9E.js → MermaidViewer-B0WYx1jk.js} +3 -3
  22. package/dist/{NotebookPreview-Cybs5uM0.js → NotebookPreview-B_7pSd7A.js} +10 -10
  23. package/dist/{OfficeFilePreview-7JsmSoKU.js → OfficeFilePreview-BJsNoaju.js} +2 -2
  24. package/dist/{OfficeViewer-CJoojlJK.js → OfficeViewer-TgdFnOtV.js} +10 -10
  25. package/dist/{OpenInPicker-BIMWUxBP.js → OpenInPicker-B3gPcFs6.js} +287 -287
  26. package/dist/{OpenXmlOfficeViewer-C24Kj8DM.js → OpenXmlOfficeViewer-C18a0NFP.js} +4 -4
  27. package/dist/{PdfViewer-Cf1iD759.js → PdfViewer-BanXvPmz.js} +16 -16
  28. package/dist/{PreviewFaviconIcon-zFOuzIxe.js → PreviewFaviconIcon-Dzjf4QXZ.js} +892 -892
  29. package/dist/{PreviewImage-oY5YnuTr.js → PreviewImage-Ct8eWJb8.js} +3 -3
  30. package/dist/{PreviewImageContent-n6eLzY99.js → PreviewImageContent-Dd8dzt9u.js} +3 -3
  31. package/dist/{PreviewPanel-Bo4Lt02m.js → PreviewPanel-BnsoHObW.js} +489 -489
  32. package/dist/{PreviewPanelShell-DhXLeN5j.js → PreviewPanelShell-Dezxjg0T.js} +71 -71
  33. package/dist/{ProjectIconPickerDialog-D0kFzt8f.js → ProjectIconPickerDialog-LomrzROv.js} +29 -29
  34. package/dist/{ProjectMonogram-D35xrrXQ.js → ProjectMonogram-D21--FQY.js} +1 -1
  35. package/dist/{ProviderAuthTerminal-DfsXnu7A.js → ProviderAuthTerminal-CYalqlUB.js} +3 -3
  36. package/dist/{PullRequestCodeTab-Dv_0kVad.js → PullRequestCodeTab-Jt9jdq55.js} +476 -476
  37. package/dist/{PullRequestReviewAnnotation-LeuwO-iH.js → PullRequestReviewAnnotation-xg3n0doV.js} +334 -334
  38. package/dist/{ReadOnlySourcePreview-D__IA5g1.js → ReadOnlySourcePreview-BYlRPbKI.js} +5 -5
  39. package/dist/{RelativeTime-BMRprQS8.js → RelativeTime-DQhoNsWZ.js} +2 -2
  40. package/dist/{RightPanelResizeHandle-BLbSz-gk.js → RightPanelResizeHandle-PumvYb9P.js} +2 -2
  41. package/dist/{ThemeEditorPanel-CUDdsRsE.js → ThemeEditorPanel-BmXXpaCI.js} +196 -196
  42. package/dist/{ThreadTerminalDrawer-BF3Ix0q_.js → ThreadTerminalDrawer-Cf4l2axO.js} +461 -461
  43. package/dist/{VirtualTablePreview-dajviAfu.js → VirtualTablePreview-mA6DOFwb.js} +1 -1
  44. package/dist/{anchoredCopyToast-DnUtg1n_.js → anchoredCopyToast-BVa_dlBU.js} +2 -2
  45. package/dist/{assetUrls-DkY7vXfM.js → assetUrls-D8lRk7Xd.js} +45 -45
  46. package/dist/{browserLinkTarget-CA46wnQC.js → browserLinkTarget-CCzAioAu.js} +18 -18
  47. package/dist/builder/api/models.d.ts +2 -0
  48. package/dist/builder/api/models.js +6 -1
  49. package/dist/builder/api/sandbox.d.ts +2 -0
  50. package/dist/builder/api/sandbox.js +3 -1
  51. package/dist/builder/desk.d.ts +6 -0
  52. package/dist/builder/desk.js +79 -14
  53. package/dist/builder/mind.d.ts +5 -5
  54. package/dist/builder/mind.js +35 -14
  55. package/dist/builder/pane.d.ts +1 -1
  56. package/dist/builder/pane.js +1 -1
  57. package/dist/builder/panel.js +5 -5
  58. package/dist/builder/preview-fallback.d.ts +47 -0
  59. package/dist/builder/preview-fallback.js +341 -0
  60. package/dist/{changedFileKind-D6QYvIez.js → changedFileKind-OIp-fuQd.js} +5 -5
  61. package/dist/{collapsible-DFT41MdC.js → collapsible-CDT6JKbk.js} +1 -1
  62. package/dist/{color-picker-CshqBbpY.js → color-picker-kSVcH92L.js} +16 -16
  63. package/dist/core.d.ts +38 -0
  64. package/dist/core.js +1 -1
  65. package/dist/{decodeImagePreview-DnfFEjhw.js → decodeImagePreview-DbkSuh7q.js} +2 -2
  66. package/dist/{delimitedPreview-BiEpdYOj.js → delimitedPreview-DbbXcqOT.js} +1 -1
  67. package/dist/{dialog-DhQtWGRa.js → dialog-EmpqFZiK.js} +40 -40
  68. package/dist/{embed-c030vUqM.js → embed-CzXFS50X.js} +39626 -38922
  69. package/dist/{empty-Bm5EzcG8.js → empty-ChM6gdzn.js} +1 -1
  70. package/dist/{errors-DrFQSJW3.js → errors-D8_Zn8KN.js} +2 -2
  71. package/dist/{fileContextMenu-BBo91omq.js → fileContextMenu-hdALQktP.js} +54 -54
  72. package/dist/{fileExplorerLabel-AikEChiS.js → fileExplorerLabel-DMdkA7jY.js} +507 -507
  73. package/dist/{fileSurfaceChrome-Cqkvn8RQ.js → fileSurfaceChrome-BDyKklTq.js} +26 -26
  74. package/dist/{hanzoWebAnalytics-CCxpTzcI.js → hanzoWebAnalytics-B1eETW-7.js} +1 -1
  75. package/dist/index.css +1 -1
  76. package/dist/{input-group-DEJEuwc9.js → input-group-BZ_QN-y7.js} +1 -1
  77. package/dist/{keybindings-C5tK_GAk.js → keybindings-D0pBlT1k.js} +7812 -7806
  78. package/dist/keymap.js +1 -1
  79. package/dist/{lucideIconByName-DUaXKH0V.js → lucideIconByName-CXY44V8P.js} +6835 -6848
  80. package/dist/{mediaReference-Bt_mh-ag.js → mediaReference-3wc4ZfY8.js} +95 -95
  81. package/dist/mediaSource-jW5c7b4r.js +70 -0
  82. package/dist/{modelPickerVisibility-Jue3CLfc.js → modelPickerVisibility-DBTc5r1G.js} +1 -1
  83. package/dist/{network-BbwqRm8c.js → network-wuXD7-is.js} +1 -1
  84. package/dist/{popover-anNQdce7.js → popover-BAyP2Tdr.js} +1 -1
  85. package/dist/{presentation-D9mVPBHm.js → presentation-68y8EAuH.js} +299 -299
  86. package/dist/{previewFailureMessages-BKpsSGX5.js → previewFailureMessages-CFguipaK.js} +3 -3
  87. package/dist/query-BPk2W3QN.js +63 -0
  88. package/dist/{readBinaryPreview-BAQ4fFjm.js → readBinaryPreview-DgDAUfzQ.js} +2 -2
  89. package/dist/{refresh-icon-BYx64to1.js → refresh-icon-Vo5ImiQL.js} +1 -1
  90. package/dist/{scroll-area-ChvX8uOh.js → scroll-area-CEoyjC7h.js} +1 -1
  91. package/dist/{select-DumYjny_.js → select-DLFnkZsI.js} +2 -2
  92. package/dist/{session-_kmiSv2A.js → session-Decc4Fo5.js} +1063 -1063
  93. package/dist/{skeleton-CJqwfMSF.js → skeleton-BOKpAZv6.js} +1 -1
  94. package/dist/{switch-COwevwaq.js → switch-DjpPjtQN.js} +2 -2
  95. package/dist/{themePalette-Dl_7omVL.js → themePalette-C-GtwwqV.js} +977 -977
  96. package/dist/{threadSearch-BHyWwcV3.js → threadSearch-sHEENLiT.js} +162 -162
  97. package/dist/{toggle-CEO6qTxB.js → toggle-B4F0EEtI.js} +1 -1
  98. package/dist/{toggle-group-BHovdMDl.js → toggle-group-l8hRPswr.js} +2 -2
  99. package/dist/{use-atom-command-ByoYq_K6.js → use-atom-command-XemtT1Gv.js} +1 -1
  100. package/dist/{useAriaLabelledBy-DPSISlnL.js → useAriaLabelledBy-CibvSz-b.js} +1 -1
  101. package/dist/{useFileMetadata-e7zsixVX.js → useFileMetadata-ChvPTfBY.js} +33 -33
  102. package/dist/{useFloatingRootContext-CJ9stHca.js → useFloatingRootContext-ppoGvqar.js} +1 -1
  103. package/dist/{useLiveRefresh-BkKJKXhH.js → useLiveRefresh-aHkPuz6N.js} +172 -172
  104. package/dist/{useNextRenderData-CyUmSAgz.js → useNextRenderData-Jm142a1q.js} +1 -1
  105. package/dist/{useSettings-DYG9Dmro.js → useSettings-Due4XCTB.js} +139 -139
  106. package/dist/{useTextFieldSpeech-COa9XcRx.js → useTextFieldSpeech-XN9r-f-r.js} +1404 -1404
  107. package/dist/useTheme-B9hvAuzL.js +411 -0
  108. package/dist/{utils-515nQ17G.js → utils-DtKQl-D3.js} +6184 -6172
  109. package/dist/{wizard-i86ViMRc.js → wizard-DjD4UNew.js} +3 -3
  110. package/dist/{workspaceFocus-BV1_9KiH.js → workspaceFocus-MR1plm6A.js} +144 -144
  111. package/dist/{zap-e0OsRjBR.js → zap-iwsUKtvA.js} +30 -17
  112. package/package.json +17 -17
  113. package/dist/mediaSource-zI7JWid4.js +0 -70
  114. package/dist/query-BxrrBAp6.js +0 -63
  115. package/dist/useTheme-D2ZM1gvV.js +0 -376
@@ -1,64 +1,64 @@
1
1
  import { i as e } from "./rolldown-runtime-CwxnZyOB.js";
2
- import { c as t, i as n, o as r, t as i } from "./session-_kmiSv2A.js";
2
+ import { c as t, i as n, o as r, t as i } from "./session-Decc4Fo5.js";
3
3
  import { c as a, n as o } from "./messages-yqmY7G5x.js";
4
- import { Ar as s, B as c, Br as l, F as u, Fc as d, Fr as f, Gh as p, Gr as m, Id as h, Ir as g, Kr as _, Lr as v, Mr as y, Nd as b, Or as x, Pc as S, S_ as C, Tf as w, Vh as T, Wd as E, Wh as D, Zh as O, ac as k, b_ as A, bf as ee, bg as j, cc as M, ci as N, gr as P, hf as F, hr as te, mf as ne, nc as re, t as I, uc as ie, wf as ae, x_ as oe, y_ as L, yr as R } from "./utils-515nQ17G.js";
5
- import { Co as se, G as ce, Rg as le, _o as ue, ad as z } from "./keybindings-C5tK_GAk.js";
6
- import { $t as de, Y as fe, Yt as pe, bt as me } from "./themePalette-Dl_7omVL.js";
7
- import { t as he, x as ge } from "./mediaReference-Bt_mh-ag.js";
8
- import { u as _e } from "./network-BbwqRm8c.js";
9
- import { On as ve, an as ye, tt as be } from "./threadSearch-BHyWwcV3.js";
10
- import { a as xe, i as Se } from "./search-3oqTSaO6.js";
11
- import { n as Ce } from "./external-link-BJbZG79p.js";
12
- import { i as we, n as Te, r as Ee } from "./message-circle-D3IVrLlW.js";
13
- import { r as De } from "./triangle-alert-CpJvcOXh.js";
14
- import { i as Oe } from "./user-round-DXjpOTSK.js";
15
- import { a as ke, i as Ae, o as je, t as Me } from "./table-2-CTB_FJbA.js";
16
- import { r as B } from "./text-align-start-DgfaKVRZ.js";
17
- import { St as Ne, gt as Pe, q as V, t as Fe, v as Ie } from "./ChatMarkdown-nvEI7iCv.js";
18
- import "./errors-DrFQSJW3.js";
19
- import { M as Le, p as Re, z as ze } from "./useSettings-DYG9Dmro.js";
20
- import { C as Be, S as Ve, T as He, b as Ue, s as We } from "./presentation-D9mVPBHm.js";
21
- import { t as Ge } from "./useStableCallback-kf0xbSaG.js";
22
- import { t as Ke } from "./toastHelpers-BzWu4Odu.js";
23
- import { t as qe } from "./use-atom-command-ByoYq_K6.js";
24
- import { p as Je } from "./useTheme-D2ZM1gvV.js";
25
- import { i as Ye, n as Xe, o as Ze, t as Qe } from "./assetUrls-DkY7vXfM.js";
26
- import { o as $e } from "./workspaceFocus-BV1_9KiH.js";
27
- import { B as et, Fn as tt, Ln as nt } from "./fileExplorerLabel-AikEChiS.js";
28
- import { j as rt, l as it, s as H } from "./ExpandedImageDialog-CAorLacL.js";
29
- import { F as at, G as ot, H as st, I as ct, L as U, R as lt, U as ut, _ as dt, c as ft, g as pt, m as mt, s as ht, t as gt, u as _t, x as vt, y as yt, z as bt } from "./OpenInPicker-BIMWUxBP.js";
30
- import { t as xt } from "./scroll-area-ChvX8uOh.js";
31
- import { i as St } from "./useTextFieldSpeech-COa9XcRx.js";
32
- import { $ as Ct, A as W, B as wt, C as Tt, D as Et, E as G, F as Dt, G as Ot, H as kt, I as At, J as jt, K as Mt, L as Nt, M as Pt, N as Ft, O as It, P as K, R as Lt, S as Rt, T as zt, U as Bt, V as Vt, W as Ht, X as Ut, Z as Wt, _ as Gt, at as Kt, b as qt, c as Jt, d as Yt, f as Xt, g as Zt, h as Qt, j as $t, k as en, l as tn, m as nn, o as rn, p as an, q as on, s as sn, t as cn, u as ln, v as un, w as dn, x as fn, y as pn, z as q } from "./DiffCommentAnnotation-BPTN_2a6.js";
33
- import { i as mn, t as hn } from "./fileContextMenu-BBo91omq.js";
34
- import { t as gn } from "./refresh-icon-BYx64to1.js";
35
- import { a as _n, r as vn, t as yn } from "./input-group-DEJEuwc9.js";
36
- import { a as bn, c as xn, d as Sn, i as Cn, l as wn, n as Tn, r as En, s as Dn, t as On, u as kn } from "./FileExplorerPane-CeHulcPz.js";
37
- import { A as An, Gt as jn, N as Mn, P as Nn, Pt as Pn, Q as Fn, St as In, _n as Ln, a as Rn, an as zn, cn as Bn, dn as Vn, fn as Hn, gn as Un, hn as Wn, i as Gn, j as Kn, mn as qn, pn as Jn, sn as Yn, t as Xn, u as Zn, vn as Qn, yn as $n, zt as er } from "./DiffWorkerPoolProvider-BwFR-Fc9.js";
38
- import { A as tr, c as nr, j as rr } from "./diffRendering-tvIuzFsP.js";
39
- import { t as ir } from "./syntaxHighlighting-CqVs1cUM.js";
40
- import { r as ar } from "./getFiletypeFromFileName-DLahV2Rk.js";
41
- import { c as or, d as sr, l as cr, n as lr, o as ur, s as dr, t as J, u as fr } from "./utils-7X1WogxY.js";
42
- import { i as pr } from "./useNextRenderData-CyUmSAgz.js";
43
- import { c as mr, l as hr, r as gr, s as _r, t as vr } from "./PreviewImage-oY5YnuTr.js";
44
- import { t as yr } from "./delimitedPreview-BiEpdYOj.js";
45
- import { a as br, i as xr, n as Sr, o as Cr, r as wr, t as Tr } from "./fileSurfaceChrome-Cqkvn8RQ.js";
46
- import { r as Er, t as Dr } from "./ReadOnlySourcePreview-D__IA5g1.js";
4
+ import { Ar as s, B as c, Br as l, C_ as u, Ef as d, F as f, Fc as p, Fr as m, Gd as h, Gh as g, Gr as _, Hh as v, Ir as y, Kh as b, Kr as x, Ld as S, Lr as C, Mr as w, Or as T, Pc as E, Pd as D, Qh as O, S_ as ee, Tf as k, ac as A, b_ as j, cc as M, ci as N, gf as te, gr as P, hf as F, hr as ne, nc as re, t as ie, uc as ae, x_ as oe, xf as I, xg as se, yr as L } from "./utils-DtKQl-D3.js";
5
+ import { Co as ce, G as le, Rg as ue, _o as de, ad as R } from "./keybindings-D0pBlT1k.js";
6
+ import { $t as fe, Y as pe, Yt as me, bt as he } from "./themePalette-C-GtwwqV.js";
7
+ import { t as ge, x as _e } from "./mediaReference-3wc4ZfY8.js";
8
+ import { u as ve } from "./network-wuXD7-is.js";
9
+ import { On as ye, an as be, tt as xe } from "./threadSearch-sHEENLiT.js";
10
+ import { a as Se, i as Ce } from "./search-3oqTSaO6.js";
11
+ import { n as we } from "./external-link-BJbZG79p.js";
12
+ import { i as Te, n as Ee, r as De } from "./message-circle-D3IVrLlW.js";
13
+ import { r as Oe } from "./triangle-alert-CpJvcOXh.js";
14
+ import { i as ke } from "./user-round-DXjpOTSK.js";
15
+ import { a as Ae, i as je, o as Me, t as Ne } from "./table-2-CTB_FJbA.js";
16
+ import { r as z } from "./text-align-start-DgfaKVRZ.js";
17
+ import { St as Pe, gt as Fe, q as B, t as Ie, v as Le } from "./ChatMarkdown-DqKVAYd6.js";
18
+ import "./errors-D8_Zn8KN.js";
19
+ import { M as Re, p as ze, z as Be } from "./useSettings-Due4XCTB.js";
20
+ import { C as Ve, S as He, T as Ue, b as We, s as Ge } from "./presentation-68y8EAuH.js";
21
+ import { t as Ke } from "./useStableCallback-kf0xbSaG.js";
22
+ import { t as qe } from "./toastHelpers-BzWu4Odu.js";
23
+ import { t as Je } from "./use-atom-command-XemtT1Gv.js";
24
+ import { p as Ye } from "./useTheme-B9hvAuzL.js";
25
+ import { i as Xe, n as Ze, o as Qe, t as $e } from "./assetUrls-D8lRk7Xd.js";
26
+ import { o as et } from "./workspaceFocus-MR1plm6A.js";
27
+ import { B as tt, Fn as nt, Ln as rt } from "./fileExplorerLabel-DMdkA7jY.js";
28
+ import { j as it, l as at, s as V } from "./ExpandedImageDialog-tCY2TFXU.js";
29
+ import { F as ot, G as st, H as ct, I as lt, L as H, R as ut, U as dt, _ as ft, c as pt, g as mt, m as ht, s as gt, t as _t, u as vt, x as yt, y as bt, z as xt } from "./OpenInPicker-B3gPcFs6.js";
30
+ import { t as St } from "./scroll-area-CEoyjC7h.js";
31
+ import { i as Ct } from "./useTextFieldSpeech-XN9r-f-r.js";
32
+ import { $ as wt, A as U, B as Tt, C as Et, D as Dt, E as W, F as Ot, G as kt, H as At, I as jt, J as Mt, K as Nt, L as Pt, M as Ft, N as It, O as Lt, P as G, R as Rt, S as zt, T as Bt, U as Vt, V as Ht, W as Ut, X as Wt, Z as Gt, _ as Kt, at as qt, b as Jt, c as Yt, d as Xt, f as Zt, g as Qt, h as $t, j as en, k as tn, l as nn, m as rn, o as an, p as on, q as sn, s as cn, t as ln, u as un, v as dn, w as fn, x as pn, y as mn, z as K } from "./DiffCommentAnnotation-CCtanhmq.js";
33
+ import { i as hn, t as gn } from "./fileContextMenu-hdALQktP.js";
34
+ import { t as _n } from "./refresh-icon-Vo5ImiQL.js";
35
+ import { a as vn, r as yn, t as bn } from "./input-group-BZ_QN-y7.js";
36
+ import { a as xn, c as Sn, d as Cn, i as wn, l as Tn, n as En, r as Dn, s as On, t as kn, u as An } from "./FileExplorerPane-BgJw-BA4.js";
37
+ import { A as jn, Gt as Mn, N as Nn, P as Pn, Pt as Fn, Q as In, St as Ln, _n as Rn, a as zn, an as Bn, cn as Vn, dn as Hn, fn as Un, gn as Wn, hn as Gn, i as Kn, j as qn, mn as Jn, pn as Yn, sn as Xn, t as Zn, u as Qn, vn as $n, yn as er, zt as tr } from "./DiffWorkerPoolProvider-8Qh-Y5iP.js";
38
+ import { A as nr, c as rr, j as ir } from "./diffRendering-tvIuzFsP.js";
39
+ import { t as ar } from "./syntaxHighlighting-CqVs1cUM.js";
40
+ import { r as or } from "./getFiletypeFromFileName-DLahV2Rk.js";
41
+ import { c as sr, d as cr, l as q, n as lr, o as ur, s as dr, t as J, u as fr } from "./utils-7X1WogxY.js";
42
+ import { i as pr } from "./useNextRenderData-Jm142a1q.js";
43
+ import { c as mr, l as hr, r as gr, s as _r, t as vr } from "./PreviewImage-Ct8eWJb8.js";
44
+ import { t as yr } from "./delimitedPreview-DbbXcqOT.js";
45
+ import { a as br, i as xr, n as Sr, o as Cr, r as wr, t as Tr } from "./fileSurfaceChrome-BDyKklTq.js";
46
+ import { r as Er, t as Dr } from "./ReadOnlySourcePreview-BYlRPbKI.js";
47
47
  import { a as Or, i as kr, n as Ar, r as jr, t as Mr } from "./fileCommentAnnotations-BTbvReHc.js";
48
48
  import { Suspense as Nr, lazy as Pr, useCallback as Fr, useEffect as Ir, useEffectEvent as Lr, useMemo as Rr, useRef as Y, useState as X, useSyncExternalStore as zr } from "react";
49
49
  import { c as Z } from "react/compiler-runtime";
50
50
  import { Fragment as Br, jsx as Q, jsxs as $ } from "react/jsx-runtime";
51
51
  // ../../node_modules/.pnpm/@pierre+theming@1.0.2_@pierre+theme@2.0.0_@shikijs+themes@4.2.0_react-dom@19.3.0_react@19.3.0__react@19.3.0_shiki@4.2.0/node_modules/@pierre/theming/dist/color.js
52
52
  var Vr = {
53
- compositeOverBg: Vn,
54
- contrastRatio: Hn,
55
- deriveMutedFg: Jn,
56
- hoverWouldEraseText: qn,
57
- isDarkSurface: Wn,
58
- isFullyTransparent: Un,
59
- pickReadableForeground: Ln,
60
- relativeLuminance: Qn,
61
- surfacesMatch: $n
53
+ compositeOverBg: Hn,
54
+ contrastRatio: Un,
55
+ deriveMutedFg: Yn,
56
+ hoverWouldEraseText: Jn,
57
+ isDarkSurface: Gn,
58
+ isFullyTransparent: Wn,
59
+ pickReadableForeground: Rn,
60
+ relativeLuminance: $n,
61
+ surfacesMatch: er
62
62
  };
63
63
  // ../../node_modules/.pnpm/@pierre+trees@1.0.0-beta.6_@pierre+theme@2.0.0_@shikijs+themes@4.2.0_react-dom@19.3.0_r_6f89bc20e49cc599ef547096bbeb5e4e/node_modules/@pierre/trees/dist/react/useFileTreeSelector.js
64
64
  function Hr(e, t) {
@@ -118,7 +118,7 @@ function Kr(e) {
118
118
  }), [e, t]);
119
119
  }
120
120
  // ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/editor/EditStateManager.js
121
- var qr = /* @__PURE__ */ e(Rn(), 1), Jr = 100, Yr = class {
121
+ var qr = /* @__PURE__ */ e(zn(), 1), Jr = 100, Yr = class {
122
122
  type;
123
123
  #e = new qr.default.LRUMap(Jr);
124
124
  #t = /* @__PURE__ */ new Map();
@@ -350,7 +350,7 @@ var ri = 300, ii = 100, ai = "marker-popover", oi = class {
350
350
  #d(e) {
351
351
  let t = e.closest("[data-line]");
352
352
  if (t == null) return;
353
- let n = or(t);
353
+ let n = sr(t);
354
354
  if (n === void 0) return;
355
355
  let r;
356
356
  if (e.tagName === "SPAN") {
@@ -362,7 +362,7 @@ var ri = 300, ii = 100, ai = "marker-popover", oi = class {
362
362
  line: n - 1,
363
363
  character: r
364
364
  };
365
- for (let e = this.#t.length - 1; e >= 0; e--) if (Bt({
365
+ for (let e = this.#t.length - 1; e >= 0; e--) if (Vt({
366
366
  start: i,
367
367
  end: i
368
368
  }, this.#t[e])) return e;
@@ -421,13 +421,13 @@ var ri = 300, ii = 100, ai = "marker-popover", oi = class {
421
421
  ci(s, i);
422
422
  let t = s.firstElementChild;
423
423
  t?.dataset.markerMessage !== void 0 && (typeof r == "string" ? t.textContent = r : r instanceof HTMLElement ? t.replaceChildren(r) : t.innerHTML = r.html), this.#_(s, a, o), this.#l = e;
424
- } else this.#r = cr("div", {
424
+ } else this.#r = q("div", {
425
425
  dataset: {
426
426
  editorWidget: "",
427
427
  markerPopover: "",
428
428
  [li(i)]: ""
429
429
  },
430
- children: [cr("div", {
430
+ children: [q("div", {
431
431
  dataset: "markerMessage",
432
432
  ...typeof r == "string" ? { textContent: r } : r instanceof HTMLElement ? { children: [r] } : { innerHTML: r.html }
433
433
  })]
@@ -463,7 +463,7 @@ function ui(e) {
463
463
  ...e.oldFile,
464
464
  lines: [...e.oldFile.lines]
465
465
  },
466
- hunks: Ct(e.hunks)
466
+ hunks: wt(e.hunks)
467
467
  };
468
468
  }
469
469
  // ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/editor/editor2.js
@@ -1138,7 +1138,7 @@ var oa = class {
1138
1138
  #t;
1139
1139
  #n;
1140
1140
  constructor(e, t, n) {
1141
- this.#e = cr("div", {
1141
+ this.#e = q("div", {
1142
1142
  dataset: {
1143
1143
  editorWidget: "",
1144
1144
  selectionActionPopover: ""
@@ -1177,14 +1177,14 @@ var oa = class {
1177
1177
  paddingTop = 0;
1178
1178
  init(e) {
1179
1179
  let t = this.lineHeight, n = !1;
1180
- if (this.#e = e, this.#t ??= cr("canvas", { style: { display: "none" } }), this.#n ??= this.#t.getContext("2d") ?? void 0, this.#n === void 0) throw Error("Could not get canvas context");
1180
+ if (this.#e = e, this.#t ??= q("canvas", { style: { display: "none" } }), this.#n ??= this.#t.getContext("2d") ?? void 0, this.#n === void 0) throw Error("Could not get canvas context");
1181
1181
  let r = e.parentElement;
1182
1182
  if (r !== null) {
1183
1183
  let { paddingTop: e } = getComputedStyle(r);
1184
1184
  e.endsWith("px") && (this.paddingTop = parseFloat(e.slice(0, -2)));
1185
1185
  }
1186
1186
  let { fontSize: i, fontFamily: a, tabSize: o, lineHeight: s } = getComputedStyle(e);
1187
- s.endsWith("px") ? this.lineHeight = parseFloat(s.slice(0, -2)) : i.endsWith("px") && (this.lineHeight = sr(parseFloat(i.slice(0, -2)) * parseFloat(s)));
1187
+ s.endsWith("px") ? this.lineHeight = parseFloat(s.slice(0, -2)) : i.endsWith("px") && (this.lineHeight = cr(parseFloat(i.slice(0, -2)) * parseFloat(s)));
1188
1188
  let c = i + " " + a;
1189
1189
  (this.#r !== c || this.ch === -1) && (this.#r = c, this.#a(c), this.ch = this.canvasMeasureTextWidth("0"), this.clearTextWidthCache(), n = !0);
1190
1190
  let l = parseInt(o, 10);
@@ -1221,7 +1221,7 @@ var oa = class {
1221
1221
  }
1222
1222
  r = t + 1;
1223
1223
  }
1224
- return r < e.length && (n += this.#o(e.slice(r))), sr(n);
1224
+ return r < e.length && (n += this.#o(e.slice(r))), cr(n);
1225
1225
  }
1226
1226
  segmentTextWidth(e, t, n) {
1227
1227
  if (n <= t) return 0;
@@ -1233,13 +1233,13 @@ var oa = class {
1233
1233
  }
1234
1234
  canvasMeasureTextWidth(e) {
1235
1235
  if (this.#n === void 0) throw Error("Metrics not initialized");
1236
- return sr(this.#n.measureText(e).width);
1236
+ return cr(this.#n.measureText(e).width);
1237
1237
  }
1238
1238
  domMeasureTextWidth(e) {
1239
1239
  if (this.#e === void 0) throw Error("Metrics not initialized");
1240
1240
  let t = e + "|" + this.#r, n = this.#i.get(t);
1241
1241
  if (n !== void 0) return n;
1242
- let r = cr("span", {
1242
+ let r = q("span", {
1243
1243
  style: {
1244
1244
  position: "absolute",
1245
1245
  top: "0",
@@ -1252,7 +1252,7 @@ var oa = class {
1252
1252
  textContent: e
1253
1253
  }, this.#e), i;
1254
1254
  try {
1255
- i = sr(r.getBoundingClientRect().width);
1255
+ i = cr(r.getBoundingClientRect().width);
1256
1256
  } finally {
1257
1257
  r.remove();
1258
1258
  }
@@ -1338,7 +1338,7 @@ var ma = class {
1338
1338
  return this.#e;
1339
1339
  }
1340
1340
  constructor({ codeOptions: e, highlighter: t, textDocument: n, matchBrackets: r, setStyle: i, onDeferTokenize: a, onThemeChange: o, __debug: s }) {
1341
- let { themeType: c = "system", theme: l = tr, tokenizeMaxLineLength: u = 1e3 } = e;
1341
+ let { themeType: c = "system", theme: l = nr, tokenizeMaxLineLength: u = 1e3 } = e;
1342
1342
  this.#r = window.matchMedia("(prefers-color-scheme: dark)");
1343
1343
  let d;
1344
1344
  if (d = c === "system" ? this.#f() : c, typeof l != "string" && c === "system") {
@@ -1376,7 +1376,7 @@ var ma = class {
1376
1376
  return this.#r.matches ? "dark" : "light";
1377
1377
  }
1378
1378
  syncTheme(e) {
1379
- let { themeType: t = "system", theme: n = tr } = e;
1379
+ let { themeType: t = "system", theme: n = nr } = e;
1380
1380
  if (typeof n == "string") {
1381
1381
  this.#u = !1;
1382
1382
  let e = this.#e.getTheme(n).type;
@@ -1425,7 +1425,7 @@ var ma = class {
1425
1425
  }
1426
1426
  flush(e) {
1427
1427
  let t = this.#t.version, n = this.#m;
1428
- return n != null && n.version === t && Pn(n.renderRange, e) ? /* @__PURE__ */ new Map() : (this.#m = {
1428
+ return n != null && n.version === t && Fn(n.renderRange, e) ? /* @__PURE__ */ new Map() : (this.#m = {
1429
1429
  version: t,
1430
1430
  renderRange: e
1431
1431
  }, this.#n.flush(e));
@@ -1439,7 +1439,7 @@ var ma = class {
1439
1439
  };
1440
1440
  // ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/editor/editor.js
1441
1441
  function ha(e, t) {
1442
- let n = jn(e), r = jn(t), i = In(n), a = i[i.length - 1] ?? 0;
1442
+ let n = Mn(e), r = Mn(t), i = Ln(n), a = i[i.length - 1] ?? 0;
1443
1443
  return {
1444
1444
  start: 0,
1445
1445
  end: n.length,
@@ -1639,7 +1639,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1639
1639
  let r = this.#Z, i = this.#ce, a = i?.map((e) => [n.offsetAt(e.start), n.offsetAt(e.end)]), o = i === void 0 ? void 0 : n.resolveEdits(e).sort((e, t) => e.start - t.start), s = n.applyEdits(e, t, i);
1640
1640
  if (s === void 0) return;
1641
1641
  let c;
1642
- i !== void 0 && a !== void 0 && o !== void 0 && (c = wt(n, i, a, o), t && n.setLastUndoSelectionsAfter(c)), this.#Mn(s, c, this.#Pn(s), { skipFocus: !r });
1642
+ i !== void 0 && a !== void 0 && o !== void 0 && (c = Tt(n, i, a, o), t && n.setLastUndoSelectionsAfter(c)), this.#Mn(s, c, this.#Pn(s), { skipFocus: !r });
1643
1643
  }
1644
1644
  replaceSearchMatches(e, t) {
1645
1645
  let n = this.#n?.document;
@@ -1650,12 +1650,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1650
1650
  start: n.positionAt(e),
1651
1651
  end: n.positionAt(r)
1652
1652
  },
1653
- newText: zn(n, t, e, r)
1653
+ newText: Bn(n, t, e, r)
1654
1654
  })), i = this.#ce, a = i?.map((e) => [n.offsetAt(e.start), n.offsetAt(e.end)]), o = n.resolveEdits(r).sort((e, t) => e.start - t.start), s = o.at(-1).end;
1655
1655
  for (let { start: e, end: t, text: n } of o) s += n.length - (t - e);
1656
1656
  let c = n.applyEdits(r, !0, i);
1657
1657
  if (c != null) {
1658
- let e = i != null && a != null ? wt(n, i, a, o) : void 0;
1658
+ let e = i != null && a != null ? Tt(n, i, a, o) : void 0;
1659
1659
  e != null && n.setLastUndoSelectionsAfter(e), this.#Mn(c, e, this.#Pn(c), {
1660
1660
  skipSearchRefresh: !0,
1661
1661
  skipFocus: !0
@@ -1737,7 +1737,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1737
1737
  if (t?.document == null) throw Error("Editor.setSelections: Text document is not initialized");
1738
1738
  let { document: n } = t, r = e.map((e) => {
1739
1739
  let t = n.normalizePosition(e.start), r = n.normalizePosition(e.end), i = e.direction === "none" ? 0 : e.direction === "backward" ? -1 : 1;
1740
- return un(t, r) > 0 && ([t, r] = [r, t], i !== 0 && (i = i === 1 ? -1 : 1)), {
1740
+ return dn(t, r) > 0 && ([t, r] = [r, t], i !== 0 && (i = i === 1 ? -1 : 1)), {
1741
1741
  direction: i,
1742
1742
  start: t,
1743
1743
  end: r
@@ -1748,7 +1748,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1748
1748
  selections: this.#ce
1749
1749
  }));
1750
1750
  let i = r.at(-1);
1751
- i !== void 0 && this.#Ve(G(i).line), this.#Dt();
1751
+ i !== void 0 && this.#Ve(W(i).line), this.#Dt();
1752
1752
  }
1753
1753
  setMarkers(e) {
1754
1754
  let t = this.#n?.document;
@@ -1795,7 +1795,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1795
1795
  let e = !this.#Pe();
1796
1796
  n || this.#Fe(e);
1797
1797
  }
1798
- if (this.#Ye(), n || (this.#d.delivered = !1), this.#I = !1, Yn(this.#ot), n || (this.#i?.cleanUp(), this.#i = void 0), this.#s?.forEach((e) => e()), this.#s = void 0, this.#o?.forEach((e) => e()), this.#o = void 0, n || (this.#l?.(), this.#l = void 0), this.#p = void 0, this.#m = void 0, this.#h.clear(), this.#g.clear(), this.#_ = void 0, this.#v?.remove(), this.#v = void 0, this.#y?.remove(), this.#y = void 0, this.#b?.remove(), this.#b = void 0, this.#x?.remove(), this.#x = void 0, this.#S = void 0, this.#a?.cleanUp(), this.#a = void 0, this.#C = void 0, this.#T = void 0, this.#w?.removeAttribute("contentEditable"), this.#qe(!1), this.#w = void 0, this.#xt(), this.#Z = !1, this.#E?.remove(), this.#E = void 0, this.#O = void 0, this.#M?.disconnect(), this.#M = void 0, this.#ve = !1, this.#ye !== void 0 && (cancelAnimationFrame(this.#ye), this.#ye = void 0), this.#Je(n), !n) try {
1798
+ if (this.#Ye(), n || (this.#d.delivered = !1), this.#I = !1, Xn(this.#ot), n || (this.#i?.cleanUp(), this.#i = void 0), this.#s?.forEach((e) => e()), this.#s = void 0, this.#o?.forEach((e) => e()), this.#o = void 0, n || (this.#l?.(), this.#l = void 0), this.#p = void 0, this.#m = void 0, this.#h.clear(), this.#g.clear(), this.#_ = void 0, this.#v?.remove(), this.#v = void 0, this.#y?.remove(), this.#y = void 0, this.#b?.remove(), this.#b = void 0, this.#x?.remove(), this.#x = void 0, this.#S = void 0, this.#a?.cleanUp(), this.#a = void 0, this.#C = void 0, this.#T = void 0, this.#w?.removeAttribute("contentEditable"), this.#qe(!1), this.#w = void 0, this.#xt(), this.#Z = !1, this.#E?.remove(), this.#E = void 0, this.#O = void 0, this.#M?.disconnect(), this.#M = void 0, this.#ve = !1, this.#ye !== void 0 && (cancelAnimationFrame(this.#ye), this.#ye = void 0), this.#Je(n), !n) try {
1799
1799
  if (t != null && r != null) {
1800
1800
  let n = this.#Ae, r = e === "complete" ? "install" : "discard";
1801
1801
  if (t.type === "file" && n.type === "file") t.__completeEditSession(n, r);
@@ -1825,7 +1825,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1825
1825
  }
1826
1826
  __postponeBgTokenizeToNextFrame() {
1827
1827
  let e = this.#i;
1828
- e !== void 0 && (e.pauseBackgroundTokenize(), Bn(() => {
1828
+ e !== void 0 && (e.pauseBackgroundTokenize(), Vn(() => {
1829
1829
  this.#i === e && e.resumeBackgroundTokenize();
1830
1830
  }));
1831
1831
  }
@@ -1863,8 +1863,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1863
1863
  this.__assertOutsideChangeCallback("FileDiff.render");
1864
1864
  let r = this.#n;
1865
1865
  if (r == null) throw Error("Editor.__replaceDocument: no edit session");
1866
- let i = e.lang ?? ar(e.name), a = r.document, o = a?.getText();
1867
- a == null || t || r.fileInfo?.name !== e.name || a.languageId !== i ? (this.#tn(!0), this.#Ee = [], this.#Ye(), r.editor = void 0, r.document = new Kn(e.name, e.contents, i, 0, new Nn({ maxEntries: this.#e.historyMaxEntries })), r.diffSession = void 0, this.#i?.cleanUp(), this.#i = void 0, this.#Je(), this.#g.clear(), this.#ce = this.#se) : this.#Ie(r, e.contents, n), r.fileInfo = {
1866
+ let i = e.lang ?? or(e.name), a = r.document, o = a?.getText();
1867
+ a == null || t || r.fileInfo?.name !== e.name || a.languageId !== i ? (this.#tn(!0), this.#Ee = [], this.#Ye(), r.editor = void 0, r.document = new qn(e.name, e.contents, i, 0, new Pn({ maxEntries: this.#e.historyMaxEntries })), r.diffSession = void 0, this.#i?.cleanUp(), this.#i = void 0, this.#Je(), this.#g.clear(), this.#ce = this.#se) : this.#Ie(r, e.contents, n), r.fileInfo = {
1868
1868
  name: e.name,
1869
1869
  lang: e.lang
1870
1870
  }, n != null && (this.#R = n), this.#Pe();
@@ -1892,11 +1892,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1892
1892
  return;
1893
1893
  }
1894
1894
  this.#Ge().setViewportElements(n, f), this.#S !== n && (this.#S = n, this.#v !== void 0 && n.appendChild(this.#v), this.#y !== void 0 && d.appendChild(this.#y), this.#b !== void 0 && d.appendChild(this.#b), this.#x !== void 0 && d.prepend(this.#x));
1895
- let h = s.lang ?? ar(s.name), g = "contents" in s ? s.contents : s.additionLines.join("");
1895
+ let h = s.lang ?? or(s.name), g = "contents" in s ? s.contents : s.additionLines.join("");
1896
1896
  if (u.document == null || u.fileInfo == null) {
1897
1897
  this.#tn(!0), this.#Ee = [], this.#Ye();
1898
1898
  let { name: e, lang: t } = s;
1899
- u.document ??= new Kn(s.name, g, h, 0, new Nn({ maxEntries: this.#e.historyMaxEntries })), u.fileInfo = {
1899
+ u.document ??= new qn(s.name, g, h, 0, new Pn({ maxEntries: this.#e.historyMaxEntries })), u.fileInfo = {
1900
1900
  name: e,
1901
1901
  lang: t
1902
1902
  }, this.#i?.cleanUp(), this.#i = void 0, this.#Je(), this.#g.clear(), this.#ce = this.#se, typeof process < "u" && process.env.NODE_ENV === "development" && this.#e.__debug === !0 && console.log("[diffs/editor] text document initialized from", s.name);
@@ -1941,7 +1941,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1941
1941
  let r = e.document;
1942
1942
  if (r == null) return;
1943
1943
  r.adoptLineEnding(t);
1944
- let i = jn(t), a = r.lineCount - 1, o = r.offsetAt({
1944
+ let i = Mn(t), a = r.lineCount - 1, o = r.offsetAt({
1945
1945
  line: a,
1946
1946
  character: r.getLineLength(a)
1947
1947
  });
@@ -1953,7 +1953,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
1953
1953
  };
1954
1954
  if (r.applyResolvedEdits([l], !0, s, void 0, !0) != null) {
1955
1955
  if (s != null && c != null) {
1956
- let e = wt(r, s, c, [l]);
1956
+ let e = Tt(r, s, c, [l]);
1957
1957
  r.setLastUndoSelectionsAfter(e), this.#ce = e;
1958
1958
  }
1959
1959
  (this.#R != null || n != null) && r.setLastUndoLineAnnotations(this.#R ?? [], n ?? []), this.#i?.cleanUp(), this.#i = void 0, this.#Ke(), this.#g.clear(), this.#W?.removePopover(), this.#K != null && this.#K.updateMatches({ skipNavigation: !0 });
@@ -2006,7 +2006,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2006
2006
  }
2007
2007
  #Ye() {
2008
2008
  let e = this.#d;
2009
- e.generation++, e.callback != null && (Yn(e.callback), e.callback = void 0);
2009
+ e.generation++, e.callback != null && (Xn(e.callback), e.callback = void 0);
2010
2010
  }
2011
2011
  #Xe(e) {
2012
2012
  let t = this.#d, n = this.#n?.document;
@@ -2016,7 +2016,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2016
2016
  let a = this.#w, o = this.#S?.shadowRoot;
2017
2017
  a != null && o != null && o.contains(a) && (t.delivered = !0, this.#e.onAttach?.(this, e));
2018
2018
  };
2019
- t.callback = i, Bn(i);
2019
+ t.callback = i, Vn(i);
2020
2020
  }
2021
2021
  #Ze() {
2022
2022
  let e = this.#Re?.getEditorViewport?.();
@@ -2030,13 +2030,13 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2030
2030
  if (e instanceof HTMLElement) return e;
2031
2031
  }
2032
2032
  #$e() {
2033
- this.#v = cr("style", {
2033
+ this.#v = q("style", {
2034
2034
  dataset: "editorGlobalCss",
2035
2035
  textContent: "\n [data-annotation-slot] {\n user-select: none;\n -webkit-user-select: none;\n }\n "
2036
- }), this.#y = cr("style", {
2036
+ }), this.#y = q("style", {
2037
2037
  dataset: "editorCss",
2038
2038
  textContent: di
2039
- }), this.#b = cr("style", { dataset: "editorThemeCss" }), this.#i?.applyStyle(), this.#x = Jt(), this.#E = cr("div", { dataset: "editorOverlay" }), this.#O = cr("span", {
2039
+ }), this.#b = q("style", { dataset: "editorThemeCss" }), this.#i?.applyStyle(), this.#x = Yt(), this.#E = q("div", { dataset: "editorOverlay" }), this.#O = q("span", {
2040
2040
  ariaHidden: "true",
2041
2041
  style: {
2042
2042
  position: "absolute",
@@ -2056,7 +2056,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2056
2056
  }, n = (e) => {
2057
2057
  if (e.pointerType !== "mouse") return;
2058
2058
  let t = this.#ee;
2059
- this.#et(), t && this.#yt(), this.#e.enabledSelectionAction === !0 && this.#ce !== void 0 && this.#ce.length > 0 && !K(this.#ce.at(-1)) && this.#sn(this.#ce);
2059
+ this.#et(), t && this.#yt(), this.#e.enabledSelectionAction === !0 && this.#ce !== void 0 && this.#ce.length > 0 && !G(this.#ce.at(-1)) && this.#sn(this.#ce);
2060
2060
  };
2061
2061
  this.#s = [
2062
2062
  J(document, "focusin", (n) => {
@@ -2071,21 +2071,21 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2071
2071
  J(document, "selectionchange", () => {
2072
2072
  let e = this.#S?.shadowRoot;
2073
2073
  if (e == null || !this.#it() || this.#ce !== void 0 && this.#ce.length > 1 && !this.#te) return;
2074
- let t = rn(e);
2074
+ let t = an(e);
2075
2075
  if (t === void 0 || !this.#Wn(t)) return;
2076
- let n = pn(t, 0);
2076
+ let n = mn(t, 0);
2077
2077
  if (n !== void 0) {
2078
2078
  if (this.#te && this.#re && this.#ce !== void 0 && this.#ce.length > 0) {
2079
2079
  let e = this.#ce.at(-1);
2080
- this.#sn([Rt(e, n)]);
2080
+ this.#sn([zt(e, n)]);
2081
2081
  } else {
2082
- if (this.#ie !== void 0) n.direction = qt(this.#ie, n).direction;
2082
+ if (this.#ie !== void 0) n.direction = Jt(this.#ie, n).direction;
2083
2083
  else if (this.#te) this.#ie = n;
2084
2084
  else if (this.#ce !== void 0 && this.#ce.length === 1) {
2085
2085
  let e = this.#ce[0];
2086
- un(e.start, n.start) === 0 && un(e.end, n.end) === 0 && (n.direction = e.direction);
2086
+ dn(e.start, n.start) === 0 && dn(e.end, n.end) === 0 && (n.direction = e.direction);
2087
2087
  }
2088
- this.#ne !== void 0 && (this.#ne.focusLine = G(n).line, this.#Kt()) || (this.#oe === void 0 ? this.#sn([n]) : this.#sn([...this.#oe.filter((e) => !Bt(e, n)), n]));
2088
+ this.#ne !== void 0 && (this.#ne.focusLine = W(n).line, this.#Kt()) || (this.#oe === void 0 ? this.#sn([n]) : this.#sn([...this.#oe.filter((e) => !Vt(e, n)), n]));
2089
2089
  }
2090
2090
  }
2091
2091
  }, { passive: !0 }),
@@ -2135,7 +2135,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2135
2135
  }
2136
2136
  this.#Ut(!1), this.#W?.removePopover();
2137
2137
  let n = [];
2138
- if (Fn() && this.#R !== void 0 && this.#R.length > 0) {
2138
+ if (In() && this.#R !== void 0 && this.#R.length > 0) {
2139
2139
  let t = [...e.querySelectorAll("[data-line-annotation]")].map((e) => [J(e, "mouseenter", () => {
2140
2140
  this.#Y = !0;
2141
2141
  }), J(e, "mouseleave", () => {
@@ -2156,7 +2156,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2156
2156
  }, {
2157
2157
  capture: !0,
2158
2158
  passive: !0
2159
- }))) : t.button === 0 && Wt(t) && (this.#oe = this.#ce?.map((e) => ({ ...e }))), this.#tt(n), t.shiftKey) {
2159
+ }))) : t.button === 0 && Gt(t) && (this.#oe = this.#ce?.map((e) => ({ ...e }))), this.#tt(n), t.shiftKey) {
2160
2160
  let e = this.#ce?.at(-1);
2161
2161
  if (e !== void 0) {
2162
2162
  let t = e.direction === -1 ? e.end : e.start;
@@ -2179,31 +2179,31 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2179
2179
  this.#tn(!0), e.preventDefault();
2180
2180
  return;
2181
2181
  }
2182
- let t = on(e, this.#e.keymap), n = this.#e.searchPanel === "host" && (t === "openSearchPanel" || t === "openSearchReplacePanel");
2182
+ let t = sn(e, this.#e.keymap), n = this.#e.searchPanel === "host" && (t === "openSearchPanel" || t === "openSearchReplacePanel");
2183
2183
  if (t != null && !n) {
2184
2184
  e.preventDefault(), t === "simplifySelection" && (this.#K?.close(), this.#K = void 0, this.#_e = !1, this.#q?.cleanup(), this.#q = void 0), this.#lt(t);
2185
2185
  return;
2186
2186
  }
2187
- let r = Ut(e), a = this.#n?.document;
2187
+ let r = Wt(e), a = this.#n?.document;
2188
2188
  if (this.#ce !== void 0 && this.#ce.length > 0 && r !== void 0 && a !== void 0) {
2189
2189
  let t = {
2190
2190
  getSoftLineOffsets: this.#We ? (e) => this.#Un(e) : void 0,
2191
2191
  resolveRenderableLine: this.#Be
2192
2192
  };
2193
- e.shiftKey ? this.#sn(Nt(a, this.#ce, r, t)) : this.#sn(At(a, this.#ce, r, t)), this.#Dt(), e.preventDefault();
2193
+ e.shiftKey ? this.#sn(Pt(a, this.#ce, r, t)) : this.#sn(jt(a, this.#ce, r, t)), this.#Dt(), e.preventDefault();
2194
2194
  } else {
2195
- if ((e.key.length === 1 ? e.key.toLowerCase() : e.key) === "v" && Wt(e)) {
2195
+ if ((e.key.length === 1 ? e.key.toLowerCase() : e.key) === "v" && Gt(e)) {
2196
2196
  if (e.repeat) {
2197
2197
  e.preventDefault();
2198
2198
  return;
2199
2199
  }
2200
2200
  if (this.#e.clipboard !== void 0) {
2201
- e.preventDefault(), Bn(this.#ot);
2201
+ e.preventDefault(), Vn(this.#ot);
2202
2202
  return;
2203
2203
  }
2204
2204
  }
2205
2205
  if (this.#K !== void 0) {
2206
- let t = jt(e);
2206
+ let t = Mt(e);
2207
2207
  if (t !== void 0) {
2208
2208
  e.preventDefault(), this.#K.navigate(t === "previous");
2209
2209
  return;
@@ -2256,7 +2256,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2256
2256
  let a = this.#S?.shadowRoot?.querySelector("[data-deletions]");
2257
2257
  if (a != null && this.#o.push(J(a, "pointerdown", (e) => {
2258
2258
  let t = e.composedPath();
2259
- if (er(t)) {
2259
+ if (tr(t)) {
2260
2260
  this.#rt();
2261
2261
  return;
2262
2262
  }
@@ -2277,12 +2277,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2277
2277
  return n?.dataset.lineNumberContent === void 0 ? t && n?.tagName === "SPAN" && (n = n.closest("[data-line]")) : n = n.parentElement ?? void 0, n;
2278
2278
  }, n = (e) => {
2279
2279
  if (e === void 0) return;
2280
- let t = e.dataset.lineType, n = or(e) ?? or(e, "columnNumber");
2281
- if (n !== void 0 && t !== void 0 && Dt(t)) return n - 1;
2280
+ let t = e.dataset.lineType, n = sr(e) ?? sr(e, "columnNumber");
2281
+ if (n !== void 0 && t !== void 0 && Ot(t)) return n - 1;
2282
2282
  };
2283
2283
  this.#o.push(J(t, "pointerdown", (t) => {
2284
2284
  let r = t.composedPath();
2285
- if (er(r)) {
2285
+ if (tr(r)) {
2286
2286
  this.#rt();
2287
2287
  return;
2288
2288
  }
@@ -2348,15 +2348,15 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2348
2348
  case "findNextMatch": {
2349
2349
  let e = this.#ce;
2350
2350
  if (e === void 0) break;
2351
- if (e.some(K)) {
2352
- let n = e.map((e) => K(e) ? fn(t, e) : e);
2351
+ if (e.some(G)) {
2352
+ let n = e.map((e) => G(e) ? pn(t, e) : e);
2353
2353
  this.#sn(n), this.focus();
2354
2354
  } else {
2355
- let n = dn(t, e);
2355
+ let n = fn(t, e);
2356
2356
  if (n !== void 0) {
2357
2357
  this.#sn(n);
2358
2358
  let e = n.at(-1);
2359
- e !== void 0 && this.#Ve(G(e).line), this.#Dt();
2359
+ e !== void 0 && this.#Ve(W(e).line), this.#Dt();
2360
2360
  }
2361
2361
  }
2362
2362
  break;
@@ -2372,9 +2372,9 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2372
2372
  case "simplifySelection": {
2373
2373
  let e = this.#ce, t = e?.at(-1);
2374
2374
  if (e === void 0 || t === void 0) break;
2375
- if (e.length > 1) this.#sn([t]), this.#yt(G(t));
2376
- else if (!K(t)) {
2377
- let e = G(t);
2375
+ if (e.length > 1) this.#sn([t]), this.#yt(W(t));
2376
+ else if (!G(t)) {
2377
+ let e = W(t);
2378
2378
  this.#sn([{
2379
2379
  start: e,
2380
2380
  end: e,
@@ -2415,7 +2415,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2415
2415
  for (let o of this.#ce) {
2416
2416
  let s = o.start.line, c = e === "outdent" || e === "indentLess", l = e === "indentLess" || e === "indentMore";
2417
2417
  if (s !== o.end.line || c || l) {
2418
- let e = Vt(t, o, this.#r.tabSize, c);
2418
+ let e = Ht(t, o, this.#r.tabSize, c);
2419
2419
  for (let t of e[0]) {
2420
2420
  let e = t.range.start.line;
2421
2421
  i.has(e) || (i.add(e), n.push(t));
@@ -2466,7 +2466,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2466
2466
  }
2467
2467
  break;
2468
2468
  case "selectAll": {
2469
- let e = It(t);
2469
+ let e = Lt(t);
2470
2470
  this.#sn([e]), this.focus();
2471
2471
  let n = this.#Fn().rendered, r = n[0]?.[0], i = n.at(-1)?.[1];
2472
2472
  r !== void 0 && i !== void 0 && (this.#X = !0, this.#Et({
@@ -2485,8 +2485,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2485
2485
  case "moveCursorToDocStart":
2486
2486
  case "moveCursorToDocEnd":
2487
2487
  {
2488
- let n = Et(t, e === "moveCursorToDocEnd", this.#Ue);
2489
- this.#sn([n]), this.#Ve(G(n).line), this.#Dt();
2488
+ let n = Dt(t, e === "moveCursorToDocEnd", this.#Ue);
2489
+ this.#sn([n]), this.#Ve(W(n).line), this.#Dt();
2490
2490
  }
2491
2491
  break;
2492
2492
  case "expandSelectionDocStart":
@@ -2494,8 +2494,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2494
2494
  {
2495
2495
  let n = e === "expandSelectionDocEnd", r = this.#ce;
2496
2496
  if (r !== void 0) {
2497
- let e = Et(t, n, this.#Ue);
2498
- this.#sn(Tt(r, e)), this.#Ve(G(e).line), this.#Dt();
2497
+ let e = Dt(t, n, this.#Ue);
2498
+ this.#sn(Et(r, e)), this.#Ve(W(e).line), this.#Dt();
2499
2499
  }
2500
2500
  }
2501
2501
  break;
@@ -2508,7 +2508,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2508
2508
  if (t == null || e === "undo" && !t.canUndo || e === "redo" && !t.canRedo) return;
2509
2509
  let n = this.#ce, r = n?.map((e) => [t.offsetAt(e.start), t.offsetAt(e.end)]), i = e === "undo" ? t.undo() : t.redo();
2510
2510
  if (i === void 0) return;
2511
- let [a, o, s, c] = i, l = o ?? (n !== void 0 && r !== void 0 && c !== void 0 ? wt(t, n, r, c) : void 0), u = s ?? (this.#R == null ? void 0 : Mt(a, this.#R));
2511
+ let [a, o, s, c] = i, l = o ?? (n !== void 0 && r !== void 0 && c !== void 0 ? Tt(t, n, r, c) : void 0), u = s ?? (this.#R == null ? void 0 : Nt(a, this.#R));
2512
2512
  this.#Mn(a, l, u);
2513
2513
  }
2514
2514
  #dt(e, t) {
@@ -2526,13 +2526,13 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2526
2526
  return n === 0 ? e.end - t.end : n;
2527
2527
  }) : void 0, s = n.applyEdits(e, !0, r, void 0, !0);
2528
2528
  if (s === void 0) return;
2529
- let c = i ? wt(n, r, a, o) : t(n);
2529
+ let c = i ? Tt(n, r, a, o) : t(n);
2530
2530
  n.setLastUndoSelectionsAfter(c), this.#Mn(s, c, this.#Pn(s));
2531
2531
  }
2532
2532
  #ft(e) {
2533
2533
  let t = this.#n?.document, n = this.#ce;
2534
2534
  if (t === void 0 || n === void 0) return;
2535
- let r = W(n);
2535
+ let r = U(n);
2536
2536
  if (r.length === 0) return;
2537
2537
  let i = [], a = 0, o = [];
2538
2538
  for (let n of r) {
@@ -2613,7 +2613,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2613
2613
  #pt() {
2614
2614
  let e = this.#n?.document, t = this.#ce;
2615
2615
  if (e === void 0 || t === void 0) return;
2616
- let n = t.map((e) => G(e).line), r = Array.from(new Set(n)).sort((e, t) => e - t), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = [];
2616
+ let n = t.map((e) => W(e).line), r = Array.from(new Set(n)).sort((e, t) => e - t), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = [];
2617
2617
  for (let t = 0; t < r.length; t++) {
2618
2618
  let n = r[t], s = e.getLineText(n), c = /^\s*/.exec(s)?.[0] ?? "";
2619
2619
  i.set(n, t), a.set(n, c);
@@ -2645,7 +2645,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2645
2645
  #mt(e) {
2646
2646
  let t = this.#n?.document, n = this.#ce;
2647
2647
  if (t === void 0 || n === void 0) return;
2648
- let r = W(n);
2648
+ let r = U(n);
2649
2649
  if (r.length === 0 || e < 0 && r[0].startLine === 0 || e > 0 && r.at(-1).endLine >= t.lineCount - 1) return;
2650
2650
  let i = t.lineCount, a = (e) => e < i - 1 ? {
2651
2651
  line: e + 1,
@@ -2685,7 +2685,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2685
2685
  newText: o([n, ...c], n < i - 1)
2686
2686
  });
2687
2687
  }
2688
- let c = r.at(-1), l = e > 0 && c.endLine === i - 2 ? t.getLineLength(c.endLine) : t.getLineLength(i - 1), u = n.map((n) => Ht(n, e, i, (e) => e === i - 1 ? l : t.getLineLength(e))), d = t.applyEdits(s, !0, n, u, !0);
2688
+ let c = r.at(-1), l = e > 0 && c.endLine === i - 2 ? t.getLineLength(c.endLine) : t.getLineLength(i - 1), u = n.map((n) => Ut(n, e, i, (e) => e === i - 1 ? l : t.getLineLength(e))), d = t.applyEdits(s, !0, n, u, !0);
2689
2689
  d !== void 0 && this.#Mn(d, u);
2690
2690
  }
2691
2691
  #ht = (e) => {
@@ -2708,12 +2708,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2708
2708
  tokens: c,
2709
2709
  lineAnnotations: t
2710
2710
  });
2711
- (e.lineDelta !== 0 || u.length > 0) && this.#Ke(), t != null && (this.#R = t), this.#cn(), typeof process < "u" && process.env.NODE_ENV === "development" && this.#e.__debug === !0 && console.log(`[diffs/editor] re-render in: ${sr(performance.now() - l)}ms,`, `tokenize in: ${sr(l - s)}ms (${c?.size ?? 0} dirty lines)`);
2711
+ (e.lineDelta !== 0 || u.length > 0) && this.#Ke(), t != null && (this.#R = t), this.#cn(), typeof process < "u" && process.env.NODE_ENV === "development" && this.#e.__debug === !0 && console.log(`[diffs/editor] re-render in: ${cr(performance.now() - l)}ms,`, `tokenize in: ${cr(l - s)}ms (${c?.size ?? 0} dirty lines)`);
2712
2712
  }
2713
2713
  #vt(e, t) {
2714
2714
  switch (e) {
2715
2715
  case "insertText": {
2716
- let e = t ?? "", n = this.#n?.document, r = this.#ce, i = n !== void 0 && r !== void 0 ? zt(n, r, e, this.#e.autoSurround) : void 0;
2716
+ let e = t ?? "", n = this.#n?.document, r = this.#ce, i = n !== void 0 && r !== void 0 ? Bt(n, r, e, this.#e.autoSurround) : void 0;
2717
2717
  this.#En(i ?? e);
2718
2718
  break;
2719
2719
  }
@@ -2751,12 +2751,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2751
2751
  direction: 0
2752
2752
  });
2753
2753
  let r = () => {
2754
- this.#Q === a && (a.frame = void 0, !this.#Z || !i() ? this.#bt(a) : (a.restore = void 0, this.#w?.focus({ preventScroll: t }), Bn(() => this.#bt(a))));
2754
+ this.#Q === a && (a.frame = void 0, !this.#Z || !i() ? this.#bt(a) : (a.restore = void 0, this.#w?.focus({ preventScroll: t }), Vn(() => this.#bt(a))));
2755
2755
  }, a = {
2756
2756
  frame: r,
2757
2757
  restore: n
2758
2758
  };
2759
- this.#xt(), this.#Q = a, Bn(r);
2759
+ this.#xt(), this.#Q = a, Vn(r);
2760
2760
  } else n != null && this.#xt(), i() ? this.#w?.focus({ preventScroll: t }) : this.#Z = !1;
2761
2761
  }
2762
2762
  #bt(e) {
@@ -2764,7 +2764,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2764
2764
  }
2765
2765
  #xt() {
2766
2766
  let e = this.#Q;
2767
- e != null && (e.frame != null && Yn(e.frame), this.#Q = void 0);
2767
+ e != null && (e.frame != null && Xn(e.frame), this.#Q = void 0);
2768
2768
  }
2769
2769
  #St(e) {
2770
2770
  let t = this.#Q?.restore;
@@ -2813,8 +2813,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2813
2813
  } else i = 0, a = r.defaultView?.innerHeight ?? 0;
2814
2814
  let o = n.shadowRoot?.querySelector("[data-diffs-header][data-sticky]");
2815
2815
  if (o != null && (i = Math.max(i, o.getBoundingClientRect().bottom)), Number.isFinite(e) && (i += Math.max(0, e)), !(a <= i)) for (let e of t.children) {
2816
- let t = e, n = or(t), r = t.dataset.lineType;
2817
- if (n == null || r == null || !Dt(r)) continue;
2816
+ let t = e, n = sr(t), r = t.dataset.lineType;
2817
+ if (n == null || r == null || !Ot(r)) continue;
2818
2818
  let o = t.getBoundingClientRect();
2819
2819
  if (!(o.bottom <= o.top) && o.top >= i && o.top < a) return n;
2820
2820
  }
@@ -2831,10 +2831,10 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2831
2831
  let t = window.getSelection();
2832
2832
  if (t === null) return;
2833
2833
  let { start: n, end: r, direction: i } = e;
2834
- un(n, r) > 0 && ([n, r] = [r, n]);
2834
+ dn(n, r) > 0 && ([n, r] = [r, n]);
2835
2835
  let a = this.#Ln(n.line), o = this.#Ln(r.line);
2836
2836
  if (a === void 0 || o === void 0) return;
2837
- let [s, c] = $t(a, n.character), [l, u] = $t(o, r.character);
2837
+ let [s, c] = en(a, n.character), [l, u] = en(o, r.character);
2838
2838
  i === -1 && ([s, c, l, u] = [
2839
2839
  l,
2840
2840
  u,
@@ -2857,7 +2857,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2857
2857
  inline: "nearest"
2858
2858
  });
2859
2859
  else {
2860
- let t = G(n);
2860
+ let t = W(n);
2861
2861
  this.#Mt(t.line, t.character, e);
2862
2862
  return;
2863
2863
  }
@@ -2865,12 +2865,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2865
2865
  }
2866
2866
  #Ot(e) {
2867
2867
  let t = this.#Re, n = this.#ce?.at(-1);
2868
- t !== void 0 && n !== void 0 && (this.__postponeBgTokenizeToNextFrame(), t.scrollToLine(G(n).line + 1, e, this.#kt));
2868
+ t !== void 0 && n !== void 0 && (this.__postponeBgTokenizeToNextFrame(), t.scrollToLine(W(n).line + 1, e, this.#kt));
2869
2869
  }
2870
2870
  #kt = (e) => {
2871
2871
  let t = this.#ce?.at(-1);
2872
2872
  if (e === "settled" && t !== void 0) {
2873
- let { line: e, character: n } = G(t);
2873
+ let { line: e, character: n } = W(t);
2874
2874
  this.#Nt(e, n, "nearest");
2875
2875
  }
2876
2876
  };
@@ -2891,8 +2891,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2891
2891
  }
2892
2892
  let r = 0;
2893
2893
  if (this.#pe === e && this.#w !== void 0) for (let t = this.#w.childElementCount - 1; t >= 0; t--) {
2894
- let n = this.#w.children[t], i = n.dataset.lineType, a = or(n);
2895
- if (i !== void 0 && Dt(i) && a !== void 0) {
2894
+ let n = this.#w.children[t], i = n.dataset.lineType, a = sr(n);
2895
+ if (i !== void 0 && Ot(i) && a !== void 0) {
2896
2896
  r = (e - (a - 1)) * this.#r.lineHeight;
2897
2897
  break;
2898
2898
  }
@@ -2912,7 +2912,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2912
2912
  }), a.remove(), !0;
2913
2913
  }
2914
2914
  #Pt() {
2915
- return cr("div", { style: {
2915
+ return q("div", { style: {
2916
2916
  position: "absolute",
2917
2917
  left: "0",
2918
2918
  width: "2px",
@@ -2941,11 +2941,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2941
2941
  #It = (e) => {
2942
2942
  let t = e.composedPath()[0], n = t instanceof HTMLElement ? t.closest("[data-line]") : null, r = this.#S?.shadowRoot, i = this.#n?.document;
2943
2943
  if (!(n instanceof HTMLElement) || r == null || i == null || !this.#I) return;
2944
- let a = rn(r);
2944
+ let a = an(r);
2945
2945
  if (a != null && !a.collapsed) return;
2946
- let o = or(n), s = o == null ? void 0 : this.#Le?.editLineFor(o);
2946
+ let o = sr(n), s = o == null ? void 0 : this.#Le?.editLineFor(o);
2947
2947
  if (s == null) return;
2948
- let c = n.dataset.lineType !== "change-deletion" && a != null && n.contains(a.startContainer) ? pn(a)?.start : void 0;
2948
+ let c = n.dataset.lineType !== "change-deletion" && a != null && n.contains(a.startContainer) ? mn(a)?.start : void 0;
2949
2949
  this.#Ut(!1), this.#Tt(i.normalizePosition({
2950
2950
  line: s,
2951
2951
  character: c?.character ?? 0
@@ -2961,7 +2961,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
2961
2961
  let e = document.createRange();
2962
2962
  e.setStart(o, 0), e.setEnd(s, s.childNodes.length), c.removeAllRanges(), c.addRange(e);
2963
2963
  }
2964
- this.#Ut(!0), this.#sn([]), this.#Wt(or(t) ?? null, !0, "deletions");
2964
+ this.#Ut(!0), this.#sn([]), this.#Wt(sr(t) ?? null, !0, "deletions");
2965
2965
  let l = Math.min(i, a), u = Math.max(i, a);
2966
2966
  this.#ae = l < 0 ? "" : r.slice(l, u + 1).filter((e) => e.getAttribute("data-line-type") === "change-deletion").map((e) => e.textContent ?? "").join("\n");
2967
2967
  }
@@ -3011,12 +3011,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3011
3011
  line: e.focusLine,
3012
3012
  character: s
3013
3013
  };
3014
- if (e.renderedGoal !== void 0 && un(e.renderedGoal, c) === 0) return !0;
3014
+ if (e.renderedGoal !== void 0 && dn(e.renderedGoal, c) === 0) return !0;
3015
3015
  e.renderedGoal = c;
3016
3016
  let l = [], u = c.line < r.line ? -1 : 1;
3017
3017
  for (let e = r.line;; e += u) {
3018
3018
  if (!this.#ze(e)) {
3019
- let t = n.getLineText(e), i = Math.min(r.character, t.length), a = Math.min(s, t.length), o = Ot(t, i), c = a === i ? o : Ot(t, a);
3019
+ let t = n.getLineText(e), i = Math.min(r.character, t.length), a = Math.min(s, t.length), o = kt(t, i), c = a === i ? o : kt(t, a);
3020
3020
  l.push({
3021
3021
  start: {
3022
3022
  line: e,
@@ -3039,7 +3039,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3039
3039
  #Jt(e, t, n) {
3040
3040
  let r = t[n], i = n, a = r.range.end.line;
3041
3041
  for (; i + 1 < t.length && t[i + 1].range.start.line <= a;) i++, a = Math.max(a, t[i].range.end.line);
3042
- if (i === n && (r.newText.length === 0 || un(r.range.start, r.range.end) === 0)) return {
3042
+ if (i === n && (r.newText.length === 0 || dn(r.range.start, r.range.end) === 0)) return {
3043
3043
  edit: r,
3044
3044
  endIndex: i
3045
3045
  };
@@ -3084,21 +3084,21 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3084
3084
  this.#We ? (e.dataset.wrap = "", e.style.width = `calc(100cqw - ${r}px)`) : (delete e.dataset.wrap, e.style.width = "max-content");
3085
3085
  let a = t.split(/\r\n|\r|\n/);
3086
3086
  for (let t = 0; t < a.length; t++) {
3087
- let o = a[t], s = t === a.length - 1 ? i : void 0, c = o.length === 0 && s === void 0, l = cr("span", {
3087
+ let o = a[t], s = t === a.length - 1 ? i : void 0, c = o.length === 0 && s === void 0, l = q("span", {
3088
3088
  dataset: c ? ["editPredictionLine", "empty"] : "editPredictionLine",
3089
3089
  textContent: c ? "​" : o
3090
3090
  }, e);
3091
- s !== void 0 && cr("span", { dataset: "editPredictionSuffix" }, l).append(s), t === 0 && n !== r && (l.style.textIndent = `${n - r}px`);
3091
+ s !== void 0 && q("span", { dataset: "editPredictionSuffix" }, l).append(s), t === 0 && n !== r && (l.style.textIndent = `${n - r}px`);
3092
3092
  }
3093
3093
  }
3094
3094
  #Zt(e) {
3095
3095
  let t = this.#Te, n = this.#n?.document;
3096
3096
  if (t == null || n == null) return;
3097
3097
  let { edit: r, startIndex: i, endIndex: a } = e, { start: o, end: s } = r.range;
3098
- if (!(un(o, s) === 0 && o.character < n.getLineLength(o.line)) || t.response.edits[i - 1]?.range.end.line === o.line || t.response.edits[a + 1]?.range.start.line === o.line) return;
3098
+ if (!(dn(o, s) === 0 && o.character < n.getLineLength(o.line)) || t.response.edits[i - 1]?.range.end.line === o.line || t.response.edits[a + 1]?.range.start.line === o.line) return;
3099
3099
  let c = this.#Ln(o.line);
3100
3100
  if (c === void 0) return document.createTextNode(n.getLineText(o.line).slice(o.character));
3101
- let [l, u] = $t(c, o.character), d = document.createRange();
3101
+ let [l, u] = en(c, o.character), d = document.createRange();
3102
3102
  d.selectNodeContents(c), d.setStart(l, lr(l, u));
3103
3103
  let f = d.cloneContents();
3104
3104
  return f.firstChild?.textContent === "" && f.firstChild.remove(), f;
@@ -3107,7 +3107,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3107
3107
  let { edit: t } = e, { start: n } = t.range, [r, i] = this.#Vn(n.line, n.character), a = 1, o = t.newText.split(/\r\n|\r|\n/).length, s = this.#E;
3108
3108
  if (this.#We && s != null) {
3109
3109
  a = Math.max(1, this.#Un(n.line).length - 1);
3110
- let i = cr("span", {
3110
+ let i = q("span", {
3111
3111
  dataset: "editPrediction",
3112
3112
  style: { visibility: "hidden" }
3113
3113
  }, s);
@@ -3186,14 +3186,14 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3186
3186
  #rn() {
3187
3187
  this.#tn(!0);
3188
3188
  let e = this.#ce?.[0];
3189
- if (this.#e.editPrediction === void 0 || this.#n?.document === void 0 || this.#n?.fileInfo === void 0 || this.#ce?.length !== 1 || e === void 0 || !K(e)) return;
3190
- let t = this.#n?.document, n = t.offsetAt(G(e));
3189
+ if (this.#e.editPrediction === void 0 || this.#n?.document === void 0 || this.#n?.fileInfo === void 0 || this.#ce?.length !== 1 || e === void 0 || !G(e)) return;
3190
+ let t = this.#n?.document, n = t.offsetAt(W(e));
3191
3191
  this.#be = setTimeout(() => {
3192
3192
  this.#be = void 0;
3193
3193
  let e = this.#e.editPrediction, r = this.#ce?.[0], i = this.#n?.fileInfo?.name;
3194
- if (e === void 0 || i === void 0 || this.#n?.document !== t || this.#ce?.length !== 1 || r === void 0 || !K(r) || t.offsetAt(G(r)) !== n || !this.#nn(i)) return;
3194
+ if (e === void 0 || i === void 0 || this.#n?.document !== t || this.#ce?.length !== 1 || r === void 0 || !G(r) || t.offsetAt(W(r)) !== n || !this.#nn(i)) return;
3195
3195
  let a = (e) => this.#In(e) && !this.#ze(e);
3196
- if (!a(G(r).line)) {
3196
+ if (!a(W(r).line)) {
3197
3197
  this.#we = !0;
3198
3198
  return;
3199
3199
  }
@@ -3213,10 +3213,10 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3213
3213
  }
3214
3214
  Promise.resolve(f).then((e) => {
3215
3215
  let r = this.#ce?.[0];
3216
- if (u.signal.aborted || d !== this.#Se || this.#xe !== u || this.#n?.document !== t || t.version !== o.version || this.#ce?.length !== 1 || r === void 0 || !K(r) || t.offsetAt(G(r)) !== n || e == null || !Array.isArray(e.edits) || e.edits.length === 0 || e.edits.length > ya || e.newCursor == null) return;
3216
+ if (u.signal.aborted || d !== this.#Se || this.#xe !== u || this.#n?.document !== t || t.version !== o.version || this.#ce?.length !== 1 || r === void 0 || !G(r) || t.offsetAt(W(r)) !== n || e == null || !Array.isArray(e.edits) || e.edits.length === 0 || e.edits.length > ya || e.newCursor == null) return;
3217
3217
  let i = [], a = 0;
3218
3218
  for (let n of e.edits) {
3219
- if (n == null || typeof n.newText != "string" || !Da(t, n.range?.start) || !Da(t, n.range?.end) || un(n.range.start, n.range.end) > 0 || (a += xa.encode(n.newText).byteLength, a > ba)) return;
3219
+ if (n == null || typeof n.newText != "string" || !Da(t, n.range?.start) || !Da(t, n.range?.end) || dn(n.range.start, n.range.end) > 0 || (a += xa.encode(n.newText).byteLength, a > ba)) return;
3220
3220
  let e = t.offsetAt(n.range.start), r = t.offsetAt(n.range.end), o = t.resolveEdits([n])[0];
3221
3221
  if (o.start !== e || o.end !== r) return;
3222
3222
  i.push(o);
@@ -3277,12 +3277,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3277
3277
  }, va);
3278
3278
  }
3279
3279
  #in(e, t) {
3280
- let n = this.#n?.document, r = this.#n?.fileInfo?.name, i = Mn(e);
3280
+ let n = this.#n?.document, r = this.#n?.fileInfo?.name, i = Nn(e);
3281
3281
  n !== void 0 && r !== void 0 && i !== void 0 && this.#nn(r) && (this.#Ee = ji(this.#Ee, r, n, i, t));
3282
3282
  }
3283
3283
  #an() {
3284
3284
  let e = this.#Te, t = this.#n?.document, n = this.#ce?.[0];
3285
- if (e === void 0 || !e.rendered || t === void 0 || e.document !== t || e.version !== t.version || this.#ce?.length !== 1 || n === void 0 || !K(n) || t.offsetAt(G(n)) !== e.cursorOffset) return;
3285
+ if (e === void 0 || !e.rendered || t === void 0 || e.document !== t || e.version !== t.version || this.#ce?.length !== 1 || n === void 0 || !G(n) || t.offsetAt(W(n)) !== e.cursorOffset) return;
3286
3286
  let { edits: r, newCursor: i } = e.response;
3287
3287
  this.#tn(!0);
3288
3288
  let a = t.applyEdits(r.map((e) => ({
@@ -3309,7 +3309,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3309
3309
  let r = this.#Yt();
3310
3310
  if (t != null && n != null && r != null && r.allVisible) {
3311
3311
  for (let t of r.groups) {
3312
- let { edit: r, endIndex: i } = t, { start: a, end: o } = r.range, s = r.newText.length === 0, c = un(a, o) !== 0, l = n.getLineLength(a.line), u = !c && a.character < l;
3312
+ let { edit: r, endIndex: i } = t, { start: a, end: o } = r.range, s = r.newText.length === 0, c = dn(a, o) !== 0, l = n.getLineLength(a.line), u = !c && a.character < l;
3313
3313
  if (c ? this.#ln(e, s ? "editPredictionDeletion" : "editPredictionReplacement", {
3314
3314
  start: a,
3315
3315
  end: o
@@ -3321,7 +3321,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3321
3321
  }
3322
3322
  }), s) continue;
3323
3323
  let [d, f] = this.#Vn(a.line, a.character), p = this.#Vn(a.line, 0)[0], m = this.#Bn(a.line) + f * this.#r.lineHeight, h = `editPrediction-${i}`, g = this.#D?.get(h);
3324
- if (g === void 0 ? g = cr("span", {
3324
+ if (g === void 0 ? g = q("span", {
3325
3325
  ariaHidden: "true",
3326
3326
  contentEditable: "false",
3327
3327
  dataset: "editPrediction"
@@ -3340,7 +3340,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3340
3340
  let t = this.#ce, n = t?.length !== e.length;
3341
3341
  if (!n && t !== void 0) for (let r = 0; r < e.length; r++) {
3342
3342
  let i = t[r], a = e[r];
3343
- if (i.direction !== a.direction || un(i.start, a.start) !== 0 || un(i.end, a.end) !== 0) {
3343
+ if (i.direction !== a.direction || dn(i.start, a.start) !== 0 || dn(i.end, a.end) !== 0) {
3344
3344
  n = !0;
3345
3345
  break;
3346
3346
  }
@@ -3354,12 +3354,12 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3354
3354
  elements: /* @__PURE__ */ new Map()
3355
3355
  };
3356
3356
  if (e.length > 0) {
3357
- let t = Lt(e), n = t.at(-1);
3357
+ let t = Rt(e), n = t.at(-1);
3358
3358
  this.#ce = t;
3359
- let r = t.some((e) => !K(e)), a = G(n).line + 1;
3359
+ let r = t.some((e) => !G(e)), a = W(n).line + 1;
3360
3360
  this.#Wt(a, r);
3361
- for (let e of t) K(e) || this.#ln(i, "selection", e), this.#pn(i, e, e === n);
3362
- let o = this.#e.matchBrackets !== !1 && this.#n?.document != null && this.#i !== void 0 && K(n) ? Ji(this.#n?.document, this.#i, n.start) : void 0;
3361
+ for (let e of t) G(e) || this.#ln(i, "selection", e), this.#pn(i, e, e === n);
3362
+ let o = this.#e.matchBrackets !== !1 && this.#n?.document != null && this.#i !== void 0 && G(n) ? Ji(this.#n?.document, this.#i, n.start) : void 0;
3363
3363
  if (o !== void 0) for (let e of o) this.#ln(i, "bracketMatch", e);
3364
3364
  }
3365
3365
  let a = this.#n?.document;
@@ -3393,7 +3393,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3393
3393
  }
3394
3394
  if (!this.#Gn(o)) continue;
3395
3395
  let c = r.get(n);
3396
- c === void 0 && (c = cr("div", {
3396
+ c === void 0 && (c = q("div", {
3397
3397
  dataset: "remoteCaret",
3398
3398
  children: [t(e)]
3399
3399
  }, i), r.set(n, c));
@@ -3465,10 +3465,10 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3465
3465
  n !== void 0 && (n.remove(), e.elements.delete(t), h += "-rtl", p.rtl = "");
3466
3466
  }
3467
3467
  let g = e.elements.get(h);
3468
- g === void 0 && (f?.has(h) === !0 ? (g = f.get(h), g.style.cssText = d, f.delete(h)) : g = cr("div", {
3468
+ g === void 0 && (f?.has(h) === !0 ? (g = f.get(h), g.style.cssText = d, f.delete(h)) : g = q("div", {
3469
3469
  dataset: t === "caretHighlight" ? "caretHighlightRange" : "selectionRange",
3470
3470
  style: { cssText: d },
3471
- children: [cr("div", { dataset: p })]
3471
+ children: [q("div", { dataset: p })]
3472
3472
  }, e.fragment), e.elements.set(h, g));
3473
3473
  }, h = (t) => {
3474
3474
  let o = i + a, l = t.dataset, u = e.previousSelectionRange;
@@ -3494,7 +3494,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3494
3494
  }, g = e.elements.get(d);
3495
3495
  if (g !== void 0) p && h(g);
3496
3496
  else {
3497
- if (f?.has(d) === !0 ? (g = f.get(d), f.delete(d)) : g = cr("div", { dataset: o ? [t + "Range", o] : t + "Range" }, e.fragment), g.style.width = `${a}px`, g.style.transform = `translateX(${i}px) translateY(${u}px)`, t === "editPredictionInsertion" || t === "editPredictionReplacement") {
3497
+ if (f?.has(d) === !0 ? (g = f.get(d), f.delete(d)) : g = q("div", { dataset: o ? [t + "Range", o] : t + "Range" }, e.fragment), g.style.width = `${a}px`, g.style.transform = `translateX(${i}px) translateY(${u}px)`, t === "editPredictionInsertion" || t === "editPredictionReplacement") {
3498
3498
  let e = this.#Ln(n);
3499
3499
  e !== void 0 && g.style.setProperty("--diffs-edit-prediction-bg", getComputedStyle(e).getPropertyValue("--diffs-line-bg"));
3500
3500
  } else g.style.removeProperty("--diffs-edit-prediction-bg");
@@ -3502,11 +3502,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3502
3502
  }
3503
3503
  }
3504
3504
  #pn(e, t, n) {
3505
- let { line: r, character: i } = G(t);
3505
+ let { line: r, character: i } = W(t);
3506
3506
  if (!this.#Gn(r)) return;
3507
3507
  let [a, o] = this.#Vn(r, i), s = "caret-" + r + "/" + o + ":" + i;
3508
3508
  if (e.elements.has(s)) return;
3509
- let c = a - 1, l = this.#Bn(r) + o * this.#r.lineHeight, u = cr("div", {
3509
+ let c = a - 1, l = this.#Bn(r) + o * this.#r.lineHeight, u = q("div", {
3510
3510
  dataset: "caret",
3511
3511
  style: { transform: `translateX(${c}px) translateY(${l}px)` }
3512
3512
  }, e.fragment);
@@ -3516,11 +3516,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3516
3516
  let e = this.#ce?.at(-1), t = this.#E, n = this.#n?.document, r = this.#e.renderSelectionAction, i = () => {
3517
3517
  this.#q?.cleanup(), this.#q = void 0;
3518
3518
  };
3519
- if (this.#e.enabledSelectionAction !== !0 || r === void 0 || e === void 0 || K(e) || this.#te || t === void 0 || n === void 0) {
3519
+ if (this.#e.enabledSelectionAction !== !0 || r === void 0 || e === void 0 || G(e) || this.#te || t === void 0 || n === void 0) {
3520
3520
  i();
3521
3521
  return;
3522
3522
  }
3523
- let a = G(e);
3523
+ let a = W(e);
3524
3524
  if (!this.#Gn(a.line)) {
3525
3525
  i();
3526
3526
  return;
@@ -3622,7 +3622,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3622
3622
  }
3623
3623
  if (this.#w != null && n.size > 0 && (e.paint(this.#w, (e, t) => t === "deletions" ? void 0 : n.get(e)), this.#fe)) {
3624
3624
  let t = e.currentMatchRange;
3625
- this.#fe = t == null || !ln(t);
3625
+ this.#fe = t == null || !un(t);
3626
3626
  }
3627
3627
  }
3628
3628
  #gn(e) {
@@ -3656,14 +3656,14 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3656
3656
  this.#K?.cleanup();
3657
3657
  let t = this.#n?.document, n = this.#S?.shadowRoot?.querySelector("pre"), r = this.#ce;
3658
3658
  if (t === void 0 || n == null) return;
3659
- this.#ue ??= tn.create(n.ownerDocument);
3660
- let i = en(t, r?.at(-1));
3659
+ this.#ue ??= nn.create(n.ownerDocument);
3660
+ let i = tn(t, r?.at(-1));
3661
3661
  this.#de = void 0;
3662
3662
  let a = !1, o = (e, n) => {
3663
3663
  this.#de = e, this.#fe = !0;
3664
3664
  let r = t.positionAt(e[0]);
3665
3665
  this.#Ve(r.line), this.#pe = void 0, this.#he = !1, (a || !this.#vn(e)) && (a = !0, this.#Mt(r.line, r.character, !0)), this.#hn(), this.#_e = n;
3666
- }, s = new sn({
3666
+ }, s = new cn({
3667
3667
  containerElement: n,
3668
3668
  unsafeCSS: this.#N?.options.unsafeCSS,
3669
3669
  defaultQuery: i,
@@ -3716,11 +3716,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3716
3716
  }
3717
3717
  #xn() {
3718
3718
  let e = this.#n?.document, t = this.#ce;
3719
- return e === void 0 || t === void 0 ? "" : Ft(e, t);
3719
+ return e === void 0 || t === void 0 ? "" : It(e, t);
3720
3720
  }
3721
3721
  #Sn() {
3722
3722
  let e = this.#n?.document, t = this.#ce;
3723
- return e === void 0 || t === void 0 ? [] : Pt(e, t);
3723
+ return e === void 0 || t === void 0 ? [] : Ft(e, t);
3724
3724
  }
3725
3725
  #Cn(e, t, n) {
3726
3726
  e !== null && (e.setData("text", t), n.length > 1 && e.setData(Ca, JSON.stringify(n)));
@@ -3728,11 +3728,11 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3728
3728
  #wn() {
3729
3729
  let e = this.#n?.document, t = this.#ce;
3730
3730
  if (e === void 0 || t === void 0 || t.length === 0) return "";
3731
- if (t.some((e) => K(e))) {
3732
- let n = kt(e, t);
3731
+ if (t.some((e) => G(e))) {
3732
+ let n = At(e, t);
3733
3733
  return this.#Tn(n.edits, n.nextSelectionOffsets), n.text;
3734
3734
  }
3735
- let n = Ft(e, t);
3735
+ let n = It(e, t);
3736
3736
  return this.#En("", void 0, !0), n;
3737
3737
  }
3738
3738
  #Tn(e, t) {
@@ -3754,7 +3754,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3754
3754
  if (t === void 0) return;
3755
3755
  let i = this.#n?.document, a = t.at(-1);
3756
3756
  if (i === void 0 || a === void 0) return;
3757
- let { nextSelections: o, change: s } = Array.isArray(e) && e.length === t.length ? Zt(i, t, e, this.#R, n, r) : Qt(i, t, {
3757
+ let { nextSelections: o, change: s } = Array.isArray(e) && e.length === t.length ? Qt(i, t, e, this.#R, n, r) : $t(i, t, {
3758
3758
  start: i.offsetAt(a.start),
3759
3759
  end: i.offsetAt(a.end),
3760
3760
  text: Array.isArray(e) ? e.join("\n") : e
@@ -3764,7 +3764,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3764
3764
  #Dn(e = !1) {
3765
3765
  let t = this.#ce, n = this.#n?.document;
3766
3766
  if (t === void 0 || n === void 0) return;
3767
- let { nextSelections: r, change: i } = Yt(n, t, e, this.#R, this.#r.tabSize);
3767
+ let { nextSelections: r, change: i } = Xt(n, t, e, this.#R, this.#r.tabSize);
3768
3768
  i !== void 0 && this.#Mn(i, r, this.#Pn(i));
3769
3769
  }
3770
3770
  #On() {
@@ -3777,31 +3777,31 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3777
3777
  if (t >= r && t <= i) return r;
3778
3778
  }
3779
3779
  return 0;
3780
- } : void 0, { nextSelections: r, change: i } = an(t, e, n, this.#R);
3780
+ } : void 0, { nextSelections: r, change: i } = on(t, e, n, this.#R);
3781
3781
  i !== void 0 && this.#Mn(i, r, this.#Pn(i));
3782
3782
  }
3783
3783
  #kn() {
3784
3784
  let e = this.#ce, t = this.#n?.document;
3785
3785
  if (e === void 0 || t === void 0) return;
3786
- let { nextSelections: n, change: r } = nn(t, e, this.#R);
3786
+ let { nextSelections: n, change: r } = rn(t, e, this.#R);
3787
3787
  r !== void 0 && this.#Mn(r, n, this.#Pn(r));
3788
3788
  }
3789
3789
  #An() {
3790
3790
  let e = this.#ce, t = this.#n?.document;
3791
3791
  if (e === void 0 || t === void 0) return;
3792
- let { nextSelections: n, change: r } = Xt(t, e, this.#R);
3792
+ let { nextSelections: n, change: r } = Zt(t, e, this.#R);
3793
3793
  r !== void 0 && this.#Mn(r, n, this.#Pn(r));
3794
3794
  }
3795
3795
  #jn() {
3796
3796
  let e = this.#ce, t = this.#n?.document;
3797
3797
  if (e === void 0 || t === void 0) return;
3798
- let { nextSelections: n, change: r } = Gt(t, e, this.#R);
3798
+ let { nextSelections: n, change: r } = Kt(t, e, this.#R);
3799
3799
  r !== void 0 && this.#Mn(r, n, this.#Pn(r));
3800
3800
  }
3801
3801
  #Mn(e, t, n, r) {
3802
3802
  this.#Te != null && this.#tn(!0);
3803
3803
  let i = this.#n?.document;
3804
- if (i !== void 0 && this.#G !== void 0) for (let t of this.#G) t.anchorOffset = q(t.anchorOffset, e.changes), t.focusOffset = q(t.focusOffset, e.changes), t.caret.anchor = i.positionAt(t.anchorOffset), t.caret.focus = i.positionAt(t.focusOffset);
3804
+ if (i !== void 0 && this.#G !== void 0) for (let t of this.#G) t.anchorOffset = K(t.anchorOffset, e.changes), t.focusOffset = K(t.focusOffset, e.changes), t.caret.anchor = i.positionAt(t.anchorOffset), t.caret.focus = i.positionAt(t.focusOffset);
3805
3805
  if (e.lineDelta !== 0 || this.#We) for (let t of this.#h.keys()) t >= e.startLine && this.#h.delete(t);
3806
3806
  if (this.#g.size > 0) {
3807
3807
  if (e.lineDelta === 0 && (e.changedLineRanges.length === 1 || e.changedLineChanges?.every(([, , e]) => e === 0) === !0)) for (let [t, n] of e.changedLineRanges) for (let e = t; e <= n; e++) this.#g.delete(e);
@@ -3812,7 +3812,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3812
3812
  lineAnnotations: n
3813
3813
  }), n != null && (this.#R = n)), t != null && this.#sn(t), this.#Pe(), this.#in(e, r?.editSource ?? "user"), this.#rn(), this.#Nn(e.changes, n ?? this.#R), r?.skipSearchRefresh !== !0 && this.#K !== void 0 && this.#K.updateMatches({ skipNavigation: !0 }), t != null && r?.skipFocus !== !0) {
3814
3814
  let e = t.at(-1);
3815
- if (e !== void 0 && this.#Ve(G(e).line), this.#Re !== void 0) this.#Ot("nearest");
3815
+ if (e !== void 0 && this.#Ve(W(e).line), this.#Re !== void 0) this.#Ot("nearest");
3816
3816
  else if (this.#j !== void 0) requestAnimationFrame(() => {
3817
3817
  this.#j?.scrollIntoView({
3818
3818
  block: "nearest",
@@ -3820,7 +3820,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3820
3820
  });
3821
3821
  });
3822
3822
  else if (t.length > 0) {
3823
- let e = G(t.at(-1));
3823
+ let e = W(t.at(-1));
3824
3824
  this.#Mt(e.line, e.character);
3825
3825
  }
3826
3826
  this.focus({ preventScroll: !0 });
@@ -3841,7 +3841,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3841
3841
  }
3842
3842
  #Pn(e) {
3843
3843
  if (this.#R != null) {
3844
- let t = Mt(e, this.#R);
3844
+ let t = Nt(e, this.#R);
3845
3845
  if (t != null) return this.#n?.document?.setLastUndoLineAnnotations(this.#R, t), t;
3846
3846
  }
3847
3847
  }
@@ -3866,8 +3866,8 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3866
3866
  n != null && t <= n[1] + 1 ? n[1] = Math.max(n[1], t) : e.push([t, t]);
3867
3867
  }, c = e != null && e.bottom <= e.top;
3868
3868
  for (let i = a ? o : 0; i < r.length; i++) {
3869
- let l = r[i], u = l.dataset.lineType, d = or(l);
3870
- if (d == null || u == null || !Dt(u)) continue;
3869
+ let l = r[i], u = l.dataset.lineType, d = sr(l);
3870
+ if (d == null || u == null || !Ot(u)) continue;
3871
3871
  let f = d - 1;
3872
3872
  if (a || s(t, f), e == null || c || i < o) continue;
3873
3873
  let p = l.getBoundingClientRect();
@@ -3951,7 +3951,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3951
3951
  }
3952
3952
  let r = this.#w;
3953
3953
  if (r == null || !r.isConnected) return;
3954
- let i = cr("div", {
3954
+ let i = q("div", {
3955
3955
  style: {
3956
3956
  position: "absolute",
3957
3957
  top: "0",
@@ -3985,7 +3985,7 @@ var _a = 1e4, va = 300, ya = 256, ba = 131072, xa = new TextEncoder(), Sa = "sel
3985
3985
  d(n).top > f ? t = n : e = n + 1;
3986
3986
  }
3987
3987
  if (e >= l) break;
3988
- let { left: n, top: r } = d(e), i = Fn() && n - c > this.#r.ch / 2;
3988
+ let { left: n, top: r } = d(e), i = In() && n - c > this.#r.ch / 2;
3989
3989
  s.push(u(i ? e - 1 : e)), f = r, p = e + 1;
3990
3990
  }
3991
3991
  let m = new Uint32Array(s.length + 1);
@@ -4027,7 +4027,7 @@ function Oa(e, t) {
4027
4027
  }
4028
4028
  // src/components/files/filePath.ts
4029
4029
  function ka(e, t) {
4030
- let n = b(t), r = h(t), i = r ? "\\" : "/", a = (t.startsWith("~\\") ? `~/${t.slice(2)}` : t).split(r ? /[\\/]/ : "/").filter(Boolean), o = t.startsWith("\\\\") ? "\\\\" : t.startsWith("/") ? "/" : "";
4030
+ let n = D(t), r = S(t), i = r ? "\\" : "/", a = (t.startsWith("~\\") ? `~/${t.slice(2)}` : t).split(r ? /[\\/]/ : "/").filter(Boolean), o = t.startsWith("\\\\") ? "\\\\" : t.startsWith("/") ? "/" : "";
4031
4031
  return [...n ? [] : [{
4032
4032
  label: e,
4033
4033
  path: "",
@@ -4045,7 +4045,7 @@ function Aa(e) {
4045
4045
  return ka("", e).at(-1)?.path ?? e;
4046
4046
  }
4047
4047
  function ja(e) {
4048
- return b(e) && !/^\\\\[^\\/]+$/.test(e);
4048
+ return D(e) && !/^\\\\[^\\/]+$/.test(e);
4049
4049
  }
4050
4050
  function Ma(e, t) {
4051
4051
  let n = Aa(t);
@@ -4059,7 +4059,7 @@ function Pa(e, t) {
4059
4059
  return n < 0 ? null : ka("", t)[n + 1]?.label ?? null;
4060
4060
  }
4061
4061
  function Fa(e, t) {
4062
- let n = h(e) ? "\\" : "/";
4062
+ let n = S(e) ? "\\" : "/";
4063
4063
  return (e.endsWith(n) ? e : `${e}${n}`) + t.split("/").join(n);
4064
4064
  }
4065
4065
  function Ia(e, t) {
@@ -4101,9 +4101,9 @@ function za(e) {
4101
4101
  if (i === null) return;
4102
4102
  let a = t.includes(i) ? t : [i], o = a.map((t) => {
4103
4103
  let n = t.replace(/\/+$/, "");
4104
- return _t(n && e.mentionPath ? e.mentionPath(n) : t);
4104
+ return vt(n && e.mentionPath ? e.mentionPath(n) : t);
4105
4105
  }).filter((e) => e !== null);
4106
- o.length !== 0 && (n = a, r.dataTransfer.setData(ft, o.join(" ")));
4106
+ o.length !== 0 && (n = a, r.dataTransfer.setData(pt, o.join(" ")));
4107
4107
  },
4108
4108
  handleDragEnd(e) {
4109
4109
  if (n.length !== 0) {
@@ -4178,49 +4178,49 @@ function Ja(e, t) {
4178
4178
  n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ new Map(), n[1] = c) : c = n[1];
4179
4179
  let [l, u] = X(c), [d, f] = X(1), [p, m] = X(to), h;
4180
4180
  n[2] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ new Map(), n[2] = h) : h = n[2];
4181
- let g = Y(h), _;
4182
- n[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ new Map(), n[3] = _) : _ = n[3];
4183
- let v = Y(_), y;
4184
- n[4] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ new Map(), n[4] = y) : y = n[4];
4181
+ let _ = Y(h), y;
4182
+ n[3] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ new Map(), n[3] = y) : y = n[3];
4185
4183
  let b = Y(y), x;
4186
- n[5] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ new Map(), n[5] = x) : x = n[5];
4184
+ n[4] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ new Map(), n[4] = x) : x = n[4];
4187
4185
  let S = Y(x), C;
4188
- n[6] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ new Set(), n[6] = C) : C = n[6];
4189
- let w = Y(C), E;
4190
- n[7] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ new Set(), n[7] = E) : E = n[7];
4191
- let O = Y(E), k = Y(!0), A = Y(0), ee;
4192
- n[8] === Symbol.for("react.memo_cache_sentinel") ? (ee = [], n[8] = ee) : ee = n[8];
4193
- let j = Y(ee), M;
4186
+ n[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ new Map(), n[5] = C) : C = n[5];
4187
+ let w = Y(C), T;
4188
+ n[6] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ new Set(), n[6] = T) : T = n[6];
4189
+ let E = Y(T), D;
4190
+ n[7] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ new Set(), n[7] = D) : D = n[7];
4191
+ let O = Y(D), ee = Y(!0), k = Y(0), A;
4192
+ n[8] === Symbol.for("react.memo_cache_sentinel") ? (A = [], n[8] = A) : A = n[8];
4193
+ let j = Y(A), M;
4194
4194
  n[9] !== t || n[10] !== e ? (M = (n, r) => {
4195
- w.current.add(n), O.current.add(n);
4196
- let i = ye.listEntries({
4195
+ E.current.add(n), O.current.add(n);
4196
+ let i = be.listEntries({
4197
4197
  environmentId: e,
4198
4198
  input: {
4199
4199
  cwd: t,
4200
4200
  directoryPath: n
4201
4201
  }
4202
- }), c = b.current.get(n), l = (async () => {
4203
- c && await c, A.current >= 4 ? await new Promise((e) => j.current.push(e)) : A.current += 1;
4204
- let e = k.current ? await ne(re, i, {
4202
+ }), c = S.current.get(n), l = (async () => {
4203
+ c && await c, k.current >= 4 ? await new Promise((e) => j.current.push(e)) : k.current += 1;
4204
+ let e = ee.current ? await F(re, i, {
4205
4205
  refresh: !0,
4206
4206
  reportFailure: !1,
4207
4207
  reportDefect: !1
4208
4208
  }) : void 0, t = j.current.shift();
4209
- return t ? t() : --A.current, e;
4209
+ return t ? t() : --k.current, e;
4210
4210
  })().then((e) => {
4211
- if (k.current && e && v.current.get(n) === l) {
4211
+ if (ee.current && e && b.current.get(n) === l) {
4212
4212
  if (e._tag === "Success") {
4213
- let t = e.value.entries.filter((e) => e.path.slice(0, Math.max(0, e.path.lastIndexOf("/"))) === n), r = new Map(g.current).set(n, t), i = new Set(t.filter(eo).map($a)), a = n === "" ? "" : `${n}/`, o = [...O.current].filter((e) => {
4213
+ let t = e.value.entries.filter((e) => e.path.slice(0, Math.max(0, e.path.lastIndexOf("/"))) === n), r = new Map(_.current).set(n, t), i = new Set(t.filter(eo).map($a)), a = n === "" ? "" : `${n}/`, o = [...O.current].filter((e) => {
4214
4214
  if (e === n || !e.startsWith(a)) return !1;
4215
4215
  let t = e.indexOf("/", a.length);
4216
4216
  return !i.has(t === -1 ? e : e.slice(0, t));
4217
4217
  });
4218
4218
  for (let e of o) {
4219
- r.delete(e), w.current.delete(e), O.current.delete(e);
4220
- let t = v.current.get(e);
4221
- t && b.current.set(e, t), v.current.delete(e), S.current.delete(e);
4219
+ r.delete(e), E.current.delete(e), O.current.delete(e);
4220
+ let t = b.current.get(e);
4221
+ t && S.current.set(e, t), b.current.delete(e), w.current.delete(e);
4222
4222
  }
4223
- g.current = r, s(r), o.length > 0 && m((e) => {
4223
+ _.current = r, s(r), o.length > 0 && m((e) => {
4224
4224
  let t = new Set(e);
4225
4225
  for (let e of o) t.delete(e);
4226
4226
  return t;
@@ -4230,80 +4230,80 @@ function Ja(e, t) {
4230
4230
  return t;
4231
4231
  });
4232
4232
  } else {
4233
- w.current.delete(n);
4234
- let t = le(e.cause);
4235
- u((e) => new Map(e).set(n, _e(t, o) ?? o(a("Unable to load folder."))));
4233
+ E.current.delete(n);
4234
+ let t = ue(e.cause);
4235
+ u((e) => new Map(e).set(n, ve(t, o) ?? o(a("Unable to load folder."))));
4236
4236
  }
4237
4237
  }
4238
4238
  }).finally(() => {
4239
- b.current.get(n) === l && b.current.delete(n);
4240
- let e = v.current.get(n) === l;
4241
- e && v.current.delete(n), k.current && (f(Qa), !r && e && m((e) => {
4239
+ S.current.get(n) === l && S.current.delete(n);
4240
+ let e = b.current.get(n) === l;
4241
+ e && b.current.delete(n), ee.current && (f(Qa), !r && e && m((e) => {
4242
4242
  let t = new Set(e);
4243
4243
  return t.delete(n), t;
4244
4244
  }));
4245
4245
  });
4246
- return v.current.set(n, l), l;
4246
+ return b.current.set(n, l), l;
4247
4247
  }, n[9] = t, n[10] = e, n[11] = M) : M = n[11];
4248
- let N = M, P;
4249
- n[12] === N ? P = n[13] : (P = function e(t, n) {
4250
- let r = n !== void 0 && n, i = v.current.get(t);
4248
+ let N = M, te;
4249
+ n[12] === N ? te = n[13] : (te = function e(t, n) {
4250
+ let r = n !== void 0 && n, i = b.current.get(t);
4251
4251
  if (i) {
4252
4252
  if (!r) return i;
4253
- let n = S.current.get(t);
4253
+ let n = w.current.get(t);
4254
4254
  return n || (n = i.then(() => {
4255
- if (S.current.get(t) === n && (S.current.delete(t), k.current && O.current.has(t))) return e(t, !0);
4256
- }), S.current.set(t, n)), n;
4255
+ if (w.current.get(t) === n && (w.current.delete(t), ee.current && O.current.has(t))) return e(t, !0);
4256
+ }), w.current.set(t, n)), n;
4257
4257
  }
4258
- return !r && w.current.has(t) ? Promise.resolve() : (f(Za), r || m((e) => new Set(e).add(t)), N(t, r));
4259
- }, n[12] = N, n[13] = P);
4260
- let F = P, te, I;
4261
- n[14] === N ? (te = n[15], I = n[16]) : (te = () => (k.current = !0, !v.current.has("") && !w.current.has("") && N("", !1), () => {
4262
- k.current = !1;
4263
- }), I = [N], n[14] = N, n[15] = te, n[16] = I), Ir(te, I);
4264
- let ie;
4265
- n[17] === e ? ie = n[18] : (ie = de.sessionGenerationAtom(e), n[17] = e, n[18] = ie);
4266
- let ae = ie;
4267
- T(ae);
4268
- let oe;
4269
- n[19] !== l || n[20] !== F ? (oe = () => {
4270
- for (let e of l.keys()) F(e);
4271
- }, n[19] = l, n[20] = F, n[21] = oe) : oe = n[21], D(ae, oe);
4272
- let L;
4258
+ return !r && E.current.has(t) ? Promise.resolve() : (f(Za), r || m((e) => new Set(e).add(t)), N(t, r));
4259
+ }, n[12] = N, n[13] = te);
4260
+ let P = te, ne, ie;
4261
+ n[14] === N ? (ne = n[15], ie = n[16]) : (ne = () => (ee.current = !0, !b.current.has("") && !E.current.has("") && N("", !1), () => {
4262
+ ee.current = !1;
4263
+ }), ie = [N], n[14] = N, n[15] = ne, n[16] = ie), Ir(ne, ie);
4264
+ let ae;
4265
+ n[17] === e ? ae = n[18] : (ae = fe.sessionGenerationAtom(e), n[17] = e, n[18] = ae);
4266
+ let oe = ae;
4267
+ v(oe);
4268
+ let I;
4269
+ n[19] !== l || n[20] !== P ? (I = () => {
4270
+ for (let e of l.keys()) P(e);
4271
+ }, n[19] = l, n[20] = P, n[21] = I) : I = n[21], g(oe, I);
4272
+ let se;
4273
4273
  if (n[22] !== i) {
4274
- L = [];
4274
+ se = [];
4275
4275
  let e = (t) => {
4276
- for (let n of i.get(t) ?? []) L.push(n), n.kind === "directory" && e(n.path);
4276
+ for (let n of i.get(t) ?? []) se.push(n), n.kind === "directory" && e(n.path);
4277
4277
  };
4278
- e(""), n[22] = i, n[23] = L;
4279
- } else L = n[23];
4280
- let R;
4281
- n[24] === L ? R = n[25] : (R = /* @__PURE__ */ new Set(["", ...L.filter(Xa).map(Ya)]), n[24] = L, n[25] = R);
4282
- let se = R, ce;
4283
- n[26] !== F || n[27] !== se ? (ce = () => {
4284
- let e = [...O.current].filter((e) => se.has(e));
4278
+ e(""), n[22] = i, n[23] = se;
4279
+ } else se = n[23];
4280
+ let L;
4281
+ n[24] === se ? L = n[25] : (L = /* @__PURE__ */ new Set(["", ...se.filter(Xa).map(Ya)]), n[24] = se, n[25] = L);
4282
+ let ce = L, le;
4283
+ n[26] !== P || n[27] !== ce ? (le = () => {
4284
+ let e = [...O.current].filter((e) => ce.has(e));
4285
4285
  for (let t of e) {
4286
- if (!k.current) break;
4287
- F(t, !0);
4286
+ if (!ee.current) break;
4287
+ P(t, !0);
4288
4288
  }
4289
- }, n[26] = F, n[27] = se, n[28] = ce) : ce = n[28];
4290
- let ue = ce, z = d > 0, fe;
4291
- n[29] === i ? fe = n[30] : (fe = i.has(""), n[29] = i, n[30] = fe);
4292
- let pe;
4293
- n[31] !== l || n[32] !== se ? (pe = [...l].find((e) => {
4294
- let [t] = e;
4295
- return se.has(t);
4296
- })?.[1] ?? null, n[31] = l, n[32] = se, n[33] = pe) : pe = n[33];
4289
+ }, n[26] = P, n[27] = ce, n[28] = le) : le = n[28];
4290
+ let de = le, R = d > 0, pe;
4291
+ n[29] === i ? pe = n[30] : (pe = i.has(""), n[29] = i, n[30] = pe);
4297
4292
  let me;
4298
- return n[34] !== L || n[35] !== F || n[36] !== p || n[37] !== ue || n[38] !== z || n[39] !== fe || n[40] !== pe ? (me = {
4299
- entries: L,
4300
- load: F,
4301
- refresh: ue,
4302
- isPending: z,
4293
+ n[31] !== l || n[32] !== ce ? (me = [...l].find((e) => {
4294
+ let [t] = e;
4295
+ return ce.has(t);
4296
+ })?.[1] ?? null, n[31] = l, n[32] = ce, n[33] = me) : me = n[33];
4297
+ let he;
4298
+ return n[34] !== se || n[35] !== P || n[36] !== p || n[37] !== de || n[38] !== R || n[39] !== pe || n[40] !== me ? (he = {
4299
+ entries: se,
4300
+ load: P,
4301
+ refresh: de,
4302
+ isPending: R,
4303
4303
  loadingDirectories: p,
4304
- ready: fe,
4305
- error: pe
4306
- }, n[34] = L, n[35] = F, n[36] = p, n[37] = ue, n[38] = z, n[39] = fe, n[40] = pe, n[41] = me) : me = n[41], me;
4304
+ ready: pe,
4305
+ error: me
4306
+ }, n[34] = se, n[35] = P, n[36] = p, n[37] = de, n[38] = R, n[39] = pe, n[40] = me, n[41] = he) : he = n[41], he;
4307
4307
  }
4308
4308
  function Ya(e) {
4309
4309
  return e.path;
@@ -4331,7 +4331,7 @@ function no(e) {
4331
4331
  return e.kind === "directory" ? `${e.path}/` : e.path;
4332
4332
  }
4333
4333
  function ro(e) {
4334
- let t = Z(18), n = C(), r;
4334
+ let t = Z(18), n = u(), r;
4335
4335
  t[0] === n ? r = t[1] : (r = n("Refresh workspace files"), t[0] = n, t[1] = r);
4336
4336
  let i;
4337
4337
  t[2] !== e.onRefresh || t[3] !== r ? (i = /* @__PURE__ */ Q(N, {
@@ -4342,9 +4342,9 @@ function ro(e) {
4342
4342
  onClick: e.onRefresh
4343
4343
  }), t[2] = e.onRefresh, t[3] = r, t[4] = i) : i = t[4];
4344
4344
  let a;
4345
- t[5] === e.isPending ? a = t[6] : (a = /* @__PURE__ */ Q(gn, { refreshing: e.isPending }), t[5] = e.isPending, t[6] = a);
4345
+ t[5] === e.isPending ? a = t[6] : (a = /* @__PURE__ */ Q(_n, { refreshing: e.isPending }), t[5] = e.isPending, t[6] = a);
4346
4346
  let o;
4347
- t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ Q(R, {
4347
+ t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ Q(L, {
4348
4348
  render: i,
4349
4349
  children: a
4350
4350
  }), t[7] = i, t[8] = a, t[9] = o) : o = t[9];
@@ -4353,22 +4353,22 @@ function ro(e) {
4353
4353
  let c;
4354
4354
  t[13] === s ? c = t[14] : (c = /* @__PURE__ */ Q(P, { children: s }), t[13] = s, t[14] = c);
4355
4355
  let l;
4356
- return t[15] !== o || t[16] !== c ? (l = /* @__PURE__ */ $(te, { children: [o, c] }), t[15] = o, t[16] = c, t[17] = l) : l = t[17], l;
4356
+ return t[15] !== o || t[16] !== c ? (l = /* @__PURE__ */ $(ne, { children: [o, c] }), t[15] = o, t[16] = c, t[17] = l) : l = t[17], l;
4357
4357
  }
4358
4358
  function io(e) {
4359
4359
  let t = Z(16), n, r;
4360
4360
  t[0] === e ? (n = t[1], r = t[2]) : ({ref: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
4361
- let i = C(), a = n.name, o = n.value, s = n.ariaLabel, c;
4361
+ let i = u(), a = n.name, o = n.value, s = n.ariaLabel, c;
4362
4362
  t[3] === i ? c = t[4] : (c = i("Search files"), t[3] = i, t[4] = c);
4363
- let l, u;
4364
- t[5] === n ? (l = t[6], u = t[7]) : (l = (e) => n.onValueChange(e.target.value), u = (e) => {
4363
+ let l, d;
4364
+ t[5] === n ? (l = t[6], d = t[7]) : (l = (e) => n.onValueChange(e.target.value), d = (e) => {
4365
4365
  e.key === "Escape" && (n.onClose(), e.currentTarget.blur());
4366
- }, t[5] = n, t[6] = l, t[7] = u);
4367
- let d;
4368
- return t[8] !== n.ariaLabel || t[9] !== n.name || t[10] !== n.value || t[11] !== r || t[12] !== c || t[13] !== l || t[14] !== u ? (d = /* @__PURE__ */ Q(yn, {
4366
+ }, t[5] = n, t[6] = l, t[7] = d);
4367
+ let f;
4368
+ return t[8] !== n.ariaLabel || t[9] !== n.name || t[10] !== n.value || t[11] !== r || t[12] !== c || t[13] !== l || t[14] !== d ? (f = /* @__PURE__ */ Q(bn, {
4369
4369
  variant: "ghost",
4370
4370
  className: "h-7 min-w-0 flex-1",
4371
- children: /* @__PURE__ */ Q(vn, {
4371
+ children: /* @__PURE__ */ Q(yn, {
4372
4372
  ref: r,
4373
4373
  type: "search",
4374
4374
  name: a,
@@ -4379,9 +4379,9 @@ function io(e) {
4379
4379
  "data-workspace-focus-default": !0,
4380
4380
  spellCheck: !1,
4381
4381
  onChange: l,
4382
- onKeyDown: u
4382
+ onKeyDown: d
4383
4383
  })
4384
- }), t[8] = n.ariaLabel, t[9] = n.name, t[10] = n.value, t[11] = r, t[12] = c, t[13] = l, t[14] = u, t[15] = d) : d = t[15], d;
4384
+ }), t[8] = n.ariaLabel, t[9] = n.name, t[10] = n.value, t[11] = r, t[12] = c, t[13] = l, t[14] = d, t[15] = f) : f = t[15], f;
4385
4385
  }
4386
4386
  function ao(e, t, n, r) {
4387
4387
  let i = new Map(e.map((e) => [e.path, e]));
@@ -4406,26 +4406,26 @@ function ao(e, t, n, r) {
4406
4406
  };
4407
4407
  }
4408
4408
  function oo(e) {
4409
- let t = Z(177), { environmentId: n, cwd: r, projectName: i, selectedPath: a, selectedPathRevealId: s, onOpenFile: c, onRefreshSelectedFile: l, workspaceMutationId: u, hostFolder: d, answersPanelFind: f } = e, p = d !== void 0 && d, m = f !== void 0 && f, h;
4410
- t[0] !== r || t[1] !== p ? (h = (e) => p ? Fa(r, e) : e, t[0] = r, t[1] = p, t[2] = h) : h = t[2];
4411
- let g = h, _ = C(), v = oe(), { resolvedTheme: y } = Je(), b = rt(), x = hn(n), { entries: S, load: w, refresh: T, ready: E, error: D, isPending: O, loadingDirectories: k } = Ja(n, r), [A, ee] = X(""), [j, M] = X(!1), F = p ? null : r, ne;
4412
- t[3] === A ? ne = t[4] : (ne = A.slice(0, 256), t[3] = A, t[4] = ne);
4413
- let re;
4414
- t[5] !== n || t[6] !== F || t[7] !== ne ? (re = {
4409
+ let t = Z(177), { environmentId: n, cwd: r, projectName: i, selectedPath: a, selectedPathRevealId: s, onOpenFile: c, onRefreshSelectedFile: l, workspaceMutationId: d, hostFolder: f, answersPanelFind: p } = e, m = f !== void 0 && f, h = p !== void 0 && p, g;
4410
+ t[0] !== r || t[1] !== m ? (g = (e) => m ? Fa(r, e) : e, t[0] = r, t[1] = m, t[2] = g) : g = t[2];
4411
+ let _ = g, v = u(), y = ee(), { resolvedTheme: b } = Ye(), x = it(), S = gn(n), { entries: C, load: w, refresh: T, ready: E, error: D, isPending: O, loadingDirectories: A } = Ja(n, r), [M, te] = X(""), [F, re] = X(!1), ie = m ? null : r, ae;
4412
+ t[3] === M ? ae = t[4] : (ae = M.slice(0, 256), t[3] = M, t[4] = ae);
4413
+ let oe;
4414
+ t[5] !== n || t[6] !== ie || t[7] !== ae ? (oe = {
4415
4415
  environmentId: n,
4416
- cwd: F,
4417
- query: ne
4418
- }, t[5] = n, t[6] = F, t[7] = ne, t[8] = re) : re = t[8];
4419
- let I = Kt(re, 200, void 0, v), ie;
4420
- t[9] !== S || t[10] !== I.entries || t[11] !== I.isPending || t[12] !== A ? (ie = ao(S, I.entries, I.isPending, A), t[9] = S, t[10] = I.entries, t[11] = I.isPending, t[12] = A, t[13] = ie) : ie = t[13];
4421
- let { entries: se, entryKinds: le, treePaths: ue, directoryPaths: z, expandableDirectoryPaths: de } = ie, fe = Y(le), pe = Y(null), me = Y(!1), he = Y(null), ge = Y(null), ve = Y(null), ye;
4422
- t[14] !== b || t[15] !== r || t[16] !== n || t[17] !== x || t[18] !== _ || t[19] !== g ? (ye = (e, t) => {
4423
- let i = He();
4416
+ cwd: ie,
4417
+ query: ae
4418
+ }, t[5] = n, t[6] = ie, t[7] = ae, t[8] = oe) : oe = t[8];
4419
+ let I = qt(oe, 200, void 0, y), se;
4420
+ t[9] !== C || t[10] !== I.entries || t[11] !== I.isPending || t[12] !== M ? (se = ao(C, I.entries, I.isPending, M), t[9] = C, t[10] = I.entries, t[11] = I.isPending, t[12] = M, t[13] = se) : se = t[13];
4421
+ let { entries: ce, entryKinds: ue, treePaths: de, directoryPaths: R, expandableDirectoryPaths: fe } = se, pe = Y(ue), me = Y(null), he = Y(!1), ge = Y(null), _e = Y(null), ye = Y(null), be;
4422
+ t[14] !== x || t[15] !== r || t[16] !== n || t[17] !== S || t[18] !== v || t[19] !== _ ? (be = (e, t) => {
4423
+ let i = Ue();
4424
4424
  if (!i) {
4425
4425
  t.close();
4426
4426
  return;
4427
4427
  }
4428
- let a = e.path.replace(/\/$/, ""), s = et(g(a)), c = ve.current, l = c !== null && performance.now() - c.at < 1e3, u = t.anchorElement.getBoundingClientRect(), d = l ? {
4428
+ let a = e.path.replace(/\/$/, ""), s = tt(_(a)), c = ye.current, l = c !== null && performance.now() - c.at < 1e3, u = t.anchorElement.getBoundingClientRect(), d = l ? {
4429
4429
  x: c.x,
4430
4430
  y: c.y
4431
4431
  } : {
@@ -4435,350 +4435,350 @@ function oo(e) {
4435
4435
  environmentId: n,
4436
4436
  filePath: a,
4437
4437
  workspaceRoot: r
4438
- }, p = x.buildItems(f);
4439
- t.close({ restoreFocus: !l }), ae(async () => {
4438
+ }, p = S.buildItems(f);
4439
+ t.close({ restoreFocus: !l }), k(async () => {
4440
4440
  let e = await i.contextMenu.show([
4441
4441
  ...p,
4442
4442
  {
4443
4443
  id: "copy-mention",
4444
- label: _("Copy mention")
4444
+ label: v("Copy mention")
4445
4445
  },
4446
4446
  {
4447
4447
  id: "add-to-chat",
4448
- label: _("Add to chat")
4448
+ label: v("Add to chat")
4449
4449
  }
4450
4450
  ], d);
4451
4451
  if (e !== null) {
4452
- if (p.some((t) => t.id === e) || e.startsWith("editor:")) await x.activate(e, f);
4452
+ if (p.some((t) => t.id === e) || e.startsWith("editor:")) await S.activate(e, f);
4453
4453
  else if (e === "copy-mention") try {
4454
- await Be(s);
4454
+ await Ve(s);
4455
4455
  } catch (e) {
4456
4456
  let t = e;
4457
- We.add({
4457
+ Ge.add({
4458
4458
  type: "error",
4459
- title: _("Failed to copy mention"),
4460
- description: _e(t, o) ?? _("An error occurred.")
4459
+ title: v("Failed to copy mention"),
4460
+ description: ve(t, o) ?? v("An error occurred.")
4461
4461
  });
4462
4462
  }
4463
4463
  else if (e === "add-to-chat") {
4464
- let e = b?.current;
4464
+ let e = x?.current;
4465
4465
  if (!e) {
4466
- We.add({
4466
+ Ge.add({
4467
4467
  type: "error",
4468
- title: _("Unable to add to chat"),
4469
- description: _("Open a chat for this project and try again.")
4468
+ title: v("Unable to add to chat"),
4469
+ description: v("Open a chat for this project and try again.")
4470
4470
  });
4471
4471
  return;
4472
4472
  }
4473
- e.insertTextAtEnd(`${s} `, { ensureLeadingBoundary: !0 }) || We.add({
4473
+ e.insertTextAtEnd(`${s} `, { ensureLeadingBoundary: !0 }) || Ge.add({
4474
4474
  type: "error",
4475
- title: _("Unable to add to chat"),
4476
- description: _("The chat isn't ready to accept input right now.")
4475
+ title: v("Unable to add to chat"),
4476
+ description: v("The chat isn't ready to accept input right now.")
4477
4477
  });
4478
4478
  }
4479
4479
  }
4480
4480
  }).then(uo);
4481
- }, t[14] = b, t[15] = r, t[16] = n, t[17] = x, t[18] = _, t[19] = g, t[20] = ye) : ye = t[20];
4482
- let be = Ge(ye), xe = Y(k), Se;
4483
- t[21] !== r || t[22] !== p ? (Se = za(p ? { mentionPath: (e) => Fa(r, e) } : {}), t[21] = r, t[22] = p, t[23] = Se) : Se = t[23];
4484
- let Ce = Se, Te;
4485
- t[24] === be ? Te = t[25] : (Te = { contextMenu: {
4481
+ }, t[14] = x, t[15] = r, t[16] = n, t[17] = S, t[18] = v, t[19] = _, t[20] = be) : be = t[20];
4482
+ let xe = Ke(be), Se = Y(A), Ce;
4483
+ t[21] !== r || t[22] !== m ? (Ce = za(m ? { mentionPath: (e) => Fa(r, e) } : {}), t[21] = r, t[22] = m, t[23] = Ce) : Ce = t[23];
4484
+ let we = Ce, Ee;
4485
+ t[24] === xe ? Ee = t[25] : (Ee = { contextMenu: {
4486
4486
  triggerMode: "right-click",
4487
4487
  onOpen: (e, t) => {
4488
- be(e, t);
4488
+ xe(e, t);
4489
4489
  }
4490
- } }, t[24] = be, t[25] = Te);
4491
- let De;
4492
- t[26] === Symbol.for("react.memo_cache_sentinel") ? (De = { canDrop: lo }, t[26] = De) : De = t[26];
4490
+ } }, t[24] = xe, t[25] = Ee);
4493
4491
  let Oe;
4494
- t[27] !== Ce || t[28] !== c || t[29] !== g ? (Oe = (e) => {
4495
- if (Ce.handleSelectionChange(e), me.current || Ce.isDragInProgress()) return;
4496
- let t = e.at(-1)?.replace(/\/$/, "");
4497
- t && fe.current.get(t) === "file" && (he.current = t, c(g(t)));
4498
- }, t[27] = Ce, t[28] = c, t[29] = g, t[30] = Oe) : Oe = t[30];
4492
+ t[26] === Symbol.for("react.memo_cache_sentinel") ? (Oe = { canDrop: lo }, t[26] = Oe) : Oe = t[26];
4499
4493
  let ke;
4500
- t[31] === Symbol.for("react.memo_cache_sentinel") ? (ke = [], t[31] = ke) : ke = t[31];
4494
+ t[27] !== we || t[28] !== c || t[29] !== _ ? (ke = (e) => {
4495
+ if (we.handleSelectionChange(e), he.current || we.isDragInProgress()) return;
4496
+ let t = e.at(-1)?.replace(/\/$/, "");
4497
+ t && pe.current.get(t) === "file" && (ge.current = t, c(_(t)));
4498
+ }, t[27] = we, t[28] = c, t[29] = _, t[30] = ke) : ke = t[30];
4501
4499
  let Ae;
4502
- t[32] === _ ? Ae = t[33] : (Ae = (e) => {
4500
+ t[31] === Symbol.for("react.memo_cache_sentinel") ? (Ae = [], t[31] = Ae) : Ae = t[31];
4501
+ let je;
4502
+ t[32] === v ? je = t[33] : (je = (e) => {
4503
4503
  let { item: t, row: n } = e;
4504
- return n.kind === "directory" && n.isExpanded && xe.current.has(t.path.replace(/\/$/, "")) ? {
4504
+ return n.kind === "directory" && n.isExpanded && Se.current.has(t.path.replace(/\/$/, "")) ? {
4505
4505
  icon: "hanzo-tree-icon-loading",
4506
- title: _("Loading…")
4506
+ title: v("Loading…")
4507
4507
  } : null;
4508
- }, t[32] = _, t[33] = Ae);
4509
- let je;
4510
- t[34] === Symbol.for("react.memo_cache_sentinel") ? (je = (e) => ee(e ?? ""), t[34] = je) : je = t[34];
4508
+ }, t[32] = v, t[33] = je);
4511
4509
  let Me;
4512
- t[35] !== Te || t[36] !== Oe || t[37] !== Ae ? (Me = {
4513
- composition: Te,
4514
- dragAndDrop: De,
4510
+ t[34] === Symbol.for("react.memo_cache_sentinel") ? (Me = (e) => te(e ?? ""), t[34] = Me) : Me = t[34];
4511
+ let Ne;
4512
+ t[35] !== Ee || t[36] !== ke || t[37] !== je ? (Ne = {
4513
+ composition: Ee,
4514
+ dragAndDrop: Oe,
4515
4515
  density: "compact",
4516
4516
  fileTreeSearchMode: "hide-non-matches",
4517
4517
  flattenEmptyDirectories: !0,
4518
4518
  initialExpansion: "closed",
4519
- icons: St,
4520
- onSelectionChange: Oe,
4521
- paths: ke,
4522
- renderRowDecoration: Ae,
4519
+ icons: Ct,
4520
+ onSelectionChange: ke,
4521
+ paths: Ae,
4522
+ renderRowDecoration: je,
4523
4523
  search: !1,
4524
- onSearchChange: je,
4525
- unsafeCSS: xn
4526
- }, t[35] = Te, t[36] = Oe, t[37] = Ae, t[38] = Me) : Me = t[38];
4527
- let { model: B } = kn(Me), Ne, Pe;
4528
- t[39] !== k || t[40] !== B ? (Ne = () => {
4529
- xe.current !== k && (xe.current = k, B.setComposition(B.getComposition()));
4530
- }, Pe = [k, B], t[39] = k, t[40] = B, t[41] = Ne, t[42] = Pe) : (Ne = t[41], Pe = t[42]), Ir(Ne, Pe);
4531
- let V = Kr(B), Fe;
4532
- t[43] !== V.matchingPaths || t[44] !== V.value ? (Fe = V.value.trim().length > 0 && V.matchingPaths.length === 0, t[43] = V.matchingPaths, t[44] = V.value, t[45] = Fe) : Fe = t[45];
4533
- let Ie = Fe, Le;
4534
- t[46] === de ? Le = t[47] : (Le = (e) => Tn(e, de), t[46] = de, t[47] = Le);
4535
- let Re = Wr(B, Le), ze;
4536
- t[48] !== Re || t[49] !== z || t[50] !== j || t[51] !== de || t[52] !== B ? (ze = () => {
4537
- let e = !(j || Re);
4538
- M(e), bn(B, e ? de : z, e);
4539
- }, t[48] = Re, t[49] = z, t[50] = j, t[51] = de, t[52] = B, t[53] = ze) : ze = t[53];
4540
- let Ve = ze, Ue;
4541
- t[54] === V ? Ue = t[55] : (Ue = () => {
4542
- ee(""), V.close();
4543
- }, t[54] = V, t[55] = Ue);
4544
- let Ke = Ue, qe = Y(null), Ye;
4545
- t[56] === Symbol.for("react.memo_cache_sentinel") ? (Ye = () => {
4546
- qe.current?.focus(), qe.current?.select();
4547
- }, t[56] = Ye) : Ye = t[56];
4548
- let Xe = Ye, Ze;
4549
- t[57] === Symbol.for("react.memo_cache_sentinel") ? (Ze = (e) => {
4550
- e === "find" && qe.current?.getClientRects().length && Xe();
4551
- }, t[57] = Ze) : Ze = t[57];
4552
- let Qe = Lr(Ze), $e;
4553
- t[58] !== m || t[59] !== Qe ? ($e = () => {
4554
- if (m) return _n(Qe);
4555
- }, t[58] = m, t[59] = Qe, t[60] = $e) : $e = t[60];
4556
- let tt;
4557
- t[61] === m ? tt = t[62] : (tt = [m], t[61] = m, t[62] = tt), Ir($e, tt);
4524
+ onSearchChange: Me,
4525
+ unsafeCSS: Sn
4526
+ }, t[35] = Ee, t[36] = ke, t[37] = je, t[38] = Ne) : Ne = t[38];
4527
+ let { model: z } = An(Ne), Pe, Fe;
4528
+ t[39] !== A || t[40] !== z ? (Pe = () => {
4529
+ Se.current !== A && (Se.current = A, z.setComposition(z.getComposition()));
4530
+ }, Fe = [A, z], t[39] = A, t[40] = z, t[41] = Pe, t[42] = Fe) : (Pe = t[41], Fe = t[42]), Ir(Pe, Fe);
4531
+ let B = Kr(z), Ie;
4532
+ t[43] !== B.matchingPaths || t[44] !== B.value ? (Ie = B.value.trim().length > 0 && B.matchingPaths.length === 0, t[43] = B.matchingPaths, t[44] = B.value, t[45] = Ie) : Ie = t[45];
4533
+ let Le = Ie, Re;
4534
+ t[46] === fe ? Re = t[47] : (Re = (e) => En(e, fe), t[46] = fe, t[47] = Re);
4535
+ let ze = Wr(z, Re), Be;
4536
+ t[48] !== ze || t[49] !== R || t[50] !== F || t[51] !== fe || t[52] !== z ? (Be = () => {
4537
+ let e = !(F || ze);
4538
+ re(e), xn(z, e ? fe : R, e);
4539
+ }, t[48] = ze, t[49] = R, t[50] = F, t[51] = fe, t[52] = z, t[53] = Be) : Be = t[53];
4540
+ let He = Be, We;
4541
+ t[54] === B ? We = t[55] : (We = () => {
4542
+ te(""), B.close();
4543
+ }, t[54] = B, t[55] = We);
4544
+ let qe = We, Je = Y(null), Xe;
4545
+ t[56] === Symbol.for("react.memo_cache_sentinel") ? (Xe = () => {
4546
+ Je.current?.focus(), Je.current?.select();
4547
+ }, t[56] = Xe) : Xe = t[56];
4548
+ let Ze = Xe, Qe;
4549
+ t[57] === Symbol.for("react.memo_cache_sentinel") ? (Qe = (e) => {
4550
+ e === "find" && Je.current?.getClientRects().length && Ze();
4551
+ }, t[57] = Qe) : Qe = t[57];
4552
+ let $e = Lr(Qe), et;
4553
+ t[58] !== h || t[59] !== $e ? (et = () => {
4554
+ if (h) return vn($e);
4555
+ }, t[58] = h, t[59] = $e, t[60] = et) : et = t[60];
4558
4556
  let nt;
4559
- t[63] === Symbol.for("react.memo_cache_sentinel") ? (nt = /* @__PURE__ */ new Set(), t[63] = nt) : nt = t[63];
4560
- let it = Y(nt), H = `${n}:${r}`, at;
4561
- t[64] === H ? at = t[65] : (at = () => new Set(Cn(H)), t[64] = H, t[65] = at);
4562
- let [ot] = X(at), st, ct;
4563
- t[66] !== z || t[67] !== H || t[68] !== w || t[69] !== B || t[70] !== ot ? (st = () => {
4564
- let e = new Set(z);
4565
- for (let t of it.current) e.has(t) || it.current.delete(t);
4566
- let t = En(() => {
4567
- if (B.isSearchOpen()) return;
4557
+ t[61] === h ? nt = t[62] : (nt = [h], t[61] = h, t[62] = nt), Ir(et, nt);
4558
+ let rt;
4559
+ t[63] === Symbol.for("react.memo_cache_sentinel") ? (rt = /* @__PURE__ */ new Set(), t[63] = rt) : rt = t[63];
4560
+ let at = Y(rt), V = `${n}:${r}`, ot;
4561
+ t[64] === V ? ot = t[65] : (ot = () => new Set(wn(V)), t[64] = V, t[65] = ot);
4562
+ let [st] = X(ot), ct, lt;
4563
+ t[66] !== R || t[67] !== V || t[68] !== w || t[69] !== z || t[70] !== st ? (ct = () => {
4564
+ let e = new Set(R);
4565
+ for (let t of at.current) e.has(t) || at.current.delete(t);
4566
+ let t = Dn(() => {
4567
+ if (z.isSearchOpen()) return;
4568
4568
  let e = !1;
4569
- for (let t of z) {
4570
- let n = B.getItem(t);
4571
- n?.isDirectory() && ot.delete(t) && "expand" in n && n.expand(), n?.isDirectory() && "isExpanded" in n && n.isExpanded() ? it.current.has(t) || (it.current.add(t), e = !0, w(t.replace(/\/$/, ""))) : (n?.isDirectory() && it.current.has(t) && M(!1), it.current.delete(t) && (e = !0));
4569
+ for (let t of R) {
4570
+ let n = z.getItem(t);
4571
+ n?.isDirectory() && st.delete(t) && "expand" in n && n.expand(), n?.isDirectory() && "isExpanded" in n && n.isExpanded() ? at.current.has(t) || (at.current.add(t), e = !0, w(t.replace(/\/$/, ""))) : (n?.isDirectory() && at.current.has(t) && re(!1), at.current.delete(t) && (e = !0));
4572
4572
  }
4573
- e && Dn(H, [...it.current, ...ot]);
4573
+ e && On(V, [...at.current, ...st]);
4574
4574
  });
4575
- return t(), B.subscribe(t);
4576
- }, ct = [
4577
- z,
4578
- H,
4575
+ return t(), z.subscribe(t);
4576
+ }, lt = [
4577
+ R,
4578
+ V,
4579
4579
  w,
4580
- B,
4581
- ot
4582
- ], t[66] = z, t[67] = H, t[68] = w, t[69] = B, t[70] = ot, t[71] = st, t[72] = ct) : (st = t[71], ct = t[72]), Ir(st, ct);
4583
- let U, lt;
4584
- t[73] !== se || t[74] !== B ? (U = () => {
4585
- B.setGitStatus(se.filter(co).map(so));
4586
- }, lt = [se, B], t[73] = se, t[74] = B, t[75] = U, t[76] = lt) : (U = t[75], lt = t[76]), Ir(U, lt);
4587
- let ut, dt;
4588
- t[77] !== w || t[78] !== a ? (ut = () => {
4580
+ z,
4581
+ st
4582
+ ], t[66] = R, t[67] = V, t[68] = w, t[69] = z, t[70] = st, t[71] = ct, t[72] = lt) : (ct = t[71], lt = t[72]), Ir(ct, lt);
4583
+ let H, ut;
4584
+ t[73] !== ce || t[74] !== z ? (H = () => {
4585
+ z.setGitStatus(ce.filter(co).map(so));
4586
+ }, ut = [ce, z], t[73] = ce, t[74] = z, t[75] = H, t[76] = ut) : (H = t[75], ut = t[76]), Ir(H, ut);
4587
+ let dt, ft;
4588
+ t[77] !== w || t[78] !== a ? (dt = () => {
4589
4589
  if (!a) return;
4590
4590
  let e = new AbortController();
4591
4591
  return qa(a, w, { signal: e.signal }), () => {
4592
4592
  e.abort();
4593
4593
  };
4594
- }, dt = [w, a], t[77] = w, t[78] = a, t[79] = ut, t[80] = dt) : (ut = t[79], dt = t[80]), Ir(ut, dt);
4595
- let ft;
4596
- t[81] === V ? ft = t[82] : (ft = (e) => {
4597
- ee(e), e.trim().length === 0 ? V.close() : V.setValue(e);
4598
- }, t[81] = V, t[82] = ft);
4599
- let pt = ft, mt;
4600
- t[83] !== l || t[84] !== I || t[85] !== A || t[86] !== T ? (mt = () => {
4601
- T(), A.trim() && I.refresh(), l?.();
4602
- }, t[83] = l, t[84] = I, t[85] = A, t[86] = T, t[87] = mt) : mt = t[87];
4603
- let gt = mt, _t;
4604
- t[88] !== I || t[89] !== A || t[90] !== T ? (_t = () => {
4605
- T(), A.trim() && I.refresh();
4606
- }, t[88] = I, t[89] = A, t[90] = T, t[91] = _t) : _t = t[91];
4607
- let vt = `files:${n}:${r}`, yt;
4608
- t[92] !== _t || t[93] !== vt || t[94] !== u ? (yt = {
4609
- mutationId: u,
4610
- refresh: _t,
4611
- resourceKey: vt
4612
- }, t[92] = _t, t[93] = vt, t[94] = u, t[95] = yt) : yt = t[95], ht(yt);
4613
- let bt, xt;
4614
- t[96] !== le || t[97] !== B || t[98] !== E || t[99] !== ue ? (bt = () => {
4615
- if (!E || pe.current === ue) return;
4616
- fe.current = le;
4617
- let e = pe.current;
4618
- if (pe.current = ue, e === null) {
4619
- B.resetPaths(ue);
4594
+ }, ft = [w, a], t[77] = w, t[78] = a, t[79] = dt, t[80] = ft) : (dt = t[79], ft = t[80]), Ir(dt, ft);
4595
+ let pt;
4596
+ t[81] === B ? pt = t[82] : (pt = (e) => {
4597
+ te(e), e.trim().length === 0 ? B.close() : B.setValue(e);
4598
+ }, t[81] = B, t[82] = pt);
4599
+ let mt = pt, ht;
4600
+ t[83] !== l || t[84] !== I || t[85] !== M || t[86] !== T ? (ht = () => {
4601
+ T(), M.trim() && I.refresh(), l?.();
4602
+ }, t[83] = l, t[84] = I, t[85] = M, t[86] = T, t[87] = ht) : ht = t[87];
4603
+ let _t = ht, vt;
4604
+ t[88] !== I || t[89] !== M || t[90] !== T ? (vt = () => {
4605
+ T(), M.trim() && I.refresh();
4606
+ }, t[88] = I, t[89] = M, t[90] = T, t[91] = vt) : vt = t[91];
4607
+ let yt = `files:${n}:${r}`, bt;
4608
+ t[92] !== vt || t[93] !== yt || t[94] !== d ? (bt = {
4609
+ mutationId: d,
4610
+ refresh: vt,
4611
+ resourceKey: yt
4612
+ }, t[92] = vt, t[93] = yt, t[94] = d, t[95] = bt) : bt = t[95], gt(bt);
4613
+ let xt, St;
4614
+ t[96] !== ue || t[97] !== z || t[98] !== E || t[99] !== de ? (xt = () => {
4615
+ if (!E || me.current === de) return;
4616
+ pe.current = ue;
4617
+ let e = me.current;
4618
+ if (me.current = de, e === null) {
4619
+ z.resetPaths(de);
4620
4620
  return;
4621
4621
  }
4622
- let t = Ka(e, ue);
4623
- if (Ua(e, ue, t)) {
4624
- let e = B.isSearchOpen() ? B.getSearchValue() : null;
4625
- e !== null && B.closeSearch(), B.resetPaths(ue, { initialExpandedPaths: [...it.current] }), e !== null && B.setSearch(e);
4626
- } else t.length > 0 && B.batch(t);
4627
- }, xt = [
4622
+ let t = Ka(e, de);
4623
+ if (Ua(e, de, t)) {
4624
+ let e = z.isSearchOpen() ? z.getSearchValue() : null;
4625
+ e !== null && z.closeSearch(), z.resetPaths(de, { initialExpandedPaths: [...at.current] }), e !== null && z.setSearch(e);
4626
+ } else t.length > 0 && z.batch(t);
4627
+ }, St = [
4628
4628
  E,
4629
- le,
4630
- B,
4631
- ue
4632
- ], t[96] = le, t[97] = B, t[98] = E, t[99] = ue, t[100] = bt, t[101] = xt) : (bt = t[100], xt = t[101]), Ir(bt, xt);
4633
- let Ct, W;
4634
- t[102] !== j || t[103] !== de || t[104] !== B || t[105] !== A ? (Ct = () => {
4635
- j && !A.trim() && bn(B, de, !0);
4636
- }, W = [
4637
- de,
4638
- j,
4639
- B,
4640
- A
4641
- ], t[102] = j, t[103] = de, t[104] = B, t[105] = A, t[106] = Ct, t[107] = W) : (Ct = t[106], W = t[107]), Ir(Ct, W);
4642
- let wt, Tt;
4643
- t[108] !== le || t[109] !== B || t[110] !== a || t[111] !== s ? (wt = () => {
4629
+ ue,
4630
+ z,
4631
+ de
4632
+ ], t[96] = ue, t[97] = z, t[98] = E, t[99] = de, t[100] = xt, t[101] = St) : (xt = t[100], St = t[101]), Ir(xt, St);
4633
+ let wt, U;
4634
+ t[102] !== F || t[103] !== fe || t[104] !== z || t[105] !== M ? (wt = () => {
4635
+ F && !M.trim() && xn(z, fe, !0);
4636
+ }, U = [
4637
+ fe,
4638
+ F,
4639
+ z,
4640
+ M
4641
+ ], t[102] = F, t[103] = fe, t[104] = z, t[105] = M, t[106] = wt, t[107] = U) : (wt = t[106], U = t[107]), Ir(wt, U);
4642
+ let Tt, Et;
4643
+ t[108] !== ue || t[109] !== z || t[110] !== a || t[111] !== s ? (Tt = () => {
4644
4644
  if (!a) {
4645
- ge.current = null;
4645
+ _e.current = null;
4646
4646
  return;
4647
4647
  }
4648
- let e = le.get(a);
4648
+ let e = ue.get(a);
4649
4649
  if (e === void 0) {
4650
- ge.current = null;
4650
+ _e.current = null;
4651
4651
  return;
4652
4652
  }
4653
4653
  let t = {
4654
4654
  path: a,
4655
4655
  revealId: s
4656
- }, n = ge.current;
4656
+ }, n = _e.current;
4657
4657
  if (n?.path === t.path && n.revealId === t.revealId) return;
4658
- let r = e === "directory" ? `${a}/` : a, i = B.getItem(r);
4658
+ let r = e === "directory" ? `${a}/` : a, i = z.getItem(r);
4659
4659
  if (!i) return;
4660
- if (B.getSelectedPaths().some((e) => e.replace(/\/$/, "") === a) && he.current === a) {
4661
- he.current = null, ge.current = t;
4660
+ if (z.getSelectedPaths().some((e) => e.replace(/\/$/, "") === a) && ge.current === a) {
4661
+ ge.current = null, _e.current = t;
4662
4662
  return;
4663
4663
  }
4664
- he.current = null, ge.current = t, me.current = !0, ee(""), B.closeSearch();
4665
- for (let e of B.getSelectedPaths()) B.getItem(e)?.deselect();
4664
+ ge.current = null, _e.current = t, he.current = !0, te(""), z.closeSearch();
4665
+ for (let e of z.getSelectedPaths()) z.getItem(e)?.deselect();
4666
4666
  let o = a.split("/"), c = "";
4667
4667
  for (let e of o.slice(0, -1)) {
4668
4668
  c = c ? `${c}/${e}` : e;
4669
- let t = B.getItem(`${c}/`) ?? B.getItem(c);
4669
+ let t = z.getItem(`${c}/`) ?? z.getItem(c);
4670
4670
  t && "expand" in t && t.expand();
4671
4671
  }
4672
- "expand" in i && i.expand(), i.select(), B.scrollToPath(r, {
4672
+ "expand" in i && i.expand(), i.select(), z.scrollToPath(r, {
4673
4673
  focus: !0,
4674
4674
  offset: "center"
4675
4675
  }), queueMicrotask(() => {
4676
- me.current = !1;
4676
+ he.current = !1;
4677
4677
  });
4678
- }, Tt = [
4679
- le,
4680
- B,
4678
+ }, Et = [
4679
+ ue,
4680
+ z,
4681
4681
  a,
4682
4682
  s
4683
- ], t[108] = le, t[109] = B, t[110] = a, t[111] = s, t[112] = wt, t[113] = Tt) : (wt = t[112], Tt = t[113]), Ir(wt, Tt);
4684
- let Et = `${n}:${r}`, G;
4685
- t[114] === Symbol.for("react.memo_cache_sentinel") ? (G = (e) => {
4686
- ve.current = {
4683
+ ], t[108] = ue, t[109] = z, t[110] = a, t[111] = s, t[112] = Tt, t[113] = Et) : (Tt = t[112], Et = t[113]), Ir(Tt, Et);
4684
+ let Dt = `${n}:${r}`, W;
4685
+ t[114] === Symbol.for("react.memo_cache_sentinel") ? (W = (e) => {
4686
+ ye.current = {
4687
4687
  x: e.clientX,
4688
4688
  y: e.clientY,
4689
4689
  at: e.timeStamp
4690
4690
  };
4691
- }, t[114] = G) : G = t[114];
4692
- let Dt;
4693
- t[115] === Ce ? Dt = t[116] : (Dt = (e) => Ce.handleDragStart(e.nativeEvent), t[115] = Ce, t[116] = Dt);
4691
+ }, t[114] = W) : W = t[114];
4694
4692
  let Ot;
4695
- t[117] !== Ce || t[118] !== B ? (Ot = () => Ce.handleDragEnd((e) => B.getItem(e)?.deselect()), t[117] = Ce, t[118] = B, t[119] = Ot) : Ot = t[119];
4693
+ t[115] === we ? Ot = t[116] : (Ot = (e) => we.handleDragStart(e.nativeEvent), t[115] = we, t[116] = Ot);
4696
4694
  let kt;
4697
- t[120] === Symbol.for("react.memo_cache_sentinel") ? (kt = (e) => {
4698
- !(ce(navigator.platform) ? e.metaKey : e.ctrlKey) || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || (e.preventDefault(), Xe());
4699
- }, t[120] = kt) : kt = t[120];
4695
+ t[117] !== we || t[118] !== z ? (kt = () => we.handleDragEnd((e) => z.getItem(e)?.deselect()), t[117] = we, t[118] = z, t[119] = kt) : kt = t[119];
4700
4696
  let At;
4701
- t[121] !== gt || t[122] !== O ? (At = /* @__PURE__ */ Q(ro, {
4702
- isPending: O,
4703
- onRefresh: gt
4704
- }), t[121] = gt, t[122] = O, t[123] = At) : At = t[123];
4697
+ t[120] === Symbol.for("react.memo_cache_sentinel") ? (At = (e) => {
4698
+ !(le(navigator.platform) ? e.metaKey : e.ctrlKey) || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || (e.preventDefault(), Ze());
4699
+ }, t[120] = At) : At = t[120];
4705
4700
  let jt;
4706
- t[124] !== _ || t[125] !== i ? (jt = _("Search {projectName} files", { projectName: i }), t[124] = _, t[125] = i, t[126] = jt) : jt = t[126];
4701
+ t[121] !== _t || t[122] !== O ? (jt = /* @__PURE__ */ Q(ro, {
4702
+ isPending: O,
4703
+ onRefresh: _t
4704
+ }), t[121] = _t, t[122] = O, t[123] = jt) : jt = t[123];
4707
4705
  let Mt;
4708
- t[127] !== Ke || t[128] !== pt || t[129] !== V.value || t[130] !== jt ? (Mt = /* @__PURE__ */ Q(io, {
4709
- ref: qe,
4710
- name: "project-files-search",
4711
- ariaLabel: jt,
4712
- value: V.value,
4713
- onValueChange: pt,
4714
- onClose: Ke
4715
- }), t[127] = Ke, t[128] = pt, t[129] = V.value, t[130] = jt, t[131] = Mt) : Mt = t[131];
4706
+ t[124] !== v || t[125] !== i ? (Mt = v("Search {projectName} files", { projectName: i }), t[124] = v, t[125] = i, t[126] = Mt) : Mt = t[126];
4716
4707
  let Nt;
4717
- t[132] !== Re || t[133] !== z.length || t[134] !== j || t[135] !== _ || t[136] !== p || t[137] !== Ve ? (Nt = z.length > 0 && !p ? /* @__PURE__ */ $(te, { children: [/* @__PURE__ */ Q(R, {
4708
+ t[127] !== qe || t[128] !== mt || t[129] !== B.value || t[130] !== Mt ? (Nt = /* @__PURE__ */ Q(io, {
4709
+ ref: Je,
4710
+ name: "project-files-search",
4711
+ ariaLabel: Mt,
4712
+ value: B.value,
4713
+ onValueChange: mt,
4714
+ onClose: qe
4715
+ }), t[127] = qe, t[128] = mt, t[129] = B.value, t[130] = Mt, t[131] = Nt) : Nt = t[131];
4716
+ let Pt;
4717
+ t[132] !== ze || t[133] !== R.length || t[134] !== F || t[135] !== v || t[136] !== m || t[137] !== He ? (Pt = R.length > 0 && !m ? /* @__PURE__ */ $(ne, { children: [/* @__PURE__ */ Q(L, {
4718
4718
  render: /* @__PURE__ */ Q(N, {
4719
4719
  type: "button",
4720
4720
  size: "icon-xs",
4721
4721
  variant: "ghost",
4722
- "aria-label": _(j || Re ? "Collapse all folders" : "Expand all folders"),
4723
- onClick: Ve
4722
+ "aria-label": v(F || ze ? "Collapse all folders" : "Expand all folders"),
4723
+ onClick: He
4724
4724
  }),
4725
- children: Q(Re ? we : Ee, { className: "size-3.5" })
4726
- }), /* @__PURE__ */ Q(P, { children: _(j || Re ? "Collapse all folders" : "Expand all folders") })] }) : null, t[132] = Re, t[133] = z.length, t[134] = j, t[135] = _, t[136] = p, t[137] = Ve, t[138] = Nt) : Nt = t[138];
4727
- let Pt;
4728
- t[139] !== At || t[140] !== Mt || t[141] !== Nt ? (Pt = /* @__PURE__ */ $("div", {
4725
+ children: Q(ze ? Te : De, { className: "size-3.5" })
4726
+ }), /* @__PURE__ */ Q(P, { children: v(F || ze ? "Collapse all folders" : "Expand all folders") })] }) : null, t[132] = ze, t[133] = R.length, t[134] = F, t[135] = v, t[136] = m, t[137] = He, t[138] = Pt) : Pt = t[138];
4727
+ let Ft;
4728
+ t[139] !== jt || t[140] !== Nt || t[141] !== Pt ? (Ft = /* @__PURE__ */ $("div", {
4729
4729
  className: "flex h-10 min-h-10 shrink-0 items-center gap-1 border-b border-border/60 bg-background px-2 in-data-[preview-panel-mode=inline]:mb-1 in-data-[preview-panel-mode=inline]:h-9 in-data-[preview-panel-mode=inline]:min-h-9 in-data-[preview-panel-mode=inline]:border-b-transparent",
4730
4730
  "data-surface-subheader": !0,
4731
4731
  children: [
4732
- At,
4733
- Mt,
4734
- Nt
4732
+ jt,
4733
+ Nt,
4734
+ Pt
4735
4735
  ]
4736
- }), t[139] = At, t[140] = Mt, t[141] = Nt, t[142] = Pt) : Pt = t[142];
4737
- let Ft;
4738
- t[143] !== D || t[144] !== _ || t[145] !== gt || t[146] !== I.error ? (Ft = D || I.error ? /* @__PURE__ */ Q("button", {
4736
+ }), t[139] = jt, t[140] = Nt, t[141] = Pt, t[142] = Ft) : Ft = t[142];
4737
+ let It;
4738
+ t[143] !== D || t[144] !== v || t[145] !== _t || t[146] !== I.error ? (It = D || I.error ? /* @__PURE__ */ Q("button", {
4739
4739
  type: "button",
4740
- onClick: gt,
4740
+ onClick: _t,
4741
4741
  className: "p-4 text-left text-xs leading-relaxed text-destructive",
4742
- children: _("{error} Click to retry.", { error: D ?? I.error })
4743
- }) : null, t[143] = D, t[144] = _, t[145] = gt, t[146] = I.error, t[147] = Ft) : Ft = t[147];
4744
- let It;
4745
- t[148] !== I.isPending || t[149] !== I.truncated || t[150] !== A ? (It = A.trim() && I.truncated && !I.isPending ? /* @__PURE__ */ Q("div", {
4742
+ children: v("{error} Click to retry.", { error: D ?? I.error })
4743
+ }) : null, t[143] = D, t[144] = v, t[145] = _t, t[146] = I.error, t[147] = It) : It = t[147];
4744
+ let Lt;
4745
+ t[148] !== I.isPending || t[149] !== I.truncated || t[150] !== M ? (Lt = M.trim() && I.truncated && !I.isPending ? /* @__PURE__ */ Q("div", {
4746
4746
  className: "px-3 py-1 text-xs text-muted-foreground",
4747
- children: /* @__PURE__ */ Q(L, { children: "More matches available. Refine your search." })
4748
- }) : null, t[148] = I.isPending, t[149] = I.truncated, t[150] = A, t[151] = It) : It = t[151];
4749
- let K;
4750
- t[152] !== se.length || t[153] !== Ie || t[154] !== I.isPending || t[155] !== E ? (K = (!E || I.isPending) && /* @__PURE__ */ Q("div", {
4747
+ children: /* @__PURE__ */ Q(j, { children: "More matches available. Refine your search." })
4748
+ }) : null, t[148] = I.isPending, t[149] = I.truncated, t[150] = M, t[151] = Lt) : Lt = t[151];
4749
+ let G;
4750
+ t[152] !== ce.length || t[153] !== Le || t[154] !== I.isPending || t[155] !== E ? (G = (!E || I.isPending) && /* @__PURE__ */ Q("div", {
4751
4751
  role: "status",
4752
- className: se.length > 0 && !Ie ? "sr-only" : "px-3 py-1 text-xs text-muted-foreground",
4753
- children: /* @__PURE__ */ Q(L, { children: "Loading files…" })
4754
- }), t[152] = se.length, t[153] = Ie, t[154] = I.isPending, t[155] = E, t[156] = K) : K = t[156];
4755
- let Lt;
4756
- t[157] !== D || t[158] !== _ || t[159] !== Ie || t[160] !== O || t[161] !== B || t[162] !== I.error || t[163] !== I.isPending || t[164] !== i || t[165] !== E || t[166] !== y ? (Lt = Ie ? E && !O && !I.isPending && !D && !I.error ? /* @__PURE__ */ Q("div", {
4752
+ className: ce.length > 0 && !Le ? "sr-only" : "px-3 py-1 text-xs text-muted-foreground",
4753
+ children: /* @__PURE__ */ Q(j, { children: "Loading files…" })
4754
+ }), t[152] = ce.length, t[153] = Le, t[154] = I.isPending, t[155] = E, t[156] = G) : G = t[156];
4755
+ let Rt;
4756
+ t[157] !== D || t[158] !== v || t[159] !== Le || t[160] !== O || t[161] !== z || t[162] !== I.error || t[163] !== I.isPending || t[164] !== i || t[165] !== E || t[166] !== b ? (Rt = Le ? E && !O && !I.isPending && !D && !I.error ? /* @__PURE__ */ Q("div", {
4757
4757
  role: "status",
4758
4758
  className: "px-3 py-4 text-xs text-muted-foreground",
4759
- children: /* @__PURE__ */ Q(L, { children: "No matching files." })
4760
- }) : null : /* @__PURE__ */ Q(Sn, {
4761
- model: B,
4762
- "aria-label": _("{projectName} files", { projectName: i }),
4759
+ children: /* @__PURE__ */ Q(j, { children: "No matching files." })
4760
+ }) : null : /* @__PURE__ */ Q(Cn, {
4761
+ model: z,
4762
+ "aria-label": v("{projectName} files", { projectName: i }),
4763
4763
  className: "min-h-0 flex-1 overflow-hidden",
4764
- style: wn(y)
4765
- }), t[157] = D, t[158] = _, t[159] = Ie, t[160] = O, t[161] = B, t[162] = I.error, t[163] = I.isPending, t[164] = i, t[165] = E, t[166] = y, t[167] = Lt) : Lt = t[167];
4766
- let Rt;
4767
- return t[168] !== Et || t[169] !== Dt || t[170] !== Ot || t[171] !== Pt || t[172] !== Ft || t[173] !== It || t[174] !== K || t[175] !== Lt ? (Rt = /* @__PURE__ */ $("div", {
4764
+ style: Tn(b)
4765
+ }), t[157] = D, t[158] = v, t[159] = Le, t[160] = O, t[161] = z, t[162] = I.error, t[163] = I.isPending, t[164] = i, t[165] = E, t[166] = b, t[167] = Rt) : Rt = t[167];
4766
+ let zt;
4767
+ return t[168] !== Dt || t[169] !== Ot || t[170] !== kt || t[171] !== Ft || t[172] !== It || t[173] !== Lt || t[174] !== G || t[175] !== Rt ? (zt = /* @__PURE__ */ $("div", {
4768
4768
  className: "flex min-h-0 flex-1 flex-col bg-background",
4769
- "data-file-browser-panel": Et,
4770
- onContextMenuCapture: G,
4771
- onDragStartCapture: Dt,
4772
- onDragEnd: Ot,
4773
- onKeyDown: kt,
4769
+ "data-file-browser-panel": Dt,
4770
+ onContextMenuCapture: W,
4771
+ onDragStartCapture: Ot,
4772
+ onDragEnd: kt,
4773
+ onKeyDown: At,
4774
4774
  children: [
4775
- Pt,
4776
4775
  Ft,
4777
4776
  It,
4778
- K,
4779
- Lt
4777
+ Lt,
4778
+ G,
4779
+ Rt
4780
4780
  ]
4781
- }), t[168] = Et, t[169] = Dt, t[170] = Ot, t[171] = Pt, t[172] = Ft, t[173] = It, t[174] = K, t[175] = Lt, t[176] = Rt) : Rt = t[176], Rt;
4781
+ }), t[168] = Dt, t[169] = Ot, t[170] = kt, t[171] = Ft, t[172] = It, t[173] = Lt, t[174] = G, t[175] = Rt, t[176] = zt) : zt = t[176], zt;
4782
4782
  }
4783
4783
  function so(e) {
4784
4784
  return {
@@ -4793,7 +4793,7 @@ function lo() {
4793
4793
  return !1;
4794
4794
  }
4795
4795
  function uo(e) {
4796
- if (!j(e)) throw le(e.cause);
4796
+ if (!se(e)) throw ue(e.cause);
4797
4797
  }
4798
4798
  // src/components/files/FileBreadcrumbs.tsx
4799
4799
  function fo(e, t) {
@@ -4801,11 +4801,11 @@ function fo(e, t) {
4801
4801
  }
4802
4802
  function po(e) {
4803
4803
  let t = Z(12), n = e.current ? "font-medium text-foreground" : "text-muted-foreground", r;
4804
- t[0] === n ? r = t[1] : (r = I("block max-w-40 truncate rounded-sm px-0.5", n), t[0] = n, t[1] = r);
4804
+ t[0] === n ? r = t[1] : (r = ie("block max-w-40 truncate rounded-sm px-0.5", n), t[0] = n, t[1] = r);
4805
4805
  let i;
4806
4806
  t[2] === r ? i = t[3] : (i = /* @__PURE__ */ Q("span", { className: r }), t[2] = r, t[3] = i);
4807
4807
  let a;
4808
- t[4] !== e.label || t[5] !== i ? (a = /* @__PURE__ */ Q(R, {
4808
+ t[4] !== e.label || t[5] !== i ? (a = /* @__PURE__ */ Q(L, {
4809
4809
  render: i,
4810
4810
  children: e.label
4811
4811
  }), t[4] = e.label, t[5] = i, t[6] = a) : a = t[6];
@@ -4815,65 +4815,65 @@ function po(e) {
4815
4815
  children: e.pathLabel
4816
4816
  }), t[7] = e.pathLabel, t[8] = o);
4817
4817
  let s;
4818
- return t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ $(te, { children: [a, o] }), t[9] = a, t[10] = o, t[11] = s) : s = t[11], s;
4818
+ return t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ $(ne, { children: [a, o] }), t[9] = a, t[10] = o, t[11] = s) : s = t[11], s;
4819
4819
  }
4820
4820
  function mo(e) {
4821
- let t = Z(45), n = oe(), r = ut(e.environmentId, e.cwd, e.directoryPath, e.workspaceMutationId, n), i = C(), { resolvedTheme: a } = Je(), o;
4821
+ let t = Z(45), n = ee(), r = dt(e.environmentId, e.cwd, e.directoryPath, e.workspaceMutationId, n), i = u(), { resolvedTheme: a } = Ye(), o;
4822
4822
  t[0] === r.data?.entries ? o = t[1] : (o = r.data?.entries ?? [], t[0] = r.data?.entries, t[1] = o);
4823
- let c = o, u = r.data?.truncated ?? !1, d, p, m, h, b, x, S, w;
4824
- if (t[2] !== c || t[3] !== r.data || t[4] !== r.error || t[5] !== r.isPending || t[6] !== r.refresh || t[7] !== u || t[8] !== i || t[9] !== e || t[10] !== a) {
4823
+ let c = o, d = r.data?.truncated ?? !1, f, p, h, g, _, v, b, S;
4824
+ if (t[2] !== c || t[3] !== r.data || t[4] !== r.error || t[5] !== r.isPending || t[6] !== r.refresh || t[7] !== d || t[8] !== i || t[9] !== e || t[10] !== a) {
4825
4825
  let n = Ia(c, e.directoryPath), o = r.data !== null;
4826
4826
  if (t[19] !== e) {
4827
4827
  let n = La(e.directoryPath), r = e.directoryPath !== e.rootPath && n !== null && (e.rootPath === "" || n === e.rootPath || n.startsWith(`${e.rootPath}/`));
4828
- p = f, b = "start", x = "bottom", S = (t) => {
4828
+ p = m, _ = "start", v = "bottom", b = (t) => {
4829
4829
  t.key === "ArrowLeft" && r && n !== null && (t.preventDefault(), t.stopPropagation(), e.onDirectoryChange(n));
4830
- }, w = r && n !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ $(y, {
4830
+ }, S = r && n !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ $(w, {
4831
4831
  closeOnClick: !1,
4832
4832
  onClick: () => e.onDirectoryChange(n),
4833
- children: [/* @__PURE__ */ Q(Ce, {}), /* @__PURE__ */ Q("span", {
4833
+ children: [/* @__PURE__ */ Q(we, {}), /* @__PURE__ */ Q("span", {
4834
4834
  className: "truncate",
4835
- children: /* @__PURE__ */ $(L, { children: ["Back to ", /* @__PURE__ */ Q(A, { children: fo(n, e.projectName) })] })
4835
+ children: /* @__PURE__ */ $(j, { children: ["Back to ", /* @__PURE__ */ Q(oe, { children: fo(n, e.projectName) })] })
4836
4836
  })]
4837
- }), /* @__PURE__ */ Q(l, {})] }) : null, t[19] = e, t[20] = p, t[21] = b, t[22] = x, t[23] = S, t[24] = w;
4838
- } else p = t[20], b = t[21], x = t[22], S = t[23], w = t[24];
4839
- d = s, m = e.directoryPath, h = r.isPending && r.data === null ? /* @__PURE__ */ $(y, {
4837
+ }), /* @__PURE__ */ Q(l, {})] }) : null, t[19] = e, t[20] = p, t[21] = _, t[22] = v, t[23] = b, t[24] = S;
4838
+ } else p = t[20], _ = t[21], v = t[22], b = t[23], S = t[24];
4839
+ f = s, h = e.directoryPath, g = r.isPending && r.data === null ? /* @__PURE__ */ $(w, {
4840
4840
  disabled: !0,
4841
- children: [/* @__PURE__ */ Q(_, {}), /* @__PURE__ */ Q(L, { children: "Loading folder…" })]
4842
- }) : r.error && r.data === null ? /* @__PURE__ */ $(y, {
4841
+ children: [/* @__PURE__ */ Q(x, {}), /* @__PURE__ */ Q(j, { children: "Loading folder…" })]
4842
+ }) : r.error && r.data === null ? /* @__PURE__ */ $(w, {
4843
4843
  closeOnClick: !1,
4844
4844
  onClick: r.refresh,
4845
- children: [/* @__PURE__ */ Q(gn, { refreshing: r.isPending }), /* @__PURE__ */ Q("span", {
4845
+ children: [/* @__PURE__ */ Q(_n, { refreshing: r.isPending }), /* @__PURE__ */ Q("span", {
4846
4846
  className: "min-w-0 flex-1 truncate",
4847
- children: /* @__PURE__ */ Q(L, { children: "Retry loading folder" })
4847
+ children: /* @__PURE__ */ Q(j, { children: "Retry loading folder" })
4848
4848
  })]
4849
- }) : !o && !u ? /* @__PURE__ */ Q(y, {
4849
+ }) : !o && !d ? /* @__PURE__ */ Q(w, {
4850
4850
  disabled: !0,
4851
- children: /* @__PURE__ */ Q(L, { children: "This folder is no longer available." })
4852
- }) : n.length === 0 ? /* @__PURE__ */ Q(y, {
4851
+ children: /* @__PURE__ */ Q(j, { children: "This folder is no longer available." })
4852
+ }) : n.length === 0 ? /* @__PURE__ */ Q(w, {
4853
4853
  disabled: !0,
4854
- children: i(u ? "No entries from this folder are available in the partial workspace index." : "This folder is empty.")
4855
- }) : /* @__PURE__ */ Q(g, {
4854
+ children: i(d ? "No entries from this folder are available in the partial workspace index." : "This folder is empty.")
4855
+ }) : /* @__PURE__ */ Q(y, {
4856
4856
  value: e.currentFilePath,
4857
4857
  onValueChange: (t) => {
4858
4858
  e.onOpenChange(!1), e.onOpenFile(t);
4859
4859
  },
4860
4860
  children: n.map((t) => {
4861
- let n = t.kind === "file" && t.path === e.currentFilePath, r = /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(Ne, {
4861
+ let n = t.kind === "file" && t.path === e.currentFilePath, r = /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(Pe, {
4862
4862
  pathValue: t.path,
4863
4863
  kind: t.kind,
4864
4864
  theme: a
4865
- }), /* @__PURE__ */ $(te, { children: [/* @__PURE__ */ Q(R, {
4866
- render: /* @__PURE__ */ Q("span", { className: I("min-w-0 flex-1 truncate", t.ignored && "text-muted-foreground") }),
4865
+ }), /* @__PURE__ */ $(ne, { children: [/* @__PURE__ */ Q(L, {
4866
+ render: /* @__PURE__ */ Q("span", { className: ie("min-w-0 flex-1 truncate", t.ignored && "text-muted-foreground") }),
4867
4867
  children: t.label
4868
4868
  }), /* @__PURE__ */ Q(P, {
4869
4869
  side: "right",
4870
4870
  children: t.path
4871
4871
  })] })] });
4872
- return t.kind === "directory" ? /* @__PURE__ */ $(y, {
4872
+ return t.kind === "directory" ? /* @__PURE__ */ $(w, {
4873
4873
  closeOnClick: !1,
4874
4874
  onClick: () => e.onDirectoryChange(t.path),
4875
- children: [r, /* @__PURE__ */ Q(Se, {})]
4876
- }, t.path) : /* @__PURE__ */ Q(v, {
4875
+ children: [r, /* @__PURE__ */ Q(Ce, {})]
4876
+ }, t.path) : /* @__PURE__ */ Q(C, {
4877
4877
  value: t.path,
4878
4878
  closeOnClick: !0,
4879
4879
  "aria-current": n ? "page" : void 0,
@@ -4883,36 +4883,36 @@ function mo(e) {
4883
4883
  })
4884
4884
  }, t.path);
4885
4885
  })
4886
- }), t[2] = c, t[3] = r.data, t[4] = r.error, t[5] = r.isPending, t[6] = r.refresh, t[7] = u, t[8] = i, t[9] = e, t[10] = a, t[11] = d, t[12] = p, t[13] = m, t[14] = h, t[15] = b, t[16] = x, t[17] = S, t[18] = w;
4887
- } else d = t[11], p = t[12], m = t[13], h = t[14], b = t[15], x = t[16], S = t[17], w = t[18];
4886
+ }), t[2] = c, t[3] = r.data, t[4] = r.error, t[5] = r.isPending, t[6] = r.refresh, t[7] = d, t[8] = i, t[9] = e, t[10] = a, t[11] = f, t[12] = p, t[13] = h, t[14] = g, t[15] = _, t[16] = v, t[17] = b, t[18] = S;
4887
+ } else f = t[11], p = t[12], h = t[13], g = t[14], _ = t[15], v = t[16], b = t[17], S = t[18];
4888
4888
  let T;
4889
- t[25] !== d || t[26] !== m || t[27] !== h ? (T = /* @__PURE__ */ Q(d, { children: h }, m), t[25] = d, t[26] = m, t[27] = h, t[28] = T) : T = t[28];
4889
+ t[25] !== f || t[26] !== h || t[27] !== g ? (T = /* @__PURE__ */ Q(f, { children: g }, h), t[25] = f, t[26] = h, t[27] = g, t[28] = T) : T = t[28];
4890
4890
  let E;
4891
- t[29] !== r.data || t[30] !== r.error || t[31] !== r.isPending || t[32] !== r.refresh ? (E = r.error && r.data !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ $(y, {
4891
+ t[29] !== r.data || t[30] !== r.error || t[31] !== r.isPending || t[32] !== r.refresh ? (E = r.error && r.data !== null ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ $(w, {
4892
4892
  closeOnClick: !1,
4893
4893
  onClick: r.refresh,
4894
- children: [/* @__PURE__ */ Q(gn, { refreshing: r.isPending }), /* @__PURE__ */ Q(L, { children: "Refresh failed. Retry" })]
4894
+ children: [/* @__PURE__ */ Q(_n, { refreshing: r.isPending }), /* @__PURE__ */ Q(j, { children: "Refresh failed. Retry" })]
4895
4895
  })] }) : null, t[29] = r.data, t[30] = r.error, t[31] = r.isPending, t[32] = r.refresh, t[33] = E) : E = t[33];
4896
4896
  let D;
4897
- t[34] === u ? D = t[35] : (D = u ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ Q(y, {
4897
+ t[34] === d ? D = t[35] : (D = d ? /* @__PURE__ */ $(Br, { children: [/* @__PURE__ */ Q(l, {}), /* @__PURE__ */ Q(w, {
4898
4898
  disabled: !0,
4899
- children: /* @__PURE__ */ Q(L, { children: "Some workspace entries are not shown." })
4900
- })] }) : null, t[34] = u, t[35] = D);
4899
+ children: /* @__PURE__ */ Q(j, { children: "Some workspace entries are not shown." })
4900
+ })] }) : null, t[34] = d, t[35] = D);
4901
4901
  let O;
4902
- return t[36] !== p || t[37] !== b || t[38] !== x || t[39] !== S || t[40] !== w || t[41] !== T || t[42] !== E || t[43] !== D ? (O = /* @__PURE__ */ $(p, {
4903
- align: b,
4904
- side: x,
4905
- onKeyDown: S,
4902
+ return t[36] !== p || t[37] !== _ || t[38] !== v || t[39] !== b || t[40] !== S || t[41] !== T || t[42] !== E || t[43] !== D ? (O = /* @__PURE__ */ $(p, {
4903
+ align: _,
4904
+ side: v,
4905
+ onKeyDown: b,
4906
4906
  children: [
4907
- w,
4907
+ S,
4908
4908
  T,
4909
4909
  E,
4910
4910
  D
4911
4911
  ]
4912
- }), t[36] = p, t[37] = b, t[38] = x, t[39] = S, t[40] = w, t[41] = T, t[42] = E, t[43] = D, t[44] = O) : O = t[44], O;
4912
+ }), t[36] = p, t[37] = _, t[38] = v, t[39] = b, t[40] = S, t[41] = T, t[42] = E, t[43] = D, t[44] = O) : O = t[44], O;
4913
4913
  }
4914
4914
  function ho(e) {
4915
- let t = Z(29), n = C(), [r, i] = X(!1), [a, o] = X(e.crumb.path), s;
4915
+ let t = Z(29), n = u(), [r, i] = X(!1), [a, o] = X(e.crumb.path), s;
4916
4916
  t[0] !== e.crumb.path || t[1] !== e.relativePath ? (s = {
4917
4917
  crumbPath: e.crumb.path,
4918
4918
  relativePath: e.relativePath
@@ -4922,50 +4922,50 @@ function ho(e) {
4922
4922
  crumbPath: e.crumb.path,
4923
4923
  relativePath: e.relativePath
4924
4924
  }), i(!1), o(e.crumb.path));
4925
- let u;
4926
- t[3] === e.crumb.path ? u = t[4] : (u = (t) => {
4925
+ let d;
4926
+ t[3] === e.crumb.path ? d = t[4] : (d = (t) => {
4927
4927
  i(t), t && o(e.crumb.path);
4928
- }, t[3] = e.crumb.path, t[4] = u);
4929
- let d = u, f;
4930
- t[5] !== n || t[6] !== e.crumb.label ? (f = n("Browse {folder}", { folder: e.crumb.label }), t[5] = n, t[6] = e.crumb.label, t[7] = f) : f = t[7];
4931
- let p;
4932
- t[8] === f ? p = t[9] : (p = /* @__PURE__ */ Q("button", {
4928
+ }, t[3] = e.crumb.path, t[4] = d);
4929
+ let f = d, p;
4930
+ t[5] !== n || t[6] !== e.crumb.label ? (p = n("Browse {folder}", { folder: e.crumb.label }), t[5] = n, t[6] = e.crumb.label, t[7] = p) : p = t[7];
4931
+ let m;
4932
+ t[8] === p ? m = t[9] : (m = /* @__PURE__ */ Q("button", {
4933
4933
  type: "button",
4934
- "aria-label": f,
4934
+ "aria-label": p,
4935
4935
  className: "relative mx-0.5 flex h-5 w-4 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground/60 outline-none pointer-coarse:after:absolute pointer-coarse:after:-inset-3 hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-popup-open:bg-accent data-popup-open:text-foreground"
4936
- }), t[8] = f, t[9] = p);
4936
+ }), t[8] = p, t[9] = m);
4937
4937
  let h;
4938
- t[10] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ Q(Se, { className: "size-3.5" }), t[10] = h) : h = t[10];
4938
+ t[10] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ Q(Ce, { className: "size-3.5" }), t[10] = h) : h = t[10];
4939
4939
  let g;
4940
- t[11] === p ? g = t[12] : (g = /* @__PURE__ */ Q(m, {
4941
- render: p,
4940
+ t[11] === m ? g = t[12] : (g = /* @__PURE__ */ Q(_, {
4941
+ render: m,
4942
4942
  children: h
4943
- }), t[11] = p, t[12] = g);
4944
- let _;
4945
- t[13] !== a || t[14] !== d || t[15] !== r || t[16] !== e.crumb.path || t[17] !== e.cwd || t[18] !== e.environmentId || t[19] !== e.onOpenFile || t[20] !== e.projectName || t[21] !== e.relativePath || t[22] !== e.workspaceMutationId ? (_ = r ? /* @__PURE__ */ Q(mo, {
4943
+ }), t[11] = m, t[12] = g);
4944
+ let v;
4945
+ t[13] !== a || t[14] !== f || t[15] !== r || t[16] !== e.crumb.path || t[17] !== e.cwd || t[18] !== e.environmentId || t[19] !== e.onOpenFile || t[20] !== e.projectName || t[21] !== e.relativePath || t[22] !== e.workspaceMutationId ? (v = r ? /* @__PURE__ */ Q(mo, {
4946
4946
  cwd: e.cwd,
4947
4947
  currentFilePath: e.relativePath,
4948
4948
  directoryPath: a,
4949
4949
  environmentId: e.environmentId,
4950
4950
  onDirectoryChange: o,
4951
- onOpenChange: d,
4951
+ onOpenChange: f,
4952
4952
  onOpenFile: e.onOpenFile,
4953
4953
  projectName: e.projectName,
4954
4954
  rootPath: e.crumb.path,
4955
4955
  workspaceMutationId: e.workspaceMutationId
4956
- }) : null, t[13] = a, t[14] = d, t[15] = r, t[16] = e.crumb.path, t[17] = e.cwd, t[18] = e.environmentId, t[19] = e.onOpenFile, t[20] = e.projectName, t[21] = e.relativePath, t[22] = e.workspaceMutationId, t[23] = _) : _ = t[23];
4957
- let v;
4958
- return t[24] !== d || t[25] !== r || t[26] !== g || t[27] !== _ ? (v = /* @__PURE__ */ $(x, {
4956
+ }) : null, t[13] = a, t[14] = f, t[15] = r, t[16] = e.crumb.path, t[17] = e.cwd, t[18] = e.environmentId, t[19] = e.onOpenFile, t[20] = e.projectName, t[21] = e.relativePath, t[22] = e.workspaceMutationId, t[23] = v) : v = t[23];
4957
+ let y;
4958
+ return t[24] !== f || t[25] !== r || t[26] !== g || t[27] !== v ? (y = /* @__PURE__ */ $(T, {
4959
4959
  open: r,
4960
- onOpenChange: d,
4961
- children: [g, _]
4962
- }), t[24] = d, t[25] = r, t[26] = g, t[27] = _, t[28] = v) : v = t[28], v;
4960
+ onOpenChange: f,
4961
+ children: [g, v]
4962
+ }), t[24] = f, t[25] = r, t[26] = g, t[27] = v, t[28] = y) : y = t[28], y;
4963
4963
  }
4964
4964
  function go(e) {
4965
4965
  let t = Z(17), n;
4966
4966
  t[0] === e ? n = t[1] : (n = () => e.onNavigate(e.crumb.path), t[0] = e, t[1] = n);
4967
4967
  let r = e.descendant ? "text-muted-foreground/70" : "text-muted-foreground", i;
4968
- t[2] === r ? i = t[3] : (i = I("relative block max-w-40 cursor-pointer rounded-sm px-0.5 text-left outline-none pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", r), t[2] = r, t[3] = i);
4968
+ t[2] === r ? i = t[3] : (i = ie("relative block max-w-40 cursor-pointer rounded-sm px-0.5 text-left outline-none pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", r), t[2] = r, t[3] = i);
4969
4969
  let a;
4970
4970
  t[4] !== n || t[5] !== i ? (a = /* @__PURE__ */ Q("button", {
4971
4971
  type: "button",
@@ -4978,7 +4978,7 @@ function go(e) {
4978
4978
  children: e.crumb.label
4979
4979
  }), t[7] = e.crumb.label, t[8] = o);
4980
4980
  let s;
4981
- t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ Q(R, {
4981
+ t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ Q(L, {
4982
4982
  render: a,
4983
4983
  children: o
4984
4984
  }), t[9] = a, t[10] = o, t[11] = s) : s = t[11];
@@ -4988,18 +4988,18 @@ function go(e) {
4988
4988
  children: c
4989
4989
  }), t[12] = c, t[13] = l);
4990
4990
  let u;
4991
- return t[14] !== s || t[15] !== l ? (u = /* @__PURE__ */ $(te, { children: [s, l] }), t[14] = s, t[15] = l, t[16] = u) : u = t[16], u;
4991
+ return t[14] !== s || t[15] !== l ? (u = /* @__PURE__ */ $(ne, { children: [s, l] }), t[14] = s, t[15] = l, t[16] = u) : u = t[16], u;
4992
4992
  }
4993
4993
  function _o(e) {
4994
4994
  let t = Z(13), n;
4995
- t[0] === e.relativePath ? n = t[1] : (n = b(e.relativePath), t[0] = e.relativePath, t[1] = n);
4995
+ t[0] === e.relativePath ? n = t[1] : (n = D(e.relativePath), t[0] = e.relativePath, t[1] = n);
4996
4996
  let r = n, i = ka(e.projectName, e.trail), a;
4997
4997
  t[2] === e.relativePath ? a = t[3] : (a = Aa(e.relativePath), t[2] = e.relativePath, t[3] = a);
4998
4998
  let o = a, s;
4999
4999
  t[4] === o ? s = t[5] : (s = (e) => e.path === o, t[4] = o, t[5] = s);
5000
- let c = i.findIndex(s), l = C(), u;
5001
- t[6] === l ? u = t[7] : (u = l("File path"), t[6] = l, t[7] = u);
5002
- let d = i.map((t, n) => {
5000
+ let c = i.findIndex(s), l = u(), d;
5001
+ t[6] === l ? d = t[7] : (d = l("File path"), t[6] = l, t[7] = d);
5002
+ let f = i.map((t, n) => {
5003
5003
  let a = n === c;
5004
5004
  return /* @__PURE__ */ $("li", {
5005
5005
  className: "flex min-w-0 shrink-0 items-center",
@@ -5020,7 +5020,7 @@ function _o(e) {
5020
5020
  descendant: n > c,
5021
5021
  onNavigate: e.onNavigateFolder,
5022
5022
  projectName: e.projectName
5023
- }), n === i.length - 1 ? null : r ? /* @__PURE__ */ Q(Se, {
5023
+ }), n === i.length - 1 ? null : r ? /* @__PURE__ */ Q(Ce, {
5024
5024
  "aria-hidden": !0,
5025
5025
  className: "mx-1 size-3.5 shrink-0 text-muted-foreground/60"
5026
5026
  }) : /* @__PURE__ */ Q(ho, {
@@ -5028,17 +5028,17 @@ function _o(e) {
5028
5028
  crumb: t
5029
5029
  })]
5030
5030
  }, t.path || "project");
5031
- }), f;
5032
- t[8] === d ? f = t[9] : (f = /* @__PURE__ */ Q("ol", {
5031
+ }), p;
5032
+ t[8] === f ? p = t[9] : (p = /* @__PURE__ */ Q("ol", {
5033
5033
  className: "flex items-center",
5034
- children: d
5035
- }), t[8] = d, t[9] = f);
5036
- let p;
5037
- return t[10] !== u || t[11] !== f ? (p = /* @__PURE__ */ Q("nav", {
5038
- "aria-label": u,
5039
- className: "flex h-full",
5040
5034
  children: f
5041
- }), t[10] = u, t[11] = f, t[12] = p) : p = t[12], p;
5035
+ }), t[8] = f, t[9] = p);
5036
+ let m;
5037
+ return t[10] !== d || t[11] !== p ? (m = /* @__PURE__ */ Q("nav", {
5038
+ "aria-label": d,
5039
+ className: "flex h-full",
5040
+ children: p
5041
+ }), t[10] = d, t[11] = p, t[12] = m) : m = t[12], m;
5042
5042
  }
5043
5043
  // src/components/files/FileMarkdownPreview.tsx
5044
5044
  function vo(e) {
@@ -5047,11 +5047,11 @@ function vo(e) {
5047
5047
  let r;
5048
5048
  t[2] === e.relativePath ? r = t[3] : (r = e.relativePath.lastIndexOf("\\"), t[2] = e.relativePath, t[3] = r);
5049
5049
  let i = Math.max(n, r), a;
5050
- t[4] !== i || t[5] !== e.cwd || t[6] !== e.relativePath ? (a = i >= 0 ? ge(e.relativePath.slice(0, i), e.cwd) : e.cwd, t[4] = i, t[5] = e.cwd, t[6] = e.relativePath, t[7] = a) : a = t[7];
5050
+ t[4] !== i || t[5] !== e.cwd || t[6] !== e.relativePath ? (a = i >= 0 ? _e(e.relativePath.slice(0, i), e.cwd) : e.cwd, t[4] = i, t[5] = e.cwd, t[6] = e.relativePath, t[7] = a) : a = t[7];
5051
5051
  let o = a, s;
5052
- t[8] === e.text ? s = t[9] : (s = vt(e.text), t[8] = e.text, t[9] = s);
5052
+ t[8] === e.text ? s = t[9] : (s = yt(e.text), t[8] = e.text, t[9] = s);
5053
5053
  let c;
5054
- return t[10] !== o || t[11] !== e.cwd || t[12] !== e.onTaskListChange || t[13] !== e.threadRef || t[14] !== e.workspaceMutationId || t[15] !== s ? (c = /* @__PURE__ */ Q(Fe, {
5054
+ return t[10] !== o || t[11] !== e.cwd || t[12] !== e.onTaskListChange || t[13] !== e.threadRef || t[14] !== e.workspaceMutationId || t[15] !== s ? (c = /* @__PURE__ */ Q(Ie, {
5055
5055
  text: s,
5056
5056
  cwd: e.cwd,
5057
5057
  imageBaseDir: o,
@@ -5104,7 +5104,7 @@ function wo(e, t, n) {
5104
5104
  }
5105
5105
  // src/components/files/filePreviewMode.ts
5106
5106
  function To(e, t) {
5107
- return e === null || e === "." || E(e, t) === "." ? null : e;
5107
+ return e === null || e === "." || h(e, t) === "." ? null : e;
5108
5108
  }
5109
5109
  var Eo = (e) => /\.(?:md|mdx|markdown|mdown|mkd)$/i.test(e);
5110
5110
  function Do(e, t = o) {
@@ -5118,7 +5118,7 @@ function Do(e, t = o) {
5118
5118
  }
5119
5119
  }
5120
5120
  function Oo(e) {
5121
- return e.attachmentOpen || e.relativePath && b(e.relativePath) ? !1 : e.explorerOpen || e.relativePath === null;
5121
+ return e.attachmentOpen || e.relativePath && D(e.relativePath) ? !1 : e.explorerOpen || e.relativePath === null;
5122
5122
  }
5123
5123
  function ko(e) {
5124
5124
  return e.draft ? {
@@ -5126,7 +5126,7 @@ function ko(e) {
5126
5126
  cwd: e.workspaceRoot,
5127
5127
  path: e.absolutePath
5128
5128
  } : {
5129
- _tag: he(e.absolutePath, e.workspaceRoot).relativePath === void 0 ? "media-file" : e.kind,
5129
+ _tag: ge(e.absolutePath, e.workspaceRoot).relativePath === void 0 ? "media-file" : e.kind,
5130
5130
  threadId: e.threadRef.threadId,
5131
5131
  path: e.absolutePath
5132
5132
  };
@@ -5236,15 +5236,15 @@ function Mo({ environmentId: e, cwd: t, relativePath: n }) {
5236
5236
  }
5237
5237
  var No = jo({
5238
5238
  debounceMs: 500,
5239
- canPersist: ({ environmentId: e }) => n(e, ue),
5239
+ canPersist: ({ environmentId: e }) => n(e, de),
5240
5240
  subscribeWritable: ({ environmentId: e }, t) => {
5241
- let a = n(e, ue);
5241
+ let a = n(e, de);
5242
5242
  return re.subscribe(i.sessionStateAtom(e), (e) => {
5243
- let n = r(e, ue);
5243
+ let n = r(e, de);
5244
5244
  n && !a && t(), a = n;
5245
5245
  });
5246
5246
  },
5247
- persist: ({ environmentId: e, cwd: t, relativePath: n }, r) => ee(re, ye.writeFile, {
5247
+ persist: ({ environmentId: e, cwd: t, relativePath: n }, r) => I(re, be.writeFile, {
5248
5248
  environmentId: e,
5249
5249
  input: {
5250
5250
  cwd: t,
@@ -5252,8 +5252,8 @@ var No = jo({
5252
5252
  contents: r
5253
5253
  }
5254
5254
  }),
5255
- confirm: ({ environmentId: e, cwd: t, relativePath: n }, r) => at(e, t, n, r),
5256
- readUnsaved: ({ environmentId: e, cwd: t, relativePath: n }) => bt(e, t, n)?.contents ?? null
5255
+ confirm: ({ environmentId: e, cwd: t, relativePath: n }, r) => ot(e, t, n, r),
5256
+ readUnsaved: ({ environmentId: e, cwd: t, relativePath: n }) => xt(e, t, n)?.contents ?? null
5257
5257
  });
5258
5258
  function Po(e, t) {
5259
5259
  let n = Z(6), { environmentId: r, cwd: i, relativePath: a } = e, o, s;
@@ -5272,9 +5272,9 @@ function Fo(e, t) {
5272
5272
  No.change(e, t);
5273
5273
  }
5274
5274
  // src/components/files/FilePreviewPanel.tsx
5275
- var Io = O(null), Lo = Pr(() => import("./MermaidFilePreview-CP2zP4FU.js").then((e) => ({ default: e.MermaidFilePreview }))), Ro = "hanzodev.fileExplorerOpen", zo = "hanzodev.renderMarkdown", Bo = "hanzodev.renderBrowserFile", Vo = "hanzodev.renderTable";
5275
+ var Io = O(null), Lo = Pr(() => import("./MermaidFilePreview-BqB2exZU.js").then((e) => ({ default: e.MermaidFilePreview }))), Ro = "hanzodev.fileExplorerOpen", zo = "hanzodev.renderMarkdown", Bo = "hanzodev.renderBrowserFile", Vo = "hanzodev.renderTable";
5276
5276
  function Ho(e) {
5277
- let t = Z(29), n = he(e.absolutePath, e.workspaceRoot).relativePath === void 0 ? "media-file" : "workspace-file", r;
5277
+ let t = Z(29), n = ge(e.absolutePath, e.workspaceRoot).relativePath === void 0 ? "media-file" : "workspace-file", r;
5278
5278
  t[0] !== e.absolutePath || t[1] !== e.draft || t[2] !== e.threadRef || t[3] !== e.workspaceRoot || t[4] !== n ? (r = ko({
5279
5279
  kind: n,
5280
5280
  threadRef: e.threadRef,
@@ -5282,10 +5282,10 @@ function Ho(e) {
5282
5282
  workspaceRoot: e.workspaceRoot,
5283
5283
  absolutePath: e.absolutePath
5284
5284
  }), t[0] = e.absolutePath, t[1] = e.draft, t[2] = e.threadRef, t[3] = e.workspaceRoot, t[4] = n, t[5] = r) : r = t[5];
5285
- let i = r, a = Xe(e.environmentId, i), o;
5285
+ let i = r, a = Ze(e.environmentId, i), o;
5286
5286
  t[6] !== a._tag || t[7] !== a.url || t[8] !== e.workspaceMutationId ? (o = e.workspaceMutationId === null ? "" : `${a._tag === "Success" && a.url.includes("?") ? "&" : "?"}workspace-revision=${encodeURIComponent(e.workspaceMutationId)}`, t[6] = a._tag, t[7] = a.url, t[8] = e.workspaceMutationId, t[9] = o) : o = t[9];
5287
5287
  let s = o, c = a._tag === "Success" ? `${a.url}${s}` : null, l = e.alt, u;
5288
- t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (u = he(e.absolutePath, e.workspaceRoot), t[10] = e.absolutePath, t[11] = e.workspaceRoot, t[12] = u) : u = t[12];
5288
+ t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (u = ge(e.absolutePath, e.workspaceRoot), t[10] = e.absolutePath, t[11] = e.workspaceRoot, t[12] = u) : u = t[12];
5289
5289
  let d;
5290
5290
  t[13] !== e.environmentId || t[14] !== i ? (d = {
5291
5291
  environmentId: e.environmentId,
@@ -5304,16 +5304,16 @@ function Ho(e) {
5304
5304
  let e;
5305
5305
  t[21] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
5306
5306
  className: "flex min-h-0 flex-1 items-center justify-center px-6 text-center text-xs leading-relaxed text-destructive",
5307
- children: /* @__PURE__ */ Q(L, { children: "Unable to load workspace image." })
5307
+ children: /* @__PURE__ */ Q(j, { children: "Unable to load workspace image." })
5308
5308
  }), t[21] = e) : e = t[21];
5309
5309
  let n;
5310
- return t[22] === p ? n = t[23] : (n = /* @__PURE__ */ Q(it, {
5310
+ return t[22] === p ? n = t[23] : (n = /* @__PURE__ */ Q(at, {
5311
5311
  source: p,
5312
5312
  children: e
5313
5313
  }), t[22] = p, t[23] = n), n;
5314
5314
  }
5315
5315
  let m;
5316
- return t[24] !== p || t[25] !== a._tag || t[26] !== c || t[27] !== e.alt ? (m = a._tag === "Success" && c !== null ? /* @__PURE__ */ Q(it, {
5316
+ return t[24] !== p || t[25] !== a._tag || t[26] !== c || t[27] !== e.alt ? (m = a._tag === "Success" && c !== null ? /* @__PURE__ */ Q(at, {
5317
5317
  source: p,
5318
5318
  children: /* @__PURE__ */ Q("div", {
5319
5319
  className: "flex min-h-0 flex-1 flex-col overflow-hidden",
@@ -5324,12 +5324,12 @@ function Ho(e) {
5324
5324
  })
5325
5325
  }) : /* @__PURE__ */ Q("div", {
5326
5326
  className: "flex min-h-0 flex-1 items-center justify-center text-muted-foreground",
5327
- children: /* @__PURE__ */ Q(_, { size: "lg" })
5327
+ children: /* @__PURE__ */ Q(x, { size: "lg" })
5328
5328
  }), t[24] = p, t[25] = a._tag, t[26] = c, t[27] = e.alt, t[28] = m) : m = t[28], m;
5329
5329
  }
5330
5330
  function Uo(e) {
5331
5331
  let t = Z(26), n;
5332
- t[0] === e.absolutePath ? n = t[1] : (n = yt(e.absolutePath), t[0] = e.absolutePath, t[1] = n);
5332
+ t[0] === e.absolutePath ? n = t[1] : (n = bt(e.absolutePath), t[0] = e.absolutePath, t[1] = n);
5333
5333
  let r = n, i = r ? "media-file" : "workspace-file", a;
5334
5334
  t[2] !== e.absolutePath || t[3] !== e.draft || t[4] !== e.threadRef || t[5] !== e.workspaceRoot || t[6] !== i ? (a = ko({
5335
5335
  kind: i,
@@ -5338,7 +5338,7 @@ function Uo(e) {
5338
5338
  workspaceRoot: e.workspaceRoot,
5339
5339
  absolutePath: e.absolutePath
5340
5340
  }), t[2] = e.absolutePath, t[3] = e.draft, t[4] = e.threadRef, t[5] = e.workspaceRoot, t[6] = i, t[7] = a) : a = t[7];
5341
- let o = a, s = Xe(e.environmentId, o, e.workspaceMutationId), [c, l] = X(e.workspaceMutationId);
5341
+ let o = a, s = Ze(e.environmentId, o, e.workspaceMutationId), [c, l] = X(e.workspaceMutationId);
5342
5342
  s._tag === "Success" && !s.waiting && c !== e.workspaceMutationId && l(e.workspaceMutationId);
5343
5343
  let u = r && s._tag === "Success" ? s.fileRevision : void 0, d = u ?? (r ? e.workspaceMutationId : c), f;
5344
5344
  t[8] !== s._tag || t[9] !== s.url || t[10] !== u || t[11] !== d ? (f = d === null ? "" : `${s._tag === "Success" && s.url.includes("?") ? "&" : "?"}${u === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(d)}`, t[8] = s._tag, t[9] = s.url, t[10] = u, t[11] = d, t[12] = f) : f = t[12];
@@ -5347,34 +5347,34 @@ function Uo(e) {
5347
5347
  let e;
5348
5348
  return t[13] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
5349
5349
  className: "flex min-h-0 flex-1 items-center justify-center px-6 text-center text-xs leading-relaxed text-destructive",
5350
- children: /* @__PURE__ */ Q(L, { children: "Unable to load file preview." })
5350
+ children: /* @__PURE__ */ Q(j, { children: "Unable to load file preview." })
5351
5351
  }), t[13] = e) : e = t[13], e;
5352
5352
  }
5353
5353
  if (s._tag !== "Success" || r && s.fileRevision === void 0 && s.waiting) {
5354
5354
  let e;
5355
5355
  return t[14] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
5356
5356
  className: "flex min-h-0 flex-1 items-center justify-center text-muted-foreground",
5357
- children: /* @__PURE__ */ Q(_, { size: "lg" })
5357
+ children: /* @__PURE__ */ Q(x, { size: "lg" })
5358
5358
  }), t[14] = e) : e = t[14], e;
5359
5359
  }
5360
- let m = `${s.url}${p}`, h = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}:${d}`, g = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}`, v;
5361
- t[15] !== e.environmentId || t[16] !== e.title || t[17] !== o ? (v = /* @__PURE__ */ Q(Wo, {
5360
+ let m = `${s.url}${p}`, h = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}:${d}`, g = `${e.environmentId}:${o._tag}:${e.threadRef.threadId}:${e.absolutePath}`, _;
5361
+ t[15] !== e.environmentId || t[16] !== e.title || t[17] !== o ? (_ = /* @__PURE__ */ Q(Wo, {
5362
5362
  environmentId: e.environmentId,
5363
5363
  resource: o,
5364
5364
  name: e.title
5365
- }), t[15] = e.environmentId, t[16] = e.title, t[17] = o, t[18] = v) : v = t[18];
5366
- let y;
5367
- return t[19] !== r || t[20] !== e.title || t[21] !== m || t[22] !== h || t[23] !== g || t[24] !== v ? (y = /* @__PURE__ */ Q(dt, {
5365
+ }), t[15] = e.environmentId, t[16] = e.title, t[17] = o, t[18] = _) : _ = t[18];
5366
+ let v;
5367
+ return t[19] !== r || t[20] !== e.title || t[21] !== m || t[22] !== h || t[23] !== g || t[24] !== _ ? (v = /* @__PURE__ */ Q(ft, {
5368
5368
  src: m,
5369
5369
  documentKey: h,
5370
5370
  documentId: g,
5371
5371
  title: e.title,
5372
5372
  pdf: r,
5373
- pdfActions: v
5374
- }), t[19] = r, t[20] = e.title, t[21] = m, t[22] = h, t[23] = g, t[24] = v, t[25] = y) : y = t[25], y;
5373
+ pdfActions: _
5374
+ }), t[19] = r, t[20] = e.title, t[21] = m, t[22] = h, t[23] = g, t[24] = _, t[25] = v) : v = t[25], v;
5375
5375
  }
5376
5376
  function Wo(e) {
5377
- let t = Z(12), n = C(), [r, i] = X(!1), a = Qe(e.environmentId, e.resource), s;
5377
+ let t = Z(12), n = u(), [r, i] = X(!1), a = $e(e.environmentId, e.resource), s;
5378
5378
  t[0] !== n || t[1] !== r ? (s = n(r ? "Preparing file…" : "Save file"), t[0] = n, t[1] = r, t[2] = s) : s = t[2];
5379
5379
  let c;
5380
5380
  t[3] !== n || t[4] !== e.name || t[5] !== a ? (c = () => {
@@ -5387,21 +5387,21 @@ function Wo(e) {
5387
5387
  setTimeout(() => URL.revokeObjectURL(i), 3e4);
5388
5388
  let o = document.createElement("a");
5389
5389
  o.href = i, o.download = e.name.split(/[\\/]/).at(-1) || e.name, o.click();
5390
- })().catch((e) => We.add({
5390
+ })().catch((e) => Ge.add({
5391
5391
  type: "error",
5392
5392
  title: n("Could not save file"),
5393
- description: _e(e, o) ?? n("Please try again.")
5393
+ description: ve(e, o) ?? n("Please try again.")
5394
5394
  })).finally(() => i(!1));
5395
5395
  }, t[3] = n, t[4] = e.name, t[5] = a, t[6] = c) : c = t[6];
5396
5396
  let l;
5397
- t[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Q(B, { className: "size-3.5" }), t[7] = l) : l = t[7];
5398
- let u;
5399
- return t[8] !== r || t[9] !== s || t[10] !== c ? (u = /* @__PURE__ */ Q(xr, {
5397
+ t[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Q(z, { className: "size-3.5" }), t[7] = l) : l = t[7];
5398
+ let d;
5399
+ return t[8] !== r || t[9] !== s || t[10] !== c ? (d = /* @__PURE__ */ Q(xr, {
5400
5400
  label: s,
5401
5401
  disabled: r,
5402
5402
  onPress: c,
5403
5403
  children: l
5404
- }), t[8] = r, t[9] = s, t[10] = c, t[11] = u) : u = t[11], u;
5404
+ }), t[8] = r, t[9] = s, t[10] = c, t[11] = d) : d = t[11], d;
5405
5405
  }
5406
5406
  function Go(e) {
5407
5407
  let t = Z(28), n;
@@ -5412,10 +5412,10 @@ function Go(e) {
5412
5412
  workspaceRoot: e.workspaceRoot,
5413
5413
  absolutePath: e.absolutePath
5414
5414
  }), t[0] = e.absolutePath, t[1] = e.draft, t[2] = e.threadRef, t[3] = e.workspaceRoot, t[4] = n) : n = t[4];
5415
- let r = n, i = Xe(e.environmentId, r, e.workspaceMutationId ?? void 0), a = Qe(e.environmentId, r), o = i._tag === "Success" ? i.fileRevision : void 0, s = o ?? e.workspaceMutationId, c;
5415
+ let r = n, i = Ze(e.environmentId, r, e.workspaceMutationId ?? void 0), a = $e(e.environmentId, r), o = i._tag === "Success" ? i.fileRevision : void 0, s = o ?? e.workspaceMutationId, c;
5416
5416
  t[5] !== i._tag || t[6] !== i.url || t[7] !== o || t[8] !== s ? (c = s === null ? "" : `${i._tag === "Success" && i.url.includes("?") ? "&" : "?"}${o === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(s)}`, t[5] = i._tag, t[6] = i.url, t[7] = o, t[8] = s, t[9] = c) : c = t[9];
5417
5417
  let l = c, u = i._tag === "Success" ? `${i.url}${l}` : null, d = i._tag === "Failure", f = e.name, p = e.name, m;
5418
- t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (m = he(e.absolutePath, e.workspaceRoot), t[10] = e.absolutePath, t[11] = e.workspaceRoot, t[12] = m) : m = t[12];
5418
+ t[10] !== e.absolutePath || t[11] !== e.workspaceRoot ? (m = ge(e.absolutePath, e.workspaceRoot), t[10] = e.absolutePath, t[11] = e.workspaceRoot, t[12] = m) : m = t[12];
5419
5419
  let h;
5420
5420
  t[13] !== e.environmentId || t[14] !== r ? (h = {
5421
5421
  environmentId: e.environmentId,
@@ -5432,7 +5432,7 @@ function Go(e) {
5432
5432
  let _;
5433
5433
  return t[21] !== u || t[22] !== e.name || t[23] !== a || t[24] !== s || t[25] !== d || t[26] !== g ? (_ = /* @__PURE__ */ Q("div", {
5434
5434
  className: "flex min-h-0 flex-1 items-center justify-center overflow-hidden p-4",
5435
- children: /* @__PURE__ */ Q(H, {
5435
+ children: /* @__PURE__ */ Q(V, {
5436
5436
  src: u,
5437
5437
  sourceFailed: d,
5438
5438
  label: f,
@@ -5446,7 +5446,7 @@ function Go(e) {
5446
5446
  }), t[21] = u, t[22] = e.name, t[23] = a, t[24] = s, t[25] = d, t[26] = g, t[27] = _) : _ = t[27], _;
5447
5447
  }
5448
5448
  function Ko(e) {
5449
- let t = Z(25), n = C(), r;
5449
+ let t = Z(25), n = u(), r;
5450
5450
  t[0] !== e.absolutePath || t[1] !== e.draft || t[2] !== e.threadRef || t[3] !== e.workspaceRoot ? (r = ko({
5451
5451
  kind: "media-file",
5452
5452
  threadRef: e.threadRef,
@@ -5454,10 +5454,10 @@ function Ko(e) {
5454
5454
  workspaceRoot: e.workspaceRoot,
5455
5455
  absolutePath: e.absolutePath
5456
5456
  }), t[0] = e.absolutePath, t[1] = e.draft, t[2] = e.threadRef, t[3] = e.workspaceRoot, t[4] = r) : r = t[4];
5457
- let i = r, a = Xe(e.environmentId, i, e.workspaceMutationId ?? void 0), o = Qe(e.environmentId, i), [s, c] = X(null), l = a._tag === "Success" ? a.fileRevision : void 0, u = l ?? e.workspaceMutationId, d;
5458
- t[5] !== a._tag || t[6] !== a.url || t[7] !== l || t[8] !== u ? (d = u === null ? "" : `${a._tag === "Success" && a.url.includes("?") ? "&" : "?"}${l === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(u)}`, t[5] = a._tag, t[6] = a.url, t[7] = l, t[8] = u, t[9] = d) : d = t[9];
5459
- let f = d, p = a._tag === "Success" ? `${a.url}${f}` : null;
5460
- if (a._tag === "Failure" || p !== null && s === p) {
5457
+ let i = r, a = Ze(e.environmentId, i, e.workspaceMutationId ?? void 0), o = $e(e.environmentId, i), [s, c] = X(null), l = a._tag === "Success" ? a.fileRevision : void 0, d = l ?? e.workspaceMutationId, f;
5458
+ t[5] !== a._tag || t[6] !== a.url || t[7] !== l || t[8] !== d ? (f = d === null ? "" : `${a._tag === "Success" && a.url.includes("?") ? "&" : "?"}${l === void 0 ? "workspace" : "file"}-revision=${encodeURIComponent(d)}`, t[5] = a._tag, t[6] = a.url, t[7] = l, t[8] = d, t[9] = f) : f = t[9];
5459
+ let p = f, m = a._tag === "Success" ? `${a.url}${p}` : null;
5460
+ if (a._tag === "Failure" || m !== null && s === m) {
5461
5461
  let e;
5462
5462
  t[10] === n ? e = t[11] : (e = n("Unable to load audio."), t[10] = n, t[11] = e);
5463
5463
  let r;
@@ -5470,19 +5470,19 @@ function Ko(e) {
5470
5470
  onRetry: r
5471
5471
  }), t[14] = e, t[15] = r, t[16] = i) : i = t[16], i;
5472
5472
  }
5473
- if (p === null) {
5473
+ if (m === null) {
5474
5474
  let e;
5475
5475
  return t[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q(Cr, {}), t[17] = e) : e = t[17], e;
5476
5476
  }
5477
- let m;
5478
- t[18] === p ? m = t[19] : (m = () => c(p), t[18] = p, t[19] = m);
5479
5477
  let h;
5480
- return t[20] !== e.name || t[21] !== u || t[22] !== m || t[23] !== p ? (h = /* @__PURE__ */ Q(Pe, {
5481
- src: p,
5478
+ t[18] === m ? h = t[19] : (h = () => c(m), t[18] = m, t[19] = h);
5479
+ let g;
5480
+ return t[20] !== e.name || t[21] !== d || t[22] !== h || t[23] !== m ? (g = /* @__PURE__ */ Q(Fe, {
5481
+ src: m,
5482
5482
  name: e.name,
5483
- revision: u,
5484
- onError: m
5485
- }), t[20] = e.name, t[21] = u, t[22] = m, t[23] = p, t[24] = h) : h = t[24], h;
5483
+ revision: d,
5484
+ onError: h
5485
+ }), t[20] = e.name, t[21] = d, t[22] = h, t[23] = m, t[24] = g) : g = t[24], g;
5486
5486
  }
5487
5487
  function qo() {}
5488
5488
  function Jo(e) {
@@ -5497,28 +5497,28 @@ function Jo(e) {
5497
5497
  path: e.absolutePath,
5498
5498
  ...e.document ? {} : { disposition: "attachment" }
5499
5499
  }, t[0] = e.absolutePath, t[1] = e.document, t[2] = e.draft, t[3] = e.threadRef, t[4] = e.workspaceRoot, t[5] = n) : n = t[5];
5500
- let r = n, i = C(), a = r._tag === "media-file", o = Xe(e.environmentId, a ? r : null, e.workspaceMutationId ?? void 0), s = o._tag === "Success" ? o.fileRevision ?? e.workspaceMutationId : void 0, [c, l] = X(s);
5500
+ let r = n, i = u(), a = r._tag === "media-file", o = Ze(e.environmentId, a ? r : null, e.workspaceMutationId ?? void 0), s = o._tag === "Success" ? o.fileRevision ?? e.workspaceMutationId : void 0, [c, l] = X(s);
5501
5501
  s !== void 0 && s !== c && l(s);
5502
- let u = a ? o._tag === "Failure" ? `failure:${e.workspaceMutationId}` : s ?? c : e.workspaceMutationId;
5503
- if (a && u === void 0 && o._tag === "Loading") {
5502
+ let d = a ? o._tag === "Failure" ? `failure:${e.workspaceMutationId}` : s ?? c : e.workspaceMutationId;
5503
+ if (a && d === void 0 && o._tag === "Loading") {
5504
5504
  let e;
5505
5505
  return t[6] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q(Cr, {}), t[6] = e) : e = t[6], e;
5506
5506
  }
5507
- let d = `${u}:${e.refreshRevision}`, f = e.name, p;
5508
- t[7] !== e.environmentId || t[8] !== r ? (p = {
5507
+ let f = `${d}:${e.refreshRevision}`, p = e.name, m;
5508
+ t[7] !== e.environmentId || t[8] !== r ? (m = {
5509
5509
  environmentId: e.environmentId,
5510
5510
  resource: r
5511
- }, t[7] = e.environmentId, t[8] = r, t[9] = p) : p = t[9];
5512
- let m;
5513
- t[10] === i ? m = t[11] : (m = i("File", { $context: "label for a file opened from the workspace" }), t[10] = i, t[11] = m);
5511
+ }, t[7] = e.environmentId, t[8] = r, t[9] = m) : m = t[9];
5514
5512
  let h;
5515
- return t[12] !== e.name || t[13] !== d || t[14] !== p || t[15] !== m ? (h = /* @__PURE__ */ Q(mt, {
5516
- name: f,
5513
+ t[10] === i ? h = t[11] : (h = i("File", { $context: "label for a file opened from the workspace" }), t[10] = i, t[11] = h);
5514
+ let g;
5515
+ return t[12] !== e.name || t[13] !== f || t[14] !== m || t[15] !== h ? (g = /* @__PURE__ */ Q(ht, {
5516
+ name: p,
5517
5517
  mimeType: "application/octet-stream",
5518
5518
  sizeBytes: 0,
5519
- asset: p,
5520
- origin: m
5521
- }, d), t[12] = e.name, t[13] = d, t[14] = p, t[15] = m, t[16] = h) : h = t[16], h;
5519
+ asset: m,
5520
+ origin: h
5521
+ }, f), t[12] = e.name, t[13] = f, t[14] = m, t[15] = h, t[16] = g) : g = t[16], g;
5522
5522
  }
5523
5523
  function Yo(e, t) {
5524
5524
  let n = 1;
@@ -5557,7 +5557,7 @@ function es(e, t, n) {
5557
5557
  return;
5558
5558
  }
5559
5559
  let d = a.file?.contents;
5560
- if (Xo(r, t === null || d === void 0 ? null : Yo(d, t)), !(a instanceof An)) return;
5560
+ if (Xo(r, t === null || d === void 0 ? null : Yo(d, t)), !(a instanceof jn)) return;
5561
5561
  if (c.latestRequestId !== n && (l(), c.latestRequestId = n, c.handledRequestId = null), u && c.scrollContainer !== u) {
5562
5562
  c.scrollContainer = u;
5563
5563
  let e = c.scrollTop;
@@ -5630,13 +5630,13 @@ function is(e, t, n, r) {
5630
5630
  };
5631
5631
  }
5632
5632
  function as(e, t) {
5633
- if (e?.isWorkingPool() !== !0 || (t.lang ?? ar(t.name)) === "text") return !1;
5633
+ if (e?.isWorkingPool() !== !0 || (t.lang ?? or(t.name)) === "text") return !1;
5634
5634
  let n = 1;
5635
5635
  for (let e = t.contents.indexOf("\n"); e !== -1; e = t.contents.indexOf("\n", e + 1)) n += 1;
5636
- return n <= rr;
5636
+ return n <= ir;
5637
5637
  }
5638
5638
  function os(e) {
5639
- let t = Z(15), n = Gn(), [r, i] = X(null), a;
5639
+ let t = Z(15), n = Kn(), [r, i] = X(null), a;
5640
5640
  t[0] !== e || t[1] !== n ? (a = as(n, e), t[0] = e, t[1] = n, t[2] = a) : a = t[2];
5641
5641
  let o = !a || r === e, s, c;
5642
5642
  t[3] !== e || t[4] !== o || t[5] !== n ? (s = () => {
@@ -5657,44 +5657,44 @@ function os(e) {
5657
5657
  }, t[12] = u, t[13] = o, t[14] = d) : d = t[14], d;
5658
5658
  }
5659
5659
  function ss(e) {
5660
- let t = Z(80), { environmentId: n, projectId: r, cwd: i, relativePath: a, composerDraftTarget: o, contents: s, resolvedTheme: l, revealRequestId: d, wordWrap: f, onPostRender: p, onPendingChange: m, onEditorChange: h } = e, g = oe(), _ = u(hs), v = u(ms), y;
5660
+ let t = Z(80), { environmentId: n, projectId: r, cwd: i, relativePath: a, composerDraftTarget: o, contents: s, resolvedTheme: l, revealRequestId: u, wordWrap: d, onPostRender: p, onPendingChange: m, onEditorChange: h } = e, g = ee(), _ = f(hs), v = f(ms), y;
5661
5661
  t[0] === o ? y = t[1] : (y = (e) => e.getComposerDraft(o)?.reviewComments ?? ns, t[0] = o, t[1] = y);
5662
- let b = u(y), x;
5662
+ let b = f(y), x;
5663
5663
  t[2] === b ? x = t[3] : (x = new Set(b.map(ps)), t[2] = b, t[3] = x);
5664
5664
  let S = x, C;
5665
5665
  t[4] === Symbol.for("react.memo_cache_sentinel") ? (C = [], t[4] = C) : C = t[4];
5666
- let [w, T] = X(C), [E, D] = X(null), O = E?.revealRequestId === d ? E.range : null, k;
5667
- t[5] === d ? k = t[6] : (k = (e) => {
5666
+ let [w, T] = X(C), [E, D] = X(null), O = E?.revealRequestId === u ? E.range : null, k;
5667
+ t[5] === u ? k = t[6] : (k = (e) => {
5668
5668
  D({
5669
- revealRequestId: d,
5669
+ revealRequestId: u,
5670
5670
  range: e
5671
5671
  });
5672
- }, t[5] = d, t[6] = k);
5673
- let A = k, ee = Y(null), j = Y(null), M;
5674
- t[7] !== i || t[8] !== n || t[9] !== a ? (M = {
5672
+ }, t[5] = u, t[6] = k);
5673
+ let A = k, j = Y(null), M = Y(null), N;
5674
+ t[7] !== i || t[8] !== n || t[9] !== a ? (N = {
5675
5675
  environmentId: n,
5676
5676
  cwd: i,
5677
5677
  relativePath: a
5678
- }, t[7] = i, t[8] = n, t[9] = a, t[10] = M) : M = t[10];
5679
- let N = M;
5680
- Po(N, m);
5678
+ }, t[7] = i, t[8] = n, t[9] = a, t[10] = N) : N = t[10];
5679
+ let te = N;
5680
+ Po(te, m);
5681
5681
  let P;
5682
5682
  t[11] !== s || t[12] !== i || t[13] !== n || t[14] !== a ? (P = () => is(n, i, a, s), t[11] = s, t[12] = i, t[13] = n, t[14] = a, t[15] = P) : P = t[15];
5683
- let [F, te] = X(P), [ne, re] = X(null);
5684
- s !== (ne ?? F.contents) && (te(is(n, i, a, s)), re(null));
5685
- let { ready: I, onPostRender: ie } = os(F), ae = Y(null), L;
5686
- t[16] === h ? L = t[17] : (L = {
5683
+ let [F, ne] = X(P), [re, ie] = X(null);
5684
+ s !== (re ?? F.contents) && (ne(is(n, i, a, s)), ie(null));
5685
+ let { ready: ae, onPostRender: oe } = os(F), I = Y(null), se;
5686
+ t[16] === h ? se = t[17] : (se = {
5687
5687
  onAttach: (e) => {
5688
- ae.current = e, h(e);
5688
+ I.current = e, h(e);
5689
5689
  },
5690
5690
  onComplete: () => {
5691
- ae.current = null, h(null);
5691
+ I.current = null, h(null);
5692
5692
  }
5693
- }, t[16] = h, t[17] = L);
5694
- let R = L, se;
5695
- t[18] !== _ || t[19] !== o || t[20] !== i || t[21] !== n || t[22] !== S || t[23] !== a || t[24] !== N ? (se = (e) => {
5693
+ }, t[16] = h, t[17] = se);
5694
+ let L = se, ce;
5695
+ t[18] !== _ || t[19] !== o || t[20] !== i || t[21] !== n || t[22] !== S || t[23] !== a || t[24] !== te ? (ce = (e) => {
5696
5696
  let { file: t, lineAnnotations: r } = e;
5697
- if (t.contents === U(n, i, a) || (re(t.contents), st(n, i, a, t.contents), Fo(N, t.contents), !r)) return;
5697
+ if (t.contents === H(n, i, a) || (ie(t.contents), ct(n, i, a, t.contents), Fo(te, t.contents), !r)) return;
5698
5698
  let s = Or(r);
5699
5699
  T((e) => e === r ? e : s);
5700
5700
  for (let e of s) for (let n of e.metadata.entries) n.kind === "comment" && S.has(n.id) && _(o, c({
@@ -5705,9 +5705,9 @@ function ss(e) {
5705
5705
  text: n.text,
5706
5706
  contents: t.contents
5707
5707
  }));
5708
- }, t[18] = _, t[19] = o, t[20] = i, t[21] = n, t[22] = S, t[23] = a, t[24] = N, t[25] = se) : se = t[25];
5709
- let ce = se, le;
5710
- t[26] !== o || t[27] !== v || t[28] !== A ? (le = (e) => {
5708
+ }, t[18] = _, t[19] = o, t[20] = i, t[21] = n, t[22] = S, t[23] = a, t[24] = te, t[25] = ce) : ce = t[25];
5709
+ let le = ce, ue;
5710
+ t[26] !== o || t[27] !== v || t[28] !== A ? (ue = (e) => {
5711
5711
  A(null), v(o, e), T((t) => t.flatMap((t) => {
5712
5712
  let n = t.metadata.entries.filter((t) => t.id !== e);
5713
5713
  return n.length > 0 ? [{
@@ -5715,9 +5715,9 @@ function ss(e) {
5715
5715
  metadata: { entries: n }
5716
5716
  }] : [];
5717
5717
  }));
5718
- }, t[26] = o, t[27] = v, t[28] = A, t[29] = le) : le = t[29];
5719
- let ue = le, z;
5720
- t[30] !== _ || t[31] !== o || t[32] !== s || t[33] !== w || t[34] !== a || t[35] !== A ? (z = (e, t) => {
5718
+ }, t[26] = o, t[27] = v, t[28] = A, t[29] = ue) : ue = t[29];
5719
+ let de = ue, R;
5720
+ t[30] !== _ || t[31] !== o || t[32] !== s || t[33] !== w || t[34] !== a || t[35] !== A ? (R = (e, t) => {
5721
5721
  A(null);
5722
5722
  let n = w.flatMap(fs).find((t) => t.id === e);
5723
5723
  n && _(o, c({
@@ -5735,10 +5735,10 @@ function ss(e) {
5735
5735
  text: t
5736
5736
  } : n) }
5737
5737
  })));
5738
- }, t[30] = _, t[31] = o, t[32] = s, t[33] = w, t[34] = a, t[35] = A, t[36] = z) : z = t[36];
5739
- let de = z, fe;
5740
- t[37] === Symbol.for("react.memo_cache_sentinel") ? (fe = (e) => {
5741
- ae.current?.setSelections([]), ae.current?.blur();
5738
+ }, t[30] = _, t[31] = o, t[32] = s, t[33] = w, t[34] = a, t[35] = A, t[36] = R) : R = t[36];
5739
+ let fe = R, pe;
5740
+ t[37] === Symbol.for("react.memo_cache_sentinel") ? (pe = (e) => {
5741
+ I.current?.setSelections([]), I.current?.blur();
5742
5742
  let { startLine: t, endLine: n } = jr(e), r = {
5743
5743
  id: Ar(),
5744
5744
  kind: "draft",
@@ -5756,57 +5756,57 @@ function ss(e) {
5756
5756
  metadata: { entries: [...e.metadata.entries, r] }
5757
5757
  } : e);
5758
5758
  });
5759
- }, t[37] = fe) : fe = t[37];
5760
- let pe = fe, me;
5761
- t[38] === w ? me = t[39] : (me = w.some(cs), t[38] = w, t[39] = me);
5762
- let he = me, ge, _e;
5763
- t[40] !== he || t[41] !== A ? (ge = () => {
5764
- let e = ee.current;
5759
+ }, t[37] = pe) : pe = t[37];
5760
+ let me = pe, he;
5761
+ t[38] === w ? he = t[39] : (he = w.some(cs), t[38] = w, t[39] = he);
5762
+ let ge = he, _e, ve;
5763
+ t[40] !== ge || t[41] !== A ? (_e = () => {
5764
+ let e = j.current;
5765
5765
  if (e) return xo({
5766
5766
  root: e,
5767
- editor: { setSelections: (e) => ae.current?.setSelections(e) },
5768
- isBlocked: () => he,
5767
+ editor: { setSelections: (e) => I.current?.setSelections(e) },
5768
+ isBlocked: () => ge,
5769
5769
  onDismiss: () => A(null)
5770
5770
  });
5771
- }, _e = [he, A], t[40] = he, t[41] = A, t[42] = ge, t[43] = _e) : (ge = t[42], _e = t[43]), Ir(ge, _e);
5772
- let ve;
5773
- t[44] === A ? ve = t[45] : (ve = (e) => {
5774
- A(e), e && pe(e);
5775
- }, t[44] = A, t[45] = ve);
5776
- let ye = ve, be;
5777
- t[46] !== ie || t[47] !== p || t[48] !== O ? (be = (e, t, n) => {
5778
- p(e, t, n), ie(t.file, n), j.current !== null && (cancelAnimationFrame(j.current), j.current = null), n !== "unmount" && (j.current = requestAnimationFrame(() => {
5779
- j.current = null, e.isConnected && t.setSelectedLines(O, { notify: !1 });
5771
+ }, ve = [ge, A], t[40] = ge, t[41] = A, t[42] = _e, t[43] = ve) : (_e = t[42], ve = t[43]), Ir(_e, ve);
5772
+ let ye;
5773
+ t[44] === A ? ye = t[45] : (ye = (e) => {
5774
+ A(e), e && me(e);
5775
+ }, t[44] = A, t[45] = ye);
5776
+ let be = ye, xe;
5777
+ t[46] !== oe || t[47] !== p || t[48] !== O ? (xe = (e, t, n) => {
5778
+ p(e, t, n), oe(t.file, n), M.current !== null && (cancelAnimationFrame(M.current), M.current = null), n !== "unmount" && (M.current = requestAnimationFrame(() => {
5779
+ M.current = null, e.isConnected && t.setSelectedLines(O, { notify: !1 });
5780
5780
  }));
5781
- }, t[46] = ie, t[47] = p, t[48] = O, t[49] = be) : be = t[49];
5782
- let xe = be, Se;
5783
- t[50] === Symbol.for("react.memo_cache_sentinel") ? (Se = {
5781
+ }, t[46] = oe, t[47] = p, t[48] = O, t[49] = xe) : xe = t[49];
5782
+ let Se = xe, Ce;
5783
+ t[50] === Symbol.for("react.memo_cache_sentinel") ? (Ce = {
5784
5784
  overscrollSize: 600,
5785
5785
  intersectionObserverMargin: 1200
5786
- }, t[50] = Se) : Se = t[50];
5787
- let Ce = !he, we = !he, Te = f ? "wrap" : "scroll", Ee;
5788
- t[51] === l ? Ee = t[52] : (Ee = nr(l), t[51] = l, t[52] = Ee);
5789
- let De;
5790
- t[53] !== ye || t[54] !== xe || t[55] !== l || t[56] !== A || t[57] !== Ce || t[58] !== we || t[59] !== Te || t[60] !== Ee ? (De = {
5786
+ }, t[50] = Ce) : Ce = t[50];
5787
+ let we = !ge, Te = !ge, Ee = d ? "wrap" : "scroll", De;
5788
+ t[51] === l ? De = t[52] : (De = rr(l), t[51] = l, t[52] = De);
5789
+ let Oe;
5790
+ t[53] !== be || t[54] !== Se || t[55] !== l || t[56] !== A || t[57] !== we || t[58] !== Te || t[59] !== Ee || t[60] !== De ? (Oe = {
5791
5791
  disableFileHeader: !0,
5792
- enableGutterUtility: Ce,
5793
- enableLineSelection: we,
5792
+ enableGutterUtility: we,
5793
+ enableLineSelection: Te,
5794
5794
  onGutterUtilityClick: A,
5795
5795
  onLineSelectionChange: A,
5796
- onLineSelectionEnd: ye,
5797
- overflow: Te,
5798
- theme: Ee,
5799
- preferredHighlighter: ir,
5796
+ onLineSelectionEnd: be,
5797
+ overflow: Ee,
5798
+ theme: De,
5799
+ preferredHighlighter: ar,
5800
5800
  themeType: l,
5801
5801
  unsafeCSS: Sr,
5802
- onPostRender: xe
5803
- }, t[53] = ye, t[54] = xe, t[55] = l, t[56] = A, t[57] = Ce, t[58] = we, t[59] = Te, t[60] = Ee, t[61] = De) : De = t[61];
5804
- let Oe;
5805
- t[62] !== o || t[63] !== n || t[64] !== g || t[65] !== r || t[66] !== S || t[67] !== a || t[68] !== ue || t[69] !== de ? (Oe = (e) => {
5802
+ onPostRender: Se
5803
+ }, t[53] = be, t[54] = Se, t[55] = l, t[56] = A, t[57] = we, t[58] = Te, t[59] = Ee, t[60] = De, t[61] = Oe) : Oe = t[61];
5804
+ let ke;
5805
+ t[62] !== o || t[63] !== n || t[64] !== g || t[65] !== r || t[66] !== S || t[67] !== a || t[68] !== de || t[69] !== fe ? (ke = (e) => {
5806
5806
  let t = kr(e.metadata.entries, S);
5807
5807
  return t.length === 0 ? null : /* @__PURE__ */ Q("div", {
5808
5808
  className: "py-1",
5809
- children: t.map((e) => /* @__PURE__ */ Q(cn, {
5809
+ children: t.map((e) => /* @__PURE__ */ Q(ln, {
5810
5810
  environmentId: n,
5811
5811
  projectId: r,
5812
5812
  ownerKey: JSON.stringify([
@@ -5818,35 +5818,35 @@ function ss(e) {
5818
5818
  kind: e.kind,
5819
5819
  rangeLabel: Mr(e.startLine, e.endLine, g),
5820
5820
  text: e.text,
5821
- onCancel: () => ue(e.id),
5822
- onComment: (t) => de(e.id, t),
5823
- onDelete: () => ue(e.id)
5821
+ onCancel: () => de(e.id),
5822
+ onComment: (t) => fe(e.id, t),
5823
+ onDelete: () => de(e.id)
5824
5824
  }, e.id))
5825
5825
  });
5826
- }, t[62] = o, t[63] = n, t[64] = g, t[65] = r, t[66] = S, t[67] = a, t[68] = ue, t[69] = de, t[70] = Oe) : Oe = t[70];
5827
- let ke;
5828
- return t[71] !== I || t[72] !== R || t[73] !== F || t[74] !== ce || t[75] !== w || t[76] !== O || t[77] !== De || t[78] !== Oe ? (ke = /* @__PURE__ */ Q(Zn, {
5826
+ }, t[62] = o, t[63] = n, t[64] = g, t[65] = r, t[66] = S, t[67] = a, t[68] = de, t[69] = fe, t[70] = ke) : ke = t[70];
5827
+ let Ae;
5828
+ return t[71] !== ae || t[72] !== L || t[73] !== F || t[74] !== le || t[75] !== w || t[76] !== O || t[77] !== Oe || t[78] !== ke ? (Ae = /* @__PURE__ */ Q(Qn, {
5829
5829
  createEditor: rs,
5830
5830
  children: /* @__PURE__ */ Q("div", {
5831
- ref: ee,
5831
+ ref: j,
5832
5832
  className: "flex min-h-0 flex-1",
5833
5833
  children: /* @__PURE__ */ Q(pr, {
5834
5834
  className: "file-preview-virtualizer min-h-0 flex-1 overflow-auto",
5835
- config: Se,
5835
+ config: Ce,
5836
5836
  children: /* @__PURE__ */ Q(Er, {
5837
5837
  file: F,
5838
- edit: I,
5839
- editorOptions: R,
5840
- onEditChange: ce,
5841
- options: De,
5838
+ edit: ae,
5839
+ editorOptions: L,
5840
+ onEditChange: le,
5841
+ options: Oe,
5842
5842
  selectedLines: O,
5843
5843
  lineAnnotations: w,
5844
- renderAnnotation: Oe,
5844
+ renderAnnotation: ke,
5845
5845
  className: "min-h-full"
5846
5846
  })
5847
5847
  })
5848
5848
  })
5849
- }), t[71] = I, t[72] = R, t[73] = F, t[74] = ce, t[75] = w, t[76] = O, t[77] = De, t[78] = Oe, t[79] = ke) : ke = t[79], ke;
5849
+ }), t[71] = ae, t[72] = L, t[73] = F, t[74] = le, t[75] = w, t[76] = O, t[77] = Oe, t[78] = ke, t[79] = Ae) : Ae = t[79], Ae;
5850
5850
  }
5851
5851
  function cs(e) {
5852
5852
  return e.metadata.entries.some(ls);
@@ -5877,7 +5877,7 @@ function hs(e) {
5877
5877
  return e.addReviewComment;
5878
5878
  }
5879
5879
  function gs(e) {
5880
- let t = ce(navigator.platform);
5880
+ let t = le(navigator.platform);
5881
5881
  e.key.toLowerCase() === "a" && (t ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey) && !e.shiftKey && !e.altKey && e.target instanceof Node && e.currentTarget.contains(e.target) && (e.preventDefault(), window.getSelection()?.selectAllChildren(e.currentTarget));
5882
5882
  }
5883
5883
  function _s(e) {
@@ -5891,11 +5891,11 @@ function _s(e) {
5891
5891
  Po(d, l);
5892
5892
  let f;
5893
5893
  t[4] !== a || t[5] !== r || t[6] !== n || t[7] !== c || t[8] !== i || t[9] !== d ? (f = c ? void 0 : (e) => {
5894
- let { markerOffset: t, checked: o } = e, s = ct(n, r, i)?.contents ?? a, c = V(s, t, o);
5895
- c !== s && (st(n, r, i, c), Fo(d, c));
5894
+ let { markerOffset: t, checked: o } = e, s = lt(n, r, i)?.contents ?? a, c = B(s, t, o);
5895
+ c !== s && (ct(n, r, i, c), Fo(d, c));
5896
5896
  }, t[4] = a, t[5] = r, t[6] = n, t[7] = c, t[8] = i, t[9] = d, t[10] = f) : f = t[10];
5897
5897
  let p;
5898
- return t[11] !== a || t[12] !== r || t[13] !== i || t[14] !== f || t[15] !== o || t[16] !== s ? (p = /* @__PURE__ */ Q(xt, {
5898
+ return t[11] !== a || t[12] !== r || t[13] !== i || t[14] !== f || t[15] !== o || t[16] !== s ? (p = /* @__PURE__ */ Q(St, {
5899
5899
  className: "min-h-0 flex-1",
5900
5900
  onKeyDown: gs,
5901
5901
  children: /* @__PURE__ */ Q(vo, {
@@ -5913,138 +5913,138 @@ function vs(e, t, n) {
5913
5913
  }
5914
5914
  function ys() {
5915
5915
  try {
5916
- return k(Ro, z) ?? !0;
5916
+ return A(Ro, R) ?? !0;
5917
5917
  } catch (e) {
5918
5918
  return console.error(e), !0;
5919
5919
  }
5920
5920
  }
5921
5921
  function bs(e) {
5922
- let n = Z(216), { environmentId: r, cwd: i, projectName: a, projectId: o, relativePath: s, attachment: c, threadRef: l, composerDraftTarget: u, keybindings: f, availableEditors: m, openInShortcutEnabled: h, revealLine: g, revealRequestId: v, onOpenFile: y, onNavigateFolder: x, folderTrail: E, onPendingChange: D, selectedFilePending: O, workspaceMutationId: k } = e, ee;
5923
- n[0] !== c || n[1] !== i || n[2] !== s ? (ee = c === void 0 ? To(s, i) : s, n[0] = c, n[1] = i, n[2] = s, n[3] = ee) : ee = n[3];
5924
- let j = ee, M = typeof u == "string", N = C(), P = oe(), { resolvedTheme: te } = Je(), ne = Re(Ts), [re, ae] = X(null), R = re ?? ne, ce = t(r, se), le = ze(), de = p(pe), he = Ie(r), ye;
5925
- n[4] === r ? ye = n[5] : (ye = me.configValueAtom(r), n[4] = r, n[5] = ye);
5926
- let xe = p(ye), Se = Le(r), Ce = be(r), we;
5927
- n[6] === Symbol.for("react.memo_cache_sentinel") ? (we = {
5922
+ let n = Z(216), { environmentId: r, cwd: i, projectName: a, projectId: o, relativePath: s, attachment: c, threadRef: l, composerDraftTarget: f, keybindings: m, availableEditors: h, openInShortcutEnabled: g, revealLine: _, revealRequestId: y, onOpenFile: S, onNavigateFolder: C, folderTrail: w, onPendingChange: T, selectedFilePending: O, workspaceMutationId: k } = e, A;
5923
+ n[0] !== c || n[1] !== i || n[2] !== s ? (A = c === void 0 ? To(s, i) : s, n[0] = c, n[1] = i, n[2] = s, n[3] = A) : A = n[3];
5924
+ let M = A, N = typeof f == "string", P = u(), F = ee(), { resolvedTheme: ne } = Ye(), re = ze(Ts), [I, se] = X(null), L = I ?? re, le = t(r, ce), ue = Be(), fe = b(me), ge = Le(r), be;
5925
+ n[4] === r ? be = n[5] : (be = he.configValueAtom(r), n[4] = r, n[5] = be);
5926
+ let Se = b(be), Ce = Re(r), we = xe(r), Te;
5927
+ n[6] === Symbol.for("react.memo_cache_sentinel") ? (Te = {
5928
5928
  reportFailure: !1,
5929
5929
  refresh: !0
5930
- }, n[6] = we) : we = n[6];
5931
- let Ee = Ye(fe.createUrl, we), De;
5932
- n[7] === Symbol.for("react.memo_cache_sentinel") ? (De = { reportFailure: !1 }, n[7] = De) : De = n[7];
5933
- let B = qe(ve.open, De), Ne;
5934
- n[8] === j ? Ne = n[9] : (Ne = j !== null && mr(j), n[8] = j, n[9] = Ne);
5935
- let Pe = Ne, V;
5936
- n[10] !== Pe || n[11] !== j ? (V = j !== null && !Pe && S(j), n[10] = Pe, n[11] = j, n[12] = V) : V = n[12];
5937
- let Fe = V, Be;
5938
- n[13] !== Pe || n[14] !== j ? (Be = j !== null && !Pe && d(j), n[13] = Pe, n[14] = j, n[15] = Be) : Be = n[15];
5939
- let Ve = Be, He = Ve || Pe || Fe, Ue;
5940
- n[16] === j ? Ue = n[17] : (Ue = j !== null && yt(j), n[16] = j, n[17] = Ue);
5941
- let Xe = Ue, Qe;
5942
- n[18] === j ? Qe = n[19] : (Qe = j !== null && (gr({ name: j }) !== null || hr({ name: j }) !== null || _r(j)), n[18] = j, n[19] = Qe);
5943
- let $e = Qe, et;
5944
- n[20] !== Xe || n[21] !== j ? (et = j !== null && !Xe && tt(j), n[20] = Xe, n[21] = j, n[22] = et) : et = n[22];
5945
- let rt = et, it;
5946
- n[23] !== c || n[24] !== j ? (it = c !== void 0 || j !== null && b(j), n[23] = c, n[24] = j, n[25] = it) : it = n[25];
5947
- let H = it, at = Ze(r, P), { canReadFiles: st } = at, ct = t(r, ue), U = ot(r, i, j, c === void 0 && j !== null, P), [ut, dt] = X(0), ft = U.readError?.resolvedPath ?? U.readError?.operationPath, ht = c === void 0 ? j ?? (E === void 0 ? null : "") : null, _t;
5948
- n[26] !== ht || n[27] !== E ? (_t = ht === null ? null : Na(E, ht), n[26] = ht, n[27] = E, n[28] = _t) : _t = n[28];
5949
- let vt = _t, bt = c === void 0 && (U.isNotFile || E !== void 0 && U.data === null && U.error === null), St = bt && H ? j : null, Ct = !bt && (U.data !== null || U.error !== null) && xe?.shellRevealInFileManager === !0, W = bt ? null : j, [wt, Tt] = X(ys), Et = c !== void 0, G;
5950
- n[29] !== wt || n[30] !== W || n[31] !== Et ? (G = Oo({
5951
- relativePath: W,
5952
- explorerOpen: wt,
5953
- attachmentOpen: Et
5954
- }), n[29] = wt, n[30] = W, n[31] = Et, n[32] = G) : G = n[32];
5955
- let Dt = G, [Ot, kt] = ie(zo, !1, z), [At, jt] = ie(Bo, !0, z), [Mt, Nt] = ie(Vo, !0, z), [Pt, Ft] = X(null), It = Y(null), K;
5956
- n[33] === W ? K = n[34] : (K = W ? Eo(W) : !1, n[33] = W, n[34] = K);
5957
- let Lt = K, Rt;
5958
- n[35] === W ? Rt = n[36] : (Rt = W !== null && /\.(mmd|mermaid)$/i.test(W), n[35] = W, n[36] = Rt);
5959
- let zt = Rt, [Bt, Vt] = ie("hanzodev.renderMermaid", !0, z), Ht;
5960
- n[37] !== c || n[38] !== W ? (Ht = W && c === void 0 ? yr({ name: W }) : null, n[37] = c, n[38] = W, n[39] = Ht) : Ht = n[39];
5961
- let Ut = Ht, Wt = g === null || Pt?.path === j && Pt.requestId === v, Gt = Lt && Ot && Wt, Kt = zt && Bt && Wt, qt = Xe || rt && At && Wt, Jt = Ut !== null && Mt && Wt, Yt = zt ? "mermaid" : Lt ? "markdown" : Ut ? "table" : rt ? "html" : null, Xt = W !== null && c === void 0 && Yt !== null, Zt = W !== null && U.data !== null && !(Lt && Gt) && !Kt && !(Ut && Jt) && !qt && !$e, Qt = W !== null && !H && ct && U.error === null && !U.data?.truncated && !He && !$e && !qt && !Kt && !(Lt && Gt) && !(Ut && Jt), $t = Y(null), en = Y(null), tn;
5962
- n[40] === g ? tn = n[41] : (tn = () => {
5963
- let e = en.current;
5964
- if (!e || document.activeElement !== $t.current) return;
5930
+ }, n[6] = Te) : Te = n[6];
5931
+ let De = Xe(pe.createUrl, Te), Oe;
5932
+ n[7] === Symbol.for("react.memo_cache_sentinel") ? (Oe = { reportFailure: !1 }, n[7] = Oe) : Oe = n[7];
5933
+ let z = Je(ye.open, Oe), Pe;
5934
+ n[8] === M ? Pe = n[9] : (Pe = M !== null && mr(M), n[8] = M, n[9] = Pe);
5935
+ let Fe = Pe, B;
5936
+ n[10] !== Fe || n[11] !== M ? (B = M !== null && !Fe && E(M), n[10] = Fe, n[11] = M, n[12] = B) : B = n[12];
5937
+ let Ie = B, Ve;
5938
+ n[13] !== Fe || n[14] !== M ? (Ve = M !== null && !Fe && p(M), n[13] = Fe, n[14] = M, n[15] = Ve) : Ve = n[15];
5939
+ let He = Ve, Ue = He || Fe || Ie, We;
5940
+ n[16] === M ? We = n[17] : (We = M !== null && bt(M), n[16] = M, n[17] = We);
5941
+ let Ze = We, $e;
5942
+ n[18] === M ? $e = n[19] : ($e = M !== null && (gr({ name: M }) !== null || hr({ name: M }) !== null || _r(M)), n[18] = M, n[19] = $e);
5943
+ let et = $e, tt;
5944
+ n[20] !== Ze || n[21] !== M ? (tt = M !== null && !Ze && nt(M), n[20] = Ze, n[21] = M, n[22] = tt) : tt = n[22];
5945
+ let it = tt, at;
5946
+ n[23] !== c || n[24] !== M ? (at = c !== void 0 || M !== null && D(M), n[23] = c, n[24] = M, n[25] = at) : at = n[25];
5947
+ let V = at, ot = Qe(r, F), { canReadFiles: ct } = ot, lt = t(r, de), H = st(r, i, M, c === void 0 && M !== null, F), [dt, ft] = X(0), pt = H.readError?.resolvedPath ?? H.readError?.operationPath, gt = c === void 0 ? M ?? (w === void 0 ? null : "") : null, vt;
5948
+ n[26] !== gt || n[27] !== w ? (vt = gt === null ? null : Na(w, gt), n[26] = gt, n[27] = w, n[28] = vt) : vt = n[28];
5949
+ let yt = vt, xt = c === void 0 && (H.isNotFile || w !== void 0 && H.data === null && H.error === null), Ct = xt && V ? M : null, wt = !xt && (H.data !== null || H.error !== null) && Se?.shellRevealInFileManager === !0, U = xt ? null : M, [Tt, Et] = X(ys), Dt = c !== void 0, W;
5950
+ n[29] !== Tt || n[30] !== U || n[31] !== Dt ? (W = Oo({
5951
+ relativePath: U,
5952
+ explorerOpen: Tt,
5953
+ attachmentOpen: Dt
5954
+ }), n[29] = Tt, n[30] = U, n[31] = Dt, n[32] = W) : W = n[32];
5955
+ let Ot = W, [kt, At] = ae(zo, !1, R), [jt, Mt] = ae(Bo, !0, R), [Nt, Pt] = ae(Vo, !0, R), [Ft, It] = X(null), Lt = Y(null), G;
5956
+ n[33] === U ? G = n[34] : (G = U ? Eo(U) : !1, n[33] = U, n[34] = G);
5957
+ let Rt = G, zt;
5958
+ n[35] === U ? zt = n[36] : (zt = U !== null && /\.(mmd|mermaid)$/i.test(U), n[35] = U, n[36] = zt);
5959
+ let Bt = zt, [Vt, Ht] = ae("hanzodev.renderMermaid", !0, R), Ut;
5960
+ n[37] !== c || n[38] !== U ? (Ut = U && c === void 0 ? yr({ name: U }) : null, n[37] = c, n[38] = U, n[39] = Ut) : Ut = n[39];
5961
+ let Wt = Ut, Gt = _ === null || Ft?.path === M && Ft.requestId === y, Kt = Rt && kt && Gt, qt = Bt && Vt && Gt, Jt = Ze || it && jt && Gt, Yt = Wt !== null && Nt && Gt, Xt = Bt ? "mermaid" : Rt ? "markdown" : Wt ? "table" : it ? "html" : null, Zt = U !== null && c === void 0 && Xt !== null, Qt = U !== null && H.data !== null && !(Rt && Kt) && !qt && !(Wt && Yt) && !Jt && !et, $t = U !== null && !V && lt && H.error === null && !H.data?.truncated && !Ue && !et && !Jt && !qt && !(Rt && Kt) && !(Wt && Yt), en = Y(null), tn = Y(null), nn;
5962
+ n[40] === _ ? nn = n[41] : (nn = () => {
5963
+ let e = tn.current;
5964
+ if (!e || document.activeElement !== en.current) return;
5965
5965
  let t = !!e.getViewState().selections?.length;
5966
5966
  e.focus(t ? { preventScroll: !0 } : {
5967
5967
  preventScroll: !0,
5968
- lineNumber: g ?? "first-visible"
5968
+ lineNumber: _ ?? "first-visible"
5969
5969
  });
5970
- }, n[40] = g, n[41] = tn);
5971
- let nn = tn, rn;
5972
- n[42] === nn ? rn = n[43] : (rn = (e) => {
5973
- en.current = e, nn();
5974
- }, n[42] = nn, n[43] = rn);
5975
- let an = Ge(rn), on = Cs, sn = zt ? Kt : Lt ? Gt : Ut ? Jt : qt, cn = zt ? Vt : Lt ? kt : Ut ? Nt : jt, ln;
5976
- n[44] !== c || n[45] !== ce || n[46] !== Pe || n[47] !== Ce || n[48] !== W ? (ln = ce && W !== null && c === void 0 && !Pe && Ce && tt(W), n[44] = c, n[45] = ce, n[46] = Pe, n[47] = Ce, n[48] = W, n[49] = ln) : ln = n[49];
5977
- let un = ln, dn;
5978
- n[50] !== vt || n[51] !== bt || n[52] !== x ? (dn = (e) => {
5979
- let t = vt !== null && Aa(vt) === e ? vt : e;
5980
- x(t, Na(vt ?? void 0, t), !bt);
5981
- }, n[50] = vt, n[51] = bt, n[52] = x, n[53] = dn) : dn = n[53];
5982
- let fn = dn, pn;
5983
- n[54] !== c || n[55] !== ht || n[56] !== i || n[57] !== j ? (pn = ht === "" ? i : j && c === void 0 ? ge(j, i) : null, n[54] = c, n[55] = ht, n[56] = i, n[57] = j, n[58] = pn) : pn = n[58];
5984
- let q = pn, hn = es(j, g, v), gn;
5985
- n[59] !== c || n[60] !== st || n[61] !== i || n[62] !== r || n[63] !== $e || n[64] !== bt || n[65] !== He || n[66] !== Xe || n[67] !== j || n[68] !== O || n[69] !== k ? (gn = st && c === void 0 && j !== null && (bt || !He && !Xe && !$e) && !O ? mn(lt(r, i, j), k) : Io, n[59] = c, n[60] = st, n[61] = i, n[62] = r, n[63] = $e, n[64] = bt, n[65] = He, n[66] = Xe, n[67] = j, n[68] = O, n[69] = k, n[70] = gn) : gn = n[70], T(gn);
5986
- let _n;
5987
- n[71] === Symbol.for("react.memo_cache_sentinel") ? (_n = () => {
5988
- let e = It.current?.querySelectorAll("[data-file-crumb]");
5970
+ }, n[40] = _, n[41] = nn);
5971
+ let rn = nn, an;
5972
+ n[42] === rn ? an = n[43] : (an = (e) => {
5973
+ tn.current = e, rn();
5974
+ }, n[42] = rn, n[43] = an);
5975
+ let on = Ke(an), sn = Cs, cn = Bt ? qt : Rt ? Kt : Wt ? Yt : Jt, ln = Bt ? Ht : Rt ? At : Wt ? Pt : Mt, un;
5976
+ n[44] !== c || n[45] !== le || n[46] !== Fe || n[47] !== we || n[48] !== U ? (un = le && U !== null && c === void 0 && !Fe && we && nt(U), n[44] = c, n[45] = le, n[46] = Fe, n[47] = we, n[48] = U, n[49] = un) : un = n[49];
5977
+ let dn = un, fn;
5978
+ n[50] !== yt || n[51] !== xt || n[52] !== C ? (fn = (e) => {
5979
+ let t = yt !== null && Aa(yt) === e ? yt : e;
5980
+ C(t, Na(yt ?? void 0, t), !xt);
5981
+ }, n[50] = yt, n[51] = xt, n[52] = C, n[53] = fn) : fn = n[53];
5982
+ let pn = fn, mn;
5983
+ n[54] !== c || n[55] !== gt || n[56] !== i || n[57] !== M ? (mn = gt === "" ? i : M && c === void 0 ? _e(M, i) : null, n[54] = c, n[55] = gt, n[56] = i, n[57] = M, n[58] = mn) : mn = n[58];
5984
+ let K = mn, gn = es(M, _, y), _n;
5985
+ n[59] !== c || n[60] !== ct || n[61] !== i || n[62] !== r || n[63] !== et || n[64] !== xt || n[65] !== Ue || n[66] !== Ze || n[67] !== M || n[68] !== O || n[69] !== k ? (_n = ct && c === void 0 && M !== null && (xt || !Ue && !Ze && !et) && !O ? hn(ut(r, i, M), k) : Io, n[59] = c, n[60] = ct, n[61] = i, n[62] = r, n[63] = et, n[64] = xt, n[65] = Ue, n[66] = Ze, n[67] = M, n[68] = O, n[69] = k, n[70] = _n) : _n = n[70], v(_n);
5986
+ let vn;
5987
+ n[71] === Symbol.for("react.memo_cache_sentinel") ? (vn = () => {
5988
+ let e = Lt.current?.querySelectorAll("[data-file-crumb]");
5989
5989
  e?.[e.length - 1]?.scrollIntoView({
5990
5990
  block: "nearest",
5991
5991
  inline: "end"
5992
- }), It.current?.querySelector("[data-current-file-crumb='true']")?.scrollIntoView({
5992
+ }), Lt.current?.querySelector("[data-current-file-crumb='true']")?.scrollIntoView({
5993
5993
  block: "nearest",
5994
5994
  inline: "nearest"
5995
5995
  });
5996
- }, n[71] = _n) : _n = n[71];
5997
- let vn;
5998
- n[72] !== ht || n[73] !== vt ? (vn = [ht, vt], n[72] = ht, n[73] = vt, n[74] = vn) : vn = n[74], Ir(_n, vn);
5996
+ }, n[71] = vn) : vn = n[71];
5999
5997
  let yn;
6000
- n[75] === Symbol.for("react.memo_cache_sentinel") ? (yn = () => {
6001
- Tt(Ss);
6002
- }, n[75] = yn) : yn = n[75];
6003
- let bn = yn, xn;
6004
- n[76] !== q || n[77] !== ce || n[78] !== st || n[79] !== Ee || n[80] !== i || n[81] !== Se || n[82] !== N || n[83] !== P || n[84] !== B || n[85] !== l ? (xn = () => {
6005
- st && ce && q && Se && (async () => {
6006
- let e = await nt({
5998
+ n[72] !== gt || n[73] !== yt ? (yn = [gt, yt], n[72] = gt, n[73] = yt, n[74] = yn) : yn = n[74], Ir(vn, yn);
5999
+ let bn;
6000
+ n[75] === Symbol.for("react.memo_cache_sentinel") ? (bn = () => {
6001
+ Et(Ss);
6002
+ }, n[75] = bn) : bn = n[75];
6003
+ let xn = bn, Sn;
6004
+ n[76] !== K || n[77] !== le || n[78] !== ct || n[79] !== De || n[80] !== i || n[81] !== Ce || n[82] !== P || n[83] !== F || n[84] !== z || n[85] !== l ? (Sn = () => {
6005
+ ct && le && K && Ce && (async () => {
6006
+ let e = await rt({
6007
6007
  threadRef: l,
6008
- filePath: q,
6008
+ filePath: K,
6009
6009
  workspaceRoot: i,
6010
- httpBaseUrl: Se,
6011
- createAssetUrl: Ee,
6012
- openPreview: B
6010
+ httpBaseUrl: Ce,
6011
+ createAssetUrl: De,
6012
+ openPreview: z
6013
6013
  });
6014
- if (e._tag === "Success" || F(e)) return;
6015
- let t = w(e);
6016
- We.add(Ke({
6014
+ if (e._tag === "Success" || te(e)) return;
6015
+ let t = d(e);
6016
+ Ge.add(qe({
6017
6017
  type: "error",
6018
- title: N("Unable to open file in browser"),
6019
- description: _e(t, P) ?? N("An error occurred.")
6018
+ title: P("Unable to open file in browser"),
6019
+ description: ve(t, F) ?? P("An error occurred.")
6020
6020
  }));
6021
6021
  })();
6022
- }, n[76] = q, n[77] = ce, n[78] = st, n[79] = Ee, n[80] = i, n[81] = Se, n[82] = N, n[83] = P, n[84] = B, n[85] = l, n[86] = xn) : xn = n[86];
6023
- let Sn = xn;
6024
- if (c === void 0 && !st) {
6025
- if (at.isPending) {
6022
+ }, n[76] = K, n[77] = le, n[78] = ct, n[79] = De, n[80] = i, n[81] = Ce, n[82] = P, n[83] = F, n[84] = z, n[85] = l, n[86] = Sn) : Sn = n[86];
6023
+ let Cn = Sn;
6024
+ if (c === void 0 && !ct) {
6025
+ if (ot.isPending) {
6026
6026
  let e;
6027
6027
  return n[87] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ $("div", {
6028
6028
  className: "flex min-h-0 flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",
6029
- children: [/* @__PURE__ */ Q(_, { className: "size-4" }), /* @__PURE__ */ Q(L, { children: "Checking file access..." })]
6029
+ children: [/* @__PURE__ */ Q(x, { className: "size-4" }), /* @__PURE__ */ Q(j, { children: "Checking file access..." })]
6030
6030
  }), n[87] = e) : e = n[87], e;
6031
6031
  }
6032
6032
  let e;
6033
- n[88] !== at.error || n[89] !== N ? (e = at.error ?? N("This connection cannot read host files."), n[88] = at.error, n[89] = N, n[90] = e) : e = n[90];
6033
+ n[88] !== ot.error || n[89] !== P ? (e = ot.error ?? P("This connection cannot read host files."), n[88] = ot.error, n[89] = P, n[90] = e) : e = n[90];
6034
6034
  let t;
6035
6035
  return n[91] === e ? t = n[92] : (t = /* @__PURE__ */ Q("div", {
6036
6036
  className: "p-4 text-sm text-muted-foreground",
6037
6037
  children: e
6038
6038
  }), n[91] = e, n[92] = t), t;
6039
6039
  }
6040
- let Cn;
6041
- n[93] !== q || n[94] !== m || n[95] !== ht || n[96] !== vt || n[97] !== un || n[98] !== Xt || n[99] !== i || n[100] !== r || n[101] !== wt || n[102] !== U.isFile || n[103] !== N || n[104] !== Sn || n[105] !== de || n[106] !== H || n[107] !== f || n[108] !== P || n[109] !== fn || n[110] !== y || n[111] !== h || n[112] !== W || n[113] !== le || n[114] !== a || n[115] !== j || n[116] !== he || n[117] !== sn || n[118] !== Yt || n[119] !== v || n[120] !== Ct || n[121] !== cn || n[122] !== Zt || n[123] !== R || n[124] !== k ? (Cn = ht !== null && vt !== null ? /* @__PURE__ */ $("div", {
6040
+ let wn;
6041
+ n[93] !== K || n[94] !== h || n[95] !== gt || n[96] !== yt || n[97] !== dn || n[98] !== Zt || n[99] !== i || n[100] !== r || n[101] !== Tt || n[102] !== H.isFile || n[103] !== P || n[104] !== Cn || n[105] !== fe || n[106] !== V || n[107] !== m || n[108] !== F || n[109] !== pn || n[110] !== S || n[111] !== g || n[112] !== U || n[113] !== ue || n[114] !== a || n[115] !== M || n[116] !== ge || n[117] !== cn || n[118] !== Xt || n[119] !== y || n[120] !== wt || n[121] !== ln || n[122] !== Qt || n[123] !== L || n[124] !== k ? (wn = gt !== null && yt !== null ? /* @__PURE__ */ $("div", {
6042
6042
  className: wr,
6043
6043
  "data-surface-subheader": !0,
6044
6044
  children: [
6045
- /* @__PURE__ */ Q(xt, {
6045
+ /* @__PURE__ */ Q(St, {
6046
6046
  radius: "none",
6047
- ref: It,
6047
+ ref: Lt,
6048
6048
  hideScrollbars: !0,
6049
6049
  scrollFade: !0,
6050
6050
  className: "min-w-0 flex-1",
@@ -6054,83 +6054,83 @@ function bs(e) {
6054
6054
  children: /* @__PURE__ */ Q(_o, {
6055
6055
  cwd: i,
6056
6056
  environmentId: r,
6057
- onNavigateFolder: fn,
6058
- onOpenFile: y,
6057
+ onNavigateFolder: pn,
6058
+ onOpenFile: S,
6059
6059
  projectName: a,
6060
- relativePath: ht,
6061
- trail: vt,
6060
+ relativePath: gt,
6061
+ trail: yt,
6062
6062
  workspaceMutationId: k
6063
6063
  })
6064
6064
  })
6065
6065
  }),
6066
- q && (r === le || r === de || he.mode !== "local-exec") ? /* @__PURE__ */ Q(gt, {
6066
+ K && (r === ue || r === fe || ge.mode !== "local-exec") ? /* @__PURE__ */ Q(_t, {
6067
6067
  environmentId: r,
6068
- keybindings: f,
6069
- availableEditors: m,
6070
- enableShortcut: h,
6071
- openInCwd: q,
6072
- openInCwdIsFile: U.isFile,
6068
+ keybindings: m,
6069
+ availableEditors: h,
6070
+ enableShortcut: g,
6071
+ openInCwd: K,
6072
+ openInCwdIsFile: H.isFile,
6073
6073
  compact: !0,
6074
- revealFileManager: Ct
6074
+ revealFileManager: wt
6075
6075
  }) : null,
6076
- Xt && Yt ? /* @__PURE__ */ Q(xr, {
6077
- label: vs(Yt, sn, P),
6078
- pressed: sn,
6076
+ Zt && Xt ? /* @__PURE__ */ Q(xr, {
6077
+ label: vs(Xt, cn, F),
6078
+ pressed: cn,
6079
6079
  onPress: () => {
6080
- let e = !sn;
6081
- cn(e), Ft(e && j !== null ? {
6082
- path: j,
6083
- requestId: v
6080
+ let e = !cn;
6081
+ ln(e), It(e && M !== null ? {
6082
+ path: M,
6083
+ requestId: y
6084
6084
  } : null);
6085
6085
  },
6086
- children: Q(sn ? je : Yt === "table" ? Me : Ae, { className: "size-3.5" })
6086
+ children: Q(cn ? Me : Xt === "table" ? Ne : je, { className: "size-3.5" })
6087
6087
  }) : null,
6088
- Zt ? /* @__PURE__ */ Q(xr, {
6089
- label: N(R ? "Disable word wrap" : "Enable word wrap"),
6090
- pressed: R,
6091
- onPress: () => ae(!R),
6092
- children: /* @__PURE__ */ Q(Oe, { className: "size-3.5" })
6093
- }) : null,
6094
- un ? /* @__PURE__ */ Q(xr, {
6095
- label: N("Open file in preview browser"),
6096
- onPress: Sn,
6088
+ Qt ? /* @__PURE__ */ Q(xr, {
6089
+ label: P(L ? "Disable word wrap" : "Enable word wrap"),
6090
+ pressed: L,
6091
+ onPress: () => se(!L),
6097
6092
  children: /* @__PURE__ */ Q(ke, { className: "size-3.5" })
6098
6093
  }) : null,
6099
- !H && W !== null ? /* @__PURE__ */ Q(xr, {
6100
- label: N(wt ? "Hide file explorer" : "Show file explorer"),
6101
- pressed: wt,
6102
- onPress: bn,
6103
- children: /* @__PURE__ */ Q(Te, { className: "size-3.5" })
6094
+ dn ? /* @__PURE__ */ Q(xr, {
6095
+ label: P("Open file in preview browser"),
6096
+ onPress: Cn,
6097
+ children: /* @__PURE__ */ Q(Ae, { className: "size-3.5" })
6098
+ }) : null,
6099
+ !V && U !== null ? /* @__PURE__ */ Q(xr, {
6100
+ label: P(Tt ? "Hide file explorer" : "Show file explorer"),
6101
+ pressed: Tt,
6102
+ onPress: xn,
6103
+ children: /* @__PURE__ */ Q(Ee, { className: "size-3.5" })
6104
6104
  }) : null
6105
6105
  ]
6106
- }) : null, n[93] = q, n[94] = m, n[95] = ht, n[96] = vt, n[97] = un, n[98] = Xt, n[99] = i, n[100] = r, n[101] = wt, n[102] = U.isFile, n[103] = N, n[104] = Sn, n[105] = de, n[106] = H, n[107] = f, n[108] = P, n[109] = fn, n[110] = y, n[111] = h, n[112] = W, n[113] = le, n[114] = a, n[115] = j, n[116] = he, n[117] = sn, n[118] = Yt, n[119] = v, n[120] = Ct, n[121] = cn, n[122] = Zt, n[123] = R, n[124] = k, n[125] = Cn) : Cn = n[125];
6107
- let wn;
6108
- n[126] !== c || n[127] !== ct || n[128] !== at.isPending || n[129] !== H || n[130] !== j ? (wn = j && !c && !H && !ct && !at.isPending ? /* @__PURE__ */ Q("div", {
6109
- className: "shrink-0 border-b px-3 py-1.5 text-2xs text-muted-foreground",
6110
- children: /* @__PURE__ */ Q(L, { children: "Read-only connection. Unsaved edits are kept until write access returns." })
6111
- }) : null, n[126] = c, n[127] = ct, n[128] = at.isPending, n[129] = H, n[130] = j, n[131] = wn) : wn = n[131];
6106
+ }) : null, n[93] = K, n[94] = h, n[95] = gt, n[96] = yt, n[97] = dn, n[98] = Zt, n[99] = i, n[100] = r, n[101] = Tt, n[102] = H.isFile, n[103] = P, n[104] = Cn, n[105] = fe, n[106] = V, n[107] = m, n[108] = F, n[109] = pn, n[110] = S, n[111] = g, n[112] = U, n[113] = ue, n[114] = a, n[115] = M, n[116] = ge, n[117] = cn, n[118] = Xt, n[119] = y, n[120] = wt, n[121] = ln, n[122] = Qt, n[123] = L, n[124] = k, n[125] = wn) : wn = n[125];
6112
6107
  let Tn;
6113
- n[132] !== c || n[133] !== M || n[134] !== U.data || n[135] !== N || n[136] !== rt || n[137] !== Lt || n[138] !== He || n[139] !== zt || n[140] !== W || n[141] !== qt ? (Tn = W && c === void 0 && !He && !qt && U.data?.truncated && (M || Lt || zt || rt) ? /* @__PURE__ */ Q("div", {
6108
+ n[126] !== c || n[127] !== lt || n[128] !== ot.isPending || n[129] !== V || n[130] !== M ? (Tn = M && !c && !V && !lt && !ot.isPending ? /* @__PURE__ */ Q("div", {
6109
+ className: "shrink-0 border-b px-3 py-1.5 text-2xs text-muted-foreground",
6110
+ children: /* @__PURE__ */ Q(j, { children: "Read-only connection. Unsaved edits are kept until write access returns." })
6111
+ }) : null, n[126] = c, n[127] = lt, n[128] = ot.isPending, n[129] = V, n[130] = M, n[131] = Tn) : Tn = n[131];
6112
+ let En;
6113
+ n[132] !== c || n[133] !== N || n[134] !== H.data || n[135] !== P || n[136] !== it || n[137] !== Rt || n[138] !== Ue || n[139] !== Bt || n[140] !== U || n[141] !== Jt ? (En = U && c === void 0 && !Ue && !Jt && H.data?.truncated && (N || Rt || Bt || it) ? /* @__PURE__ */ Q("div", {
6114
6114
  className: "shrink-0 border-b border-warning/20 bg-warning-surface px-3 py-1.5 text-2xs text-warning-foreground",
6115
- children: N("{count, plural, one {Preview limited to the first 1 MB of a {formatted} byte file.} other {Preview limited to the first 1 MB of a {formatted} byte file.}}", {
6116
- count: U.data.byteLength,
6117
- formatted: U.data.byteLength.toLocaleString()
6115
+ children: P("{count, plural, one {Preview limited to the first 1 MB of a {formatted} byte file.} other {Preview limited to the first 1 MB of a {formatted} byte file.}}", {
6116
+ count: H.data.byteLength,
6117
+ formatted: H.data.byteLength.toLocaleString()
6118
6118
  })
6119
- }) : null, n[132] = c, n[133] = M, n[134] = U.data, n[135] = N, n[136] = rt, n[137] = Lt, n[138] = He, n[139] = zt, n[140] = W, n[141] = qt, n[142] = Tn) : Tn = n[142];
6120
- let En = W ? "flex" : "hidden", Dn;
6121
- n[143] === En ? Dn = n[144] : (Dn = I("min-w-0 flex-1 flex-col overflow-hidden", En), n[143] = En, n[144] = Dn);
6122
- let kn;
6123
- n[145] !== nn || n[146] !== N || n[147] !== Qt ? (kn = Qt ? /* @__PURE__ */ Q("div", {
6124
- ref: $t,
6119
+ }) : null, n[132] = c, n[133] = N, n[134] = H.data, n[135] = P, n[136] = it, n[137] = Rt, n[138] = Ue, n[139] = Bt, n[140] = U, n[141] = Jt, n[142] = En) : En = n[142];
6120
+ let Dn = U ? "flex" : "hidden", On;
6121
+ n[143] === Dn ? On = n[144] : (On = ie("min-w-0 flex-1 flex-col overflow-hidden", Dn), n[143] = Dn, n[144] = On);
6122
+ let An;
6123
+ n[145] !== rn || n[146] !== P || n[147] !== $t ? (An = $t ? /* @__PURE__ */ Q("div", {
6124
+ ref: en,
6125
6125
  tabIndex: -1,
6126
6126
  "data-workspace-focus-default": !0,
6127
6127
  "data-file-content-focus": !0,
6128
- "aria-label": N("File contents"),
6128
+ "aria-label": P("File contents"),
6129
6129
  className: "sr-only",
6130
- onFocus: () => queueMicrotask(nn)
6131
- }) : null, n[145] = nn, n[146] = N, n[147] = Qt, n[148] = kn) : kn = n[148];
6132
- let An;
6133
- n[149] !== q || n[150] !== c || n[151] !== ft || n[152] !== ct || n[153] !== u || n[154] !== i || n[155] !== M || n[156] !== r || n[157] !== U.data || n[158] !== U.error || n[159] !== U.readError || n[160] !== ut || n[161] !== an || n[162] !== Fe || n[163] !== $e || n[164] !== bt || n[165] !== H || n[166] !== rt || n[167] !== Ve || n[168] !== Lt || n[169] !== zt || n[170] !== Pe || n[171] !== P || n[172] !== hn || n[173] !== D || n[174] !== o || n[175] !== j || n[176] !== qt || n[177] !== Gt || n[178] !== Kt || n[179] !== Jt || n[180] !== te || n[181] !== g || n[182] !== v || n[183] !== Ut || n[184] !== l || n[185] !== R || n[186] !== k ? (An = bt ? null : j && c ? /* @__PURE__ */ Q(mt, {
6130
+ onFocus: () => queueMicrotask(rn)
6131
+ }) : null, n[145] = rn, n[146] = P, n[147] = $t, n[148] = An) : An = n[148];
6132
+ let jn;
6133
+ n[149] !== K || n[150] !== c || n[151] !== pt || n[152] !== lt || n[153] !== f || n[154] !== i || n[155] !== N || n[156] !== r || n[157] !== H.data || n[158] !== H.error || n[159] !== H.readError || n[160] !== dt || n[161] !== on || n[162] !== Ie || n[163] !== et || n[164] !== xt || n[165] !== V || n[166] !== it || n[167] !== He || n[168] !== Rt || n[169] !== Bt || n[170] !== Fe || n[171] !== F || n[172] !== gn || n[173] !== T || n[174] !== o || n[175] !== M || n[176] !== Jt || n[177] !== Kt || n[178] !== qt || n[179] !== Yt || n[180] !== ne || n[181] !== _ || n[182] !== y || n[183] !== Wt || n[184] !== l || n[185] !== L || n[186] !== k ? (jn = xt ? null : M && c ? /* @__PURE__ */ Q(ht, {
6134
6134
  name: c.name,
6135
6135
  mimeType: c.mimeType,
6136
6136
  sizeBytes: c.sizeBytes,
@@ -6140,59 +6140,59 @@ function bs(e) {
6140
6140
  },
6141
6141
  htmlRender: c.htmlRender === !0,
6142
6142
  threadRef: l
6143
- }, `${r}:${c.id}`) : j && Pe && q ? /* @__PURE__ */ Q(Go, {
6143
+ }, `${r}:${c.id}`) : M && Fe && K ? /* @__PURE__ */ Q(Go, {
6144
6144
  environmentId: r,
6145
6145
  threadRef: l,
6146
- draft: M,
6147
- absolutePath: q,
6146
+ draft: N,
6147
+ absolutePath: K,
6148
6148
  workspaceRoot: i,
6149
- name: j,
6149
+ name: M,
6150
6150
  workspaceMutationId: k
6151
- }, `${r}:${l.threadId}:${q}`) : j && Fe && q ? /* @__PURE__ */ Q(Ko, {
6151
+ }, `${r}:${l.threadId}:${K}`) : M && Ie && K ? /* @__PURE__ */ Q(Ko, {
6152
6152
  environmentId: r,
6153
6153
  threadRef: l,
6154
- draft: M,
6155
- absolutePath: q,
6154
+ draft: N,
6155
+ absolutePath: K,
6156
6156
  workspaceRoot: i,
6157
- name: j,
6157
+ name: M,
6158
6158
  workspaceMutationId: k
6159
- }, `${r}:${l.threadId}:${q}`) : j && Ve && q ? /* @__PURE__ */ Q(Ho, {
6159
+ }, `${r}:${l.threadId}:${K}`) : M && He && K ? /* @__PURE__ */ Q(Ho, {
6160
6160
  environmentId: r,
6161
6161
  threadRef: l,
6162
- draft: M,
6163
- absolutePath: q,
6162
+ draft: N,
6163
+ absolutePath: K,
6164
6164
  workspaceRoot: i,
6165
- alt: j,
6165
+ alt: M,
6166
6166
  workspaceMutationId: k
6167
- }, q) : j && qt && q ? /* @__PURE__ */ Q(Uo, {
6167
+ }, K) : M && Jt && K ? /* @__PURE__ */ Q(Uo, {
6168
6168
  environmentId: r,
6169
6169
  threadRef: l,
6170
- draft: M,
6171
- absolutePath: q,
6170
+ draft: N,
6171
+ absolutePath: K,
6172
6172
  workspaceRoot: i,
6173
- title: j,
6173
+ title: M,
6174
6174
  workspaceMutationId: k
6175
- }, q) : j && q && U.data?.truncated && !$e && !M && !Lt && !zt && !rt ? /* @__PURE__ */ Q(Ds, {
6175
+ }, K) : M && K && H.data?.truncated && !et && !N && !Rt && !Bt && !it ? /* @__PURE__ */ Q(Ds, {
6176
6176
  environmentId: r,
6177
6177
  threadRef: l,
6178
- absolutePath: q,
6179
- name: j,
6180
- delimiter: Jt ? Ut : null,
6178
+ absolutePath: K,
6179
+ name: M,
6180
+ delimiter: Yt ? Wt : null,
6181
6181
  workspaceMutationId: k,
6182
- revealLine: g,
6183
- revealRequestId: v,
6184
- wordWrap: R
6185
- }, `${q}:${Jt}:${ut}`) : j && q && ($e || U.readError?.failure === "binary_file") ? /* @__PURE__ */ Q(Jo, {
6182
+ revealLine: _,
6183
+ revealRequestId: y,
6184
+ wordWrap: L
6185
+ }, `${K}:${Yt}:${dt}`) : M && K && (et || H.readError?.failure === "binary_file") ? /* @__PURE__ */ Q(Jo, {
6186
6186
  environmentId: r,
6187
6187
  threadRef: l,
6188
- draft: M,
6189
- document: $e,
6190
- absolutePath: q,
6188
+ draft: N,
6189
+ document: et,
6190
+ absolutePath: K,
6191
6191
  workspaceRoot: i,
6192
- name: j.split(/[\\/]/).at(-1) || j,
6192
+ name: M.split(/[\\/]/).at(-1) || M,
6193
6193
  workspaceMutationId: k,
6194
- refreshRevision: ut
6195
- }, `${r}:${q}`) : j && U.error && U.data === null ? /* @__PURE__ */ Q("div", {
6194
+ refreshRevision: dt
6195
+ }, `${r}:${K}`) : M && H.error && H.data === null ? /* @__PURE__ */ Q("div", {
6196
6196
  role: "alert",
6197
6197
  className: "scrollbar-gutter-both flex min-h-0 flex-1 flex-col overflow-auto",
6198
6198
  children: /* @__PURE__ */ $("div", {
@@ -6200,113 +6200,113 @@ function bs(e) {
6200
6200
  children: [
6201
6201
  /* @__PURE__ */ Q("p", {
6202
6202
  className: "text-destructive",
6203
- children: U.readError ? Do(U.readError, P) : U.error
6203
+ children: H.readError ? Do(H.readError, F) : H.error
6204
6204
  }),
6205
- ft ? /* @__PURE__ */ Q("p", {
6205
+ pt ? /* @__PURE__ */ Q("p", {
6206
6206
  className: "text-muted-foreground",
6207
- children: /* @__PURE__ */ $(L, { children: ["Attempted path", /* @__PURE__ */ Q("code", {
6207
+ children: /* @__PURE__ */ $(j, { children: ["Attempted path", /* @__PURE__ */ Q("code", {
6208
6208
  className: "block break-all font-mono text-foreground select-all",
6209
- children: /* @__PURE__ */ Q(A, { children: ft })
6209
+ children: /* @__PURE__ */ Q(oe, { children: pt })
6210
6210
  })] })
6211
6211
  }) : null,
6212
- H ? null : /* @__PURE__ */ Q("p", {
6212
+ V ? null : /* @__PURE__ */ Q("p", {
6213
6213
  className: "text-muted-foreground",
6214
- children: /* @__PURE__ */ $(L, { children: [
6214
+ children: /* @__PURE__ */ $(j, { children: [
6215
6215
  "Workspace folder:",
6216
6216
  " ",
6217
6217
  /* @__PURE__ */ Q("code", {
6218
6218
  className: "break-all font-mono select-all",
6219
- children: /* @__PURE__ */ Q(A, { children: U.readError?.cwd ?? i })
6219
+ children: /* @__PURE__ */ Q(oe, { children: H.readError?.cwd ?? i })
6220
6220
  }),
6221
6221
  ". Check the link's path or locate the file in Files."
6222
6222
  ] })
6223
6223
  })
6224
6224
  ]
6225
6225
  })
6226
- }) : j && U.data === null ? /* @__PURE__ */ Q("div", {
6226
+ }) : M && H.data === null ? /* @__PURE__ */ Q("div", {
6227
6227
  className: "flex min-h-0 flex-1 items-center justify-center text-muted-foreground",
6228
- children: /* @__PURE__ */ Q(_, { size: "lg" })
6229
- }) : j && U.data ? Kt ? /* @__PURE__ */ Q(Nr, {
6228
+ children: /* @__PURE__ */ Q(x, { size: "lg" })
6229
+ }) : M && H.data ? qt ? /* @__PURE__ */ Q(Nr, {
6230
6230
  fallback: /* @__PURE__ */ Q(Cr, {}),
6231
- children: /* @__PURE__ */ Q(Lo, { text: U.data.contents })
6232
- }) : Lt && Gt ? /* @__PURE__ */ Q(_s, {
6231
+ children: /* @__PURE__ */ Q(Lo, { text: H.data.contents })
6232
+ }) : Rt && Kt ? /* @__PURE__ */ Q(_s, {
6233
6233
  environmentId: r,
6234
6234
  cwd: i,
6235
- relativePath: j,
6235
+ relativePath: M,
6236
6236
  threadRef: l,
6237
- contents: U.data.contents,
6237
+ contents: H.data.contents,
6238
6238
  workspaceMutationId: k,
6239
- readOnly: U.data.truncated || H || !ct,
6240
- onPendingChange: D
6241
- }, j) : Ut && Jt ? /* @__PURE__ */ Q(pt, {
6242
- name: j,
6243
- text: U.data.contents,
6244
- delimiter: Ut
6245
- }, j) : U.data.truncated || H || !ct ? /* @__PURE__ */ Q(Dr, {
6246
- name: j,
6247
- text: U.data.contents,
6248
- cacheKey: wo(i, j, U.data.contents),
6249
- onPostRender: hn,
6250
- wordWrap: R
6251
- }) : /* @__PURE__ */ Q(Xn, { children: /* @__PURE__ */ Q(ss, {
6239
+ readOnly: H.data.truncated || V || !lt,
6240
+ onPendingChange: T
6241
+ }, M) : Wt && Yt ? /* @__PURE__ */ Q(mt, {
6242
+ name: M,
6243
+ text: H.data.contents,
6244
+ delimiter: Wt
6245
+ }, M) : H.data.truncated || V || !lt ? /* @__PURE__ */ Q(Dr, {
6246
+ name: M,
6247
+ text: H.data.contents,
6248
+ cacheKey: wo(i, M, H.data.contents),
6249
+ onPostRender: gn,
6250
+ wordWrap: L
6251
+ }) : /* @__PURE__ */ Q(Zn, { children: /* @__PURE__ */ Q(ss, {
6252
6252
  environmentId: r,
6253
6253
  projectId: o,
6254
6254
  cwd: i,
6255
- relativePath: j,
6256
- composerDraftTarget: u,
6257
- contents: U.data.contents,
6258
- resolvedTheme: te,
6259
- revealRequestId: v,
6260
- wordWrap: R,
6261
- onPostRender: hn,
6262
- onPendingChange: D,
6263
- onEditorChange: an
6264
- }, `${j}:${te}`) }) : null, n[149] = q, n[150] = c, n[151] = ft, n[152] = ct, n[153] = u, n[154] = i, n[155] = M, n[156] = r, n[157] = U.data, n[158] = U.error, n[159] = U.readError, n[160] = ut, n[161] = an, n[162] = Fe, n[163] = $e, n[164] = bt, n[165] = H, n[166] = rt, n[167] = Ve, n[168] = Lt, n[169] = zt, n[170] = Pe, n[171] = P, n[172] = hn, n[173] = D, n[174] = o, n[175] = j, n[176] = qt, n[177] = Gt, n[178] = Kt, n[179] = Jt, n[180] = te, n[181] = g, n[182] = v, n[183] = Ut, n[184] = l, n[185] = R, n[186] = k, n[187] = An) : An = n[187];
6265
- let jn;
6266
- n[188] !== Dn || n[189] !== kn || n[190] !== An ? (jn = /* @__PURE__ */ $("div", {
6267
- className: Dn,
6268
- children: [kn, An]
6269
- }), n[188] = Dn, n[189] = kn, n[190] = An, n[191] = jn) : jn = n[191];
6255
+ relativePath: M,
6256
+ composerDraftTarget: f,
6257
+ contents: H.data.contents,
6258
+ resolvedTheme: ne,
6259
+ revealRequestId: y,
6260
+ wordWrap: L,
6261
+ onPostRender: gn,
6262
+ onPendingChange: T,
6263
+ onEditorChange: on
6264
+ }, `${M}:${ne}`) }) : null, n[149] = K, n[150] = c, n[151] = pt, n[152] = lt, n[153] = f, n[154] = i, n[155] = N, n[156] = r, n[157] = H.data, n[158] = H.error, n[159] = H.readError, n[160] = dt, n[161] = on, n[162] = Ie, n[163] = et, n[164] = xt, n[165] = V, n[166] = it, n[167] = He, n[168] = Rt, n[169] = Bt, n[170] = Fe, n[171] = F, n[172] = gn, n[173] = T, n[174] = o, n[175] = M, n[176] = Jt, n[177] = Kt, n[178] = qt, n[179] = Yt, n[180] = ne, n[181] = _, n[182] = y, n[183] = Wt, n[184] = l, n[185] = L, n[186] = k, n[187] = jn) : jn = n[187];
6270
6265
  let Mn;
6271
- n[192] !== vt || n[193] !== i || n[194] !== r || n[195] !== U || n[196] !== St || n[197] !== $e || n[198] !== He || n[199] !== Xe || n[200] !== y || n[201] !== W || n[202] !== a || n[203] !== j || n[204] !== v || n[205] !== Dt || n[206] !== k ? (Mn = Dt ? /* @__PURE__ */ Q(On, {
6272
- resizable: !!W,
6266
+ n[188] !== On || n[189] !== An || n[190] !== jn ? (Mn = /* @__PURE__ */ $("div", {
6267
+ className: On,
6268
+ children: [An, jn]
6269
+ }), n[188] = On, n[189] = An, n[190] = jn, n[191] = Mn) : Mn = n[191];
6270
+ let Nn;
6271
+ n[192] !== yt || n[193] !== i || n[194] !== r || n[195] !== H || n[196] !== Ct || n[197] !== et || n[198] !== Ue || n[199] !== Ze || n[200] !== S || n[201] !== U || n[202] !== a || n[203] !== M || n[204] !== y || n[205] !== Ot || n[206] !== k ? (Nn = Ot ? /* @__PURE__ */ Q(kn, {
6272
+ resizable: !!U,
6273
6273
  children: /* @__PURE__ */ Q("div", {
6274
6274
  className: "contents",
6275
- onClick: on,
6275
+ onClick: sn,
6276
6276
  onKeyDown: (e) => {
6277
- e.key === "Enter" && on(e);
6277
+ e.key === "Enter" && sn(e);
6278
6278
  },
6279
6279
  children: /* @__PURE__ */ Q(oo, {
6280
6280
  environmentId: r,
6281
- cwd: St ?? i,
6282
- projectName: St ?? a,
6283
- hostFolder: St !== null,
6284
- selectedPath: St === null ? j : Pa(St, vt ?? St),
6285
- selectedPathRevealId: v,
6286
- onOpenFile: y,
6287
- answersPanelFind: !W,
6281
+ cwd: Ct ?? i,
6282
+ projectName: Ct ?? a,
6283
+ hostFolder: Ct !== null,
6284
+ selectedPath: Ct === null ? M : Pa(Ct, yt ?? Ct),
6285
+ selectedPathRevealId: y,
6286
+ onOpenFile: S,
6287
+ answersPanelFind: !U,
6288
6288
  workspaceMutationId: k,
6289
- ...W && !He && !Xe ? { onRefreshSelectedFile: () => {
6290
- $e || U.refresh(), dt(xs);
6289
+ ...U && !Ue && !Ze ? { onRefreshSelectedFile: () => {
6290
+ et || H.refresh(), ft(xs);
6291
6291
  } } : {}
6292
- }, `${r}:${St ?? i}`)
6292
+ }, `${r}:${Ct ?? i}`)
6293
6293
  })
6294
- }) : null, n[192] = vt, n[193] = i, n[194] = r, n[195] = U, n[196] = St, n[197] = $e, n[198] = He, n[199] = Xe, n[200] = y, n[201] = W, n[202] = a, n[203] = j, n[204] = v, n[205] = Dt, n[206] = k, n[207] = Mn) : Mn = n[207];
6295
- let Nn;
6296
- n[208] !== jn || n[209] !== Mn ? (Nn = /* @__PURE__ */ $("div", {
6297
- className: "flex min-h-0 flex-1 overflow-hidden",
6298
- children: [jn, Mn]
6299
- }), n[208] = jn, n[209] = Mn, n[210] = Nn) : Nn = n[210];
6294
+ }) : null, n[192] = yt, n[193] = i, n[194] = r, n[195] = H, n[196] = Ct, n[197] = et, n[198] = Ue, n[199] = Ze, n[200] = S, n[201] = U, n[202] = a, n[203] = M, n[204] = y, n[205] = Ot, n[206] = k, n[207] = Nn) : Nn = n[207];
6300
6295
  let Pn;
6301
- return n[211] !== Cn || n[212] !== wn || n[213] !== Tn || n[214] !== Nn ? (Pn = /* @__PURE__ */ $("div", {
6296
+ n[208] !== Mn || n[209] !== Nn ? (Pn = /* @__PURE__ */ $("div", {
6297
+ className: "flex min-h-0 flex-1 overflow-hidden",
6298
+ children: [Mn, Nn]
6299
+ }), n[208] = Mn, n[209] = Nn, n[210] = Pn) : Pn = n[210];
6300
+ let Fn;
6301
+ return n[211] !== wn || n[212] !== Tn || n[213] !== En || n[214] !== Pn ? (Fn = /* @__PURE__ */ $("div", {
6302
6302
  className: "flex min-h-0 flex-1 flex-col overflow-hidden bg-background",
6303
6303
  children: [
6304
- Cn,
6305
6304
  wn,
6306
6305
  Tn,
6307
- Nn
6306
+ En,
6307
+ Pn
6308
6308
  ]
6309
- }), n[211] = Cn, n[212] = wn, n[213] = Tn, n[214] = Nn, n[215] = Pn) : Pn = n[215], Pn;
6309
+ }), n[211] = wn, n[212] = Tn, n[213] = En, n[214] = Pn, n[215] = Fn) : Fn = n[215], Fn;
6310
6310
  }
6311
6311
  function xs(e) {
6312
6312
  return e + 1;
@@ -6314,7 +6314,7 @@ function xs(e) {
6314
6314
  function Ss(e) {
6315
6315
  let t = !e;
6316
6316
  try {
6317
- M(Ro, t, z);
6317
+ M(Ro, t, R);
6318
6318
  } catch (e) {
6319
6319
  console.error(e);
6320
6320
  }
@@ -6323,7 +6323,7 @@ function Ss(e) {
6323
6323
  function Cs(e) {
6324
6324
  if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
6325
6325
  let t = e.nativeEvent.composedPath().find(ws)?.getAttribute("data-item-path");
6326
- t && !t.endsWith("/") && $e({
6326
+ t && !t.endsWith("/") && et({
6327
6327
  area: "panel",
6328
6328
  selector: "[data-file-content-focus]"
6329
6329
  });
@@ -6334,7 +6334,7 @@ function ws(e) {
6334
6334
  function Ts(e) {
6335
6335
  return e.wordWrap;
6336
6336
  }
6337
- var Es = Pr(() => import("./LargeTextViewer-DfFnYGCw.js"));
6337
+ var Es = Pr(() => import("./LargeTextViewer-BX5-yWcy.js"));
6338
6338
  function Ds(e) {
6339
6339
  let t = Z(63), n;
6340
6340
  t[0] !== e.absolutePath || t[1] !== e.threadRef.threadId ? (n = {
@@ -6343,73 +6343,73 @@ function Ds(e) {
6343
6343
  path: e.absolutePath,
6344
6344
  disposition: "attachment"
6345
6345
  }, t[0] = e.absolutePath, t[1] = e.threadRef.threadId, t[2] = n) : n = t[2];
6346
- let r = n, i = C(), a = Y(null), s;
6347
- t[3] === e.name ? s = t[4] : (s = Ue(e.name), t[3] = e.name, t[4] = s);
6346
+ let r = n, i = u(), a = Y(null), s;
6347
+ t[3] === e.name ? s = t[4] : (s = We(e.name), t[3] = e.name, t[4] = s);
6348
6348
  let c;
6349
6349
  t[5] === s ? c = t[6] : (c = { target: s }, t[5] = s, t[6] = c);
6350
- let { copyToClipboard: l, isCopied: u } = Ve(c), [d, f] = X(!1), [p, m] = X(0), h;
6351
- t[7] === i ? h = t[8] : (h = (e) => {
6352
- We.add({
6350
+ let { copyToClipboard: l, isCopied: d } = He(c), [f, p] = X(!1), [m, h] = X(0), g;
6351
+ t[7] === i ? g = t[8] : (g = (e) => {
6352
+ Ge.add({
6353
6353
  type: "error",
6354
6354
  title: i("Could not read file"),
6355
- description: _e(e, o) ?? i("Try again.")
6355
+ description: ve(e, o) ?? i("Try again.")
6356
6356
  });
6357
- }, t[7] = i, t[8] = h);
6358
- let g = h, _ = Xe(e.environmentId, r, e.workspaceMutationId ?? void 0), v = Qe(e.environmentId, r), y = JSON.stringify([
6357
+ }, t[7] = i, t[8] = g);
6358
+ let _ = g, v = Ze(e.environmentId, r, e.workspaceMutationId ?? void 0), y = $e(e.environmentId, r), b = JSON.stringify([
6359
6359
  e.environmentId,
6360
6360
  r,
6361
- _._tag === "Success" ? _.fileRevision ?? e.workspaceMutationId : null,
6362
- p
6363
- ]), [b, x] = X(null);
6364
- if (_._tag === "Success" && b?.revision !== y && x({
6365
- revision: y,
6366
- url: _.url
6367
- }), _._tag === "Failure") {
6361
+ v._tag === "Success" ? v.fileRevision ?? e.workspaceMutationId : null,
6362
+ m
6363
+ ]), [x, S] = X(null);
6364
+ if (v._tag === "Success" && x?.revision !== b && S({
6365
+ revision: b,
6366
+ url: v.url
6367
+ }), v._tag === "Failure") {
6368
6368
  let e;
6369
6369
  t[9] === i ? e = t[10] : (e = i("Unable to load file preview."), t[9] = i, t[10] = e);
6370
6370
  let n;
6371
- t[11] !== v || t[12] !== g ? (n = () => {
6372
- m(ks), v().catch(g);
6373
- }, t[11] = v, t[12] = g, t[13] = n) : n = t[13];
6371
+ t[11] !== y || t[12] !== _ ? (n = () => {
6372
+ h(ks), y().catch(_);
6373
+ }, t[11] = y, t[12] = _, t[13] = n) : n = t[13];
6374
6374
  let r;
6375
6375
  return t[14] !== e || t[15] !== n ? (r = /* @__PURE__ */ Q(br, {
6376
6376
  message: e,
6377
6377
  onRetry: n
6378
6378
  }), t[14] = e, t[15] = n, t[16] = r) : r = t[16], r;
6379
6379
  }
6380
- if (_._tag !== "Success" || b === null) {
6380
+ if (v._tag !== "Success" || x === null) {
6381
6381
  let e;
6382
6382
  return t[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Q("div", {
6383
6383
  className: "p-6 text-xs text-muted-foreground",
6384
- children: /* @__PURE__ */ Q(L, { children: "Loading…" })
6384
+ children: /* @__PURE__ */ Q(j, { children: "Loading…" })
6385
6385
  }), t[17] = e) : e = t[17], e;
6386
6386
  }
6387
- let S = `${b.url}${b.url.includes("?") ? "&" : "?"}revision=${encodeURIComponent(b.revision)}`, w;
6387
+ let C = `${x.url}${x.url.includes("?") ? "&" : "?"}revision=${encodeURIComponent(x.revision)}`, w;
6388
6388
  t[18] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ Q("span", {
6389
6389
  className: "min-w-0 flex-1 text-xs text-muted-foreground",
6390
- children: /* @__PURE__ */ Q(L, { children: "Full file" })
6390
+ children: /* @__PURE__ */ Q(j, { children: "Full file" })
6391
6391
  }), t[18] = w) : w = t[18];
6392
6392
  let T;
6393
- t[19] !== i || t[20] !== u ? (T = i(u ? "Copied" : "Copy contents"), t[19] = i, t[20] = u, t[21] = T) : T = t[21];
6393
+ t[19] !== i || t[20] !== d ? (T = i(d ? "Copied" : "Copy contents"), t[19] = i, t[20] = d, t[21] = T) : T = t[21];
6394
6394
  let E;
6395
- t[22] !== l || t[23] !== g ? (E = () => {
6395
+ t[22] !== l || t[23] !== _ ? (E = () => {
6396
6396
  let e = a.current;
6397
- e && e().then((e) => l(e, void 0)).catch(g);
6398
- }, t[22] = l, t[23] = g, t[24] = E) : E = t[24];
6397
+ e && e().then((e) => l(e, void 0)).catch(_);
6398
+ }, t[22] = l, t[23] = _, t[24] = E) : E = t[24];
6399
6399
  let D;
6400
- t[25] === u ? D = t[26] : (D = Q(u ? xe : De, { className: "size-3.5" }), t[25] = u, t[26] = D);
6400
+ t[25] === d ? D = t[26] : (D = Q(d ? Se : Oe, { className: "size-3.5" }), t[25] = d, t[26] = D);
6401
6401
  let O;
6402
6402
  t[27] !== T || t[28] !== E || t[29] !== D ? (O = /* @__PURE__ */ Q(xr, {
6403
6403
  label: T,
6404
6404
  onPress: E,
6405
6405
  children: D
6406
6406
  }), t[27] = T, t[28] = E, t[29] = D, t[30] = O) : O = t[30];
6407
+ let ee;
6408
+ t[31] !== i || t[32] !== f ? (ee = i(f ? "Preparing file…" : "Save file"), t[31] = i, t[32] = f, t[33] = ee) : ee = t[33];
6407
6409
  let k;
6408
- t[31] !== i || t[32] !== d ? (k = i(d ? "Preparing file…" : "Save file"), t[31] = i, t[32] = d, t[33] = k) : k = t[33];
6409
- let A;
6410
- t[34] !== i || t[35] !== e.name || t[36] !== v || t[37] !== g ? (A = () => {
6411
- f(!0), (async () => {
6412
- let t = await v();
6410
+ t[34] !== i || t[35] !== e.name || t[36] !== y || t[37] !== _ ? (k = () => {
6411
+ p(!0), (async () => {
6412
+ let t = await y();
6413
6413
  if (!t) throw Error(i("Reconnect to the environment and try again."));
6414
6414
  let n = await fetch(t);
6415
6415
  if (!n.ok) throw Error(i("The file could not be loaded. Try again."));
@@ -6417,51 +6417,51 @@ function Ds(e) {
6417
6417
  setTimeout(() => URL.revokeObjectURL(r), 3e4);
6418
6418
  let a = document.createElement("a");
6419
6419
  a.href = r, a.download = e.name.split(/[\\/]/).at(-1) || e.name, a.click();
6420
- })().catch(g).finally(() => f(!1));
6421
- }, t[34] = i, t[35] = e.name, t[36] = v, t[37] = g, t[38] = A) : A = t[38];
6422
- let ee;
6423
- t[39] === Symbol.for("react.memo_cache_sentinel") ? (ee = /* @__PURE__ */ Q(B, { className: "size-3.5" }), t[39] = ee) : ee = t[39];
6424
- let j;
6425
- t[40] !== d || t[41] !== A || t[42] !== k ? (j = /* @__PURE__ */ Q(xr, {
6426
- label: k,
6427
- disabled: d,
6428
- onPress: A,
6429
- children: ee
6430
- }), t[40] = d, t[41] = A, t[42] = k, t[43] = j) : j = t[43];
6420
+ })().catch(_).finally(() => p(!1));
6421
+ }, t[34] = i, t[35] = e.name, t[36] = y, t[37] = _, t[38] = k) : k = t[38];
6422
+ let A;
6423
+ t[39] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ Q(z, { className: "size-3.5" }), t[39] = A) : A = t[39];
6431
6424
  let M;
6432
- t[44] !== j || t[45] !== O ? (M = /* @__PURE__ */ $("div", {
6425
+ t[40] !== f || t[41] !== k || t[42] !== ee ? (M = /* @__PURE__ */ Q(xr, {
6426
+ label: ee,
6427
+ disabled: f,
6428
+ onPress: k,
6429
+ children: A
6430
+ }), t[40] = f, t[41] = k, t[42] = ee, t[43] = M) : M = t[43];
6431
+ let N;
6432
+ t[44] !== M || t[45] !== O ? (N = /* @__PURE__ */ $("div", {
6433
6433
  className: wr,
6434
6434
  children: [
6435
6435
  w,
6436
6436
  O,
6437
- j
6437
+ M
6438
6438
  ]
6439
- }), t[44] = j, t[45] = O, t[46] = M) : M = t[46];
6440
- let N;
6441
- t[47] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ Q("div", {
6442
- className: "p-6 text-xs text-muted-foreground",
6443
- children: /* @__PURE__ */ Q(L, { children: "Loading…" })
6444
- }), t[47] = N) : N = t[47];
6445
- let P = `${S}:${p}`, F;
6446
- t[48] !== v || t[49] !== g ? (F = () => {
6447
- v().then(() => m(Os)).catch(g);
6448
- }, t[48] = v, t[49] = g, t[50] = F) : F = t[50];
6439
+ }), t[44] = M, t[45] = O, t[46] = N) : N = t[46];
6449
6440
  let te;
6450
- t[51] !== e.delimiter || t[52] !== e.name || t[53] !== e.revealLine || t[54] !== e.revealRequestId || t[55] !== e.wordWrap || t[56] !== S || t[57] !== P || t[58] !== F ? (te = /* @__PURE__ */ Q(Nr, {
6451
- fallback: N,
6441
+ t[47] === Symbol.for("react.memo_cache_sentinel") ? (te = /* @__PURE__ */ Q("div", {
6442
+ className: "p-6 text-xs text-muted-foreground",
6443
+ children: /* @__PURE__ */ Q(j, { children: "Loading…" })
6444
+ }), t[47] = te) : te = t[47];
6445
+ let P = `${C}:${m}`, F;
6446
+ t[48] !== y || t[49] !== _ ? (F = () => {
6447
+ y().then(() => h(Os)).catch(_);
6448
+ }, t[48] = y, t[49] = _, t[50] = F) : F = t[50];
6449
+ let ne;
6450
+ t[51] !== e.delimiter || t[52] !== e.name || t[53] !== e.revealLine || t[54] !== e.revealRequestId || t[55] !== e.wordWrap || t[56] !== C || t[57] !== P || t[58] !== F ? (ne = /* @__PURE__ */ Q(Nr, {
6451
+ fallback: te,
6452
6452
  children: /* @__PURE__ */ Q(Es, {
6453
6453
  name: e.name,
6454
6454
  copyContents: a,
6455
6455
  onRetry: F,
6456
- src: S,
6456
+ src: C,
6457
6457
  delimiter: e.delimiter,
6458
6458
  revealLine: e.revealLine,
6459
6459
  revealRequestId: e.revealRequestId,
6460
6460
  wordWrap: e.wordWrap
6461
6461
  }, P)
6462
- }), t[51] = e.delimiter, t[52] = e.name, t[53] = e.revealLine, t[54] = e.revealRequestId, t[55] = e.wordWrap, t[56] = S, t[57] = P, t[58] = F, t[59] = te) : te = t[59];
6463
- let ne;
6464
- return t[60] !== M || t[61] !== te ? (ne = /* @__PURE__ */ $(Br, { children: [M, te] }), t[60] = M, t[61] = te, t[62] = ne) : ne = t[62], ne;
6462
+ }), t[51] = e.delimiter, t[52] = e.name, t[53] = e.revealLine, t[54] = e.revealRequestId, t[55] = e.wordWrap, t[56] = C, t[57] = P, t[58] = F, t[59] = ne) : ne = t[59];
6463
+ let re;
6464
+ return t[60] !== N || t[61] !== ne ? (re = /* @__PURE__ */ $(Br, { children: [N, ne] }), t[60] = N, t[61] = ne, t[62] = re) : re = t[62], re;
6465
6465
  }
6466
6466
  function Os(e) {
6467
6467
  return e + 1;