jialing-code 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/README.md +97 -0
  2. package/dist/chunk-065m026w.js +97 -0
  3. package/dist/chunk-06saje2v.js +39 -0
  4. package/dist/chunk-0731m51q.js +8 -0
  5. package/dist/chunk-0975ccyw.js +265 -0
  6. package/dist/chunk-09n3fjx5.js +67 -0
  7. package/dist/chunk-0bdjdzew.js +41 -0
  8. package/dist/chunk-0ce6kd7y.js +212 -0
  9. package/dist/chunk-0e1xsncc.js +969 -0
  10. package/dist/chunk-0m2861gw.js +154 -0
  11. package/dist/chunk-0paqc2yw.js +15 -0
  12. package/dist/chunk-0rg6yrhy.js +99 -0
  13. package/dist/chunk-0sakxrcf.js +643 -0
  14. package/dist/chunk-0v9hwxvz.js +105 -0
  15. package/dist/chunk-0vkfrmqm.js +690 -0
  16. package/dist/chunk-0vvfnhhv.js +248 -0
  17. package/dist/chunk-0w4rsycj.js +145 -0
  18. package/dist/chunk-0x9b2nmd.js +63 -0
  19. package/dist/chunk-0xjaqda8.js +1124 -0
  20. package/dist/chunk-1141xmr4.js +8 -0
  21. package/dist/chunk-13d1842d.js +154 -0
  22. package/dist/chunk-1921a6yb.js +32 -0
  23. package/dist/chunk-1ad8mk9g.js +527 -0
  24. package/dist/chunk-1ax41pws.js +28 -0
  25. package/dist/chunk-1c8z1b5v.js +16 -0
  26. package/dist/chunk-1cbn5kxf.js +7 -0
  27. package/dist/chunk-1eapde8a.js +726 -0
  28. package/dist/chunk-1h2famwb.js +49 -0
  29. package/dist/chunk-1jggnf7z.js +85 -0
  30. package/dist/chunk-1k92pn9c.js +32 -0
  31. package/dist/chunk-1qakq4sn.js +802 -0
  32. package/dist/chunk-1rvz0433.js +722 -0
  33. package/dist/chunk-1xkekb9y.js +19 -0
  34. package/dist/chunk-238g70xa.js +36 -0
  35. package/dist/chunk-24ge0eqa.js +106 -0
  36. package/dist/chunk-278vghwm.js +5395 -0
  37. package/dist/chunk-27xc1csx.js +104 -0
  38. package/dist/chunk-2a42s11t.js +412 -0
  39. package/dist/chunk-2aa02aw6.js +438 -0
  40. package/dist/chunk-2eykm0j0.js +20 -0
  41. package/dist/chunk-2gzv8nrw.js +205 -0
  42. package/dist/chunk-2k995y2x.js +880 -0
  43. package/dist/chunk-2nayx6q1.js +63 -0
  44. package/dist/chunk-2sd2w2h4.js +44 -0
  45. package/dist/chunk-2tw2ve8h.js +145 -0
  46. package/dist/chunk-30rst83v.js +168 -0
  47. package/dist/chunk-3aavh06g.js +1581 -0
  48. package/dist/chunk-3b0yvt2h.js +469 -0
  49. package/dist/chunk-3be7ka25.js +56 -0
  50. package/dist/chunk-3c25bcsw.js +17 -0
  51. package/dist/chunk-3dyxka97.js +584 -0
  52. package/dist/chunk-3f7rypmf.js +16544 -0
  53. package/dist/chunk-3fsd7f51.js +93 -0
  54. package/dist/chunk-3gqdqmzb.js +75 -0
  55. package/dist/chunk-3h8a89gy.js +46 -0
  56. package/dist/chunk-3m84sret.js +71 -0
  57. package/dist/chunk-3nb7j3js.js +96 -0
  58. package/dist/chunk-3p08nvn2.js +98 -0
  59. package/dist/chunk-3r09htpc.js +318 -0
  60. package/dist/chunk-3r24h7t6.js +113 -0
  61. package/dist/chunk-3rkfxjtq.js +80 -0
  62. package/dist/chunk-3tmk7dc2.js +604 -0
  63. package/dist/chunk-3w6s9m5w.js +16 -0
  64. package/dist/chunk-43qjymy5.js +92 -0
  65. package/dist/chunk-44fpr6jq.js +434 -0
  66. package/dist/chunk-45kxdsp8.js +444 -0
  67. package/dist/chunk-495d85x1.js +8066 -0
  68. package/dist/chunk-4ba796se.js +1095 -0
  69. package/dist/chunk-4g3v8y12.js +23 -0
  70. package/dist/chunk-4h53xj8n.js +3445 -0
  71. package/dist/chunk-4jm600zv.js +13 -0
  72. package/dist/chunk-4jy9dtwk.js +116 -0
  73. package/dist/chunk-4p60dd45.js +55 -0
  74. package/dist/chunk-4z0jsrqg.js +81 -0
  75. package/dist/chunk-4zfkzkt6.js +37 -0
  76. package/dist/chunk-55wgxwa9.js +13877 -0
  77. package/dist/chunk-5dbk24zg.js +890 -0
  78. package/dist/chunk-5hzvp4va.js +115 -0
  79. package/dist/chunk-5kbt1mbt.js +500 -0
  80. package/dist/chunk-5pen7vr8.js +176 -0
  81. package/dist/chunk-5r280eng.js +198 -0
  82. package/dist/chunk-5srym52s.js +88 -0
  83. package/dist/chunk-600kg7k6.js +41 -0
  84. package/dist/chunk-616w0qj3.js +160 -0
  85. package/dist/chunk-62jw1t8c.js +94 -0
  86. package/dist/chunk-62xmt9mk.js +372 -0
  87. package/dist/chunk-64bvg7c3.js +229 -0
  88. package/dist/chunk-65yhe4s0.js +281 -0
  89. package/dist/chunk-6aewh27m.js +102 -0
  90. package/dist/chunk-6bd8brc4.js +48 -0
  91. package/dist/chunk-6dj5t602.js +341 -0
  92. package/dist/chunk-6exxdk1p.js +6956 -0
  93. package/dist/chunk-6f5j8fs0.js +752 -0
  94. package/dist/chunk-6g62sjpf.js +328 -0
  95. package/dist/chunk-6gecq2ta.js +1493 -0
  96. package/dist/chunk-6gr3c3w9.js +378 -0
  97. package/dist/chunk-6kpbgc5w.js +23 -0
  98. package/dist/chunk-6kseqw79.js +154 -0
  99. package/dist/chunk-6mxm1qd0.js +40764 -0
  100. package/dist/chunk-6n2qgm9v.js +8 -0
  101. package/dist/chunk-6tq2v3rk.js +186 -0
  102. package/dist/chunk-6wsdhj3v.js +93 -0
  103. package/dist/chunk-6zw9fhgb.js +4389 -0
  104. package/dist/chunk-71grc1mw.js +111 -0
  105. package/dist/chunk-73rpbt04.js +1947 -0
  106. package/dist/chunk-748feghg.js +604 -0
  107. package/dist/chunk-75e8gtg9.js +84 -0
  108. package/dist/chunk-75th4717.js +780 -0
  109. package/dist/chunk-760252na.js +101 -0
  110. package/dist/chunk-7739pg2c.js +4261 -0
  111. package/dist/chunk-778fnx46.js +472 -0
  112. package/dist/chunk-77g09znh.js +391 -0
  113. package/dist/chunk-7aw745vx.js +40175 -0
  114. package/dist/chunk-7m2nd8da.js +110 -0
  115. package/dist/chunk-7n35vjtw.js +444 -0
  116. package/dist/chunk-7n5ss4sh.js +144 -0
  117. package/dist/chunk-7rjnxcfe.js +107 -0
  118. package/dist/chunk-7sb5axvf.js +122 -0
  119. package/dist/chunk-7wm5s02e.js +216 -0
  120. package/dist/chunk-7ymfj7m3.js +151 -0
  121. package/dist/chunk-7z8j9qfn.js +121 -0
  122. package/dist/chunk-7zsapntc.js +216 -0
  123. package/dist/chunk-805fhkfh.js +908 -0
  124. package/dist/chunk-80k1nj24.js +253 -0
  125. package/dist/chunk-83hfzbx3.js +10 -0
  126. package/dist/chunk-85cypsdd.js +92 -0
  127. package/dist/chunk-8760caxf.js +2644 -0
  128. package/dist/chunk-88f6egg6.js +387 -0
  129. package/dist/chunk-88r7kwgj.js +22 -0
  130. package/dist/chunk-89e1v45e.js +463 -0
  131. package/dist/chunk-8bedvdm1.js +32 -0
  132. package/dist/chunk-8c4x4vdz.js +177 -0
  133. package/dist/chunk-8hq5kk3y.js +44 -0
  134. package/dist/chunk-8ngxagxq.js +18 -0
  135. package/dist/chunk-8tnsngw2.js +31 -0
  136. package/dist/chunk-8wjnca8h.js +307 -0
  137. package/dist/chunk-8y12jxg8.js +10 -0
  138. package/dist/chunk-8ymf4e6z.js +48 -0
  139. package/dist/chunk-90wp6wez.js +10510 -0
  140. package/dist/chunk-92bp5bnf.js +650 -0
  141. package/dist/chunk-92q8sx5z.js +90 -0
  142. package/dist/chunk-958rtmtx.js +10476 -0
  143. package/dist/chunk-9e2kqv5g.js +125 -0
  144. package/dist/chunk-9f4f1hy5.js +281 -0
  145. package/dist/chunk-9gbamk79.js +93 -0
  146. package/dist/chunk-9k5s3ryh.js +167 -0
  147. package/dist/chunk-9xzfqm15.js +97 -0
  148. package/dist/chunk-9zgdvbm6.js +110 -0
  149. package/dist/chunk-a0p3q8jw.js +24 -0
  150. package/dist/chunk-a22sayzp.js +220 -0
  151. package/dist/chunk-a8ejc632.js +3094 -0
  152. package/dist/chunk-a8gj9d9z.js +120 -0
  153. package/dist/chunk-a9vdeb6y.js +258 -0
  154. package/dist/chunk-a9yev47v.js +674 -0
  155. package/dist/chunk-a9zh40sj.js +48 -0
  156. package/dist/chunk-ack5mfba.js +105 -0
  157. package/dist/chunk-ae76ded0.js +30 -0
  158. package/dist/chunk-akjw4dh6.js +538 -0
  159. package/dist/chunk-asc6wz4q.js +1188 -0
  160. package/dist/chunk-atqejh3p.js +273 -0
  161. package/dist/chunk-atv2e6b7.js +61 -0
  162. package/dist/chunk-axvvkwz8.js +1551 -0
  163. package/dist/chunk-azgz7kj9.js +38 -0
  164. package/dist/chunk-b3zave8q.js +275 -0
  165. package/dist/chunk-b4wg70y1.js +54 -0
  166. package/dist/chunk-b8b13qn2.js +100 -0
  167. package/dist/chunk-bg3mt9bm.js +28 -0
  168. package/dist/chunk-bh4jvcjn.js +91 -0
  169. package/dist/chunk-bhdt6k7w.js +15 -0
  170. package/dist/chunk-bm1qb16p.js +17 -0
  171. package/dist/chunk-bpvsd1j1.js +266 -0
  172. package/dist/chunk-bqfnp99q.js +477 -0
  173. package/dist/chunk-bsbmmfyt.js +17 -0
  174. package/dist/chunk-bsbt34jm.js +42 -0
  175. package/dist/chunk-c78akdhr.js +458 -0
  176. package/dist/chunk-cdz5yb0r.js +57 -0
  177. package/dist/chunk-cfv996bs.js +22 -0
  178. package/dist/chunk-cgfdkzhb.js +12 -0
  179. package/dist/chunk-ckh4r5er.js +257 -0
  180. package/dist/chunk-cmgjnvn9.js +89 -0
  181. package/dist/chunk-cpjgvay8.js +687 -0
  182. package/dist/chunk-crfryjx9.js +276 -0
  183. package/dist/chunk-ctw5jwcd.js +213 -0
  184. package/dist/chunk-cvy3vntc.js +65 -0
  185. package/dist/chunk-cwbzz504.js +94 -0
  186. package/dist/chunk-cy2hswr1.js +15 -0
  187. package/dist/chunk-cyejkay3.js +222 -0
  188. package/dist/chunk-d18z9pna.js +106 -0
  189. package/dist/chunk-d5cq0n0v.js +162 -0
  190. package/dist/chunk-db45aryp.js +50 -0
  191. package/dist/chunk-de8nqh0z.js +790 -0
  192. package/dist/chunk-dfw6h350.js +2336 -0
  193. package/dist/chunk-dgqrcy74.js +48 -0
  194. package/dist/chunk-dn75ptgd.js +184 -0
  195. package/dist/chunk-dnh7jtpb.js +37 -0
  196. package/dist/chunk-dpshyv9m.js +90 -0
  197. package/dist/chunk-dt8cdvnm.js +642 -0
  198. package/dist/chunk-dtxby6fr.js +306 -0
  199. package/dist/chunk-dv1wfr85.js +6373 -0
  200. package/dist/chunk-dw363edx.js +1154 -0
  201. package/dist/chunk-dwrdacck.js +62 -0
  202. package/dist/chunk-dxnnv5e3.js +276 -0
  203. package/dist/chunk-e3g8q4cn.js +1646 -0
  204. package/dist/chunk-e3m9k9s2.js +542 -0
  205. package/dist/chunk-e4q49asn.js +155 -0
  206. package/dist/chunk-e5pntxye.js +37 -0
  207. package/dist/chunk-e7393td6.js +42 -0
  208. package/dist/chunk-ead42yrh.js +87 -0
  209. package/dist/chunk-eb90vwvr.js +152 -0
  210. package/dist/chunk-ecvwk9hg.js +250 -0
  211. package/dist/chunk-edjd6aay.js +173 -0
  212. package/dist/chunk-eg0h8mtm.js +130 -0
  213. package/dist/chunk-ehtwnxpg.js +1591 -0
  214. package/dist/chunk-ek686gx1.js +94 -0
  215. package/dist/chunk-eqp1rfft.js +17 -0
  216. package/dist/chunk-evhwt0ar.js +1015 -0
  217. package/dist/chunk-ewadzrm8.js +103 -0
  218. package/dist/chunk-ewsgsw9h.js +172291 -0
  219. package/dist/chunk-f0pa0r7e.js +3198 -0
  220. package/dist/chunk-f2mhrmww.js +62 -0
  221. package/dist/chunk-f39zxvwn.js +401 -0
  222. package/dist/chunk-f46z54tq.js +374 -0
  223. package/dist/chunk-f5ma3nh5.js +3436 -0
  224. package/dist/chunk-f60q23az.js +3038 -0
  225. package/dist/chunk-f6v2nz57.js +107 -0
  226. package/dist/chunk-f6yjan38.js +38 -0
  227. package/dist/chunk-fbv4apne.js +51 -0
  228. package/dist/chunk-fem4s778.js +70 -0
  229. package/dist/chunk-fezm1kn8.js +376 -0
  230. package/dist/chunk-fm1n3ysp.js +6108 -0
  231. package/dist/chunk-frg83bfw.js +225 -0
  232. package/dist/chunk-fscm8db0.js +692 -0
  233. package/dist/chunk-fyc5fepv.js +10 -0
  234. package/dist/chunk-g0j0t6qk.js +26 -0
  235. package/dist/chunk-g0nc1ftf.js +849 -0
  236. package/dist/chunk-g338npwr.js +1061 -0
  237. package/dist/chunk-g3t0act8.js +8 -0
  238. package/dist/chunk-g75w4hw3.js +26 -0
  239. package/dist/chunk-g8vp82en.js +1866 -0
  240. package/dist/chunk-gax0fcbx.js +182 -0
  241. package/dist/chunk-gsz4dh3y.js +606 -0
  242. package/dist/chunk-gtfffm7h.js +440 -0
  243. package/dist/chunk-gver9zb9.js +420 -0
  244. package/dist/chunk-gyj242zr.js +20 -0
  245. package/dist/chunk-h0qngp9w.js +157 -0
  246. package/dist/chunk-h14kemnk.js +123 -0
  247. package/dist/chunk-h8wj1a74.js +8960 -0
  248. package/dist/chunk-h9mcb2eg.js +87 -0
  249. package/dist/chunk-h9nh2980.js +91 -0
  250. package/dist/chunk-hakdhagh.js +16606 -0
  251. package/dist/chunk-hbc6ymdv.js +55 -0
  252. package/dist/chunk-hh7cmy4k.js +20 -0
  253. package/dist/chunk-hjhc4cpt.js +69 -0
  254. package/dist/chunk-hjwez8qc.js +5018 -0
  255. package/dist/chunk-hk9xz7gk.js +118 -0
  256. package/dist/chunk-hqmz36b3.js +552 -0
  257. package/dist/chunk-hrzerbfw.js +1299 -0
  258. package/dist/chunk-hs8ph4p8.js +8 -0
  259. package/dist/chunk-ht1xwrnd.js +716 -0
  260. package/dist/chunk-hvmfg2dc.js +338 -0
  261. package/dist/chunk-hx2tr4ep.js +7189 -0
  262. package/dist/chunk-hzhe8ygc.js +547 -0
  263. package/dist/chunk-j2k4p94p.js +55 -0
  264. package/dist/chunk-j3a4p81y.js +184 -0
  265. package/dist/chunk-j49g6g3s.js +57 -0
  266. package/dist/chunk-j5d5hp9h.js +71 -0
  267. package/dist/chunk-j64ga6ta.js +8035 -0
  268. package/dist/chunk-j7tyxan1.js +116 -0
  269. package/dist/chunk-j8v4774z.js +424 -0
  270. package/dist/chunk-jafes477.js +29 -0
  271. package/dist/chunk-jd32zbps.js +15 -0
  272. package/dist/chunk-jdgeec04.js +4249 -0
  273. package/dist/chunk-jftd4jq5.js +4521 -0
  274. package/dist/chunk-jkxqhv6y.js +812 -0
  275. package/dist/chunk-jmfr6h0n.js +120 -0
  276. package/dist/chunk-jn4aabmx.js +40 -0
  277. package/dist/chunk-jnhkref0.js +30 -0
  278. package/dist/chunk-jsbpm1gz.js +27 -0
  279. package/dist/chunk-jtcyjc3k.js +5802 -0
  280. package/dist/chunk-jx817w05.js +11 -0
  281. package/dist/chunk-jzmz18nn.js +65 -0
  282. package/dist/chunk-k0p9w03v.js +4957 -0
  283. package/dist/chunk-k3dcdnck.js +89 -0
  284. package/dist/chunk-k3wadzcd.js +88 -0
  285. package/dist/chunk-kaeshsk1.js +713 -0
  286. package/dist/chunk-kbkey9ed.js +522 -0
  287. package/dist/chunk-kcwfhqbb.js +196 -0
  288. package/dist/chunk-key6jr7p.js +224 -0
  289. package/dist/chunk-knay8cy9.js +173 -0
  290. package/dist/chunk-kr3rg2y1.js +95 -0
  291. package/dist/chunk-kwekc97v.js +18 -0
  292. package/dist/chunk-m06q12hg.js +61 -0
  293. package/dist/chunk-m2mcpbhk.js +43 -0
  294. package/dist/chunk-m8v220gz.js +71 -0
  295. package/dist/chunk-mgpqy78h.js +208 -0
  296. package/dist/chunk-mkejwh4t.js +16 -0
  297. package/dist/chunk-mptyw5n1.js +107 -0
  298. package/dist/chunk-mqajm0dp.js +66 -0
  299. package/dist/chunk-mrksbgxj.js +490 -0
  300. package/dist/chunk-msjfc5ba.js +246 -0
  301. package/dist/chunk-mt25echc.js +6157 -0
  302. package/dist/chunk-mt3jfnr8.js +277 -0
  303. package/dist/chunk-mtn242d4.js +9300 -0
  304. package/dist/chunk-mzfkvave.js +169 -0
  305. package/dist/chunk-n0qaeaa5.js +256 -0
  306. package/dist/chunk-n1erf6kh.js +22820 -0
  307. package/dist/chunk-n2avk1r2.js +61 -0
  308. package/dist/chunk-n6atnpcq.js +765 -0
  309. package/dist/chunk-n7ttdtk0.js +641 -0
  310. package/dist/chunk-ncnfzby5.js +822 -0
  311. package/dist/chunk-ncnr1jtf.js +2058 -0
  312. package/dist/chunk-nerv0jvx.js +74 -0
  313. package/dist/chunk-ngd2abep.js +90 -0
  314. package/dist/chunk-nka1g8f4.js +773 -0
  315. package/dist/chunk-nnaxkc2z.js +128 -0
  316. package/dist/chunk-npyrtj8j.js +691 -0
  317. package/dist/chunk-nq0fxyxh.js +752 -0
  318. package/dist/chunk-nrmffak7.js +114 -0
  319. package/dist/chunk-nsz546wq.js +1170 -0
  320. package/dist/chunk-nt837qt9.js +21 -0
  321. package/dist/chunk-nv64x1z5.js +86 -0
  322. package/dist/chunk-nxsh6de2.js +1711 -0
  323. package/dist/chunk-nz4getcr.js +40 -0
  324. package/dist/chunk-p1f607pa.js +83 -0
  325. package/dist/chunk-p2816w9z.js +1486 -0
  326. package/dist/chunk-p2d5nh3g.js +342 -0
  327. package/dist/chunk-p4r5y02t.js +90 -0
  328. package/dist/chunk-p7g7pf3f.js +336 -0
  329. package/dist/chunk-pb4ad8r2.js +110 -0
  330. package/dist/chunk-pbrhz0zr.js +716 -0
  331. package/dist/chunk-ps49ymvj.js +43 -0
  332. package/dist/chunk-pwnt3veb.js +103 -0
  333. package/dist/chunk-pwwa7s62.js +11 -0
  334. package/dist/chunk-px3w0kde.js +299 -0
  335. package/dist/chunk-pzn777jb.js +756 -0
  336. package/dist/chunk-q25bjaev.js +15 -0
  337. package/dist/chunk-q5by3da6.js +8 -0
  338. package/dist/chunk-q6av622g.js +38 -0
  339. package/dist/chunk-q6xkvtf2.js +1318 -0
  340. package/dist/chunk-q81jx1tq.js +476 -0
  341. package/dist/chunk-qehb6fk5.js +339 -0
  342. package/dist/chunk-qj1avx1q.js +87 -0
  343. package/dist/chunk-qn2dxr66.js +105 -0
  344. package/dist/chunk-qnfx3qtx.js +617 -0
  345. package/dist/chunk-qp18kd4h.js +48 -0
  346. package/dist/chunk-qp2qdcda.js +100 -0
  347. package/dist/chunk-qpjy9tcf.js +133 -0
  348. package/dist/chunk-qqfa0dqg.js +2343 -0
  349. package/dist/chunk-qwh3htcz.js +202 -0
  350. package/dist/chunk-qz2x630m.js +49145 -0
  351. package/dist/chunk-r3vakcs1.js +496 -0
  352. package/dist/chunk-r66hz8j6.js +34 -0
  353. package/dist/chunk-r6b58y3x.js +17 -0
  354. package/dist/chunk-rekp48rk.js +62 -0
  355. package/dist/chunk-rn0v1hk8.js +34 -0
  356. package/dist/chunk-rs1xrs6m.js +534 -0
  357. package/dist/chunk-rs45skes.js +123 -0
  358. package/dist/chunk-rzszqp82.js +524 -0
  359. package/dist/chunk-s274nv8k.js +8 -0
  360. package/dist/chunk-s3pzvdss.js +50 -0
  361. package/dist/chunk-s9mesaw0.js +26840 -0
  362. package/dist/chunk-sd36yzx8.js +954 -0
  363. package/dist/chunk-sdj9b9wh.js +782 -0
  364. package/dist/chunk-sdw2q69p.js +227 -0
  365. package/dist/chunk-sfgp9cc0.js +130 -0
  366. package/dist/chunk-spqaamnc.js +63 -0
  367. package/dist/chunk-spzrs4df.js +73 -0
  368. package/dist/chunk-sxkr7k43.js +55 -0
  369. package/dist/chunk-szj5wvdy.js +28 -0
  370. package/dist/chunk-t0rgmccj.js +39 -0
  371. package/dist/chunk-t1nnzjgg.js +17 -0
  372. package/dist/chunk-t94fcnt8.js +566 -0
  373. package/dist/chunk-tjaqa99q.js +125 -0
  374. package/dist/chunk-tjq2evtw.js +328 -0
  375. package/dist/chunk-ts2p6bv1.js +224 -0
  376. package/dist/chunk-ttk5dzz8.js +25 -0
  377. package/dist/chunk-tw0q7ynt.js +59 -0
  378. package/dist/chunk-v02jkvgy.js +131 -0
  379. package/dist/chunk-v084bqt3.js +1529 -0
  380. package/dist/chunk-v0amythm.js +164 -0
  381. package/dist/chunk-v1kzp02e.js +785 -0
  382. package/dist/chunk-v1mgv1et.js +15 -0
  383. package/dist/chunk-v399mzxk.js +58 -0
  384. package/dist/chunk-v3gm2day.js +8 -0
  385. package/dist/chunk-v43hrrxp.js +71 -0
  386. package/dist/chunk-v6aqb2aj.js +102 -0
  387. package/dist/chunk-v78fj8by.js +145 -0
  388. package/dist/chunk-v7qmhjdn.js +1921 -0
  389. package/dist/chunk-v9smspw2.js +4301 -0
  390. package/dist/chunk-vdw93s4h.js +2431 -0
  391. package/dist/chunk-vest0y6x.js +3830 -0
  392. package/dist/chunk-vf5sd1nq.js +12 -0
  393. package/dist/chunk-vratq94g.js +349 -0
  394. package/dist/chunk-vrz7t3m3.js +20 -0
  395. package/dist/chunk-vtb185z9.js +70 -0
  396. package/dist/chunk-vx01rvg8.js +654 -0
  397. package/dist/chunk-vyc0rjyx.js +31 -0
  398. package/dist/chunk-vyjeh50y.js +2149 -0
  399. package/dist/chunk-vzpffsza.js +269 -0
  400. package/dist/chunk-w2ef3kxk.js +3353 -0
  401. package/dist/chunk-w2z5pqd3.js +336 -0
  402. package/dist/chunk-w3whm4mn.js +432 -0
  403. package/dist/chunk-w7wgpqcp.js +157 -0
  404. package/dist/chunk-waa00cvb.js +301 -0
  405. package/dist/chunk-wb0qm4es.js +155 -0
  406. package/dist/chunk-wbkahkdc.js +27 -0
  407. package/dist/chunk-wfz0qffj.js +3939 -0
  408. package/dist/chunk-wn0cx0pt.js +283 -0
  409. package/dist/chunk-wv6gzt9c.js +726 -0
  410. package/dist/chunk-wx42ycm4.js +998 -0
  411. package/dist/chunk-wxkpgy05.js +268 -0
  412. package/dist/chunk-wzpdet3m.js +843 -0
  413. package/dist/chunk-x0mwzt38.js +714 -0
  414. package/dist/chunk-x592wbfh.js +244 -0
  415. package/dist/chunk-x5pqsp9r.js +100 -0
  416. package/dist/chunk-x679thag.js +825 -0
  417. package/dist/chunk-x8b7vft8.js +132 -0
  418. package/dist/chunk-x8cftch7.js +119 -0
  419. package/dist/chunk-x9q7r885.js +348 -0
  420. package/dist/chunk-xawkt0vb.js +1585 -0
  421. package/dist/chunk-xdw5dv00.js +8 -0
  422. package/dist/chunk-xe9cc860.js +287 -0
  423. package/dist/chunk-xjr9c3vt.js +101 -0
  424. package/dist/chunk-xk7zaqta.js +21933 -0
  425. package/dist/chunk-xktbmawc.js +678 -0
  426. package/dist/chunk-xn6yw46v.js +140 -0
  427. package/dist/chunk-xsq9ae7x.js +90 -0
  428. package/dist/chunk-xszk7n10.js +14358 -0
  429. package/dist/chunk-xt8a5r1t.js +84 -0
  430. package/dist/chunk-xydyndkv.js +195 -0
  431. package/dist/chunk-xzt10yc5.js +60 -0
  432. package/dist/chunk-y04y95dr.js +91 -0
  433. package/dist/chunk-y1784krc.js +19 -0
  434. package/dist/chunk-y1x32h3x.js +128 -0
  435. package/dist/chunk-y3s7aww5.js +99 -0
  436. package/dist/chunk-y47cg3kz.js +42 -0
  437. package/dist/chunk-y7kzvepn.js +469 -0
  438. package/dist/chunk-y89kbsyc.js +287 -0
  439. package/dist/chunk-yd87p1c3.js +159 -0
  440. package/dist/chunk-yf3yw8fw.js +105 -0
  441. package/dist/chunk-ygbf0ezx.js +1391 -0
  442. package/dist/chunk-yjbxnshv.js +208 -0
  443. package/dist/chunk-ynednmqd.js +192 -0
  444. package/dist/chunk-yvhez44y.js +259 -0
  445. package/dist/chunk-ywxd4qw4.js +22 -0
  446. package/dist/chunk-yzrmgpy4.js +117 -0
  447. package/dist/chunk-z0b2vb24.js +862 -0
  448. package/dist/chunk-z1zj044v.js +655 -0
  449. package/dist/chunk-z2dp53wn.js +17 -0
  450. package/dist/chunk-z3w0xasa.js +165 -0
  451. package/dist/chunk-z7ycmrb3.js +644 -0
  452. package/dist/chunk-zh11tdkb.js +347 -0
  453. package/dist/chunk-zk2wsm7d.js +15 -0
  454. package/dist/chunk-zqfqcf22.js +229 -0
  455. package/dist/chunk-zqk2j8px.js +699 -0
  456. package/dist/chunk-zqvsc10j.js +2833 -0
  457. package/dist/chunk-zsfxha74.js +17655 -0
  458. package/dist/chunk-zvc4snyb.js +117 -0
  459. package/dist/cli.js +194 -0
  460. package/package.json +173 -0
