@intent-hq/web 2.286.6 → 2.286.7

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 (202) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{D9cnJrSW.js → -Dy1J8Uz.js} +1 -1
  3. package/web/app/immutable/chunks/{CDIF0OfQ.js → -k9dBFge.js} +1 -1
  4. package/web/app/immutable/chunks/{9ClBlTfm.js → 02c-_h5D.js} +1 -1
  5. package/web/app/immutable/chunks/{BkAXSVKy.js → 0B3uVNNW.js} +3 -3
  6. package/web/app/immutable/chunks/{B0Gt7kIL.js → 12tzu5qf.js} +1 -1
  7. package/web/app/immutable/chunks/{BqyVFgAs.js → 2g-z97cY.js} +2 -2
  8. package/web/app/immutable/chunks/{BOWg7-2e.js → 2p9neXSj.js} +1 -1
  9. package/web/app/immutable/chunks/{0r1nZ0pd.js → 3iHuHMbX.js} +1 -1
  10. package/web/app/immutable/chunks/{Bf_wzw9l.js → 5OGBf-lA.js} +1 -1
  11. package/web/app/immutable/chunks/{BgEmsjjm.js → 5qlCbG7W.js} +1 -1
  12. package/web/app/immutable/chunks/5vqEW8Xk.js +1 -0
  13. package/web/app/immutable/chunks/{DhS9D4LQ.js → AEZrGthR.js} +1 -1
  14. package/web/app/immutable/chunks/{C-ssPvFA.js → B-u7UaKm.js} +1 -1
  15. package/web/app/immutable/chunks/{iatFKKcG.js → B1HqsJ1G.js} +1 -1
  16. package/web/app/immutable/chunks/{CQORNg-m.js → B3n8DMr5.js} +1 -1
  17. package/web/app/immutable/chunks/{B63QHGwa.js → B4mFVrsF.js} +1 -1
  18. package/web/app/immutable/chunks/{BDBiopCg.js → B56I2ZJ_.js} +1 -1
  19. package/web/app/immutable/chunks/{fNyUCzvZ.js → B643fTLK.js} +1 -1
  20. package/web/app/immutable/chunks/{Cx2xiRhw.js → B70r_bD0.js} +1 -1
  21. package/web/app/immutable/chunks/{ToNKgdbF.js → B9ynThFz.js} +1 -1
  22. package/web/app/immutable/chunks/{Djp3xwow.js → BFe-YAfF.js} +1 -1
  23. package/web/app/immutable/chunks/{BDWsa0R1.js → BGcT2nxg.js} +1 -1
  24. package/web/app/immutable/chunks/{CNcEmlm6.js → BIG6Pj6U.js} +1 -1
  25. package/web/app/immutable/chunks/{O8tyTzO7.js → BK4Akfwd.js} +1 -1
  26. package/web/app/immutable/chunks/{-RQcYil7.js → BKHxP3dh.js} +1 -1
  27. package/web/app/immutable/chunks/{B_QXRwJt.js → BMAsOD7J.js} +1 -1
  28. package/web/app/immutable/chunks/{CK9zkrOb.js → BN2G03FP.js} +1 -1
  29. package/web/app/immutable/chunks/{nSL7q58f.js → BNboIXBF.js} +1 -1
  30. package/web/app/immutable/chunks/{Ma3kLBUv.js → BQoQ6YRb.js} +1 -1
  31. package/web/app/immutable/chunks/{Cen83yhL.js → BRyc8ruL.js} +1 -1
  32. package/web/app/immutable/chunks/{BD0qm6Jz.js → BSjUANzw.js} +1 -1
  33. package/web/app/immutable/chunks/{zbG5hgeS.js → BULsKVcN.js} +1 -1
  34. package/web/app/immutable/chunks/{CMwUdxOS.js → BVCutUbP.js} +1 -1
  35. package/web/app/immutable/chunks/{CJKvnCar.js → BYBYRLX4.js} +1 -1
  36. package/web/app/immutable/chunks/{Hj5cJ9Kq.js → BYSoxiJG.js} +1 -1
  37. package/web/app/immutable/chunks/{BU-Qzzbf.js → BZA0d6L5.js} +7 -7
  38. package/web/app/immutable/chunks/{D4K4NRzX.js → BZO6xoHZ.js} +1 -1
  39. package/web/app/immutable/chunks/{Bt6n6cEl.js → Ba8xdboa.js} +2 -2
  40. package/web/app/immutable/chunks/{DLF1u3VG.js → BaJAb_aS.js} +1 -1
  41. package/web/app/immutable/chunks/{BQNvd14e.js → Banmthwv.js} +1 -1
  42. package/web/app/immutable/chunks/{CbcwGUfi.js → BdyPjVZK.js} +1 -1
  43. package/web/app/immutable/chunks/{CBW2aSyU.js → BeDkb_vZ.js} +1 -1
  44. package/web/app/immutable/chunks/{BcwQng3i.js → BeQnGCk4.js} +1 -1
  45. package/web/app/immutable/chunks/{c6-JywCq.js → BfSS1MK5.js} +1 -1
  46. package/web/app/immutable/chunks/{DFxtmloM.js → BgCl1ZYD.js} +1 -1
  47. package/web/app/immutable/chunks/{BozSuCN-.js → Bh9DwXQ5.js} +1 -1
  48. package/web/app/immutable/chunks/{BRJm-WBN.js → Bi78eYSt.js} +1 -1
  49. package/web/app/immutable/chunks/{DuNULkx8.js → BiXOLZjm.js} +1 -1
  50. package/web/app/immutable/chunks/{DJsNWuz1.js → Bk33Ri54.js} +1 -1
  51. package/web/app/immutable/chunks/{DCuTumtg.js → Boxg4-Ef.js} +1 -1
  52. package/web/app/immutable/chunks/{nFRRHcr0.js → BqDXJV4b.js} +3 -3
  53. package/web/app/immutable/chunks/{BdQglECS.js → Bwr2Pz45.js} +5 -5
  54. package/web/app/immutable/chunks/{BqOdnG_o.js → Bx2W_o-K.js} +1 -1
  55. package/web/app/immutable/chunks/{BmUO-ZCq.js → ByuNUKg7.js} +1 -1
  56. package/web/app/immutable/chunks/{DNfhZLeN.js → BzKpdh0S.js} +1 -1
  57. package/web/app/immutable/chunks/{BHj4gB0Y.js → C0Ic7MWu.js} +1 -1
  58. package/web/app/immutable/chunks/{CWlglyI_.js → C1III1VB.js} +1 -1
  59. package/web/app/immutable/chunks/{DSeXOn44.js → C2fCoIum.js} +3 -3
  60. package/web/app/immutable/chunks/{DeoBRQb4.js → C4obf3FV.js} +1 -1
  61. package/web/app/immutable/chunks/{DT7mlQbt.js → C6TLZd79.js} +1 -1
  62. package/web/app/immutable/chunks/{DyMSTER3.js → C78xsmeY.js} +1 -1
  63. package/web/app/immutable/chunks/{DUlDadB7.js → C9W_2OCR.js} +1 -1
  64. package/web/app/immutable/chunks/{Cwf2cl-G.js → CCUNfXiW.js} +1 -1
  65. package/web/app/immutable/chunks/{BHfO1DIu.js → CDNrBqJE.js} +1 -1
  66. package/web/app/immutable/chunks/{DsHgoHUF.js → CEKKTkcw.js} +1 -1
  67. package/web/app/immutable/chunks/{CpoXGd1l.js → CFWaKBsU.js} +1 -1
  68. package/web/app/immutable/chunks/{nvxwf4ON.js → CH9FyXIs.js} +1 -1
  69. package/web/app/immutable/chunks/{A4XkqMhx.js → CKKymoqy.js} +2 -2
  70. package/web/app/immutable/chunks/{D4mPaBv_.js → CNZrw80e.js} +1 -1
  71. package/web/app/immutable/chunks/{CI2vptqu.js → CNe7_Zim.js} +1 -1
  72. package/web/app/immutable/chunks/{UeBI2etB.js → CNrfoUaS.js} +1 -1
  73. package/web/app/immutable/chunks/{BQtqWlTh.js → CO44rX6y.js} +1 -1
  74. package/web/app/immutable/chunks/{vEO0YrEb.js → CPlNvpU2.js} +1 -1
  75. package/web/app/immutable/chunks/{D4bEOXCz.js → CQ2o3hEg.js} +1 -1
  76. package/web/app/immutable/chunks/{CKt2_xHZ.js → CRR1-abH.js} +1 -1
  77. package/web/app/immutable/chunks/{BILkcOal.js → CRpqpU9i.js} +1 -1
  78. package/web/app/immutable/chunks/{CRcvhCKH.js → CThN_Nux.js} +1 -1
  79. package/web/app/immutable/chunks/{JQvt9PlE.js → CUZik8MY.js} +1 -1
  80. package/web/app/immutable/chunks/{BDoT1t-p.js → CUvkIDMd.js} +1 -1
  81. package/web/app/immutable/chunks/{BIbYnTWt.js → CV4TfELY.js} +1 -1
  82. package/web/app/immutable/chunks/{DVo_qBAn.js → CVbWY19o.js} +1 -1
  83. package/web/app/immutable/chunks/{DqBMLWU7.js → CVsyQSuR.js} +1 -1
  84. package/web/app/immutable/chunks/{Dx178k_p.js → CZFEnK7L.js} +1 -1
  85. package/web/app/immutable/chunks/{CVoU6PUX.js → CaXb-0G5.js} +1 -1
  86. package/web/app/immutable/chunks/{UEagjF1v.js → Cbq2nPyy.js} +1 -1
  87. package/web/app/immutable/chunks/{DfV-BwK_.js → Cdh5YKSf.js} +1 -1
  88. package/web/app/immutable/chunks/{DT0VuQYh.js → Cdro-GoI.js} +1 -1
  89. package/web/app/immutable/chunks/{CK0ufYxF.js → CfKkOn3Z.js} +1 -1
  90. package/web/app/immutable/chunks/{0f-s2juB.js → ChPWwTDQ.js} +1 -1
  91. package/web/app/immutable/chunks/{TYA52UmK.js → ChY430zO.js} +1 -1
  92. package/web/app/immutable/chunks/{7HlTiSuy.js → CkH1GUS-.js} +1 -1
  93. package/web/app/immutable/chunks/{Dk8G7cWG.js → Ck_IcW3b.js} +1 -1
  94. package/web/app/immutable/chunks/{BBh1sUFa.js → Cm0fpyvx.js} +1 -1
  95. package/web/app/immutable/chunks/{1NwaCzDM.js → CmoN_TBo.js} +1 -1
  96. package/web/app/immutable/chunks/{BfznpdOe.js → CqAhHv8R.js} +1 -1
  97. package/web/app/immutable/chunks/{Daox7oGL.js → Crqv6_Qw.js} +1 -1
  98. package/web/app/immutable/chunks/{BhDscTzk.js → CsDWwr46.js} +1 -1
  99. package/web/app/immutable/chunks/{CZjKZKfa.js → Csf9C1Gi.js} +1 -1
  100. package/web/app/immutable/chunks/{D0PA_nH7.js → CtUWJPuQ.js} +1 -1
  101. package/web/app/immutable/chunks/{eo951CKY.js → CtVWxtuL.js} +1 -1
  102. package/web/app/immutable/chunks/{DP3PzV04.js → CuS63k_X.js} +1 -1
  103. package/web/app/immutable/chunks/{Bct-Hddg.js → Cw7D1o52.js} +1 -1
  104. package/web/app/immutable/chunks/{D4eQ7sOE.js → CwnQ-Cai.js} +1 -1
  105. package/web/app/immutable/chunks/{EsMfrwLq.js → Cydmwi9G.js} +2 -2
  106. package/web/app/immutable/chunks/{BdI6Ug1p.js → D1G_x58n.js} +1 -1
  107. package/web/app/immutable/chunks/{BFSad-yQ.js → D1nqIQGn.js} +1 -1
  108. package/web/app/immutable/chunks/{BH2o-WfJ.js → DCj4RtfU.js} +1 -1
  109. package/web/app/immutable/chunks/{CWwUPJCZ.js → DDfuADvu.js} +1 -1
  110. package/web/app/immutable/chunks/{Stf6v5E4.js → DEWWczTo.js} +1 -1
  111. package/web/app/immutable/chunks/{CAhEBid_.js → DF1PAOvq.js} +1 -1
  112. package/web/app/immutable/chunks/{BVXSC6-x.js → DFLHL1-R.js} +1 -1
  113. package/web/app/immutable/chunks/{_9I4ps54.js → DFSszeZt.js} +1 -1
  114. package/web/app/immutable/chunks/{DW0ajEwO.js → DG2lnbYM.js} +1 -1
  115. package/web/app/immutable/chunks/{Bhjdd-i5.js → DGdd6uAe.js} +1 -1
  116. package/web/app/immutable/chunks/{D5XOfqg3.js → DHnu3R8W.js} +1 -1
  117. package/web/app/immutable/chunks/{OmIIAf5Z.js → DHxfVjMA.js} +1 -1
  118. package/web/app/immutable/chunks/{BLfu6vv0.js → DIpVdU4q.js} +1 -1
  119. package/web/app/immutable/chunks/{Blfa2zB3.js → DIx1ja7a.js} +1 -1
  120. package/web/app/immutable/chunks/{DsLNpgNd.js → DMYii2XW.js} +1 -1
  121. package/web/app/immutable/chunks/{DjgUwB1-.js → DQcBws1v.js} +1 -1
  122. package/web/app/immutable/chunks/{BarmoK9n.js → DR5N6gxc.js} +1 -1
  123. package/web/app/immutable/chunks/{B3l27U-X.js → DTb6DltY.js} +1 -1
  124. package/web/app/immutable/chunks/{PoQyYVPo.js → DWeK6bEj.js} +1 -1
  125. package/web/app/immutable/chunks/{Dtc6gYfR.js → DZOobfUN.js} +4 -4
  126. package/web/app/immutable/chunks/{DzcYojla.js → D_q___oT.js} +1 -1
  127. package/web/app/immutable/chunks/{B7VDtTYH.js → D_r-L7lJ.js} +1 -1
  128. package/web/app/immutable/chunks/{CwVfhwcK.js → Db4RIna0.js} +1 -1
  129. package/web/app/immutable/chunks/{bLmMh6bM.js → DbmW02Ql.js} +1 -1
  130. package/web/app/immutable/chunks/{BqYhHrt6.js → DeS52M4Z.js} +1 -1
  131. package/web/app/immutable/chunks/{_xXc1YI4.js → DfZPm6Cc.js} +1 -1
  132. package/web/app/immutable/chunks/{Lr-JMIRR.js → Dk4lt7dn.js} +1 -1
  133. package/web/app/immutable/chunks/{dfYnXgxY.js → DkjTJRm4.js} +1 -1
  134. package/web/app/immutable/chunks/{Eecaa39u.js → Dnvm7hnM.js} +1 -1
  135. package/web/app/immutable/chunks/{BJl8RzPn.js → DoSHDPDx.js} +1 -1
  136. package/web/app/immutable/chunks/{B2YBz8zb.js → DpWsILta.js} +1 -1
  137. package/web/app/immutable/chunks/{BPC4OG-3.js → DtGFNbs1.js} +1 -1
  138. package/web/app/immutable/chunks/{BzEWj2WD.js → DxLAMi4N.js} +1 -1
  139. package/web/app/immutable/chunks/{y0vuEHBW.js → DxSLZdpF.js} +1 -1
  140. package/web/app/immutable/chunks/{CZRzMSeY.js → DxYCvGDj.js} +1 -1
  141. package/web/app/immutable/chunks/{Ja3bldkE.js → Dy9lh-cY.js} +1 -1
  142. package/web/app/immutable/chunks/{CDo7dFSH.js → EDmIYO6S.js} +1 -1
  143. package/web/app/immutable/chunks/{BFiZAKJn.js → FSSmi15Q.js} +1 -1
  144. package/web/app/immutable/chunks/{By1eSTdA.js → G8TJ9MOE.js} +1 -1
  145. package/web/app/immutable/chunks/{SqQyW4o7.js → H09Jvm6V.js} +1 -1
  146. package/web/app/immutable/chunks/{C7jGB600.js → JIx3RnHA.js} +1 -1
  147. package/web/app/immutable/chunks/{Blk7tjn1.js → Jhq7UOc5.js} +1 -1
  148. package/web/app/immutable/chunks/{QxpEtr-0.js → LJC2uYsC.js} +1 -1
  149. package/web/app/immutable/chunks/{CdPAl73_.js → MO7fSgv5.js} +2 -2
  150. package/web/app/immutable/chunks/{gIpDBOS9.js → OYOqRbsv.js} +1 -1
  151. package/web/app/immutable/chunks/{LZgSqmId.js → PoUwsq35.js} +1 -1
  152. package/web/app/immutable/chunks/{f5JdW6NK.js → R2--7i5r.js} +1 -1
  153. package/web/app/immutable/chunks/{DZLBni6e.js → TTIE1D5C.js} +2 -2
  154. package/web/app/immutable/chunks/{DWNVbS3a.js → ThJR_x1o.js} +1 -1
  155. package/web/app/immutable/chunks/{CyFUY7ZG.js → W0ohOtfo.js} +6 -6
  156. package/web/app/immutable/chunks/{DqYjhr_m.js → Xi73byIt.js} +1 -1
  157. package/web/app/immutable/chunks/{CAXCWldY.js → XlZsLmeM.js} +1 -1
  158. package/web/app/immutable/chunks/{B-wj3-Mz.js → Y-eFgNqI.js} +1 -1
  159. package/web/app/immutable/chunks/{C47vcpT8.js → Y01ro7ES.js} +1 -1
  160. package/web/app/immutable/chunks/{CnD0melM.js → Y1jmSFSg.js} +1 -1
  161. package/web/app/immutable/chunks/{DWoDOofe.js → ZPXpXn_b.js} +1 -1
  162. package/web/app/immutable/chunks/{BhZTnaMG.js → _NsXb4lS.js} +1 -1
  163. package/web/app/immutable/chunks/{0PTcTNoV.js → _hl98vj7.js} +4 -4
  164. package/web/app/immutable/chunks/{wuvUPZj1.js → _lJQyckC.js} +1 -1
  165. package/web/app/immutable/chunks/{BZdmxgfA.js → _vHEK4pi.js} +1 -1
  166. package/web/app/immutable/chunks/{JQsOAZ2D.js → bCZfKo5Z.js} +1 -1
  167. package/web/app/immutable/chunks/{EN56DypO.js → blrmT9qk.js} +1 -1
  168. package/web/app/immutable/chunks/{CHzxYGKx.js → cKydO3Qt.js} +1 -1
  169. package/web/app/immutable/chunks/{DetRbVYW.js → f5CcdTME.js} +1 -1
  170. package/web/app/immutable/chunks/{Dsrqhllc.js → g5u8EvTY.js} +1 -1
  171. package/web/app/immutable/chunks/{CAoF09oh.js → gguJR3ZT.js} +1 -1
  172. package/web/app/immutable/chunks/{BTPnfq6G.js → gkKZi5M2.js} +4 -4
  173. package/web/app/immutable/chunks/{qZ45weJD.js → kPHoAXfY.js} +1 -1
  174. package/web/app/immutable/chunks/{D7UZpnOG.js → lPZVVuHr.js} +2 -2
  175. package/web/app/immutable/chunks/{BlT5sNXk.js → nP3fRh39.js} +1 -1
  176. package/web/app/immutable/chunks/{84RVXrc3.js → oXZkHUcr.js} +1 -1
  177. package/web/app/immutable/chunks/{DQDUYfZ6.js → oXwqURr6.js} +1 -1
  178. package/web/app/immutable/chunks/{Cc8kWaj8.js → pxqNib4M.js} +1 -1
  179. package/web/app/immutable/chunks/{D1JUN6U7.js → sd3yFV0R.js} +1 -1
  180. package/web/app/immutable/chunks/{C5SmzBE8.js → tMLeM1p2.js} +1 -1
  181. package/web/app/immutable/chunks/{BQmNzaH0.js → vtfPHlCB.js} +6 -6
  182. package/web/app/immutable/chunks/{CGF8Eu2l.js → x7O2J7jj.js} +1 -1
  183. package/web/app/immutable/chunks/{cXLTBTLb.js → xTHNWGAw.js} +1 -1
  184. package/web/app/immutable/entry/{app.BCJgs5XI.js → app.DaY9zxK3.js} +2 -2
  185. package/web/app/immutable/entry/start.CWppNCPI.js +1 -0
  186. package/web/app/immutable/nodes/{0.a1vA_dPS.js → 0.C8YnQkTZ.js} +1 -1
  187. package/web/app/immutable/nodes/{1.BCIzPBLS.js → 1.sAE7iwU1.js} +1 -1
  188. package/web/app/immutable/nodes/{10.CitPgiJ3.js → 10.DNzXLFkx.js} +1 -1
  189. package/web/app/immutable/nodes/{14.CdTQyTvv.js → 14.YTlK2SeN.js} +1 -1
  190. package/web/app/immutable/nodes/{16.AZfVvgqP.js → 16.C62UErj3.js} +2 -2
  191. package/web/app/immutable/nodes/{2.Dhrl5ptg.js → 2.BIYjc8j-.js} +3 -3
  192. package/web/app/immutable/nodes/{3.CsMeo6Xv.js → 3.C0pjKeNY.js} +1 -1
  193. package/web/app/immutable/nodes/{4.CQ8xrx-T.js → 4._EbXXqeH.js} +1 -1
  194. package/web/app/immutable/nodes/{5.BfoV9rHK.js → 5.qY7J8QM6.js} +1 -1
  195. package/web/app/immutable/nodes/{6.Df7ucNiy.js → 6.yeh_1zWo.js} +1 -1
  196. package/web/app/immutable/nodes/{7.DONDdlQd.js → 7.Dmqj3KiQ.js} +1 -1
  197. package/web/app/immutable/nodes/{8.CgHGNiu0.js → 8.h0hqyIXC.js} +2 -2
  198. package/web/app/immutable/nodes/{9.DZvK1vth.js → 9.BBHFrPvY.js} +1 -1
  199. package/web/app/version.json +1 -1
  200. package/web/index.html +9 -9
  201. package/web/app/immutable/chunks/w47UAFdd.js +0 -1
  202. package/web/app/immutable/entry/start.D2p6xEVd.js +0 -1
