@intent-hq/web 2.348.0 → 2.349.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{0Vx84DUP.js → -QpofkRx.js} +25 -25
- package/web/app/immutable/chunks/{Cn_Rbwyb.js → 0Ys9jF9i.js} +1 -1
- package/web/app/immutable/chunks/{Bqhh4FH7.js → 0vrZgCji.js} +1 -1
- package/web/app/immutable/chunks/{2F-Ze5uG.js → 2CGxw1E-.js} +1 -1
- package/web/app/immutable/chunks/{hW3N4eWd.js → 5SqYTp29.js} +1 -1
- package/web/app/immutable/chunks/{CIvmWNlW.js → 9YwuUfsE.js} +1 -1
- package/web/app/immutable/chunks/{DR_T7fiX.js → B0rIXGc4.js} +1 -1
- package/web/app/immutable/chunks/{BfyBZYmK.js → B1yX4XGq.js} +1 -1
- package/web/app/immutable/chunks/{CB8I0xcf.js → B21_6eW6.js} +1 -1
- package/web/app/immutable/chunks/{D6EREClH.js → B2eAyNSi.js} +1 -1
- package/web/app/immutable/chunks/{CBiHrObN.js → B3RsHzWp.js} +1 -1
- package/web/app/immutable/chunks/{Cy-Gmjfw.js → B3SGnWra.js} +1 -1
- package/web/app/immutable/chunks/{CFnuU2Q9.js → B4CR5dfb.js} +1 -1
- package/web/app/immutable/chunks/{Btz71F4v.js → B51DLOiX.js} +1 -1
- package/web/app/immutable/chunks/{Bbk1k0zD.js → B5G4SPkG.js} +1 -1
- package/web/app/immutable/chunks/{3eJAoKag.js → B7Df-Pbj.js} +2 -2
- package/web/app/immutable/chunks/{COcWmgqo.js → B7lF313M.js} +1 -1
- package/web/app/immutable/chunks/{BWBs_VhF.js → B8MtVUO1.js} +1 -1
- package/web/app/immutable/chunks/{DIaPAOHO.js → B9CbdVRS.js} +1 -1
- package/web/app/immutable/chunks/{Fz0URFlj.js → B9O5QYHa.js} +1 -1
- package/web/app/immutable/chunks/{Qz-8JMY9.js → B9lVck2z.js} +1 -1
- package/web/app/immutable/chunks/{B69VjfVW.js → BFU2DTxE.js} +1 -1
- package/web/app/immutable/chunks/{CGw07Xyz.js → BFllbeCZ.js} +1 -1
- package/web/app/immutable/chunks/{3Y6lb7OZ.js → BHeDLdQn.js} +1 -1
- package/web/app/immutable/chunks/{CMgf2JhK.js → BHqqRyT8.js} +1 -1
- package/web/app/immutable/chunks/{gd66hMGv.js → BIBA0Biz.js} +1 -1
- package/web/app/immutable/chunks/{C8eS8Wxk.js → BJbIj2f5.js} +3 -3
- package/web/app/immutable/chunks/{BB2E6zUl.js → BJlw6wnz.js} +1 -1
- package/web/app/immutable/chunks/{CV2DFyPr.js → BJm_eT-U.js} +1 -1
- package/web/app/immutable/chunks/{COEzShcb.js → BKawFF96.js} +2 -2
- package/web/app/immutable/chunks/BKdLSL00.js +1 -0
- package/web/app/immutable/chunks/{BCiuPd8v.js → BLAOZHWQ.js} +1 -1
- package/web/app/immutable/chunks/{BeIO7jOE.js → BLLsZVvW.js} +1 -1
- package/web/app/immutable/chunks/{CipMzp9h.js → BLOjz32P.js} +1 -1
- package/web/app/immutable/chunks/{DNIjwT-T.js → BMOxNEff.js} +1 -1
- package/web/app/immutable/chunks/{mSFHDc3j.js → BNS1LCAy.js} +1 -1
- package/web/app/immutable/chunks/{wm0Oy5pp.js → BNodOXul.js} +1 -1
- package/web/app/immutable/chunks/{C0OVkc7f.js → BPrwAqEs.js} +1 -1
- package/web/app/immutable/chunks/{BRxcN_af.js → BRPmfbNP.js} +1 -1
- package/web/app/immutable/chunks/{ShK1ywMo.js → BRadcq2w.js} +2 -2
- package/web/app/immutable/chunks/{B_82dd46.js → BRomtsr7.js} +1 -1
- package/web/app/immutable/chunks/{DsM8cZvP.js → BTHEWI_S.js} +1 -1
- package/web/app/immutable/chunks/{BnbzkcOJ.js → BTUjIyAV.js} +1 -1
- package/web/app/immutable/chunks/{BNYHFEBz.js → BWzmS9rr.js} +1 -1
- package/web/app/immutable/chunks/{DP4AQNt-.js → BYBv_fLl.js} +3 -3
- package/web/app/immutable/chunks/{B0wbZnxi.js → B_Tk6TVS.js} +1 -1
- package/web/app/immutable/chunks/{CEw_Ojs2.js → BaV_HcgG.js} +1 -1
- package/web/app/immutable/chunks/{C4rFO2Hf.js → Baz0g_kI.js} +1 -1
- package/web/app/immutable/chunks/{kVzVNgmU.js → Bb5T6-Tv.js} +2 -2
- package/web/app/immutable/chunks/{DAXBrrD-.js → BbgSAX3i.js} +1 -1
- package/web/app/immutable/chunks/{-dJluFvm.js → BcDnMnye.js} +1 -1
- package/web/app/immutable/chunks/{DDLB_hVd.js → BdyAQuf8.js} +1 -1
- package/web/app/immutable/chunks/{7Kg0aRC7.js → BdzBn7bA.js} +1 -1
- package/web/app/immutable/chunks/{CUFDAb6B.js → BeCIalNK.js} +1 -1
- package/web/app/immutable/chunks/{DNhivPW8.js → BeQfIbwM.js} +1 -1
- package/web/app/immutable/chunks/{CojufscG.js → BfHcmF2O.js} +1 -1
- package/web/app/immutable/chunks/{CWKqJsJy.js → BgUSjvxc.js} +1 -1
- package/web/app/immutable/chunks/{CsKSizCz.js → BjFyT_W2.js} +1 -1
- package/web/app/immutable/chunks/{C8vhldb0.js → Bjp6Z7YT.js} +1 -1
- package/web/app/immutable/chunks/{4juZDnmT.js → Bkf7F_Qx.js} +1 -1
- package/web/app/immutable/chunks/{Bo8Vb7mw.js → BmagX6n5.js} +1 -1
- package/web/app/immutable/chunks/BnJDHHUb.js +1 -0
- package/web/app/immutable/chunks/{CEixATbX.js → Bpb2sW6o.js} +1 -1
- package/web/app/immutable/chunks/{CY_11EtD.js → BpftDedA.js} +1 -1
- package/web/app/immutable/chunks/{DuncjXt7.js → BqobArwh.js} +1 -1
- package/web/app/immutable/chunks/{8-qXyFVf.js → Bsismerr.js} +1 -1
- package/web/app/immutable/chunks/{BFnV2iJZ.js → BtKOOSsW.js} +1 -1
- package/web/app/immutable/chunks/{IYJiuR5Y.js → Bu9v967D.js} +1 -1
- package/web/app/immutable/chunks/{CcJbyRBU.js → Bw5h0b4B.js} +1 -1
- package/web/app/immutable/chunks/{BHS_T8V0.js → Bw6C51Z8.js} +1 -1
- package/web/app/immutable/chunks/{Bi4olNhp.js → BwUnz25X.js} +1 -1
- package/web/app/immutable/chunks/{CHK9comt.js → BwYW1dkK.js} +1 -1
- package/web/app/immutable/chunks/{ADSB-roI.js → By_us5QF.js} +1 -1
- package/web/app/immutable/chunks/{C8aWNHHq.js → BzXXtRZY.js} +2 -2
- package/web/app/immutable/chunks/{BZMcByQ2.js → C-enyvpk.js} +1 -1
- package/web/app/immutable/chunks/{DvfHX1n9.js → C-vkWK8U.js} +1 -1
- package/web/app/immutable/chunks/{B5varbso.js → C-wtKDF4.js} +1 -1
- package/web/app/immutable/chunks/{Cy8AeYBK.js → C17Klvq4.js} +1 -1
- package/web/app/immutable/chunks/{CoHCPcUH.js → C1HHC_7R.js} +1 -1
- package/web/app/immutable/chunks/{DHO9Wxu6.js → C20jcbNk.js} +1 -1
- package/web/app/immutable/chunks/{D8a7_5Ny.js → C2XB0GY0.js} +1 -1
- package/web/app/immutable/chunks/{DsQW_Oo3.js → C5uQZx4q.js} +1 -1
- package/web/app/immutable/chunks/{CIjm5Ho8.js → C6liPF0f.js} +1 -1
- package/web/app/immutable/chunks/{DVeWWknf.js → C73NY2AB.js} +1 -1
- package/web/app/immutable/chunks/{hwOnI0Qg.js → C7Wb4_Fy.js} +1 -1
- package/web/app/immutable/chunks/{n7G96yg-.js → C8_8H2HU.js} +2 -2
- package/web/app/immutable/chunks/{B5o_1DGD.js → C9qO9uPq.js} +1 -1
- package/web/app/immutable/chunks/{CpXOs3du.js → CA0nf0gO.js} +1 -1
- package/web/app/immutable/chunks/{BfuGl5Yh.js → CAKCzVLn.js} +1 -1
- package/web/app/immutable/chunks/{Dl2IplSW.js → CCoYF4yh.js} +1 -1
- package/web/app/immutable/chunks/{VlCONpJu.js → CE90SUHM.js} +3 -3
- package/web/app/immutable/chunks/{SK6qKYG6.js → CESQT1SZ.js} +1 -1
- package/web/app/immutable/chunks/{DmpGcxj7.js → CFPsFOEM.js} +1 -1
- package/web/app/immutable/chunks/{fZqCaChB.js → CHJZj-fd.js} +1 -1
- package/web/app/immutable/chunks/{D10dSkvY.js → CIOLxD2z.js} +1 -1
- package/web/app/immutable/chunks/{DGD-U5Bo.js → CJyP11U5.js} +1 -1
- package/web/app/immutable/chunks/{DTMC7Bz7.js → CM7GBUHK.js} +1 -1
- package/web/app/immutable/chunks/{BJx6o7Ck.js → CMDErhcM.js} +1 -1
- package/web/app/immutable/chunks/{BgBv_oVS.js → CNttRhcj.js} +1 -1
- package/web/app/immutable/chunks/{DbqjhTxc.js → CQk97DU6.js} +1 -1
- package/web/app/immutable/chunks/{ClNwh2X4.js → CQnuk5Vr.js} +1 -1
- package/web/app/immutable/chunks/{CMXGjuKe.js → CSHUdNXY.js} +1 -1
- package/web/app/immutable/chunks/CT36W95j.js +1 -0
- package/web/app/immutable/chunks/{DDR5ATRf.js → CTA4usCn.js} +1 -1
- package/web/app/immutable/chunks/{D6_UiQP2.js → CTBZsDJn.js} +1 -1
- package/web/app/immutable/chunks/{AsDAWvyv.js → CU5gGNrG.js} +1 -1
- package/web/app/immutable/chunks/{DEit52eN.js → CUyvQglq.js} +1 -1
- package/web/app/immutable/chunks/{hSO5HDzm.js → CVc3afbh.js} +3 -3
- package/web/app/immutable/chunks/{D9ypzy3_.js → CXrz3Q9k.js} +2 -2
- package/web/app/immutable/chunks/{DWZFevW5.js → C_p41hnk.js} +1 -1
- package/web/app/immutable/chunks/{BMZTgpKM.js → Ca30sbat.js} +4 -4
- package/web/app/immutable/chunks/{CS9rwHkY.js → Cayy-ftZ.js} +1 -1
- package/web/app/immutable/chunks/{Cw6V9axU.js → CbAeWmeg.js} +1 -1
- package/web/app/immutable/chunks/{4pmevG3-.js → CcWSFJ-V.js} +1 -1
- package/web/app/immutable/chunks/{BzfZfCQf.js → Ce3Ams7F.js} +1 -1
- package/web/app/immutable/chunks/{RFiIZzYq.js → CgQUkF-P.js} +1 -1
- package/web/app/immutable/chunks/{CxHceMFQ.js → Ch4_kkqM.js} +1 -1
- package/web/app/immutable/chunks/{DbaWuKaJ.js → CiLRDPyT.js} +1 -1
- package/web/app/immutable/chunks/ClBJ4iZ6.js +1 -0
- package/web/app/immutable/chunks/{Cr-VSi-M.js → ClKki07I.js} +1 -1
- package/web/app/immutable/chunks/{DJq2OFOa.js → ClQp3PSY.js} +2 -2
- package/web/app/immutable/chunks/{lqRrFWoK.js → CmG1GbmA.js} +1 -1
- package/web/app/immutable/chunks/{CWmwYDNG.js → Cn5kmzaj.js} +1 -1
- package/web/app/immutable/chunks/{CWFSIfn9.js → Cnd7G5VB.js} +1 -1
- package/web/app/immutable/chunks/{CZuVFY9F.js → Co3f6qKm.js} +1 -1
- package/web/app/immutable/chunks/{CZ56Xi_v.js → CtiseZKO.js} +1 -1
- package/web/app/immutable/chunks/{DMhC9LKs.js → CtnRAN1I.js} +1 -1
- package/web/app/immutable/chunks/{5zeKz6ol.js → Ctp2YBhQ.js} +1 -1
- package/web/app/immutable/chunks/{DhiahJsn.js → Cu-I2HTr.js} +1 -1
- package/web/app/immutable/chunks/{C2RkweJs.js → CuK2Zw46.js} +1 -1
- package/web/app/immutable/chunks/{G_T2qAAV.js → Cw3xVp_u.js} +1 -1
- package/web/app/immutable/chunks/{KmtLXugw.js → Cw7ROLv9.js} +1 -1
- package/web/app/immutable/chunks/{CT1z3096.js → CyZzaZYX.js} +1 -1
- package/web/app/immutable/chunks/{U7noOj6Q.js → CyhLcHZ_.js} +1 -1
- package/web/app/immutable/chunks/{DauNXbYG.js → Cyu02R5O.js} +1 -1
- package/web/app/immutable/chunks/{BkbXY6dY.js → D-5Zsg_M.js} +1 -1
- package/web/app/immutable/chunks/{Zbow58Yt.js → D-IkFfCX.js} +1 -1
- package/web/app/immutable/chunks/{DRBNGj_-.js → D0yYfpFT.js} +1 -1
- package/web/app/immutable/chunks/{CMlQo89-.js → D1QW0Kek.js} +1 -1
- package/web/app/immutable/chunks/{DlZTlvi9.js → D1WSBSxV.js} +1 -1
- package/web/app/immutable/chunks/{BrhnR-ID.js → D4LrTene.js} +1 -1
- package/web/app/immutable/chunks/{XnpstU-2.js → D4bOZmAv.js} +1 -1
- package/web/app/immutable/chunks/{CDbqbXk4.js → D4nVXLyT.js} +1 -1
- package/web/app/immutable/chunks/{B12HSa3p.js → D4r0rKFl.js} +1 -1
- package/web/app/immutable/chunks/{C-gBprWE.js → D8oCNZJt.js} +3 -3
- package/web/app/immutable/chunks/{Co17KOMP.js → D9BiEPlJ.js} +1 -1
- package/web/app/immutable/chunks/{DH8xXeC1.js → D9xzAHI_.js} +1 -1
- package/web/app/immutable/chunks/{BWVi-EJ0.js → DAPuPOz3.js} +1 -1
- package/web/app/immutable/chunks/{BLWZRT3p.js → DBigkuTi.js} +1 -1
- package/web/app/immutable/chunks/{BgQrVLPV.js → DCZ5UGy-.js} +4 -4
- package/web/app/immutable/chunks/{CjlaSeGJ.js → DDgbK4p-.js} +1 -1
- package/web/app/immutable/chunks/{CFtvHvEH.js → DFXV1wIW.js} +3 -3
- package/web/app/immutable/chunks/{ButPbiBY.js → DFl_UPDl.js} +1 -1
- package/web/app/immutable/chunks/{1EEYpvtO.js → DHClt9az.js} +1 -1
- package/web/app/immutable/chunks/{G3wMjZ9O.js → DJiBCJAD.js} +1 -1
- package/web/app/immutable/chunks/{BTR3RbCu.js → DJkyIBda.js} +1 -1
- package/web/app/immutable/chunks/{Cwf8tFwL.js → DJz4QGRL.js} +1 -1
- package/web/app/immutable/chunks/{Djp1SSHW.js → DK1WtQKR.js} +3 -3
- package/web/app/immutable/chunks/{De4CKtf6.js → DKkMoi_7.js} +1 -1
- package/web/app/immutable/chunks/{BgfkhG1x.js → DLyvIErQ.js} +1 -1
- package/web/app/immutable/chunks/{CizJ7rQ5.js → DMJ_kXWl.js} +1 -1
- package/web/app/immutable/chunks/{t1ZXWA1s.js → DNy6UqlX.js} +1 -1
- package/web/app/immutable/chunks/{E3Zijj0F.js → DNzfQenZ.js} +1 -1
- package/web/app/immutable/chunks/{BW9zIwc0.js → DOjarwrj.js} +2 -2
- package/web/app/immutable/chunks/{MSmU5tc0.js → DPevKyzH.js} +4 -4
- package/web/app/immutable/chunks/{BcqStwzo.js → DQh8iE7C.js} +1 -1
- package/web/app/immutable/chunks/{BLXS06dm.js → DR-BIfRu.js} +1 -1
- package/web/app/immutable/chunks/{Bt4kKs00.js → DSWBNeO8.js} +1 -1
- package/web/app/immutable/chunks/{Cmt1ga7s.js → DSWXlbxm.js} +1 -1
- package/web/app/immutable/chunks/{CXAeontZ.js → DThHr-M9.js} +1 -1
- package/web/app/immutable/chunks/{CDPO_wX9.js → DZ7i3acf.js} +1 -1
- package/web/app/immutable/chunks/{fsqlfl9k.js → DZVkFfA6.js} +1 -1
- package/web/app/immutable/chunks/DZyjGspJ.js +408 -0
- package/web/app/immutable/chunks/{CvWGOqV6.js → D_rHnmLE.js} +1 -1
- package/web/app/immutable/chunks/{DTYxFA3y.js → DbxGcVeS.js} +5 -5
- package/web/app/immutable/chunks/{2Lw-DzvO.js → DgOx26JX.js} +1 -1
- package/web/app/immutable/chunks/{C8y1Abl_.js → Dgv1nn7D.js} +1 -1
- package/web/app/immutable/chunks/{C9sB2HsS.js → DjhrVk-G.js} +1 -1
- package/web/app/immutable/chunks/{nXbhxidw.js → DkJKEJ06.js} +1 -1
- package/web/app/immutable/chunks/{DTG9_7_9.js → Dn-5sae7.js} +1 -1
- package/web/app/immutable/chunks/{DEfRWwmu.js → DozUkl5C.js} +4 -4
- package/web/app/immutable/chunks/{DPuyFsTN.js → DpNO08YA.js} +1 -1
- package/web/app/immutable/chunks/{DaYj80Qs.js → Dsa4n88U.js} +1 -1
- package/web/app/immutable/chunks/{BFmjOdeB.js → Du0V4O1Q.js} +1 -1
- package/web/app/immutable/chunks/{CrmW6ekG.js → DvvIOlOp.js} +1 -1
- package/web/app/immutable/chunks/{DqZi8n0P.js → DwvH6ihg.js} +1 -1
- package/web/app/immutable/chunks/{BXPefMgB.js → DxWZwZdx.js} +1 -1
- package/web/app/immutable/chunks/{CZL7jnx7.js → Dy3Z_3JL.js} +1 -1
- package/web/app/immutable/chunks/{Tx7lrkZd.js → Dz1riI3m.js} +1 -1
- package/web/app/immutable/chunks/{F8LkPv3G.js → EMb2ha4n.js} +1 -1
- package/web/app/immutable/chunks/{CYYhQFAn.js → ERFmpNRs.js} +1 -1
- package/web/app/immutable/chunks/{JyTruf69.js → EhMQOMj3.js} +1 -1
- package/web/app/immutable/chunks/{Be5MJLTH.js → Fq8M_XAT.js} +1 -1
- package/web/app/immutable/chunks/{DZjCsshe.js → GpPmLIf8.js} +1 -1
- package/web/app/immutable/chunks/{DG0FHH4R.js → Gq5VdtSX.js} +1 -1
- package/web/app/immutable/chunks/{oG2g18ab.js → Gz_dGLcm.js} +1 -1
- package/web/app/immutable/chunks/{BT5gFy0f.js → H0FtMLfI.js} +1 -1
- package/web/app/immutable/chunks/{lfjw8hnT.js → IOLk9WTr.js} +1 -1
- package/web/app/immutable/chunks/{Bg8aMuhb.js → JzReAjFF.js} +1 -1
- package/web/app/immutable/chunks/{BriVbLDU.js → K6Z_l6pq.js} +1 -1
- package/web/app/immutable/chunks/{0aynuPUC.js → LMNLZ1NY.js} +1 -1
- package/web/app/immutable/chunks/{oNe1xT1B.js → MpnM4XaB.js} +1 -1
- package/web/app/immutable/chunks/{Hp_5KBak.js → NBz8yHrY.js} +1 -1
- package/web/app/immutable/chunks/{CdfwUBxI.js → NSYi6AlX.js} +1 -1
- package/web/app/immutable/chunks/{0KTgJhJS.js → PysgAWQl.js} +2 -2
- package/web/app/immutable/chunks/{D-uVnCxU.js → QZ612f-7.js} +1 -1
- package/web/app/immutable/chunks/{Bj1VmHmJ.js → QiHSe7pE.js} +1 -1
- package/web/app/immutable/chunks/{DPiwgBxV.js → RAtz5BJe.js} +1 -1
- package/web/app/immutable/chunks/{C59xgYPp.js → T-UCXbJS.js} +1 -1
- package/web/app/immutable/chunks/{CwxaNadx.js → TRV263rQ.js} +1 -1
- package/web/app/immutable/chunks/{BcAaHHj_.js → UkcaZDPC.js} +1 -1
- package/web/app/immutable/chunks/{BILCfAeY.js → VH54VSPn.js} +1 -1
- package/web/app/immutable/chunks/{CDGcnZR5.js → VlylMxmA.js} +1 -1
- package/web/app/immutable/chunks/{DR7XO1uo.js → WvnHVkBo.js} +1 -1
- package/web/app/immutable/chunks/{C111lYGO.js → Y7H0Q9T9.js} +1 -1
- package/web/app/immutable/chunks/{CIUOjVit.js → _639dNbm.js} +1 -1
- package/web/app/immutable/chunks/{bp1OJROF.js → aQ1wweeY.js} +1 -1
- package/web/app/immutable/chunks/{BzW_8cyh.js → cjWrgEc5.js} +1 -1
- package/web/app/immutable/chunks/{CbsveYrS.js → e5cMrke8.js} +1 -1
- package/web/app/immutable/chunks/{COokUMpm.js → jeQJPkPX.js} +1 -1
- package/web/app/immutable/chunks/{Bi9J7ZWc.js → jvSooljK.js} +1 -1
- package/web/app/immutable/chunks/{wEDjfGMo.js → lbBEThX6.js} +1 -1
- package/web/app/immutable/chunks/{T5gyQ5hy.js → mp0CeHil.js} +1 -1
- package/web/app/immutable/chunks/{CP9eXkGz.js → ndibvDk5.js} +1 -1
- package/web/app/immutable/chunks/{tbq-oxb3.js → o3xy8uhx.js} +1 -1
- package/web/app/immutable/chunks/{aBVNuo2p.js → ra3YYtwY.js} +1 -1
- package/web/app/immutable/chunks/u2UWf7Y4.js +2 -0
- package/web/app/immutable/chunks/{e8UxY0el.js → u8LnBJs1.js} +1 -1
- package/web/app/immutable/chunks/{axg0Ndkk.js → utDAmz_H.js} +1 -1
- package/web/app/immutable/chunks/{BB12pUFu.js → v9ob0vCO.js} +1 -1
- package/web/app/immutable/chunks/{CUH-D27g.js → vxHAGoo-.js} +1 -1
- package/web/app/immutable/chunks/{CDkIMW0_.js → wzM9lg7r.js} +1 -1
- package/web/app/immutable/chunks/{B30jTa2N.js → xKssrPyL.js} +1 -1
- package/web/app/immutable/chunks/{gTulAhJn.js → xmUlEbpq.js} +1 -1
- package/web/app/immutable/chunks/{Bfg47dIU.js → ycNH2fN8.js} +1 -1
- package/web/app/immutable/entry/{app.Dm8wR6Rj.js → app.B5_j9_5M.js} +3 -3
- package/web/app/immutable/entry/start.mb9UH8tB.js +1 -0
- package/web/app/immutable/nodes/{0.CwEG7GgD.js → 0.DHuGbpUL.js} +1 -1
- package/web/app/immutable/nodes/{1.DqpCQ0oj.js → 1.WwJLTbbm.js} +1 -1
- package/web/app/immutable/nodes/{10.cnSuSi5Z.js → 10.CPuWWcG0.js} +1 -1
- package/web/app/immutable/nodes/{11.CC3qLADs.js → 11.D_8o4hy2.js} +1 -1
- package/web/app/immutable/nodes/{12.DSb5Am3H.js → 12.CZZ5SuMc.js} +1 -1
- package/web/app/immutable/nodes/{13.CCDV1skO.js → 13.BCLve-7_.js} +3 -3
- package/web/app/immutable/nodes/{14.DeCwT4BN.js → 14.BcQJ7NXl.js} +1 -1
- package/web/app/immutable/nodes/{15.k51Sg7jX.js → 15.ClAlFdyg.js} +1 -1
- package/web/app/immutable/nodes/{16.DpXdz_jE.js → 16.CuGK30BG.js} +1 -1
- package/web/app/immutable/nodes/{17.D8r3aG2k.js → 17.D7rHJr6p.js} +1 -1
- package/web/app/immutable/nodes/{18.BqQgYdRA.js → 18.zJtnTeH6.js} +2 -2
- package/web/app/immutable/nodes/{2.B6rlXtKu.js → 2.0AUsew1o.js} +4 -4
- package/web/app/immutable/nodes/{3.C3QOw0-1.js → 3.BAKoHu3T.js} +1 -1
- package/web/app/immutable/nodes/{4.w6LAxxf2.js → 4.DvgOQOfh.js} +1 -1
- package/web/app/immutable/nodes/{5.iL_EURMh.js → 5.B3LUyqZc.js} +1 -1
- package/web/app/immutable/nodes/{6.ycdot7zh.js → 6.CQSK8GlV.js} +1 -1
- package/web/app/immutable/nodes/{7.HdIw4pKx.js → 7.C0YP__gO.js} +1 -1
- package/web/app/immutable/nodes/8.CCQs8dWr.js +14 -0
- package/web/app/immutable/nodes/{9.gXjT92Zl.js → 9.BLr02eF_.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +45 -45
- package/web/index.html +18 -18
- package/web/app/immutable/chunks/BQy38IRs.js +0 -1
- package/web/app/immutable/chunks/BvIap_Mf.js +0 -408
- package/web/app/immutable/chunks/CD8un3Yt.js +0 -1
- package/web/app/immutable/chunks/CiyfjWlF.js +0 -1
- package/web/app/immutable/chunks/DUCyNlB1.js +0 -1
- package/web/app/immutable/chunks/_EdWPAoo.js +0 -2
- package/web/app/immutable/entry/start.D6r48319.js +0 -1
- package/web/app/immutable/nodes/8.B8D0hgU8.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,r as l,d as t}from"./
|
|
1
|
+
import{g as o,r as l,d as t}from"./C73NY2AB.js";import{p as m}from"./C-vkWK8U.js";import{b as n,ay as s}from"./DozUkl5C.js";import{M as p,d as u}from"./Dgv1nn7D.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),y=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),y(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as Yt,bq as v,bo as F,by as Zt,bu as Xe,bs as Jt,b as Qt}from"./
|
|
1
|
+
import{t as Yt,bq as v,bo as F,by as Zt,bu as Xe,bs as Jt,b as Qt}from"./CT36W95j.js";import{bs as en,c5 as Ye,ca as xe,aD as t,bH as H,a5 as M,bA as R,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Ze,bO as Y,aB as T,b$ as Pe,be as sn,a7 as an,ay as Je}from"./DYhIMPy1.js";import{i as me}from"./Cn5kmzaj.js";import{g as on,i as rn}from"./Bw5h0b4B.js";import{f as ln}from"./TRV263rQ.js";import{f as cn}from"./C20jcbNk.js";import{k as dn}from"./BHqqRyT8.js";import{Iv as Se,nV as fn,zg as un,s1 as bt,nX as hn,a7 as kt}from"./BmagX6n5.js";import{bN as gn,dr as vn}from"./DpNO08YA.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./Bpb2sW6o.js";import{F as _t,b6 as wt}from"./D_rHnmLE.js";import{f as Qe}from"./D9xzAHI_.js";import"./ClQp3PSY.js";import{t as Re}from"./Du0V4O1Q.js";import{t as bn}from"./D-IkFfCX.js";import{g as kn}from"./MpnM4XaB.js";function _n(q,c,oe,Ie=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,Z=wn(Ie)-1,De=We.split(`
|
|
2
2
|
`);let s=0,I=0,le=!1;for(const B of De)if(B.startsWith("@@")){le=!0;const J=B.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);J&&(I=parseInt(J[1],10),s=parseInt(J[2],10))}else le&&(B.startsWith("+")?(re.add(s+Z),s++):B.startsWith("-")?(pe.add(I+Z),I++):B.startsWith(" ")&&(s++,I++));return{additions:re,deletions:pe}}function wn(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),Rn=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),In=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return Yt({component:Dn,...q});en(c,!0);const oe=()=>Xe(yt,"$read$",re),Ie=()=>Xe(Rt,"$workspace$",re),We=()=>Xe(It,"$workingTreeFileContentStore",re),[re,pe]=Jt(),Z=mn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=v(c,"change",7),I=v(c,"active",7,!0),le=v(c,"workspaceId",7),B=v(c,"viewMode",7,"unified"),J=v(c,"showHeader",7,!1),Ne=v(c,"foldUnchanged",7,!0),Me=v(c,"lineWrapping",7,!1),U=v(c,"onStageHunk",7),A=v(c,"onUnstageHunk",7),et=v(c,"onOpenCommit",7),Ue=v(c,"refreshKey",7),Ae=v(c,"branchBaseRef",7),Ee=v(c,"branchBaseCommitSha",7),ge=v(c,"useProvidedContent",7,!1),ce=v(c,"allowHeadReads",7,!0),Fe=v(c,"canReadHeadFiles",7),W=v(c,"lineOffset",7,1),tt=v(c,"lineStageIndicators",7),Oe=v(c,"annotations",23,()=>[]),Te=v(c,"renderAnnotation",7),Be=v(c,"virtualizer",7),V=v(c,"gitRootId",7,void 0),be=v(c,"gitRootPath",7,void 0);const de=Ye(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),$e=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,$e),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),ze=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),$=d(()=>t(ze)?"":t(Q)?.oldContent??""),G=d(()=>t(ze)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?At(t(Q).chunk,t(ee)):""),xt=d(()=>!t($)&&!t(G)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
|
|
3
3
|
`.repeat(W()-1):""),St=d(()=>t(st)+t($)),Ht=d(()=>t(st)+t(G));let _=ae(null),Ke=ae(null),_e=null,we=ae(!1);const Rt=vn(de),at=pt(void 0),ot=pt(""),It=dn(ot,at),rt=d(Ie),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Ut(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t($))}:off${W()}`:void 0),Mt=d(()=>t(dt)?`${t(Le)}:${He(t(G))}:off${W()}`:void 0);function Ut(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function At(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
|
|
4
4
|
`)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./uXuxG9cN.js";import{u as J,o as T,_ as C,s as b,l as _,n as U}from"./CIyUrgF0.js";import{bo as $}from"./BQy38IRs.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),Oe=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:_("backoff"),retryAt:b()}),T({state:_("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),_e=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","machineOrder","remoteLinkTraffic","cloudMachines","cloudMachineEntries","cloudMachineProviders"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:_(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function O(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(O(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(O(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(O(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,Oe as M,_e as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
|
|
1
|
+
var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./uXuxG9cN.js";import{u as J,o as T,_ as C,s as b,l as _,n as U}from"./CIyUrgF0.js";import{bo as $}from"./CT36W95j.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),Oe=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:_("backoff"),retryAt:b()}),T({state:_("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),_e=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","machineOrder","remoteLinkTraffic","cloudMachines","cloudMachineEntries","cloudMachineProviders"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:_(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function O(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(O(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(O(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(O(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,Oe as M,_e as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as W,bq as A,bo as s,by as O,b as R}from"./
|
|
1
|
+
import{t as W,bq as A,bo as s,by as O,b as R}from"./CT36W95j.js";import{bs as S,a5 as q,aD as i,bS as p,bl as u,bA as k,b_ as h,bO as b,W as f,bn as B,c9 as j,aA as E,aB as g}from"./DYhIMPy1.js";import{i as F}from"./Cn5kmzaj.js";import{g as G}from"./Bw5h0b4B.js";import{s as m}from"./TRV263rQ.js";import{h as H,W as J,i as K}from"./D_rHnmLE.js";var L=g('<li class="flex items-center gap-2"><!> <span class="min-w-0 flex-1 break-words"> </span> <span class="shrink-0 text-muted-foreground"> </span></li>'),M=g('<ul class="space-y-1 text-sm"></ul>');function N(n,o){if(new.target)return W({component:N,...n});S(o,!0);let r=A(o,"checklist",7);const v=j(()=>{const e=c=>({state:c?"done":"waiting",status:c?s.desktop_os_checklist_allowed():s.desktop_os_checklist_missing()}),t=()=>r().screenCapture==="blocked"?{state:"waiting",status:s.desktop_os_checklist_blocked()}:r().screenCapture==="ready"?{state:"done",status:s.desktop_os_checklist_ready()}:r().screenCapture==="checking"?{state:"waiting",status:s.desktop_os_checklist_checking()}:{state:"failed",status:s.desktop_os_checklist_unconfirmed()};return[{label:s.desktop_os_checklist_accessibility(),...e(r().accessibility)},{label:s.desktop_os_checklist_screenRecording(),...e(r().screenRecording)},{label:s.desktop_os_checklist_screenCapture(),...t()}]});var x={get checklist(){return r()},set checklist(e){r(e),E()},$set:O,$on:(e,t)=>R(o,e,t)},l=M();return G(l,21,()=>i(v),e=>e.label,(e,t)=>{var c=L(),_=q(c);{var C=a=>{H(a,{class:"size-4 shrink-0 text-success","aria-hidden":"true"})},y=a=>{J(a,{class:"size-4 shrink-0 text-danger","aria-hidden":"true"})},w=a=>{K(a,{class:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})};F(_,a=>{i(t).state==="done"?a(C):i(t).state==="failed"?a(y,1):a(w,-1)})}var d=p(_,2),z=u(d,!0),D=p(d,2),I=u(D,!0);k(c),h(()=>{m(c,"data-state",i(t).state),b(z,i(t).label),b(I,i(t).status)}),f(e,c)}),k(l),h(e=>m(l,"aria-label",e),[()=>s.desktop_os_checklist_title()]),f(n,l),B(x)}export{N as D};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as le}from"./CZL7jnx7.js";import{p as he}from"./DvfHX1n9.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./DEfRWwmu.js";import{p as Ee}from"./C8y1Abl_.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as le}from"./Dy3Z_3JL.js";import{p as he}from"./C-vkWK8U.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./DozUkl5C.js";import{p as Ee}from"./Dgv1nn7D.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${s-i/2-L/2},${x+R}
|
|
3
3
|
${s-i/2-L/2},${x-R}
|
|
4
4
|
${t.posWithOffset-i/2-L},${x-c-R}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{t as Yt,bq as N,by as te,bu as M,bs as ee,b as re,bo as n,_ as se}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Cw3xVp_u.js","/app/immutable/chunks/BmagX6n5.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BgUSjvxc.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DHClt9az.js","/app/immutable/chunks/CT36W95j.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/C20jcbNk.js","/app/immutable/chunks/D4bOZmAv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as Yt,bq as N,by as te,bu as M,bs as ee,b as re,bo as n,_ as se}from"./CT36W95j.js";import{bo as ae,bs as ne,ca as C,bH as Z,c5 as yt,aD as F,bj as ie,a5 as O,bS as p,bA as D,b_ as x,W as f,bn as oe,cd as lt,bV as kt,c9 as G,aA as J,bl as R,bO as h,ay as St,aB as y}from"./DYhIMPy1.js";import{i as I}from"./Cn5kmzaj.js";import{f as wt,g as le,s as ce}from"./TRV263rQ.js";import{b as ue}from"./BaIAhI85.js";import{b as de}from"./4xlJdO9z.js";import{Iv as m,C8 as pe,B_ as me,BZ as fe,Ip as _e,BL as ve,ii as be,iI as ge}from"./BmagX6n5.js";import{a as xe,T as he,D as ye,L as ke,o as Se}from"./-QpofkRx.js";import{F as ct,c_ as we,c6 as $e,cW as Ae}from"./D_rHnmLE.js";import{f as $t}from"./D9xzAHI_.js";import{k as rt}from"./B7lF313M.js";import"./ClQp3PSY.js";import"./DHClt9az.js";import"./ChTqQfQN.js";import"./CJyP11U5.js";import{r as Ce}from"./K6Z_l6pq.js";import{selectScriptById as ut,selectScriptRuntime as Fe,selectScriptOutput as At,selectScriptRetainedOutput as Oe,selectCanDeleteScript as Ct}from"./BLAOZHWQ.js";import{g as De}from"./BFllbeCZ.js";import{bS as Re,dL as Ie,dl as Ft}from"./DpNO08YA.js";import"./D9BiEPlJ.js";import"./_639dNbm.js";import"./DBigkuTi.js";import{c as Le}from"./WvnHVkBo.js";import{I as Ot}from"./DThHr-M9.js";var Dt=y("<!> ",1),Be=y('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Te=y('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),qe=y('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Ee=y('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Pe=y('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),We=y('<code class="text-muted-foreground font-mono text-xs"> </code>'),Me=y('<span class="sr-only"> </span>'),je=y('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!> <!></div></div>'),ze=y('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function Ue(_,c){const z=ae();if(new.target)return Yt({component:Ue,..._});ne(c,!0);const L=()=>M(Wt,"$outputAuthority",B),u=()=>M(Bt,"$runtime$",B),v=()=>M(Tt,"$output$",B),w=()=>M(Pt,"$codeFontFamilyCSS",B),j=()=>M(qt,"$retainedOutput$",B),Rt=()=>M(Et,"$hidesAgentLifecycleActions$",B),dt=()=>M(Lt,"$script$",B),[B,It]=ee();let $=N(c,"scriptId",7),b=N(c,"workspaceId",7),st=N(c,"class",7,""),at=N(c,"runDisabled",7,!1),T=N(c,"runDisabledReason",7,null);const pt=G(()=>at()||T()!==null),q=lt(""),U=lt(""),mt=lt("");let nt=kt(!1);C(()=>q.set(b())),C(()=>U.set($()));let E,i=null,H=null,Q=null,V=null,P=null,X=null;const Lt=ut(q,U),Bt=Fe(q,U),Tt=At(q,U),qt=Oe(q,U,mt),Et=Re(q),Pt=De(),Wt=Ie(q),ft=crypto.randomUUID();C(()=>{const t=b();return $(),()=>{t&&m.dispatch(pe(t,ft))}}),C(()=>{const t=b(),e=$(),a=L(),s=u();if(!a||!t||!e)return;s.status,s.startedAt;const l=crypto.randomUUID();return mt.set(l),Z(nt,yt(()=>v().chunks.length===0),!0),m.dispatch(me(t,e,l)),()=>m.dispatch(fe(t,e,l))});let Y=kt(0);const Mt=G(()=>u().status==="exited"&&u().exitCode!=null&&u().exitCode!==0&&u().exitCode<128);function jt(){if(!E||i)return;V=new he(E);const t=V.getCurrentTheme();i=new ye({allowProposedApi:!0,fontFamily:w(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),i.attachCustomKeyEventHandler(a=>{const s=a.metaKey||a.ctrlKey;return!(s&&a.key==="`"||s&&a.key==="j"||s&&a.key==="k")}),H=new Se,i.loadAddon(H);const e=new ke((a,s)=>{try{const l=new URL(s);l.hostname==="localhost"||l.hostname==="127.0.0.1"?Ce(s).then(g=>{se(async()=>{const{getPanelLayoutManager:k}=await import("./Cw3xVp_u.js").then(A=>A.p);return{getPanelLayoutManager:k}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url).then(({getPanelLayoutManager:k})=>{k(b()).openBrowserPanel(g.url,void 0,void 0,g.requestedUrl)}).catch(()=>{window.open(g.url,"_blank")})}):window.open(s,"_blank")}catch{window.open(s,"_blank")}});i.loadAddon(e),i.open(E),V.applyTheme(i),X=requestAnimationFrame(()=>{X=null,H?.fit()}),Q=new ResizeObserver(()=>{H?.fit()}),Q.observe(E),zt()}function zt(){if(!i)return;const t=At.select(m.state,b(),$());t.chunks.length>0&&i.write(t.chunks.map(e=>e.text).join("")),Z(Y,t.dropped+t.chunks.length)}function _t(){P!==null&&(cancelAnimationFrame(P),P=null),X!==null&&(cancelAnimationFrame(X),X=null),Q?.disconnect(),Q=null,V?.dispose(),V=null;const t=i;i=null,H=null,Z(Y,0),t&&xe(t)}C(()=>{const t=v(),e=yt(()=>F(Y)),a=t.dropped+t.chunks.length;if(!i||a<=e)return;const s=Math.max(e-t.dropped,0);i.write(t.chunks.slice(s).map(l=>l.text).join("")),Z(Y,a)}),C(()=>{const t=w();i&&i.options.fontFamily!==t&&(i.options.fontFamily=t)});function Ut(){F(pt)||m.dispatch(_e(b(),$()))}function Ht(){if(!b()){rt.error(n.terminal_scriptOutput_noWorkspace_error());return}m.dispatch(be(b(),$(),j()?.text,ft))}C(()=>{u().status==="idle"&&v().chunks.length===0&&_t()}),C(()=>{!(u().status==="idle"&&v().chunks.length===0)&&E&&!i&&(P!==null&&cancelAnimationFrame(P),P=requestAnimationFrame(()=>{P=null,jt()}))}),ie(()=>{_t()});var Vt={get scriptId(){return $()},set scriptId(t){$(t),J()},get workspaceId(){return b()},set workspaceId(t){b(t),J()},get class(){return st()},set class(t=""){st(t),J()},get runDisabled(){return at()},set runDisabled(t=!1){at(t),J()},get runDisabledReason(){return T()},set runDisabledReason(t=null){T(t),J()},$set:te,$on:(t,e)=>re(c,t,e)},tt=ze(),vt=O(tt);{var Xt=t=>{var e=Be(),a=O(e),s=O(a),l=O(s);ct(l,{get icon(){return we},size:"xs"}),D(s);var g=p(s,2),k=R(g,!0);D(a);var A=p(a,2);{var d=r=>{$t(r,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Ht,children:(o,S)=>{var W=Dt(),K=St(W);ct(K,{get icon(){return Ae},size:"sm",class:"mr-1.5"});var et=p(K);x(ot=>h(et,` ${ot??""}`),[()=>n.terminal_scriptOutput_askAiToFix_label()]),f(o,W)},$$slots:{default:!0}})};I(A,r=>{Rt()||r(d)})}D(e),x(r=>h(k,r),[()=>n.terminal_scriptOutput_buildFailed_label({exitCode:u().exitCode??0})]),f(t,e)};I(vt,t=>{F(Mt)&&t(Xt)})}var bt=p(vt,2);{var Kt=t=>{var e=Ee(),a=O(e),s=R(a,!0),l=p(a,2),g=R(l,!0),k=p(l,2);{var A=r=>{var o=Te();let S;var W=R(o,!0);x(()=>{S=le(o,"",S,{"font-family":w()}),h(W,j().text)}),f(r,o)},d=r=>{var o=qe(),S=R(o,!0);x(W=>h(S,W),[()=>j().status==="loading"?n.terminal_scriptOutput_retainedLoading_label():n.terminal_scriptOutput_retainedUnavailable_label()]),f(r,o)};I(k,r=>{j().status==="available"?r(A):r(d,-1)})}D(e),x((r,o)=>{h(s,r),h(g,o)},[()=>n.terminal_scriptOutput_retained_label(),()=>n.terminal_scriptOutput_retained_description()]),de("open","toggle",e,r=>Z(nt,r),()=>F(nt)),f(t,e)};I(bt,t=>{j()&&t(Kt)})}var gt=p(bt,2);{var Nt=t=>{var e=Pe(),a=R(e,!0);x(s=>h(a,s),[()=>n.terminal_scriptOutput_live_label()]),f(t,e)};I(gt,t=>{v().chunks.length>0&&j()&&t(Nt)})}var xt=p(gt,2);{var Zt=t=>{var e=je(),a=O(e),s=p(O(a),2);{var l=d=>{var r=We(),o=R(r,!0);x(S=>h(o,S),[()=>ve(dt())]),f(d,r)};I(s,d=>{dt()&&d(l)})}var g=p(s,2);{let d=G(()=>T()??void 0),r=G(()=>n.terminal_scriptOutput_run_label()),o=G(()=>T()?z:void 0);$t(g,{variant:"ghost",size:"xs",get disabled(){return F(pt)},get tooltip(){return F(d)},get"aria-label"(){return F(r)},get"aria-describedby"(){return F(o)},onclick:Ut,class:"text-muted-foreground hover:text-foreground",children:(S,W)=>{var K=Dt(),et=St(K);ct(et,{get icon(){return $e},class:"h-3 w-3 mr-1"});var ot=p(et);x(Qt=>h(ot,` ${Qt??""}`),[()=>n.terminal_scriptOutput_run_label()]),f(S,K)},$$slots:{default:!0}})}var k=p(g,2);{var A=d=>{var r=Me(),o=R(r,!0);x(()=>{ce(r,"id",z),h(o,T())}),f(d,r)};I(k,d=>{T()&&d(A)})}D(a),D(e),f(t,e)};I(xt,t=>{u().status==="idle"&&v().chunks.length===0&&t(Zt)})}var it=p(xt,2);let ht;var Gt=O(it);ue(Gt,t=>E=t,()=>E),D(it),D(tt),x(()=>{wt(tt,1,`script-output-viewer ${st()??""}`,"svelte-115p4sl"),ht=wt(it,1,"flex-1 relative overflow-hidden",null,ht,{hidden:u().status==="idle"&&v().chunks.length===0})}),f(_,tt);var Jt=oe(Vt);return It(),Jt}async function fr(_,c,z){const L=ut.select(m.state,_,c);if(!L||!z()||!Ct.select(m.state,_,c))return;const u=Ot(L.runtime?.status),v=Ft.select(m.state,_);if(!v){rt.error(n.workspace_client_accessChanged_error());return}if(!await Le({title:n.scripts_delete_title({name:L.name}),description:u?n.scripts_delete_running_description():n.scripts_delete_description(),confirmLabel:n.scripts_delete_label(),destructive:!0}))return;if(v!==Ft.select(m.state,_)){rt.error(n.workspace_client_accessChanged_error());return}const w=ut.select(m.state,_,c);if(!z()||!w||w.createdAt!==L.createdAt||w.name!==L.name||!u&&Ot(w.runtime?.status)||!Ct.select(m.state,_,c)){rt.error(n.scripts_delete_changed_error());return}m.dispatch(ge(_,c,n.terminal_quakeOverlay_deleteScriptFailed_error()))}export{Ue as S,fr as c};
|