@@ -0,0 +1,1581 @@
1
+ // @bun
2
+ import {
3
+ StructuredDiff,
4
+ fetchGitDiff,
5
+ fetchGitDiffHunks,
6
+ init_StructuredDiff,
7
+ init_gitDiff,
8
+ init_overlayContext,
9
+ useRegisterOverlay
10
+ } from "./chunk-ewsgsw9h.js";
11
+ import"./chunk-z1zj044v.js";
12
+ import"./chunk-t0rgmccj.js";
13
+ import"./chunk-key6jr7p.js";
14
+ import"./chunk-0m2861gw.js";
15
+ import"./chunk-0x9b2nmd.js";
16
+ import {
17
+ Byline,
18
+ Dialog,
19
+ init_Byline,
20
+ init_Dialog,
21
+ init_useShortcutDisplay,
22
+ useShortcutDisplay
23
+ } from "./chunk-89e1v45e.js";
24
+ import"./chunk-2gzv8nrw.js";
25
+ import"./chunk-ehtwnxpg.js";
26
+ import"./chunk-3be7ka25.js";
27
+ import"./chunk-x679thag.js";
28
+ import"./chunk-cgfdkzhb.js";
29
+ import"./chunk-bhdt6k7w.js";
30
+ import"./chunk-45kxdsp8.js";
31
+ import"./chunk-5dbk24zg.js";
32
+ import"./chunk-msjfc5ba.js";
33
+ import"./chunk-7zsapntc.js";
34
+ import"./chunk-0rg6yrhy.js";
35
+ import"./chunk-9gbamk79.js";
36
+ import"./chunk-x0mwzt38.js";
37
+ import"./chunk-9e2kqv5g.js";
38
+ import {
39
+ Divider,
40
+ init_Divider,
41
+ init_useKeybinding,
42
+ init_useTerminalSize,
43
+ useKeybindings,
44
+ useTerminalSize
45
+ } from "./chunk-1qakq4sn.js";
46
+ import {
47
+ ThemedBox_default,
48
+ ThemedText,
49
+ init_ink,
50
+ require_compiler_runtime
51
+ } from "./chunk-s9mesaw0.js";
52
+ import"./chunk-7m2nd8da.js";
53
+ import"./chunk-ps49ymvj.js";
54
+ import {
55
+ require_jsx_dev_runtime,
56
+ require_react
57
+ } from "./chunk-g338npwr.js";
58
+ import"./chunk-zk2wsm7d.js";
59
+ import"./chunk-tw0q7ynt.js";
60
+ import"./chunk-xe9cc860.js";
61
+ import"./chunk-m06q12hg.js";
62
+ import"./chunk-ygbf0ezx.js";
63
+ import"./chunk-spqaamnc.js";
64
+ import"./chunk-4jm600zv.js";
65
+ import"./chunk-qz2x630m.js";
66
+ import"./chunk-7sb5axvf.js";
67
+ import"./chunk-v9smspw2.js";
68
+ import {
69
+ init_file,
70
+ init_stringUtils,
71
+ plural,
72
+ readFileSafe
73
+ } from "./chunk-3f7rypmf.js";
74
+ import"./chunk-e3g8q4cn.js";
75
+ import"./chunk-ctw5jwcd.js";
76
+ import"./chunk-0e1xsncc.js";
77
+ import"./chunk-vratq94g.js";
78
+ import"./chunk-g0j0t6qk.js";
79
+ import"./chunk-6kpbgc5w.js";
80
+ import"./chunk-3c25bcsw.js";
81
+ import"./chunk-tjaqa99q.js";
82
+ import"./chunk-55wgxwa9.js";
83
+ import"./chunk-w2z5pqd3.js";
84
+ import"./chunk-7ymfj7m3.js";
85
+ import"./chunk-f5ma3nh5.js";
86
+ import"./chunk-v1kzp02e.js";
87
+ import"./chunk-1eapde8a.js";
88
+ import"./chunk-p2816w9z.js";
89
+ import"./chunk-0vkfrmqm.js";
90
+ import"./chunk-0xjaqda8.js";
91
+ import {
92
+ init_format,
93
+ truncateStartToWidth
94
+ } from "./chunk-1rvz0433.js";
95
+ import"./chunk-cdz5yb0r.js";
96
+ import"./chunk-f2mhrmww.js";
97
+ import"./chunk-7z8j9qfn.js";
98
+ import"./chunk-hrzerbfw.js";
99
+ import"./chunk-d18z9pna.js";
100
+ import"./chunk-qnfx3qtx.js";
101
+ import"./chunk-hjhc4cpt.js";
102
+ import"./chunk-vyc0rjyx.js";
103
+ import {
104
+ figures_default,
105
+ init_figures
106
+ } from "./chunk-hx2tr4ep.js";
107
+ import"./chunk-p7g7pf3f.js";
108
+ import"./chunk-8tnsngw2.js";
109
+ import {
110
+ getCwd,
111
+ init_cwd
112
+ } from "./chunk-8bedvdm1.js";
113
+ import"./chunk-7wm5s02e.js";
114
+ import"./chunk-nxsh6de2.js";
115
+ import"./chunk-fbv4apne.js";
116
+ import"./chunk-3r24h7t6.js";
117
+ import"./chunk-qqfa0dqg.js";
118
+ import"./chunk-hqmz36b3.js";
119
+ import"./chunk-4g3v8y12.js";
120
+ import"./chunk-7739pg2c.js";
121
+ import"./chunk-xszk7n10.js";
122
+ import"./chunk-sdj9b9wh.js";
123
+ import {
124
+ __esm,
125
+ __toESM
126
+ } from "./chunk-qp2qdcda.js";
127
+
128
+ // src/hooks/useDiffData.ts
129
+ function useDiffData() {
130
+ const [diffResult, setDiffResult] = import_react.useState(null);
131
+ const [hunks, setHunks] = import_react.useState(new Map);
132
+ const [loading, setLoading] = import_react.useState(true);
133
+ import_react.useEffect(() => {
134
+ let cancelled = false;
135
+ async function loadDiffData() {
136
+ try {
137
+ const [statsResult, hunksResult] = await Promise.all([
138
+ fetchGitDiff(),
139
+ fetchGitDiffHunks()
140
+ ]);
141
+ if (!cancelled) {
142
+ setDiffResult(statsResult);
143
+ setHunks(hunksResult);
144
+ setLoading(false);
145
+ }
146
+ } catch (_error) {
147
+ if (!cancelled) {
148
+ setDiffResult(null);
149
+ setHunks(new Map);
150
+ setLoading(false);
151
+ }
152
+ }
153
+ }
154
+ loadDiffData();
155
+ return () => {
156
+ cancelled = true;
157
+ };
158
+ }, []);
159
+ return import_react.useMemo(() => {
160
+ if (!diffResult) {
161
+ return { stats: null, files: [], hunks: new Map, loading };
162
+ }
163
+ const { stats, perFileStats } = diffResult;
164
+ const files = [];
165
+ for (const [path, fileStats] of perFileStats) {
166
+ const fileHunks = hunks.get(path);
167
+ const isUntracked = fileStats.isUntracked ?? false;
168
+ const isLargeFile = !fileStats.isBinary && !isUntracked && !fileHunks;
169
+ const totalLines = fileStats.added + fileStats.removed;
170
+ const isTruncated = !isLargeFile && !fileStats.isBinary && totalLines > MAX_LINES_PER_FILE;
171
+ files.push({
172
+ path,
173
+ linesAdded: fileStats.added,
174
+ linesRemoved: fileStats.removed,
175
+ isBinary: fileStats.isBinary,
176
+ isLargeFile,
177
+ isTruncated,
178
+ isUntracked
179
+ });
180
+ }
181
+ files.sort((a, b) => a.path.localeCompare(b.path));
182
+ return { stats, files, hunks, loading: false };
183
+ }, [diffResult, hunks, loading]);
184
+ }
185
+ var import_react, MAX_LINES_PER_FILE = 400;
186
+ var init_useDiffData = __esm(() => {
187
+ init_gitDiff();
188
+ import_react = __toESM(require_react(), 1);
189
+ });
190
+
191
+ // src/hooks/useTurnDiffs.ts
192
+ function isFileEditResult(result) {
193
+ if (!result || typeof result !== "object")
194
+ return false;
195
+ const r = result;
196
+ const hasFilePath = typeof r.filePath === "string";
197
+ const hasStructuredPatch = Array.isArray(r.structuredPatch) && r.structuredPatch.length > 0;
198
+ const isNewFile = r.type === "create" && typeof r.content === "string";
199
+ return hasFilePath && (hasStructuredPatch || isNewFile);
200
+ }
201
+ function isFileWriteOutput(result) {
202
+ return "type" in result && (result.type === "create" || result.type === "update");
203
+ }
204
+ function countHunkLines(hunks) {
205
+ let added = 0;
206
+ let removed = 0;
207
+ for (const hunk of hunks) {
208
+ for (const line of hunk.lines) {
209
+ if (line.startsWith("+"))
210
+ added++;
211
+ else if (line.startsWith("-"))
212
+ removed++;
213
+ }
214
+ }
215
+ return { added, removed };
216
+ }
217
+ function getUserPromptPreview(message) {
218
+ if (message.type !== "user")
219
+ return "";
220
+ const content = message.message.content;
221
+ const text = typeof content === "string" ? content : "";
222
+ if (text.length <= 30)
223
+ return text;
224
+ return text.slice(0, 29) + "\u2026";
225
+ }
226
+ function computeTurnStats(turn) {
227
+ let totalAdded = 0;
228
+ let totalRemoved = 0;
229
+ for (const file of turn.files.values()) {
230
+ totalAdded += file.linesAdded;
231
+ totalRemoved += file.linesRemoved;
232
+ }
233
+ turn.stats = {
234
+ filesChanged: turn.files.size,
235
+ linesAdded: totalAdded,
236
+ linesRemoved: totalRemoved
237
+ };
238
+ }
239
+ function useTurnDiffs(messages) {
240
+ const cache = import_react2.useRef({
241
+ completedTurns: [],
242
+ currentTurn: null,
243
+ lastProcessedIndex: 0,
244
+ lastTurnIndex: 0
245
+ });
246
+ return import_react2.useMemo(() => {
247
+ const c = cache.current;
248
+ if (messages.length < c.lastProcessedIndex) {
249
+ c.completedTurns = [];
250
+ c.currentTurn = null;
251
+ c.lastProcessedIndex = 0;
252
+ c.lastTurnIndex = 0;
253
+ }
254
+ for (let i = c.lastProcessedIndex;i < messages.length; i++) {
255
+ const message = messages[i];
256
+ if (!message || message.type !== "user")
257
+ continue;
258
+ const isToolResult = message.toolUseResult || Array.isArray(message.message.content) && message.message.content[0]?.type === "tool_result";
259
+ if (!isToolResult && !message.isMeta) {
260
+ if (c.currentTurn && c.currentTurn.files.size > 0) {
261
+ computeTurnStats(c.currentTurn);
262
+ c.completedTurns.push(c.currentTurn);
263
+ }
264
+ c.lastTurnIndex++;
265
+ c.currentTurn = {
266
+ turnIndex: c.lastTurnIndex,
267
+ userPromptPreview: getUserPromptPreview(message),
268
+ timestamp: message.timestamp,
269
+ files: new Map,
270
+ stats: { filesChanged: 0, linesAdded: 0, linesRemoved: 0 }
271
+ };
272
+ } else if (c.currentTurn && message.toolUseResult) {
273
+ const result2 = message.toolUseResult;
274
+ if (isFileEditResult(result2)) {
275
+ const { filePath, structuredPatch } = result2;
276
+ const isNewFile = "type" in result2 && result2.type === "create";
277
+ let fileEntry = c.currentTurn.files.get(filePath);
278
+ if (!fileEntry) {
279
+ fileEntry = {
280
+ filePath,
281
+ hunks: [],
282
+ isNewFile,
283
+ linesAdded: 0,
284
+ linesRemoved: 0
285
+ };
286
+ c.currentTurn.files.set(filePath, fileEntry);
287
+ }
288
+ if (isNewFile && structuredPatch.length === 0 && isFileWriteOutput(result2)) {
289
+ const content = result2.content;
290
+ const lines = content.split(`
291
+ `);
292
+ const syntheticHunk = {
293
+ oldStart: 0,
294
+ oldLines: 0,
295
+ newStart: 1,
296
+ newLines: lines.length,
297
+ lines: lines.map((l) => "+" + l)
298
+ };
299
+ fileEntry.hunks.push(syntheticHunk);
300
+ fileEntry.linesAdded += lines.length;
301
+ } else {
302
+ fileEntry.hunks.push(...structuredPatch);
303
+ const { added, removed } = countHunkLines(structuredPatch);
304
+ fileEntry.linesAdded += added;
305
+ fileEntry.linesRemoved += removed;
306
+ }
307
+ if (isNewFile) {
308
+ fileEntry.isNewFile = true;
309
+ }
310
+ }
311
+ }
312
+ }
313
+ c.lastProcessedIndex = messages.length;
314
+ const result = [...c.completedTurns];
315
+ if (c.currentTurn && c.currentTurn.files.size > 0) {
316
+ computeTurnStats(c.currentTurn);
317
+ result.push(c.currentTurn);
318
+ }
319
+ return result.reverse();
320
+ }, [messages]);
321
+ }
322
+ var import_react2;
323
+ var init_useTurnDiffs = __esm(() => {
324
+ import_react2 = __toESM(require_react(), 1);
325
+ });
326
+
327
+ // src/components/diff/DiffDetailView.tsx
328
+ import { resolve } from "path";
329
+ function DiffDetailView(t0) {
330
+ const $ = import_compiler_runtime.c(53);
331
+ const {
332
+ filePath,
333
+ hunks,
334
+ isLargeFile,
335
+ isBinary,
336
+ isTruncated,
337
+ isUntracked
338
+ } = t0;
339
+ const {
340
+ columns
341
+ } = useTerminalSize();
342
+ let t1;
343
+ bb0: {
344
+ if (!filePath) {
345
+ let t23;
346
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
347
+ t23 = {
348
+ firstLine: null,
349
+ fileContent: undefined
350
+ };
351
+ $[0] = t23;
352
+ } else {
353
+ t23 = $[0];
354
+ }
355
+ t1 = t23;
356
+ break bb0;
357
+ }
358
+ let content;
359
+ let t22;
360
+ if ($[1] !== filePath) {
361
+ const fullPath = resolve(getCwd(), filePath);
362
+ content = readFileSafe(fullPath);
363
+ t22 = content?.split(`
364
+ `)[0] ?? null;
365
+ $[1] = filePath;
366
+ $[2] = content;
367
+ $[3] = t22;
368
+ } else {
369
+ content = $[2];
370
+ t22 = $[3];
371
+ }
372
+ const t32 = content ?? undefined;
373
+ let t42;
374
+ if ($[4] !== t22 || $[5] !== t32) {
375
+ t42 = {
376
+ firstLine: t22,
377
+ fileContent: t32
378
+ };
379
+ $[4] = t22;
380
+ $[5] = t32;
381
+ $[6] = t42;
382
+ } else {
383
+ t42 = $[6];
384
+ }
385
+ t1 = t42;
386
+ }
387
+ const {
388
+ firstLine,
389
+ fileContent
390
+ } = t1;
391
+ if (isUntracked) {
392
+ let t22;
393
+ if ($[7] !== filePath) {
394
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
395
+ bold: true,
396
+ children: filePath
397
+ }, undefined, false, undefined, this);
398
+ $[7] = filePath;
399
+ $[8] = t22;
400
+ } else {
401
+ t22 = $[8];
402
+ }
403
+ let t32;
404
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
405
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
406
+ dimColor: true,
407
+ children: " (untracked)"
408
+ }, undefined, false, undefined, this);
409
+ $[9] = t32;
410
+ } else {
411
+ t32 = $[9];
412
+ }
413
+ let t42;
414
+ if ($[10] !== t22) {
415
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
416
+ children: [
417
+ t22,
418
+ t32
419
+ ]
420
+ }, undefined, true, undefined, this);
421
+ $[10] = t22;
422
+ $[11] = t42;
423
+ } else {
424
+ t42 = $[11];
425
+ }
426
+ let t52;
427
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
428
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
429
+ padding: 4
430
+ }, undefined, false, undefined, this);
431
+ $[12] = t52;
432
+ } else {
433
+ t52 = $[12];
434
+ }
435
+ let t62;
436
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
437
+ t62 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
438
+ dimColor: true,
439
+ italic: true,
440
+ children: "New file not yet staged."
441
+ }, undefined, false, undefined, this);
442
+ $[13] = t62;
443
+ } else {
444
+ t62 = $[13];
445
+ }
446
+ let t72;
447
+ if ($[14] !== filePath) {
448
+ t72 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
449
+ flexDirection: "column",
450
+ children: [
451
+ t62,
452
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
453
+ dimColor: true,
454
+ italic: true,
455
+ children: [
456
+ "Run `git add ",
457
+ filePath,
458
+ "` to see line counts."
459
+ ]
460
+ }, undefined, true, undefined, this)
461
+ ]
462
+ }, undefined, true, undefined, this);
463
+ $[14] = filePath;
464
+ $[15] = t72;
465
+ } else {
466
+ t72 = $[15];
467
+ }
468
+ let t82;
469
+ if ($[16] !== t42 || $[17] !== t72) {
470
+ t82 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
471
+ flexDirection: "column",
472
+ width: "100%",
473
+ children: [
474
+ t42,
475
+ t52,
476
+ t72
477
+ ]
478
+ }, undefined, true, undefined, this);
479
+ $[16] = t42;
480
+ $[17] = t72;
481
+ $[18] = t82;
482
+ } else {
483
+ t82 = $[18];
484
+ }
485
+ return t82;
486
+ }
487
+ if (isBinary) {
488
+ let t22;
489
+ if ($[19] !== filePath) {
490
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
491
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
492
+ bold: true,
493
+ children: filePath
494
+ }, undefined, false, undefined, this)
495
+ }, undefined, false, undefined, this);
496
+ $[19] = filePath;
497
+ $[20] = t22;
498
+ } else {
499
+ t22 = $[20];
500
+ }
501
+ let t32;
502
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
503
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
504
+ padding: 4
505
+ }, undefined, false, undefined, this);
506
+ $[21] = t32;
507
+ } else {
508
+ t32 = $[21];
509
+ }
510
+ let t42;
511
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
512
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
513
+ flexDirection: "column",
514
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
515
+ dimColor: true,
516
+ italic: true,
517
+ children: "Binary file - cannot display diff"
518
+ }, undefined, false, undefined, this)
519
+ }, undefined, false, undefined, this);
520
+ $[22] = t42;
521
+ } else {
522
+ t42 = $[22];
523
+ }
524
+ let t52;
525
+ if ($[23] !== t22) {
526
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
527
+ flexDirection: "column",
528
+ width: "100%",
529
+ children: [
530
+ t22,
531
+ t32,
532
+ t42
533
+ ]
534
+ }, undefined, true, undefined, this);
535
+ $[23] = t22;
536
+ $[24] = t52;
537
+ } else {
538
+ t52 = $[24];
539
+ }
540
+ return t52;
541
+ }
542
+ if (isLargeFile) {
543
+ let t22;
544
+ if ($[25] !== filePath) {
545
+ t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
546
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
547
+ bold: true,
548
+ children: filePath
549
+ }, undefined, false, undefined, this)
550
+ }, undefined, false, undefined, this);
551
+ $[25] = filePath;
552
+ $[26] = t22;
553
+ } else {
554
+ t22 = $[26];
555
+ }
556
+ let t32;
557
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
558
+ t32 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
559
+ padding: 4
560
+ }, undefined, false, undefined, this);
561
+ $[27] = t32;
562
+ } else {
563
+ t32 = $[27];
564
+ }
565
+ let t42;
566
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
567
+ t42 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
568
+ flexDirection: "column",
569
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
570
+ dimColor: true,
571
+ italic: true,
572
+ children: "Large file - diff exceeds 1 MB limit"
573
+ }, undefined, false, undefined, this)
574
+ }, undefined, false, undefined, this);
575
+ $[28] = t42;
576
+ } else {
577
+ t42 = $[28];
578
+ }
579
+ let t52;
580
+ if ($[29] !== t22) {
581
+ t52 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
582
+ flexDirection: "column",
583
+ width: "100%",
584
+ children: [
585
+ t22,
586
+ t32,
587
+ t42
588
+ ]
589
+ }, undefined, true, undefined, this);
590
+ $[29] = t22;
591
+ $[30] = t52;
592
+ } else {
593
+ t52 = $[30];
594
+ }
595
+ return t52;
596
+ }
597
+ let t2;
598
+ if ($[31] !== filePath) {
599
+ t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
600
+ bold: true,
601
+ children: filePath
602
+ }, undefined, false, undefined, this);
603
+ $[31] = filePath;
604
+ $[32] = t2;
605
+ } else {
606
+ t2 = $[32];
607
+ }
608
+ let t3;
609
+ if ($[33] !== isTruncated) {
610
+ t3 = isTruncated && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
611
+ dimColor: true,
612
+ children: " (truncated)"
613
+ }, undefined, false, undefined, this);
614
+ $[33] = isTruncated;
615
+ $[34] = t3;
616
+ } else {
617
+ t3 = $[34];
618
+ }
619
+ let t4;
620
+ if ($[35] !== t2 || $[36] !== t3) {
621
+ t4 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
622
+ children: [
623
+ t2,
624
+ t3
625
+ ]
626
+ }, undefined, true, undefined, this);
627
+ $[35] = t2;
628
+ $[36] = t3;
629
+ $[37] = t4;
630
+ } else {
631
+ t4 = $[37];
632
+ }
633
+ let t5;
634
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
635
+ t5 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Divider, {
636
+ padding: 4
637
+ }, undefined, false, undefined, this);
638
+ $[38] = t5;
639
+ } else {
640
+ t5 = $[38];
641
+ }
642
+ let t6;
643
+ if ($[39] !== columns || $[40] !== fileContent || $[41] !== filePath || $[42] !== firstLine || $[43] !== hunks) {
644
+ t6 = hunks.length === 0 ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
645
+ dimColor: true,
646
+ children: "No diff content"
647
+ }, undefined, false, undefined, this) : hunks.map((hunk, index) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(StructuredDiff, {
648
+ patch: hunk,
649
+ filePath,
650
+ firstLine,
651
+ fileContent,
652
+ dim: false,
653
+ width: columns - 2 - 2
654
+ }, index, false, undefined, this));
655
+ $[39] = columns;
656
+ $[40] = fileContent;
657
+ $[41] = filePath;
658
+ $[42] = firstLine;
659
+ $[43] = hunks;
660
+ $[44] = t6;
661
+ } else {
662
+ t6 = $[44];
663
+ }
664
+ let t7;
665
+ if ($[45] !== t6) {
666
+ t7 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
667
+ flexDirection: "column",
668
+ children: t6
669
+ }, undefined, false, undefined, this);
670
+ $[45] = t6;
671
+ $[46] = t7;
672
+ } else {
673
+ t7 = $[46];
674
+ }
675
+ let t8;
676
+ if ($[47] !== isTruncated) {
677
+ t8 = isTruncated && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
678
+ dimColor: true,
679
+ italic: true,
680
+ children: "\u2026 diff truncated (exceeded 400 line limit)"
681
+ }, undefined, false, undefined, this);
682
+ $[47] = isTruncated;
683
+ $[48] = t8;
684
+ } else {
685
+ t8 = $[48];
686
+ }
687
+ let t9;
688
+ if ($[49] !== t4 || $[50] !== t7 || $[51] !== t8) {
689
+ t9 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
690
+ flexDirection: "column",
691
+ width: "100%",
692
+ children: [
693
+ t4,
694
+ t5,
695
+ t7,
696
+ t8
697
+ ]
698
+ }, undefined, true, undefined, this);
699
+ $[49] = t4;
700
+ $[50] = t7;
701
+ $[51] = t8;
702
+ $[52] = t9;
703
+ } else {
704
+ t9 = $[52];
705
+ }
706
+ return t9;
707
+ }
708
+ var import_compiler_runtime, jsx_dev_runtime;
709
+ var init_DiffDetailView = __esm(() => {
710
+ init_useTerminalSize();
711
+ init_ink();
712
+ init_cwd();
713
+ init_file();
714
+ init_Divider();
715
+ init_StructuredDiff();
716
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
717
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
718
+ });
719
+
720
+ // src/components/diff/DiffFileList.tsx
721
+ function DiffFileList(t0) {
722
+ const $ = import_compiler_runtime2.c(36);
723
+ const {
724
+ files,
725
+ selectedIndex
726
+ } = t0;
727
+ const {
728
+ columns
729
+ } = useTerminalSize();
730
+ let t1;
731
+ bb0: {
732
+ if (files.length === 0 || files.length <= MAX_VISIBLE_FILES) {
733
+ let t23;
734
+ if ($[0] !== files.length) {
735
+ t23 = {
736
+ startIndex: 0,
737
+ endIndex: files.length
738
+ };
739
+ $[0] = files.length;
740
+ $[1] = t23;
741
+ } else {
742
+ t23 = $[1];
743
+ }
744
+ t1 = t23;
745
+ break bb0;
746
+ }
747
+ let start = Math.max(0, selectedIndex - Math.floor(MAX_VISIBLE_FILES / 2));
748
+ let end = start + MAX_VISIBLE_FILES;
749
+ if (end > files.length) {
750
+ end = files.length;
751
+ start = Math.max(0, end - MAX_VISIBLE_FILES);
752
+ }
753
+ let t22;
754
+ if ($[2] !== end || $[3] !== start) {
755
+ t22 = {
756
+ startIndex: start,
757
+ endIndex: end
758
+ };
759
+ $[2] = end;
760
+ $[3] = start;
761
+ $[4] = t22;
762
+ } else {
763
+ t22 = $[4];
764
+ }
765
+ t1 = t22;
766
+ }
767
+ const {
768
+ startIndex,
769
+ endIndex
770
+ } = t1;
771
+ if (files.length === 0) {
772
+ let t22;
773
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
774
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
775
+ dimColor: true,
776
+ children: "No changed files"
777
+ }, undefined, false, undefined, this);
778
+ $[5] = t22;
779
+ } else {
780
+ t22 = $[5];
781
+ }
782
+ return t22;
783
+ }
784
+ let T0;
785
+ let hasMoreBelow;
786
+ let needsPagination;
787
+ let t2;
788
+ let t3;
789
+ let t4;
790
+ if ($[6] !== columns || $[7] !== endIndex || $[8] !== files || $[9] !== selectedIndex || $[10] !== startIndex) {
791
+ const visibleFiles = files.slice(startIndex, endIndex);
792
+ const hasMoreAbove = startIndex > 0;
793
+ hasMoreBelow = endIndex < files.length;
794
+ needsPagination = files.length > MAX_VISIBLE_FILES;
795
+ const maxPathWidth = Math.max(20, columns - 16 - 3 - 4);
796
+ T0 = ThemedBox_default;
797
+ t2 = "column";
798
+ if ($[17] !== hasMoreAbove || $[18] !== needsPagination || $[19] !== startIndex) {
799
+ t3 = needsPagination && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
800
+ dimColor: true,
801
+ children: hasMoreAbove ? ` \u2191 ${startIndex} more ${plural(startIndex, "file")}` : " "
802
+ }, undefined, false, undefined, this);
803
+ $[17] = hasMoreAbove;
804
+ $[18] = needsPagination;
805
+ $[19] = startIndex;
806
+ $[20] = t3;
807
+ } else {
808
+ t3 = $[20];
809
+ }
810
+ let t52;
811
+ if ($[21] !== maxPathWidth || $[22] !== selectedIndex || $[23] !== startIndex) {
812
+ t52 = (file, index) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(FileItem, {
813
+ file,
814
+ isSelected: startIndex + index === selectedIndex,
815
+ maxPathWidth
816
+ }, file.path, false, undefined, this);
817
+ $[21] = maxPathWidth;
818
+ $[22] = selectedIndex;
819
+ $[23] = startIndex;
820
+ $[24] = t52;
821
+ } else {
822
+ t52 = $[24];
823
+ }
824
+ t4 = visibleFiles.map(t52);
825
+ $[6] = columns;
826
+ $[7] = endIndex;
827
+ $[8] = files;
828
+ $[9] = selectedIndex;
829
+ $[10] = startIndex;
830
+ $[11] = T0;
831
+ $[12] = hasMoreBelow;
832
+ $[13] = needsPagination;
833
+ $[14] = t2;
834
+ $[15] = t3;
835
+ $[16] = t4;
836
+ } else {
837
+ T0 = $[11];
838
+ hasMoreBelow = $[12];
839
+ needsPagination = $[13];
840
+ t2 = $[14];
841
+ t3 = $[15];
842
+ t4 = $[16];
843
+ }
844
+ let t5;
845
+ if ($[25] !== endIndex || $[26] !== files.length || $[27] !== hasMoreBelow || $[28] !== needsPagination) {
846
+ t5 = needsPagination && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
847
+ dimColor: true,
848
+ children: hasMoreBelow ? ` \u2193 ${files.length - endIndex} more ${plural(files.length - endIndex, "file")}` : " "
849
+ }, undefined, false, undefined, this);
850
+ $[25] = endIndex;
851
+ $[26] = files.length;
852
+ $[27] = hasMoreBelow;
853
+ $[28] = needsPagination;
854
+ $[29] = t5;
855
+ } else {
856
+ t5 = $[29];
857
+ }
858
+ let t6;
859
+ if ($[30] !== T0 || $[31] !== t2 || $[32] !== t3 || $[33] !== t4 || $[34] !== t5) {
860
+ t6 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(T0, {
861
+ flexDirection: t2,
862
+ children: [
863
+ t3,
864
+ t4,
865
+ t5
866
+ ]
867
+ }, undefined, true, undefined, this);
868
+ $[30] = T0;
869
+ $[31] = t2;
870
+ $[32] = t3;
871
+ $[33] = t4;
872
+ $[34] = t5;
873
+ $[35] = t6;
874
+ } else {
875
+ t6 = $[35];
876
+ }
877
+ return t6;
878
+ }
879
+ function FileItem(t0) {
880
+ const $ = import_compiler_runtime2.c(14);
881
+ const {
882
+ file,
883
+ isSelected,
884
+ maxPathWidth
885
+ } = t0;
886
+ let t1;
887
+ if ($[0] !== file.path || $[1] !== maxPathWidth) {
888
+ t1 = truncateStartToWidth(file.path, maxPathWidth);
889
+ $[0] = file.path;
890
+ $[1] = maxPathWidth;
891
+ $[2] = t1;
892
+ } else {
893
+ t1 = $[2];
894
+ }
895
+ const displayPath = t1;
896
+ const pointer = isSelected ? figures_default.pointer + " " : " ";
897
+ const line = `${pointer}${displayPath}`;
898
+ const t2 = isSelected ? "background" : undefined;
899
+ let t3;
900
+ if ($[3] !== isSelected || $[4] !== line || $[5] !== t2) {
901
+ t3 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
902
+ bold: isSelected,
903
+ color: t2,
904
+ inverse: isSelected,
905
+ children: line
906
+ }, undefined, false, undefined, this);
907
+ $[3] = isSelected;
908
+ $[4] = line;
909
+ $[5] = t2;
910
+ $[6] = t3;
911
+ } else {
912
+ t3 = $[6];
913
+ }
914
+ let t4;
915
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
916
+ t4 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
917
+ flexGrow: 1
918
+ }, undefined, false, undefined, this);
919
+ $[7] = t4;
920
+ } else {
921
+ t4 = $[7];
922
+ }
923
+ let t5;
924
+ if ($[8] !== file || $[9] !== isSelected) {
925
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(FileStats, {
926
+ file,
927
+ isSelected
928
+ }, undefined, false, undefined, this);
929
+ $[8] = file;
930
+ $[9] = isSelected;
931
+ $[10] = t5;
932
+ } else {
933
+ t5 = $[10];
934
+ }
935
+ let t6;
936
+ if ($[11] !== t3 || $[12] !== t5) {
937
+ t6 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
938
+ flexDirection: "row",
939
+ children: [
940
+ t3,
941
+ t4,
942
+ t5
943
+ ]
944
+ }, undefined, true, undefined, this);
945
+ $[11] = t3;
946
+ $[12] = t5;
947
+ $[13] = t6;
948
+ } else {
949
+ t6 = $[13];
950
+ }
951
+ return t6;
952
+ }
953
+ function FileStats(t0) {
954
+ const $ = import_compiler_runtime2.c(20);
955
+ const {
956
+ file,
957
+ isSelected
958
+ } = t0;
959
+ if (file.isUntracked) {
960
+ const t12 = !isSelected;
961
+ let t22;
962
+ if ($[0] !== t12) {
963
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
964
+ dimColor: t12,
965
+ italic: true,
966
+ children: "untracked"
967
+ }, undefined, false, undefined, this);
968
+ $[0] = t12;
969
+ $[1] = t22;
970
+ } else {
971
+ t22 = $[1];
972
+ }
973
+ return t22;
974
+ }
975
+ if (file.isBinary) {
976
+ const t12 = !isSelected;
977
+ let t22;
978
+ if ($[2] !== t12) {
979
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
980
+ dimColor: t12,
981
+ italic: true,
982
+ children: "Binary file"
983
+ }, undefined, false, undefined, this);
984
+ $[2] = t12;
985
+ $[3] = t22;
986
+ } else {
987
+ t22 = $[3];
988
+ }
989
+ return t22;
990
+ }
991
+ if (file.isLargeFile) {
992
+ const t12 = !isSelected;
993
+ let t22;
994
+ if ($[4] !== t12) {
995
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
996
+ dimColor: t12,
997
+ italic: true,
998
+ children: "Large file modified"
999
+ }, undefined, false, undefined, this);
1000
+ $[4] = t12;
1001
+ $[5] = t22;
1002
+ } else {
1003
+ t22 = $[5];
1004
+ }
1005
+ return t22;
1006
+ }
1007
+ let t1;
1008
+ if ($[6] !== file.linesAdded || $[7] !== isSelected) {
1009
+ t1 = file.linesAdded > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1010
+ color: "diffAddedWord",
1011
+ bold: isSelected,
1012
+ children: [
1013
+ "+",
1014
+ file.linesAdded
1015
+ ]
1016
+ }, undefined, true, undefined, this);
1017
+ $[6] = file.linesAdded;
1018
+ $[7] = isSelected;
1019
+ $[8] = t1;
1020
+ } else {
1021
+ t1 = $[8];
1022
+ }
1023
+ const t2 = file.linesAdded > 0 && file.linesRemoved > 0 && " ";
1024
+ let t3;
1025
+ if ($[9] !== file.linesRemoved || $[10] !== isSelected) {
1026
+ t3 = file.linesRemoved > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1027
+ color: "diffRemovedWord",
1028
+ bold: isSelected,
1029
+ children: [
1030
+ "-",
1031
+ file.linesRemoved
1032
+ ]
1033
+ }, undefined, true, undefined, this);
1034
+ $[9] = file.linesRemoved;
1035
+ $[10] = isSelected;
1036
+ $[11] = t3;
1037
+ } else {
1038
+ t3 = $[11];
1039
+ }
1040
+ let t4;
1041
+ if ($[12] !== file.isTruncated || $[13] !== isSelected) {
1042
+ t4 = file.isTruncated && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1043
+ dimColor: !isSelected,
1044
+ children: " (truncated)"
1045
+ }, undefined, false, undefined, this);
1046
+ $[12] = file.isTruncated;
1047
+ $[13] = isSelected;
1048
+ $[14] = t4;
1049
+ } else {
1050
+ t4 = $[14];
1051
+ }
1052
+ let t5;
1053
+ if ($[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t4) {
1054
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
1055
+ children: [
1056
+ t1,
1057
+ t2,
1058
+ t3,
1059
+ t4
1060
+ ]
1061
+ }, undefined, true, undefined, this);
1062
+ $[15] = t1;
1063
+ $[16] = t2;
1064
+ $[17] = t3;
1065
+ $[18] = t4;
1066
+ $[19] = t5;
1067
+ } else {
1068
+ t5 = $[19];
1069
+ }
1070
+ return t5;
1071
+ }
1072
+ var import_compiler_runtime2, jsx_dev_runtime2, MAX_VISIBLE_FILES = 5;
1073
+ var init_DiffFileList = __esm(() => {
1074
+ init_figures();
1075
+ init_useTerminalSize();
1076
+ init_ink();
1077
+ init_format();
1078
+ init_stringUtils();
1079
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
1080
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
1081
+ });
1082
+
1083
+ // src/components/diff/DiffDialog.tsx
1084
+ function turnDiffToDiffData(turn) {
1085
+ const files = Array.from(turn.files.values()).map((f) => ({
1086
+ path: f.filePath,
1087
+ linesAdded: f.linesAdded,
1088
+ linesRemoved: f.linesRemoved,
1089
+ isBinary: false,
1090
+ isLargeFile: false,
1091
+ isTruncated: false,
1092
+ isNewFile: f.isNewFile
1093
+ })).sort((a, b) => a.path.localeCompare(b.path));
1094
+ const hunks = new Map;
1095
+ for (const f of turn.files.values()) {
1096
+ hunks.set(f.filePath, f.hunks);
1097
+ }
1098
+ return {
1099
+ stats: {
1100
+ filesCount: turn.stats.filesChanged,
1101
+ linesAdded: turn.stats.linesAdded,
1102
+ linesRemoved: turn.stats.linesRemoved
1103
+ },
1104
+ files,
1105
+ hunks,
1106
+ loading: false
1107
+ };
1108
+ }
1109
+ function DiffDialog(t0) {
1110
+ const $ = import_compiler_runtime3.c(73);
1111
+ const {
1112
+ messages,
1113
+ onDone
1114
+ } = t0;
1115
+ const gitDiffData = useDiffData();
1116
+ const turnDiffs = useTurnDiffs(messages);
1117
+ const [viewMode, setViewMode] = import_react3.useState("list");
1118
+ const [selectedIndex, setSelectedIndex] = import_react3.useState(0);
1119
+ const [sourceIndex, setSourceIndex] = import_react3.useState(0);
1120
+ let t1;
1121
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1122
+ t1 = {
1123
+ type: "current"
1124
+ };
1125
+ $[0] = t1;
1126
+ } else {
1127
+ t1 = $[0];
1128
+ }
1129
+ let t2;
1130
+ if ($[1] !== turnDiffs) {
1131
+ t2 = [t1, ...turnDiffs.map(_temp)];
1132
+ $[1] = turnDiffs;
1133
+ $[2] = t2;
1134
+ } else {
1135
+ t2 = $[2];
1136
+ }
1137
+ const sources = t2;
1138
+ const currentSource = sources[sourceIndex];
1139
+ const currentTurn = currentSource?.type === "turn" ? currentSource.turn : null;
1140
+ let t3;
1141
+ if ($[3] !== currentTurn || $[4] !== gitDiffData) {
1142
+ t3 = currentTurn ? turnDiffToDiffData(currentTurn) : gitDiffData;
1143
+ $[3] = currentTurn;
1144
+ $[4] = gitDiffData;
1145
+ $[5] = t3;
1146
+ } else {
1147
+ t3 = $[5];
1148
+ }
1149
+ const diffData = t3;
1150
+ const selectedFile = diffData.files[selectedIndex];
1151
+ let t4;
1152
+ if ($[6] !== diffData.hunks || $[7] !== selectedFile) {
1153
+ t4 = selectedFile ? diffData.hunks.get(selectedFile.path) || [] : [];
1154
+ $[6] = diffData.hunks;
1155
+ $[7] = selectedFile;
1156
+ $[8] = t4;
1157
+ } else {
1158
+ t4 = $[8];
1159
+ }
1160
+ const selectedHunks = t4;
1161
+ let t5;
1162
+ let t6;
1163
+ if ($[9] !== sourceIndex || $[10] !== sources.length) {
1164
+ t5 = () => {
1165
+ if (sourceIndex >= sources.length) {
1166
+ setSourceIndex(Math.max(0, sources.length - 1));
1167
+ }
1168
+ };
1169
+ t6 = [sources.length, sourceIndex];
1170
+ $[9] = sourceIndex;
1171
+ $[10] = sources.length;
1172
+ $[11] = t5;
1173
+ $[12] = t6;
1174
+ } else {
1175
+ t5 = $[11];
1176
+ t6 = $[12];
1177
+ }
1178
+ import_react3.useEffect(t5, t6);
1179
+ const prevSourceIndex = import_react3.useRef(sourceIndex);
1180
+ let t7;
1181
+ let t8;
1182
+ if ($[13] !== sourceIndex) {
1183
+ t7 = () => {
1184
+ if (prevSourceIndex.current !== sourceIndex) {
1185
+ setSelectedIndex(0);
1186
+ prevSourceIndex.current = sourceIndex;
1187
+ }
1188
+ };
1189
+ t8 = [sourceIndex];
1190
+ $[13] = sourceIndex;
1191
+ $[14] = t7;
1192
+ $[15] = t8;
1193
+ } else {
1194
+ t7 = $[14];
1195
+ t8 = $[15];
1196
+ }
1197
+ import_react3.useEffect(t7, t8);
1198
+ useRegisterOverlay("diff-dialog", undefined);
1199
+ let t10;
1200
+ let t9;
1201
+ if ($[16] !== sources.length || $[17] !== viewMode) {
1202
+ t9 = () => {
1203
+ if (viewMode === "detail") {
1204
+ setViewMode("list");
1205
+ } else {
1206
+ if (viewMode === "list" && sources.length > 1) {
1207
+ setSourceIndex(_temp2);
1208
+ }
1209
+ }
1210
+ };
1211
+ t10 = () => {
1212
+ if (viewMode === "list" && sources.length > 1) {
1213
+ setSourceIndex((prev_0) => Math.min(sources.length - 1, prev_0 + 1));
1214
+ }
1215
+ };
1216
+ $[16] = sources.length;
1217
+ $[17] = viewMode;
1218
+ $[18] = t10;
1219
+ $[19] = t9;
1220
+ } else {
1221
+ t10 = $[18];
1222
+ t9 = $[19];
1223
+ }
1224
+ let t11;
1225
+ if ($[20] !== viewMode) {
1226
+ t11 = () => {
1227
+ if (viewMode === "detail") {
1228
+ setViewMode("list");
1229
+ }
1230
+ };
1231
+ $[20] = viewMode;
1232
+ $[21] = t11;
1233
+ } else {
1234
+ t11 = $[21];
1235
+ }
1236
+ let t12;
1237
+ if ($[22] !== selectedFile || $[23] !== viewMode) {
1238
+ t12 = () => {
1239
+ if (viewMode === "list" && selectedFile) {
1240
+ setViewMode("detail");
1241
+ }
1242
+ };
1243
+ $[22] = selectedFile;
1244
+ $[23] = viewMode;
1245
+ $[24] = t12;
1246
+ } else {
1247
+ t12 = $[24];
1248
+ }
1249
+ let t13;
1250
+ if ($[25] !== viewMode) {
1251
+ t13 = () => {
1252
+ if (viewMode === "list") {
1253
+ setSelectedIndex(_temp3);
1254
+ }
1255
+ };
1256
+ $[25] = viewMode;
1257
+ $[26] = t13;
1258
+ } else {
1259
+ t13 = $[26];
1260
+ }
1261
+ let t14;
1262
+ if ($[27] !== diffData.files.length || $[28] !== viewMode) {
1263
+ t14 = () => {
1264
+ if (viewMode === "list") {
1265
+ setSelectedIndex((prev_2) => Math.min(diffData.files.length - 1, prev_2 + 1));
1266
+ }
1267
+ };
1268
+ $[27] = diffData.files.length;
1269
+ $[28] = viewMode;
1270
+ $[29] = t14;
1271
+ } else {
1272
+ t14 = $[29];
1273
+ }
1274
+ let t15;
1275
+ if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== t14 || $[35] !== t9) {
1276
+ t15 = {
1277
+ "diff:previousSource": t9,
1278
+ "diff:nextSource": t10,
1279
+ "diff:back": t11,
1280
+ "diff:viewDetails": t12,
1281
+ "diff:previousFile": t13,
1282
+ "diff:nextFile": t14
1283
+ };
1284
+ $[30] = t10;
1285
+ $[31] = t11;
1286
+ $[32] = t12;
1287
+ $[33] = t13;
1288
+ $[34] = t14;
1289
+ $[35] = t9;
1290
+ $[36] = t15;
1291
+ } else {
1292
+ t15 = $[36];
1293
+ }
1294
+ let t16;
1295
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
1296
+ t16 = {
1297
+ context: "DiffDialog"
1298
+ };
1299
+ $[37] = t16;
1300
+ } else {
1301
+ t16 = $[37];
1302
+ }
1303
+ useKeybindings(t15, t16);
1304
+ let t17;
1305
+ if ($[38] !== diffData.stats) {
1306
+ t17 = diffData.stats ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1307
+ dimColor: true,
1308
+ children: [
1309
+ diffData.stats.filesCount,
1310
+ " ",
1311
+ plural(diffData.stats.filesCount, "file"),
1312
+ " ",
1313
+ "changed",
1314
+ diffData.stats.linesAdded > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1315
+ color: "diffAddedWord",
1316
+ children: [
1317
+ " +",
1318
+ diffData.stats.linesAdded
1319
+ ]
1320
+ }, undefined, true, undefined, this),
1321
+ diffData.stats.linesRemoved > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1322
+ color: "diffRemovedWord",
1323
+ children: [
1324
+ " -",
1325
+ diffData.stats.linesRemoved
1326
+ ]
1327
+ }, undefined, true, undefined, this)
1328
+ ]
1329
+ }, undefined, true, undefined, this) : null;
1330
+ $[38] = diffData.stats;
1331
+ $[39] = t17;
1332
+ } else {
1333
+ t17 = $[39];
1334
+ }
1335
+ const subtitle = t17;
1336
+ const headerTitle = currentTurn ? `Turn ${currentTurn.turnIndex}` : "Uncommitted changes";
1337
+ const headerSubtitle = currentTurn ? currentTurn.userPromptPreview ? `"${currentTurn.userPromptPreview}"` : "" : "(git diff HEAD)";
1338
+ let t18;
1339
+ if ($[40] !== sourceIndex || $[41] !== sources) {
1340
+ t18 = sources.length > 1 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1341
+ children: [
1342
+ sourceIndex > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1343
+ dimColor: true,
1344
+ children: "\u25C0 "
1345
+ }, undefined, false, undefined, this),
1346
+ sources.map((source, i) => {
1347
+ const isSelected = i === sourceIndex;
1348
+ const label = source.type === "current" ? "Current" : `T${source.turn.turnIndex}`;
1349
+ return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1350
+ dimColor: !isSelected,
1351
+ bold: isSelected,
1352
+ children: [
1353
+ i > 0 ? " \xB7 " : "",
1354
+ label
1355
+ ]
1356
+ }, i, true, undefined, this);
1357
+ }),
1358
+ sourceIndex < sources.length - 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1359
+ dimColor: true,
1360
+ children: " \u25B6"
1361
+ }, undefined, false, undefined, this)
1362
+ ]
1363
+ }, undefined, true, undefined, this) : null;
1364
+ $[40] = sourceIndex;
1365
+ $[41] = sources;
1366
+ $[42] = t18;
1367
+ } else {
1368
+ t18 = $[42];
1369
+ }
1370
+ const sourceSelector = t18;
1371
+ const dismissShortcut = useShortcutDisplay("diff:dismiss", "DiffDialog", "esc");
1372
+ let t19;
1373
+ bb0: {
1374
+ if (diffData.loading) {
1375
+ t19 = "Loading diff\u2026";
1376
+ break bb0;
1377
+ }
1378
+ if (currentTurn) {
1379
+ t19 = "No file changes in this turn";
1380
+ break bb0;
1381
+ }
1382
+ if (diffData.stats && diffData.stats.filesCount > 0 && diffData.files.length === 0) {
1383
+ t19 = "Too many files to display details";
1384
+ break bb0;
1385
+ }
1386
+ t19 = "Working tree is clean";
1387
+ }
1388
+ const emptyMessage = t19;
1389
+ let t20;
1390
+ if ($[43] !== headerSubtitle) {
1391
+ t20 = headerSubtitle && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1392
+ dimColor: true,
1393
+ children: [
1394
+ " ",
1395
+ headerSubtitle
1396
+ ]
1397
+ }, undefined, true, undefined, this);
1398
+ $[43] = headerSubtitle;
1399
+ $[44] = t20;
1400
+ } else {
1401
+ t20 = $[44];
1402
+ }
1403
+ let t21;
1404
+ if ($[45] !== headerTitle || $[46] !== t20) {
1405
+ t21 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1406
+ children: [
1407
+ headerTitle,
1408
+ t20
1409
+ ]
1410
+ }, undefined, true, undefined, this);
1411
+ $[45] = headerTitle;
1412
+ $[46] = t20;
1413
+ $[47] = t21;
1414
+ } else {
1415
+ t21 = $[47];
1416
+ }
1417
+ const title = t21;
1418
+ let t22;
1419
+ if ($[48] !== onDone || $[49] !== viewMode) {
1420
+ t22 = function handleCancel2() {
1421
+ if (viewMode === "detail") {
1422
+ setViewMode("list");
1423
+ } else {
1424
+ onDone("Diff dialog dismissed", {
1425
+ display: "system"
1426
+ });
1427
+ }
1428
+ };
1429
+ $[48] = onDone;
1430
+ $[49] = viewMode;
1431
+ $[50] = t22;
1432
+ } else {
1433
+ t22 = $[50];
1434
+ }
1435
+ const handleCancel = t22;
1436
+ let t23;
1437
+ if ($[51] !== dismissShortcut || $[52] !== sources.length || $[53] !== viewMode) {
1438
+ t23 = (exitState) => exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1439
+ children: [
1440
+ "Press ",
1441
+ exitState.keyName,
1442
+ " again to exit"
1443
+ ]
1444
+ }, undefined, true, undefined, this) : viewMode === "list" ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Byline, {
1445
+ children: [
1446
+ sources.length > 1 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1447
+ children: "\u2190/\u2192 source"
1448
+ }, undefined, false, undefined, this),
1449
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1450
+ children: "\u2191/\u2193 select"
1451
+ }, undefined, false, undefined, this),
1452
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1453
+ children: "Enter view"
1454
+ }, undefined, false, undefined, this),
1455
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1456
+ children: [
1457
+ dismissShortcut,
1458
+ " close"
1459
+ ]
1460
+ }, undefined, true, undefined, this)
1461
+ ]
1462
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Byline, {
1463
+ children: [
1464
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1465
+ children: "\u2190 back"
1466
+ }, undefined, false, undefined, this),
1467
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1468
+ children: [
1469
+ dismissShortcut,
1470
+ " close"
1471
+ ]
1472
+ }, undefined, true, undefined, this)
1473
+ ]
1474
+ }, undefined, true, undefined, this);
1475
+ $[51] = dismissShortcut;
1476
+ $[52] = sources.length;
1477
+ $[53] = viewMode;
1478
+ $[54] = t23;
1479
+ } else {
1480
+ t23 = $[54];
1481
+ }
1482
+ let t24;
1483
+ if ($[55] !== diffData.files || $[56] !== emptyMessage || $[57] !== selectedFile?.isBinary || $[58] !== selectedFile?.isLargeFile || $[59] !== selectedFile?.isTruncated || $[60] !== selectedFile?.isUntracked || $[61] !== selectedFile?.path || $[62] !== selectedHunks || $[63] !== selectedIndex || $[64] !== viewMode) {
1484
+ t24 = diffData.files.length === 0 ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1485
+ marginTop: 1,
1486
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
1487
+ dimColor: true,
1488
+ children: emptyMessage
1489
+ }, undefined, false, undefined, this)
1490
+ }, undefined, false, undefined, this) : viewMode === "list" ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1491
+ flexDirection: "column",
1492
+ marginTop: 1,
1493
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DiffFileList, {
1494
+ files: diffData.files,
1495
+ selectedIndex
1496
+ }, undefined, false, undefined, this)
1497
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
1498
+ flexDirection: "column",
1499
+ marginTop: 1,
1500
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(DiffDetailView, {
1501
+ filePath: selectedFile?.path || "",
1502
+ hunks: selectedHunks,
1503
+ isLargeFile: selectedFile?.isLargeFile,
1504
+ isBinary: selectedFile?.isBinary,
1505
+ isTruncated: selectedFile?.isTruncated,
1506
+ isUntracked: selectedFile?.isUntracked
1507
+ }, undefined, false, undefined, this)
1508
+ }, undefined, false, undefined, this);
1509
+ $[55] = diffData.files;
1510
+ $[56] = emptyMessage;
1511
+ $[57] = selectedFile?.isBinary;
1512
+ $[58] = selectedFile?.isLargeFile;
1513
+ $[59] = selectedFile?.isTruncated;
1514
+ $[60] = selectedFile?.isUntracked;
1515
+ $[61] = selectedFile?.path;
1516
+ $[62] = selectedHunks;
1517
+ $[63] = selectedIndex;
1518
+ $[64] = viewMode;
1519
+ $[65] = t24;
1520
+ } else {
1521
+ t24 = $[65];
1522
+ }
1523
+ let t25;
1524
+ if ($[66] !== handleCancel || $[67] !== sourceSelector || $[68] !== subtitle || $[69] !== t23 || $[70] !== t24 || $[71] !== title) {
1525
+ t25 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
1526
+ title,
1527
+ onCancel: handleCancel,
1528
+ color: "background",
1529
+ inputGuide: t23,
1530
+ children: [
1531
+ sourceSelector,
1532
+ subtitle,
1533
+ t24
1534
+ ]
1535
+ }, undefined, true, undefined, this);
1536
+ $[66] = handleCancel;
1537
+ $[67] = sourceSelector;
1538
+ $[68] = subtitle;
1539
+ $[69] = t23;
1540
+ $[70] = t24;
1541
+ $[71] = title;
1542
+ $[72] = t25;
1543
+ } else {
1544
+ t25 = $[72];
1545
+ }
1546
+ return t25;
1547
+ }
1548
+ function _temp3(prev_1) {
1549
+ return Math.max(0, prev_1 - 1);
1550
+ }
1551
+ function _temp2(prev) {
1552
+ return Math.max(0, prev - 1);
1553
+ }
1554
+ function _temp(turn) {
1555
+ return {
1556
+ type: "turn",
1557
+ turn
1558
+ };
1559
+ }
1560
+ var import_compiler_runtime3, import_react3, jsx_dev_runtime3;
1561
+ var init_DiffDialog = __esm(() => {
1562
+ init_overlayContext();
1563
+ init_useDiffData();
1564
+ init_useTurnDiffs();
1565
+ init_ink();
1566
+ init_useKeybinding();
1567
+ init_useShortcutDisplay();
1568
+ init_stringUtils();
1569
+ init_Byline();
1570
+ init_Dialog();
1571
+ init_DiffDetailView();
1572
+ init_DiffFileList();
1573
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
1574
+ import_react3 = __toESM(require_react(), 1);
1575
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
1576
+ });
1577
+ init_DiffDialog();
1578
+
1579
+ export {
1580
+ DiffDialog
1581
+ };