@dylanpiercey/work 0.0.141 → 0.0.142
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.
- package/dist/index.mjs +17241 -11118
- package/dist/public/assets/{_DLzJNX7C.js → _0gdzfuwb.js} +1 -1
- package/dist/public/assets/_0gdzfuwb.js.br +0 -0
- package/dist/public/assets/_5AJ_AKid.js +1 -0
- package/dist/public/assets/_5AJ_AKid.js.br +0 -0
- package/dist/public/assets/_5cJqJSYA.js +1 -0
- package/dist/public/assets/_5cJqJSYA.js.br +0 -0
- package/dist/public/assets/_8hG8C_PZ.js +1 -0
- package/dist/public/assets/_B-zFviqb.js +1 -0
- package/dist/public/assets/_B2LkwyUu.js +1 -0
- package/dist/public/assets/_B2LkwyUu.js.br +0 -0
- package/dist/public/assets/{_TsHAzFfC.js → _B7sBnSVB.js} +1 -1
- package/dist/public/assets/_B7sBnSVB.js.br +0 -0
- package/dist/public/assets/_B7sulDMZ.js +1 -0
- package/dist/public/assets/_B7sulDMZ.js.br +0 -0
- package/dist/public/assets/_BAfg1_wL.js +1 -0
- package/dist/public/assets/_BAfg1_wL.js.br +0 -0
- package/dist/public/assets/{_BERiWLR2.js → _BCq3eWBs.js} +1 -1
- package/dist/public/assets/_BCq3eWBs.js.br +0 -0
- package/dist/public/assets/_BDvd4EZB.js +1 -0
- package/dist/public/assets/_BE-5_Vob.js +1 -0
- package/dist/public/assets/_BE-5_Vob.js.br +0 -0
- package/dist/public/assets/_BE-cBzrM.js +1 -0
- package/dist/public/assets/_BE-cBzrM.js.br +0 -0
- package/dist/public/assets/{_Da8gt_F52.js → _BI6nDtQe.js} +1 -1
- package/dist/public/assets/_BI6nDtQe.js.br +0 -0
- package/dist/public/assets/_BI8c6j8A.js +1 -0
- package/dist/public/assets/{_hN1-RJcA.js → _BIPSG49u.js} +1 -1
- package/dist/public/assets/_BJdnnx2G.js +1 -0
- package/dist/public/assets/_BKISLRf4.js +83 -0
- package/dist/public/assets/_BKISLRf4.js.br +0 -0
- package/dist/public/assets/{_DgCQT80U.js → _BKkKlZgz.js} +1 -1
- package/dist/public/assets/_BKkKlZgz.js.br +0 -0
- package/dist/public/assets/{_DvHOWoGF.js → _BLsa44WM.js} +1 -1
- package/dist/public/assets/_BLsa44WM.js.br +0 -0
- package/dist/public/assets/_BMLL4cWB.js +1 -0
- package/dist/public/assets/_BMLL4cWB.js.br +0 -0
- package/dist/public/assets/{_BuLSZuTT2.js → _BNeDY6c6.js} +1 -1
- package/dist/public/assets/_BOllftHQ.js +1 -0
- package/dist/public/assets/_BOllftHQ.js.br +0 -0
- package/dist/public/assets/_BPanIK56.js +1 -0
- package/dist/public/assets/_BPanIK56.js.br +0 -0
- package/dist/public/assets/_BV5QcD1t.js +1 -0
- package/dist/public/assets/_BV5QcD1t.js.br +0 -0
- package/dist/public/assets/_BWxWv3Q4.js +1 -0
- package/dist/public/assets/_BWxWv3Q4.js.br +0 -0
- package/dist/public/assets/_BY9Zpo-y.js +1 -0
- package/dist/public/assets/_BY9Zpo-y.js.br +0 -0
- package/dist/public/assets/{_B8bLTrAR.js → _BZiRiFuW.js} +1 -1
- package/dist/public/assets/_BZiRiFuW.js.br +0 -0
- package/dist/public/assets/_BfqywnWV.js +1 -0
- package/dist/public/assets/_BfqywnWV.js.br +0 -0
- package/dist/public/assets/_BhpLuC-Z.js +1 -0
- package/dist/public/assets/_BhpLuC-Z.js.br +0 -0
- package/dist/public/assets/_BkmuJnv4.js +1 -0
- package/dist/public/assets/_BkmuJnv4.js.br +0 -0
- package/dist/public/assets/_BmhN3Nyl.js +1 -0
- package/dist/public/assets/_BmhN3Nyl.js.br +0 -0
- package/dist/public/assets/_BpvmtZ-d.js +1 -0
- package/dist/public/assets/{_DcfWOyup.js → _C2c05-aV.js} +1 -1
- package/dist/public/assets/_C2c05-aV.js.br +0 -0
- package/dist/public/assets/_C3EMIoXk.js +1 -0
- package/dist/public/assets/_C3EMIoXk.js.br +0 -0
- package/dist/public/assets/_C3vzIjs1.js +1 -0
- package/dist/public/assets/_C3vzIjs1.js.br +0 -0
- package/dist/public/assets/_C4a3hSl8.js +1 -0
- package/dist/public/assets/_C4z7ZpSn.js +1 -0
- package/dist/public/assets/_C6F_DycA.js +1 -0
- package/dist/public/assets/_C6F_DycA.js.br +0 -0
- package/dist/public/assets/_C7Qx5vsK.js +1 -0
- package/dist/public/assets/_C7Qx5vsK.js.br +0 -0
- package/dist/public/assets/_C8OhMxob.js +1 -0
- package/dist/public/assets/_C8OhMxob.js.br +0 -0
- package/dist/public/assets/_C9MkQEgN.js +1 -0
- package/dist/public/assets/_C9xSVjMf.js +1 -0
- package/dist/public/assets/{_B4zQcDgs.js → _CAjFT4sV.js} +1 -1
- package/dist/public/assets/_CAjFT4sV.js.br +0 -0
- package/dist/public/assets/_CENbzEJT.js +1 -0
- package/dist/public/assets/_CENbzEJT.js.br +0 -0
- package/dist/public/assets/_CMC6b9HF.js +1 -0
- package/dist/public/assets/_CMC6b9HF.js.br +0 -0
- package/dist/public/assets/{_CygMTO1C.js → _CNTJHRw3.js} +1 -1
- package/dist/public/assets/_CNTJHRw3.js.br +0 -0
- package/dist/public/assets/_COoyuGi7.js +1 -0
- package/dist/public/assets/_COoyuGi7.js.br +0 -0
- package/dist/public/assets/_CQJs3lWb.js +1 -0
- package/dist/public/assets/_CQJs3lWb.js.br +0 -0
- package/dist/public/assets/_CQTDE9K4.js +1 -0
- package/dist/public/assets/_CQTDE9K4.js.br +0 -0
- package/dist/public/assets/_CQtYx0Hw.js +1 -0
- package/dist/public/assets/_CQtYx0Hw.js.br +0 -0
- package/dist/public/assets/_CRzKmxW8.js +1 -0
- package/dist/public/assets/_CRzKmxW8.js.br +0 -0
- package/dist/public/assets/{_Dbp391kL2.js → _CVzjJEu4.js} +1 -1
- package/dist/public/assets/_CWH6qxYM.js +1 -0
- package/dist/public/assets/_CWH6qxYM.js.br +0 -0
- package/dist/public/assets/{_DFGJGEpB.js → _CZEx699l.js} +1 -1
- package/dist/public/assets/_CZEx699l.js.br +0 -0
- package/dist/public/assets/_CZQPAwyq.js +1 -0
- package/dist/public/assets/{_p1qRbXAM.js → _CaR0Cm4R.js} +1 -1
- package/dist/public/assets/_CaR0Cm4R.js.br +0 -0
- package/dist/public/assets/{_CSJQogH62.js → _Ceg68iFQ.js} +1 -1
- package/dist/public/assets/_Ceg68iFQ.js.br +0 -0
- package/dist/public/assets/_CfwcpHky.js +1 -0
- package/dist/public/assets/_CfwcpHky.js.br +0 -0
- package/dist/public/assets/_ChnoRUJ0.js +1 -0
- package/dist/public/assets/_ClmBPtsj.js +1 -0
- package/dist/public/assets/_ClmBPtsj.js.br +0 -0
- package/dist/public/assets/{_CUjz6cMW.js → _CmFrqHJw.js} +1 -1
- package/dist/public/assets/_CmFrqHJw.js.br +0 -0
- package/dist/public/assets/_CnuE-eGh.js +1 -0
- package/dist/public/assets/{_DqxT_h3w.js → _CptijnhY.js} +1 -1
- package/dist/public/assets/_CptijnhY.js.br +0 -0
- package/dist/public/assets/_Cs7p4yDS.js +1 -0
- package/dist/public/assets/_Cs7p4yDS.js.br +0 -0
- package/dist/public/assets/{_DXOGRSbq.js → _CwSTGRiH.js} +1 -1
- package/dist/public/assets/_CwSTGRiH.js.br +0 -0
- package/dist/public/assets/_D0ODP8pF.js +1 -0
- package/dist/public/assets/_D0ODP8pF.js.br +0 -0
- package/dist/public/assets/_D0OygaZT.js +1 -0
- package/dist/public/assets/_D0OygaZT.js.br +0 -0
- package/dist/public/assets/_D0TvPGyZ.js +1 -0
- package/dist/public/assets/_D0TvPGyZ.js.br +0 -0
- package/dist/public/assets/_D6XehGQQ.js +1 -0
- package/dist/public/assets/_D9Uq_kAm.js +1 -0
- package/dist/public/assets/_D9Uq_kAm.js.br +0 -0
- package/dist/public/assets/_DB-OQ-9y.js +1 -0
- package/dist/public/assets/_DB-OQ-9y.js.br +0 -0
- package/dist/public/assets/_DCj2SQDi.js +1 -0
- package/dist/public/assets/{_CoIipOdm.js → _DK7gU5UW.js} +1 -1
- package/dist/public/assets/_DK7gU5UW.js.br +0 -0
- package/dist/public/assets/_DPs98hXw.js +1 -0
- package/dist/public/assets/_DPs98hXw.js.br +0 -0
- package/dist/public/assets/_DSC0z2WY.js +1 -0
- package/dist/public/assets/_DSC0z2WY.js.br +0 -0
- package/dist/public/assets/_DW3nSckX.js +1 -0
- package/dist/public/assets/_DW3nSckX.js.br +0 -0
- package/dist/public/assets/_DWQbgPoS.js +1 -0
- package/dist/public/assets/_DWQbgPoS.js.br +0 -0
- package/dist/public/assets/_DWc1bOg5.js +1 -0
- package/dist/public/assets/_DWc1bOg5.js.br +0 -0
- package/dist/public/assets/_DWyAxr1i.js +1 -0
- package/dist/public/assets/_D_uw8N56.js +1 -0
- package/dist/public/assets/_DbYA3moe.js +1 -0
- package/dist/public/assets/_DbYA3moe.js.br +0 -0
- package/dist/public/assets/_DekxQCZG.js +1 -0
- package/dist/public/assets/_DekxQCZG.js.br +0 -0
- package/dist/public/assets/_DendWUyw.js +1 -0
- package/dist/public/assets/_DendWUyw.js.br +0 -0
- package/dist/public/assets/_DinKA_hx.js +1 -0
- package/dist/public/assets/_DinKA_hx.js.br +0 -0
- package/dist/public/assets/_Dtdv7oY4.js +1 -0
- package/dist/public/assets/_Dtdv7oY4.js.br +0 -0
- package/dist/public/assets/_DxPa6R8r.js +1 -0
- package/dist/public/assets/_DxPa6R8r.js.br +0 -0
- package/dist/public/assets/{_DMc_yyoD2.js → _EnzWFNCd.js} +1 -1
- package/dist/public/assets/_EnzWFNCd.js.br +0 -0
- package/dist/public/assets/_I6bkQ0U8.js +1 -0
- package/dist/public/assets/_I6bkQ0U8.js.br +0 -0
- package/dist/public/assets/_IvbGWrWX.js +1 -0
- package/dist/public/assets/_IvbGWrWX.js.br +0 -0
- package/dist/public/assets/_K81ipFoO.js +1 -0
- package/dist/public/assets/_K81ipFoO.js.br +0 -0
- package/dist/public/assets/_KxAphaRA.js +1536 -0
- package/dist/public/assets/_KxAphaRA.js.br +0 -0
- package/dist/public/assets/_NJCyKDdt.js +1 -0
- package/dist/public/assets/{_B2vPwdLW2.js → _Un2ZJKHi.js} +1 -1
- package/dist/public/assets/_Un2ZJKHi.js.br +0 -0
- package/dist/public/assets/_YkIvmgMd.js +1 -0
- package/dist/public/assets/_YkIvmgMd.js.br +0 -0
- package/dist/public/assets/_cXHJ5Aqj.js +1 -0
- package/dist/public/assets/_cXHJ5Aqj.js.br +0 -0
- package/dist/public/assets/{_DhEdWcLh.js → _eEx3xZw1.js} +1 -1
- package/dist/public/assets/_eEx3xZw1.js.br +0 -0
- package/dist/public/assets/_fT1Q2AHj.js +1 -0
- package/dist/public/assets/_fT1Q2AHj.js.br +0 -0
- package/dist/public/assets/{_CFuIV2fl.js → _fg40_ntQ.js} +1 -1
- package/dist/public/assets/_fg40_ntQ.js.br +0 -0
- package/dist/public/assets/_hePW80VL.js +1 -0
- package/dist/public/assets/_hfRJcieK.js +1 -0
- package/dist/public/assets/_hfRJcieK.js.br +0 -0
- package/dist/public/assets/_mQm0jPVv.js +1 -0
- package/dist/public/assets/_mQm0jPVv.js.br +0 -0
- package/dist/public/assets/{_Cs_1C06H.js → _owCQ3_5m.js} +1 -1
- package/dist/public/assets/_owCQ3_5m.js.br +0 -0
- package/dist/public/assets/_rMYAdrnY.js +1 -0
- package/dist/public/assets/_rMYAdrnY.js.br +0 -0
- package/dist/public/assets/_rXH_a0uy.js +1 -0
- package/dist/public/assets/_uvCtJ6zz.js +1 -0
- package/dist/public/assets/_uvCtJ6zz.js.br +0 -0
- package/dist/public/assets/{_CfpVtrZd.js → _zy6yt2JI.js} +1 -1
- package/dist/public/assets/_zy6yt2JI.js.br +0 -0
- package/dist/public/assets/app-page-ykWloqi5.css +1 -0
- package/dist/public/assets/app-page-ykWloqi5.css.br +0 -0
- package/dist/public/assets/{diff-view-CPZTgZs3.css → diff-view-CNup0zAN.css} +1 -1
- package/dist/public/assets/diff-view-CNup0zAN.css.br +0 -0
- package/dist/public/assets/diff-view-CWrMPKfC.js +2 -0
- package/dist/public/assets/icon-arrow-down-BNBeL8Ga.css +1 -0
- package/dist/public/assets/icon-arrow-down-BNBeL8Ga.css.br +0 -0
- package/dist/public/assets/new-Cm1HuQpH.js +1 -0
- package/dist/public/assets/settings-Cm1HuQpH.js +1 -0
- package/dist/public/assets/w-Cm1HuQpH.js +1 -0
- package/dist/public/assets/w._-BR_j-SQU.js +1 -0
- package/dist/public/assets/w._-Cm1HuQpH.js +1 -0
- package/package.json +6 -6
- package/dist/_CZz7Wyts.js +0 -2352
- package/dist/_jYLlSG8J.js +0 -3824
- package/dist/public/assets/_B1B7SsmR.js +0 -1
- package/dist/public/assets/_B1B7SsmR.js.br +0 -0
- package/dist/public/assets/_B1nEnOeR.js +0 -1
- package/dist/public/assets/_B1nEnOeR.js.br +0 -0
- package/dist/public/assets/_B2vPwdLW2.js.br +0 -0
- package/dist/public/assets/_B2zlBhgP.js +0 -1
- package/dist/public/assets/_B2zlBhgP.js.br +0 -0
- package/dist/public/assets/_B3-rUIWu.js +0 -1
- package/dist/public/assets/_B3-rUIWu.js.br +0 -0
- package/dist/public/assets/_B3v2Mxg9.js +0 -1
- package/dist/public/assets/_B3v2Mxg9.js.br +0 -0
- package/dist/public/assets/_B4zQcDgs.js.br +0 -0
- package/dist/public/assets/_B7g6vstf.js +0 -1
- package/dist/public/assets/_B7g6vstf.js.br +0 -0
- package/dist/public/assets/_B8bLTrAR.js.br +0 -0
- package/dist/public/assets/_BERiWLR2.js.br +0 -0
- package/dist/public/assets/_BG6eCCtD.js +0 -1
- package/dist/public/assets/_BG6eCCtD.js.br +0 -0
- package/dist/public/assets/_BIGq6NLW2.js +0 -1
- package/dist/public/assets/_BIGq6NLW2.js.br +0 -0
- package/dist/public/assets/_BJL8EzDT2.js +0 -1
- package/dist/public/assets/_BJL8EzDT2.js.br +0 -0
- package/dist/public/assets/_BM315xPC.js +0 -1
- package/dist/public/assets/_BM315xPC.js.br +0 -0
- package/dist/public/assets/_BMjuOAQ4.js +0 -1
- package/dist/public/assets/_BMjuOAQ4.js.br +0 -0
- package/dist/public/assets/_BNv3fPjT2.js +0 -1
- package/dist/public/assets/_BNv3fPjT2.js.br +0 -0
- package/dist/public/assets/_BQazGBwX.js +0 -1
- package/dist/public/assets/_BQazGBwX.js.br +0 -0
- package/dist/public/assets/_BY-WvMhs.js +0 -1
- package/dist/public/assets/_BY-WvMhs.js.br +0 -0
- package/dist/public/assets/_BZJVwhA5.js +0 -1
- package/dist/public/assets/_BZJVwhA5.js.br +0 -0
- package/dist/public/assets/_B_wawL6J2.js +0 -1
- package/dist/public/assets/_B_wawL6J2.js.br +0 -0
- package/dist/public/assets/_Ba8vUCRv2.js +0 -1
- package/dist/public/assets/_Ba8vUCRv2.js.br +0 -0
- package/dist/public/assets/_BcTQMZit.js +0 -1
- package/dist/public/assets/_BcTQMZit.js.br +0 -0
- package/dist/public/assets/_Blhy_Vd12.js +0 -1
- package/dist/public/assets/_Blhy_Vd12.js.br +0 -0
- package/dist/public/assets/_BuNhyEVe.js +0 -1
- package/dist/public/assets/_BuNhyEVe.js.br +0 -0
- package/dist/public/assets/_C2WEo047.js +0 -1
- package/dist/public/assets/_C2WEo047.js.br +0 -0
- package/dist/public/assets/_C5QblKM6.js +0 -1
- package/dist/public/assets/_C5QblKM6.js.br +0 -0
- package/dist/public/assets/_CBHyOOZB.js +0 -1
- package/dist/public/assets/_CBHyOOZB.js.br +0 -0
- package/dist/public/assets/_CFGDp3Sw.js +0 -1
- package/dist/public/assets/_CFGDp3Sw.js.br +0 -0
- package/dist/public/assets/_CFuIV2fl.js.br +0 -0
- package/dist/public/assets/_CNPgjl1-2.js +0 -1
- package/dist/public/assets/_CNPgjl1-2.js.br +0 -0
- package/dist/public/assets/_CSJQogH62.js.br +0 -0
- package/dist/public/assets/_CUjz6cMW.js.br +0 -0
- package/dist/public/assets/_CWHyYnLM2.js +0 -1
- package/dist/public/assets/_CWHyYnLM2.js.br +0 -0
- package/dist/public/assets/_CWzOnDwF2.js +0 -1
- package/dist/public/assets/_CWzOnDwF2.js.br +0 -0
- package/dist/public/assets/_CXcrI0KH.js +0 -1
- package/dist/public/assets/_CXcrI0KH.js.br +0 -0
- package/dist/public/assets/_CY8IvGdO2.js +0 -1
- package/dist/public/assets/_CY8IvGdO2.js.br +0 -0
- package/dist/public/assets/_CYK6BCWH2.js +0 -1
- package/dist/public/assets/_CYK6BCWH2.js.br +0 -0
- package/dist/public/assets/_CYSMKo7F.js +0 -1
- package/dist/public/assets/_CYSMKo7F.js.br +0 -0
- package/dist/public/assets/_CfpVtrZd.js.br +0 -0
- package/dist/public/assets/_CftRvTVW.js +0 -1
- package/dist/public/assets/_CftRvTVW.js.br +0 -0
- package/dist/public/assets/_ClSO8TOE2.js +0 -1
- package/dist/public/assets/_ClSO8TOE2.js.br +0 -0
- package/dist/public/assets/_CoIipOdm.js.br +0 -0
- package/dist/public/assets/_CpYNKFv52.js +0 -1
- package/dist/public/assets/_CpYNKFv52.js.br +0 -0
- package/dist/public/assets/_CpqV5nOZ2.js +0 -1
- package/dist/public/assets/_CpqV5nOZ2.js.br +0 -0
- package/dist/public/assets/_Cs_1C06H.js.br +0 -0
- package/dist/public/assets/_CxrdJ7hp2.js +0 -1
- package/dist/public/assets/_CxrdJ7hp2.js.br +0 -0
- package/dist/public/assets/_CygMTO1C.js.br +0 -0
- package/dist/public/assets/_CznrmqM4.js +0 -1
- package/dist/public/assets/_CznrmqM4.js.br +0 -0
- package/dist/public/assets/_DA_VGkH6.js +0 -1
- package/dist/public/assets/_DA_VGkH6.js.br +0 -0
- package/dist/public/assets/_DFGJGEpB.js.br +0 -0
- package/dist/public/assets/_DI99ib-x2.js +0 -1
- package/dist/public/assets/_DI99ib-x2.js.br +0 -0
- package/dist/public/assets/_DLbMbJfH.js +0 -1
- package/dist/public/assets/_DLbMbJfH.js.br +0 -0
- package/dist/public/assets/_DLzJNX7C.js.br +0 -0
- package/dist/public/assets/_DMc_yyoD2.js.br +0 -0
- package/dist/public/assets/_DMi37Owt.js +0 -1
- package/dist/public/assets/_DMi37Owt.js.br +0 -0
- package/dist/public/assets/_DRT4_m9d.js +0 -1
- package/dist/public/assets/_DRT4_m9d.js.br +0 -0
- package/dist/public/assets/_DV6VXtzH.js +0 -89
- package/dist/public/assets/_DV6VXtzH.js.br +0 -0
- package/dist/public/assets/_DVIdvZ6L.js +0 -1
- package/dist/public/assets/_DVIdvZ6L.js.br +0 -0
- package/dist/public/assets/_DXOGRSbq.js.br +0 -0
- package/dist/public/assets/_DY5hwH4S2.js +0 -1
- package/dist/public/assets/_DY5hwH4S2.js.br +0 -0
- package/dist/public/assets/_Da8gt_F52.js.br +0 -0
- package/dist/public/assets/_DbTEN3Co.js +0 -1
- package/dist/public/assets/_DbTEN3Co.js.br +0 -0
- package/dist/public/assets/_DcfWOyup.js.br +0 -0
- package/dist/public/assets/_Dd4lKEYp2.js +0 -1
- package/dist/public/assets/_Dd4lKEYp2.js.br +0 -0
- package/dist/public/assets/_DgCQT80U.js.br +0 -0
- package/dist/public/assets/_DhEdWcLh.js.br +0 -0
- package/dist/public/assets/_DiHWQ-Ew.js +0 -1
- package/dist/public/assets/_DiHWQ-Ew.js.br +0 -0
- package/dist/public/assets/_DjcyEwVn2.js +0 -1
- package/dist/public/assets/_DjcyEwVn2.js.br +0 -0
- package/dist/public/assets/_Dm-zlffy.js +0 -1536
- package/dist/public/assets/_Dm-zlffy.js.br +0 -0
- package/dist/public/assets/_DnhKP7pH.js +0 -1
- package/dist/public/assets/_DnhKP7pH.js.br +0 -0
- package/dist/public/assets/_DpJdqIrj.js +0 -1
- package/dist/public/assets/_DpJdqIrj.js.br +0 -0
- package/dist/public/assets/_DqxT_h3w.js.br +0 -0
- package/dist/public/assets/_DsKRHcpP2.js +0 -1
- package/dist/public/assets/_DsKRHcpP2.js.br +0 -0
- package/dist/public/assets/_Dt461FGT.js +0 -1
- package/dist/public/assets/_Dt461FGT.js.br +0 -0
- package/dist/public/assets/_DvHOWoGF.js.br +0 -0
- package/dist/public/assets/_N8vS2ulD2.js +0 -1
- package/dist/public/assets/_N8vS2ulD2.js.br +0 -0
- package/dist/public/assets/_ToAhQlpQ2.js +0 -1
- package/dist/public/assets/_ToAhQlpQ2.js.br +0 -0
- package/dist/public/assets/_TsHAzFfC.js.br +0 -0
- package/dist/public/assets/_ZVf0cDT12.js +0 -1
- package/dist/public/assets/_ZVf0cDT12.js.br +0 -0
- package/dist/public/assets/__g_2CBHN.js +0 -1
- package/dist/public/assets/__g_2CBHN.js.br +0 -0
- package/dist/public/assets/_kIpfj7zU2.js +0 -1
- package/dist/public/assets/_kIpfj7zU2.js.br +0 -0
- package/dist/public/assets/_p1qRbXAM.js.br +0 -0
- package/dist/public/assets/app-page-B-xb0lEG.css +0 -1
- package/dist/public/assets/app-page-B-xb0lEG.css.br +0 -0
- package/dist/public/assets/diff-view-CPZTgZs3.css.br +0 -0
- package/dist/public/assets/new-BMnZANmK.js +0 -1
- package/dist/public/assets/settings-BMnZANmK.js +0 -1
- package/dist/public/assets/w-BMnZANmK.js +0 -1
- package/dist/public/assets/w._-BMnZANmK.js +0 -1
- package/dist/public/assets/w._-C_I4x7J1.js +0 -1
- /package/dist/public/assets/{_2IIEA8gg2.js → _2IIEA8gg.js} +0 -0
- /package/dist/public/assets/{_2IIEA8gg2.js.br → _2IIEA8gg.js.br} +0 -0
- /package/dist/public/assets/{_4G7pJPwS2.js → _4G7pJPwS.js} +0 -0
- /package/dist/public/assets/{_4G7pJPwS2.js.br → _4G7pJPwS.js.br} +0 -0
- /package/dist/public/assets/{_4ZHwLPI52.js → _4ZHwLPI5.js} +0 -0
- /package/dist/public/assets/{_4ZHwLPI52.js.br → _4ZHwLPI5.js.br} +0 -0
- /package/dist/public/assets/{_7GGW24-e2.js → _7GGW24-e.js} +0 -0
- /package/dist/public/assets/{_7GGW24-e2.js.br → _7GGW24-e.js.br} +0 -0
- /package/dist/public/assets/{_8PwUyIlP2.js → _8PwUyIlP.js} +0 -0
- /package/dist/public/assets/{_8PwUyIlP2.js.br → _8PwUyIlP.js.br} +0 -0
- /package/dist/public/assets/{_B1RWQWA52.js → _B1RWQWA5.js} +0 -0
- /package/dist/public/assets/{_B1RWQWA52.js.br → _B1RWQWA5.js.br} +0 -0
- /package/dist/public/assets/{_B2OO5cIa2.js → _B2OO5cIa.js} +0 -0
- /package/dist/public/assets/{_B2OO5cIa2.js.br → _B2OO5cIa.js.br} +0 -0
- /package/dist/public/assets/{_B2gwz-sJ2.js → _B2gwz-sJ.js} +0 -0
- /package/dist/public/assets/{_B2gwz-sJ2.js.br → _B2gwz-sJ.js.br} +0 -0
- /package/dist/public/assets/{_B3gFvitq2.js → _B3gFvitq.js} +0 -0
- /package/dist/public/assets/{_B3gFvitq2.js.br → _B3gFvitq.js.br} +0 -0
- /package/dist/public/assets/{_B5W6OYN72.js → _B5W6OYN7.js} +0 -0
- /package/dist/public/assets/{_B5W6OYN72.js.br → _B5W6OYN7.js.br} +0 -0
- /package/dist/public/assets/{_B7ZEbQpA2.js → _B7ZEbQpA.js} +0 -0
- /package/dist/public/assets/{_B7ZEbQpA2.js.br → _B7ZEbQpA.js.br} +0 -0
- /package/dist/public/assets/{_BJitypiv2.js → _BJitypiv.js} +0 -0
- /package/dist/public/assets/{_BJitypiv2.js.br → _BJitypiv.js.br} +0 -0
- /package/dist/public/assets/{_BRdr0IET2.js → _BRdr0IET.js} +0 -0
- /package/dist/public/assets/{_BRdr0IET2.js.br → _BRdr0IET.js.br} +0 -0
- /package/dist/public/assets/{_BSWPekZh2.js → _BSWPekZh.js} +0 -0
- /package/dist/public/assets/{_BSWPekZh2.js.br → _BSWPekZh.js.br} +0 -0
- /package/dist/public/assets/{_BUDT5pXO2.js → _BUDT5pXO.js} +0 -0
- /package/dist/public/assets/{_BUDT5pXO2.js.br → _BUDT5pXO.js.br} +0 -0
- /package/dist/public/assets/{_BWXHIvNe2.js → _BWXHIvNe.js} +0 -0
- /package/dist/public/assets/{_BWXHIvNe2.js.br → _BWXHIvNe.js.br} +0 -0
- /package/dist/public/assets/{_BXeXVLqQ2.js → _BXeXVLqQ.js} +0 -0
- /package/dist/public/assets/{_BXeXVLqQ2.js.br → _BXeXVLqQ.js.br} +0 -0
- /package/dist/public/assets/{_BYnGhZoM2.js → _BYnGhZoM.js} +0 -0
- /package/dist/public/assets/{_BYnGhZoM2.js.br → _BYnGhZoM.js.br} +0 -0
- /package/dist/public/assets/{_B_bV9PQ92.js → _B_bV9PQ9.js} +0 -0
- /package/dist/public/assets/{_B_bV9PQ92.js.br → _B_bV9PQ9.js.br} +0 -0
- /package/dist/public/assets/{_BiFt_7mu2.js → _BiFt_7mu.js} +0 -0
- /package/dist/public/assets/{_BiFt_7mu2.js.br → _BiFt_7mu.js.br} +0 -0
- /package/dist/public/assets/{_BiJDBrnU2.js → _BiJDBrnU.js} +0 -0
- /package/dist/public/assets/{_BiJDBrnU2.js.br → _BiJDBrnU.js.br} +0 -0
- /package/dist/public/assets/{_Bm3Qr25_2.js → _Bm3Qr25_.js} +0 -0
- /package/dist/public/assets/{_Bm3Qr25_2.js.br → _Bm3Qr25_.js.br} +0 -0
- /package/dist/public/assets/{_BroJfC0k2.js → _BroJfC0k.js} +0 -0
- /package/dist/public/assets/{_BroJfC0k2.js.br → _BroJfC0k.js.br} +0 -0
- /package/dist/public/assets/{_BsKzXJz42.js → _BsKzXJz4.js} +0 -0
- /package/dist/public/assets/{_BsKzXJz42.js.br → _BsKzXJz4.js.br} +0 -0
- /package/dist/public/assets/{_BsSzOQcm2.js → _BsSzOQcm.js} +0 -0
- /package/dist/public/assets/{_BsSzOQcm2.js.br → _BsSzOQcm.js.br} +0 -0
- /package/dist/public/assets/{_BxMlprV52.js → _BxMlprV5.js} +0 -0
- /package/dist/public/assets/{_BxMlprV52.js.br → _BxMlprV5.js.br} +0 -0
- /package/dist/public/assets/{_ByWQv1Qj2.js → _ByWQv1Qj.js} +0 -0
- /package/dist/public/assets/{_ByWQv1Qj2.js.br → _ByWQv1Qj.js.br} +0 -0
- /package/dist/public/assets/{_C03EYrpw2.js → _C03EYrpw.js} +0 -0
- /package/dist/public/assets/{_C03EYrpw2.js.br → _C03EYrpw.js.br} +0 -0
- /package/dist/public/assets/{_C1IUL_tW2.js → _C1IUL_tW.js} +0 -0
- /package/dist/public/assets/{_C1IUL_tW2.js.br → _C1IUL_tW.js.br} +0 -0
- /package/dist/public/assets/{_C8oCnwJJ2.js → _C8oCnwJJ.js} +0 -0
- /package/dist/public/assets/{_C8oCnwJJ2.js.br → _C8oCnwJJ.js.br} +0 -0
- /package/dist/public/assets/{_C8pVoKbM2.js → _C8pVoKbM.js} +0 -0
- /package/dist/public/assets/{_C8pVoKbM2.js.br → _C8pVoKbM.js.br} +0 -0
- /package/dist/public/assets/{_CBce3t8t2.js → _CBce3t8t.js} +0 -0
- /package/dist/public/assets/{_CBce3t8t2.js.br → _CBce3t8t.js.br} +0 -0
- /package/dist/public/assets/{_CHQ94UKr2.js → _CHQ94UKr.js} +0 -0
- /package/dist/public/assets/{_CHQ94UKr2.js.br → _CHQ94UKr.js.br} +0 -0
- /package/dist/public/assets/{_CLwyXe_n2.js → _CLwyXe_n.js} +0 -0
- /package/dist/public/assets/{_CLwyXe_n2.js.br → _CLwyXe_n.js.br} +0 -0
- /package/dist/public/assets/{_CMLA9XwU2.js → _CMLA9XwU.js} +0 -0
- /package/dist/public/assets/{_CMLA9XwU2.js.br → _CMLA9XwU.js.br} +0 -0
- /package/dist/public/assets/{_CQ2zXKGN2.js → _CQ2zXKGN.js} +0 -0
- /package/dist/public/assets/{_CQ2zXKGN2.js.br → _CQ2zXKGN.js.br} +0 -0
- /package/dist/public/assets/{_CSRkHgEL2.js → _CSRkHgEL.js} +0 -0
- /package/dist/public/assets/{_CSRkHgEL2.js.br → _CSRkHgEL.js.br} +0 -0
- /package/dist/public/assets/{_CUHmPFLl2.js → _CUHmPFLl.js} +0 -0
- /package/dist/public/assets/{_CUHmPFLl2.js.br → _CUHmPFLl.js.br} +0 -0
- /package/dist/public/assets/{_CV2tkWYe2.js → _CV2tkWYe.js} +0 -0
- /package/dist/public/assets/{_CV2tkWYe2.js.br → _CV2tkWYe.js.br} +0 -0
- /package/dist/public/assets/{_CYIUgYqB2.js → _CYIUgYqB.js} +0 -0
- /package/dist/public/assets/{_CYIUgYqB2.js.br → _CYIUgYqB.js.br} +0 -0
- /package/dist/public/assets/{_CYNrtFtB2.js → _CYNrtFtB.js} +0 -0
- /package/dist/public/assets/{_CYNrtFtB2.js.br → _CYNrtFtB.js.br} +0 -0
- /package/dist/public/assets/{_CZd0xW_V2.js → _CZd0xW_V.js} +0 -0
- /package/dist/public/assets/{_CZd0xW_V2.js.br → _CZd0xW_V.js.br} +0 -0
- /package/dist/public/assets/{_CacY0gHj2.js → _CacY0gHj.js} +0 -0
- /package/dist/public/assets/{_CacY0gHj2.js.br → _CacY0gHj.js.br} +0 -0
- /package/dist/public/assets/{_Cb4Vim4T2.js → _Cb4Vim4T.js} +0 -0
- /package/dist/public/assets/{_Cb4Vim4T2.js.br → _Cb4Vim4T.js.br} +0 -0
- /package/dist/public/assets/{_CcmNWLt02.js → _CcmNWLt0.js} +0 -0
- /package/dist/public/assets/{_CcmNWLt02.js.br → _CcmNWLt0.js.br} +0 -0
- /package/dist/public/assets/{_Cfkwpbl82.js → _Cfkwpbl8.js} +0 -0
- /package/dist/public/assets/{_Cfkwpbl82.js.br → _Cfkwpbl8.js.br} +0 -0
- /package/dist/public/assets/{_CgoNMtux2.js → _CgoNMtux.js} +0 -0
- /package/dist/public/assets/{_CgoNMtux2.js.br → _CgoNMtux.js.br} +0 -0
- /package/dist/public/assets/{_Ci_nEsc72.js → _Ci_nEsc7.js} +0 -0
- /package/dist/public/assets/{_Ci_nEsc72.js.br → _Ci_nEsc7.js.br} +0 -0
- /package/dist/public/assets/{_CjNLYCLg2.js → _CjNLYCLg.js} +0 -0
- /package/dist/public/assets/{_CjNLYCLg2.js.br → _CjNLYCLg.js.br} +0 -0
- /package/dist/public/assets/{_Cmm7eHzH2.js → _Cmm7eHzH.js} +0 -0
- /package/dist/public/assets/{_Cmm7eHzH2.js.br → _Cmm7eHzH.js.br} +0 -0
- /package/dist/public/assets/{_CohzipZa2.js → _CohzipZa.js} +0 -0
- /package/dist/public/assets/{_CohzipZa2.js.br → _CohzipZa.js.br} +0 -0
- /package/dist/public/assets/{_CtfBBspg2.js → _CtfBBspg.js} +0 -0
- /package/dist/public/assets/{_CtfBBspg2.js.br → _CtfBBspg.js.br} +0 -0
- /package/dist/public/assets/{_Cvrh5tZx2.js → _Cvrh5tZx.js} +0 -0
- /package/dist/public/assets/{_Cvrh5tZx2.js.br → _Cvrh5tZx.js.br} +0 -0
- /package/dist/public/assets/{_CxZEssPk2.js → _CxZEssPk.js} +0 -0
- /package/dist/public/assets/{_CxZEssPk2.js.br → _CxZEssPk.js.br} +0 -0
- /package/dist/public/assets/{_CyEgAFGc2.js → _CyEgAFGc.js} +0 -0
- /package/dist/public/assets/{_CyEgAFGc2.js.br → _CyEgAFGc.js.br} +0 -0
- /package/dist/public/assets/{_D-usSTwE2.js → _D-usSTwE.js} +0 -0
- /package/dist/public/assets/{_D-usSTwE2.js.br → _D-usSTwE.js.br} +0 -0
- /package/dist/public/assets/{_D0apG41V2.js → _D0apG41V.js} +0 -0
- /package/dist/public/assets/{_D0apG41V2.js.br → _D0apG41V.js.br} +0 -0
- /package/dist/public/assets/{_D1A_Heim2.js → _D1A_Heim.js} +0 -0
- /package/dist/public/assets/{_D1A_Heim2.js.br → _D1A_Heim.js.br} +0 -0
- /package/dist/public/assets/{_D7Lr4KcI2.js → _D7Lr4KcI.js} +0 -0
- /package/dist/public/assets/{_D7Lr4KcI2.js.br → _D7Lr4KcI.js.br} +0 -0
- /package/dist/public/assets/{_D8IpX4py2.js → _D8IpX4py.js} +0 -0
- /package/dist/public/assets/{_D8IpX4py2.js.br → _D8IpX4py.js.br} +0 -0
- /package/dist/public/assets/{_DBj4K9d_2.js → _DBj4K9d_.js} +0 -0
- /package/dist/public/assets/{_DBj4K9d_2.js.br → _DBj4K9d_.js.br} +0 -0
- /package/dist/public/assets/{_DDpmG2fV2.js → _DDpmG2fV.js} +0 -0
- /package/dist/public/assets/{_DDpmG2fV2.js.br → _DDpmG2fV.js.br} +0 -0
- /package/dist/public/assets/{_DExj1W_82.js → _DExj1W_8.js} +0 -0
- /package/dist/public/assets/{_DExj1W_82.js.br → _DExj1W_8.js.br} +0 -0
- /package/dist/public/assets/{_DGHpHOYJ2.js → _DGHpHOYJ.js} +0 -0
- /package/dist/public/assets/{_DGHpHOYJ2.js.br → _DGHpHOYJ.js.br} +0 -0
- /package/dist/public/assets/{_DHYfO66s2.js → _DHYfO66s.js} +0 -0
- /package/dist/public/assets/{_DHYfO66s2.js.br → _DHYfO66s.js.br} +0 -0
- /package/dist/public/assets/{_DJMQeKeT2.js → _DJMQeKeT.js} +0 -0
- /package/dist/public/assets/{_DJMQeKeT2.js.br → _DJMQeKeT.js.br} +0 -0
- /package/dist/public/assets/{_DKpUyyne2.js → _DKpUyyne.js} +0 -0
- /package/dist/public/assets/{_DKpUyyne2.js.br → _DKpUyyne.js.br} +0 -0
- /package/dist/public/assets/{_DMoTqEGO2.js → _DMoTqEGO.js} +0 -0
- /package/dist/public/assets/{_DMoTqEGO2.js.br → _DMoTqEGO.js.br} +0 -0
- /package/dist/public/assets/{_DO-qXg-I2.js → _DO-qXg-I.js} +0 -0
- /package/dist/public/assets/{_DO-qXg-I2.js.br → _DO-qXg-I.js.br} +0 -0
- /package/dist/public/assets/{_DOwzaHZ02.js → _DOwzaHZ0.js} +0 -0
- /package/dist/public/assets/{_DOwzaHZ02.js.br → _DOwzaHZ0.js.br} +0 -0
- /package/dist/public/assets/{_DQwYfKfQ2.js → _DQwYfKfQ.js} +0 -0
- /package/dist/public/assets/{_DQwYfKfQ2.js.br → _DQwYfKfQ.js.br} +0 -0
- /package/dist/public/assets/{_DRFjx7u42.js → _DRFjx7u4.js} +0 -0
- /package/dist/public/assets/{_DRFjx7u42.js.br → _DRFjx7u4.js.br} +0 -0
- /package/dist/public/assets/{_DVQuIRkW2.js → _DVQuIRkW.js} +0 -0
- /package/dist/public/assets/{_DVQuIRkW2.js.br → _DVQuIRkW.js.br} +0 -0
- /package/dist/public/assets/{_DX1BQOs82.js → _DX1BQOs8.js} +0 -0
- /package/dist/public/assets/{_DX1BQOs82.js.br → _DX1BQOs8.js.br} +0 -0
- /package/dist/public/assets/{_DYvRD3hg2.js → _DYvRD3hg.js} +0 -0
- /package/dist/public/assets/{_DYvRD3hg2.js.br → _DYvRD3hg.js.br} +0 -0
- /package/dist/public/assets/{_Dh228itO2.js → _Dh228itO.js} +0 -0
- /package/dist/public/assets/{_Dh228itO2.js.br → _Dh228itO.js.br} +0 -0
- /package/dist/public/assets/{_Dh5ihWbf2.js → _Dh5ihWbf.js} +0 -0
- /package/dist/public/assets/{_Dh5ihWbf2.js.br → _Dh5ihWbf.js.br} +0 -0
- /package/dist/public/assets/{_DhmEMT882.js → _DhmEMT88.js} +0 -0
- /package/dist/public/assets/{_DhmEMT882.js.br → _DhmEMT88.js.br} +0 -0
- /package/dist/public/assets/{_Dl-2e7rI2.js → _Dl-2e7rI.js} +0 -0
- /package/dist/public/assets/{_Dl-2e7rI2.js.br → _Dl-2e7rI.js.br} +0 -0
- /package/dist/public/assets/{_DmIc4jLQ2.js → _DmIc4jLQ.js} +0 -0
- /package/dist/public/assets/{_DmIc4jLQ2.js.br → _DmIc4jLQ.js.br} +0 -0
- /package/dist/public/assets/{_DnToyrRv2.js → _DnToyrRv.js} +0 -0
- /package/dist/public/assets/{_DnToyrRv2.js.br → _DnToyrRv.js.br} +0 -0
- /package/dist/public/assets/{_DqKBuwfJ2.js → _DqKBuwfJ.js} +0 -0
- /package/dist/public/assets/{_DqKBuwfJ2.js.br → _DqKBuwfJ.js.br} +0 -0
- /package/dist/public/assets/{_DswuEJGm2.js → _DswuEJGm.js} +0 -0
- /package/dist/public/assets/{_DswuEJGm2.js.br → _DswuEJGm.js.br} +0 -0
- /package/dist/public/assets/{_DvXPmvsu2.js → _DvXPmvsu.js} +0 -0
- /package/dist/public/assets/{_DvXPmvsu2.js.br → _DvXPmvsu.js.br} +0 -0
- /package/dist/public/assets/{_IvuFDN5E2.js → _IvuFDN5E.js} +0 -0
- /package/dist/public/assets/{_IvuFDN5E2.js.br → _IvuFDN5E.js.br} +0 -0
- /package/dist/public/assets/{_O90oeIOV2.js → _O90oeIOV.js} +0 -0
- /package/dist/public/assets/{_O90oeIOV2.js.br → _O90oeIOV.js.br} +0 -0
- /package/dist/public/assets/{_UdsmMDCL2.js → _UdsmMDCL.js} +0 -0
- /package/dist/public/assets/{_UdsmMDCL2.js.br → _UdsmMDCL.js.br} +0 -0
- /package/dist/public/assets/{__X_XdTYD2.js → __X_XdTYD.js} +0 -0
- /package/dist/public/assets/{__X_XdTYD2.js.br → __X_XdTYD.js.br} +0 -0
- /package/dist/public/assets/{_aMsaMD1D2.js → _aMsaMD1D.js} +0 -0
- /package/dist/public/assets/{_aMsaMD1D2.js.br → _aMsaMD1D.js.br} +0 -0
- /package/dist/public/assets/{_bTVj8UrX2.js → _bTVj8UrX.js} +0 -0
- /package/dist/public/assets/{_bTVj8UrX2.js.br → _bTVj8UrX.js.br} +0 -0
- /package/dist/public/assets/{_eJ-hLW7d2.js → _eJ-hLW7d.js} +0 -0
- /package/dist/public/assets/{_eJ-hLW7d2.js.br → _eJ-hLW7d.js.br} +0 -0
- /package/dist/public/assets/{_gzcpVVnB2.js → _gzcpVVnB.js} +0 -0
- /package/dist/public/assets/{_gzcpVVnB2.js.br → _gzcpVVnB.js.br} +0 -0
- /package/dist/public/assets/{_ilITqXS62.js → _ilITqXS6.js} +0 -0
- /package/dist/public/assets/{_ilITqXS62.js.br → _ilITqXS6.js.br} +0 -0
- /package/dist/public/assets/{_nFMaYfgc2.js → _nFMaYfgc.js} +0 -0
- /package/dist/public/assets/{_nFMaYfgc2.js.br → _nFMaYfgc.js.br} +0 -0
- /package/dist/public/assets/{_ot-7Btpt2.js → _ot-7Btpt.js} +0 -0
- /package/dist/public/assets/{_ot-7Btpt2.js.br → _ot-7Btpt.js.br} +0 -0
- /package/dist/public/assets/{_qdxAdBWQ2.js → _qdxAdBWQ.js} +0 -0
- /package/dist/public/assets/{_qdxAdBWQ2.js.br → _qdxAdBWQ.js.br} +0 -0
- /package/dist/public/assets/{_rLFTqkRN2.js → _rLFTqkRN.js} +0 -0
- /package/dist/public/assets/{_rLFTqkRN2.js.br → _rLFTqkRN.js.br} +0 -0
- /package/dist/public/assets/{_sltzmVWM2.js → _sltzmVWM.js} +0 -0
- /package/dist/public/assets/{_uhdI0v042.js → _uhdI0v04.js} +0 -0
- /package/dist/public/assets/{_uhdI0v042.js.br → _uhdI0v04.js.br} +0 -0
- /package/dist/public/assets/{_zf12oZj62.js → _zf12oZj6.js} +0 -0
- /package/dist/public/assets/{_zf12oZj62.js.br → _zf12oZj6.js.br} +0 -0
package/dist/_jYLlSG8J.js
DELETED
|
@@ -1,3824 +0,0 @@
|
|
|
1
|
-
import { At as _serialize_if, B as iconBtnXs, Bt as writeScope, Ct as _resume_branch, D as toast_default, Dt as _script, Et as _scope_with_id, J as _attr_details_or_dialog_open, K as _attr, M as repoLabel, Mt as _subscribe, Nt as _template, O as icon_xmark_default, Ot as _sep, Q as _attr_option_value, R as iconBtnLg, St as _resume, Tt as _scope_reason, W as tone, X as _attr_input_value, _ as diffScope, a as fuzzy, b as setDiffPos, bt as _if, c as icon_search_default, ct as _el, d as icon_refresh_default, dt as _escape, et as _attr_select_value, g as diffPos, h as diffFilter, ht as _for_of, i as icon_sidebar_default, jt as _set_serialize_reason, k as icon_base_default, kt as _serialize_guard, l as icon_chevron_right_default, lt as _el_read_error, n as findIconBtn, ot as _content_resume, pt as _existing_scope, q as _attr_class, r as findInput, s as icon_arrow_up_default, t as icon_arrow_down_default, tt as _attr_style, u as icon_back_default, ut as _el_resume, v as diffTreeOpen, vt as _html, wt as _scope_id, x as setDiffScope, xt as _peek_scope_id, z as iconBtnRow } from "./_CZz7Wyts.js";
|
|
2
|
-
//#region src/client/router.ts
|
|
3
|
-
function urlFor(r) {
|
|
4
|
-
if (r.view === "settings") return "/settings";
|
|
5
|
-
if (r.view === "new") return "/new";
|
|
6
|
-
if (!r.workspaceId) return "/";
|
|
7
|
-
const base = `/w/${encodeURIComponent(r.workspaceId)}`;
|
|
8
|
-
if (r.view === "diff") {
|
|
9
|
-
const q = new URLSearchParams();
|
|
10
|
-
if (r.pr) q.set("pr", r.pr);
|
|
11
|
-
if (r.scope && r.scope !== "committed") q.set("scope", r.scope);
|
|
12
|
-
if (r.file) q.set("file", r.file);
|
|
13
|
-
const qs = q.toString();
|
|
14
|
-
return `${base}/review${qs ? `?${qs}` : ""}`;
|
|
15
|
-
}
|
|
16
|
-
if (r.view === "manage") return `${base}/manage`;
|
|
17
|
-
return `${base}${r.sessionId ? `?s=${encodeURIComponent(r.sessionId)}` : ""}`;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/client/clipboard.ts
|
|
21
|
-
/** Copy text to the clipboard. `navigator.clipboard` needs a secure
|
|
22
|
-
* context — absent over plain-http LAN origins — so fall back to a hidden
|
|
23
|
-
* textarea + execCommand. Returns false when both paths fail. */
|
|
24
|
-
async function copyText(text) {
|
|
25
|
-
try {
|
|
26
|
-
await navigator.clipboard.writeText(text);
|
|
27
|
-
return true;
|
|
28
|
-
} catch {
|
|
29
|
-
const ta = document.createElement("textarea");
|
|
30
|
-
ta.value = text;
|
|
31
|
-
ta.style.cssText = "position:fixed;top:-100px;opacity:0;";
|
|
32
|
-
document.body.append(ta);
|
|
33
|
-
ta.focus();
|
|
34
|
-
ta.select();
|
|
35
|
-
const ok = document.execCommand("copy");
|
|
36
|
-
ta.remove();
|
|
37
|
-
return ok;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/client/diff-heads.ts
|
|
42
|
-
/** Fingerprint the open review so status.changed can refetch without a
|
|
43
|
-
* full page reload. Includes:
|
|
44
|
-
* - GitHub PR head oids (push / remote updates)
|
|
45
|
-
* - local HEAD (agent commits before origin/GitHub catch up)
|
|
46
|
-
* Formats must match between diff load and status snapshots. */
|
|
47
|
-
function prHeadSigFromDiff(repos) {
|
|
48
|
-
return repos.map((r) => {
|
|
49
|
-
const id = r.pr ? String(r.pr.number) : "-";
|
|
50
|
-
const remote = r.pr ? r.pr.headRefOid || r.head || "" : "";
|
|
51
|
-
const local = r.localHead || r.head || "";
|
|
52
|
-
return `${r.worktree}#${id}:${remote}:L${local}`;
|
|
53
|
-
}).sort().join("\0");
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/client/file-filter.ts
|
|
57
|
-
/** Filter language for the review file list: space-separated terms.
|
|
58
|
-
* Terms with glob characters match as globs (`*` within a segment, `**`
|
|
59
|
-
* across segments, `?` one char, unanchored); plain terms keep the fuzzy
|
|
60
|
-
* subsequence match; a `!` prefix excludes. A file must pass every
|
|
61
|
-
* include term and no exclude term. */
|
|
62
|
-
function makeFileFilter(query) {
|
|
63
|
-
const includes = [];
|
|
64
|
-
const excludes = [];
|
|
65
|
-
for (const raw of query.trim().split(/\s+/).filter(Boolean)) {
|
|
66
|
-
const negated = raw.startsWith("!");
|
|
67
|
-
const term = negated ? raw.slice(1) : raw;
|
|
68
|
-
if (!term) continue;
|
|
69
|
-
(negated ? excludes : includes).push(termMatcher(term));
|
|
70
|
-
}
|
|
71
|
-
return (path) => !excludes.some((m) => m(path)) && includes.every((m) => m(path));
|
|
72
|
-
}
|
|
73
|
-
function termMatcher(term) {
|
|
74
|
-
if (!/[*?]/.test(term)) return (path) => fuzzy(term, path);
|
|
75
|
-
let source = "";
|
|
76
|
-
for (let i = 0; i < term.length; i++) {
|
|
77
|
-
const ch = term[i];
|
|
78
|
-
if (ch === "*") {
|
|
79
|
-
if (term[i + 1] === "*") {
|
|
80
|
-
source += ".*";
|
|
81
|
-
i++;
|
|
82
|
-
} else source += "[^/]*";
|
|
83
|
-
} else if (ch === "?") source += "[^/]";
|
|
84
|
-
else source += ch.replace(/[.+^${}()|[\]\\]/, "\\$&");
|
|
85
|
-
}
|
|
86
|
-
try {
|
|
87
|
-
const re = new RegExp(source, "i");
|
|
88
|
-
return (path) => re.test(path);
|
|
89
|
-
} catch {
|
|
90
|
-
return (path) => fuzzy(term, path);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region lib/review/markdown.mjs
|
|
95
|
-
var CONTEXT = 3;
|
|
96
|
-
/**
|
|
97
|
-
* @typedef {{ worktree: string, path: string, side: "additions"|"deletions",
|
|
98
|
-
* line_start: number, line_end: number, text: string,
|
|
99
|
-
* head?: string|null, snippet?: string|null }} Comment
|
|
100
|
-
* @typedef {{ worktree: string, head?: string, baseSha?: string, base?: string,
|
|
101
|
-
* branch?: string, pr?: { number: number, headRefName: string } | null,
|
|
102
|
-
* files?: { path: string, old: string|null, new: string|null }[] }} Repo
|
|
103
|
-
*/
|
|
104
|
-
/**
|
|
105
|
-
* Per-repo base/head so the agent can see if it has moved on, plus ±3
|
|
106
|
-
* numbered lines of context so the snippet is still locatable after a small
|
|
107
|
-
* edit. A comment's stored `snippet` (what the reviewer actually saw) wins
|
|
108
|
-
* over re-reading the file, which may have changed since.
|
|
109
|
-
* @param {Comment[]} comments
|
|
110
|
-
* @param {Repo[] | null | undefined} repos
|
|
111
|
-
*/
|
|
112
|
-
function commentMarkdown(comments, repos) {
|
|
113
|
-
const byRepo = /* @__PURE__ */ new Map();
|
|
114
|
-
for (const c of comments) byRepo.set(c.worktree, [...byRepo.get(c.worktree) || [], c]);
|
|
115
|
-
const chunks = ["Review feedback:"];
|
|
116
|
-
let n = 0;
|
|
117
|
-
for (const [worktree, list] of byRepo) {
|
|
118
|
-
const repo = (repos || []).find((r) => r.worktree === worktree);
|
|
119
|
-
chunks.push("");
|
|
120
|
-
chunks.push(repoHeader(worktree, repo, list));
|
|
121
|
-
for (const c of list) {
|
|
122
|
-
n++;
|
|
123
|
-
const side = c.side === "deletions" ? "Old" : "New";
|
|
124
|
-
const range = c.line_start === c.line_end ? `line ${c.line_start}` : `lines ${c.line_start}-${c.line_end}`;
|
|
125
|
-
chunks.push("");
|
|
126
|
-
chunks.push(`${n}. **${c.path}** (${side} ${range})`);
|
|
127
|
-
const snippet = c.snippet ?? currentSnippet(repo, c);
|
|
128
|
-
if (snippet != null) {
|
|
129
|
-
const fence = markdownFence(snippet);
|
|
130
|
-
chunks.push("");
|
|
131
|
-
chunks.push(indent(`${fence}diff\n${snippet}\n${fence}`));
|
|
132
|
-
}
|
|
133
|
-
chunks.push("");
|
|
134
|
-
chunks.push(indent(c.text));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return chunks.join("\n");
|
|
138
|
-
}
|
|
139
|
-
/** @param {Repo | undefined} repo @param {Comment} c */
|
|
140
|
-
function currentSnippet(repo, c) {
|
|
141
|
-
const file = repo?.files?.find((f) => f.path === c.path);
|
|
142
|
-
const source = c.side === "deletions" ? file?.old : file?.new;
|
|
143
|
-
return source == null ? null : quoteRange(source, c.line_start, c.line_end, c.side);
|
|
144
|
-
}
|
|
145
|
-
/** @param {string} worktree @param {Repo | undefined} repo @param {Comment[]} list */
|
|
146
|
-
function repoHeader(worktree, repo, list) {
|
|
147
|
-
if (repo?.head) {
|
|
148
|
-
const head = shortSha(repo.head);
|
|
149
|
-
const base = repo.baseSha ? shortSha(repo.baseSha) : "";
|
|
150
|
-
const branch = repo.pr?.headRefName || repo.branch || "HEAD";
|
|
151
|
-
return `${worktree}/${repo.pr ? ` #${repo.pr.number}` : ""}: \`${branch}\` ${head}${repo.base ? ` vs \`${repo.base}\` ${base}` : ""}`;
|
|
152
|
-
}
|
|
153
|
-
const heads = [...new Set(list.map((c) => c.head).filter(Boolean))];
|
|
154
|
-
return heads.length ? `${worktree}/: ${heads.map((h) => shortSha(h)).join(", ")}` : `${worktree}/`;
|
|
155
|
-
}
|
|
156
|
-
/** @param {string} sha */
|
|
157
|
-
function shortSha(sha, n = 12) {
|
|
158
|
-
return sha.slice(0, n);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* ±CONTEXT rows around the commented range, with +/- prefixes and line
|
|
162
|
-
* numbers — same shape as codiff's review payload.
|
|
163
|
-
* @param {string} source @param {number} start @param {number} end
|
|
164
|
-
* @param {"additions"|"deletions"} side
|
|
165
|
-
*/
|
|
166
|
-
function quoteRange(source, start, end, side) {
|
|
167
|
-
const lines = source.split("\n");
|
|
168
|
-
const from = Math.max(1, start - CONTEXT);
|
|
169
|
-
const to = Math.min(lines.length, end + CONTEXT);
|
|
170
|
-
const mark = side === "deletions" ? "-" : "+";
|
|
171
|
-
const rows = [];
|
|
172
|
-
for (let i = from; i <= to; i++) {
|
|
173
|
-
const prefix = i >= start && i <= end ? mark : " ";
|
|
174
|
-
rows.push(`${prefix}${String(i).padStart(4)} | ${lines[i - 1] ?? ""}`);
|
|
175
|
-
}
|
|
176
|
-
return rows.join("\n");
|
|
177
|
-
}
|
|
178
|
-
/** @param {string} body */
|
|
179
|
-
function markdownFence(body) {
|
|
180
|
-
let ticks = 3;
|
|
181
|
-
const re = /`+/g;
|
|
182
|
-
let m;
|
|
183
|
-
while (m = re.exec(body)) ticks = Math.max(ticks, m[0].length + 1);
|
|
184
|
-
return "`".repeat(ticks);
|
|
185
|
-
}
|
|
186
|
-
/** @param {string} text */
|
|
187
|
-
function indent(text) {
|
|
188
|
-
return text.split("\n").map((line) => line ? ` ${line}` : line).join("\n");
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/client/review.ts
|
|
192
|
-
/** Build a directory tree from a sorted file list: a path trie with
|
|
193
|
-
* single-child directory chains compressed into one label (GitHub-style
|
|
194
|
-
* "src/util" segments) — labels stay short instead of front-truncated
|
|
195
|
-
* full paths. Nested (not flat rows) so each directory can wrap its
|
|
196
|
-
* children: that is what lets its header stick while they scroll. */
|
|
197
|
-
function treeDirs(files) {
|
|
198
|
-
const root = {
|
|
199
|
-
dirs: /* @__PURE__ */ new Map(),
|
|
200
|
-
files: []
|
|
201
|
-
};
|
|
202
|
-
for (const file of files) {
|
|
203
|
-
const parts = file.path.split("/");
|
|
204
|
-
const name = parts.pop();
|
|
205
|
-
let node = root;
|
|
206
|
-
for (const part of parts) {
|
|
207
|
-
let child = node.dirs.get(part);
|
|
208
|
-
if (!child) {
|
|
209
|
-
child = {
|
|
210
|
-
dirs: /* @__PURE__ */ new Map(),
|
|
211
|
-
files: []
|
|
212
|
-
};
|
|
213
|
-
node.dirs.set(part, child);
|
|
214
|
-
}
|
|
215
|
-
node = child;
|
|
216
|
-
}
|
|
217
|
-
node.files.push({
|
|
218
|
-
file,
|
|
219
|
-
name
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
const build = (node, label, path, depth) => {
|
|
223
|
-
const dirs = [];
|
|
224
|
-
for (const [dirName, child] of [...node.dirs].sort(([a], [b]) => a.localeCompare(b))) {
|
|
225
|
-
let childLabel = dirName;
|
|
226
|
-
let target = child;
|
|
227
|
-
while (target.dirs.size === 1 && !target.files.length) {
|
|
228
|
-
const [[next, grand]] = target.dirs;
|
|
229
|
-
childLabel += `/${next}`;
|
|
230
|
-
target = grand;
|
|
231
|
-
}
|
|
232
|
-
const childPath = path ? `${path}/${childLabel}` : childLabel;
|
|
233
|
-
dirs.push(build(target, childLabel, childPath, depth + 1));
|
|
234
|
-
}
|
|
235
|
-
return {
|
|
236
|
-
label,
|
|
237
|
-
path,
|
|
238
|
-
depth,
|
|
239
|
-
dirs,
|
|
240
|
-
files: node.files
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
return build(root, "", "", -1);
|
|
244
|
-
}
|
|
245
|
-
var treeToggle = "_fG _3 _j";
|
|
246
|
-
var pageTitle = "_fN _bQ";
|
|
247
|
-
//#endregion
|
|
248
|
-
//#region src/tags/diff-send.marko
|
|
249
|
-
var diff_send_default = _template("j", (input) => {
|
|
250
|
-
const $scope0_reason = _scope_reason(), $sg__input_sessions = _serialize_guard($scope0_reason, 0), $si__input_sessions = _serialize_if($scope0_reason, 0);
|
|
251
|
-
const $scope0_id = _scope_id();
|
|
252
|
-
let sending = false;
|
|
253
|
-
let sendTarget = null;
|
|
254
|
-
const sessions = input.sessions || [];
|
|
255
|
-
const sendPick = sessions.some((s) => s.id === sendTarget) ? sendTarget : sessions[0]?.id ?? null;
|
|
256
|
-
_html(`<span${_attr_class("_gw")}><button type=button${_attr_class("_o")} title="Copy comments as markdown">Copy${_el_resume($scope0_id, "c")}</button>${_el_resume($scope0_id, "b")}`);
|
|
257
|
-
_if(() => {
|
|
258
|
-
if (sessions.length === 1) {
|
|
259
|
-
const $scope1_id = _scope_id();
|
|
260
|
-
_html(`<button type=button${_attr_class(["_o", "_p"])}${_attr("disabled", sending)}>${`Send to ${_escape(`${sessions[0].title || sessions[0].agent}`)}`}${_el_resume($scope1_id, "b")}</button>${_el_resume($scope1_id, "a")}`);
|
|
261
|
-
_script($scope1_id, "j1");
|
|
262
|
-
writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
263
|
-
return 0;
|
|
264
|
-
} else if (sessions.length) {
|
|
265
|
-
const $scope2_id = _scope_id();
|
|
266
|
-
_html(`<span${_attr_class("_gx")}><button type=button${_attr_class(["_p", "_gy"])}${_attr("disabled", sending)}>Send to${_el_resume($scope2_id, "c")}</button>${_el_resume($scope2_id, "b")}`);
|
|
267
|
-
_attr_select_value($scope2_id, "d", sendTarget, _resume((_new_sendTarget) => {
|
|
268
|
-
sendTarget = _new_sendTarget;
|
|
269
|
-
}, "j0", $scope2_id), () => {
|
|
270
|
-
_html(`<select${_attr_class("_gz")} aria-label="Send comments to session"${_attr("disabled", sending)}>`);
|
|
271
|
-
_for_of(sessions, (s) => {
|
|
272
|
-
const $scope3_id = _scope_id();
|
|
273
|
-
_html(`<option${_attr_option_value(s.id)}>${_escape(s.title || s.agent)}${_el_resume($scope3_id, "b", $sg__input_sessions)}</option>${_el_resume($scope3_id, "a", $sg__input_sessions)}`);
|
|
274
|
-
$si__input_sessions && writeScope($scope3_id, {});
|
|
275
|
-
}, "id", $scope2_id, "d", $sg__input_sessions, 1, $sg__input_sessions, "</select>", 1);
|
|
276
|
-
});
|
|
277
|
-
_html("</span>");
|
|
278
|
-
_script($scope2_id, "j2");
|
|
279
|
-
writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
280
|
-
return 1;
|
|
281
|
-
}
|
|
282
|
-
}, $scope0_id, "d", 1, $sg__input_sessions, $sg__input_sessions, 0, 1);
|
|
283
|
-
_html("</span>");
|
|
284
|
-
_script($scope0_id, "j3");
|
|
285
|
-
writeScope($scope0_id, {
|
|
286
|
-
h: input.onCopy,
|
|
287
|
-
i: input.onSend,
|
|
288
|
-
k: sending,
|
|
289
|
-
l: $si__input_sessions && sendTarget,
|
|
290
|
-
m: sessions,
|
|
291
|
-
q: sessions[0]?.title,
|
|
292
|
-
r: sessions[0]?.agent,
|
|
293
|
-
s: sendPick
|
|
294
|
-
});
|
|
295
|
-
_resume_branch($scope0_id);
|
|
296
|
-
});
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/constants.js
|
|
299
|
-
var GIT_DIFF_FILE_BREAK_REGEX = /(?=^diff --git)/gm;
|
|
300
|
-
var FILENAME_HEADER_REGEX = /^(---|\+\+\+)\s+([^\t\r\n]+)/;
|
|
301
|
-
var FILENAME_HEADER_REGEX_GIT = /^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/;
|
|
302
|
-
var ALTERNATE_FILE_NAMES_GIT = /^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/;
|
|
303
|
-
var INDEX_LINE_METADATA = /^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i;
|
|
304
|
-
Object.freeze({
|
|
305
|
-
fromStart: 0,
|
|
306
|
-
fromEnd: 0
|
|
307
|
-
});
|
|
308
|
-
//#endregion
|
|
309
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.js
|
|
310
|
-
function cleanLastNewline(contents) {
|
|
311
|
-
let end = contents.length;
|
|
312
|
-
if (contents.charCodeAt(end - 1) === 10) {
|
|
313
|
-
end--;
|
|
314
|
-
if (contents.charCodeAt(end - 1) === 13) end--;
|
|
315
|
-
}
|
|
316
|
-
return contents.slice(0, end);
|
|
317
|
-
}
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/utils/detachString.js
|
|
320
|
-
var stringDetachEncoder = new TextEncoder();
|
|
321
|
-
var stringDetachDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
322
|
-
var SURROGATE_CODE_UNIT_PATTERN = /[\uD800-\uDFFF]/;
|
|
323
|
-
var STRING_DETACH_INITIAL_BUFFER_SIZE = 1024;
|
|
324
|
-
var stringDetachBuffer = new Uint8Array(STRING_DETACH_INITIAL_BUFFER_SIZE);
|
|
325
|
-
function releaseStringDetachBuffer() {
|
|
326
|
-
if (stringDetachBuffer.length !== STRING_DETACH_INITIAL_BUFFER_SIZE) stringDetachBuffer = new Uint8Array(STRING_DETACH_INITIAL_BUFFER_SIZE);
|
|
327
|
-
}
|
|
328
|
-
function detachString(value) {
|
|
329
|
-
if (value.length === 0) return value;
|
|
330
|
-
if (SURROGATE_CODE_UNIT_PATTERN.test(value)) return JSON.parse(JSON.stringify(value));
|
|
331
|
-
const requiredByteLength = value.length * 3;
|
|
332
|
-
if (stringDetachBuffer.length < requiredByteLength) stringDetachBuffer = new Uint8Array(requiredByteLength);
|
|
333
|
-
const { written } = stringDetachEncoder.encodeInto(value, stringDetachBuffer);
|
|
334
|
-
return stringDetachDecoder.decode(stringDetachBuffer.subarray(0, written));
|
|
335
|
-
}
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.js
|
|
338
|
-
/** Converts a unified hunk side's start/count into its consumed-file range. */
|
|
339
|
-
function getHunkSideStartBoundary(start, count) {
|
|
340
|
-
return start - (count === 0 ? 0 : 1);
|
|
341
|
-
}
|
|
342
|
-
function getHunkSideEndBoundary(start, count) {
|
|
343
|
-
return getHunkSideStartBoundary(start, count) + count;
|
|
344
|
-
}
|
|
345
|
-
//#endregion
|
|
346
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/utils/realignChangeContent.js
|
|
347
|
-
var MAX_ALIGNMENT_COMPARISONS = 4096;
|
|
348
|
-
var MIN_IMPROVEMENT_PER_PAIR = .5;
|
|
349
|
-
/**
|
|
350
|
-
* Re-split count-mismatched change blocks in every hunk so paired lines are
|
|
351
|
-
* chosen by content similarity instead of position, then slide blank-line
|
|
352
|
-
* insert/delete blocks to the top of their blank run. Mutates `hunks` in
|
|
353
|
-
* place; rendered row counts are unchanged (a split block covers the same
|
|
354
|
-
* split/unified rows as the original).
|
|
355
|
-
*/
|
|
356
|
-
function realignChangeContentBySimilarity(diff) {
|
|
357
|
-
for (const hunk of diff.hunks) {
|
|
358
|
-
for (let index = 0; index < hunk.hunkContent.length; index++) {
|
|
359
|
-
const content = hunk.hunkContent[index];
|
|
360
|
-
if (content.type !== "change") continue;
|
|
361
|
-
const replacement = realignChangeBlock(diff, content);
|
|
362
|
-
if (replacement != null) {
|
|
363
|
-
hunk.hunkContent.splice(index, 1, ...replacement);
|
|
364
|
-
index += replacement.length - 1;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
slideBlankBoundaryBlocksUp(hunk, diff);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Slide pure insert/delete blocks made entirely of blank lines to the top of
|
|
372
|
-
* the blank run they sit in. Adding or removing a blank line next to
|
|
373
|
-
* existing blanks is ambiguous, and the diff library reports the change at
|
|
374
|
-
* the run's bottom — so pressing Enter at the end of a line marks a blank
|
|
375
|
-
* *below* the caret as inserted while the caret's own new line renders as
|
|
376
|
-
* context. Sliding up anchors the change to the content above it (the caret
|
|
377
|
-
* line after an Enter) instead.
|
|
378
|
-
*
|
|
379
|
-
* The slide is all-or-nothing: it only applies when the block comes to rest
|
|
380
|
-
* directly beneath remaining in-hunk content. A slide that would consume the
|
|
381
|
-
* hunk's entire leading context was stopped by the hunk's edge — a context
|
|
382
|
-
* window cut, not the top of the blank run — and that landing spot is
|
|
383
|
-
* arbitrary, so the block keeps the library's bottom-of-run anchor (which
|
|
384
|
-
* sits against the content below the run). Non-blank blocks never slide, so
|
|
385
|
-
* code that merely ends like its neighbor (an added function before an
|
|
386
|
-
* identical `}`) keeps the library's canonical position.
|
|
387
|
-
*/
|
|
388
|
-
function slideBlankBoundaryBlocksUp(hunk, diff) {
|
|
389
|
-
const { hunkContent } = hunk;
|
|
390
|
-
for (let index = 1; index < hunkContent.length; index++) {
|
|
391
|
-
const block = hunkContent[index];
|
|
392
|
-
const previous = hunkContent[index - 1];
|
|
393
|
-
if (block.type !== "change" || block.additions > 0 && block.deletions > 0 || previous.type !== "context") continue;
|
|
394
|
-
const isInsert = block.additions > 0;
|
|
395
|
-
const lines = isInsert ? diff.additionLines : diff.deletionLines;
|
|
396
|
-
const blockStart = isInsert ? block.additionLineIndex : block.deletionLineIndex;
|
|
397
|
-
const blockLength = isInsert ? block.additions : block.deletions;
|
|
398
|
-
const unit = lines[blockStart] ?? "";
|
|
399
|
-
if (unit.trim() !== "") continue;
|
|
400
|
-
let uniform = true;
|
|
401
|
-
for (let offset = 1; offset < blockLength; offset++) if (lines[blockStart + offset] !== unit) {
|
|
402
|
-
uniform = false;
|
|
403
|
-
break;
|
|
404
|
-
}
|
|
405
|
-
if (!uniform) continue;
|
|
406
|
-
let slide = 0;
|
|
407
|
-
while (slide < previous.lines && diff.additionLines[previous.additionLineIndex + previous.lines - 1 - slide] === unit) slide++;
|
|
408
|
-
if (slide === 0) continue;
|
|
409
|
-
if (index === 1 && slide === previous.lines) continue;
|
|
410
|
-
block.additionLineIndex -= slide;
|
|
411
|
-
block.deletionLineIndex -= slide;
|
|
412
|
-
const blockAdditionEnd = block.additionLineIndex + block.additions;
|
|
413
|
-
const blockDeletionEnd = block.deletionLineIndex + block.deletions;
|
|
414
|
-
const next = hunkContent[index + 1];
|
|
415
|
-
if (next?.type === "context") {
|
|
416
|
-
next.lines += slide;
|
|
417
|
-
next.additionLineIndex = blockAdditionEnd;
|
|
418
|
-
next.deletionLineIndex = blockDeletionEnd;
|
|
419
|
-
} else hunkContent.splice(index + 1, 0, {
|
|
420
|
-
type: "context",
|
|
421
|
-
lines: slide,
|
|
422
|
-
additionLineIndex: blockAdditionEnd,
|
|
423
|
-
deletionLineIndex: blockDeletionEnd
|
|
424
|
-
});
|
|
425
|
-
previous.lines -= slide;
|
|
426
|
-
if (previous.lines === 0) {
|
|
427
|
-
hunkContent.splice(index - 1, 1);
|
|
428
|
-
index--;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
function realignChangeBlock(diff, content) {
|
|
433
|
-
const { deletions, additions, deletionLineIndex, additionLineIndex } = content;
|
|
434
|
-
const pairCount = Math.min(deletions, additions);
|
|
435
|
-
const surplus = Math.abs(additions - deletions);
|
|
436
|
-
if (pairCount === 0 || surplus === 0 || pairCount * (surplus + 1) > MAX_ALIGNMENT_COMPARISONS) return null;
|
|
437
|
-
const strippedDeletions = [];
|
|
438
|
-
for (let line = 0; line < deletions; line++) strippedDeletions.push(stripWhitespace(diff.deletionLines[deletionLineIndex + line] ?? ""));
|
|
439
|
-
const strippedAdditions = [];
|
|
440
|
-
for (let line = 0; line < additions; line++) strippedAdditions.push(stripWhitespace(diff.additionLines[additionLineIndex + line] ?? ""));
|
|
441
|
-
const additionsAreLonger = additions > deletions;
|
|
442
|
-
let bestOffset = 0;
|
|
443
|
-
let bestScore = -1;
|
|
444
|
-
for (let offset = 0; offset <= surplus; offset++) {
|
|
445
|
-
let score = 0;
|
|
446
|
-
for (let pair = 0; pair < pairCount; pair++) score += lineSimilarity(strippedDeletions[pair + (additionsAreLonger ? 0 : offset)], strippedAdditions[pair + (additionsAreLonger ? offset : 0)]);
|
|
447
|
-
if (offset === 0) bestScore = score + pairCount * MIN_IMPROVEMENT_PER_PAIR;
|
|
448
|
-
else if (score > bestScore) {
|
|
449
|
-
bestScore = score;
|
|
450
|
-
bestOffset = offset;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
if (bestOffset === 0) return null;
|
|
454
|
-
const blocks = [];
|
|
455
|
-
const pushBlock = (blockDeletions, blockAdditions, blockDeletionIndex, blockAdditionIndex) => {
|
|
456
|
-
if (blockDeletions > 0 || blockAdditions > 0) blocks.push({
|
|
457
|
-
type: "change",
|
|
458
|
-
deletions: blockDeletions,
|
|
459
|
-
additions: blockAdditions,
|
|
460
|
-
deletionLineIndex: blockDeletionIndex,
|
|
461
|
-
additionLineIndex: blockAdditionIndex
|
|
462
|
-
});
|
|
463
|
-
};
|
|
464
|
-
if (additionsAreLonger) {
|
|
465
|
-
pushBlock(0, bestOffset, deletionLineIndex, additionLineIndex);
|
|
466
|
-
pushBlock(pairCount, pairCount, deletionLineIndex, additionLineIndex + bestOffset);
|
|
467
|
-
pushBlock(0, additions - pairCount - bestOffset, deletionLineIndex + pairCount, additionLineIndex + bestOffset + pairCount);
|
|
468
|
-
} else {
|
|
469
|
-
pushBlock(bestOffset, 0, deletionLineIndex, additionLineIndex);
|
|
470
|
-
pushBlock(pairCount, pairCount, deletionLineIndex + bestOffset, additionLineIndex);
|
|
471
|
-
pushBlock(deletions - pairCount - bestOffset, 0, deletionLineIndex + bestOffset + pairCount, additionLineIndex + pairCount);
|
|
472
|
-
}
|
|
473
|
-
return blocks;
|
|
474
|
-
}
|
|
475
|
-
var WHITESPACE = /\s+/g;
|
|
476
|
-
function stripWhitespace(line) {
|
|
477
|
-
return line.replace(WHITESPACE, "");
|
|
478
|
-
}
|
|
479
|
-
function lineSimilarity(a, b) {
|
|
480
|
-
if (a === b) return 1;
|
|
481
|
-
const maxLength = Math.max(a.length, b.length);
|
|
482
|
-
const minLength = Math.min(a.length, b.length);
|
|
483
|
-
if (minLength === 0) return 0;
|
|
484
|
-
let prefix = 0;
|
|
485
|
-
while (prefix < minLength && a[prefix] === b[prefix]) prefix++;
|
|
486
|
-
let suffix = 0;
|
|
487
|
-
while (suffix < minLength - prefix && a[a.length - 1 - suffix] === b[b.length - 1 - suffix]) suffix++;
|
|
488
|
-
return (prefix + suffix) / maxLength;
|
|
489
|
-
}
|
|
490
|
-
//#endregion
|
|
491
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js
|
|
492
|
-
function processFile(fileDiffString, options) {
|
|
493
|
-
try {
|
|
494
|
-
return _processFile(fileDiffString, options);
|
|
495
|
-
} finally {
|
|
496
|
-
releaseStringDetachBuffer();
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREAK_REGEX.test(fileDiffString), oldFile, newFile, throwOnError = false } = {}) {
|
|
500
|
-
let lastHunkEnd = 0;
|
|
501
|
-
const hunks = splitAtLinePrefix(fileDiffString, "@@ ");
|
|
502
|
-
let currentFile;
|
|
503
|
-
const isPartial = oldFile == null || newFile == null;
|
|
504
|
-
let deletionLineIndex = 0;
|
|
505
|
-
let additionLineIndex = 0;
|
|
506
|
-
for (const hunk of hunks) {
|
|
507
|
-
const lines = splitWithNewlines(hunk);
|
|
508
|
-
const firstLine = lines[0];
|
|
509
|
-
if (firstLine == null) {
|
|
510
|
-
if (throwOnError) throw Error("parsePatchContent: invalid hunk");
|
|
511
|
-
else console.error("parsePatchContent: invalid hunk", hunk);
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
const fileHeader = parseHunkHeader(firstLine);
|
|
515
|
-
let additionLines = 0;
|
|
516
|
-
let deletionLines = 0;
|
|
517
|
-
if (fileHeader == null || currentFile == null) {
|
|
518
|
-
if (currentFile != null) {
|
|
519
|
-
if (throwOnError) throw Error("parsePatchContent: Invalid hunk");
|
|
520
|
-
else console.error("parsePatchContent: Invalid hunk", hunk);
|
|
521
|
-
continue;
|
|
522
|
-
}
|
|
523
|
-
currentFile = {
|
|
524
|
-
name: "",
|
|
525
|
-
type: "change",
|
|
526
|
-
hunks: [],
|
|
527
|
-
splitLineCount: 0,
|
|
528
|
-
unifiedLineCount: 0,
|
|
529
|
-
isPartial,
|
|
530
|
-
additionLines: !isPartial && oldFile != null && newFile != null ? splitFileContents(newFile.contents) : [],
|
|
531
|
-
deletionLines: !isPartial && oldFile != null && newFile != null ? splitFileContents(oldFile.contents) : [],
|
|
532
|
-
cacheKey: maybeDetachOptionalString(cacheKey)
|
|
533
|
-
};
|
|
534
|
-
if (currentFile.additionLines.length === 1 && newFile?.contents === "") currentFile.additionLines.length = 0;
|
|
535
|
-
if (currentFile.deletionLines.length === 1 && oldFile?.contents === "") currentFile.deletionLines.length = 0;
|
|
536
|
-
for (const line of lines) {
|
|
537
|
-
if (line.startsWith("diff --git")) {
|
|
538
|
-
const filenameMatch = line.trim().match(ALTERNATE_FILE_NAMES_GIT);
|
|
539
|
-
const prevName = filenameMatch?.[1] ?? filenameMatch?.[2];
|
|
540
|
-
const name = filenameMatch?.[3] ?? filenameMatch?.[4];
|
|
541
|
-
if (prevName == null || name == null) {
|
|
542
|
-
if (throwOnError) throw Error("parsePatchContent: invalid git diff header");
|
|
543
|
-
else console.error("parsePatchContent: invalid git diff header", line);
|
|
544
|
-
continue;
|
|
545
|
-
}
|
|
546
|
-
currentFile.name = detachString(name.trim());
|
|
547
|
-
if (prevName !== name) currentFile.prevName = detachString(prevName.trim());
|
|
548
|
-
continue;
|
|
549
|
-
}
|
|
550
|
-
const filenameMatch = line.startsWith("---") || line.startsWith("+++") ? line.match(isGitDiff ? FILENAME_HEADER_REGEX_GIT : FILENAME_HEADER_REGEX) : null;
|
|
551
|
-
if (filenameMatch != null) {
|
|
552
|
-
const [, type, fileName] = filenameMatch;
|
|
553
|
-
if (type === "---" && fileName !== "/dev/null") {
|
|
554
|
-
const detachedFileName = detachString(fileName.trim());
|
|
555
|
-
currentFile.prevName = detachedFileName;
|
|
556
|
-
currentFile.name = detachedFileName;
|
|
557
|
-
} else if (type === "+++" && fileName !== "/dev/null") currentFile.name = detachString(fileName.trim());
|
|
558
|
-
} else if (isGitDiff) {
|
|
559
|
-
if (line.startsWith("new mode ")) currentFile.mode = detachString(line.slice(8).trim());
|
|
560
|
-
if (line.startsWith("old mode ")) currentFile.prevMode = detachString(line.slice(8).trim());
|
|
561
|
-
if (line.startsWith("new file mode")) {
|
|
562
|
-
currentFile.type = "new";
|
|
563
|
-
currentFile.mode = detachString(line.slice(13).trim());
|
|
564
|
-
}
|
|
565
|
-
if (line.startsWith("deleted file mode")) {
|
|
566
|
-
currentFile.type = "deleted";
|
|
567
|
-
currentFile.mode = detachString(line.slice(17).trim());
|
|
568
|
-
}
|
|
569
|
-
if (line.startsWith("similarity index")) if (line.startsWith("similarity index 100%")) currentFile.type = "rename-pure";
|
|
570
|
-
else currentFile.type = "rename-changed";
|
|
571
|
-
if (line.startsWith("index ")) {
|
|
572
|
-
const [, prevObjectId, newObjectId, mode] = line.trim().match(INDEX_LINE_METADATA) ?? [];
|
|
573
|
-
if (prevObjectId != null) currentFile.prevObjectId = detachString(prevObjectId);
|
|
574
|
-
if (newObjectId != null) currentFile.newObjectId = detachString(newObjectId);
|
|
575
|
-
if (mode != null) currentFile.mode = detachString(mode);
|
|
576
|
-
}
|
|
577
|
-
if (line.startsWith("rename from ")) currentFile.prevName = detachString(line.slice(12).trim());
|
|
578
|
-
if (line.startsWith("rename to ")) currentFile.name = detachString(line.slice(10).trim());
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
continue;
|
|
582
|
-
}
|
|
583
|
-
let currentContent;
|
|
584
|
-
let lastLineType;
|
|
585
|
-
while (lines.length > 0 && (lines[lines.length - 1] === "\n" || lines[lines.length - 1] === "\r" || lines[lines.length - 1] === "\r\n" || lines[lines.length - 1] === "")) lines.pop();
|
|
586
|
-
const { additionStart, deletionStart } = fileHeader;
|
|
587
|
-
deletionLineIndex = isPartial ? deletionLineIndex : deletionStart - 1;
|
|
588
|
-
additionLineIndex = isPartial ? additionLineIndex : additionStart - 1;
|
|
589
|
-
const hunkData = {
|
|
590
|
-
collapsedBefore: 0,
|
|
591
|
-
splitLineCount: 0,
|
|
592
|
-
splitLineStart: 0,
|
|
593
|
-
unifiedLineCount: 0,
|
|
594
|
-
unifiedLineStart: 0,
|
|
595
|
-
additionCount: fileHeader.additionCount,
|
|
596
|
-
additionStart,
|
|
597
|
-
additionLines,
|
|
598
|
-
deletionCount: fileHeader.deletionCount,
|
|
599
|
-
deletionStart,
|
|
600
|
-
deletionLines,
|
|
601
|
-
deletionLineIndex,
|
|
602
|
-
additionLineIndex,
|
|
603
|
-
hunkContent: [],
|
|
604
|
-
hunkContext: maybeDetachOptionalString(fileHeader.hunkContext),
|
|
605
|
-
hunkSpecs: detachString(firstLine),
|
|
606
|
-
noEOFCRAdditions: false,
|
|
607
|
-
noEOFCRDeletions: false
|
|
608
|
-
};
|
|
609
|
-
let parsedAdditionLines = 0;
|
|
610
|
-
let parsedDeletionLines = 0;
|
|
611
|
-
for (let lineIndex = 1; lineIndex < lines.length; lineIndex++) {
|
|
612
|
-
const rawLine = lines[lineIndex];
|
|
613
|
-
if (parsedAdditionLines >= hunkData.additionCount && parsedDeletionLines >= hunkData.deletionCount && !rawLine.startsWith("\\")) {
|
|
614
|
-
if (throwOnError && isHunkBodyLine(rawLine) && !isFormatPatchVersionSeparator(rawLine)) throw Error("parsePatchContent: hunk has more lines than expected");
|
|
615
|
-
break;
|
|
616
|
-
}
|
|
617
|
-
const firstChar = rawLine[0];
|
|
618
|
-
if (firstChar !== "+" && firstChar !== "-" && firstChar !== " " && firstChar !== "\\") {
|
|
619
|
-
if (throwOnError) throw Error("parsePatchContent: invalid hunk line");
|
|
620
|
-
console.error(`parseLineType: Invalid firstChar: "${firstChar}", full line: "${rawLine}"`);
|
|
621
|
-
console.error("processFile: invalid rawLine:", rawLine);
|
|
622
|
-
continue;
|
|
623
|
-
}
|
|
624
|
-
const type = parseRawLineType(firstChar);
|
|
625
|
-
if (type === "addition") {
|
|
626
|
-
if (throwOnError && parsedAdditionLines >= hunkData.additionCount) throw Error("parsePatchContent: hunk has too many addition lines");
|
|
627
|
-
const line = getParsedLineContent(rawLine);
|
|
628
|
-
if (currentContent == null || currentContent.type !== "change") {
|
|
629
|
-
currentContent = createContentGroup("change", deletionLineIndex, additionLineIndex);
|
|
630
|
-
hunkData.hunkContent.push(currentContent);
|
|
631
|
-
}
|
|
632
|
-
additionLineIndex++;
|
|
633
|
-
parsedAdditionLines++;
|
|
634
|
-
if (isPartial) currentFile.additionLines.push(line);
|
|
635
|
-
currentContent.additions++;
|
|
636
|
-
additionLines++;
|
|
637
|
-
lastLineType = "addition";
|
|
638
|
-
} else if (type === "deletion") {
|
|
639
|
-
if (throwOnError && parsedDeletionLines >= hunkData.deletionCount) throw Error("parsePatchContent: hunk has too many deletion lines");
|
|
640
|
-
const line = getParsedLineContent(rawLine);
|
|
641
|
-
if (currentContent == null || currentContent.type !== "change") {
|
|
642
|
-
currentContent = createContentGroup("change", deletionLineIndex, additionLineIndex);
|
|
643
|
-
hunkData.hunkContent.push(currentContent);
|
|
644
|
-
}
|
|
645
|
-
deletionLineIndex++;
|
|
646
|
-
parsedDeletionLines++;
|
|
647
|
-
if (isPartial) currentFile.deletionLines.push(line);
|
|
648
|
-
currentContent.deletions++;
|
|
649
|
-
deletionLines++;
|
|
650
|
-
lastLineType = "deletion";
|
|
651
|
-
} else if (type === "context") {
|
|
652
|
-
if (throwOnError && (parsedDeletionLines >= hunkData.deletionCount || parsedAdditionLines >= hunkData.additionCount)) throw Error("parsePatchContent: hunk has too many context lines");
|
|
653
|
-
const line = getParsedLineContent(rawLine);
|
|
654
|
-
if (currentContent == null || currentContent.type !== "context") {
|
|
655
|
-
currentContent = createContentGroup("context", deletionLineIndex, additionLineIndex);
|
|
656
|
-
hunkData.hunkContent.push(currentContent);
|
|
657
|
-
}
|
|
658
|
-
additionLineIndex++;
|
|
659
|
-
deletionLineIndex++;
|
|
660
|
-
parsedAdditionLines++;
|
|
661
|
-
parsedDeletionLines++;
|
|
662
|
-
if (isPartial) {
|
|
663
|
-
currentFile.deletionLines.push(line);
|
|
664
|
-
currentFile.additionLines.push(line);
|
|
665
|
-
}
|
|
666
|
-
currentContent.lines++;
|
|
667
|
-
lastLineType = "context";
|
|
668
|
-
} else if (type === "metadata" && currentContent != null) {
|
|
669
|
-
if (currentContent.type === "context") {
|
|
670
|
-
hunkData.noEOFCRAdditions = true;
|
|
671
|
-
hunkData.noEOFCRDeletions = true;
|
|
672
|
-
} else if (lastLineType === "deletion") hunkData.noEOFCRDeletions = true;
|
|
673
|
-
else if (lastLineType === "addition") hunkData.noEOFCRAdditions = true;
|
|
674
|
-
if (isPartial && (lastLineType === "addition" || lastLineType === "context")) {
|
|
675
|
-
const lastIndex = currentFile.additionLines.length - 1;
|
|
676
|
-
if (lastIndex >= 0) currentFile.additionLines[lastIndex] = cleanLastNewline(currentFile.additionLines[lastIndex]);
|
|
677
|
-
}
|
|
678
|
-
if (isPartial && (lastLineType === "deletion" || lastLineType === "context")) {
|
|
679
|
-
const lastIndex = currentFile.deletionLines.length - 1;
|
|
680
|
-
if (lastIndex >= 0) currentFile.deletionLines[lastIndex] = cleanLastNewline(currentFile.deletionLines[lastIndex]);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
if (throwOnError && (parsedAdditionLines !== hunkData.additionCount || parsedDeletionLines !== hunkData.deletionCount)) throw Error("parsePatchContent: hunk line count mismatch");
|
|
685
|
-
hunkData.additionLines = additionLines;
|
|
686
|
-
hunkData.deletionLines = deletionLines;
|
|
687
|
-
hunkData.collapsedBefore = Math.max(getHunkSideStartBoundary(hunkData.additionStart, hunkData.additionCount) - lastHunkEnd, 0);
|
|
688
|
-
currentFile.hunks.push(hunkData);
|
|
689
|
-
lastHunkEnd = getHunkSideEndBoundary(hunkData.additionStart, hunkData.additionCount);
|
|
690
|
-
for (const content of hunkData.hunkContent) if (content.type === "context") {
|
|
691
|
-
hunkData.splitLineCount += content.lines;
|
|
692
|
-
hunkData.unifiedLineCount += content.lines;
|
|
693
|
-
} else {
|
|
694
|
-
hunkData.splitLineCount += Math.max(content.additions, content.deletions);
|
|
695
|
-
hunkData.unifiedLineCount += content.deletions + content.additions;
|
|
696
|
-
}
|
|
697
|
-
hunkData.splitLineStart = currentFile.splitLineCount + hunkData.collapsedBefore;
|
|
698
|
-
hunkData.unifiedLineStart = currentFile.unifiedLineCount + hunkData.collapsedBefore;
|
|
699
|
-
currentFile.splitLineCount += hunkData.collapsedBefore + hunkData.splitLineCount;
|
|
700
|
-
currentFile.unifiedLineCount += hunkData.collapsedBefore + hunkData.unifiedLineCount;
|
|
701
|
-
}
|
|
702
|
-
if (currentFile == null) return;
|
|
703
|
-
if (throwOnError && isPartial && !isGitDiff && currentFile.hunks.length === 0) throw Error("parsePatchContent: unified file has no hunks");
|
|
704
|
-
if (currentFile.hunks.length > 0 && !isPartial && currentFile.additionLines.length > 0 && currentFile.deletionLines.length > 0) {
|
|
705
|
-
const lastHunk = currentFile.hunks[currentFile.hunks.length - 1];
|
|
706
|
-
const lastHunkEnd = getHunkSideEndBoundary(lastHunk.additionStart, lastHunk.additionCount);
|
|
707
|
-
const totalFileLines = currentFile.additionLines.length;
|
|
708
|
-
const collapsedAfter = Math.max(totalFileLines - lastHunkEnd, 0);
|
|
709
|
-
currentFile.splitLineCount += collapsedAfter;
|
|
710
|
-
currentFile.unifiedLineCount += collapsedAfter;
|
|
711
|
-
}
|
|
712
|
-
if (!isGitDiff) {
|
|
713
|
-
if (currentFile.prevName != null && currentFile.name !== currentFile.prevName) if (currentFile.hunks.length > 0) currentFile.type = "rename-changed";
|
|
714
|
-
else currentFile.type = "rename-pure";
|
|
715
|
-
else if ((oldFile == null || oldFile.contents === "") && newFile != null && newFile.contents !== "") currentFile.type = "new";
|
|
716
|
-
else if (oldFile != null && oldFile.contents !== "" && (newFile == null || newFile.contents === "")) currentFile.type = "deleted";
|
|
717
|
-
}
|
|
718
|
-
if (currentFile.type !== "rename-pure" && currentFile.type !== "rename-changed") currentFile.prevName = void 0;
|
|
719
|
-
realignChangeContentBySimilarity(currentFile);
|
|
720
|
-
return currentFile;
|
|
721
|
-
}
|
|
722
|
-
function splitFileContents(contents) {
|
|
723
|
-
const lines = splitWithNewlines(contents);
|
|
724
|
-
for (let index = 0; index < lines.length; index++) lines[index] = detachString(lines[index]);
|
|
725
|
-
return lines;
|
|
726
|
-
}
|
|
727
|
-
function splitWithNewlines(contents) {
|
|
728
|
-
if (contents.length === 0) return [""];
|
|
729
|
-
const lines = [];
|
|
730
|
-
let startIndex = 0;
|
|
731
|
-
for (;;) {
|
|
732
|
-
const newlineIndex = contents.indexOf("\n", startIndex);
|
|
733
|
-
if (newlineIndex === -1) break;
|
|
734
|
-
lines.push(contents.slice(startIndex, newlineIndex + 1));
|
|
735
|
-
startIndex = newlineIndex + 1;
|
|
736
|
-
}
|
|
737
|
-
if (startIndex < contents.length) lines.push(contents.slice(startIndex));
|
|
738
|
-
return lines;
|
|
739
|
-
}
|
|
740
|
-
function isHunkBodyLine(line) {
|
|
741
|
-
const firstChar = line[0];
|
|
742
|
-
return firstChar === "+" || firstChar === "-" || firstChar === " ";
|
|
743
|
-
}
|
|
744
|
-
function isFormatPatchVersionSeparator(line) {
|
|
745
|
-
if (!line.startsWith("--")) return false;
|
|
746
|
-
for (let index = 2; index < line.length; index++) {
|
|
747
|
-
const char = line[index];
|
|
748
|
-
if (char !== " " && char !== " " && char !== "\n" && char !== "\r") return false;
|
|
749
|
-
}
|
|
750
|
-
return true;
|
|
751
|
-
}
|
|
752
|
-
function parseHunkHeader(line) {
|
|
753
|
-
if (!line.startsWith("@@ -")) return;
|
|
754
|
-
let index = 4;
|
|
755
|
-
const deletionStartResult = readPositiveInteger(line, index);
|
|
756
|
-
if (deletionStartResult == null) return;
|
|
757
|
-
const deletionStart = deletionStartResult.value;
|
|
758
|
-
index = deletionStartResult.endIndex;
|
|
759
|
-
let deletionCount = 1;
|
|
760
|
-
if (line[index] === ",") {
|
|
761
|
-
const deletionCountResult = readPositiveInteger(line, index + 1);
|
|
762
|
-
if (deletionCountResult == null) return;
|
|
763
|
-
deletionCount = deletionCountResult.value;
|
|
764
|
-
index = deletionCountResult.endIndex;
|
|
765
|
-
}
|
|
766
|
-
if (line[index] !== " " || line[index + 1] !== "+") return;
|
|
767
|
-
index += 2;
|
|
768
|
-
const additionStartResult = readPositiveInteger(line, index);
|
|
769
|
-
if (additionStartResult == null) return;
|
|
770
|
-
const additionStart = additionStartResult.value;
|
|
771
|
-
index = additionStartResult.endIndex;
|
|
772
|
-
let additionCount = 1;
|
|
773
|
-
if (line[index] === ",") {
|
|
774
|
-
const additionCountResult = readPositiveInteger(line, index + 1);
|
|
775
|
-
if (additionCountResult == null) return;
|
|
776
|
-
additionCount = additionCountResult.value;
|
|
777
|
-
index = additionCountResult.endIndex;
|
|
778
|
-
}
|
|
779
|
-
if (line[index] !== " " || line[index + 1] !== "@" || line[index + 2] !== "@") return;
|
|
780
|
-
let hunkContext;
|
|
781
|
-
const contextStartIndex = index + 3;
|
|
782
|
-
if (line[contextStartIndex] === " ") hunkContext = trimLineEnd(line.slice(contextStartIndex + 1));
|
|
783
|
-
return {
|
|
784
|
-
additionCount,
|
|
785
|
-
additionStart,
|
|
786
|
-
deletionCount,
|
|
787
|
-
deletionStart,
|
|
788
|
-
hunkContext
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
function readPositiveInteger(value, startIndex) {
|
|
792
|
-
let index = startIndex;
|
|
793
|
-
let parsedValue = 0;
|
|
794
|
-
for (; index < value.length; index++) {
|
|
795
|
-
const digit = value.charCodeAt(index) - 48;
|
|
796
|
-
if (digit < 0 || digit > 9) break;
|
|
797
|
-
parsedValue = parsedValue * 10 + digit;
|
|
798
|
-
}
|
|
799
|
-
if (index === startIndex) return;
|
|
800
|
-
return {
|
|
801
|
-
value: parsedValue,
|
|
802
|
-
endIndex: index
|
|
803
|
-
};
|
|
804
|
-
}
|
|
805
|
-
function trimLineEnd(value) {
|
|
806
|
-
if (value.endsWith("\r\n")) return value.slice(0, -2);
|
|
807
|
-
if (value.endsWith("\n")) return value.slice(0, -1);
|
|
808
|
-
return value;
|
|
809
|
-
}
|
|
810
|
-
function splitAtLinePrefix(contents, prefix) {
|
|
811
|
-
if (contents.length === 0) return [""];
|
|
812
|
-
const newlinePrefix = `\n${prefix}`;
|
|
813
|
-
const firstBoundaryIndex = contents.startsWith(prefix) ? 0 : findLinePrefixIndex(contents, newlinePrefix, 0);
|
|
814
|
-
if (firstBoundaryIndex === -1) return [contents];
|
|
815
|
-
const parts = [];
|
|
816
|
-
if (firstBoundaryIndex > 0) parts.push(contents.slice(0, firstBoundaryIndex));
|
|
817
|
-
let startIndex = firstBoundaryIndex;
|
|
818
|
-
for (;;) {
|
|
819
|
-
const nextBoundaryIndex = findLinePrefixIndex(contents, newlinePrefix, startIndex + 1);
|
|
820
|
-
if (nextBoundaryIndex === -1) break;
|
|
821
|
-
parts.push(contents.slice(startIndex, nextBoundaryIndex));
|
|
822
|
-
startIndex = nextBoundaryIndex;
|
|
823
|
-
}
|
|
824
|
-
parts.push(contents.slice(startIndex));
|
|
825
|
-
return parts;
|
|
826
|
-
}
|
|
827
|
-
function findLinePrefixIndex(contents, newlinePrefix, fromIndex) {
|
|
828
|
-
const index = contents.indexOf(newlinePrefix, fromIndex);
|
|
829
|
-
return index === -1 ? -1 : index + 1;
|
|
830
|
-
}
|
|
831
|
-
function maybeDetachOptionalString(value) {
|
|
832
|
-
return value == null ? value : detachString(value);
|
|
833
|
-
}
|
|
834
|
-
function parseRawLineType(firstChar) {
|
|
835
|
-
return firstChar === " " ? "context" : firstChar === "\\" ? "metadata" : firstChar === "+" ? "addition" : "deletion";
|
|
836
|
-
}
|
|
837
|
-
function getParsedLineContent(rawLine) {
|
|
838
|
-
const processedLine = rawLine.slice(1);
|
|
839
|
-
return detachString(processedLine === "" ? "\n" : processedLine);
|
|
840
|
-
}
|
|
841
|
-
function createContentGroup(type, deletionLineIndex, additionLineIndex) {
|
|
842
|
-
if (type === "change") return {
|
|
843
|
-
type: "change",
|
|
844
|
-
additions: 0,
|
|
845
|
-
deletions: 0,
|
|
846
|
-
additionLineIndex,
|
|
847
|
-
deletionLineIndex
|
|
848
|
-
};
|
|
849
|
-
return {
|
|
850
|
-
type: "context",
|
|
851
|
-
lines: 0,
|
|
852
|
-
additionLineIndex,
|
|
853
|
-
deletionLineIndex
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
//#endregion
|
|
857
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/base.js
|
|
858
|
-
var Diff = class {
|
|
859
|
-
diff(oldStr, newStr, options = {}) {
|
|
860
|
-
let callback;
|
|
861
|
-
if (typeof options === "function") {
|
|
862
|
-
callback = options;
|
|
863
|
-
options = {};
|
|
864
|
-
} else if ("callback" in options) callback = options.callback;
|
|
865
|
-
const oldString = this.castInput(oldStr, options);
|
|
866
|
-
const newString = this.castInput(newStr, options);
|
|
867
|
-
const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
|
|
868
|
-
const newTokens = this.removeEmpty(this.tokenize(newString, options));
|
|
869
|
-
return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
|
|
870
|
-
}
|
|
871
|
-
diffWithOptionsObj(oldTokens, newTokens, options, callback) {
|
|
872
|
-
var _a;
|
|
873
|
-
const done = (value) => {
|
|
874
|
-
value = this.postProcess(value, options);
|
|
875
|
-
if (callback) {
|
|
876
|
-
setTimeout(function() {
|
|
877
|
-
callback(value);
|
|
878
|
-
}, 0);
|
|
879
|
-
return;
|
|
880
|
-
} else return value;
|
|
881
|
-
};
|
|
882
|
-
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
883
|
-
let editLength = 1;
|
|
884
|
-
let maxEditLength = newLen + oldLen;
|
|
885
|
-
if (options.maxEditLength != null) maxEditLength = Math.min(maxEditLength, options.maxEditLength);
|
|
886
|
-
const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;
|
|
887
|
-
const abortAfterTimestamp = Date.now() + maxExecutionTime;
|
|
888
|
-
const bestPath = [{
|
|
889
|
-
oldPos: -1,
|
|
890
|
-
lastComponent: void 0
|
|
891
|
-
}];
|
|
892
|
-
let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
|
|
893
|
-
if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
|
|
894
|
-
let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
|
|
895
|
-
const execEditLength = () => {
|
|
896
|
-
for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
|
|
897
|
-
let basePath;
|
|
898
|
-
const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
|
|
899
|
-
if (removePath) bestPath[diagonalPath - 1] = void 0;
|
|
900
|
-
let canAdd = false;
|
|
901
|
-
if (addPath) {
|
|
902
|
-
const addPathNewPos = addPath.oldPos - diagonalPath;
|
|
903
|
-
canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
|
|
904
|
-
}
|
|
905
|
-
const canRemove = removePath && removePath.oldPos + 1 < oldLen;
|
|
906
|
-
if (!canAdd && !canRemove) {
|
|
907
|
-
bestPath[diagonalPath] = void 0;
|
|
908
|
-
continue;
|
|
909
|
-
}
|
|
910
|
-
if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) basePath = this.addToPath(addPath, true, false, 0, options);
|
|
911
|
-
else basePath = this.addToPath(removePath, false, true, 1, options);
|
|
912
|
-
newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
|
|
913
|
-
if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
|
|
914
|
-
else {
|
|
915
|
-
bestPath[diagonalPath] = basePath;
|
|
916
|
-
if (basePath.oldPos + 1 >= oldLen) maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
|
|
917
|
-
if (newPos + 1 >= newLen) minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
editLength++;
|
|
921
|
-
};
|
|
922
|
-
if (callback) (function exec() {
|
|
923
|
-
setTimeout(function() {
|
|
924
|
-
if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) return callback(void 0);
|
|
925
|
-
if (!execEditLength()) exec();
|
|
926
|
-
}, 0);
|
|
927
|
-
})();
|
|
928
|
-
else while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
|
|
929
|
-
const ret = execEditLength();
|
|
930
|
-
if (ret) return ret;
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
addToPath(path, added, removed, oldPosInc, options) {
|
|
934
|
-
const last = path.lastComponent;
|
|
935
|
-
if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) return {
|
|
936
|
-
oldPos: path.oldPos + oldPosInc,
|
|
937
|
-
lastComponent: {
|
|
938
|
-
count: last.count + 1,
|
|
939
|
-
added,
|
|
940
|
-
removed,
|
|
941
|
-
previousComponent: last.previousComponent
|
|
942
|
-
}
|
|
943
|
-
};
|
|
944
|
-
else return {
|
|
945
|
-
oldPos: path.oldPos + oldPosInc,
|
|
946
|
-
lastComponent: {
|
|
947
|
-
count: 1,
|
|
948
|
-
added,
|
|
949
|
-
removed,
|
|
950
|
-
previousComponent: last
|
|
951
|
-
}
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
|
|
955
|
-
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
956
|
-
let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
|
|
957
|
-
while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
|
|
958
|
-
newPos++;
|
|
959
|
-
oldPos++;
|
|
960
|
-
commonCount++;
|
|
961
|
-
if (options.oneChangePerToken) basePath.lastComponent = {
|
|
962
|
-
count: 1,
|
|
963
|
-
previousComponent: basePath.lastComponent,
|
|
964
|
-
added: false,
|
|
965
|
-
removed: false
|
|
966
|
-
};
|
|
967
|
-
}
|
|
968
|
-
if (commonCount && !options.oneChangePerToken) basePath.lastComponent = {
|
|
969
|
-
count: commonCount,
|
|
970
|
-
previousComponent: basePath.lastComponent,
|
|
971
|
-
added: false,
|
|
972
|
-
removed: false
|
|
973
|
-
};
|
|
974
|
-
basePath.oldPos = oldPos;
|
|
975
|
-
return newPos;
|
|
976
|
-
}
|
|
977
|
-
equals(left, right, options) {
|
|
978
|
-
if (options.comparator) return options.comparator(left, right);
|
|
979
|
-
else return left === right || !!options.ignoreCase && left.toLowerCase() === right.toLowerCase();
|
|
980
|
-
}
|
|
981
|
-
removeEmpty(array) {
|
|
982
|
-
const ret = [];
|
|
983
|
-
for (let i = 0; i < array.length; i++) if (array[i]) ret.push(array[i]);
|
|
984
|
-
return ret;
|
|
985
|
-
}
|
|
986
|
-
castInput(value, options) {
|
|
987
|
-
return value;
|
|
988
|
-
}
|
|
989
|
-
tokenize(value, options) {
|
|
990
|
-
return Array.from(value);
|
|
991
|
-
}
|
|
992
|
-
join(chars) {
|
|
993
|
-
return chars.join("");
|
|
994
|
-
}
|
|
995
|
-
postProcess(changeObjects, options) {
|
|
996
|
-
return changeObjects;
|
|
997
|
-
}
|
|
998
|
-
get useLongestToken() {
|
|
999
|
-
return false;
|
|
1000
|
-
}
|
|
1001
|
-
buildValues(lastComponent, newTokens, oldTokens) {
|
|
1002
|
-
const components = [];
|
|
1003
|
-
let nextComponent;
|
|
1004
|
-
while (lastComponent) {
|
|
1005
|
-
components.push(lastComponent);
|
|
1006
|
-
nextComponent = lastComponent.previousComponent;
|
|
1007
|
-
delete lastComponent.previousComponent;
|
|
1008
|
-
lastComponent = nextComponent;
|
|
1009
|
-
}
|
|
1010
|
-
components.reverse();
|
|
1011
|
-
const componentLen = components.length;
|
|
1012
|
-
let componentPos = 0, newPos = 0, oldPos = 0;
|
|
1013
|
-
for (; componentPos < componentLen; componentPos++) {
|
|
1014
|
-
const component = components[componentPos];
|
|
1015
|
-
if (!component.removed) {
|
|
1016
|
-
if (!component.added && this.useLongestToken) {
|
|
1017
|
-
let value = newTokens.slice(newPos, newPos + component.count);
|
|
1018
|
-
value = value.map(function(value, i) {
|
|
1019
|
-
const oldValue = oldTokens[oldPos + i];
|
|
1020
|
-
return oldValue.length > value.length ? oldValue : value;
|
|
1021
|
-
});
|
|
1022
|
-
component.value = this.join(value);
|
|
1023
|
-
} else component.value = this.join(newTokens.slice(newPos, newPos + component.count));
|
|
1024
|
-
newPos += component.count;
|
|
1025
|
-
if (!component.added) oldPos += component.count;
|
|
1026
|
-
} else {
|
|
1027
|
-
component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
|
|
1028
|
-
oldPos += component.count;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
return components;
|
|
1032
|
-
}
|
|
1033
|
-
};
|
|
1034
|
-
//#endregion
|
|
1035
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/character.js
|
|
1036
|
-
var CharacterDiff = class extends Diff {};
|
|
1037
|
-
new CharacterDiff();
|
|
1038
|
-
//#endregion
|
|
1039
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/util/string.js
|
|
1040
|
-
function longestCommonPrefix(str1, str2) {
|
|
1041
|
-
let i;
|
|
1042
|
-
for (i = 0; i < str1.length && i < str2.length; i++) if (str1[i] != str2[i]) return str1.slice(0, i);
|
|
1043
|
-
return str1.slice(0, i);
|
|
1044
|
-
}
|
|
1045
|
-
function longestCommonSuffix(str1, str2) {
|
|
1046
|
-
let i;
|
|
1047
|
-
if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) return "";
|
|
1048
|
-
for (i = 0; i < str1.length && i < str2.length; i++) if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) return str1.slice(-i);
|
|
1049
|
-
return str1.slice(-i);
|
|
1050
|
-
}
|
|
1051
|
-
function replacePrefix(string, oldPrefix, newPrefix) {
|
|
1052
|
-
if (string.slice(0, oldPrefix.length) != oldPrefix) throw Error(`string ${JSON.stringify(string)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`);
|
|
1053
|
-
return newPrefix + string.slice(oldPrefix.length);
|
|
1054
|
-
}
|
|
1055
|
-
function replaceSuffix(string, oldSuffix, newSuffix) {
|
|
1056
|
-
if (!oldSuffix) return string + newSuffix;
|
|
1057
|
-
if (string.slice(-oldSuffix.length) != oldSuffix) throw Error(`string ${JSON.stringify(string)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`);
|
|
1058
|
-
return string.slice(0, -oldSuffix.length) + newSuffix;
|
|
1059
|
-
}
|
|
1060
|
-
function removePrefix(string, oldPrefix) {
|
|
1061
|
-
return replacePrefix(string, oldPrefix, "");
|
|
1062
|
-
}
|
|
1063
|
-
function removeSuffix(string, oldSuffix) {
|
|
1064
|
-
return replaceSuffix(string, oldSuffix, "");
|
|
1065
|
-
}
|
|
1066
|
-
function maximumOverlap(string1, string2) {
|
|
1067
|
-
return string2.slice(0, overlapCount(string1, string2));
|
|
1068
|
-
}
|
|
1069
|
-
function overlapCount(a, b) {
|
|
1070
|
-
let startA = 0;
|
|
1071
|
-
if (a.length > b.length) startA = a.length - b.length;
|
|
1072
|
-
let endB = b.length;
|
|
1073
|
-
if (a.length < b.length) endB = a.length;
|
|
1074
|
-
const map = Array(endB);
|
|
1075
|
-
let k = 0;
|
|
1076
|
-
map[0] = 0;
|
|
1077
|
-
for (let j = 1; j < endB; j++) {
|
|
1078
|
-
if (b[j] == b[k]) map[j] = map[k];
|
|
1079
|
-
else map[j] = k;
|
|
1080
|
-
while (k > 0 && b[j] != b[k]) k = map[k];
|
|
1081
|
-
if (b[j] == b[k]) k++;
|
|
1082
|
-
}
|
|
1083
|
-
k = 0;
|
|
1084
|
-
for (let i = startA; i < a.length; i++) {
|
|
1085
|
-
while (k > 0 && a[i] != b[k]) k = map[k];
|
|
1086
|
-
if (a[i] == b[k]) k++;
|
|
1087
|
-
}
|
|
1088
|
-
return k;
|
|
1089
|
-
}
|
|
1090
|
-
/**
|
|
1091
|
-
* Split a string into segments using a word segmenter, merging consecutive
|
|
1092
|
-
* segments if they are both whitespace segments. Whitespace segments can
|
|
1093
|
-
* appear adjacent to one another for two reasons:
|
|
1094
|
-
* - newlines always get their own segment
|
|
1095
|
-
* - where a diacritic is attached to a whitespace character in the text, the
|
|
1096
|
-
* segment ends after the diacritic, so e.g. " \u0300 " becomes two segments.
|
|
1097
|
-
* This function therefore runs the segmenter's .segment() method and then
|
|
1098
|
-
* merges consecutive segments of whitespace into a single part.
|
|
1099
|
-
*/
|
|
1100
|
-
function segment(string, segmenter) {
|
|
1101
|
-
const parts = [];
|
|
1102
|
-
for (const segmentObj of Array.from(segmenter.segment(string))) {
|
|
1103
|
-
const segment = segmentObj.segment;
|
|
1104
|
-
if (parts.length && /\s/.test(parts[parts.length - 1]) && /\s/.test(segment)) parts[parts.length - 1] += segment;
|
|
1105
|
-
else parts.push(segment);
|
|
1106
|
-
}
|
|
1107
|
-
return parts;
|
|
1108
|
-
}
|
|
1109
|
-
function trailingWs(string, segmenter) {
|
|
1110
|
-
if (segmenter) return leadingAndTrailingWs(string, segmenter)[1];
|
|
1111
|
-
let i;
|
|
1112
|
-
for (i = string.length - 1; i >= 0; i--) if (!string[i].match(/\s/)) break;
|
|
1113
|
-
return string.substring(i + 1);
|
|
1114
|
-
}
|
|
1115
|
-
function leadingWs(string, segmenter) {
|
|
1116
|
-
if (segmenter) return leadingAndTrailingWs(string, segmenter)[0];
|
|
1117
|
-
const match = string.match(/^\s*/);
|
|
1118
|
-
return match ? match[0] : "";
|
|
1119
|
-
}
|
|
1120
|
-
function leadingAndTrailingWs(string, segmenter) {
|
|
1121
|
-
if (!segmenter) return [leadingWs(string), trailingWs(string)];
|
|
1122
|
-
if (segmenter.resolvedOptions().granularity != "word") throw new Error("The segmenter passed must have a granularity of \"word\"");
|
|
1123
|
-
const segments = segment(string, segmenter);
|
|
1124
|
-
const firstSeg = segments[0];
|
|
1125
|
-
const lastSeg = segments[segments.length - 1];
|
|
1126
|
-
return [/\s/.test(firstSeg) ? firstSeg : "", /\s/.test(lastSeg) ? lastSeg : ""];
|
|
1127
|
-
}
|
|
1128
|
-
//#endregion
|
|
1129
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/word.js
|
|
1130
|
-
var extendedWordChars = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";
|
|
1131
|
-
var tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, "ug");
|
|
1132
|
-
var WordDiff = class extends Diff {
|
|
1133
|
-
equals(left, right, options) {
|
|
1134
|
-
if (options.ignoreCase) {
|
|
1135
|
-
left = left.toLowerCase();
|
|
1136
|
-
right = right.toLowerCase();
|
|
1137
|
-
}
|
|
1138
|
-
return left.trim() === right.trim();
|
|
1139
|
-
}
|
|
1140
|
-
tokenize(value, options = {}) {
|
|
1141
|
-
let parts;
|
|
1142
|
-
if (options.intlSegmenter) {
|
|
1143
|
-
const segmenter = options.intlSegmenter;
|
|
1144
|
-
if (segmenter.resolvedOptions().granularity != "word") throw new Error("The segmenter passed must have a granularity of \"word\"");
|
|
1145
|
-
parts = segment(value, segmenter);
|
|
1146
|
-
} else parts = value.match(tokenizeIncludingWhitespace) || [];
|
|
1147
|
-
const tokens = [];
|
|
1148
|
-
let prevPart = null;
|
|
1149
|
-
parts.forEach((part) => {
|
|
1150
|
-
if (/\s/.test(part)) {
|
|
1151
|
-
if (prevPart == null) tokens.push(part);
|
|
1152
|
-
else tokens.push(tokens.pop() + part);
|
|
1153
|
-
} else if (prevPart != null && /\s/.test(prevPart)) {
|
|
1154
|
-
if (tokens[tokens.length - 1] == prevPart) tokens.push(tokens.pop() + part);
|
|
1155
|
-
else tokens.push(prevPart + part);
|
|
1156
|
-
} else tokens.push(part);
|
|
1157
|
-
prevPart = part;
|
|
1158
|
-
});
|
|
1159
|
-
return tokens;
|
|
1160
|
-
}
|
|
1161
|
-
join(tokens) {
|
|
1162
|
-
return tokens.map((token, i) => {
|
|
1163
|
-
if (i == 0) return token;
|
|
1164
|
-
else return token.replace(/^\s+/, "");
|
|
1165
|
-
}).join("");
|
|
1166
|
-
}
|
|
1167
|
-
postProcess(changes, options) {
|
|
1168
|
-
if (!changes || options.oneChangePerToken) return changes;
|
|
1169
|
-
let lastKeep = null;
|
|
1170
|
-
let insertion = null;
|
|
1171
|
-
let deletion = null;
|
|
1172
|
-
changes.forEach((change) => {
|
|
1173
|
-
if (change.added) insertion = change;
|
|
1174
|
-
else if (change.removed) deletion = change;
|
|
1175
|
-
else {
|
|
1176
|
-
if (insertion || deletion) dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter);
|
|
1177
|
-
lastKeep = change;
|
|
1178
|
-
insertion = null;
|
|
1179
|
-
deletion = null;
|
|
1180
|
-
}
|
|
1181
|
-
});
|
|
1182
|
-
if (insertion || deletion) dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter);
|
|
1183
|
-
return changes;
|
|
1184
|
-
}
|
|
1185
|
-
};
|
|
1186
|
-
new WordDiff();
|
|
1187
|
-
function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) {
|
|
1188
|
-
if (deletion && insertion) {
|
|
1189
|
-
const [oldWsPrefix, oldWsSuffix] = leadingAndTrailingWs(deletion.value, segmenter);
|
|
1190
|
-
const [newWsPrefix, newWsSuffix] = leadingAndTrailingWs(insertion.value, segmenter);
|
|
1191
|
-
if (startKeep) {
|
|
1192
|
-
const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix);
|
|
1193
|
-
startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix);
|
|
1194
|
-
deletion.value = removePrefix(deletion.value, commonWsPrefix);
|
|
1195
|
-
insertion.value = removePrefix(insertion.value, commonWsPrefix);
|
|
1196
|
-
}
|
|
1197
|
-
if (endKeep) {
|
|
1198
|
-
const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix);
|
|
1199
|
-
endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix);
|
|
1200
|
-
deletion.value = removeSuffix(deletion.value, commonWsSuffix);
|
|
1201
|
-
insertion.value = removeSuffix(insertion.value, commonWsSuffix);
|
|
1202
|
-
}
|
|
1203
|
-
} else if (insertion) {
|
|
1204
|
-
if (startKeep) {
|
|
1205
|
-
const ws = leadingWs(insertion.value, segmenter);
|
|
1206
|
-
insertion.value = insertion.value.substring(ws.length);
|
|
1207
|
-
}
|
|
1208
|
-
if (endKeep) {
|
|
1209
|
-
const ws = leadingWs(endKeep.value, segmenter);
|
|
1210
|
-
endKeep.value = endKeep.value.substring(ws.length);
|
|
1211
|
-
}
|
|
1212
|
-
} else if (startKeep && endKeep) {
|
|
1213
|
-
const newWsFull = leadingWs(endKeep.value, segmenter), [delWsStart, delWsEnd] = leadingAndTrailingWs(deletion.value, segmenter);
|
|
1214
|
-
const newWsStart = longestCommonPrefix(newWsFull, delWsStart);
|
|
1215
|
-
deletion.value = removePrefix(deletion.value, newWsStart);
|
|
1216
|
-
const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd);
|
|
1217
|
-
deletion.value = removeSuffix(deletion.value, newWsEnd);
|
|
1218
|
-
endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd);
|
|
1219
|
-
startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));
|
|
1220
|
-
} else if (endKeep) {
|
|
1221
|
-
const endKeepWsPrefix = leadingWs(endKeep.value, segmenter);
|
|
1222
|
-
const overlap = maximumOverlap(trailingWs(deletion.value, segmenter), endKeepWsPrefix);
|
|
1223
|
-
deletion.value = removeSuffix(deletion.value, overlap);
|
|
1224
|
-
} else if (startKeep) {
|
|
1225
|
-
const overlap = maximumOverlap(trailingWs(startKeep.value, segmenter), leadingWs(deletion.value, segmenter));
|
|
1226
|
-
deletion.value = removePrefix(deletion.value, overlap);
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
var WordsWithSpaceDiff = class extends Diff {
|
|
1230
|
-
tokenize(value) {
|
|
1231
|
-
const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, "ug");
|
|
1232
|
-
return value.match(regex) || [];
|
|
1233
|
-
}
|
|
1234
|
-
};
|
|
1235
|
-
new WordsWithSpaceDiff();
|
|
1236
|
-
//#endregion
|
|
1237
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/line.js
|
|
1238
|
-
var LineDiff = class extends Diff {
|
|
1239
|
-
constructor() {
|
|
1240
|
-
super(...arguments);
|
|
1241
|
-
this.tokenize = tokenize;
|
|
1242
|
-
}
|
|
1243
|
-
equals(left, right, options) {
|
|
1244
|
-
if (options.ignoreWhitespace) {
|
|
1245
|
-
if (!options.newlineIsToken || !left.includes("\n")) left = left.trim();
|
|
1246
|
-
if (!options.newlineIsToken || !right.includes("\n")) right = right.trim();
|
|
1247
|
-
} else if (options.ignoreNewlineAtEof && !options.newlineIsToken) {
|
|
1248
|
-
if (left.endsWith("\n")) left = left.slice(0, -1);
|
|
1249
|
-
if (right.endsWith("\n")) right = right.slice(0, -1);
|
|
1250
|
-
}
|
|
1251
|
-
return super.equals(left, right, options);
|
|
1252
|
-
}
|
|
1253
|
-
};
|
|
1254
|
-
var lineDiff = new LineDiff();
|
|
1255
|
-
function diffLines(oldStr, newStr, options) {
|
|
1256
|
-
return lineDiff.diff(oldStr, newStr, options);
|
|
1257
|
-
}
|
|
1258
|
-
function tokenize(value, options) {
|
|
1259
|
-
if (options.stripTrailingCr) value = value.replace(/\r\n/g, "\n");
|
|
1260
|
-
const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
|
|
1261
|
-
if (!linesAndNewlines[linesAndNewlines.length - 1]) linesAndNewlines.pop();
|
|
1262
|
-
for (let i = 0; i < linesAndNewlines.length; i++) {
|
|
1263
|
-
const line = linesAndNewlines[i];
|
|
1264
|
-
if (i % 2 && !options.newlineIsToken) retLines[retLines.length - 1] += line;
|
|
1265
|
-
else retLines.push(line);
|
|
1266
|
-
}
|
|
1267
|
-
return retLines;
|
|
1268
|
-
}
|
|
1269
|
-
//#endregion
|
|
1270
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/sentence.js
|
|
1271
|
-
function isSentenceEndPunct(char) {
|
|
1272
|
-
return char == "." || char == "!" || char == "?";
|
|
1273
|
-
}
|
|
1274
|
-
var SentenceDiff = class extends Diff {
|
|
1275
|
-
tokenize(value) {
|
|
1276
|
-
var _a;
|
|
1277
|
-
const result = [];
|
|
1278
|
-
let tokenStartI = 0;
|
|
1279
|
-
for (let i = 0; i < value.length; i++) {
|
|
1280
|
-
if (i == value.length - 1) {
|
|
1281
|
-
result.push(value.slice(tokenStartI));
|
|
1282
|
-
break;
|
|
1283
|
-
}
|
|
1284
|
-
if (isSentenceEndPunct(value[i]) && value[i + 1].match(/\s/)) {
|
|
1285
|
-
result.push(value.slice(tokenStartI, i + 1));
|
|
1286
|
-
i = tokenStartI = i + 1;
|
|
1287
|
-
while ((_a = value[i + 1]) === null || _a === void 0 ? void 0 : _a.match(/\s/)) i++;
|
|
1288
|
-
result.push(value.slice(tokenStartI, i + 1));
|
|
1289
|
-
tokenStartI = i + 1;
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
return result;
|
|
1293
|
-
}
|
|
1294
|
-
};
|
|
1295
|
-
new SentenceDiff();
|
|
1296
|
-
//#endregion
|
|
1297
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/css.js
|
|
1298
|
-
var CssDiff = class extends Diff {
|
|
1299
|
-
tokenize(value) {
|
|
1300
|
-
return value.split(/([{}:;,]|\s+)/);
|
|
1301
|
-
}
|
|
1302
|
-
};
|
|
1303
|
-
new CssDiff();
|
|
1304
|
-
//#endregion
|
|
1305
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/json.js
|
|
1306
|
-
var JsonDiff = class extends Diff {
|
|
1307
|
-
constructor() {
|
|
1308
|
-
super(...arguments);
|
|
1309
|
-
this.tokenize = tokenize;
|
|
1310
|
-
}
|
|
1311
|
-
get useLongestToken() {
|
|
1312
|
-
return true;
|
|
1313
|
-
}
|
|
1314
|
-
castInput(value, options) {
|
|
1315
|
-
const { undefinedReplacement, stringifyReplacer = (k, v) => typeof v === "undefined" ? undefinedReplacement : v } = options;
|
|
1316
|
-
return typeof value === "string" ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, " ");
|
|
1317
|
-
}
|
|
1318
|
-
equals(left, right, options) {
|
|
1319
|
-
return super.equals(left.replace(/,([\r\n])/g, "$1"), right.replace(/,([\r\n])/g, "$1"), options);
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
new JsonDiff();
|
|
1323
|
-
function canonicalize(obj, stack, replacementStack, replacer, key) {
|
|
1324
|
-
stack = stack || [];
|
|
1325
|
-
replacementStack = replacementStack || [];
|
|
1326
|
-
if (replacer) obj = replacer(key === void 0 ? "" : key, obj);
|
|
1327
|
-
let i;
|
|
1328
|
-
for (i = 0; i < stack.length; i += 1) if (stack[i] === obj) return replacementStack[i];
|
|
1329
|
-
let canonicalizedObj;
|
|
1330
|
-
if ("[object Array]" === Object.prototype.toString.call(obj)) {
|
|
1331
|
-
stack.push(obj);
|
|
1332
|
-
canonicalizedObj = new Array(obj.length);
|
|
1333
|
-
replacementStack.push(canonicalizedObj);
|
|
1334
|
-
for (i = 0; i < obj.length; i += 1) canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, String(i));
|
|
1335
|
-
stack.pop();
|
|
1336
|
-
replacementStack.pop();
|
|
1337
|
-
return canonicalizedObj;
|
|
1338
|
-
}
|
|
1339
|
-
if (obj && obj.toJSON) obj = obj.toJSON();
|
|
1340
|
-
if (typeof obj === "object" && obj !== null) {
|
|
1341
|
-
stack.push(obj);
|
|
1342
|
-
canonicalizedObj = {};
|
|
1343
|
-
replacementStack.push(canonicalizedObj);
|
|
1344
|
-
const sortedKeys = [];
|
|
1345
|
-
let key;
|
|
1346
|
-
for (key in obj)
|
|
1347
|
-
/* istanbul ignore else */
|
|
1348
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) sortedKeys.push(key);
|
|
1349
|
-
sortedKeys.sort();
|
|
1350
|
-
for (i = 0; i < sortedKeys.length; i += 1) {
|
|
1351
|
-
key = sortedKeys[i];
|
|
1352
|
-
canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack, replacer, key);
|
|
1353
|
-
}
|
|
1354
|
-
stack.pop();
|
|
1355
|
-
replacementStack.pop();
|
|
1356
|
-
} else canonicalizedObj = obj;
|
|
1357
|
-
return canonicalizedObj;
|
|
1358
|
-
}
|
|
1359
|
-
//#endregion
|
|
1360
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/array.js
|
|
1361
|
-
var ArrayDiff = class extends Diff {
|
|
1362
|
-
tokenize(value) {
|
|
1363
|
-
return value.slice();
|
|
1364
|
-
}
|
|
1365
|
-
join(value) {
|
|
1366
|
-
return value;
|
|
1367
|
-
}
|
|
1368
|
-
removeEmpty(value) {
|
|
1369
|
-
return value;
|
|
1370
|
-
}
|
|
1371
|
-
};
|
|
1372
|
-
new ArrayDiff();
|
|
1373
|
-
//#endregion
|
|
1374
|
-
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/patch/create.js
|
|
1375
|
-
/**
|
|
1376
|
-
* Returns true if the filename contains characters that require C-style
|
|
1377
|
-
* quoting (as used by Git and GNU diffutils in diff output).
|
|
1378
|
-
*/
|
|
1379
|
-
function needsQuoting(s) {
|
|
1380
|
-
for (let i = 0; i < s.length; i++) if (s[i] < " " || s[i] > "~" || s[i] === "\"" || s[i] === "\\") return true;
|
|
1381
|
-
return false;
|
|
1382
|
-
}
|
|
1383
|
-
/**
|
|
1384
|
-
* C-style quotes a filename, encoding special characters as escape sequences
|
|
1385
|
-
* and non-ASCII bytes as octal escapes. This is the inverse of
|
|
1386
|
-
* `parseQuotedFileName` in parse.ts.
|
|
1387
|
-
*
|
|
1388
|
-
* Non-ASCII bytes are encoded as UTF-8 before being emitted as octal escapes.
|
|
1389
|
-
* This matches the behaviour of both Git and GNU diffutils, which always emit
|
|
1390
|
-
* UTF-8 octal escapes regardless of the underlying filesystem encoding (e.g.
|
|
1391
|
-
* Git for Windows converts from NTFS's UTF-16 to UTF-8 internally).
|
|
1392
|
-
*
|
|
1393
|
-
* If the filename doesn't need quoting, returns it as-is.
|
|
1394
|
-
*/
|
|
1395
|
-
function quoteFileNameIfNeeded(s) {
|
|
1396
|
-
if (!needsQuoting(s)) return s;
|
|
1397
|
-
let result = "\"";
|
|
1398
|
-
const bytes = new TextEncoder().encode(s);
|
|
1399
|
-
let i = 0;
|
|
1400
|
-
while (i < bytes.length) {
|
|
1401
|
-
const b = bytes[i];
|
|
1402
|
-
if (b === 7) result += "\\a";
|
|
1403
|
-
else if (b === 8) result += "\\b";
|
|
1404
|
-
else if (b === 9) result += "\\t";
|
|
1405
|
-
else if (b === 10) result += "\\n";
|
|
1406
|
-
else if (b === 11) result += "\\v";
|
|
1407
|
-
else if (b === 12) result += "\\f";
|
|
1408
|
-
else if (b === 13) result += "\\r";
|
|
1409
|
-
else if (b === 34) result += "\\\"";
|
|
1410
|
-
else if (b === 92) result += "\\\\";
|
|
1411
|
-
else if (b >= 32 && b <= 126) result += String.fromCharCode(b);
|
|
1412
|
-
else result += "\\" + b.toString(8).padStart(3, "0");
|
|
1413
|
-
i++;
|
|
1414
|
-
}
|
|
1415
|
-
result += "\"";
|
|
1416
|
-
return result;
|
|
1417
|
-
}
|
|
1418
|
-
var INCLUDE_HEADERS = {
|
|
1419
|
-
includeIndex: true,
|
|
1420
|
-
includeUnderline: true,
|
|
1421
|
-
includeFileHeaders: true
|
|
1422
|
-
};
|
|
1423
|
-
function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
1424
|
-
let optionsObj;
|
|
1425
|
-
if (!options) optionsObj = {};
|
|
1426
|
-
else if (typeof options === "function") optionsObj = { callback: options };
|
|
1427
|
-
else optionsObj = options;
|
|
1428
|
-
if (typeof optionsObj.context === "undefined") optionsObj.context = 4;
|
|
1429
|
-
const context = optionsObj.context;
|
|
1430
|
-
if (optionsObj.newlineIsToken) throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");
|
|
1431
|
-
if (!optionsObj.callback) return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj));
|
|
1432
|
-
else {
|
|
1433
|
-
const { callback } = optionsObj;
|
|
1434
|
-
diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {
|
|
1435
|
-
const patch = diffLinesResultToPatch(diff);
|
|
1436
|
-
callback(patch);
|
|
1437
|
-
} }));
|
|
1438
|
-
}
|
|
1439
|
-
function diffLinesResultToPatch(diff) {
|
|
1440
|
-
if (!diff) return;
|
|
1441
|
-
diff.push({
|
|
1442
|
-
value: "",
|
|
1443
|
-
lines: []
|
|
1444
|
-
});
|
|
1445
|
-
function contextLines(lines) {
|
|
1446
|
-
return lines.map(function(entry) {
|
|
1447
|
-
return " " + entry;
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
const hunks = [];
|
|
1451
|
-
let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
|
|
1452
|
-
for (let i = 0; i < diff.length; i++) {
|
|
1453
|
-
const current = diff[i], lines = current.lines || splitLines(current.value);
|
|
1454
|
-
current.lines = lines;
|
|
1455
|
-
if (current.added || current.removed) {
|
|
1456
|
-
if (!oldRangeStart) {
|
|
1457
|
-
const prev = diff[i - 1];
|
|
1458
|
-
oldRangeStart = oldLine;
|
|
1459
|
-
newRangeStart = newLine;
|
|
1460
|
-
if (prev) {
|
|
1461
|
-
curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : [];
|
|
1462
|
-
oldRangeStart -= curRange.length;
|
|
1463
|
-
newRangeStart -= curRange.length;
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
for (const line of lines) curRange.push((current.added ? "+" : "-") + line);
|
|
1467
|
-
if (current.added) newLine += lines.length;
|
|
1468
|
-
else oldLine += lines.length;
|
|
1469
|
-
} else {
|
|
1470
|
-
if (oldRangeStart) {
|
|
1471
|
-
if (lines.length <= context * 2 && i < diff.length - 2) for (const line of contextLines(lines)) curRange.push(line);
|
|
1472
|
-
else {
|
|
1473
|
-
const contextSize = Math.min(lines.length, context);
|
|
1474
|
-
for (const line of contextLines(lines.slice(0, contextSize))) curRange.push(line);
|
|
1475
|
-
const hunk = {
|
|
1476
|
-
oldStart: oldRangeStart,
|
|
1477
|
-
oldLines: oldLine - oldRangeStart + contextSize,
|
|
1478
|
-
newStart: newRangeStart,
|
|
1479
|
-
newLines: newLine - newRangeStart + contextSize,
|
|
1480
|
-
lines: curRange
|
|
1481
|
-
};
|
|
1482
|
-
hunks.push(hunk);
|
|
1483
|
-
oldRangeStart = 0;
|
|
1484
|
-
newRangeStart = 0;
|
|
1485
|
-
curRange = [];
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
oldLine += lines.length;
|
|
1489
|
-
newLine += lines.length;
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
for (const hunk of hunks) for (let i = 0; i < hunk.lines.length; i++) if (hunk.lines[i].endsWith("\n")) hunk.lines[i] = hunk.lines[i].slice(0, -1);
|
|
1493
|
-
else {
|
|
1494
|
-
hunk.lines.splice(i + 1, 0, "\");
|
|
1495
|
-
i++;
|
|
1496
|
-
}
|
|
1497
|
-
return {
|
|
1498
|
-
oldFileName,
|
|
1499
|
-
newFileName,
|
|
1500
|
-
oldHeader,
|
|
1501
|
-
newHeader,
|
|
1502
|
-
hunks
|
|
1503
|
-
};
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
/**
|
|
1507
|
-
* creates a unified diff patch.
|
|
1508
|
-
*
|
|
1509
|
-
* @param patch either a single structured patch object (as returned by `structuredPatch`) or an
|
|
1510
|
-
* array of them (as returned by `parsePatch`).
|
|
1511
|
-
* @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`.
|
|
1512
|
-
* Ignored for patches where `isGit` is `true`.
|
|
1513
|
-
*
|
|
1514
|
-
* When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's
|
|
1515
|
-
* output: it emits a `diff --git` header, emits Git extended headers as appropriate based on
|
|
1516
|
-
* properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file
|
|
1517
|
-
* headers for patches with no hunks (e.g. renames without content changes).
|
|
1518
|
-
*/
|
|
1519
|
-
function formatPatch(patch, headerOptions) {
|
|
1520
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1521
|
-
if (!headerOptions) headerOptions = INCLUDE_HEADERS;
|
|
1522
|
-
if (Array.isArray(patch)) {
|
|
1523
|
-
if (patch.length > 1 && !headerOptions.includeFileHeaders && !patch.every((p) => p.isGit)) throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");
|
|
1524
|
-
return patch.map((p) => formatPatch(p, headerOptions)).join("\n");
|
|
1525
|
-
}
|
|
1526
|
-
const ret = [];
|
|
1527
|
-
if (patch.isGit) {
|
|
1528
|
-
headerOptions = INCLUDE_HEADERS;
|
|
1529
|
-
if (!patch.oldFileName) throw new Error("oldFileName must be specified for Git patches");
|
|
1530
|
-
if (!patch.newFileName) throw new Error("newFileName must be specified for Git patches");
|
|
1531
|
-
let gitOldName = patch.oldFileName;
|
|
1532
|
-
let gitNewName = patch.newFileName;
|
|
1533
|
-
if (patch.isCreate && gitOldName === "/dev/null") gitOldName = gitNewName.replace(/^b\//, "a/");
|
|
1534
|
-
else if (patch.isDelete && gitNewName === "/dev/null") gitNewName = gitOldName.replace(/^a\//, "b/");
|
|
1535
|
-
ret.push("diff --git " + quoteFileNameIfNeeded(gitOldName) + " " + quoteFileNameIfNeeded(gitNewName));
|
|
1536
|
-
if (patch.isDelete) ret.push("deleted file mode " + ((_a = patch.oldMode) !== null && _a !== void 0 ? _a : "100644"));
|
|
1537
|
-
if (patch.isCreate) ret.push("new file mode " + ((_b = patch.newMode) !== null && _b !== void 0 ? _b : "100644"));
|
|
1538
|
-
if (patch.oldMode && patch.newMode && !patch.isDelete && !patch.isCreate) {
|
|
1539
|
-
ret.push("old mode " + patch.oldMode);
|
|
1540
|
-
ret.push("new mode " + patch.newMode);
|
|
1541
|
-
}
|
|
1542
|
-
if (patch.isRename) {
|
|
1543
|
-
ret.push("rename from " + quoteFileNameIfNeeded(((_c = patch.oldFileName) !== null && _c !== void 0 ? _c : "").replace(/^a\//, "")));
|
|
1544
|
-
ret.push("rename to " + quoteFileNameIfNeeded(((_d = patch.newFileName) !== null && _d !== void 0 ? _d : "").replace(/^b\//, "")));
|
|
1545
|
-
}
|
|
1546
|
-
if (patch.isCopy) {
|
|
1547
|
-
ret.push("copy from " + quoteFileNameIfNeeded(((_e = patch.oldFileName) !== null && _e !== void 0 ? _e : "").replace(/^a\//, "")));
|
|
1548
|
-
ret.push("copy to " + quoteFileNameIfNeeded(((_f = patch.newFileName) !== null && _f !== void 0 ? _f : "").replace(/^b\//, "")));
|
|
1549
|
-
}
|
|
1550
|
-
} else {
|
|
1551
|
-
if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName && patch.oldFileName !== void 0) ret.push("Index: " + patch.oldFileName);
|
|
1552
|
-
if (headerOptions.includeUnderline) ret.push("===================================================================");
|
|
1553
|
-
}
|
|
1554
|
-
const hasHunks = patch.hunks.length > 0;
|
|
1555
|
-
if (headerOptions.includeFileHeaders && patch.oldFileName !== void 0 && patch.newFileName !== void 0 && (!patch.isGit || hasHunks)) {
|
|
1556
|
-
ret.push("--- " + quoteFileNameIfNeeded(patch.oldFileName) + (patch.oldHeader ? " " + patch.oldHeader : ""));
|
|
1557
|
-
ret.push("+++ " + quoteFileNameIfNeeded(patch.newFileName) + (patch.newHeader ? " " + patch.newHeader : ""));
|
|
1558
|
-
}
|
|
1559
|
-
for (let i = 0; i < patch.hunks.length; i++) {
|
|
1560
|
-
const hunk = patch.hunks[i];
|
|
1561
|
-
const oldStart = hunk.oldLines === 0 ? hunk.oldStart - 1 : hunk.oldStart;
|
|
1562
|
-
const newStart = hunk.newLines === 0 ? hunk.newStart - 1 : hunk.newStart;
|
|
1563
|
-
ret.push("@@ -" + oldStart + "," + hunk.oldLines + " +" + newStart + "," + hunk.newLines + " @@");
|
|
1564
|
-
for (const line of hunk.lines) ret.push(line);
|
|
1565
|
-
}
|
|
1566
|
-
return ret.join("\n") + "\n";
|
|
1567
|
-
}
|
|
1568
|
-
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
1569
|
-
if (typeof options === "function") options = { callback: options };
|
|
1570
|
-
if (!(options === null || options === void 0 ? void 0 : options.callback)) {
|
|
1571
|
-
const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
1572
|
-
if (!patchObj) return;
|
|
1573
|
-
return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions);
|
|
1574
|
-
} else {
|
|
1575
|
-
const { callback } = options;
|
|
1576
|
-
structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: (patchObj) => {
|
|
1577
|
-
if (!patchObj) callback(void 0);
|
|
1578
|
-
else callback(formatPatch(patchObj, options.headerOptions));
|
|
1579
|
-
} }));
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
/**
|
|
1583
|
-
* Split `text` into an array of lines, including the trailing newline character (where present)
|
|
1584
|
-
*/
|
|
1585
|
-
function splitLines(text) {
|
|
1586
|
-
const hasTrailingNl = text.endsWith("\n");
|
|
1587
|
-
const result = text.split("\n").map((line) => line + "\n");
|
|
1588
|
-
if (hasTrailingNl) result.pop();
|
|
1589
|
-
else result.push(result.pop().slice(0, -1));
|
|
1590
|
-
return result;
|
|
1591
|
-
}
|
|
1592
|
-
//#endregion
|
|
1593
|
-
//#region node_modules/.pnpm/@pierre+diffs@1.3.5_@shikijs+themes@4.4.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js
|
|
1594
|
-
var MISSING_FILE_NAME = "/dev/null";
|
|
1595
|
-
/**
|
|
1596
|
-
* Parses a diff from two file contents objects.
|
|
1597
|
-
*
|
|
1598
|
-
* If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff will
|
|
1599
|
-
* automatically get a combined cache key in the format `oldKey:newKey`.
|
|
1600
|
-
*/
|
|
1601
|
-
function parseDiffFromFile(oldFile, newFile, options, throwOnError = false) {
|
|
1602
|
-
if (oldFile === null && newFile === null) throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");
|
|
1603
|
-
const resolvedOldFile = oldFile ?? createMissingFile();
|
|
1604
|
-
const resolvedNewFile = newFile ?? createMissingFile();
|
|
1605
|
-
const fileData = processFile(createTwoFilesPatch(resolvedOldFile.name, resolvedNewFile.name, resolvedOldFile.contents, resolvedNewFile.contents, resolvedOldFile.header, resolvedNewFile.header, options), {
|
|
1606
|
-
cacheKey: (() => {
|
|
1607
|
-
const oldCacheKey = oldFile?.cacheKey ?? oldFile?.name;
|
|
1608
|
-
const newCacheKey = newFile?.cacheKey ?? newFile?.name;
|
|
1609
|
-
if (oldCacheKey != null && newCacheKey != null) return oldCacheKey + ":" + newCacheKey;
|
|
1610
|
-
return oldCacheKey ?? newCacheKey;
|
|
1611
|
-
})(),
|
|
1612
|
-
oldFile: resolvedOldFile,
|
|
1613
|
-
newFile: resolvedNewFile,
|
|
1614
|
-
throwOnError
|
|
1615
|
-
});
|
|
1616
|
-
if (fileData == null) throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");
|
|
1617
|
-
if (oldFile === null) {
|
|
1618
|
-
fileData.type = "new";
|
|
1619
|
-
fileData.prevName = void 0;
|
|
1620
|
-
} else if (newFile === null) {
|
|
1621
|
-
fileData.type = "deleted";
|
|
1622
|
-
fileData.prevName = void 0;
|
|
1623
|
-
}
|
|
1624
|
-
const language = newFile?.lang ?? (newFile === null ? oldFile?.lang : void 0);
|
|
1625
|
-
if (language != null) fileData.lang = language;
|
|
1626
|
-
return fileData;
|
|
1627
|
-
}
|
|
1628
|
-
function createMissingFile() {
|
|
1629
|
-
return {
|
|
1630
|
-
name: MISSING_FILE_NAME,
|
|
1631
|
-
contents: ""
|
|
1632
|
-
};
|
|
1633
|
-
}
|
|
1634
|
-
var MAX_PER_FILE = 40;
|
|
1635
|
-
/** Substring search over path + lines pierre actually renders (hunk
|
|
1636
|
-
* change + context). Full-file old/new text is much larger than the
|
|
1637
|
-
* visible diff — counting those made Next feel broken ("32 matches"
|
|
1638
|
-
* with nothing on screen for many steps). */
|
|
1639
|
-
/** Last search, keyed by files identity + query: the find box asks up to
|
|
1640
|
-
* three times per keystroke (immediate paint, debounced state, template). */
|
|
1641
|
-
var last;
|
|
1642
|
-
/** Files with hits, or null when the list hit its cap and so can't say
|
|
1643
|
-
* which files are clean (paint then falls back to walking every host). */
|
|
1644
|
-
function hitKeys(hits) {
|
|
1645
|
-
return hits.length >= 200 ? null : [...new Set(hits.map((h) => h.key))];
|
|
1646
|
-
}
|
|
1647
|
-
function searchDiffFiles(files, raw) {
|
|
1648
|
-
const query = raw.trim();
|
|
1649
|
-
if (!query) return [];
|
|
1650
|
-
if (last && last.files === files && last.query === query) return last.hits;
|
|
1651
|
-
const hits = searchUncached(files, query);
|
|
1652
|
-
last = {
|
|
1653
|
-
files,
|
|
1654
|
-
query,
|
|
1655
|
-
hits
|
|
1656
|
-
};
|
|
1657
|
-
return hits;
|
|
1658
|
-
}
|
|
1659
|
-
/** Hunk line sets and split lines are query-independent and dominate the
|
|
1660
|
-
* cost (pierre re-parses the whole file); keep them per file object. */
|
|
1661
|
-
var parsed = /* @__PURE__ */ new WeakMap();
|
|
1662
|
-
function parsedFor(file) {
|
|
1663
|
-
let p = parsed.get(file);
|
|
1664
|
-
if (!p) {
|
|
1665
|
-
p = {
|
|
1666
|
-
visible: visibleHunkLines(file.old, file.new),
|
|
1667
|
-
newLines: file.new == null ? null : file.new.split("\n"),
|
|
1668
|
-
oldLines: file.old == null ? null : file.old.split("\n")
|
|
1669
|
-
};
|
|
1670
|
-
parsed.set(file, p);
|
|
1671
|
-
}
|
|
1672
|
-
return p;
|
|
1673
|
-
}
|
|
1674
|
-
function searchUncached(files, query) {
|
|
1675
|
-
const sensitive = /[A-Z]/.test(query);
|
|
1676
|
-
const needle = sensitive ? query : query.toLowerCase();
|
|
1677
|
-
const ascii = !/[^\x00-\x7f]/.test(needle);
|
|
1678
|
-
const hits = [];
|
|
1679
|
-
for (const file of files) {
|
|
1680
|
-
if (hits.length >= 200) break;
|
|
1681
|
-
const before = hits.length;
|
|
1682
|
-
if (ascii) {
|
|
1683
|
-
const oldHay = sensitive ? file.old || "" : (file.old || "").toLowerCase();
|
|
1684
|
-
const newHay = sensitive ? file.new || "" : (file.new || "").toLowerCase();
|
|
1685
|
-
if (!oldHay.includes(needle) && !newHay.includes(needle)) {
|
|
1686
|
-
if (pathMeaningfulMatch(file.path, needle, sensitive)) hits.push({
|
|
1687
|
-
key: file.key,
|
|
1688
|
-
path: file.path,
|
|
1689
|
-
repo: file.repo,
|
|
1690
|
-
line: 0,
|
|
1691
|
-
side: null,
|
|
1692
|
-
preview: file.path
|
|
1693
|
-
});
|
|
1694
|
-
continue;
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
const { visible, newLines, oldLines } = parsedFor(file);
|
|
1698
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1699
|
-
scanSide(file, newLines, "additions", needle, sensitive, seen, hits, visible.additions);
|
|
1700
|
-
scanSide(file, oldLines, "deletions", needle, sensitive, seen, hits, visible.deletions);
|
|
1701
|
-
if (hits.length === before && pathMeaningfulMatch(file.path, needle, sensitive)) hits.push({
|
|
1702
|
-
key: file.key,
|
|
1703
|
-
path: file.path,
|
|
1704
|
-
repo: file.repo,
|
|
1705
|
-
line: 0,
|
|
1706
|
-
side: null,
|
|
1707
|
-
preview: file.path
|
|
1708
|
-
});
|
|
1709
|
-
}
|
|
1710
|
-
return hits;
|
|
1711
|
-
}
|
|
1712
|
-
/** True when needle hits the path somewhere other than only the final
|
|
1713
|
-
* extension (`file.marko` + "marko" → false; `marko/src/x.ts` → true). */
|
|
1714
|
-
function pathMeaningfulMatch(path, needle, sensitive) {
|
|
1715
|
-
const hay = sensitive ? path : path.toLowerCase();
|
|
1716
|
-
if (!hay.includes(needle)) return false;
|
|
1717
|
-
const slash = path.lastIndexOf("/");
|
|
1718
|
-
const base = slash >= 0 ? path.slice(slash + 1) : path;
|
|
1719
|
-
const dot = base.lastIndexOf(".");
|
|
1720
|
-
if (dot <= 0) return true;
|
|
1721
|
-
const ext = base.slice(dot + 1);
|
|
1722
|
-
if (!(sensitive ? ext : ext.toLowerCase()).includes(needle)) return true;
|
|
1723
|
-
const extStartInPath = path.length - ext.length;
|
|
1724
|
-
for (let at = hay.indexOf(needle); at !== -1; at = hay.indexOf(needle, at + 1)) if (at < extStartInPath) return true;
|
|
1725
|
-
return false;
|
|
1726
|
-
}
|
|
1727
|
-
/** 1-based line numbers pierre shows for each side (hunk ranges only). */
|
|
1728
|
-
function visibleHunkLines(oldText, newText) {
|
|
1729
|
-
const additions = /* @__PURE__ */ new Set();
|
|
1730
|
-
const deletions = /* @__PURE__ */ new Set();
|
|
1731
|
-
if (oldText == null && newText == null) return {
|
|
1732
|
-
additions,
|
|
1733
|
-
deletions
|
|
1734
|
-
};
|
|
1735
|
-
try {
|
|
1736
|
-
const meta = parseDiffFromFile(oldText == null ? null : {
|
|
1737
|
-
name: "old",
|
|
1738
|
-
contents: oldText
|
|
1739
|
-
}, newText == null ? null : {
|
|
1740
|
-
name: "new",
|
|
1741
|
-
contents: newText
|
|
1742
|
-
});
|
|
1743
|
-
for (const h of meta.hunks) {
|
|
1744
|
-
for (let i = 0; i < h.additionCount; i++) additions.add(h.additionStart + i);
|
|
1745
|
-
for (let i = 0; i < h.deletionCount; i++) deletions.add(h.deletionStart + i);
|
|
1746
|
-
}
|
|
1747
|
-
} catch {}
|
|
1748
|
-
return {
|
|
1749
|
-
additions,
|
|
1750
|
-
deletions
|
|
1751
|
-
};
|
|
1752
|
-
}
|
|
1753
|
-
function scanSide(file, lines, side, needle, sensitive, seen, hits, visible) {
|
|
1754
|
-
if (!lines || hits.length >= 200 || !visible.size) return;
|
|
1755
|
-
let fromFile = 0;
|
|
1756
|
-
for (let i = 0; i < lines.length; i++) {
|
|
1757
|
-
if (hits.length >= 200 || fromFile >= MAX_PER_FILE) return;
|
|
1758
|
-
const lineNo = i + 1;
|
|
1759
|
-
if (!visible.has(lineNo)) continue;
|
|
1760
|
-
const line = lines[i];
|
|
1761
|
-
const at = (sensitive ? line : line.toLowerCase()).indexOf(needle);
|
|
1762
|
-
if (at < 0) continue;
|
|
1763
|
-
if (side === "deletions" && seen.has(line)) continue;
|
|
1764
|
-
if (side === "additions") seen.add(line);
|
|
1765
|
-
fromFile++;
|
|
1766
|
-
hits.push({
|
|
1767
|
-
key: file.key,
|
|
1768
|
-
path: file.path,
|
|
1769
|
-
repo: file.repo,
|
|
1770
|
-
line: lineNo,
|
|
1771
|
-
side,
|
|
1772
|
-
preview: clip(line, at, needle.length)
|
|
1773
|
-
});
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
function clip(line, at, len) {
|
|
1777
|
-
const pad = 36;
|
|
1778
|
-
const start = Math.max(0, at - pad);
|
|
1779
|
-
const end = Math.min(line.length, at + len + pad);
|
|
1780
|
-
return (start > 0 ? "…" : "") + line.slice(start, end) + (end < line.length ? "…" : "");
|
|
1781
|
-
}
|
|
1782
|
-
//#endregion
|
|
1783
|
-
//#region src/tags/diff-find.marko
|
|
1784
|
-
var setSearchPaint$1;
|
|
1785
|
-
var diff_find_default = _template("i", (input) => {
|
|
1786
|
-
const $scope0_reason = _scope_reason();
|
|
1787
|
-
const $scope0_id = _scope_id();
|
|
1788
|
-
let open = input.open;
|
|
1789
|
-
let query = input.query;
|
|
1790
|
-
input.state;
|
|
1791
|
-
let hi = 0;
|
|
1792
|
-
const hits = searchDiffFiles(input.files, query || "");
|
|
1793
|
-
const at = hits.length ? Math.min(hi, hits.length - 1) : -1;
|
|
1794
|
-
const live = { open: false };
|
|
1795
|
-
const box = {
|
|
1796
|
-
timer: 0,
|
|
1797
|
-
tick: 0,
|
|
1798
|
-
wasOpen: false
|
|
1799
|
-
};
|
|
1800
|
-
const emit = _resume((q, i) => {
|
|
1801
|
-
if (!live.open) return;
|
|
1802
|
-
const list = searchDiffFiles(input.files, q);
|
|
1803
|
-
const keys = [...new Set(list.map((h) => h.key))];
|
|
1804
|
-
if (!list.length) {
|
|
1805
|
-
hi = 0;
|
|
1806
|
-
setSearchPaint$1(q, null, keys);
|
|
1807
|
-
return;
|
|
1808
|
-
}
|
|
1809
|
-
hi = (i % list.length + list.length) % list.length;
|
|
1810
|
-
const hit = list[hi];
|
|
1811
|
-
setSearchPaint$1(q, hit, hitKeys(list) ?? void 0);
|
|
1812
|
-
}, "i1", $scope0_id);
|
|
1813
|
-
const type = _resume((v) => {
|
|
1814
|
-
if (!live.open) return;
|
|
1815
|
-
query = v;
|
|
1816
|
-
hi = 0;
|
|
1817
|
-
const list = searchDiffFiles(input.files, v);
|
|
1818
|
-
setSearchPaint$1(v, list[0] ?? null, hitKeys(list) ?? void 0);
|
|
1819
|
-
if (box.timer) clearTimeout(box.timer);
|
|
1820
|
-
box.timer = setTimeout(() => {
|
|
1821
|
-
box.timer = 0;
|
|
1822
|
-
emit(v, 0);
|
|
1823
|
-
}, 80);
|
|
1824
|
-
}, "i2", $scope0_id);
|
|
1825
|
-
const next = _resume((dir) => {
|
|
1826
|
-
if (!live.open) return;
|
|
1827
|
-
if (box.timer) {
|
|
1828
|
-
clearTimeout(box.timer);
|
|
1829
|
-
box.timer = 0;
|
|
1830
|
-
}
|
|
1831
|
-
emit(query || "", (at < 0 ? 0 : at) + dir);
|
|
1832
|
-
}, "i3", $scope0_id);
|
|
1833
|
-
const close = _resume(() => {
|
|
1834
|
-
open = false;
|
|
1835
|
-
live.open = false;
|
|
1836
|
-
if (box.timer) {
|
|
1837
|
-
clearTimeout(box.timer);
|
|
1838
|
-
box.timer = 0;
|
|
1839
|
-
}
|
|
1840
|
-
setSearchPaint$1("", null);
|
|
1841
|
-
}, "i4", $scope0_id);
|
|
1842
|
-
const focusInput = _resume(() => {
|
|
1843
|
-
const el = ((findEl) => findEl())(_el_read_error);
|
|
1844
|
-
if (!el) return;
|
|
1845
|
-
el.focus();
|
|
1846
|
-
el.select();
|
|
1847
|
-
if (document.activeElement !== el) setTimeout(() => {
|
|
1848
|
-
el.focus();
|
|
1849
|
-
el.select();
|
|
1850
|
-
}, 0);
|
|
1851
|
-
}, "i5", $scope0_id);
|
|
1852
|
-
_html(`<div${_attr_class(["_gB", !open && "_gA"])} aria-hidden=${open ? "false" : "true"}><input${_attr_input_value($scope0_id, "b", query || "", _resume(function(v) {
|
|
1853
|
-
type(v);
|
|
1854
|
-
}, "i0", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in review" aria-label="Find in review">${_el_resume($scope0_id, "b")}<span${_attr_class("_gE")}>${open && (query || "").trim() ? hits.length ? `${_escape(`${at + 1}`)}/${_escape(`${hits.length}`)}` : "0/0" : ""}${_el_resume($scope0_id, "d")}</span><button type=button${_attr_class(findIconBtn)} title="Previous match"${_attr("disabled", !hits.length || !open)} tabindex=${open ? "0" : "-1"}>`);
|
|
1855
|
-
icon_arrow_up_default({ size: 14 });
|
|
1856
|
-
_html(`</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class(findIconBtn)} title="Next match"${_attr("disabled", !hits.length || !open)} tabindex=${open ? "0" : "-1"}>`);
|
|
1857
|
-
icon_arrow_down_default({ size: 14 });
|
|
1858
|
-
_html(`</button>${_el_resume($scope0_id, "g")}<button type=button${_attr_class(findIconBtn)} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
1859
|
-
icon_xmark_default({ size: 14 });
|
|
1860
|
-
_html(`</button>${_el_resume($scope0_id, "i")}</div>${_el_resume($scope0_id, "a")}`);
|
|
1861
|
-
_script($scope0_id, "i6");
|
|
1862
|
-
_script($scope0_id, "i7");
|
|
1863
|
-
_script($scope0_id, "i8");
|
|
1864
|
-
writeScope($scope0_id, {
|
|
1865
|
-
m: _serialize_if($scope0_reason, 1) && input.open,
|
|
1866
|
-
n: _serialize_if($scope0_reason, 0) && input.openChange,
|
|
1867
|
-
p: _serialize_if($scope0_reason, 3) && input.query,
|
|
1868
|
-
q: _serialize_if($scope0_reason, 2) && input.queryChange,
|
|
1869
|
-
s: _serialize_if($scope0_reason, 5) && input.state,
|
|
1870
|
-
t: _serialize_if($scope0_reason, 4) && input.stateChange,
|
|
1871
|
-
v: input.files,
|
|
1872
|
-
w: input.focusRef,
|
|
1873
|
-
x: input.tick,
|
|
1874
|
-
y: open,
|
|
1875
|
-
a0: query,
|
|
1876
|
-
a5: hi,
|
|
1877
|
-
a7: hits?.length,
|
|
1878
|
-
aa: at,
|
|
1879
|
-
ad: live.open,
|
|
1880
|
-
ag: box.timer,
|
|
1881
|
-
ai: box.tick,
|
|
1882
|
-
aj: box.wasOpen,
|
|
1883
|
-
ak: emit,
|
|
1884
|
-
an: type,
|
|
1885
|
-
ap: next,
|
|
1886
|
-
aq: close,
|
|
1887
|
-
ar: focusInput,
|
|
1888
|
-
z: input.openChange || void 0,
|
|
1889
|
-
a1: input.queryChange || void 0,
|
|
1890
|
-
a4: input.stateChange || void 0
|
|
1891
|
-
});
|
|
1892
|
-
_resume_branch($scope0_id);
|
|
1893
|
-
});
|
|
1894
|
-
//#endregion
|
|
1895
|
-
//#region src/client/branch-label.ts
|
|
1896
|
-
/** Fallback label for a workspace branch when the workspace name is not to
|
|
1897
|
-
* hand: `alice-laptop-checkout-4f1hei` → `alice-laptop-checkout`.
|
|
1898
|
-
*
|
|
1899
|
-
* Deliberately only drops the trailing id. The branch is
|
|
1900
|
-
* `{user}-{host}-{slug}-{id}` (server/config.ts `branchPrefix`), and both
|
|
1901
|
-
* user and host are arbitrary — the host is this machine's hostname, so the
|
|
1902
|
-
* `ws-` that used to be matched here was one developer's laptop leaking into
|
|
1903
|
-
* a parser. Callers that know the workspace name should pass it instead. */
|
|
1904
|
-
function shortWorkspaceName(wsBranch) {
|
|
1905
|
-
const name = wsBranch.replace(/^origin\//, "");
|
|
1906
|
-
return dropRandomId(name.includes("/") ? name.slice(name.lastIndexOf("/") + 1) : name);
|
|
1907
|
-
}
|
|
1908
|
-
/** Strip a trailing `-<id>` segment (workspaces.ts:
|
|
1909
|
-
* `Math.random().toString(36).slice(2, 8)`), keeping the input when that
|
|
1910
|
-
* would leave nothing. */
|
|
1911
|
-
function dropRandomId(slug) {
|
|
1912
|
-
return slug.replace(/-[a-z0-9]{1,6}$/i, "") || slug;
|
|
1913
|
-
}
|
|
1914
|
-
/** Topic suffix when `head` is a `-topic` lane under the workspace branch. */
|
|
1915
|
-
function topicLane(head, wsBranch) {
|
|
1916
|
-
if (!wsBranch) return "";
|
|
1917
|
-
const h = head.replace(/^origin\//, "");
|
|
1918
|
-
const ws = wsBranch.replace(/^origin\//, "");
|
|
1919
|
-
if (h.startsWith(`${ws}-`)) return h.slice(ws.length + 1);
|
|
1920
|
-
return "";
|
|
1921
|
-
}
|
|
1922
|
-
function shortHeadFallback(head) {
|
|
1923
|
-
const short = dropRandomId(head);
|
|
1924
|
-
if (short.length <= 20) return short;
|
|
1925
|
-
const parts = short.split("-");
|
|
1926
|
-
return parts.length > 1 ? parts[parts.length - 1] : short;
|
|
1927
|
-
}
|
|
1928
|
-
/**
|
|
1929
|
-
* Review compare parts: render as `main` → `work` `[topic]`, not one chip.
|
|
1930
|
-
*/
|
|
1931
|
-
function reviewCompareLabel(base, head, wsBranch = "", wsName = "") {
|
|
1932
|
-
const baseName = (base || "base").replace(/^origin\//, "");
|
|
1933
|
-
const headName = (head || "HEAD").replace(/^origin\//, "");
|
|
1934
|
-
const ws = (wsBranch || "").replace(/^origin\//, "");
|
|
1935
|
-
const onWs = !!ws && (headName === ws || headName.startsWith(`${ws}-`));
|
|
1936
|
-
return {
|
|
1937
|
-
base: baseName,
|
|
1938
|
-
head: onWs ? wsName || shortWorkspaceName(ws) : shortHeadFallback(headName),
|
|
1939
|
-
topic: onWs ? topicLane(headName, ws) : "",
|
|
1940
|
-
title: headName === baseName ? baseName : `${headName} vs ${baseName}`
|
|
1941
|
-
};
|
|
1942
|
-
}
|
|
1943
|
-
/** Short label for "local …" chips (workspace name, plus [topic] if any). */
|
|
1944
|
-
function shortBranch(name, wsBranch = "", wsName = "") {
|
|
1945
|
-
const head = name.replace(/^origin\//, "");
|
|
1946
|
-
if (!head || head === "HEAD") return head || "HEAD";
|
|
1947
|
-
const ws = wsBranch.replace(/^origin\//, "");
|
|
1948
|
-
if (ws && (head === ws || head.startsWith(`${ws}-`))) {
|
|
1949
|
-
const work = wsName || shortWorkspaceName(ws);
|
|
1950
|
-
const topic = topicLane(head, ws);
|
|
1951
|
-
return topic ? `${work} [${topic}]` : work;
|
|
1952
|
-
}
|
|
1953
|
-
return shortHeadFallback(head);
|
|
1954
|
-
}
|
|
1955
|
-
var repoWorktree = "_hy _w";
|
|
1956
|
-
var repoTitle = "_hE _v";
|
|
1957
|
-
var path = "_hV __";
|
|
1958
|
-
//#endregion
|
|
1959
|
-
//#region src/tags/icons/icon-chevron-down.marko
|
|
1960
|
-
var icon_chevron_down_default = _template("T", (input) => {
|
|
1961
|
-
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
1962
|
-
const $scope0_id = _scope_id();
|
|
1963
|
-
_set_serialize_reason({
|
|
1964
|
-
0: $sg__input_size__OR__input_class,
|
|
1965
|
-
1: $sg__input_size__OR__input_class
|
|
1966
|
-
});
|
|
1967
|
-
const $childScope = _peek_scope_id();
|
|
1968
|
-
icon_base_default({
|
|
1969
|
-
d: "M6 9L12 15L18 9",
|
|
1970
|
-
size: input.size,
|
|
1971
|
-
class: input.class
|
|
1972
|
-
});
|
|
1973
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
1974
|
-
});
|
|
1975
|
-
//#endregion
|
|
1976
|
-
//#region src/tags/icons/icon-comment.marko
|
|
1977
|
-
var icon_comment_default = _template("W", (input) => {
|
|
1978
|
-
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
1979
|
-
const $scope0_id = _scope_id();
|
|
1980
|
-
_set_serialize_reason({
|
|
1981
|
-
0: $sg__input_size__OR__input_class,
|
|
1982
|
-
1: $sg__input_size__OR__input_class
|
|
1983
|
-
});
|
|
1984
|
-
const $childScope = _peek_scope_id();
|
|
1985
|
-
icon_base_default({
|
|
1986
|
-
d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z",
|
|
1987
|
-
size: input.size,
|
|
1988
|
-
class: input.class
|
|
1989
|
-
});
|
|
1990
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
1991
|
-
});
|
|
1992
|
-
//#endregion
|
|
1993
|
-
//#region src/tags/icons/icon-compress-lines.marko
|
|
1994
|
-
var icon_compress_lines_default = _template("X", (input) => {
|
|
1995
|
-
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
1996
|
-
const $scope0_id = _scope_id();
|
|
1997
|
-
_set_serialize_reason({
|
|
1998
|
-
0: $sg__input_size__OR__input_class,
|
|
1999
|
-
1: $sg__input_size__OR__input_class
|
|
2000
|
-
});
|
|
2001
|
-
const $childScope = _peek_scope_id();
|
|
2002
|
-
icon_base_default({
|
|
2003
|
-
d: "M18 2L6 2 M18 22L6 22 M12 5V10M12 10L15 7M12 10L9 7 M12 19V14M12 14L15 17M12 14L9 17",
|
|
2004
|
-
size: input.size,
|
|
2005
|
-
class: input.class
|
|
2006
|
-
});
|
|
2007
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
2008
|
-
});
|
|
2009
|
-
//#endregion
|
|
2010
|
-
//#region src/tags/icons/icon-expand-lines.marko
|
|
2011
|
-
var icon_expand_lines_default = _template("bb", (input) => {
|
|
2012
|
-
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
2013
|
-
const $scope0_id = _scope_id();
|
|
2014
|
-
_set_serialize_reason({
|
|
2015
|
-
0: $sg__input_size__OR__input_class,
|
|
2016
|
-
1: $sg__input_size__OR__input_class
|
|
2017
|
-
});
|
|
2018
|
-
const $childScope = _peek_scope_id();
|
|
2019
|
-
icon_base_default({
|
|
2020
|
-
d: "M18 2L6 2 M18 22L6 22 M12 14V19M12 19L15 16M12 19L9 16 M12 10V5M12 5L15 8M12 5L9 8",
|
|
2021
|
-
size: input.size,
|
|
2022
|
-
class: input.class
|
|
2023
|
-
});
|
|
2024
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
2025
|
-
});
|
|
2026
|
-
tone.warn;
|
|
2027
|
-
var diff_file_default = _template("h", (input) => {
|
|
2028
|
-
_scope_reason();
|
|
2029
|
-
const $scope0_id = _scope_id();
|
|
2030
|
-
_el($scope0_id, "h0");
|
|
2031
|
-
_html(`<div${_attr_class(["_it", input.class])}></div>${_el_resume($scope0_id, "a")}`);
|
|
2032
|
-
_script($scope0_id, "h1");
|
|
2033
|
-
writeScope($scope0_id, {
|
|
2034
|
-
e: input.file,
|
|
2035
|
-
f: input.comments,
|
|
2036
|
-
g: input.draft,
|
|
2037
|
-
h: input.sessions,
|
|
2038
|
-
i: input.wholeFile,
|
|
2039
|
-
j: input.onDeleteComment,
|
|
2040
|
-
k: input.onEditComment,
|
|
2041
|
-
l: input.onSendComment,
|
|
2042
|
-
m: input.onSendDraft,
|
|
2043
|
-
n: input.onSaveComment,
|
|
2044
|
-
o: input.onCancelDraft,
|
|
2045
|
-
p: input.onSelect,
|
|
2046
|
-
q: input.onError
|
|
2047
|
-
});
|
|
2048
|
-
_resume_branch($scope0_id);
|
|
2049
|
-
});
|
|
2050
|
-
//#endregion
|
|
2051
|
-
//#region src/tags/review-section.marko
|
|
2052
|
-
var review_section_default = _template("w", (input) => {
|
|
2053
|
-
const $scope0_reason = _scope_reason(), $si__input_collapsed = _serialize_if($scope0_reason, 37), $sg__input_collapsed = _serialize_guard($scope0_reason, 37), $sg__input_repo = _serialize_guard($scope0_reason, 32), $si__input_repo = _serialize_if($scope0_reason, 32), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened = _serialize_guard($scope0_reason, 30), $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName = _serialize_guard($scope0_reason, 12), $sg__input_repo__OR__input_files_length = _serialize_guard($scope0_reason, 0), $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName = _serialize_if($scope0_reason, 12), $sg__input_files__OR__input_shownKeys = _serialize_guard($scope0_reason, 3), $sg__input_files__OR__input_onlyNew = _serialize_guard($scope0_reason, 4), $sg__input_files = _serialize_guard($scope0_reason, 33), $sg__input_files__OR__input_commentsByFile = _serialize_guard($scope0_reason, 5), $sg__input_files__OR__input_commentsByFile__OR__input_collapsedFiles = _serialize_guard($scope0_reason, 17), $sg__input_files__OR__input_collapsedFiles = _serialize_guard($scope0_reason, 6), $si__input_files__OR__input_collapsedFiles = _serialize_if($scope0_reason, 6), $si__input_files = _serialize_if($scope0_reason, 33), $si__input_files__OR__input_commentsByFile = _serialize_if($scope0_reason, 5), $si__input_onFileToggle = _serialize_if($scope0_reason, 42), $si__input_repo__OR__input_files__OR__input_shownKeys = _serialize_if($scope0_reason, 10), $si__input_collapsible__OR__input_collapsed = _serialize_if($scope0_reason, 8), $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened = _serialize_if($scope0_reason, 24), $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers = _serialize_if($scope0_reason, 23), $si__input_files__OR__input_shownKeys = _serialize_if($scope0_reason, 3), $si__input_files__OR__input_onlyNew = _serialize_if($scope0_reason, 4), $si__input = _serialize_if($scope0_reason, 31), $si__input_draft = _serialize_if($scope0_reason, 44), $si__input_sessions = _serialize_if($scope0_reason, 45), $si__input_onSelect = _serialize_if($scope0_reason, 46), $si__input_onSaveComment = _serialize_if($scope0_reason, 47), $si__input_onSendDraft = _serialize_if($scope0_reason, 48), $si__input_onCancelDraft = _serialize_if($scope0_reason, 49), $si__input_onDeleteComment = _serialize_if($scope0_reason, 50), $si__input_onEditComment = _serialize_if($scope0_reason, 51), $si__input_onSendComment = _serialize_if($scope0_reason, 52), $si__input_onError = _serialize_if($scope0_reason, 53), $si__input_shownKeys = _serialize_if($scope0_reason, 34), $si__input_commentsByFile = _serialize_if($scope0_reason, 39), $si__input_collapsedFiles = _serialize_if($scope0_reason, 40), $si__input_findHit_key = _serialize_if($scope0_reason, 41), $si__input_findHit_line = _serialize_if($scope0_reason, 43);
|
|
2054
|
-
const $scope0_id = _scope_id();
|
|
2055
|
-
const $wholeFiles__closures = /* @__PURE__ */ new Set();
|
|
2056
|
-
const $input__closures = /* @__PURE__ */ new Set();
|
|
2057
|
-
const $input_draft__closures = /* @__PURE__ */ new Set();
|
|
2058
|
-
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
2059
|
-
const $input_onSelect__closures = /* @__PURE__ */ new Set();
|
|
2060
|
-
const $input_onSaveComment__closures = /* @__PURE__ */ new Set();
|
|
2061
|
-
const $input_onSendDraft__closures = /* @__PURE__ */ new Set();
|
|
2062
|
-
const $input_onCancelDraft__closures = /* @__PURE__ */ new Set();
|
|
2063
|
-
const $input_onDeleteComment__closures = /* @__PURE__ */ new Set();
|
|
2064
|
-
const $input_onEditComment__closures = /* @__PURE__ */ new Set();
|
|
2065
|
-
const $input_onSendComment__closures = /* @__PURE__ */ new Set();
|
|
2066
|
-
const $input_onError__closures = /* @__PURE__ */ new Set();
|
|
2067
|
-
const $input_shownKeys__closures = /* @__PURE__ */ new Set();
|
|
2068
|
-
const $input_commentsByFile__closures = /* @__PURE__ */ new Set();
|
|
2069
|
-
const $input_collapsedFiles__closures = /* @__PURE__ */ new Set();
|
|
2070
|
-
const $input_findHit_key__closures = /* @__PURE__ */ new Set();
|
|
2071
|
-
const $input_onFileToggle__closures = /* @__PURE__ */ new Set();
|
|
2072
|
-
const $input_findHit_line__closures = /* @__PURE__ */ new Set();
|
|
2073
|
-
const repo = input.repo;
|
|
2074
|
-
let wholeFiles = /* @__PURE__ */ new Set();
|
|
2075
|
-
const shownFiles = input.files.filter((f) => input.shownKeys.has(f.key));
|
|
2076
|
-
const shownCount = shownFiles.length;
|
|
2077
|
-
const countLabel = shownCount || input.files.length;
|
|
2078
|
-
const stats = (() => {
|
|
2079
|
-
let additions = 0;
|
|
2080
|
-
let deletions = 0;
|
|
2081
|
-
for (const f of shownFiles) {
|
|
2082
|
-
additions += f.additions || 0;
|
|
2083
|
-
deletions += f.deletions || 0;
|
|
2084
|
-
}
|
|
2085
|
-
return {
|
|
2086
|
-
additions,
|
|
2087
|
-
deletions
|
|
2088
|
-
};
|
|
2089
|
-
})();
|
|
2090
|
-
const newCount = input.files.filter((f) => f.changedSince).length;
|
|
2091
|
-
const compare$1 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch, input.workspaceName);
|
|
2092
|
-
const prTitle = repo.pr ? `${repo.pr.title}: ${repo.pr.headRefName} ${repo.head} vs ${repo.base} ${repo.baseSha}` : "";
|
|
2093
|
-
_html(`<section${_attr_class("_hu")}${repo.pr ? _attr("data-pr", `${repo.worktree}/${repo.pr.number}`) : ""}${_attr("hidden", !shownCount && !repo.pr && input.findHit?.repo !== repo.id)}><div${_attr_class(["_hv", { ["_hw"]: input.collapsible && input.collapsed }])}>`);
|
|
2094
|
-
_if(() => {
|
|
2095
|
-
if (input.collapsible) {
|
|
2096
|
-
const $scope1_id = _scope_id();
|
|
2097
|
-
_html(`<button type=button${_attr_class("_hx")} aria-expanded=${!input.collapsed ? "true" : "false"} aria-busy=${input.expanding ? "true" : "false"}${input.collapsed ? _attr("title", `Show ${countLabel} files`) : " title=\"Hide files\""}><span${_attr_class([
|
|
2098
|
-
"_hS",
|
|
2099
|
-
!input.collapsed && "_hT",
|
|
2100
|
-
input.expanding && "_hU"
|
|
2101
|
-
])} aria-hidden=true>`);
|
|
2102
|
-
_if(() => {
|
|
2103
|
-
if (input.collapsed) {
|
|
2104
|
-
const $scope17_id = _scope_id();
|
|
2105
|
-
icon_chevron_right_default({ size: 14 });
|
|
2106
|
-
$si__input_collapsed && writeScope($scope17_id, {});
|
|
2107
|
-
return 0;
|
|
2108
|
-
} else {
|
|
2109
|
-
const $scope18_id = _scope_id();
|
|
2110
|
-
icon_chevron_down_default({ size: 14 });
|
|
2111
|
-
$si__input_collapsed && writeScope($scope18_id, {});
|
|
2112
|
-
return 1;
|
|
2113
|
-
}
|
|
2114
|
-
}, $scope1_id, "b", $sg__input_collapsed, _serialize_guard($scope0_reason, 9), $sg__input_collapsed, "</span>", 1);
|
|
2115
|
-
_html(`<span${_attr_class(repoWorktree)}>${_escape(repo.worktree)}${_el_resume($scope1_id, "d", $sg__input_repo)}</span></button>${_el_resume($scope1_id, "a")}`);
|
|
2116
|
-
_script($scope1_id, "w9");
|
|
2117
|
-
writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
2118
|
-
return 0;
|
|
2119
|
-
} else {
|
|
2120
|
-
const $scope10_id = _scope_id();
|
|
2121
|
-
_html(`<span${_attr_class(repoWorktree)}>${_escape(repo.worktree)}${_el_resume($scope10_id, "b", $sg__input_repo)}</span>`);
|
|
2122
|
-
_serialize_if($scope0_reason, 1) && writeScope($scope10_id, { _: $si__input_repo && _scope_with_id($scope0_id) });
|
|
2123
|
-
return 1;
|
|
2124
|
-
}
|
|
2125
|
-
}, $scope0_id, "c", _serialize_guard($scope0_reason, 1) || _serialize_guard($scope0_reason, 28), _serialize_guard($scope0_reason, 36), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2126
|
-
_if(() => {
|
|
2127
|
-
if (repo.pr) {
|
|
2128
|
-
const $scope11_id = _scope_id();
|
|
2129
|
-
_html(`<a${_attr_class(["_s", "_t"])}${_attr("href", `${repo.pr.url}/files`)} target=_blank rel=noopener${_attr("title", prTitle)}>#${_sep($sg__input_repo)}${_escape(repo.pr.number)}${_el_resume($scope11_id, "b", $sg__input_repo)}</a>${_el_resume($scope11_id, "a", $sg__input_repo)}<span${_attr_class(repoTitle)}>${_escape(repo.pr.title)}${_el_resume($scope11_id, "d", $sg__input_repo)}</span>`);
|
|
2130
|
-
$si__input_repo && writeScope($scope11_id, { _: _scope_with_id($scope0_id) });
|
|
2131
|
-
return 0;
|
|
2132
|
-
} else {
|
|
2133
|
-
const $scope12_id = _scope_id();
|
|
2134
|
-
_html(`<span${_attr_class(repoTitle)}>${_escape(repoLabel(repo.full_name))}${_el_resume($scope12_id, "b", $sg__input_repo)}</span>`);
|
|
2135
|
-
$si__input_repo && writeScope($scope12_id, { _: _scope_with_id($scope0_id) });
|
|
2136
|
-
return 1;
|
|
2137
|
-
}
|
|
2138
|
-
}, $scope0_id, "d", $sg__input_repo, $sg__input_repo, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened);
|
|
2139
|
-
_html(`<span${_attr_class("_hF")}${_attr("title", `${compare$1.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class(["_L", "_hG"])}>${_escape(compare$1.base)}${_el_resume($scope0_id, "g", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}</span><span${_attr_class(["_N", "_hI"])} aria-hidden=true>vs</span><span${_attr_class(["_L", "_hH"])}>${_escape(compare$1.head)}${_el_resume($scope0_id, "j", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}</span>`);
|
|
2140
|
-
_if(() => {
|
|
2141
|
-
if (compare$1.topic) {
|
|
2142
|
-
const $scope16_id = _scope_id();
|
|
2143
|
-
_html(`<span${_attr_class([
|
|
2144
|
-
"_L",
|
|
2145
|
-
tone.accent,
|
|
2146
|
-
"_hJ"
|
|
2147
|
-
])}>${_escape(compare$1.topic)}${_el_resume($scope16_id, "b", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}</span>`);
|
|
2148
|
-
$si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && writeScope($scope16_id, { _: _scope_with_id($scope0_id) });
|
|
2149
|
-
return 0;
|
|
2150
|
-
}
|
|
2151
|
-
}, $scope0_id, "k", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName, $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2152
|
-
_html(`</span>${_el_resume($scope0_id, "e", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}`);
|
|
2153
|
-
_if(() => {
|
|
2154
|
-
if (repo.githubDrift) {
|
|
2155
|
-
const $scope2_id = _scope_id();
|
|
2156
|
-
_html(`<button type=button${_attr_class([
|
|
2157
|
-
"_L",
|
|
2158
|
-
tone.warn,
|
|
2159
|
-
"_hK"
|
|
2160
|
-
])}${_attr("title", `origin/${repo.pr.headRefName} ${repo.head} · GitHub ${repo.pr.headRefOid}. Reload to re-ask GitHub`)}${_attr("disabled", input.loading)}>behind GitHub ${_sep($sg__input_repo)}${_escape(shortSha(repo.head, 7))}${_el_resume($scope2_id, "b", $sg__input_repo)} → ${_sep($sg__input_repo)}${_escape(shortSha(repo.pr.headRefOid, 7))}${_el_resume($scope2_id, "c", $sg__input_repo)}</button>${_el_resume($scope2_id, "a")}`);
|
|
2161
|
-
_script($scope2_id, "w10");
|
|
2162
|
-
writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
2163
|
-
return 0;
|
|
2164
|
-
}
|
|
2165
|
-
}, $scope0_id, "l", _serialize_guard($scope0_reason, 2), $sg__input_repo, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2166
|
-
_if(() => {
|
|
2167
|
-
if (repo.contained && input.files.length) {
|
|
2168
|
-
const $scope13_id = _scope_id();
|
|
2169
|
-
_html(`<span${_attr_class(["_L", "_hK"])}${_attr("title", `${repo.pr ? `#${repo.pr.number}` : repo.branch} is already in ${repo.base}; showing the working tree only`)}>already in ${_sep($sg__input_repo)}${_escape(repo.base)}${_el_resume($scope13_id, "b", $sg__input_repo)}</span>${_el_resume($scope13_id, "a", $sg__input_repo)}`);
|
|
2170
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope13_id, { _: $si__input_repo && _scope_with_id($scope0_id) });
|
|
2171
|
-
return 0;
|
|
2172
|
-
}
|
|
2173
|
-
}, $scope0_id, "m", $sg__input_repo__OR__input_files_length, $sg__input_repo__OR__input_files_length, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2174
|
-
_if(() => {
|
|
2175
|
-
if (input.localDiffers) {
|
|
2176
|
-
const $scope3_id = _scope_id();
|
|
2177
|
-
_html(`<span${_attr_class(["_L", "_hK"])}${_attr("title", `This view is ${shortSha(repo.head)} (${repo.pr.headRefName}); checked out is ${shortSha(repo.localHead)} (${repo.branch})`)}>local ${_sep($sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}${_escape(shortBranch(repo.branch, input.workspaceBranch, input.workspaceName))}${_el_resume($scope3_id, "b", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}${_sep($sg__input_repo)}${_escape(shortSha(repo.localHead, 7))}${_el_resume($scope3_id, "c", $sg__input_repo)}</span>${_el_resume($scope3_id, "a", $sg__input_repo)}`);
|
|
2178
|
-
$si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers && writeScope($scope3_id, { _: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && _scope_with_id($scope0_id) });
|
|
2179
|
-
return 0;
|
|
2180
|
-
}
|
|
2181
|
-
}, $scope0_id, "n", _serialize_guard($scope0_reason, 23), _serialize_guard($scope0_reason, 38), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2182
|
-
_html(`<span${_attr_class("_hz")}><span>${_escape(countLabel)}${_el_resume($scope0_id, "p", $sg__input_files__OR__input_shownKeys)} file${_sep($sg__input_files__OR__input_shownKeys)}${countLabel === 1 ? "" : "s"}${_el_resume($scope0_id, "q", $sg__input_files__OR__input_shownKeys)}</span>`);
|
|
2183
|
-
_if(() => {
|
|
2184
|
-
if (stats.additions || stats.deletions) {
|
|
2185
|
-
const $scope15_id = _scope_id();
|
|
2186
|
-
_html(`<span${_attr_class("_hA")}>+${_sep($sg__input_files__OR__input_shownKeys)}${_escape(stats.additions)}${_el_resume($scope15_id, "b", $sg__input_files__OR__input_shownKeys)}</span><span${_attr_class("_hB")}>−${_sep($sg__input_files__OR__input_shownKeys)}${_escape(stats.deletions)}${_el_resume($scope15_id, "d", $sg__input_files__OR__input_shownKeys)}</span>`);
|
|
2187
|
-
$si__input_files__OR__input_shownKeys && writeScope($scope15_id, { _: _scope_with_id($scope0_id) });
|
|
2188
|
-
return 0;
|
|
2189
|
-
}
|
|
2190
|
-
}, $scope0_id, "r", $sg__input_files__OR__input_shownKeys, $sg__input_files__OR__input_shownKeys, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened);
|
|
2191
|
-
_if(() => {
|
|
2192
|
-
if (newCount || input.onlyNew) {
|
|
2193
|
-
const $scope4_id = _scope_id();
|
|
2194
|
-
_html(`<button type=button${_attr_class(["_hD", { ["_hC"]: input.onlyNew }])} aria-pressed=${input.onlyNew ? "true" : "false"} title=${input.onlyNew ? "\"Show every file\"" : "\"Show only files changed since your last visit\""}>${_escape(newCount)}${_el_resume($scope4_id, "b", $sg__input_files)} new</button>${_el_resume($scope4_id, "a")}`);
|
|
2195
|
-
_script($scope4_id, "w11");
|
|
2196
|
-
writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
2197
|
-
return 0;
|
|
2198
|
-
}
|
|
2199
|
-
}, $scope0_id, "s", $sg__input_files__OR__input_onlyNew, $sg__input_files__OR__input_onlyNew, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2200
|
-
_html(`</span></div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 8))}`);
|
|
2201
|
-
_if(() => {
|
|
2202
|
-
if (!input.collapsible || !input.collapsed || input.opened) {
|
|
2203
|
-
const $scope5_id = _scope_id();
|
|
2204
|
-
_html(`<div${_attr_class("_hM")}${_attr("hidden", input.collapsible && input.collapsed)}>`);
|
|
2205
|
-
_for_of(input.files, (file$1) => {
|
|
2206
|
-
const $scope6_id = _scope_id();
|
|
2207
|
-
const $for_content__file__closures = /* @__PURE__ */ new Set();
|
|
2208
|
-
const $for_content__file_key__closures = /* @__PURE__ */ new Set();
|
|
2209
|
-
const $for_content__fileComments__closures = /* @__PURE__ */ new Set();
|
|
2210
|
-
const fileComments = input.commentsByFile.get(file$1.key) || [];
|
|
2211
|
-
const expanded = !input.collapsedFiles.has(file$1.key);
|
|
2212
|
-
let near = false;
|
|
2213
|
-
const forceNear = input.findHit?.key === file$1.key;
|
|
2214
|
-
_html(`<details${_attr_details_or_dialog_open($scope6_id, "a", expanded, _resume(function(open) {
|
|
2215
|
-
input.onFileToggle(file$1.key, open);
|
|
2216
|
-
}, "w0", $scope6_id))}${_attr_class([
|
|
2217
|
-
"_hN",
|
|
2218
|
-
forceNear && "_hO",
|
|
2219
|
-
input.findHit?.key === file$1.key && "_hs"
|
|
2220
|
-
])}${_attr("data-key", file$1.key)}${_attr("hidden", !input.shownKeys.has(file$1.key))}><summary${_attr_class("_hQ")}><span${_attr_class("_9")}${_attr("data-status", file$1.status)}>${_escape(file$1.status)}${_el_resume($scope6_id, "d", $sg__input_files)}</span>${_el_resume($scope6_id, "c", $sg__input_files)}<span${_attr_class([path, input.findHit?.key === file$1.key && input.findHit.line < 1 && "_ht"])}${_attr("title", file$1.path)}><bdi>${_escape(file$1.path)}${_el_resume($scope6_id, "f", $sg__input_files)}</bdi></span>${_el_resume($scope6_id, "e", _serialize_guard($scope0_reason, 19))}`);
|
|
2221
|
-
_if(() => {
|
|
2222
|
-
if (file$1.changedSince) {
|
|
2223
|
-
const $scope20_id = _scope_id();
|
|
2224
|
-
_html(`<span${_attr_class(["_y", "_hL"])} title="Changed since your last visit"></span>`);
|
|
2225
|
-
$si__input_files && writeScope($scope20_id, {});
|
|
2226
|
-
return 0;
|
|
2227
|
-
}
|
|
2228
|
-
}, $scope6_id, "g", $sg__input_files, $sg__input_files, $sg__input_files__OR__input_commentsByFile__OR__input_collapsedFiles, 0, 1);
|
|
2229
|
-
_if(() => {
|
|
2230
|
-
if (fileComments.length) {
|
|
2231
|
-
const $scope19_id = _scope_id();
|
|
2232
|
-
_html(`<span${_attr_class("_s")}>`);
|
|
2233
|
-
icon_comment_default({ size: 12 });
|
|
2234
|
-
_html(` ${_sep($sg__input_files__OR__input_commentsByFile)}${_escape(fileComments.length)}${_el_resume($scope19_id, "c", $sg__input_files__OR__input_commentsByFile)}</span>`);
|
|
2235
|
-
$si__input_files__OR__input_commentsByFile && writeScope($scope19_id, { _: _scope_with_id($scope6_id) });
|
|
2236
|
-
return 0;
|
|
2237
|
-
}
|
|
2238
|
-
}, $scope6_id, "h", $sg__input_files__OR__input_commentsByFile, $sg__input_files__OR__input_commentsByFile, $sg__input_files__OR__input_commentsByFile__OR__input_collapsedFiles, 0, 1);
|
|
2239
|
-
_if(() => {
|
|
2240
|
-
if (expanded && !file$1.binary && !file$1.tooLarge && file$1.old != null && file$1.new != null) {
|
|
2241
|
-
const $scope14_id = _scope_id();
|
|
2242
|
-
_html(`<button type=button${_attr_class([
|
|
2243
|
-
iconBtnXs,
|
|
2244
|
-
"_hX",
|
|
2245
|
-
{ ["_hY"]: wholeFiles.has(file$1.key) }
|
|
2246
|
-
])} title=${wholeFiles.has(file$1.key) ? "\"Show changes only\"" : "\"Show whole file\""} aria-label=${wholeFiles.has(file$1.key) ? "\"Show changes only\"" : "\"Show whole file\""} aria-pressed=${wholeFiles.has(file$1.key) ? "true" : "false"}>`);
|
|
2247
|
-
_if(() => {
|
|
2248
|
-
if (wholeFiles.has(file$1.key)) {
|
|
2249
|
-
const $scope21_id = _scope_id();
|
|
2250
|
-
icon_compress_lines_default({ size: 12 });
|
|
2251
|
-
writeScope($scope21_id, {});
|
|
2252
|
-
return 0;
|
|
2253
|
-
} else {
|
|
2254
|
-
const $scope22_id = _scope_id();
|
|
2255
|
-
icon_expand_lines_default({ size: 12 });
|
|
2256
|
-
writeScope($scope22_id, {});
|
|
2257
|
-
return 1;
|
|
2258
|
-
}
|
|
2259
|
-
}, $scope14_id, "a", 1, 1, 1, "</button>", 1);
|
|
2260
|
-
_script($scope14_id, "w12");
|
|
2261
|
-
_subscribe($wholeFiles__closures, writeScope($scope14_id, {
|
|
2262
|
-
_: _scope_with_id($scope6_id),
|
|
2263
|
-
Cd1: 1
|
|
2264
|
-
}));
|
|
2265
|
-
return 0;
|
|
2266
|
-
}
|
|
2267
|
-
}, $scope6_id, "i", $sg__input_files__OR__input_collapsedFiles, $sg__input_files__OR__input_collapsedFiles, $sg__input_files__OR__input_commentsByFile__OR__input_collapsedFiles, 0, 1);
|
|
2268
|
-
_html("</summary>");
|
|
2269
|
-
_if(() => {
|
|
2270
|
-
if (file$1.binary) {
|
|
2271
|
-
const $scope23_id = _scope_id();
|
|
2272
|
-
_html(`<p${_attr_class(["_hW", "_hP"])}>binary file</p>`);
|
|
2273
|
-
$si__input_files__OR__input_collapsedFiles && writeScope($scope23_id, {});
|
|
2274
|
-
return 0;
|
|
2275
|
-
} else if (file$1.tooLarge) {
|
|
2276
|
-
const $scope24_id = _scope_id();
|
|
2277
|
-
_html(`<p${_attr_class(["_hW", "_hP"])}>file too large to display</p>`);
|
|
2278
|
-
$si__input_files__OR__input_collapsedFiles && writeScope($scope24_id, {});
|
|
2279
|
-
return 1;
|
|
2280
|
-
} else if (file$1.old == null && file$1.new == null) {
|
|
2281
|
-
const $scope25_id = _scope_id();
|
|
2282
|
-
_html(`<p${_attr_class(["_hW", "_hP"])}>file could not be read</p>`);
|
|
2283
|
-
$si__input_files__OR__input_collapsedFiles && writeScope($scope25_id, {});
|
|
2284
|
-
return 2;
|
|
2285
|
-
} else if (expanded) {
|
|
2286
|
-
const $scope7_id = _scope_id();
|
|
2287
|
-
_if(() => {
|
|
2288
|
-
if (!forceNear) {
|
|
2289
|
-
const $scope8_id = _scope_id();
|
|
2290
|
-
_html(`<div${_attr_class("_hR")}></div>${_el_resume($scope8_id, "a")}`);
|
|
2291
|
-
_script($scope8_id, "w13");
|
|
2292
|
-
_subscribe($si__input && $input__closures, writeScope($scope8_id, {}));
|
|
2293
|
-
return 0;
|
|
2294
|
-
} else {
|
|
2295
|
-
const $scope9_id = _scope_id();
|
|
2296
|
-
const $childScope = _peek_scope_id();
|
|
2297
|
-
diff_file_default({
|
|
2298
|
-
class: "_hP",
|
|
2299
|
-
file: file$1,
|
|
2300
|
-
comments: fileComments,
|
|
2301
|
-
draft: input.draft && input.draft.key === file$1.key ? input.draft : null,
|
|
2302
|
-
sessions: input.sessions,
|
|
2303
|
-
wholeFile: wholeFiles.has(file$1.key),
|
|
2304
|
-
onSelect: _resume(function(range) {
|
|
2305
|
-
input.onSelect(file$1, range);
|
|
2306
|
-
}, "w1", $scope9_id),
|
|
2307
|
-
onSaveComment: _resume(function(text) {
|
|
2308
|
-
input.onSaveComment(file$1, text);
|
|
2309
|
-
}, "w2", $scope9_id),
|
|
2310
|
-
onSendDraft: _resume(function(text, sessionId) {
|
|
2311
|
-
input.onSendDraft(file$1, text, sessionId);
|
|
2312
|
-
}, "w3", $scope9_id),
|
|
2313
|
-
onCancelDraft: _resume(function() {
|
|
2314
|
-
input.onCancelDraft();
|
|
2315
|
-
}, "w4", $scope9_id),
|
|
2316
|
-
onDeleteComment: _resume(function(id) {
|
|
2317
|
-
input.onDeleteComment(id);
|
|
2318
|
-
}, "w5", $scope9_id),
|
|
2319
|
-
onEditComment: _resume(function(id, text) {
|
|
2320
|
-
input.onEditComment(id, text);
|
|
2321
|
-
}, "w6", $scope9_id),
|
|
2322
|
-
onSendComment: _resume(function(id, sessionId) {
|
|
2323
|
-
input.onSendComment(id, sessionId);
|
|
2324
|
-
}, "w7", $scope9_id),
|
|
2325
|
-
onError: _resume(function(message) {
|
|
2326
|
-
input.onError(message);
|
|
2327
|
-
}, "w8", $scope9_id)
|
|
2328
|
-
});
|
|
2329
|
-
_subscribe($si__input_files__OR__input_commentsByFile && $for_content__fileComments__closures, _subscribe($si__input_files && $for_content__file_key__closures, _subscribe($si__input_files && $for_content__file__closures, _subscribe($wholeFiles__closures, _subscribe($si__input_onError && $input_onError__closures, _subscribe($si__input_onSendComment && $input_onSendComment__closures, _subscribe($si__input_onEditComment && $input_onEditComment__closures, _subscribe($si__input_onDeleteComment && $input_onDeleteComment__closures, _subscribe($si__input_onCancelDraft && $input_onCancelDraft__closures, _subscribe($si__input_onSendDraft && $input_onSendDraft__closures, _subscribe($si__input_onSaveComment && $input_onSaveComment__closures, _subscribe($si__input_onSelect && $input_onSelect__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_draft && $input_draft__closures, writeScope($scope9_id, { a: _existing_scope($childScope) })))))))))))))));
|
|
2330
|
-
return 1;
|
|
2331
|
-
}
|
|
2332
|
-
}, $scope7_id, "a", 1, 1, 1, 0, 1);
|
|
2333
|
-
writeScope($scope7_id, { _: _scope_with_id($scope6_id) });
|
|
2334
|
-
return 3;
|
|
2335
|
-
}
|
|
2336
|
-
}, $scope6_id, "j", 1, $sg__input_files__OR__input_collapsedFiles, $sg__input_files__OR__input_commentsByFile__OR__input_collapsedFiles);
|
|
2337
|
-
_html(`</details>${_el_resume($scope6_id, "a")}`);
|
|
2338
|
-
_script($scope6_id, "w14");
|
|
2339
|
-
_subscribe($si__input_findHit_line && $input_findHit_line__closures, _subscribe($si__input_onFileToggle && $input_onFileToggle__closures, _subscribe($si__input_findHit_key && $input_findHit_key__closures, _subscribe($si__input_collapsedFiles && $input_collapsedFiles__closures, _subscribe($si__input_commentsByFile && $input_commentsByFile__closures, _subscribe($si__input_shownKeys && $input_shownKeys__closures, writeScope($scope6_id, {
|
|
2340
|
-
l: file$1,
|
|
2341
|
-
m: file$1?.key,
|
|
2342
|
-
v: $si__input_files__OR__input_collapsedFiles && file$1?.binary,
|
|
2343
|
-
w: $si__input_files__OR__input_collapsedFiles && file$1?.tooLarge,
|
|
2344
|
-
x: $si__input_files__OR__input_collapsedFiles && file$1?.old,
|
|
2345
|
-
y: $si__input_files__OR__input_collapsedFiles && file$1?.new,
|
|
2346
|
-
z: fileComments,
|
|
2347
|
-
a0: $si__input_files__OR__input_commentsByFile && fileComments.length,
|
|
2348
|
-
a1: $si__input_onFileToggle && expanded,
|
|
2349
|
-
a4: _serialize_if($scope0_reason, 18) && near,
|
|
2350
|
-
a5: forceNear,
|
|
2351
|
-
_: _scope_with_id($scope5_id),
|
|
2352
|
-
a7: $si__input_files && $for_content__file__closures,
|
|
2353
|
-
a8: $si__input_files && $for_content__file_key__closures,
|
|
2354
|
-
a9: $si__input_files__OR__input_commentsByFile && $for_content__fileComments__closures
|
|
2355
|
-
})))))));
|
|
2356
|
-
}, "key", $scope5_id, "a", $sg__input_files, _serialize_guard($scope0_reason, 16), $sg__input_files, "</div>", 1);
|
|
2357
|
-
writeScope($scope5_id, { _: _scope_with_id($scope0_id) });
|
|
2358
|
-
return 0;
|
|
2359
|
-
}
|
|
2360
|
-
}, $scope0_id, "t", _serialize_guard($scope0_reason, 24), _serialize_guard($scope0_reason, 20), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2361
|
-
_html(`</section>${_el_resume($scope0_id, "a", _serialize_guard($scope0_reason, 21))}`);
|
|
2362
|
-
writeScope($scope0_id, {
|
|
2363
|
-
v: input,
|
|
2364
|
-
x: _serialize_if($scope0_reason, 25) && input.files,
|
|
2365
|
-
y: $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened && input.shownKeys,
|
|
2366
|
-
a0: $si__input_repo__OR__input_files__OR__input_shownKeys && input.files?.length,
|
|
2367
|
-
a1: _serialize_if($scope0_reason, 14) && input.workspaceBranch,
|
|
2368
|
-
a2: _serialize_if($scope0_reason, 13) && input.workspaceName,
|
|
2369
|
-
a4: $si__input_repo__OR__input_files__OR__input_shownKeys && input.findHit?.repo,
|
|
2370
|
-
a5: _serialize_if($scope0_reason, 20) && input.collapsible,
|
|
2371
|
-
a6: _serialize_if($scope0_reason, 29) && input.collapsed,
|
|
2372
|
-
a8: $si__input_collapsible__OR__input_collapsed && input.expanding,
|
|
2373
|
-
a9: input.onToggle,
|
|
2374
|
-
aa: $si__input_repo && input.loading,
|
|
2375
|
-
ab: input.onReload,
|
|
2376
|
-
ad: $si__input_files__OR__input_onlyNew && input.onlyNew,
|
|
2377
|
-
ae: input.onToggleNew,
|
|
2378
|
-
af: $si__input_collapsible__OR__input_collapsed && input.opened,
|
|
2379
|
-
ah: $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened && input.commentsByFile,
|
|
2380
|
-
ai: $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened && input.collapsedFiles,
|
|
2381
|
-
aj: input.findHit?.key,
|
|
2382
|
-
ak: input.onFileToggle,
|
|
2383
|
-
al: _serialize_if($scope0_reason, 27) && input.findHit?.line,
|
|
2384
|
-
am: input.draft,
|
|
2385
|
-
an: input.sessions,
|
|
2386
|
-
ao: input.onSelect,
|
|
2387
|
-
ap: input.onSaveComment,
|
|
2388
|
-
aq: input.onSendDraft,
|
|
2389
|
-
ar: input.onCancelDraft,
|
|
2390
|
-
as: input.onDeleteComment,
|
|
2391
|
-
at: input.onEditComment,
|
|
2392
|
-
au: input.onSendComment,
|
|
2393
|
-
av: input.onError,
|
|
2394
|
-
ax: _serialize_if($scope0_reason, 21) && repo?.pr,
|
|
2395
|
-
ay: _serialize_if($scope0_reason, 7) && repo?.pr?.baseRefName,
|
|
2396
|
-
az: _serialize_if($scope0_reason, 22) && repo?.base,
|
|
2397
|
-
b0: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers && repo?.pr?.headRefName,
|
|
2398
|
-
b1: _serialize_if($scope0_reason, 26) && repo?.branch,
|
|
2399
|
-
b3: $si__input_repo && repo?.pr?.title,
|
|
2400
|
-
b4: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers && repo?.head,
|
|
2401
|
-
b5: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && repo?.baseSha,
|
|
2402
|
-
b6: _serialize_if($scope0_reason, 36) && repo?.worktree,
|
|
2403
|
-
b7: $si__input_repo && repo?.pr?.number,
|
|
2404
|
-
b8: _serialize_if($scope0_reason, 15) && repo?.id,
|
|
2405
|
-
b9: $si__input_repo && repo?.pr?.url,
|
|
2406
|
-
ba: $si__input_repo && repo?.full_name,
|
|
2407
|
-
bc: $si__input_repo && repo?.pr?.headRefOid,
|
|
2408
|
-
bd: _serialize_if($scope0_reason, 35) && repo?.contained,
|
|
2409
|
-
bf: _serialize_if($scope0_reason, 38) && repo?.localHead,
|
|
2410
|
-
bg: wholeFiles,
|
|
2411
|
-
bj: _serialize_if($scope0_reason, 11) && shownCount,
|
|
2412
|
-
bm: $si__input_collapsible__OR__input_collapsed && countLabel,
|
|
2413
|
-
bo: $si__input_files__OR__input_shownKeys && stats?.additions,
|
|
2414
|
-
bp: $si__input_files__OR__input_shownKeys && stats?.deletions,
|
|
2415
|
-
br: $si__input_files__OR__input_onlyNew && newCount,
|
|
2416
|
-
by: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && compare$1?.topic,
|
|
2417
|
-
bz: $si__input_repo && prTitle,
|
|
2418
|
-
d1: $wholeFiles__closures,
|
|
2419
|
-
c0: $si__input && $input__closures,
|
|
2420
|
-
cf: $si__input_draft && $input_draft__closures,
|
|
2421
|
-
cg: $si__input_sessions && $input_sessions__closures,
|
|
2422
|
-
ch: $si__input_onSelect && $input_onSelect__closures,
|
|
2423
|
-
ci: $si__input_onSaveComment && $input_onSaveComment__closures,
|
|
2424
|
-
cj: $si__input_onSendDraft && $input_onSendDraft__closures,
|
|
2425
|
-
ck: $si__input_onCancelDraft && $input_onCancelDraft__closures,
|
|
2426
|
-
cl: $si__input_onDeleteComment && $input_onDeleteComment__closures,
|
|
2427
|
-
cm: $si__input_onEditComment && $input_onEditComment__closures,
|
|
2428
|
-
cn: $si__input_onSendComment && $input_onSendComment__closures,
|
|
2429
|
-
co: $si__input_onError && $input_onError__closures,
|
|
2430
|
-
c2: $si__input_shownKeys && $input_shownKeys__closures,
|
|
2431
|
-
ca: $si__input_commentsByFile && $input_commentsByFile__closures,
|
|
2432
|
-
cb: $si__input_collapsedFiles && $input_collapsedFiles__closures,
|
|
2433
|
-
cc: $si__input_findHit_key && $input_findHit_key__closures,
|
|
2434
|
-
cd: $si__input_onFileToggle && $input_onFileToggle__closures,
|
|
2435
|
-
ce: $si__input_findHit_line && $input_findHit_line__closures
|
|
2436
|
-
});
|
|
2437
|
-
_resume_branch($scope0_id);
|
|
2438
|
-
});
|
|
2439
|
-
var fileFilter = "_iv _l";
|
|
2440
|
-
//#endregion
|
|
2441
|
-
//#region src/tags/file-filter.marko
|
|
2442
|
-
var file_filter_default = _template("n", (input) => {
|
|
2443
|
-
const $scope0_reason = _scope_reason();
|
|
2444
|
-
const $scope0_id = _scope_id();
|
|
2445
|
-
let value = input.value;
|
|
2446
|
-
let pending = null;
|
|
2447
|
-
const draft = (pending ?? value) || "";
|
|
2448
|
-
const box = { timer: 0 };
|
|
2449
|
-
const flush = _resume(() => {
|
|
2450
|
-
if (box.timer) {
|
|
2451
|
-
clearTimeout(box.timer);
|
|
2452
|
-
box.timer = 0;
|
|
2453
|
-
}
|
|
2454
|
-
const next = pending !== null ? pending : value || "";
|
|
2455
|
-
pending = null;
|
|
2456
|
-
value = next;
|
|
2457
|
-
}, "n1", $scope0_id);
|
|
2458
|
-
const type = _resume((v) => {
|
|
2459
|
-
if (box.timer) clearTimeout(box.timer);
|
|
2460
|
-
if (!v) {
|
|
2461
|
-
box.timer = 0;
|
|
2462
|
-
pending = null;
|
|
2463
|
-
value = "";
|
|
2464
|
-
return;
|
|
2465
|
-
}
|
|
2466
|
-
pending = v;
|
|
2467
|
-
box.timer = setTimeout(flush, 150);
|
|
2468
|
-
}, "n2", $scope0_id);
|
|
2469
|
-
_html(`<div${_attr_class("_iu")}><input${_attr_input_value($scope0_id, "b", draft, _resume(function(v) {
|
|
2470
|
-
type(v);
|
|
2471
|
-
}, "n0", $scope0_id))}${_attr_class(fileFilter)} type=search placeholder="Filter files…" aria-label="Filter files">${_el_resume($scope0_id, "b")}</div>`);
|
|
2472
|
-
_script($scope0_id, "n3");
|
|
2473
|
-
writeScope($scope0_id, {
|
|
2474
|
-
e: _serialize_if($scope0_reason, 1) && input.value,
|
|
2475
|
-
f: _serialize_if($scope0_reason, 0) && input.valueChange,
|
|
2476
|
-
h: value,
|
|
2477
|
-
j: pending,
|
|
2478
|
-
l: draft,
|
|
2479
|
-
n: box.timer,
|
|
2480
|
-
p: flush,
|
|
2481
|
-
r: type,
|
|
2482
|
-
i: input.valueChange || void 0
|
|
2483
|
-
});
|
|
2484
|
-
_resume_branch($scope0_id);
|
|
2485
|
-
});
|
|
2486
|
-
//#endregion
|
|
2487
|
-
//#region src/tags/diff-tree-dir.marko
|
|
2488
|
-
var $content = (input) => {
|
|
2489
|
-
const $scope0_reason = _scope_reason(), $si__input = _serialize_if($scope0_reason, 4), $sg__input = _serialize_guard($scope0_reason, 4), $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys = _serialize_guard($scope0_reason, 3), $sg__input_dir = _serialize_guard($scope0_reason, 5), $sg__input_dir__OR__input_newKeys = _serialize_guard($scope0_reason, 1), $sg__input_dir__OR__input_commentKeys__OR__input_newKeys = _serialize_guard($scope0_reason, 2), $sg__input_dir__OR__input_commentKeys = _serialize_guard($scope0_reason, 0), $si__input_collapsedFiles = _serialize_if($scope0_reason, 10), $si__input_dir = _serialize_if($scope0_reason, 5), $si__input_collapsed = _serialize_if($scope0_reason, 6), $si__input_onToggleDir = _serialize_if($scope0_reason, 7), $si__input_collapsedKey = _serialize_if($scope0_reason, 8), $si__input_hrefFor = _serialize_if($scope0_reason, 9), $si__input_commentKeys = _serialize_if($scope0_reason, 11), $si__input_newKeys = _serialize_if($scope0_reason, 12);
|
|
2490
|
-
const $scope0_id = _scope_id();
|
|
2491
|
-
const $input_collapsed__closures = /* @__PURE__ */ new Set();
|
|
2492
|
-
const $input_onToggleDir__closures = /* @__PURE__ */ new Set();
|
|
2493
|
-
const $input_collapsedKey__closures = /* @__PURE__ */ new Set();
|
|
2494
|
-
const $input_hrefFor__closures = /* @__PURE__ */ new Set();
|
|
2495
|
-
const $input_collapsedFiles__closures = /* @__PURE__ */ new Set();
|
|
2496
|
-
const $input_commentKeys__closures = /* @__PURE__ */ new Set();
|
|
2497
|
-
const $input_newKeys__closures = /* @__PURE__ */ new Set();
|
|
2498
|
-
const dir = input.dir;
|
|
2499
|
-
_for_of(dir.dirs, (child) => {
|
|
2500
|
-
const $scope1_id = _scope_id();
|
|
2501
|
-
const shut = input.collapsed.has(input.collapsedKey(child.path));
|
|
2502
|
-
_html(`<div${_attr_class("_hh")}><button type=button${_attr_class(["_hi", { ["_g_"]: shut }])}${_attr("title", child.path)}${_attr_style(`--depth:${child.depth}`)}><span${_attr_class("_hp")}>`);
|
|
2503
|
-
_if(() => {
|
|
2504
|
-
if (shut) {
|
|
2505
|
-
const $scope4_id = _scope_id();
|
|
2506
|
-
icon_chevron_right_default({ size: 12 });
|
|
2507
|
-
$si__input && writeScope($scope4_id, {});
|
|
2508
|
-
return 0;
|
|
2509
|
-
} else {
|
|
2510
|
-
const $scope5_id = _scope_id();
|
|
2511
|
-
icon_chevron_down_default({ size: 12 });
|
|
2512
|
-
$si__input && writeScope($scope5_id, {});
|
|
2513
|
-
return 1;
|
|
2514
|
-
}
|
|
2515
|
-
}, $scope1_id, "c", $sg__input, $sg__input, $sg__input, "</span>", 1);
|
|
2516
|
-
_html(`<span${_attr_class("_hj")}>${_escape(child.label)}${_el_resume($scope1_id, "e", $sg__input_dir)}/</span></button>${_el_resume($scope1_id, "b")}`);
|
|
2517
|
-
_if(() => {
|
|
2518
|
-
if (!shut) {
|
|
2519
|
-
const $scope2_id = _scope_id();
|
|
2520
|
-
_set_serialize_reason({
|
|
2521
|
-
0: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2522
|
-
1: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2523
|
-
2: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2524
|
-
3: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2525
|
-
4: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2526
|
-
5: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2527
|
-
6: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2528
|
-
7: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2529
|
-
8: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2530
|
-
9: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2531
|
-
10: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2532
|
-
11: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys,
|
|
2533
|
-
12: $sg__input_dir__OR__input_collapsed__OR__input_onToggleDir__OR__input_collapsedKey__OR__input_hrefFor__OR__input_collapsedFiles__OR__input_commentKeys__OR__input_newKeys
|
|
2534
|
-
});
|
|
2535
|
-
const $childScope = _peek_scope_id();
|
|
2536
|
-
$content({
|
|
2537
|
-
dir: child,
|
|
2538
|
-
collapsed: input.collapsed,
|
|
2539
|
-
collapsedKey: input.collapsedKey,
|
|
2540
|
-
onToggleDir: input.onToggleDir,
|
|
2541
|
-
hrefFor: input.hrefFor,
|
|
2542
|
-
collapsedFiles: input.collapsedFiles,
|
|
2543
|
-
commentKeys: input.commentKeys,
|
|
2544
|
-
newKeys: input.newKeys
|
|
2545
|
-
});
|
|
2546
|
-
$si__input && _subscribe($si__input_newKeys && $input_newKeys__closures, _subscribe($si__input_commentKeys && $input_commentKeys__closures, _subscribe($si__input_collapsedFiles && $input_collapsedFiles__closures, _subscribe($si__input_hrefFor && $input_hrefFor__closures, _subscribe($si__input_collapsedKey && $input_collapsedKey__closures, _subscribe($si__input_onToggleDir && $input_onToggleDir__closures, _subscribe($si__input_collapsed && $input_collapsed__closures, writeScope($scope2_id, {
|
|
2547
|
-
_: _scope_with_id($scope1_id),
|
|
2548
|
-
a: _serialize_if($scope0_reason, 3) && _existing_scope($childScope)
|
|
2549
|
-
}))))))));
|
|
2550
|
-
return 0;
|
|
2551
|
-
}
|
|
2552
|
-
}, $scope1_id, "f", $sg__input, $sg__input, $sg__input);
|
|
2553
|
-
_html("</div>");
|
|
2554
|
-
_script($scope1_id, "k0");
|
|
2555
|
-
writeScope($scope1_id, {
|
|
2556
|
-
h: child,
|
|
2557
|
-
i: $si__input && child?.path,
|
|
2558
|
-
_: _scope_with_id($scope0_id)
|
|
2559
|
-
});
|
|
2560
|
-
}, "path", $scope0_id, "a", $sg__input, $sg__input_dir, $sg__input_dir, 0, 1);
|
|
2561
|
-
_for_of(dir.files, ({ file, name }) => {
|
|
2562
|
-
const $scope3_id = _scope_id();
|
|
2563
|
-
_html(`<a${_attr("href", input.hrefFor(file.key))}${_attr_class(["_hl", { ["_hk"]: input.collapsedFiles?.has(file.key) }])}${input.collapsedFiles?.has(file.key) ? _attr("title", `${file.path} (folded — click to open)`) : _attr("title", file.path)}${_attr_style(`--depth:${dir.depth + 1}`)}><span${_attr_class("_9")}${_attr("data-status", file.status)}>${_escape(file.status)}${_el_resume($scope3_id, "c", $sg__input_dir)}</span>${_el_resume($scope3_id, "b", $sg__input_dir)}<span${_attr_class("_hm")}>${_escape(name)}${_el_resume($scope3_id, "e", $sg__input_dir)}</span>`);
|
|
2564
|
-
_if(() => {
|
|
2565
|
-
if (input.newKeys.has(file.key)) {
|
|
2566
|
-
const $scope6_id = _scope_id();
|
|
2567
|
-
_html(`<span${_attr_class(["_y", "_hn"])} title="Changed since your last visit"></span>`);
|
|
2568
|
-
_serialize_if($scope0_reason, 1) && writeScope($scope6_id, {});
|
|
2569
|
-
return 0;
|
|
2570
|
-
}
|
|
2571
|
-
}, $scope3_id, "f", $sg__input_dir__OR__input_newKeys, $sg__input_dir__OR__input_newKeys, $sg__input_dir__OR__input_commentKeys__OR__input_newKeys, 0, 1);
|
|
2572
|
-
_if(() => {
|
|
2573
|
-
if (input.commentKeys.has(file.key)) {
|
|
2574
|
-
const $scope7_id = _scope_id();
|
|
2575
|
-
_html(`<span${_attr_class("_ho")}>`);
|
|
2576
|
-
icon_comment_default({ size: 12 });
|
|
2577
|
-
_html("</span>");
|
|
2578
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope7_id, {});
|
|
2579
|
-
return 0;
|
|
2580
|
-
}
|
|
2581
|
-
}, $scope3_id, "g", $sg__input_dir__OR__input_commentKeys, $sg__input_dir__OR__input_commentKeys, $sg__input_dir__OR__input_commentKeys__OR__input_newKeys, 0, 1);
|
|
2582
|
-
_html(`</a>${_el_resume($scope3_id, "a", $sg__input)}`);
|
|
2583
|
-
$si__input && writeScope($scope3_id, {
|
|
2584
|
-
k: file?.key,
|
|
2585
|
-
p: $si__input_collapsedFiles && file?.path,
|
|
2586
|
-
_: _scope_with_id($scope0_id)
|
|
2587
|
-
});
|
|
2588
|
-
}, (f) => f.file.key, $scope0_id, "b", $sg__input, $sg__input_dir, $sg__input_dir, 0, 1);
|
|
2589
|
-
writeScope($scope0_id, {
|
|
2590
|
-
d: $si__input_dir && input,
|
|
2591
|
-
f: $si__input && input.collapsed,
|
|
2592
|
-
g: input.onToggleDir,
|
|
2593
|
-
h: $si__input && input.collapsedKey,
|
|
2594
|
-
i: $si__input && input.hrefFor,
|
|
2595
|
-
j: $si__input && input.collapsedFiles,
|
|
2596
|
-
k: $si__input && input.commentKeys,
|
|
2597
|
-
l: $si__input && input.newKeys,
|
|
2598
|
-
p: $si__input_dir && dir?.depth,
|
|
2599
|
-
r: $si__input_collapsed && $input_collapsed__closures,
|
|
2600
|
-
s: $si__input_onToggleDir && $input_onToggleDir__closures,
|
|
2601
|
-
t: $si__input_collapsedKey && $input_collapsedKey__closures,
|
|
2602
|
-
u: $si__input_hrefFor && $input_hrefFor__closures,
|
|
2603
|
-
v: $si__input_collapsedFiles && $input_collapsedFiles__closures,
|
|
2604
|
-
w: $si__input_commentKeys && $input_commentKeys__closures,
|
|
2605
|
-
x: $si__input_newKeys && $input_newKeys__closures
|
|
2606
|
-
});
|
|
2607
|
-
};
|
|
2608
|
-
var diff_tree_dir_default = _template("k", $content);
|
|
2609
|
-
//#endregion
|
|
2610
|
-
//#region src/tags/diff-tree.marko
|
|
2611
|
-
var diff_tree_default = _template("l", (input) => {
|
|
2612
|
-
const $scope0_reason = _scope_reason(), $sg__input_sections = _serialize_guard($scope0_reason, 10), $si__input_onDirToggle = _serialize_if($scope0_reason, 12), $si__input_collapsedFiles = _serialize_if($scope0_reason, 13), $si__input_commentKeys = _serialize_if($scope0_reason, 7), $si__input_newKeys = _serialize_if($scope0_reason, 8), $si__input_workspaceId__OR__input_scope = _serialize_if($scope0_reason, 0);
|
|
2613
|
-
const $scope0_id = _scope_id();
|
|
2614
|
-
const $input_onDirToggle__closures = /* @__PURE__ */ new Set();
|
|
2615
|
-
const $input_collapsedFiles__closures = /* @__PURE__ */ new Set();
|
|
2616
|
-
const $collapsedRepos__closures = /* @__PURE__ */ new Set();
|
|
2617
|
-
const $collapsedDirs__closures = /* @__PURE__ */ new Set();
|
|
2618
|
-
const $commentKeys__closures = /* @__PURE__ */ new Set();
|
|
2619
|
-
const $newKeys__closures = /* @__PURE__ */ new Set();
|
|
2620
|
-
const $hrefFor2__closures = /* @__PURE__ */ new Set();
|
|
2621
|
-
let collapsedRepos = input.collapsedRepos;
|
|
2622
|
-
let openedRepos = input.openedRepos;
|
|
2623
|
-
let filter = input.filter;
|
|
2624
|
-
let collapsedDirs = /* @__PURE__ */ new Set();
|
|
2625
|
-
const commentKeys = input.commentKeys || /* @__PURE__ */ new Set();
|
|
2626
|
-
const newKeys = input.newKeys || /* @__PURE__ */ new Set();
|
|
2627
|
-
const hrefFor = _resume((key) => urlFor({
|
|
2628
|
-
workspaceId: input.workspaceId,
|
|
2629
|
-
view: "diff",
|
|
2630
|
-
scope: input.scope ?? null,
|
|
2631
|
-
file: key
|
|
2632
|
-
}), "l0", $scope0_id);
|
|
2633
|
-
_html(`<aside${_attr_class(["_ha", { ["_g_"]: input.open === false }])}><div${_attr_class("_hb")}>`);
|
|
2634
|
-
_set_serialize_reason(2);
|
|
2635
|
-
const $childScope = _peek_scope_id();
|
|
2636
|
-
file_filter_default({
|
|
2637
|
-
value: filter,
|
|
2638
|
-
valueChange: _resume((_new_filter) => {
|
|
2639
|
-
filter = _new_filter;
|
|
2640
|
-
}, "l1", $scope0_id)
|
|
2641
|
-
});
|
|
2642
|
-
_html(`</div><div${_attr_class("_hc")}>`);
|
|
2643
|
-
_if(() => {
|
|
2644
|
-
if (!input.sections.length && filter) {
|
|
2645
|
-
const $scope3_id = _scope_id();
|
|
2646
|
-
_html(`<p${_attr_class("_hd")}>No files match.</p>`);
|
|
2647
|
-
writeScope($scope3_id, {});
|
|
2648
|
-
return 0;
|
|
2649
|
-
}
|
|
2650
|
-
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
2651
|
-
_for_of(input.sections, (section) => {
|
|
2652
|
-
const $scope1_id = _scope_id();
|
|
2653
|
-
_html(`<div${_attr_class("_he")}><button type=button${_attr_class(["_hf", { ["_g_"]: collapsedRepos.has(section.id) }])}><span${_attr_class("_hp")}>`);
|
|
2654
|
-
_if(() => {
|
|
2655
|
-
if (collapsedRepos.has(section.id)) {
|
|
2656
|
-
const $scope4_id = _scope_id();
|
|
2657
|
-
icon_chevron_right_default({ size: 12 });
|
|
2658
|
-
writeScope($scope4_id, {});
|
|
2659
|
-
return 0;
|
|
2660
|
-
} else {
|
|
2661
|
-
const $scope5_id = _scope_id();
|
|
2662
|
-
icon_chevron_down_default({ size: 12 });
|
|
2663
|
-
writeScope($scope5_id, {});
|
|
2664
|
-
return 1;
|
|
2665
|
-
}
|
|
2666
|
-
}, $scope1_id, "c", 1, 1, 1, "</span>", 1);
|
|
2667
|
-
_html(`<span${_attr_class("_hj")}>${_escape(section.label)}${_el_resume($scope1_id, "e", $sg__input_sections)}</span></button>${_el_resume($scope1_id, "b")}`);
|
|
2668
|
-
_if(() => {
|
|
2669
|
-
if (!collapsedRepos.has(section.id) || openedRepos.has(section.id)) {
|
|
2670
|
-
const $scope2_id = _scope_id();
|
|
2671
|
-
const root = treeDirs(section.files);
|
|
2672
|
-
_html(`<div${_attr_class("_hg")}${_attr("hidden", collapsedRepos.has(section.id))}>`);
|
|
2673
|
-
_set_serialize_reason(1);
|
|
2674
|
-
const $childScope2 = _peek_scope_id();
|
|
2675
|
-
diff_tree_dir_default({
|
|
2676
|
-
dir: root,
|
|
2677
|
-
collapsed: collapsedDirs,
|
|
2678
|
-
collapsedKey: _resume((path) => `${section.id}/${path}`, "l2", $scope2_id),
|
|
2679
|
-
onToggleDir: _resume(function(dir) {
|
|
2680
|
-
const key = `${section.id}/${dir.path}`;
|
|
2681
|
-
const next = new Set(collapsedDirs);
|
|
2682
|
-
const collapsed = !next.delete(key);
|
|
2683
|
-
if (collapsed) next.add(key);
|
|
2684
|
-
collapsedDirs = next;
|
|
2685
|
-
input.onDirToggle?.(section.files.filter((f) => f.path.startsWith(`${dir.path}/`)).map((f) => f.key), collapsed);
|
|
2686
|
-
}, "l3", $scope2_id),
|
|
2687
|
-
hrefFor,
|
|
2688
|
-
collapsedFiles: input.collapsedFiles,
|
|
2689
|
-
commentKeys,
|
|
2690
|
-
newKeys
|
|
2691
|
-
});
|
|
2692
|
-
_html(`</div>${_el_resume($scope2_id, "a")}`);
|
|
2693
|
-
_subscribe($si__input_workspaceId__OR__input_scope && $hrefFor2__closures, _subscribe($si__input_newKeys && $newKeys__closures, _subscribe($si__input_commentKeys && $commentKeys__closures, _subscribe($collapsedDirs__closures, _subscribe($collapsedRepos__closures, _subscribe($si__input_collapsedFiles && $input_collapsedFiles__closures, _subscribe($si__input_onDirToggle && $input_onDirToggle__closures, writeScope($scope2_id, {
|
|
2694
|
-
d: root,
|
|
2695
|
-
b: _existing_scope($childScope2)
|
|
2696
|
-
}))))))));
|
|
2697
|
-
return 0;
|
|
2698
|
-
}
|
|
2699
|
-
}, $scope1_id, "f", 1, 1, 1, 0, 1);
|
|
2700
|
-
_html("</div>");
|
|
2701
|
-
_script($scope1_id, "l4");
|
|
2702
|
-
writeScope($scope1_id, {
|
|
2703
|
-
i: section?.id,
|
|
2704
|
-
m: section?.files,
|
|
2705
|
-
_: _scope_with_id($scope0_id)
|
|
2706
|
-
});
|
|
2707
|
-
}, "id", $scope0_id, "f", 1, $sg__input_sections, $sg__input_sections, 0, 1);
|
|
2708
|
-
_html(`</div></aside>${_el_resume($scope0_id, "a", _serialize_guard($scope0_reason, 9))}`);
|
|
2709
|
-
writeScope($scope0_id, {
|
|
2710
|
-
i: _serialize_if($scope0_reason, 2) && input.collapsedRepos,
|
|
2711
|
-
j: _serialize_if($scope0_reason, 1) && input.collapsedReposChange,
|
|
2712
|
-
l: _serialize_if($scope0_reason, 4) && input.openedRepos,
|
|
2713
|
-
m: _serialize_if($scope0_reason, 3) && input.openedReposChange,
|
|
2714
|
-
o: _serialize_if($scope0_reason, 6) && input.filter,
|
|
2715
|
-
p: _serialize_if($scope0_reason, 5) && input.filterChange,
|
|
2716
|
-
t: input.workspaceId,
|
|
2717
|
-
u: input.scope,
|
|
2718
|
-
y: input.sections?.length,
|
|
2719
|
-
z: input.onDirToggle,
|
|
2720
|
-
a0: input.collapsedFiles,
|
|
2721
|
-
a1: collapsedRepos,
|
|
2722
|
-
a3: openedRepos,
|
|
2723
|
-
a5: _serialize_if($scope0_reason, 11) && filter,
|
|
2724
|
-
a8: collapsedDirs,
|
|
2725
|
-
a9: commentKeys,
|
|
2726
|
-
aa: newKeys,
|
|
2727
|
-
ab: hrefFor,
|
|
2728
|
-
a2: input.collapsedReposChange || void 0,
|
|
2729
|
-
a4: input.openedReposChange || void 0,
|
|
2730
|
-
a6: input.filterChange || void 0,
|
|
2731
|
-
c: _existing_scope($childScope),
|
|
2732
|
-
ac: $si__input_onDirToggle && $input_onDirToggle__closures,
|
|
2733
|
-
ad: $si__input_collapsedFiles && $input_collapsedFiles__closures,
|
|
2734
|
-
ae: $collapsedRepos__closures,
|
|
2735
|
-
ag: $collapsedDirs__closures,
|
|
2736
|
-
ah: $si__input_commentKeys && $commentKeys__closures,
|
|
2737
|
-
ai: $si__input_newKeys && $newKeys__closures,
|
|
2738
|
-
aj: $si__input_workspaceId__OR__input_scope && $hrefFor2__closures
|
|
2739
|
-
});
|
|
2740
|
-
_resume_branch($scope0_id);
|
|
2741
|
-
});
|
|
2742
|
-
var sheetDir = "_gY __";
|
|
2743
|
-
//#endregion
|
|
2744
|
-
//#region src/tags/diff-file-sheet.marko
|
|
2745
|
-
var diff_file_sheet_default = _template("g", (input) => {
|
|
2746
|
-
const $scope0_reason = _scope_reason(), $sg__input_total__OR__input_files_length = _serialize_guard($scope0_reason, 2), $sg__input_files = _serialize_guard($scope0_reason, 12), $sg__input_newKeys__OR__input_files = _serialize_guard($scope0_reason, 1), $sg__input_commentKeys__OR__input_newKeys__OR__input_files = _serialize_guard($scope0_reason, 4), $sg__input_commentKeys__OR__input_files = _serialize_guard($scope0_reason, 0), $si__input_files = _serialize_if($scope0_reason, 12), $sg__input_files_length = _serialize_guard($scope0_reason, 13), $si__input_files_length = _serialize_if($scope0_reason, 13), $si__input_commentKeys = _serialize_if($scope0_reason, 10), $si__input_newKeys = _serialize_if($scope0_reason, 11), $si__input_workspaceId__OR__input_scope = _serialize_if($scope0_reason, 3);
|
|
2747
|
-
const $scope0_id = _scope_id();
|
|
2748
|
-
const $commentKeys__closures = /* @__PURE__ */ new Set();
|
|
2749
|
-
const $newKeys__closures = /* @__PURE__ */ new Set();
|
|
2750
|
-
const $hrefFor2__closures = /* @__PURE__ */ new Set();
|
|
2751
|
-
let open = input.open;
|
|
2752
|
-
let filter = input.filter;
|
|
2753
|
-
const commentKeys = input.commentKeys || /* @__PURE__ */ new Set();
|
|
2754
|
-
const newKeys = input.newKeys || /* @__PURE__ */ new Set();
|
|
2755
|
-
const total = input.total ?? input.files.length;
|
|
2756
|
-
const hrefFor = _resume((key) => urlFor({
|
|
2757
|
-
workspaceId: input.workspaceId,
|
|
2758
|
-
view: "diff",
|
|
2759
|
-
scope: input.scope ?? null,
|
|
2760
|
-
file: key
|
|
2761
|
-
}), "g0", $scope0_id);
|
|
2762
|
-
const groups = (() => {
|
|
2763
|
-
const out = [];
|
|
2764
|
-
const byRepo = /* @__PURE__ */ new Map();
|
|
2765
|
-
for (const file of input.files) {
|
|
2766
|
-
const slash = file.key.indexOf("/");
|
|
2767
|
-
const repo = file.key.slice(0, slash);
|
|
2768
|
-
const path = file.key.slice(slash + 1);
|
|
2769
|
-
const at = path.lastIndexOf("/");
|
|
2770
|
-
const dir = at < 0 ? "" : path.slice(0, at);
|
|
2771
|
-
const name = at < 0 ? path : path.slice(at + 1);
|
|
2772
|
-
let dirs = byRepo.get(repo);
|
|
2773
|
-
if (!dirs) {
|
|
2774
|
-
byRepo.set(repo, dirs = /* @__PURE__ */ new Map());
|
|
2775
|
-
out.push({
|
|
2776
|
-
repo,
|
|
2777
|
-
dirs: []
|
|
2778
|
-
});
|
|
2779
|
-
}
|
|
2780
|
-
let group = dirs.get(dir);
|
|
2781
|
-
if (!group) {
|
|
2782
|
-
dirs.set(dir, group = {
|
|
2783
|
-
dir,
|
|
2784
|
-
files: []
|
|
2785
|
-
});
|
|
2786
|
-
out[out.length - 1].dirs.push(group);
|
|
2787
|
-
}
|
|
2788
|
-
group.files.push({
|
|
2789
|
-
file,
|
|
2790
|
-
name
|
|
2791
|
-
});
|
|
2792
|
-
}
|
|
2793
|
-
return out;
|
|
2794
|
-
})();
|
|
2795
|
-
_if(() => {
|
|
2796
|
-
if (open) {
|
|
2797
|
-
const $scope1_id = _scope_id();
|
|
2798
|
-
_html(`<div${_attr_class("_gP")}></div>${_el_resume($scope1_id, "a")}<div${_attr_class("_gQ")} role=dialog aria-label="Jump to file"><div${_attr_class("_gR")}><strong${_attr_class("_gO")}>Files</strong><span${_attr_class("_gS")}>${_escape(input.files.length)}${_el_resume($scope1_id, "f", $sg__input_files_length)}${_sep($sg__input_total__OR__input_files_length)}${input.files.length !== total ? ` / ${_escape(`${total}`)}` : ""}${_el_resume($scope1_id, "g", $sg__input_total__OR__input_files_length)}</span><button type=button${_attr_class([iconBtnLg, "_gN"])} title=Close aria-label=Close>`);
|
|
2799
|
-
icon_xmark_default({ size: 16 });
|
|
2800
|
-
_html(`</button>${_el_resume($scope1_id, "h")}</div><div${_attr_class("_g0")}>`);
|
|
2801
|
-
_set_serialize_reason(2);
|
|
2802
|
-
const $childScope = _peek_scope_id();
|
|
2803
|
-
file_filter_default({
|
|
2804
|
-
value: filter,
|
|
2805
|
-
valueChange: _resume((_new_filter) => {
|
|
2806
|
-
filter = _new_filter;
|
|
2807
|
-
}, "g1", $scope1_id)
|
|
2808
|
-
});
|
|
2809
|
-
_html(`</div><div${_attr_class("_gT")}>`);
|
|
2810
|
-
_for_of(groups, (group) => {
|
|
2811
|
-
const $scope2_id = _scope_id();
|
|
2812
|
-
_html(`<div${_attr_class("_gU")}><div${_attr_class("_gV")}>${_escape(group.repo)}${_el_resume($scope2_id, "c", $sg__input_files)}</div>`);
|
|
2813
|
-
_for_of(group.dirs, ({ dir, files }) => {
|
|
2814
|
-
const $scope3_id = _scope_id();
|
|
2815
|
-
_html(`<div${_attr_class("_gW")}>`);
|
|
2816
|
-
_if(() => {
|
|
2817
|
-
if (dir) {
|
|
2818
|
-
const $scope5_id = _scope_id();
|
|
2819
|
-
_html(`<div${_attr_class(sheetDir)}${_attr("title", dir)}><bdi>${_escape(dir)}${_el_resume($scope5_id, "b", $sg__input_files)}/</bdi></div>${_el_resume($scope5_id, "a", $sg__input_files)}`);
|
|
2820
|
-
$si__input_files && writeScope($scope5_id, { _: _scope_with_id($scope3_id) });
|
|
2821
|
-
return 0;
|
|
2822
|
-
}
|
|
2823
|
-
}, $scope3_id, "b", $sg__input_files, $sg__input_files, $sg__input_files, 0, 1);
|
|
2824
|
-
_for_of(files, ({ file, name }) => {
|
|
2825
|
-
const $scope4_id = _scope_id();
|
|
2826
|
-
_html(`<a${_attr("href", hrefFor(file.key))}${_attr_class(["_gX", "_w"])}><span${_attr_class("_9")}${_attr("data-status", file.status)}>${_escape(file.status)}${_el_resume($scope4_id, "c", $sg__input_files)}</span>${_el_resume($scope4_id, "b", $sg__input_files)}<span${_attr_class("_gZ")}><bdi>${_escape(name)}${_el_resume($scope4_id, "e", $sg__input_files)}</bdi></span>`);
|
|
2827
|
-
_if(() => {
|
|
2828
|
-
if (newKeys.has(file.key)) {
|
|
2829
|
-
const $scope6_id = _scope_id();
|
|
2830
|
-
_html(`<span${_attr_class(["_y", "_g2"])} title="Changed since your last visit"></span>`);
|
|
2831
|
-
_serialize_if($scope0_reason, 1) && writeScope($scope6_id, {});
|
|
2832
|
-
return 0;
|
|
2833
|
-
}
|
|
2834
|
-
}, $scope4_id, "f", $sg__input_newKeys__OR__input_files, $sg__input_newKeys__OR__input_files, $sg__input_commentKeys__OR__input_newKeys__OR__input_files, 0, 1);
|
|
2835
|
-
_if(() => {
|
|
2836
|
-
if (commentKeys.has(file.key)) {
|
|
2837
|
-
const $scope7_id = _scope_id();
|
|
2838
|
-
icon_comment_default({
|
|
2839
|
-
size: 12,
|
|
2840
|
-
class: "_g3"
|
|
2841
|
-
});
|
|
2842
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope7_id, {});
|
|
2843
|
-
return 0;
|
|
2844
|
-
}
|
|
2845
|
-
}, $scope4_id, "g", $sg__input_commentKeys__OR__input_files, $sg__input_commentKeys__OR__input_files, $sg__input_commentKeys__OR__input_newKeys__OR__input_files, 0, 1);
|
|
2846
|
-
_html(`</a>${_el_resume($scope4_id, "a")}`);
|
|
2847
|
-
_script($scope4_id, "g2");
|
|
2848
|
-
_subscribe($si__input_workspaceId__OR__input_scope && $hrefFor2__closures, _subscribe($si__input_newKeys && $newKeys__closures, _subscribe($si__input_commentKeys && $commentKeys__closures, writeScope($scope4_id, {
|
|
2849
|
-
k: _serialize_if($scope0_reason, 5) && file?.key,
|
|
2850
|
-
_: _scope_with_id($scope3_id)
|
|
2851
|
-
}))));
|
|
2852
|
-
}, (f) => f.file.key, $scope3_id, "c", $sg__input_files, $sg__input_files, $sg__input_files, 0, 1);
|
|
2853
|
-
_html("</div>");
|
|
2854
|
-
writeScope($scope3_id, {
|
|
2855
|
-
f: $si__input_files && dir,
|
|
2856
|
-
_: _scope_with_id($scope2_id)
|
|
2857
|
-
});
|
|
2858
|
-
}, "dir", $scope2_id, "d", $sg__input_files, $sg__input_files, $sg__input_files, 0, 1);
|
|
2859
|
-
_html("</div>");
|
|
2860
|
-
writeScope($scope2_id, { _: _scope_with_id($scope1_id) });
|
|
2861
|
-
}, "repo", $scope1_id, "m", $sg__input_files, $sg__input_files, $sg__input_files, 0, 1);
|
|
2862
|
-
_if(() => {
|
|
2863
|
-
if (!input.files.length) {
|
|
2864
|
-
const $scope8_id = _scope_id();
|
|
2865
|
-
_html(`<p${_attr_class("_g1")}>No files match.</p>`);
|
|
2866
|
-
$si__input_files_length && writeScope($scope8_id, {});
|
|
2867
|
-
return 0;
|
|
2868
|
-
}
|
|
2869
|
-
}, $scope1_id, "n", $sg__input_files_length, $sg__input_files_length, $sg__input_files_length, 0, 1);
|
|
2870
|
-
_html("</div></div>");
|
|
2871
|
-
_script($scope1_id, "g3");
|
|
2872
|
-
writeScope($scope1_id, { k: _existing_scope($childScope) });
|
|
2873
|
-
return 0;
|
|
2874
|
-
}
|
|
2875
|
-
}, $scope0_id, "a");
|
|
2876
|
-
writeScope($scope0_id, {
|
|
2877
|
-
d: _serialize_if($scope0_reason, 7) && input.open,
|
|
2878
|
-
e: _serialize_if($scope0_reason, 6) && input.openChange,
|
|
2879
|
-
g: _serialize_if($scope0_reason, 9) && input.filter,
|
|
2880
|
-
h: _serialize_if($scope0_reason, 8) && input.filterChange,
|
|
2881
|
-
l: $si__input_files_length && input.total,
|
|
2882
|
-
n: input.files?.length,
|
|
2883
|
-
p: input.workspaceId,
|
|
2884
|
-
q: input.scope,
|
|
2885
|
-
u: filter,
|
|
2886
|
-
w: commentKeys,
|
|
2887
|
-
x: newKeys,
|
|
2888
|
-
y: total,
|
|
2889
|
-
z: hrefFor,
|
|
2890
|
-
a0: groups,
|
|
2891
|
-
t: input.openChange || void 0,
|
|
2892
|
-
v: input.filterChange || void 0,
|
|
2893
|
-
a3: $si__input_commentKeys && $commentKeys__closures,
|
|
2894
|
-
a4: $si__input_newKeys && $newKeys__closures,
|
|
2895
|
-
a6: $si__input_workspaceId__OR__input_scope && $hrefFor2__closures
|
|
2896
|
-
});
|
|
2897
|
-
_resume_branch($scope0_id);
|
|
2898
|
-
});
|
|
2899
|
-
//#endregion
|
|
2900
|
-
//#region src/tags/diff-view.marko
|
|
2901
|
-
var api;
|
|
2902
|
-
var getTermDims;
|
|
2903
|
-
var revealSearchHit;
|
|
2904
|
-
var setSearchPaint;
|
|
2905
|
-
var diff_view_default = _template("m", (input) => {
|
|
2906
|
-
const $scope0_reason = _scope_reason(), $si__input_sessions = _serialize_if($scope0_reason, 5), $si__input_workspaceBranch = _serialize_if($scope0_reason, 6), $si__input_workspaceName = _serialize_if($scope0_reason, 7);
|
|
2907
|
-
const $scope0_id = _scope_id();
|
|
2908
|
-
const $error__closures = /* @__PURE__ */ new Set();
|
|
2909
|
-
const $scope__closures = /* @__PURE__ */ new Set();
|
|
2910
|
-
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
2911
|
-
const $input_workspaceBranch__closures = /* @__PURE__ */ new Set();
|
|
2912
|
-
const $input_workspaceName__closures = /* @__PURE__ */ new Set();
|
|
2913
|
-
const $draft__closures = /* @__PURE__ */ new Set();
|
|
2914
|
-
const $loading__closures = /* @__PURE__ */ new Set();
|
|
2915
|
-
const $onlyNew__closures = /* @__PURE__ */ new Set();
|
|
2916
|
-
const $findState_hit__closures = /* @__PURE__ */ new Set();
|
|
2917
|
-
const $collapsedRepos__closures = /* @__PURE__ */ new Set();
|
|
2918
|
-
const $collapsedFiles__closures = /* @__PURE__ */ new Set();
|
|
2919
|
-
const $setFilesCollapsed2__closures = /* @__PURE__ */ new Set();
|
|
2920
|
-
const $openedRepos__closures = /* @__PURE__ */ new Set();
|
|
2921
|
-
const $expandingRepos__closures = /* @__PURE__ */ new Set();
|
|
2922
|
-
const $reload2__closures = /* @__PURE__ */ new Set();
|
|
2923
|
-
const $repoList_length__closures = /* @__PURE__ */ new Set();
|
|
2924
|
-
const $shownKeySet__closures = /* @__PURE__ */ new Set();
|
|
2925
|
-
const $commentsByFile__closures = /* @__PURE__ */ new Set();
|
|
2926
|
-
const $localDifferIds__closures = /* @__PURE__ */ new Set();
|
|
2927
|
-
const $saveComment2__closures = /* @__PURE__ */ new Set();
|
|
2928
|
-
const $removeComment2__closures = /* @__PURE__ */ new Set();
|
|
2929
|
-
const $editComment2__closures = /* @__PURE__ */ new Set();
|
|
2930
|
-
const $sendOneComment2__closures = /* @__PURE__ */ new Set();
|
|
2931
|
-
const $sendDraftComment2__closures = /* @__PURE__ */ new Set();
|
|
2932
|
-
const $toggleSection2__closures = /* @__PURE__ */ new Set();
|
|
2933
|
-
let repos = null;
|
|
2934
|
-
let comments = [];
|
|
2935
|
-
let draft = null;
|
|
2936
|
-
let error = null;
|
|
2937
|
-
let loading = false;
|
|
2938
|
-
let fileFilter = diffFilter(input.workspaceId);
|
|
2939
|
-
const $filterChange = _resume((_new_fileFilter) => {
|
|
2940
|
-
fileFilter = _new_fileFilter;
|
|
2941
|
-
}, "m1", $scope0_id);
|
|
2942
|
-
let onlyNew = false;
|
|
2943
|
-
let scope = input.scope ?? diffScope();
|
|
2944
|
-
let treeOpen = diffTreeOpen();
|
|
2945
|
-
let fileSheet = false;
|
|
2946
|
-
let findOpen = input.findOpen;
|
|
2947
|
-
let findTick = input.findTick || 0;
|
|
2948
|
-
const findFocusRef = input.findFocusRef || { focus: _resume(function() {}, "m2") };
|
|
2949
|
-
let findState = {
|
|
2950
|
-
query: "",
|
|
2951
|
-
hit: null,
|
|
2952
|
-
keys: []
|
|
2953
|
-
};
|
|
2954
|
-
let collapsedRepos = /* @__PURE__ */ new Set();
|
|
2955
|
-
let collapsedFiles = /* @__PURE__ */ new Set();
|
|
2956
|
-
const setFilesCollapsed = _resume((keys, collapsed) => {
|
|
2957
|
-
const next = new Set(collapsedFiles);
|
|
2958
|
-
for (const key of keys) if (collapsed) next.add(key);
|
|
2959
|
-
else next.delete(key);
|
|
2960
|
-
if (next.size !== collapsedFiles.size || [...next].some((k) => !collapsedFiles.has(k))) collapsedFiles = next;
|
|
2961
|
-
}, "m3", $scope0_id);
|
|
2962
|
-
let openedRepos = /* @__PURE__ */ new Set();
|
|
2963
|
-
let expandingRepos = /* @__PURE__ */ new Set();
|
|
2964
|
-
const nearBox = {
|
|
2965
|
-
io: null,
|
|
2966
|
-
root: null,
|
|
2967
|
-
cbs: null
|
|
2968
|
-
};
|
|
2969
|
-
const observeNear = _resume((el, cb) => {
|
|
2970
|
-
nearBox.cbs ??= /* @__PURE__ */ new WeakMap();
|
|
2971
|
-
nearBox.cbs.set(el, cb);
|
|
2972
|
-
const root = ((scrollEl) => scrollEl())(_el_read_error) || null;
|
|
2973
|
-
if (!nearBox.io || nearBox.root !== root) {
|
|
2974
|
-
nearBox.io?.disconnect();
|
|
2975
|
-
nearBox.root = root;
|
|
2976
|
-
nearBox.io = new IntersectionObserver((entries) => {
|
|
2977
|
-
for (const entry of entries) {
|
|
2978
|
-
if (!entry.isIntersecting) continue;
|
|
2979
|
-
nearBox.io.unobserve(entry.target);
|
|
2980
|
-
nearBox.cbs.get(entry.target)?.();
|
|
2981
|
-
}
|
|
2982
|
-
}, {
|
|
2983
|
-
root,
|
|
2984
|
-
rootMargin: "800px 0px"
|
|
2985
|
-
});
|
|
2986
|
-
}
|
|
2987
|
-
nearBox.io.observe(el);
|
|
2988
|
-
requestAnimationFrame(() => {
|
|
2989
|
-
if (!el.isConnected) return;
|
|
2990
|
-
const rootEl = ((scrollEl) => scrollEl())(_el_read_error);
|
|
2991
|
-
const er = el.getBoundingClientRect();
|
|
2992
|
-
const rr = rootEl ? rootEl.getBoundingClientRect() : {
|
|
2993
|
-
top: 0,
|
|
2994
|
-
bottom: window.innerHeight
|
|
2995
|
-
};
|
|
2996
|
-
const pad = 800;
|
|
2997
|
-
if (er.bottom >= rr.top - pad && er.top <= rr.bottom + pad) {
|
|
2998
|
-
nearBox.io?.unobserve(el);
|
|
2999
|
-
cb();
|
|
3000
|
-
}
|
|
3001
|
-
});
|
|
3002
|
-
}, "m4", $scope0_id);
|
|
3003
|
-
const pinToTop = _resume((el) => {
|
|
3004
|
-
const root = ((scrollEl) => scrollEl())(_el_read_error);
|
|
3005
|
-
if (!root) {
|
|
3006
|
-
el.scrollIntoView({ block: "start" });
|
|
3007
|
-
return;
|
|
3008
|
-
}
|
|
3009
|
-
const top = el.getBoundingClientRect().top - root.getBoundingClientRect().top + root.scrollTop;
|
|
3010
|
-
root.scrollTo({ top: Math.max(0, top - 8) });
|
|
3011
|
-
}, "m5", $scope0_id);
|
|
3012
|
-
const retryFrames = _resume((attempt, ms = 2500) => {
|
|
3013
|
-
const started = Date.now();
|
|
3014
|
-
const tick = () => {
|
|
3015
|
-
if (!attempt() && Date.now() - started < ms) requestAnimationFrame(tick);
|
|
3016
|
-
};
|
|
3017
|
-
tick();
|
|
3018
|
-
}, "m6");
|
|
3019
|
-
const focusPrSection = _resume((pr) => {
|
|
3020
|
-
if (!pr) return;
|
|
3021
|
-
const list = repos || [];
|
|
3022
|
-
const focused = list.find((r) => r.pr && `${r.worktree}/${r.pr.number}` === pr);
|
|
3023
|
-
const keep = new Set(openedRepos);
|
|
3024
|
-
for (const r of list) if (!collapsedRepos.has(r.id)) keep.add(r.id);
|
|
3025
|
-
if (focused) keep.add(focused.id);
|
|
3026
|
-
openedRepos = keep;
|
|
3027
|
-
const next = /* @__PURE__ */ new Set();
|
|
3028
|
-
for (const r of list) if (!focused || r.id !== focused.id) next.add(r.id);
|
|
3029
|
-
collapsedRepos = next;
|
|
3030
|
-
expandingRepos = /* @__PURE__ */ new Set();
|
|
3031
|
-
retryFrames(() => {
|
|
3032
|
-
const el = ((scrollEl) => scrollEl())(_el_read_error)?.querySelector(`[data-pr="${CSS.escape(pr)}"]`);
|
|
3033
|
-
if (el) pinToTop(el);
|
|
3034
|
-
return !!el;
|
|
3035
|
-
});
|
|
3036
|
-
}, "m7", $scope0_id);
|
|
3037
|
-
const findFile = _resume((key) => ((scrollEl) => scrollEl())(_el_read_error)?.querySelector(`details[data-key="${CSS.escape(key)}"]`) ?? null, "m8", $scope0_id);
|
|
3038
|
-
const openFile = _resume((key) => {
|
|
3039
|
-
const el = findFile(key);
|
|
3040
|
-
if (el) el.open = true;
|
|
3041
|
-
return el;
|
|
3042
|
-
}, "m9", $scope0_id);
|
|
3043
|
-
const jumpTo = _resume((key) => {
|
|
3044
|
-
input.onFileChange?.(key);
|
|
3045
|
-
retryFrames(() => {
|
|
3046
|
-
const el = openFile(key);
|
|
3047
|
-
if (el) pinToTop(el);
|
|
3048
|
-
return !!el;
|
|
3049
|
-
});
|
|
3050
|
-
}, "m10", $scope0_id);
|
|
3051
|
-
const posBox = {
|
|
3052
|
-
anchor: null,
|
|
3053
|
-
raf: 0,
|
|
3054
|
-
run: 0
|
|
3055
|
-
};
|
|
3056
|
-
const anchorAt = _resume(() => {
|
|
3057
|
-
const root = ((scrollEl) => scrollEl())(_el_read_error);
|
|
3058
|
-
if (!root || !root.scrollTop) return null;
|
|
3059
|
-
const rootTop = root.getBoundingClientRect().top;
|
|
3060
|
-
let best = null;
|
|
3061
|
-
for (const el of root.querySelectorAll("details[data-key]")) {
|
|
3062
|
-
if (el.hidden) continue;
|
|
3063
|
-
const top = el.getBoundingClientRect().top;
|
|
3064
|
-
if (top > rootTop + 1) break;
|
|
3065
|
-
best = {
|
|
3066
|
-
scope,
|
|
3067
|
-
key: el.dataset.key,
|
|
3068
|
-
off: Math.round(rootTop - top)
|
|
3069
|
-
};
|
|
3070
|
-
}
|
|
3071
|
-
return best;
|
|
3072
|
-
}, "m11", $scope0_id);
|
|
3073
|
-
const noteScroll = _resume(() => {
|
|
3074
|
-
if (posBox.raf) return;
|
|
3075
|
-
posBox.raf = requestAnimationFrame(() => {
|
|
3076
|
-
posBox.raf = 0;
|
|
3077
|
-
if (((scrollEl) => scrollEl())(_el_read_error)?.isConnected) posBox.anchor = anchorAt();
|
|
3078
|
-
});
|
|
3079
|
-
}, "m12", $scope0_id);
|
|
3080
|
-
const savePos = _resume(() => {
|
|
3081
|
-
if (repos) setDiffPos(input.workspaceId, posBox.anchor);
|
|
3082
|
-
}, "m13", $scope0_id);
|
|
3083
|
-
const restorePos = _resume((pos) => {
|
|
3084
|
-
const run = ++posBox.run;
|
|
3085
|
-
const started = Date.now();
|
|
3086
|
-
let pinnedAt = 0;
|
|
3087
|
-
const cancel = () => {
|
|
3088
|
-
if (posBox.run === run) posBox.run++;
|
|
3089
|
-
};
|
|
3090
|
-
const tick = () => {
|
|
3091
|
-
if (posBox.run !== run) return;
|
|
3092
|
-
const root = ((scrollEl) => scrollEl())(_el_read_error);
|
|
3093
|
-
const el = findFile(pos.key);
|
|
3094
|
-
if (root && el) {
|
|
3095
|
-
const drift = el.getBoundingClientRect().top - root.getBoundingClientRect().top + pos.off;
|
|
3096
|
-
if (Math.abs(drift) > 1) root.scrollTop += drift;
|
|
3097
|
-
if (!pinnedAt) {
|
|
3098
|
-
pinnedAt = Date.now();
|
|
3099
|
-
for (const type of [
|
|
3100
|
-
"wheel",
|
|
3101
|
-
"touchstart",
|
|
3102
|
-
"keydown"
|
|
3103
|
-
]) root.addEventListener(type, cancel, {
|
|
3104
|
-
once: true,
|
|
3105
|
-
passive: true
|
|
3106
|
-
});
|
|
3107
|
-
}
|
|
3108
|
-
if (Date.now() - pinnedAt < 1500) requestAnimationFrame(tick);
|
|
3109
|
-
} else if (!pinnedAt && Date.now() - started < 2500) requestAnimationFrame(tick);
|
|
3110
|
-
};
|
|
3111
|
-
requestAnimationFrame(tick);
|
|
3112
|
-
}, "m14", $scope0_id);
|
|
3113
|
-
const headBox = {
|
|
3114
|
-
sig: "",
|
|
3115
|
-
timer: 0
|
|
3116
|
-
};
|
|
3117
|
-
const loadBox = { seq: 0 };
|
|
3118
|
-
const load = _resume(async (which = scope, refresh = false) => {
|
|
3119
|
-
const seq = ++loadBox.seq;
|
|
3120
|
-
loading = true;
|
|
3121
|
-
error = null;
|
|
3122
|
-
try {
|
|
3123
|
-
const q = new URLSearchParams();
|
|
3124
|
-
if (which !== "committed") q.set("scope", which);
|
|
3125
|
-
if (refresh) q.set("refresh", "1");
|
|
3126
|
-
const qs = q.size ? `?${q}` : "";
|
|
3127
|
-
const [diffData, reviewData] = await Promise.all([api(`/api/workspaces/${input.workspaceId}/diff${qs}`), api(`/api/workspaces/${input.workspaceId}/review`)]);
|
|
3128
|
-
if (seq !== loadBox.seq) return;
|
|
3129
|
-
repos = diffData;
|
|
3130
|
-
if (onlyNew && !diffData.some((r) => r.files.some((f) => f.changedSince))) onlyNew = false;
|
|
3131
|
-
comments = reviewData.comments || [];
|
|
3132
|
-
headBox.sig = prHeadSigFromDiff(diffData);
|
|
3133
|
-
if (input.focusPr) focusPrSection(input.focusPr);
|
|
3134
|
-
else if (input.focusFile) jumpTo(input.focusFile);
|
|
3135
|
-
else if (!refresh && loadBox.seq === 1) {
|
|
3136
|
-
const pos = diffPos(input.workspaceId);
|
|
3137
|
-
if (pos && pos.scope === which) restorePos(pos);
|
|
3138
|
-
}
|
|
3139
|
-
} catch (err) {
|
|
3140
|
-
if (seq !== loadBox.seq) return;
|
|
3141
|
-
error = String(err.message || err);
|
|
3142
|
-
} finally {
|
|
3143
|
-
if (seq === loadBox.seq) loading = false;
|
|
3144
|
-
}
|
|
3145
|
-
}, "m15", $scope0_id);
|
|
3146
|
-
const setScope = _resume((next, persist = true) => {
|
|
3147
|
-
if (next === scope) return;
|
|
3148
|
-
scope = next;
|
|
3149
|
-
if (persist) setDiffScope(next);
|
|
3150
|
-
input.onScopeChange?.(next);
|
|
3151
|
-
load(next);
|
|
3152
|
-
}, "m16", $scope0_id);
|
|
3153
|
-
const sendGate = { busy: 0 };
|
|
3154
|
-
const loadReview = _resume(async () => {
|
|
3155
|
-
if (sendGate.busy) return;
|
|
3156
|
-
try {
|
|
3157
|
-
const reviewData = await api(`/api/workspaces/${input.workspaceId}/review`);
|
|
3158
|
-
if (sendGate.busy) return;
|
|
3159
|
-
comments = reviewData.comments || [];
|
|
3160
|
-
} catch {}
|
|
3161
|
-
}, "m17", $scope0_id);
|
|
3162
|
-
const reload = _resume(() => load(scope, true), "m18", $scope0_id);
|
|
3163
|
-
const reloadSoon = _resume(() => {
|
|
3164
|
-
if (headBox.timer) clearTimeout(headBox.timer);
|
|
3165
|
-
headBox.timer = setTimeout(() => {
|
|
3166
|
-
headBox.timer = 0;
|
|
3167
|
-
reload();
|
|
3168
|
-
}, 250);
|
|
3169
|
-
}, "m19", $scope0_id);
|
|
3170
|
-
const markSeen = _resume(() => {
|
|
3171
|
-
if (!repos) return;
|
|
3172
|
-
const heads = {};
|
|
3173
|
-
const dirty = {};
|
|
3174
|
-
for (const r of repos) {
|
|
3175
|
-
heads[r.id] = r.head;
|
|
3176
|
-
for (const f of r.files) if (f.hash) dirty[`${r.worktree}/${f.path}`] = f.hash;
|
|
3177
|
-
}
|
|
3178
|
-
fetch(`/api/workspaces/${input.workspaceId}/review`, {
|
|
3179
|
-
method: "POST",
|
|
3180
|
-
headers: { "content-type": "application/json" },
|
|
3181
|
-
body: JSON.stringify({
|
|
3182
|
-
action: "seen",
|
|
3183
|
-
heads,
|
|
3184
|
-
dirty
|
|
3185
|
-
}),
|
|
3186
|
-
keepalive: true
|
|
3187
|
-
}).catch(() => {});
|
|
3188
|
-
}, "m20", $scope0_id);
|
|
3189
|
-
const repoList = repos || [];
|
|
3190
|
-
const allFiles = repoList.flatMap((r) => r.files.map((f) => ({
|
|
3191
|
-
...f,
|
|
3192
|
-
repo: r.id,
|
|
3193
|
-
key: `${r.worktree}/${f.path}`
|
|
3194
|
-
})));
|
|
3195
|
-
const fileFiltered = (() => {
|
|
3196
|
-
const match = makeFileFilter(fileFilter);
|
|
3197
|
-
return allFiles.filter((f) => match(f.key) && (!onlyNew || f.changedSince));
|
|
3198
|
-
})();
|
|
3199
|
-
const findKeys = findState.query.trim() ? new Set(findState.keys) : null;
|
|
3200
|
-
const shownFiles = findKeys ? fileFiltered.filter((f) => findKeys.has(f.key) || f.key === findState.hit?.key) : fileFiltered;
|
|
3201
|
-
const shownKeySet = new Set(shownFiles.map((f) => f.key));
|
|
3202
|
-
const newKeys = new Set(allFiles.filter((f) => f.changedSince).map((f) => f.key));
|
|
3203
|
-
const groupByRepo = _resume((files) => {
|
|
3204
|
-
const map = /* @__PURE__ */ new Map();
|
|
3205
|
-
for (const f of files) {
|
|
3206
|
-
const list = map.get(f.repo);
|
|
3207
|
-
if (list) list.push(f);
|
|
3208
|
-
else map.set(f.repo, [f]);
|
|
3209
|
-
}
|
|
3210
|
-
return map;
|
|
3211
|
-
}, "m21");
|
|
3212
|
-
const filesByRepo = groupByRepo(allFiles);
|
|
3213
|
-
const shownByRepo = groupByRepo(shownFiles);
|
|
3214
|
-
const commentsByFile = (() => {
|
|
3215
|
-
const map = /* @__PURE__ */ new Map();
|
|
3216
|
-
for (const c of comments) {
|
|
3217
|
-
const key = `${c.worktree}/${c.path}`;
|
|
3218
|
-
map.set(key, [...map.get(key) || [], c]);
|
|
3219
|
-
}
|
|
3220
|
-
return map;
|
|
3221
|
-
})();
|
|
3222
|
-
const commentKeys = new Set(commentsByFile.keys());
|
|
3223
|
-
const treeSections = repoList.filter((r) => (shownByRepo.get(r.id) || []).length).map((r) => ({
|
|
3224
|
-
id: r.id,
|
|
3225
|
-
label: r.pr ? `${r.worktree} #${r.pr.number}` : r.worktree,
|
|
3226
|
-
files: shownByRepo.get(r.id) || []
|
|
3227
|
-
}));
|
|
3228
|
-
const localDifferIds = new Set(repoList.filter((repo) => !!repo.pr && !!repo.localHead && (repo.localHead !== repo.head || repo.branch !== repo.pr.headRefName)).map((r) => r.id));
|
|
3229
|
-
const hasFiles = !repos || allFiles.length > 0;
|
|
3230
|
-
const fileWorktree = _resume((repo) => repo.includes("#") ? repo.split("#")[0] : repo, "m22");
|
|
3231
|
-
const anchorFor = _resume((file, range) => {
|
|
3232
|
-
const section = repoList.find((r) => r.id === file.repo);
|
|
3233
|
-
const source = range.side === "deletions" ? file.old : file.new;
|
|
3234
|
-
return {
|
|
3235
|
-
head: section?.head,
|
|
3236
|
-
snippet: source == null ? void 0 : quoteRange(source, range.start, range.end, range.side === "deletions" ? "deletions" : "additions")
|
|
3237
|
-
};
|
|
3238
|
-
}, "m23", $scope0_id);
|
|
3239
|
-
const saveComment = _resume(async (file, text) => {
|
|
3240
|
-
const range = draft;
|
|
3241
|
-
draft = null;
|
|
3242
|
-
if (!range) return;
|
|
3243
|
-
try {
|
|
3244
|
-
const comment = await api(`/api/workspaces/${input.workspaceId}/review`, {
|
|
3245
|
-
method: "POST",
|
|
3246
|
-
headers: { "content-type": "application/json" },
|
|
3247
|
-
body: JSON.stringify({
|
|
3248
|
-
action: "comment",
|
|
3249
|
-
worktree: fileWorktree(file.repo),
|
|
3250
|
-
path: file.path,
|
|
3251
|
-
side: range.side,
|
|
3252
|
-
line_start: range.start,
|
|
3253
|
-
line_end: range.end,
|
|
3254
|
-
text: text.trim(),
|
|
3255
|
-
...anchorFor(file, range)
|
|
3256
|
-
})
|
|
3257
|
-
});
|
|
3258
|
-
comments = comments.concat(comment);
|
|
3259
|
-
} catch (err) {
|
|
3260
|
-
error = String(err.message || err);
|
|
3261
|
-
}
|
|
3262
|
-
}, "m24", $scope0_id);
|
|
3263
|
-
const deleteRemote = _resume((ids) => ids === "all" ? fetch(`/api/workspaces/${input.workspaceId}/review`, {
|
|
3264
|
-
method: "POST",
|
|
3265
|
-
headers: { "content-type": "application/json" },
|
|
3266
|
-
body: JSON.stringify({ action: "clear" })
|
|
3267
|
-
}) : Promise.all(ids.map((id) => fetch(`/api/workspaces/${input.workspaceId}/review/${id}`, { method: "DELETE" }))), "m25", $scope0_id);
|
|
3268
|
-
const removeComment = _resume(async (id) => {
|
|
3269
|
-
comments = comments.filter((c) => c.id !== id);
|
|
3270
|
-
await deleteRemote([id]).catch(() => {});
|
|
3271
|
-
}, "m26", $scope0_id);
|
|
3272
|
-
const editComment = _resume(async (id, text) => {
|
|
3273
|
-
const prev = comments.find((c) => c.id === id);
|
|
3274
|
-
if (!prev) return;
|
|
3275
|
-
const trimmed = text.trim();
|
|
3276
|
-
if (!trimmed || trimmed === prev.text) return;
|
|
3277
|
-
comments = comments.map((c) => c.id === id ? {
|
|
3278
|
-
...c,
|
|
3279
|
-
text: trimmed
|
|
3280
|
-
} : c);
|
|
3281
|
-
try {
|
|
3282
|
-
await api(`/api/workspaces/${input.workspaceId}/review/${id}`, {
|
|
3283
|
-
method: "PATCH",
|
|
3284
|
-
headers: { "content-type": "application/json" },
|
|
3285
|
-
body: JSON.stringify({ text: trimmed })
|
|
3286
|
-
});
|
|
3287
|
-
} catch (err) {
|
|
3288
|
-
comments = comments.map((c) => c.id === id ? prev : c);
|
|
3289
|
-
error = String(err.message || err);
|
|
3290
|
-
throw err;
|
|
3291
|
-
}
|
|
3292
|
-
}, "m27", $scope0_id);
|
|
3293
|
-
const dispatch = _resume(async (list, to, consume) => {
|
|
3294
|
-
if (!list.length) return true;
|
|
3295
|
-
sendGate.busy++;
|
|
3296
|
-
try {
|
|
3297
|
-
const text = commentMarkdown(list, repos);
|
|
3298
|
-
if ("clipboard" in to) {
|
|
3299
|
-
if (!await copyText(text)) {
|
|
3300
|
-
error = "Copy failed: the clipboard needs HTTPS in this browser.";
|
|
3301
|
-
return false;
|
|
3302
|
-
}
|
|
3303
|
-
} else {
|
|
3304
|
-
await api(`/api/sessions/${to.session}/send`, {
|
|
3305
|
-
method: "POST",
|
|
3306
|
-
headers: { "content-type": "application/json" },
|
|
3307
|
-
body: JSON.stringify({
|
|
3308
|
-
text: `Please address this review feedback, then summarize what you changed.\n\n${text}`,
|
|
3309
|
-
...getTermDims() || {}
|
|
3310
|
-
})
|
|
3311
|
-
});
|
|
3312
|
-
input.onSent?.(to.session);
|
|
3313
|
-
}
|
|
3314
|
-
draft = null;
|
|
3315
|
-
if (consume === "all") comments = [];
|
|
3316
|
-
else {
|
|
3317
|
-
const gone = new Set(consume);
|
|
3318
|
-
comments = comments.filter((c) => !gone.has(c.id));
|
|
3319
|
-
}
|
|
3320
|
-
if (consume === "all" || consume.length) await deleteRemote(consume).catch(() => {});
|
|
3321
|
-
return true;
|
|
3322
|
-
} catch (err) {
|
|
3323
|
-
error = String(err.message || err);
|
|
3324
|
-
return false;
|
|
3325
|
-
} finally {
|
|
3326
|
-
sendGate.busy--;
|
|
3327
|
-
}
|
|
3328
|
-
}, "m28", $scope0_id);
|
|
3329
|
-
const copyMarkdown = _resume(() => dispatch(comments, { clipboard: true }, "all"), "m29", $scope0_id);
|
|
3330
|
-
const sendTo = _resume((sessionId) => dispatch(comments, { session: sessionId }, "all"), "m30", $scope0_id);
|
|
3331
|
-
const sendOneComment = _resume((id, sessionId) => {
|
|
3332
|
-
const comment = comments.find((c) => c.id === id);
|
|
3333
|
-
return comment ? dispatch([comment], { session: sessionId }, [id]) : Promise.resolve(false);
|
|
3334
|
-
}, "m31", $scope0_id);
|
|
3335
|
-
const sendDraftComment = _resume((file, text, sessionId) => {
|
|
3336
|
-
const range = draft;
|
|
3337
|
-
const trimmed = text.trim();
|
|
3338
|
-
if (!range || !trimmed) return Promise.resolve(false);
|
|
3339
|
-
const one = {
|
|
3340
|
-
id: -1,
|
|
3341
|
-
workspace_id: input.workspaceId,
|
|
3342
|
-
worktree: fileWorktree(file.repo),
|
|
3343
|
-
path: file.path,
|
|
3344
|
-
side: range.side === "deletions" ? "deletions" : "additions",
|
|
3345
|
-
line_start: range.start,
|
|
3346
|
-
line_end: range.end,
|
|
3347
|
-
text: trimmed,
|
|
3348
|
-
created_at: "",
|
|
3349
|
-
...anchorFor(file, range)
|
|
3350
|
-
};
|
|
3351
|
-
return dispatch([one], { session: sessionId }, []);
|
|
3352
|
-
}, "m32", $scope0_id);
|
|
3353
|
-
const openFind = _resume(() => {
|
|
3354
|
-
findOpen = true;
|
|
3355
|
-
findTick++;
|
|
3356
|
-
findFocusRef.focus();
|
|
3357
|
-
}, "m33", $scope0_id);
|
|
3358
|
-
const onFindState = _resume((next) => {
|
|
3359
|
-
findState = next;
|
|
3360
|
-
if (!next.hit) return;
|
|
3361
|
-
const hit = next.hit;
|
|
3362
|
-
setTimeout(() => {
|
|
3363
|
-
const el = openFile(hit.key);
|
|
3364
|
-
if (!el) return;
|
|
3365
|
-
if (hit.line < 1) {
|
|
3366
|
-
pinToTop(el);
|
|
3367
|
-
return;
|
|
3368
|
-
}
|
|
3369
|
-
setSearchPaint(next.query, hit);
|
|
3370
|
-
revealSearchHit();
|
|
3371
|
-
}, 0);
|
|
3372
|
-
}, "m34", $scope0_id);
|
|
3373
|
-
const toggleSection = _resume((id) => {
|
|
3374
|
-
if (expandingRepos.has(id)) {
|
|
3375
|
-
const busy = new Set(expandingRepos);
|
|
3376
|
-
busy.delete(id);
|
|
3377
|
-
expandingRepos = busy;
|
|
3378
|
-
if (!collapsedRepos.has(id)) collapsedRepos = /* @__PURE__ */ new Set([...collapsedRepos, id]);
|
|
3379
|
-
return;
|
|
3380
|
-
}
|
|
3381
|
-
if (collapsedRepos.has(id)) {
|
|
3382
|
-
if (openedRepos.has(id)) {
|
|
3383
|
-
const next = new Set(collapsedRepos);
|
|
3384
|
-
next.delete(id);
|
|
3385
|
-
collapsedRepos = next;
|
|
3386
|
-
return;
|
|
3387
|
-
}
|
|
3388
|
-
expandingRepos = /* @__PURE__ */ new Set([...expandingRepos, id]);
|
|
3389
|
-
requestAnimationFrame(() => {
|
|
3390
|
-
requestAnimationFrame(() => {
|
|
3391
|
-
if (!expandingRepos.has(id)) return;
|
|
3392
|
-
const next = new Set(collapsedRepos);
|
|
3393
|
-
next.delete(id);
|
|
3394
|
-
collapsedRepos = next;
|
|
3395
|
-
const done = new Set(expandingRepos);
|
|
3396
|
-
done.delete(id);
|
|
3397
|
-
expandingRepos = done;
|
|
3398
|
-
});
|
|
3399
|
-
});
|
|
3400
|
-
} else {
|
|
3401
|
-
openedRepos = /* @__PURE__ */ new Set([...openedRepos, id]);
|
|
3402
|
-
collapsedRepos = /* @__PURE__ */ new Set([...collapsedRepos, id]);
|
|
3403
|
-
}
|
|
3404
|
-
}, "m35", $scope0_id);
|
|
3405
|
-
_html(`<div${_attr_class("_fD")}><div${_attr_class("_fI")}><div${_attr_class("_fJ")}><div${_attr_class(["_fT", { ["_fS"]: !comments.length }])}>`);
|
|
3406
|
-
_if(() => {
|
|
3407
|
-
if (input.onExit) {
|
|
3408
|
-
const $scope1_id = _scope_id();
|
|
3409
|
-
_html(`<a${_attr("href", `/w/${input.workspaceId}`)}${_attr_class([iconBtnRow, "_fK"])} title="Back to terminal (Esc)">`);
|
|
3410
|
-
icon_back_default({ size: 14 });
|
|
3411
|
-
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 1))}`);
|
|
3412
|
-
_serialize_if($scope0_reason, 0) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 1) && _scope_with_id($scope0_id) });
|
|
3413
|
-
return 0;
|
|
3414
|
-
}
|
|
3415
|
-
}, $scope0_id, "e", _serialize_guard($scope0_reason, 0), _serialize_guard($scope0_reason, 4), 1, 0, 1);
|
|
3416
|
-
_html(`<h1${_attr_class(pageTitle)}>Review</h1>`);
|
|
3417
|
-
_if(() => {
|
|
3418
|
-
if (comments.length) {
|
|
3419
|
-
const $scope5_id = _scope_id();
|
|
3420
|
-
_html(`<span${_attr_class("_fM")}>${_escape(comments.length)}${_el_resume($scope5_id, "b")} comment<!>${comments.length === 1 ? "" : "s"}${_el_resume($scope5_id, "c")}</span>`);
|
|
3421
|
-
writeScope($scope5_id, {});
|
|
3422
|
-
return 0;
|
|
3423
|
-
}
|
|
3424
|
-
}, $scope0_id, "g", 1, 1, 1, 0, 1);
|
|
3425
|
-
_if(() => {
|
|
3426
|
-
if (comments.length) {
|
|
3427
|
-
const $scope2_id = _scope_id();
|
|
3428
|
-
_html(`<span${_attr_class("_fL")}>`);
|
|
3429
|
-
_set_serialize_reason(_serialize_guard($scope0_reason, 5));
|
|
3430
|
-
const $childScope = _peek_scope_id();
|
|
3431
|
-
diff_send_default({
|
|
3432
|
-
sessions: input.sessions,
|
|
3433
|
-
onCopy: copyMarkdown,
|
|
3434
|
-
onSend: sendTo
|
|
3435
|
-
});
|
|
3436
|
-
_html("</span>");
|
|
3437
|
-
writeScope($scope2_id, { b: _existing_scope($childScope) });
|
|
3438
|
-
return 0;
|
|
3439
|
-
}
|
|
3440
|
-
}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
3441
|
-
_html(`</div>${_el_resume($scope0_id, "d")}<div${_attr_class("_fH")}>`);
|
|
3442
|
-
_if(() => {
|
|
3443
|
-
if (hasFiles) {
|
|
3444
|
-
const $scope12_id = _scope_id();
|
|
3445
|
-
_html(`<button${_attr_class([
|
|
3446
|
-
treeToggle,
|
|
3447
|
-
"_fF",
|
|
3448
|
-
{ ["_fE"]: treeOpen }
|
|
3449
|
-
])} title=${treeOpen ? "\"Hide file tree\"" : "\"Show file tree\""}>`);
|
|
3450
|
-
icon_sidebar_default({ size: 14 });
|
|
3451
|
-
_html(`</button>${_el_resume($scope12_id, "a")}`);
|
|
3452
|
-
_script($scope12_id, "m54");
|
|
3453
|
-
writeScope($scope12_id, {});
|
|
3454
|
-
return 0;
|
|
3455
|
-
}
|
|
3456
|
-
}, $scope0_id, "j", 1, 1, 1, 0, 1);
|
|
3457
|
-
_html(`<button${_attr_class([iconBtnRow, "_fF"])} title="Refresh diff"${_attr("disabled", loading)}>`);
|
|
3458
|
-
_set_serialize_reason(1);
|
|
3459
|
-
const $childScope2 = _peek_scope_id();
|
|
3460
|
-
icon_refresh_default({
|
|
3461
|
-
size: 14,
|
|
3462
|
-
class: loading && "_D"
|
|
3463
|
-
});
|
|
3464
|
-
_html(`</button>${_el_resume($scope0_id, "k")}`);
|
|
3465
|
-
_if(() => {
|
|
3466
|
-
if (hasFiles) {
|
|
3467
|
-
const $scope13_id = _scope_id();
|
|
3468
|
-
_html(`<button${_attr_class(["_o", "_f2"])} title="Jump to file">Files (<!>${_escape(shownFiles.length)}${_el_resume($scope13_id, "b")})</button>${_el_resume($scope13_id, "a")}`);
|
|
3469
|
-
_script($scope13_id, "m55");
|
|
3470
|
-
writeScope($scope13_id, {});
|
|
3471
|
-
return 0;
|
|
3472
|
-
}
|
|
3473
|
-
}, $scope0_id, "m", 1, 1, 1, 0, 1);
|
|
3474
|
-
_html(`<span${_attr_class(["_m", "_fU"])}>`);
|
|
3475
|
-
_attr_select_value($scope0_id, "o", scope, _resume(function(v) {
|
|
3476
|
-
setScope(v);
|
|
3477
|
-
}, "m0", $scope0_id), () => {
|
|
3478
|
-
_html(`<select${_attr_class(["_n", "_fV"])} aria-label="Review scope"${_attr("disabled", loading)}><option${_attr_option_value("committed")}>Committed</option><option${_attr_option_value("working")}>Working tree</option><option${_attr_option_value("dirty")}>Uncommitted</option></select>`);
|
|
3479
|
-
});
|
|
3480
|
-
_html(`${_el_resume($scope0_id, "o")}</span><div${_attr_class(["_fQ", { ["_fP"]: !findOpen }])}>`);
|
|
3481
|
-
_set_serialize_reason(2);
|
|
3482
|
-
const $childScope3 = _peek_scope_id();
|
|
3483
|
-
diff_find_default({
|
|
3484
|
-
files: fileFiltered,
|
|
3485
|
-
tick: findTick,
|
|
3486
|
-
open: findOpen,
|
|
3487
|
-
openChange: _resume((_new_findOpen) => {
|
|
3488
|
-
findOpen = _new_findOpen;
|
|
3489
|
-
}, "m36", $scope0_id),
|
|
3490
|
-
focusRef: findFocusRef,
|
|
3491
|
-
stateChange: _resume(function(s) {
|
|
3492
|
-
onFindState(s);
|
|
3493
|
-
}, "m37", $scope0_id)
|
|
3494
|
-
});
|
|
3495
|
-
_html(`</div>${_el_resume($scope0_id, "p")}`);
|
|
3496
|
-
_if(() => {
|
|
3497
|
-
if (hasFiles) {
|
|
3498
|
-
const $scope14_id = _scope_id();
|
|
3499
|
-
_html(`<button${_attr_class([
|
|
3500
|
-
iconBtnRow,
|
|
3501
|
-
"_fO",
|
|
3502
|
-
"_fF"
|
|
3503
|
-
])} title="Find in review (⌘/Ctrl+F)" aria-label="Find in review"${_attr("hidden", findOpen)}>`);
|
|
3504
|
-
icon_search_default({ size: 14 });
|
|
3505
|
-
_html(`</button>${_el_resume($scope14_id, "a")}`);
|
|
3506
|
-
_script($scope14_id, "m56");
|
|
3507
|
-
writeScope($scope14_id, {});
|
|
3508
|
-
return 0;
|
|
3509
|
-
}
|
|
3510
|
-
}, $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
3511
|
-
_html(`</div></div><div${_attr_class("_fR")} data-diff-main>`);
|
|
3512
|
-
_if(() => {
|
|
3513
|
-
if (error) {
|
|
3514
|
-
const $scope6_id = _scope_id();
|
|
3515
|
-
toast_default({
|
|
3516
|
-
onDismiss: _resume(function() {
|
|
3517
|
-
error = null;
|
|
3518
|
-
}, "m38", $scope6_id),
|
|
3519
|
-
content: _content_resume("m57", () => {
|
|
3520
|
-
_scope_reason();
|
|
3521
|
-
const $scope7_id = _scope_id();
|
|
3522
|
-
_html(`${_escape(error)}${_el_resume($scope7_id, "a")}`);
|
|
3523
|
-
_subscribe($error__closures, writeScope($scope7_id, { _: _scope_with_id($scope6_id) }));
|
|
3524
|
-
_resume_branch($scope7_id);
|
|
3525
|
-
}, $scope6_id)
|
|
3526
|
-
});
|
|
3527
|
-
writeScope($scope6_id, {});
|
|
3528
|
-
return 0;
|
|
3529
|
-
}
|
|
3530
|
-
}, $scope0_id, "t", 1, 1, 1, 0, 1);
|
|
3531
|
-
_if(() => {
|
|
3532
|
-
if (!repos && loading) {
|
|
3533
|
-
const $scope15_id = _scope_id();
|
|
3534
|
-
_html(`<div${_attr_class("_fX")} aria-hidden=true><div${_attr_class(["_fY", "_fZ"])}></div><div${_attr_class(["_fY", "_f0"])}></div><div${_attr_class(["_fY", "_f1"])}></div><div${_attr_class(["_fY", "_f0"])}></div><div${_attr_class(["_fY", "_f1"])}></div></div>`);
|
|
3535
|
-
writeScope($scope15_id, {});
|
|
3536
|
-
return 0;
|
|
3537
|
-
}
|
|
3538
|
-
}, $scope0_id, "u", 1, 1, 1, 0, 1);
|
|
3539
|
-
_for_of(repoList.filter((r) => r.baseMissing), (repo) => {
|
|
3540
|
-
const $scope9_id = _scope_id();
|
|
3541
|
-
const $for_content2__repo_base__closures = /* @__PURE__ */ new Set();
|
|
3542
|
-
_set_serialize_reason(356);
|
|
3543
|
-
const $childScope4 = _peek_scope_id();
|
|
3544
|
-
toast_default({
|
|
3545
|
-
kind: "warn",
|
|
3546
|
-
placement: "inline",
|
|
3547
|
-
title: `${repo.worktree}: base not found`,
|
|
3548
|
-
content: _content_resume("m58", () => {
|
|
3549
|
-
_scope_reason();
|
|
3550
|
-
const $scope10_id = _scope_id();
|
|
3551
|
-
_html(`${_escape(repo.base)}${_el_resume($scope10_id, "a")}<!>${scope !== "committed" ? ", showing uncommitted changes only" : ""}${_el_resume($scope10_id, "b")}.`);
|
|
3552
|
-
_subscribe($for_content2__repo_base__closures, _subscribe($scope__closures, writeScope($scope10_id, { _: _scope_with_id($scope9_id) })));
|
|
3553
|
-
_resume_branch($scope10_id);
|
|
3554
|
-
}, $scope9_id)
|
|
3555
|
-
});
|
|
3556
|
-
writeScope($scope9_id, {
|
|
3557
|
-
e: repo?.base,
|
|
3558
|
-
f: $for_content2__repo_base__closures,
|
|
3559
|
-
a: _existing_scope($childScope4)
|
|
3560
|
-
});
|
|
3561
|
-
}, "id", $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
3562
|
-
_if(() => {
|
|
3563
|
-
if (repos && !allFiles.length) {
|
|
3564
|
-
const $scope11_id = _scope_id();
|
|
3565
|
-
_html(`<p${_attr_class("_bu")}>${repoList.some((r) => r.unborn) ? "No commits yet." : scope === "dirty" ? "Nothing uncommitted." : repoList.some((r) => r.pr) ? "No file changes on these PRs." : "No changes vs base."}${_el_resume($scope11_id, "b")}</p>`);
|
|
3566
|
-
writeScope($scope11_id, {});
|
|
3567
|
-
return 0;
|
|
3568
|
-
} else if (repos && !shownFiles.length && !findState.hit) {
|
|
3569
|
-
const $scope8_id = _scope_id();
|
|
3570
|
-
_html(`<p${_attr_class("_bu")}>${findState.query.trim() ? "No matches in review." : onlyNew && !fileFilter ? "Nothing changed since your last visit." : `No files match "${_escape(`${fileFilter}`)}".`}${_el_resume($scope8_id, "b")}</p>`);
|
|
3571
|
-
writeScope($scope8_id, {});
|
|
3572
|
-
return 1;
|
|
3573
|
-
}
|
|
3574
|
-
}, $scope0_id, "w", 1, 1, 1, 0, 1);
|
|
3575
|
-
_for_of(repoList, (repo) => {
|
|
3576
|
-
const $scope3_id = _scope_id();
|
|
3577
|
-
const repoFiles = filesByRepo.get(repo.id) || [];
|
|
3578
|
-
_if(() => {
|
|
3579
|
-
if (repoFiles.length || repo.pr && hasFiles) {
|
|
3580
|
-
const $scope4_id = _scope_id();
|
|
3581
|
-
_set_serialize_reason(1);
|
|
3582
|
-
const $childScope5 = _peek_scope_id();
|
|
3583
|
-
review_section_default({
|
|
3584
|
-
repo,
|
|
3585
|
-
files: repoFiles,
|
|
3586
|
-
shownKeys: shownKeySet,
|
|
3587
|
-
collapsible: repoList.length > 1,
|
|
3588
|
-
collapsed: collapsedRepos.has(repo.id),
|
|
3589
|
-
expanding: expandingRepos.has(repo.id),
|
|
3590
|
-
opened: openedRepos.has(repo.id),
|
|
3591
|
-
onToggle: _resume(function() {
|
|
3592
|
-
toggleSection(repo.id);
|
|
3593
|
-
}, "m39", $scope4_id),
|
|
3594
|
-
workspaceBranch: input.workspaceBranch || "",
|
|
3595
|
-
workspaceName: input.workspaceName || "",
|
|
3596
|
-
localDiffers: localDifferIds.has(repo.id),
|
|
3597
|
-
onlyNew,
|
|
3598
|
-
onToggleNew: _resume(function() {
|
|
3599
|
-
onlyNew = !onlyNew;
|
|
3600
|
-
}, "m40", $scope4_id),
|
|
3601
|
-
onReload: reload,
|
|
3602
|
-
loading,
|
|
3603
|
-
findHit: findState.hit,
|
|
3604
|
-
commentsByFile,
|
|
3605
|
-
draft,
|
|
3606
|
-
sessions: input.sessions || [],
|
|
3607
|
-
observeNear,
|
|
3608
|
-
collapsedFiles,
|
|
3609
|
-
onFileToggle: _resume(function(key, open) {
|
|
3610
|
-
setFilesCollapsed([key], !open);
|
|
3611
|
-
}, "m41", $scope4_id),
|
|
3612
|
-
onSelect: _resume(function(file, range) {
|
|
3613
|
-
draft = {
|
|
3614
|
-
key: file.key,
|
|
3615
|
-
side: range.side || "additions",
|
|
3616
|
-
start: Math.min(range.start, range.end),
|
|
3617
|
-
end: Math.max(range.start, range.end)
|
|
3618
|
-
};
|
|
3619
|
-
}, "m42", $scope4_id),
|
|
3620
|
-
onSaveComment: _resume(function(file, text) {
|
|
3621
|
-
saveComment(file, text);
|
|
3622
|
-
}, "m43", $scope4_id),
|
|
3623
|
-
onSendDraft: _resume(function(file, text, sessionId) {
|
|
3624
|
-
sendDraftComment(file, text, sessionId);
|
|
3625
|
-
}, "m44", $scope4_id),
|
|
3626
|
-
onCancelDraft: _resume(function() {
|
|
3627
|
-
draft = null;
|
|
3628
|
-
}, "m45", $scope4_id),
|
|
3629
|
-
onDeleteComment: _resume(function(id) {
|
|
3630
|
-
removeComment(id);
|
|
3631
|
-
}, "m46", $scope4_id),
|
|
3632
|
-
onEditComment: _resume(function(id, text) {
|
|
3633
|
-
editComment(id, text);
|
|
3634
|
-
}, "m47", $scope4_id),
|
|
3635
|
-
onSendComment: _resume(function(id, sessionId) {
|
|
3636
|
-
sendOneComment(id, sessionId);
|
|
3637
|
-
}, "m48", $scope4_id),
|
|
3638
|
-
onError: _resume(function(message) {
|
|
3639
|
-
error = message;
|
|
3640
|
-
}, "m49", $scope4_id)
|
|
3641
|
-
});
|
|
3642
|
-
_subscribe($toggleSection2__closures, _subscribe($sendDraftComment2__closures, _subscribe($sendOneComment2__closures, _subscribe($editComment2__closures, _subscribe($removeComment2__closures, _subscribe($saveComment2__closures, _subscribe($localDifferIds__closures, _subscribe($commentsByFile__closures, _subscribe($shownKeySet__closures, _subscribe($repoList_length__closures, _subscribe($reload2__closures, _subscribe($expandingRepos__closures, _subscribe($openedRepos__closures, _subscribe($setFilesCollapsed2__closures, _subscribe($collapsedFiles__closures, _subscribe($collapsedRepos__closures, _subscribe($findState_hit__closures, _subscribe($onlyNew__closures, _subscribe($loading__closures, _subscribe($draft__closures, _subscribe($si__input_workspaceName && $input_workspaceName__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, _subscribe($si__input_sessions && $input_sessions__closures, writeScope($scope4_id, { a: _existing_scope($childScope5) }))))))))))))))))))))))));
|
|
3643
|
-
return 0;
|
|
3644
|
-
}
|
|
3645
|
-
}, $scope3_id, "a", 1, 1, 1, 0, 1);
|
|
3646
|
-
writeScope($scope3_id, {
|
|
3647
|
-
c: repo,
|
|
3648
|
-
g: repoFiles
|
|
3649
|
-
});
|
|
3650
|
-
}, "id", $scope0_id, "x");
|
|
3651
|
-
_html(`</div>${_el_resume($scope0_id, "s")}</div>`);
|
|
3652
|
-
_set_serialize_reason(32598);
|
|
3653
|
-
const $childScope6 = _peek_scope_id();
|
|
3654
|
-
diff_tree_default({
|
|
3655
|
-
open: treeOpen,
|
|
3656
|
-
sections: treeSections,
|
|
3657
|
-
filter: fileFilter,
|
|
3658
|
-
filterChange: $filterChange,
|
|
3659
|
-
collapsedRepos,
|
|
3660
|
-
collapsedReposChange: _resume((_new_collapsedRepos) => {
|
|
3661
|
-
collapsedRepos = _new_collapsedRepos;
|
|
3662
|
-
}, "m50", $scope0_id),
|
|
3663
|
-
openedRepos,
|
|
3664
|
-
openedReposChange: _resume((_new_openedRepos) => {
|
|
3665
|
-
openedRepos = _new_openedRepos;
|
|
3666
|
-
}, "m51", $scope0_id),
|
|
3667
|
-
commentKeys,
|
|
3668
|
-
newKeys,
|
|
3669
|
-
collapsedFiles,
|
|
3670
|
-
onDirToggle: _resume(function(keys, collapsed) {
|
|
3671
|
-
setFilesCollapsed(keys, collapsed);
|
|
3672
|
-
}, "m52", $scope0_id),
|
|
3673
|
-
workspaceId: input.workspaceId,
|
|
3674
|
-
scope
|
|
3675
|
-
});
|
|
3676
|
-
_set_serialize_reason(31486);
|
|
3677
|
-
const $childScope7 = _peek_scope_id();
|
|
3678
|
-
diff_file_sheet_default({
|
|
3679
|
-
open: fileSheet,
|
|
3680
|
-
openChange: _resume((_new_fileSheet) => {
|
|
3681
|
-
fileSheet = _new_fileSheet;
|
|
3682
|
-
}, "m53", $scope0_id),
|
|
3683
|
-
files: shownFiles,
|
|
3684
|
-
filter: fileFilter,
|
|
3685
|
-
filterChange: $filterChange,
|
|
3686
|
-
commentKeys,
|
|
3687
|
-
newKeys,
|
|
3688
|
-
total: allFiles.length,
|
|
3689
|
-
workspaceId: input.workspaceId,
|
|
3690
|
-
scope
|
|
3691
|
-
});
|
|
3692
|
-
_html("</div>");
|
|
3693
|
-
_script($scope0_id, "m59");
|
|
3694
|
-
_script($scope0_id, "m60");
|
|
3695
|
-
_script($scope0_id, "m61");
|
|
3696
|
-
_script($scope0_id, "m62");
|
|
3697
|
-
_script($scope0_id, "m63");
|
|
3698
|
-
writeScope($scope0_id, {
|
|
3699
|
-
a2: input.workspaceId,
|
|
3700
|
-
a3: input.scope,
|
|
3701
|
-
a4: _serialize_if($scope0_reason, 3) && input.findOpen,
|
|
3702
|
-
a5: _serialize_if($scope0_reason, 2) && input.findOpenChange,
|
|
3703
|
-
a7: input.findTick,
|
|
3704
|
-
a9: input.onFileChange,
|
|
3705
|
-
aa: input.focusPr,
|
|
3706
|
-
ab: input.focusFile,
|
|
3707
|
-
ac: input.onScopeChange,
|
|
3708
|
-
ad: input.active,
|
|
3709
|
-
ae: input.focusNonce,
|
|
3710
|
-
af: input.focusFileNonce,
|
|
3711
|
-
ag: input.onSent,
|
|
3712
|
-
ai: input.sessions,
|
|
3713
|
-
aj: input.workspaceBranch,
|
|
3714
|
-
ak: input.workspaceName,
|
|
3715
|
-
al: repos,
|
|
3716
|
-
an: comments,
|
|
3717
|
-
ap: comments?.length,
|
|
3718
|
-
aq: draft,
|
|
3719
|
-
ar: error,
|
|
3720
|
-
as: loading,
|
|
3721
|
-
au: fileFilter,
|
|
3722
|
-
ax: onlyNew,
|
|
3723
|
-
ay: scope,
|
|
3724
|
-
az: treeOpen,
|
|
3725
|
-
b1: findOpen,
|
|
3726
|
-
b3: findTick,
|
|
3727
|
-
b5: findFocusRef,
|
|
3728
|
-
b8: findState?.query,
|
|
3729
|
-
ba: findState?.hit,
|
|
3730
|
-
bb: findState?.hit?.key,
|
|
3731
|
-
bc: collapsedRepos,
|
|
3732
|
-
bd: collapsedFiles,
|
|
3733
|
-
be: setFilesCollapsed,
|
|
3734
|
-
bf: openedRepos,
|
|
3735
|
-
bg: expandingRepos,
|
|
3736
|
-
bj: nearBox.cbs,
|
|
3737
|
-
bk: nearBox.io,
|
|
3738
|
-
bl: nearBox.root,
|
|
3739
|
-
bn: observeNear,
|
|
3740
|
-
bo: pinToTop,
|
|
3741
|
-
bp: retryFrames,
|
|
3742
|
-
br: focusPrSection,
|
|
3743
|
-
bs: findFile,
|
|
3744
|
-
bt: openFile,
|
|
3745
|
-
bw: jumpTo,
|
|
3746
|
-
by: posBox.raf,
|
|
3747
|
-
bz: posBox.anchor,
|
|
3748
|
-
c1: posBox.run,
|
|
3749
|
-
c3: anchorAt,
|
|
3750
|
-
c5: noteScroll,
|
|
3751
|
-
c6: savePos,
|
|
3752
|
-
c7: restorePos,
|
|
3753
|
-
c9: headBox.sig,
|
|
3754
|
-
ca: headBox.timer,
|
|
3755
|
-
cc: loadBox.seq,
|
|
3756
|
-
ce: load,
|
|
3757
|
-
ch: setScope,
|
|
3758
|
-
ck: sendGate.busy,
|
|
3759
|
-
cm: loadReview,
|
|
3760
|
-
cn: reload,
|
|
3761
|
-
cp: reloadSoon,
|
|
3762
|
-
cq: markSeen,
|
|
3763
|
-
cs: repoList,
|
|
3764
|
-
ct: repoList.length,
|
|
3765
|
-
cu: allFiles,
|
|
3766
|
-
cw: allFiles?.length,
|
|
3767
|
-
cx: fileFiltered,
|
|
3768
|
-
cy: findKeys,
|
|
3769
|
-
d1: shownFiles?.length,
|
|
3770
|
-
d3: shownKeySet,
|
|
3771
|
-
d5: groupByRepo,
|
|
3772
|
-
d8: filesByRepo,
|
|
3773
|
-
db: commentsByFile,
|
|
3774
|
-
de: localDifferIds,
|
|
3775
|
-
df: hasFiles,
|
|
3776
|
-
dg: fileWorktree,
|
|
3777
|
-
dh: anchorFor,
|
|
3778
|
-
dj: saveComment,
|
|
3779
|
-
dk: deleteRemote,
|
|
3780
|
-
dn: removeComment,
|
|
3781
|
-
do: editComment,
|
|
3782
|
-
dp: dispatch,
|
|
3783
|
-
ds: copyMarkdown,
|
|
3784
|
-
dt: sendTo,
|
|
3785
|
-
du: sendOneComment,
|
|
3786
|
-
dv: sendDraftComment,
|
|
3787
|
-
dw: openFind,
|
|
3788
|
-
dy: onFindState,
|
|
3789
|
-
dz: toggleSection,
|
|
3790
|
-
b2: input.findOpenChange || void 0,
|
|
3791
|
-
l: _existing_scope($childScope2),
|
|
3792
|
-
q: _existing_scope($childScope3),
|
|
3793
|
-
e6: $error__closures,
|
|
3794
|
-
ea: $scope__closures,
|
|
3795
|
-
e1: $si__input_sessions && $input_sessions__closures,
|
|
3796
|
-
e2: $si__input_workspaceBranch && $input_workspaceBranch__closures,
|
|
3797
|
-
e3: $si__input_workspaceName && $input_workspaceName__closures,
|
|
3798
|
-
e5: $draft__closures,
|
|
3799
|
-
e7: $loading__closures,
|
|
3800
|
-
e9: $onlyNew__closures,
|
|
3801
|
-
ee: $findState_hit__closures,
|
|
3802
|
-
ef: $collapsedRepos__closures,
|
|
3803
|
-
eg: $collapsedFiles__closures,
|
|
3804
|
-
eh: $setFilesCollapsed2__closures,
|
|
3805
|
-
ei: $openedRepos__closures,
|
|
3806
|
-
ej: $expandingRepos__closures,
|
|
3807
|
-
el: $reload2__closures,
|
|
3808
|
-
en: $repoList_length__closures,
|
|
3809
|
-
ep: $shownKeySet__closures,
|
|
3810
|
-
er: $commentsByFile__closures,
|
|
3811
|
-
es: $localDifferIds__closures,
|
|
3812
|
-
eu: $saveComment2__closures,
|
|
3813
|
-
ev: $removeComment2__closures,
|
|
3814
|
-
ew: $editComment2__closures,
|
|
3815
|
-
ez: $sendOneComment2__closures,
|
|
3816
|
-
f0: $sendDraftComment2__closures,
|
|
3817
|
-
f1: $toggleSection2__closures,
|
|
3818
|
-
y: _existing_scope($childScope6),
|
|
3819
|
-
z: _existing_scope($childScope7)
|
|
3820
|
-
});
|
|
3821
|
-
_resume_branch($scope0_id);
|
|
3822
|
-
});
|
|
3823
|
-
//#endregion
|
|
3824
|
-
export { diff_view_default as default };
|