@@ -1 +1 @@
1
- import{t as bt,bq as x,by as wt,bs as Rt,b as It,bu as g}from"./CiieX7lJ.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as V,bV as M,aA as F}from"./B8o4lNgr.js";import{b as vt}from"./D2g8BuR1.js";import{G2 as l,ei as Ut,ej as At,q$ as Bt,mU as xt,mV as Ft,Gz as Gt,GN as Tt,GE as Wt,mZ as G}from"./DScTb8GR.js";import{aU as _t}from"./Dtc6gYfR.js";import{g as Dt}from"./CoSk1zgY.js";import{dj as Lt,bx as Et,bz as Vt,bw as Mt,bB as Nt,cW as zt,e as Ht}from"./D8P_sRVN.js";import{C as qt}from"./nSL7q58f.js";import{V as jt}from"./CAsMvdwB.js";import{bC as Xt,bA as Zt,aX as Jt}from"./LZgSqmId.js";import{i as T,n as N}from"./H2jLkRRS.js";import{ah as Kt}from"./nFRRHcr0.js";function Ot(W,$){if(new.target)return bt({component:Ot,...W});Pt($,!0);const z=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),H=()=>g(nt,"$ftCommits$",c),q=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),j=()=>g(tt,"$foldUnchanged",c),X=()=>g(Y,"$lineWrapping",c),Z=()=>g(et,"$diffSideBySide",c),J=()=>g(rt,"$ftLoading$",c),K=()=>g(it,"$ftBoundarySha$",c),[c,O]=Rt(),Q=o=>{jt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{V(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return j()},onToggleFold:()=>l.dispatch(Wt()),get wrapEnabled(){return X()},onToggleWrap:()=>l.dispatch(Tt()),get splitEnabled(){return Z()},onToggleSplit:()=>l.dispatch(Gt())})},Y=Xt(),tt=Zt(),et=Jt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const _=Dt(),h=_t(()=>m()),ot=Lt(h);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=Kt(h),b=s(()=>z().find(o=>o.id===t(n))),p=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(p)),st=Et(h),nt=Vt(h),it=Mt(h),rt=Nt(h),dt=s(()=>H()||[]),lt=zt(h),f=s(()=>q()[t(n)]??Ht),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const ht=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&T(a)?a:`${t(p)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&T(a)?a:`${t(p)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&T(r)?r:`${t(p)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(p))return o;const i=N(o),e=N(t(p));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function D(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function L(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function pt(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!_||!C()||_.registerActions({display:Q})});const E=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,E)),()=>l.dispatch(Ft(o,E))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):J()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:K()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void D([d])),B=s(()=>t(n)?void 0:d=>void L([d])),Ct=s(()=>t(n)?void 0:d=>void pt([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");D(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");L(d.map(u=>u.relativePath||u.file))});vt(qt(W,{get isLoading(){return t(o)},get changes(){return t(ht)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>V(R,d,!0),()=>t(R))}var $t=kt(ft);return O(),$t}export{Ot as default};
1
+ import{t as bt,bq as x,by as wt,bs as Rt,b as It,bu as g}from"./CiieX7lJ.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as V,bV as M,aA as F}from"./B8o4lNgr.js";import{b as vt}from"./D2g8BuR1.js";import{G2 as l,ei as Ut,ej as At,q$ as Bt,mU as xt,mV as Ft,Gz as Gt,GN as Tt,GE as Wt,mZ as G}from"./DScTb8GR.js";import{aU as _t}from"./DZOobfUN.js";import{g as Dt}from"./CoSk1zgY.js";import{dj as Lt,bx as Et,bz as Vt,bw as Mt,bB as Nt,cW as zt,e as Ht}from"./D8P_sRVN.js";import{C as qt}from"./BNboIXBF.js";import{V as jt}from"./CAsMvdwB.js";import{bC as Xt,bA as Zt,aX as Jt}from"./PoUwsq35.js";import{i as T,n as N}from"./H2jLkRRS.js";import{ah as Kt}from"./BqDXJV4b.js";function Ot(W,$){if(new.target)return bt({component:Ot,...W});Pt($,!0);const z=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),H=()=>g(nt,"$ftCommits$",c),q=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),j=()=>g(tt,"$foldUnchanged",c),X=()=>g(Y,"$lineWrapping",c),Z=()=>g(et,"$diffSideBySide",c),J=()=>g(rt,"$ftLoading$",c),K=()=>g(it,"$ftBoundarySha$",c),[c,O]=Rt(),Q=o=>{jt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{V(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return j()},onToggleFold:()=>l.dispatch(Wt()),get wrapEnabled(){return X()},onToggleWrap:()=>l.dispatch(Tt()),get splitEnabled(){return Z()},onToggleSplit:()=>l.dispatch(Gt())})},Y=Xt(),tt=Zt(),et=Jt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const _=Dt(),h=_t(()=>m()),ot=Lt(h);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=Kt(h),b=s(()=>z().find(o=>o.id===t(n))),p=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(p)),st=Et(h),nt=Vt(h),it=Mt(h),rt=Nt(h),dt=s(()=>H()||[]),lt=zt(h),f=s(()=>q()[t(n)]??Ht),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const ht=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&T(a)?a:`${t(p)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&T(a)?a:`${t(p)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&T(r)?r:`${t(p)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(p))return o;const i=N(o),e=N(t(p));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function D(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function L(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function pt(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!_||!C()||_.registerActions({display:Q})});const E=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,E)),()=>l.dispatch(Ft(o,E))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):J()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:K()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void D([d])),B=s(()=>t(n)?void 0:d=>void L([d])),Ct=s(()=>t(n)?void 0:d=>void pt([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");D(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");L(d.map(u=>u.relativePath||u.file))});vt(qt(W,{get isLoading(){return t(o)},get changes(){return t(ht)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>V(R,d,!0),()=>t(R))}var $t=kt(ft);return O(),$t}export{Ot as default};
@@ -1 +1 @@
1
- import{t as Qe,bq as h,a_ as D,by as Ye,b as Ze,bs as ot,bo as k,bu as je}from"./CiieX7lJ.js";import{bo as nt,bs as $e,a7 as J,ay as y,aD as e,bS as L,W as c,a5 as Ie,bA as Pe,bH as z,bl as _e,b_ as oe,bO as de,bn as et,bf as ze,bV as Me,aA as v,c9 as w,aB as X,be as st,b$ as it,bj as lt,cd as dt,ca as Ue,bk as ct}from"./B8o4lNgr.js";import{i as G}from"./CnfhTYg8.js";import{G2 as Ve,lQ as ut,sO as pt}from"./DScTb8GR.js";import{aO as ft}from"./Djp3xwow.js";import{cj as ht}from"./D8P_sRVN.js";import{c as vt}from"./ChTqQfQN.js";import{i as Je,t as Le}from"./H2jLkRRS.js";import{v as gt}from"./BkR4V1cF.js";import{d as _t}from"./B0Z-1lwJ.js";import{F as Se,at as mt,au as bt,cJ as Xe,aU as He,bb as kt,al as wt,ak as yt,cG as qe}from"./Cu4EVTck.js";import{n as K,w as At}from"./Bn-T0dS6.js";import{h as Ft,s as Re,a as Ne,k as Te,d as Wt}from"./cHkD9nAc.js";import{s as xt}from"./DFiy7ajR.js";import{f as Ct,ai as It,aW as Pt}from"./MvsKYcnI.js";import"./Ck1S-wvb.js";import{c as Q}from"./BYsuIPWO.js";import{a as Dt,r as Mt}from"./CRcvhCKH.js";import{M as Ot,t as Be}from"./CBlUgvul.js";import{o as Ge,r as Et,q as St,R as Rt,p as Nt,n as Tt,j as Bt,l as jt}from"./CP_wqUC5.js";var zt=X('<img alt="" class="size-4"/>'),Ut=X('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Vt=X("<span> </span>"),Jt=X('<span data-menu-action-detail=""> </span>'),Lt=X('<span aria-hidden="true"><!></span>'),Ke=X("<!> <!> <!>",1),Xt=X('<div class="my-1 h-px bg-border" role="separator"></div>'),De=X("<!> <!>",1),Ht=X('<!> <p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>',1),qt=X('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Gt=X('<p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>'),Kt=X('<div class="pl-4"><!> <!></div>'),Qt=X('<span class="sr-only"> </span>');function me(be,d){const ke=nt();if(new.target)return Qe({component:me,...be});$e(d,!0);const xe=(p,r=ze)=>{var O=J(),E=y(O);{var U=W=>{const C=w(()=>Dt(r().editor));var V=J(),m=y(V);{var f=s=>{var i=zt();oe(()=>Re(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=J(),b=y(i);Q(b,()=>e(C),(N,ae)=>{ae(N,{size:16})}),c(s,i)},R=s=>{{let i=w(()=>Mt(r().editor.category));Se(s,{get icon(){return e(i)},size:16})}};D(m,s=>{r().editor.iconBase64?s(f):e(C)?s(o,1):s(R,-1)})}c(W,V)},S=W=>{var C=J(),V=y(C);xt(V,()=>r().iconSnippet),c(W,C)},q=W=>{{let C=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Se(W,{get icon(){return r().icon},get weight(){return H()},size:16,get class(){return e(C)}})}};D(E,W=>{r().editor?W(U):r().iconSnippet?W(S,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=ze)=>{var O=Ke(),E=y(O);{var U=m=>{var f=Ut(),o=Ie(f),R=_e(o,!0);Ne(o,(b,N)=>Be?.(b,N),()=>r().label);var s=L(o,2),i=_e(s,!0);Pe(f),oe(()=>{de(R,r().label),de(i,r().disabledReason)}),c(m,f)},S=m=>{var f=Vt(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().label),oe(()=>{Te(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};D(E,m=>{r().disabledReason?m(U):m(S,-1)})}var q=L(E,2);{var W=m=>{var f=Jt(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().detail),oe(()=>{Te(f,1,`ml-4 min-w-0 truncate ${r().detailTone==="danger"?"text-danger":"text-muted-foreground"}`),de(o,r().detail)}),c(m,f)};D(q,m=>{r().detail&&m(W)})}var C=L(q,2);{var V=m=>{var f=Lt(),o=Ie(f);It(o,{children:(R,s)=>{st();var i=it();oe(b=>de(i,b),[()=>Pt(r().shortcut)]),c(R,i)},$$slots:{default:!0}}),Pe(f),oe(()=>Te(f,1,Wt(M()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};D(C,m=>{r().shortcut&&m(V)})}c(p,O)};let we=h(d,"actions",7),M=h(d,"menu",7),H=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Me(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return M()},set menu(p){M(p),v()},get iconWeight(){return H()},set iconWeight(p){H(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ye,$on:(p,r)=>Ze(d,p,r)},se=J(),ie=y(se);return Ft(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{xe(i,()=>e(r))},E=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),U=w(()=>e(r).disabled||e(r).disabledReason!==void 0),S=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Ke(),W=y(q);{var C=i=>{var b=J(),N=y(b);{var ae=a=>{var n=J(),g=y(n);Q(g,()=>Ge,(x,P)=>{P(x,{})}),c(a,n)},ue=a=>{var n=Xt();c(a,n)};D(N,a=>{M()?a(ae):a(ue,-1)})}c(i,b)};D(W,i=>{e(r).dividerBefore&&i(C)})}var V=L(W,2);{var m=i=>{var b=J(),N=y(b);{var ae=g=>{var x=J(),P=y(x);Q(P,()=>Nt,(I,T)=>{T(I,{children:(B,Z)=>{var $=De(),pe=y($);{let te=w(()=>e(E)?O:void 0);Q(pe,()=>Et,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=L(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=De(),l=y(t);{var _=re=>{var Ae=De(),Fe=y(Ae);{let We=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Rt,(ge,Ee)=>{Ee(ge,{get value(){return e(We)},get"aria-label"(){return e(r).label},children:(tt,Zt)=>{{let rt=w(()=>e(r).submenu.filter(at=>at.checked!==void 0));me(tt,{get actions(){return e(rt)},selection:"single",get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var Ce=L(Fe,2);{let We=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(Ce,{get actions(){return e(We)},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})}c(re,Ae)},j=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})};D(l,re=>{e(r).selection==="single"?re(_):re(j,-1)})}var le=L(l,2);{var Oe=re=>{var Ae=Ht(),Fe=y(Ae);Q(Fe,()=>Ge,(ge,Ee)=>{Ee(ge,{})});var Ce=L(Fe,2),We=_e(Ce,!0);oe(()=>{Re(Ce,"id",`${ke}-${e(r).id}-note`),de(We,e(r).note)}),c(re,Ae)};D(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,x)},ue=g=>{var x=J(),P=y(x);{let I=w(()=>e(E)?O:void 0);Q(P,()=>Tt,(T,B)=>{B(T,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},a=g=>{var x=J(),P=y(x);{let I=w(()=>e(E)?O:void 0);Q(P,()=>Bt,(T,B)=>{B(T,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},n=g=>{var x=J(),P=y(x);{let I=w(()=>e(E)?O:void 0),T=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(T)},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,x)};D(N,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})},o=i=>{var b=De(),N=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);Ct(N,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?z(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,x)=>{var P=qt(),I=y(P),T=Ie(I);xe(T,()=>e(r)),Pe(I);var B=L(I,2);ne(B,()=>e(r));var Z=L(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?mt:bt);Se(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=J(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};D(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=L(N,2);{var ue=a=>{var n=Kt(),g=Ie(n);me(g,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}});var x=L(g,2);{var P=I=>{var T=Gt(),B=_e(T,!0);oe(()=>de(B,e(r).note)),c(I,T)};D(x,I=>{e(r).note&&I(P)})}Pe(n),c(a,n)};D(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};D(V,i=>{M()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var R=L(V,2);{var s=i=>{var b=Qt(),N=_e(b,!0);oe(()=>{Re(b,"id",e(S)),de(N,e(r).disabledReason)}),c(i,b)};D(R,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),et(ce)}function Yt(be,d){if(new.target)return Qe({component:Yt,...be});$e(d,!0);const ke=()=>je(N,"$installedEditors$",ne),xe=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=ot();let M=h(d,"layout",7,"list"),H=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),E=h(d,"showPathCopy",7,!0),U=h(d,"showFileNameCopy",7,!1),S=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),C=h(d,"isWorkspaceRoot",7,!1),V=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=vt("WorkspaceActionsMenu");let R=!1;lt(()=>{R=!0});function s(){R||p()?.()}const i=gt("externalEditors"),b=dt(A());Ue(()=>{b.set(A())});const N=ft(b),ae=w(ke),ue=ht(b);let a=Me(""),n=Me(""),g=Me(!1);ct(()=>{Ve.dispatch(ut())}),Ue(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,j=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(j){const le=j.replace(/\\/g,"/");C()?z(a,le,!0):Je(u())?z(a,u().replace(/\\/g,"/"),!0):z(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),z(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:j,resolvedPath:e(a)})}else z(a,u()),z(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else z(a,u()),z(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{z(a,u()),z(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(z(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function x(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!C()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Ve.dispatch(pt(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function T(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await x();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(Le(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Je(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Le(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){z(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const j=await G("file:delete",{path:l,workspaceId:A()});if(j?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),At({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),_t("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:j?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{z(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];S()&&(i&&xe()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Xe,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{T(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Xe,onClick:()=>{B()}}]}),E()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:He,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),E()&&!C()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:He,disabled:!u(),onClick:()=>{$()}}),U()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(j=>({...j,submenu:j.submenu?l(j.submenu):void 0,onClick:()=>{j.onClick(),s()}}));return t.push(...l(V())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?wt:yt,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:qe,variant:"destructive",dividerBefore:t.length>0,onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:qe,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return M()},set layout(t="list"){M(t),v()},get iconWeight(){return H()},set iconWeight(t){H(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return E()},set showPathCopy(t=!0){E(t),v()},get showFileNameCopy(){return U()},set showFileNameCopy(t=!1){U(t),v()},get showFileActions(){return S()},set showFileActions(t=!0){S(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return C()},set isWorkspaceRoot(t=!1){C(t),v()},get additionalActions(){return V()},set additionalActions(t=[]){V(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ye,$on:(t,l)=>Ze(d,t,l)};{let t=w(()=>M()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return H()}})}var ye=et(ve);return we(),ye}export{Yt as default};
1
+ import{t as Qe,bq as h,a_ as D,by as Ye,b as Ze,bs as ot,bo as k,bu as je}from"./CiieX7lJ.js";import{bo as nt,bs as $e,a7 as J,ay as y,aD as e,bS as L,W as c,a5 as Ie,bA as Pe,bH as z,bl as _e,b_ as oe,bO as de,bn as et,bf as ze,bV as Me,aA as v,c9 as w,aB as X,be as st,b$ as it,bj as lt,cd as dt,ca as Ue,bk as ct}from"./B8o4lNgr.js";import{i as G}from"./CnfhTYg8.js";import{G2 as Ve,lQ as ut,sO as pt}from"./DScTb8GR.js";import{aO as ft}from"./BFe-YAfF.js";import{cj as ht}from"./D8P_sRVN.js";import{c as vt}from"./ChTqQfQN.js";import{i as Je,t as Le}from"./H2jLkRRS.js";import{v as gt}from"./BkR4V1cF.js";import{d as _t}from"./B0Z-1lwJ.js";import{F as Se,at as mt,au as bt,cJ as Xe,aU as He,bb as kt,al as wt,ak as yt,cG as qe}from"./Cu4EVTck.js";import{n as K,w as At}from"./Bn-T0dS6.js";import{h as Ft,s as Re,a as Ne,k as Te,d as Wt}from"./cHkD9nAc.js";import{s as xt}from"./DFiy7ajR.js";import{f as Ct,ai as It,aW as Pt}from"./MvsKYcnI.js";import"./Ck1S-wvb.js";import{c as Q}from"./BYsuIPWO.js";import{a as Dt,r as Mt}from"./CThN_Nux.js";import{M as Ot,t as Be}from"./CBlUgvul.js";import{o as Ge,r as Et,q as St,R as Rt,p as Nt,n as Tt,j as Bt,l as jt}from"./CP_wqUC5.js";var zt=X('<img alt="" class="size-4"/>'),Ut=X('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Vt=X("<span> </span>"),Jt=X('<span data-menu-action-detail=""> </span>'),Lt=X('<span aria-hidden="true"><!></span>'),Ke=X("<!> <!> <!>",1),Xt=X('<div class="my-1 h-px bg-border" role="separator"></div>'),De=X("<!> <!>",1),Ht=X('<!> <p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>',1),qt=X('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Gt=X('<p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>'),Kt=X('<div class="pl-4"><!> <!></div>'),Qt=X('<span class="sr-only"> </span>');function me(be,d){const ke=nt();if(new.target)return Qe({component:me,...be});$e(d,!0);const xe=(p,r=ze)=>{var O=J(),E=y(O);{var U=W=>{const C=w(()=>Dt(r().editor));var V=J(),m=y(V);{var f=s=>{var i=zt();oe(()=>Re(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=J(),b=y(i);Q(b,()=>e(C),(N,ae)=>{ae(N,{size:16})}),c(s,i)},R=s=>{{let i=w(()=>Mt(r().editor.category));Se(s,{get icon(){return e(i)},size:16})}};D(m,s=>{r().editor.iconBase64?s(f):e(C)?s(o,1):s(R,-1)})}c(W,V)},S=W=>{var C=J(),V=y(C);xt(V,()=>r().iconSnippet),c(W,C)},q=W=>{{let C=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Se(W,{get icon(){return r().icon},get weight(){return H()},size:16,get class(){return e(C)}})}};D(E,W=>{r().editor?W(U):r().iconSnippet?W(S,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=ze)=>{var O=Ke(),E=y(O);{var U=m=>{var f=Ut(),o=Ie(f),R=_e(o,!0);Ne(o,(b,N)=>Be?.(b,N),()=>r().label);var s=L(o,2),i=_e(s,!0);Pe(f),oe(()=>{de(R,r().label),de(i,r().disabledReason)}),c(m,f)},S=m=>{var f=Vt(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().label),oe(()=>{Te(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};D(E,m=>{r().disabledReason?m(U):m(S,-1)})}var q=L(E,2);{var W=m=>{var f=Jt(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().detail),oe(()=>{Te(f,1,`ml-4 min-w-0 truncate ${r().detailTone==="danger"?"text-danger":"text-muted-foreground"}`),de(o,r().detail)}),c(m,f)};D(q,m=>{r().detail&&m(W)})}var C=L(q,2);{var V=m=>{var f=Lt(),o=Ie(f);It(o,{children:(R,s)=>{st();var i=it();oe(b=>de(i,b),[()=>Pt(r().shortcut)]),c(R,i)},$$slots:{default:!0}}),Pe(f),oe(()=>Te(f,1,Wt(M()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};D(C,m=>{r().shortcut&&m(V)})}c(p,O)};let we=h(d,"actions",7),M=h(d,"menu",7),H=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Me(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return M()},set menu(p){M(p),v()},get iconWeight(){return H()},set iconWeight(p){H(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ye,$on:(p,r)=>Ze(d,p,r)},se=J(),ie=y(se);return Ft(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{xe(i,()=>e(r))},E=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),U=w(()=>e(r).disabled||e(r).disabledReason!==void 0),S=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Ke(),W=y(q);{var C=i=>{var b=J(),N=y(b);{var ae=a=>{var n=J(),g=y(n);Q(g,()=>Ge,(x,P)=>{P(x,{})}),c(a,n)},ue=a=>{var n=Xt();c(a,n)};D(N,a=>{M()?a(ae):a(ue,-1)})}c(i,b)};D(W,i=>{e(r).dividerBefore&&i(C)})}var V=L(W,2);{var m=i=>{var b=J(),N=y(b);{var ae=g=>{var x=J(),P=y(x);Q(P,()=>Nt,(I,T)=>{T(I,{children:(B,Z)=>{var $=De(),pe=y($);{let te=w(()=>e(E)?O:void 0);Q(pe,()=>Et,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=L(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=De(),l=y(t);{var _=re=>{var Ae=De(),Fe=y(Ae);{let We=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Rt,(ge,Ee)=>{Ee(ge,{get value(){return e(We)},get"aria-label"(){return e(r).label},children:(tt,Zt)=>{{let rt=w(()=>e(r).submenu.filter(at=>at.checked!==void 0));me(tt,{get actions(){return e(rt)},selection:"single",get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var Ce=L(Fe,2);{let We=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(Ce,{get actions(){return e(We)},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})}c(re,Ae)},j=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})};D(l,re=>{e(r).selection==="single"?re(_):re(j,-1)})}var le=L(l,2);{var Oe=re=>{var Ae=Ht(),Fe=y(Ae);Q(Fe,()=>Ge,(ge,Ee)=>{Ee(ge,{})});var Ce=L(Fe,2),We=_e(Ce,!0);oe(()=>{Re(Ce,"id",`${ke}-${e(r).id}-note`),de(We,e(r).note)}),c(re,Ae)};D(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,x)},ue=g=>{var x=J(),P=y(x);{let I=w(()=>e(E)?O:void 0);Q(P,()=>Tt,(T,B)=>{B(T,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},a=g=>{var x=J(),P=y(x);{let I=w(()=>e(E)?O:void 0);Q(P,()=>Bt,(T,B)=>{B(T,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},n=g=>{var x=J(),P=y(x);{let I=w(()=>e(E)?O:void 0),T=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(T)},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,x)};D(N,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}})},o=i=>{var b=De(),N=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);Ct(N,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(U)},get"aria-describedby"(){return e(S)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?z(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,x)=>{var P=qt(),I=y(P),T=Ie(I);xe(T,()=>e(r)),Pe(I);var B=L(I,2);ne(B,()=>e(r));var Z=L(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?mt:bt);Se(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=J(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};D(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=L(N,2);{var ue=a=>{var n=Kt(),g=Ie(n);me(g,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return H()},get onClose(){return u()}});var x=L(g,2);{var P=I=>{var T=Gt(),B=_e(T,!0);oe(()=>de(B,e(r).note)),c(I,T)};D(x,I=>{e(r).note&&I(P)})}Pe(n),c(a,n)};D(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};D(V,i=>{M()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var R=L(V,2);{var s=i=>{var b=Qt(),N=_e(b,!0);oe(()=>{Re(b,"id",e(S)),de(N,e(r).disabledReason)}),c(i,b)};D(R,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),et(ce)}function Yt(be,d){if(new.target)return Qe({component:Yt,...be});$e(d,!0);const ke=()=>je(N,"$installedEditors$",ne),xe=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=ot();let M=h(d,"layout",7,"list"),H=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),E=h(d,"showPathCopy",7,!0),U=h(d,"showFileNameCopy",7,!1),S=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),C=h(d,"isWorkspaceRoot",7,!1),V=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=vt("WorkspaceActionsMenu");let R=!1;lt(()=>{R=!0});function s(){R||p()?.()}const i=gt("externalEditors"),b=dt(A());Ue(()=>{b.set(A())});const N=ft(b),ae=w(ke),ue=ht(b);let a=Me(""),n=Me(""),g=Me(!1);ct(()=>{Ve.dispatch(ut())}),Ue(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,j=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(j){const le=j.replace(/\\/g,"/");C()?z(a,le,!0):Je(u())?z(a,u().replace(/\\/g,"/"),!0):z(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),z(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:j,resolvedPath:e(a)})}else z(a,u()),z(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else z(a,u()),z(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{z(a,u()),z(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(z(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function x(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!C()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Ve.dispatch(pt(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function T(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await x();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(Le(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Je(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Le(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){z(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const j=await G("file:delete",{path:l,workspaceId:A()});if(j?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),At({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),_t("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:j?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{z(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];S()&&(i&&xe()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Xe,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{T(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Xe,onClick:()=>{B()}}]}),E()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:He,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),E()&&!C()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:He,disabled:!u(),onClick:()=>{$()}}),U()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(j=>({...j,submenu:j.submenu?l(j.submenu):void 0,onClick:()=>{j.onClick(),s()}}));return t.push(...l(V())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?wt:yt,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:qe,variant:"destructive",dividerBefore:t.length>0,onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:qe,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return M()},set layout(t="list"){M(t),v()},get iconWeight(){return H()},set iconWeight(t){H(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return E()},set showPathCopy(t=!0){E(t),v()},get showFileNameCopy(){return U()},set showFileNameCopy(t=!1){U(t),v()},get showFileActions(){return S()},set showFileActions(t=!0){S(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return C()},set isWorkspaceRoot(t=!1){C(t),v()},get additionalActions(){return V()},set additionalActions(t=[]){V(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ye,$on:(t,l)=>Ze(d,t,l)};{let t=w(()=>M()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return H()}})}var ye=et(ve);return we(),ye}export{Yt as default};
@@ -1,4 +1,4 @@
1
- import{p as xt}from"./CWwUPJCZ.js";import{p as $t}from"./BIbYnTWt.js";import{aF as bt,K as Ct,O as wt,aI as vt,L as Dt,aG as kt,a as s,ad as X,aE as Tt,r as At,k as Bt,j as K,M as Q,y as St,U as ft}from"./BU-Qzzbf.js";import{g as F}from"./CyFUY7ZG.js";var mt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=mt(),Mt=s(()=>G.domains,"getDomains"),zt=s(()=>G.transitions,"getTransitions"),Lt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Pt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(X.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),It=s(()=>K({...St.cynefin,...Q().cynefin}),"getConfig"),Nt=s(()=>{Bt(),G=mt()},"clear"),Y={getDomains:Mt,getTransitions:zt,setDomains:Lt,setTransitions:Pt,getConfig:It,clear:Nt,setAccTitle:kt,getAccTitle:Dt,setDiagramTitle:vt,getDiagramTitle:wt,getAccDescription:Ct,setAccDescription:bt},Ft=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),Rt={parse:s(async t=>{const e=await $t("cynefin",t);X.debug(e),Ft(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}F(V,"seededRandom");s(V,"seededRandom");function Z(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}F(Z,"hashString");s(Z,"hashString");function J(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:Z(e)}F(J,"resolveSeed");s(J,"resolveSeed");function tt(t,e,n,a){const c=t/2,m=a??t*.015,v=7,R=e/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*17)*m*2-m;d.push({x:c+p,y:o*R})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*31+7),W=p.x+h,_=f,E=i.x-h;D+=` C${W},${_} ${E},${f} ${i.x},${i.y}`}return D}F(tt,"generateFoldPath");s(tt,"generateFoldPath");function et(t,e,n,a){const c=e/2,m=a??e*.015,v=7,R=t/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*23)*m*2-m;d.push({x:o*R,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*37+11),W=f,_=p.y+h,E=f,z=i.y-h;D+=` C${W},${_} ${E},${z} ${i.x},${i.y}`}return D}F(et,"generateHorizontalBoundary");s(et,"generateHorizontalBoundary");function nt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}F(nt,"generateCliffPath");s(nt,"generateCliffPath");function at(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}F(at,"generateConfusionPath");s(at,"generateConfusionPath");var dt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Wt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ft(),e=Q();return K(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),R=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();X.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,W=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Tt(e);At(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),H=Wt(i,f),ot=J(o.seed,e),pt=T.append("g").attr("class","cynefin-backgrounds"),j=["complex","complicated","chaotic","clear"];for(const l of j){const r=H[l];pt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const U=T.append("g").attr("class","cynefin-boundaries");U.append("path").attr("class","cynefinBoundary").attr("d",tt(i,f,ot,W)).attr("fill","none"),U.append("path").attr("class","cynefinBoundary").attr("d",et(i,f,ot+100,W)).attr("fill","none"),U.append("path").attr("class","cynefinCliff").attr("d",nt(i,f)).attr("fill","none");const yt=i*.15,ut=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",at(i/2,f/2,yt,ut)).attr("fill",z.confusion).attr("fill-opacity",.5);const rt=T.append("g").attr("class","cynefin-labels");for(const l of j){const r=H[l];rt.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(rt.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of j){const u=H[r],y=dt[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(dt.confusion.practice)}const st=T.append("g").attr("class","cynefin-items"),A=26,it=10,ht=["complex","complicated","chaotic","clear","confusion"];for(const l of ht){const r=m.get(l);if(!r||r.items.length===0)continue;const u=H[l],y=l==="confusion";let L=r.items,P=0;y&&r.items.length>q&&(P=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const x=h?22:14;B=u.cy+x}else B=u.cy+(h?25:15);if([...L].forEach((x,S)=>{const C=B+S*(A+4),M=st.append("g"),I=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(x.label);let $=x.label.length*7;const g=I.node();if(g&&typeof g.getBBox=="function"){const O=g.getBBox();O.width>0&&($=O.width)}const w=$+it*2,N=u.cx-w/2;M.attr("transform",`translate(${N}, ${C})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",w).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),I.attr("x",w/2).attr("y",A/2)}),P>0){const x=B+L.length*(A+4),S=`+${P} more`,C=st.append("g"),M=C.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let I=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const N=$.getBBox();N.width>0&&(I=N.width)}const g=I+it*2,w=u.cx-g/2;C.attr("transform",`translate(${w}, ${x})`),C.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",g).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",g/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=H[y.from],P=H[y.to];if(!L||!P)return;if(y.from===y.to){X.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,x=L.cy,S=P.cx,C=P.cy,M=(B+S)/2,I=(x+C)/2,$=S-B,g=C-x,w=Math.sqrt($*$+g*g),N=w*.15,O=-g/w,gt=$/w,ct=M+O*N,lt=I+gt*N;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${x} Q${ct},${lt} ${S},${C}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",ct).attr("y",lt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}R&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(R)},"draw"),Ht={draw:Et},Vt=s(()=>{const t=ft(),e=Q();return K(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
1
+ import{p as xt}from"./DDfuADvu.js";import{p as $t}from"./CV4TfELY.js";import{aF as bt,K as Ct,O as wt,aI as vt,L as Dt,aG as kt,a as s,ad as X,aE as Tt,r as At,k as Bt,j as K,M as Q,y as St,U as ft}from"./BZA0d6L5.js";import{g as F}from"./W0ohOtfo.js";var mt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=mt(),Mt=s(()=>G.domains,"getDomains"),zt=s(()=>G.transitions,"getTransitions"),Lt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Pt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(X.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),It=s(()=>K({...St.cynefin,...Q().cynefin}),"getConfig"),Nt=s(()=>{Bt(),G=mt()},"clear"),Y={getDomains:Mt,getTransitions:zt,setDomains:Lt,setTransitions:Pt,getConfig:It,clear:Nt,setAccTitle:kt,getAccTitle:Dt,setDiagramTitle:vt,getDiagramTitle:wt,getAccDescription:Ct,setAccDescription:bt},Ft=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),Rt={parse:s(async t=>{const e=await $t("cynefin",t);X.debug(e),Ft(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}F(V,"seededRandom");s(V,"seededRandom");function Z(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}F(Z,"hashString");s(Z,"hashString");function J(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:Z(e)}F(J,"resolveSeed");s(J,"resolveSeed");function tt(t,e,n,a){const c=t/2,m=a??t*.015,v=7,R=e/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*17)*m*2-m;d.push({x:c+p,y:o*R})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*31+7),W=p.x+h,_=f,E=i.x-h;D+=` C${W},${_} ${E},${f} ${i.x},${i.y}`}return D}F(tt,"generateFoldPath");s(tt,"generateFoldPath");function et(t,e,n,a){const c=e/2,m=a??e*.015,v=7,R=t/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*23)*m*2-m;d.push({x:o*R,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*37+11),W=f,_=p.y+h,E=f,z=i.y-h;D+=` C${W},${_} ${E},${z} ${i.x},${i.y}`}return D}F(et,"generateHorizontalBoundary");s(et,"generateHorizontalBoundary");function nt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}F(nt,"generateCliffPath");s(nt,"generateCliffPath");function at(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}F(at,"generateConfusionPath");s(at,"generateConfusionPath");var dt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Wt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ft(),e=Q();return K(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),R=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();X.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,W=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Tt(e);At(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),H=Wt(i,f),ot=J(o.seed,e),pt=T.append("g").attr("class","cynefin-backgrounds"),j=["complex","complicated","chaotic","clear"];for(const l of j){const r=H[l];pt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const U=T.append("g").attr("class","cynefin-boundaries");U.append("path").attr("class","cynefinBoundary").attr("d",tt(i,f,ot,W)).attr("fill","none"),U.append("path").attr("class","cynefinBoundary").attr("d",et(i,f,ot+100,W)).attr("fill","none"),U.append("path").attr("class","cynefinCliff").attr("d",nt(i,f)).attr("fill","none");const yt=i*.15,ut=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",at(i/2,f/2,yt,ut)).attr("fill",z.confusion).attr("fill-opacity",.5);const rt=T.append("g").attr("class","cynefin-labels");for(const l of j){const r=H[l];rt.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(rt.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of j){const u=H[r],y=dt[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(dt.confusion.practice)}const st=T.append("g").attr("class","cynefin-items"),A=26,it=10,ht=["complex","complicated","chaotic","clear","confusion"];for(const l of ht){const r=m.get(l);if(!r||r.items.length===0)continue;const u=H[l],y=l==="confusion";let L=r.items,P=0;y&&r.items.length>q&&(P=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const x=h?22:14;B=u.cy+x}else B=u.cy+(h?25:15);if([...L].forEach((x,S)=>{const C=B+S*(A+4),M=st.append("g"),I=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(x.label);let $=x.label.length*7;const g=I.node();if(g&&typeof g.getBBox=="function"){const O=g.getBBox();O.width>0&&($=O.width)}const w=$+it*2,N=u.cx-w/2;M.attr("transform",`translate(${N}, ${C})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",w).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),I.attr("x",w/2).attr("y",A/2)}),P>0){const x=B+L.length*(A+4),S=`+${P} more`,C=st.append("g"),M=C.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let I=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const N=$.getBBox();N.width>0&&(I=N.width)}const g=I+it*2,w=u.cx-g/2;C.attr("transform",`translate(${w}, ${x})`),C.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",g).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",g/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=H[y.from],P=H[y.to];if(!L||!P)return;if(y.from===y.to){X.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,x=L.cy,S=P.cx,C=P.cy,M=(B+S)/2,I=(x+C)/2,$=S-B,g=C-x,w=Math.sqrt($*$+g*g),N=w*.15,O=-g/w,gt=$/w,ct=M+O*N,lt=I+gt*N;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${x} Q${ct},${lt} ${S},${C}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",ct).attr("y",lt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}R&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(R)},"draw"),Ht={draw:Et},Vt=s(()=>{const t=ft(),e=Q();return K(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
2
2
  .cynefinDomain {
3
3
  stroke: none;
4
4
  }