@intent-hq/web 2.351.0 → 2.352.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/assets/0.Dgd1ZLTR.css +1 -0
- package/web/app/immutable/chunks/{N7G-ZTah.js → -lzAI0Yg.js} +5 -5
- package/web/app/immutable/chunks/{67kYB1lt.js → 3DUg3Vrc.js} +1 -1
- package/web/app/immutable/chunks/{BSkWWR3g.js → 42Hi6Nev.js} +1 -1
- package/web/app/immutable/chunks/{Cw23SInT.js → 4dL6nLyL.js} +1 -1
- package/web/app/immutable/chunks/{CNPNgdra.js → 4fLmPVdQ.js} +1 -1
- package/web/app/immutable/chunks/{zB3SalmM.js → 4gwN8kRi.js} +1 -1
- package/web/app/immutable/chunks/{Bkkc9nPJ.js → 61CqOAVf.js} +3 -3
- package/web/app/immutable/chunks/{D6ncbN-K.js → 6J2j9GGS.js} +1 -1
- package/web/app/immutable/chunks/{DipCXz5L.js → 6cjeTxFJ.js} +1 -1
- package/web/app/immutable/chunks/{CIm0iT4E.js → 6dKWFbhS.js} +1 -1
- package/web/app/immutable/chunks/{Dy3sS5WY.js → 9cOnZvFz.js} +1 -1
- package/web/app/immutable/chunks/{BjVx5o0n.js → 9zOi9r5I.js} +1 -1
- package/web/app/immutable/chunks/A4OD-mjJ.js +1 -0
- package/web/app/immutable/chunks/{ChD6V-mA.js → AnpLuuuk.js} +1 -1
- package/web/app/immutable/chunks/{De70D2Lx.js → B1s_9zgm.js} +2 -2
- package/web/app/immutable/chunks/{XVViy8ZW.js → B32BlPhm.js} +1 -1
- package/web/app/immutable/chunks/{CTvwRPyF.js → B3I1nFXA.js} +1 -1
- package/web/app/immutable/chunks/{bV1WTvQr.js → B3Wey9bw.js} +1 -1
- package/web/app/immutable/chunks/{AyGecNlS.js → B48wzP5i.js} +1 -1
- package/web/app/immutable/chunks/{BrR0973A.js → B4qnea7H.js} +1 -1
- package/web/app/immutable/chunks/{Bpkh7IXN.js → B58e63dk.js} +1 -1
- package/web/app/immutable/chunks/{dvtNrmBJ.js → B5oIPQ5b.js} +1 -1
- package/web/app/immutable/chunks/{Cxn17X4d.js → B6eIRRKX.js} +2 -2
- package/web/app/immutable/chunks/{BuupGai6.js → B6lWPidK.js} +1 -1
- package/web/app/immutable/chunks/{DuPQa1Hv.js → B7oLLIgw.js} +4 -4
- package/web/app/immutable/chunks/{DcxuGfvW.js → B82ywBwW.js} +1 -1
- package/web/app/immutable/chunks/{B6bPIJ1k.js → B87_3X7t.js} +1 -1
- package/web/app/immutable/chunks/{Cy3svQNQ.js → B8PxK7sP.js} +1 -1
- package/web/app/immutable/chunks/{BPIrwIPC.js → B8u7Bszh.js} +1 -1
- package/web/app/immutable/chunks/{UMKs78qL.js → B9Ccf4_O.js} +1 -1
- package/web/app/immutable/chunks/{B-TDUD-n.js → BA4kNZus.js} +1 -1
- package/web/app/immutable/chunks/{vLUkS5Lr.js → BAj9Av-i.js} +1 -1
- package/web/app/immutable/chunks/{VIOarPUD.js → BAkYMES1.js} +1 -1
- package/web/app/immutable/chunks/{C2QAZ2iP.js → BAp1A2ZH.js} +1 -1
- package/web/app/immutable/chunks/{C_akaBgq.js → BEpQx2rq.js} +1 -1
- package/web/app/immutable/chunks/{jyFhDlZn.js → BGkKDEs0.js} +1 -1
- package/web/app/immutable/chunks/{DGaDkdng.js → BIQ14Jou.js} +1 -1
- package/web/app/immutable/chunks/{B0QrNgSj.js → BJ4sw9rR.js} +1 -1
- package/web/app/immutable/chunks/{BTLU_fQH.js → BM7Fn-M6.js} +1 -1
- package/web/app/immutable/chunks/{B-hKl_xx.js → BMQBnpVJ.js} +1 -1
- package/web/app/immutable/chunks/BMYSQl-k.js +19 -0
- package/web/app/immutable/chunks/{B5ekpGAe.js → BO5Pq4fi.js} +1 -1
- package/web/app/immutable/chunks/{C1zdYplM.js → BQYuNS07.js} +1 -1
- package/web/app/immutable/chunks/{Ch2DvoYt.js → BQpZAVZ0.js} +1 -1
- package/web/app/immutable/chunks/{CccgSyFt.js → BR9y4bsr.js} +2 -2
- package/web/app/immutable/chunks/{CKmgmdFa.js → BROObX9U.js} +1 -1
- package/web/app/immutable/chunks/{ClCe1k4i.js → BReF7PxO.js} +1 -1
- package/web/app/immutable/chunks/{Ghm7WpFi.js → BS0GmsgM.js} +1 -1
- package/web/app/immutable/chunks/BUAFIktJ.js +1 -0
- package/web/app/immutable/chunks/{D9XKGcAY.js → BXyNrc2B.js} +1 -1
- package/web/app/immutable/chunks/BYO1ou6X.js +1 -0
- package/web/app/immutable/chunks/{QFwPCSKD.js → B_sYr-qY.js} +1 -1
- package/web/app/immutable/chunks/{Cc0uYvgR.js → BeeeYKV6.js} +1 -1
- package/web/app/immutable/chunks/{jmGUW687.js → Bfba9qCM.js} +1 -1
- package/web/app/immutable/chunks/{C96Cos0M.js → BfmiyhX4.js} +1 -1
- package/web/app/immutable/chunks/{Dv-TQImR.js → BgOj6lPu.js} +1 -1
- package/web/app/immutable/chunks/{BA4L4UPI.js → BgasfqLM.js} +1 -1
- package/web/app/immutable/chunks/{QLXfiC8k.js → BhzNHo5H.js} +1 -1
- package/web/app/immutable/chunks/{BsDTYuK1.js → Bi2Crhsq.js} +1 -1
- package/web/app/immutable/chunks/{DwqB2LW1.js → BlsliAvk.js} +1 -1
- package/web/app/immutable/chunks/{CMWevjI7.js → Bmm9qguf.js} +1 -1
- package/web/app/immutable/chunks/{G1rQ1ZLS.js → BnfhlAnU.js} +1 -1
- package/web/app/immutable/chunks/{4XRamNN4.js → BodHilN5.js} +1 -1
- package/web/app/immutable/chunks/{BoT__Uvu.js → BotG4DRY.js} +1 -1
- package/web/app/immutable/chunks/{C4UmUQ0t.js → Bs7PlXA3.js} +1 -1
- package/web/app/immutable/chunks/{DQjekoSU.js → BszXPYBq.js} +1 -1
- package/web/app/immutable/chunks/{CCw4KHZp.js → Buh7J53B.js} +1 -1
- package/web/app/immutable/chunks/{ClgmQqA9.js → Bvd0DfwC.js} +1 -1
- package/web/app/immutable/chunks/{BJdaIUzQ.js → Bw0E8NsL.js} +1 -1
- package/web/app/immutable/chunks/{CYlvyU3U.js → Bz6dDdb9.js} +1 -1
- package/web/app/immutable/chunks/{CB3bw4PL.js → BzNn-vV2.js} +1 -1
- package/web/app/immutable/chunks/{B043Z8mk.js → C-_Lx3Nm.js} +1 -1
- package/web/app/immutable/chunks/C-d_8VyS.js +2 -0
- package/web/app/immutable/chunks/{DQ8vH0VY.js → C12ljpSn.js} +1 -1
- package/web/app/immutable/chunks/{Sa9G_k7P.js → C1WXXen7.js} +1 -1
- package/web/app/immutable/chunks/{BH-zWM3a.js → C1X9EbCK.js} +3 -3
- package/web/app/immutable/chunks/{0-xAXZgf.js → C1l_AdDU.js} +1 -1
- package/web/app/immutable/chunks/{CWUa486r.js → C2Y-3LOO.js} +1 -1
- package/web/app/immutable/chunks/{BlcZflKW.js → C4rL7fPq.js} +1 -1
- package/web/app/immutable/chunks/C5H4Pe0T.js +1 -0
- package/web/app/immutable/chunks/{C9jK2F--.js → C79qeQUX.js} +1 -1
- package/web/app/immutable/chunks/{BYjUWrg8.js → C7lasS44.js} +1 -1
- package/web/app/immutable/chunks/{CuHfgFFh.js → CDFph9XW.js} +1 -1
- package/web/app/immutable/chunks/{DEVAGsyG.js → CDJiCuQl.js} +1 -1
- package/web/app/immutable/chunks/{D542lbvk.js → CDhg3msv.js} +2 -2
- package/web/app/immutable/chunks/{a6ao35lO.js → CDvr6QES.js} +1 -1
- package/web/app/immutable/chunks/{Bd6Rwh69.js → CGtiJZ6Q.js} +2 -2
- package/web/app/immutable/chunks/{D07rIrLM.js → CGuBCqy6.js} +1 -1
- package/web/app/immutable/chunks/{BXYFidlw.js → CH2B1dsg.js} +1 -1
- package/web/app/immutable/chunks/{NFc5A7UL.js → CLL457e6.js} +1 -1
- package/web/app/immutable/chunks/{D9WrXbf9.js → CLi8c-Jc.js} +1 -1
- package/web/app/immutable/chunks/{BDX4YTR9.js → CMbQPqLg.js} +1 -1
- package/web/app/immutable/chunks/{BdKft7gn.js → CMeXe72Y.js} +1 -1
- package/web/app/immutable/chunks/{C-cC659R.js → CNgwOiTE.js} +1 -1
- package/web/app/immutable/chunks/{BBCbq-hE.js → COO6ldt4.js} +1 -1
- package/web/app/immutable/chunks/{sxpeFI4o.js → CPY58-tp.js} +1 -1
- package/web/app/immutable/chunks/CPjC-KKN.js +1 -0
- package/web/app/immutable/chunks/{B22owOuz.js → CRZhk1kc.js} +1 -1
- package/web/app/immutable/chunks/{CdXmpyDy.js → CRrFC3B8.js} +1 -1
- package/web/app/immutable/chunks/{DjE6Tn4o.js → CSDwAwlx.js} +1 -1
- package/web/app/immutable/chunks/{Dq9dLpt4.js → CUHqJ1Vg.js} +4 -4
- package/web/app/immutable/chunks/{CrkDo76r.js → CUolE7JW.js} +1 -1
- package/web/app/immutable/chunks/{25Qfa38y.js → CVxBES9o.js} +1 -1
- package/web/app/immutable/chunks/CWr4n77L.js +13 -0
- package/web/app/immutable/chunks/{Dy5C9WSY.js → CYYbdMIM.js} +1 -1
- package/web/app/immutable/chunks/{KcC0pRTT.js → CYqtKpzf.js} +1 -1
- package/web/app/immutable/chunks/{fKGM3H1S.js → CZ8DhcrQ.js} +1 -1
- package/web/app/immutable/chunks/{GfKb8O3O.js → CZd1y8kW.js} +1 -1
- package/web/app/immutable/chunks/{SXjX79W0.js → CZkLaz_S.js} +3 -3
- package/web/app/immutable/chunks/{DsewpLhd.js → CZwN60O3.js} +1 -1
- package/web/app/immutable/chunks/{BCQGaqgQ.js → C_Q5e0bX.js} +1 -1
- package/web/app/immutable/chunks/{Dc8XEwi0.js → CaZWRaBD.js} +1 -1
- package/web/app/immutable/chunks/{C4qlKK6F.js → CacD4jQL.js} +1 -1
- package/web/app/immutable/chunks/{D68o263s.js → CbBwTVsV.js} +1 -1
- package/web/app/immutable/chunks/{af7yduyJ.js → CbIRB05A.js} +37 -37
- package/web/app/immutable/chunks/{BHcKnFOT.js → Cbew16AD.js} +1 -1
- package/web/app/immutable/chunks/Ce8ODqPP.js +1 -0
- package/web/app/immutable/chunks/{CA8Jy4WC.js → Cep-BDRS.js} +1 -1
- package/web/app/immutable/chunks/{AOUBMpYk.js → CfdX4Lfl.js} +1 -1
- package/web/app/immutable/chunks/{D6kdeziR.js → CgbHaDpG.js} +1 -1
- package/web/app/immutable/chunks/{uoJ0nI_z.js → ChYZv5SJ.js} +1 -1
- package/web/app/immutable/chunks/{CBtX8-Aa.js → Ci51i12B.js} +1 -1
- package/web/app/immutable/chunks/{Crf39e2Q.js → Cjd2lqUF.js} +1 -1
- package/web/app/immutable/chunks/{DzIV-I7E.js → CltuTtDv.js} +1 -1
- package/web/app/immutable/chunks/{CYyISHjN.js → CmSGn2AH.js} +1 -1
- package/web/app/immutable/chunks/{CuCrpEmq.js → CmpBd6Tg.js} +1 -1
- package/web/app/immutable/chunks/{BhX-5zd9.js → CnTu6sc6.js} +1 -1
- package/web/app/immutable/chunks/{ByQWAkHB.js → Cnntv_QI.js} +1 -1
- package/web/app/immutable/chunks/{CCO5tijn.js → Co5bimwo.js} +1 -1
- package/web/app/immutable/chunks/{D2kFrNtb.js → CrxGBxMK.js} +1 -1
- package/web/app/immutable/chunks/{DvmJXjP_.js → Cs1vro6u.js} +1 -1
- package/web/app/immutable/chunks/{ugjOCd8V.js → Cx8Xjey1.js} +3 -3
- package/web/app/immutable/chunks/{C97vyu8P.js → CzoxGXV9.js} +1 -1
- package/web/app/immutable/chunks/{CrHTQDbT.js → D0ArSCdC.js} +1 -1
- package/web/app/immutable/chunks/{6pSwNbUy.js → D0fcdSwZ.js} +3 -3
- package/web/app/immutable/chunks/{jqiN8Ebl.js → D16yE-CH.js} +2 -2
- package/web/app/immutable/chunks/{DGb_dMRY.js → D1PZlLC_.js} +1 -1
- package/web/app/immutable/chunks/{DRiReCwX.js → D1nX-Mgh.js} +1 -1
- package/web/app/immutable/chunks/{Lx7mQEPN.js → D1z1qVWr.js} +1 -1
- package/web/app/immutable/chunks/{v23yk8Nl.js → D4uvglha.js} +1 -1
- package/web/app/immutable/chunks/{mgh5gPA4.js → D529OnQb.js} +1 -1
- package/web/app/immutable/chunks/{b1qSM27E.js → D5fTH_R4.js} +1 -1
- package/web/app/immutable/chunks/{DwR2QVtr.js → D62BIRhv.js} +1 -1
- package/web/app/immutable/chunks/{BTI1m7l8.js → D6eYnkBB.js} +1 -1
- package/web/app/immutable/chunks/{DtV2WjXp.js → D76YpzZQ.js} +1 -1
- package/web/app/immutable/chunks/{CjafAhxa.js → D7LYGcjf.js} +1 -1
- package/web/app/immutable/chunks/{BDbt9cuZ.js → D8Uhwh7R.js} +1 -1
- package/web/app/immutable/chunks/{BAb3JAL_.js → D8eSz7L_.js} +1 -1
- package/web/app/immutable/chunks/{CbX7A7fn.js → DBGsU6bn.js} +1 -1
- package/web/app/immutable/chunks/{-o555Jq8.js → DCOf4rfq.js} +1 -1
- package/web/app/immutable/chunks/{DPemhAGL.js → DD4J0jul.js} +1 -1
- package/web/app/immutable/chunks/{Cv3VBAcZ.js → DE-3_OpQ.js} +1 -1
- package/web/app/immutable/chunks/{D-fvD02O.js → DEo3brV5.js} +2 -2
- package/web/app/immutable/chunks/{gWaxvgpv.js → DEo5mzFE.js} +4 -4
- package/web/app/immutable/chunks/{hYtFXuM6.js → DF7SJcHw.js} +1 -1
- package/web/app/immutable/chunks/{cKfnoB88.js → DFbFLnMx.js} +1 -1
- package/web/app/immutable/chunks/{5P8mOVWK.js → DHnebSEV.js} +1 -1
- package/web/app/immutable/chunks/DJnc5r8U.js +1 -0
- package/web/app/immutable/chunks/{sHSA98Ae.js → DLHLuX0B.js} +1 -1
- package/web/app/immutable/chunks/{DqKef_Yi.js → DMVl8bez.js} +1 -1
- package/web/app/immutable/chunks/{CramXAJ0.js → DNBLhM9P.js} +1 -1
- package/web/app/immutable/chunks/{X0wrjHux.js → DQuLjWyg.js} +1 -1
- package/web/app/immutable/chunks/{nqpg2Djj.js → DR5IxY_q.js} +1 -1
- package/web/app/immutable/chunks/{Byr2ZhFE.js → DRDTrHX3.js} +1 -1
- package/web/app/immutable/chunks/{Og4xuM7g.js → DS2QhtLm.js} +1 -1
- package/web/app/immutable/chunks/{Bv1i2B5u.js → DTNUQDFX.js} +1 -1
- package/web/app/immutable/chunks/{DL304mi1.js → DUy6xMdY.js} +1 -1
- package/web/app/immutable/chunks/{b8GoMhSt.js → DV_c4cZz.js} +1 -1
- package/web/app/immutable/chunks/{vSLEtuRc.js → DVdgjGW2.js} +1 -1
- package/web/app/immutable/chunks/{B9aafd7C.js → DXBnJ5oH.js} +1 -1
- package/web/app/immutable/chunks/{dAVgSJe8.js → DXIggtiA.js} +1 -1
- package/web/app/immutable/chunks/{B9l9TMyA.js → Da2MW7PY.js} +1 -1
- package/web/app/immutable/chunks/{DUor0DI_.js → Da7V4qRA.js} +1 -1
- package/web/app/immutable/chunks/{CUBdinib.js → DaVLGnNn.js} +1 -1
- package/web/app/immutable/chunks/{BjHlv5EB.js → Db2Jl7w7.js} +1 -1
- package/web/app/immutable/chunks/{DzqZnAgo.js → Dbd3M4VX.js} +4 -4
- package/web/app/immutable/chunks/{BYT1TQGK.js → Dcd40P4V.js} +1 -1
- package/web/app/immutable/chunks/{BI5nb_pF.js → DdSHHwG-.js} +1 -1
- package/web/app/immutable/chunks/{BzXCk-eX.js → DeLItg2s.js} +1 -1
- package/web/app/immutable/chunks/{BJ5nSO_Z.js → DevaRANM.js} +3 -3
- package/web/app/immutable/chunks/{DWgWsm2y.js → Dfo7IcH5.js} +1 -1
- package/web/app/immutable/chunks/{CgfVp9Ef.js → DgGohlQK.js} +1 -1
- package/web/app/immutable/chunks/{RjrC7VFY.js → DhPqduTn.js} +1 -1
- package/web/app/immutable/chunks/{C4oYAvfo.js → DifK42p0.js} +1 -1
- package/web/app/immutable/chunks/{oNlT93oA.js → DjaIRWIW.js} +1 -1
- package/web/app/immutable/chunks/{CjPfyTRR.js → DkkZo56B.js} +1 -1
- package/web/app/immutable/chunks/{ot3p-Y1j.js → DlNogvkm.js} +1 -1
- package/web/app/immutable/chunks/{ZngqFVq2.js → DlySFqed.js} +1 -1
- package/web/app/immutable/chunks/{CKGxulW8.js → DoWpanLy.js} +1 -1
- package/web/app/immutable/chunks/{DhhomoFS.js → DrPWazGq.js} +1 -1
- package/web/app/immutable/chunks/{DfuAejzr.js → DsPTvO1D.js} +1 -1
- package/web/app/immutable/chunks/{D_P8KoFV.js → DyLYtK5N.js} +1 -1
- package/web/app/immutable/chunks/{DGRqvVY1.js → Dzmm4LX6.js} +2 -2
- package/web/app/immutable/chunks/{Bo40L-We.js → EbPgJF03.js} +1 -1
- package/web/app/immutable/chunks/{BahcW9Py.js → GVSL2sGk.js} +1 -1
- package/web/app/immutable/chunks/{CcYKMJWn.js → HZ9TCfKK.js} +1 -1
- package/web/app/immutable/chunks/{BpGfQKt5.js → HpSr1h8y.js} +1 -1
- package/web/app/immutable/chunks/{pA6KCKbP.js → HtolvgCH.js} +1 -1
- package/web/app/immutable/chunks/{ClkbPGx9.js → IH85nSha.js} +1 -1
- package/web/app/immutable/chunks/{SoUJpC1P.js → IsZH9joj.js} +1 -1
- package/web/app/immutable/chunks/{_6UbyZFm.js → JxvzDmDF.js} +1 -1
- package/web/app/immutable/chunks/{R6z5Bqeu.js → Kn9ZbRDu.js} +1 -1
- package/web/app/immutable/chunks/{DdfHQxRr.js → OXVbQQSu.js} +1 -1
- package/web/app/immutable/chunks/{C9OFPDov.js → OyCLeO1d.js} +1 -1
- package/web/app/immutable/chunks/{DE4arwhh.js → Qg7vTeHw.js} +1 -1
- package/web/app/immutable/chunks/{ETkf7dmN.js → Qpp-eumr.js} +1 -1
- package/web/app/immutable/chunks/{Bm0VuPYn.js → SAoHFFQz.js} +1 -1
- package/web/app/immutable/chunks/{FHXrLz5A.js → WSPGY2Jm.js} +1 -1
- package/web/app/immutable/chunks/{Bj0v3XMt.js → XHXZbc0Q.js} +1 -1
- package/web/app/immutable/chunks/{3yYmQx2z.js → XJEHWeE3.js} +1 -1
- package/web/app/immutable/chunks/{BCP62aew.js → _L5AdDNH.js} +1 -1
- package/web/app/immutable/chunks/{CHnA0xpr.js → bl5nff1M.js} +1 -1
- package/web/app/immutable/chunks/{QPRdLPHE.js → ceF1L-gS.js} +1 -1
- package/web/app/immutable/chunks/{CTh4M5uj.js → fEnLQxJ4.js} +1 -1
- package/web/app/immutable/chunks/{Uea955Vz.js → gWBpiwO7.js} +1 -1
- package/web/app/immutable/chunks/{CaPALXDj.js → hQlemDzn.js} +1 -1
- package/web/app/immutable/chunks/{DRRbh3V4.js → hRTaoCvf.js} +1 -1
- package/web/app/immutable/chunks/{DfA_Upom.js → hmNmIDzu.js} +1 -1
- package/web/app/immutable/chunks/{nLyQInj7.js → hwFphMxp.js} +1 -1
- package/web/app/immutable/chunks/{B57wBfTw.js → i4rQF8gq.js} +1 -1
- package/web/app/immutable/chunks/{BuDJvkTk.js → iYz7qSVO.js} +2 -2
- package/web/app/immutable/chunks/{gtyJplKf.js → iqwxOx7o.js} +1 -1
- package/web/app/immutable/chunks/{Ju7PAma1.js → j5tG0B2t.js} +1 -1
- package/web/app/immutable/chunks/{BwzznN4d.js → jK-m9hL8.js} +1 -1
- package/web/app/immutable/chunks/{BEsCIa2p.js → jOuwgRm6.js} +1 -1
- package/web/app/immutable/chunks/{C2pyYkiS.js → lwGMtA_8.js} +1 -1
- package/web/app/immutable/chunks/{BOuXmWAj.js → sbDqysXr.js} +1 -1
- package/web/app/immutable/chunks/{W2yoNJFv.js → tSZXsoGb.js} +1 -1
- package/web/app/immutable/chunks/{CEufllny.js → vJ7Dp7-k.js} +1 -1
- package/web/app/immutable/chunks/{VmRBMU-H.js → vSkHI-FK.js} +2 -2
- package/web/app/immutable/chunks/{73QfWqEv.js → vgvfRyJV.js} +1 -1
- package/web/app/immutable/chunks/{C1ha510g.js → vj4vOyOm.js} +1 -1
- package/web/app/immutable/chunks/{DtWKfIHW.js → xeIBXGKb.js} +1 -1
- package/web/app/immutable/chunks/{BjnapXgD.js → xpT8lZyG.js} +2 -2
- package/web/app/immutable/chunks/{CVDRxz2f.js → ztG-0WIA.js} +1 -1
- package/web/app/immutable/entry/{app.D9kIVkFi.js → app.RSzHSDgw.js} +3 -3
- package/web/app/immutable/entry/start.BVuekftv.js +1 -0
- package/web/app/immutable/nodes/{0.CycxDG0L.js → 0.Da435p_w.js} +1 -1
- package/web/app/immutable/nodes/{1.DBDsO8vk.js → 1.D1nY11Eo.js} +1 -1
- package/web/app/immutable/nodes/{10.DeWMsWJr.js → 10.C15wfgwX.js} +1 -1
- package/web/app/immutable/nodes/{11.D3R05nAN.js → 11.TMR29QT0.js} +1 -1
- package/web/app/immutable/nodes/{12.FwwO1QwE.js → 12.Dkcg23hr.js} +1 -1
- package/web/app/immutable/nodes/{13.BXCK1uUO.js → 13.BANT9s8o.js} +3 -3
- package/web/app/immutable/nodes/{14.CaU020TI.js → 14.DChhRykH.js} +1 -1
- package/web/app/immutable/nodes/{15.DBweoCJ3.js → 15.BXSdgmt8.js} +1 -1
- package/web/app/immutable/nodes/{16.x7FRjB-z.js → 16.Cp3myrhK.js} +1 -1
- package/web/app/immutable/nodes/{17.nVKVEw2j.js → 17.AJ0Z4n7s.js} +1 -1
- package/web/app/immutable/nodes/{18.D8Pypemm.js → 18.BYytq5r4.js} +2 -2
- package/web/app/immutable/nodes/{2.bw2OhfV2.js → 2.B_tahnsH.js} +4 -4
- package/web/app/immutable/nodes/{3.C3rwANJW.js → 3.l2wlNZto.js} +1 -1
- package/web/app/immutable/nodes/{4.D3HKzTPL.js → 4.DSLW-lsR.js} +1 -1
- package/web/app/immutable/nodes/{5.f1pRghhu.js → 5.DaH-2DbB.js} +1 -1
- package/web/app/immutable/nodes/{6.rpNMjH5t.js → 6.CWNY9M3R.js} +1 -1
- package/web/app/immutable/nodes/{7.BSbrbiiB.js → 7.DI6SUPGK.js} +1 -1
- package/web/app/immutable/nodes/8.j51qyATM.js +14 -0
- package/web/app/immutable/nodes/9.C4rF4IYL.js +39 -0
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +19 -19
- package/web/app/immutable/assets/0.C6uvaa87.css +0 -1
- package/web/app/immutable/chunks/41c-5lbJ.js +0 -1
- package/web/app/immutable/chunks/BJwMP_No.js +0 -1
- package/web/app/immutable/chunks/CEpelLfd.js +0 -2
- package/web/app/immutable/chunks/CgXr85TV.js +0 -19
- package/web/app/immutable/chunks/Cj__CwtA.js +0 -1
- package/web/app/immutable/chunks/DLiD3Y7h.js +0 -1
- package/web/app/immutable/chunks/DMIrVtTU.js +0 -1
- package/web/app/immutable/chunks/DQ_x-k0O.js +0 -13
- package/web/app/immutable/chunks/FbHjHDf9.js +0 -1
- package/web/app/immutable/chunks/nbfGErIW.js +0 -1
- package/web/app/immutable/entry/start.CsSnQcM4.js +0 -1
- package/web/app/immutable/nodes/8.DbrZFert.js +0 -14
- package/web/app/immutable/nodes/9.D--sfpfT.js +0 -39
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as O}from"
|
|
1
|
+
import{d as O}from"./DCOf4rfq.js";function b(a,{from:t,to:r},p={}){var{delay:u=0,duration:n=i=>Math.sqrt(i)*120,easing:y=O}=p,s=getComputedStyle(a),d=s.transform==="none"?"":s.transform,[h,v]=s.transformOrigin.split(" ").map(parseFloat);h/=a.clientWidth,v/=a.clientHeight;var c=W(a),f=a.clientWidth/r.width/c,g=a.clientHeight/r.height/c,x=t.left+t.width*h,m=t.top+t.height*v,w=r.left+r.width*h,S=r.top+r.height*v,l=(x-w)*f,o=(m-S)*g,$=t.width/r.width,z=t.height/r.height;return{delay:u,duration:typeof n=="function"?n(Math.sqrt(l*l+o*o)):n,easing:y,css:(i,e)=>{var C=e*l,q=e*o,H=i+e*$,M=i+e*z;return`transform: ${d} translate(${C}px, ${q}px) scale(${H}, ${M});`}}}function W(a){if("currentCSSZoom"in a)return a.currentCSSZoom;for(var t=a,r=1;t!==null;)r*=+getComputedStyle(t).zoom,t=t.parentElement;return r}export{b as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Mt}from"./
|
|
1
|
+
import{p as Mt}from"./DjaIRWIW.js";import{aZ as Nt,U as zt,Y as Lt,b0 as Tt,V as Xt,a_ as At,b as u,a6 as Et,W as Yt,q as J,ay as Q,aX as It,B as Bt,r as Ft,X as V}from"./DEo5mzFE.js";import{p as Rt}from"./tSZXsoGb.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),K=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Ot=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,R=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,R,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=K(e.fromPort)??K(e.toPort);const{flow:d,label:w}=Ot(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Rt("wardley",o);Q.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:At,getAccTitle:Xt,setDiagramTitle:Tt,getDiagramTitle:Lt,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{Q.debug(`Rendering Wardley map
|
|
2
2
|
`+o);const a=jt(),d=Ht(),w=a.nodeRadius*1.6,C=h.db,g=C.getWardleyData(),R=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,Y=It(r);Y.selectAll("*").remove(),Bt(Y,b,S,a.useMaxWidth),Y.attr("viewBox",`0 0 ${S} ${b}`);const v=Y.append("g").attr("class","wardley-map"),q=Y.append("defs");q.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const I=S-a.padding*2,B=b-a.padding*2;R&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(R);const z=u(t=>a.padding+t/100*I,"projectX"),L=u(t=>b-a.padding-t/100*B,"projectY"),O=v.append("g").attr("class","wardley-axes");O.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",mt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+I/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+B/2})`).text(mt);const F=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],f=a.padding+l.start*I,x=a.padding+l.end*I,y=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+I*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-B*n).attr("y2",b-a.padding-B*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(y=>y.id===x)})).filter(x=>x.pos&&x.node).sort((x,y)=>x.node.x-y.node.x);for(let x=0;x<i.length-1;x++){const y=i[x],m=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(n.componentIds.forEach(x=>{const y=c.get(x);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(n.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=v.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const U=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||Z.get(t.target)?.has(t.source)));_.selectAll("line").data(U).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),_.selectAll("text").data(U.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,f=Math.sqrt(l*l+p*p),x=8,y=p/f;return i+y*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,f=Math.sqrt(p*p+l*l),x=8,y=-p/f;return i+y*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f),y=8,m=f/x,P=-l/x,N=i+m*y,W=p+P*y;let A=Math.atan2(f,l)*180/Math.PI;return(A>90||A<-90)&&(A+=180),`rotate(${A} ${N} ${W})`}).text(t=>t.label);const kt=v.append("g").attr("class","wardley-trends"),bt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=z(t.targetX),i=L(t.targetY),p=n-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,y=f>x?n-p/f*x:n,m=f>x?i-l/f*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);kt.selectAll("line").data(bt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),n=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(x.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(j=>{const D=j.node(),Ct=D.getComputedTextLength();m=Math.max(m,Ct);const St=D.getBBox();P=Math.max(P,St.height)});const N=m+i*2+105,W=x.length*p+i*2+P/2,A=a.padding,$t=S-a.padding-N,vt=a.padding,Pt=b-a.padding-W;s=Math.max(A,Math.min(s,$t)),n=Math.max(vt,Math.min(n,Pt)),y.forEach((j,D)=>{j.attr("x",s+i).attr("y",n+i+(D+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",n).attr("width",N).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const n=z(s.x),i=L(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const n=z(s.x),i=L(s.y),p=60,l=30,f=20,x=`
|
|
3
3
|
M ${n} ${i-l/2}
|
|
4
4
|
L ${n+p-f} ${i-l/2}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var Nh=Object.defineProperty;var zh=(t,e,i)=>e in t?Nh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var P=(t,e,i)=>zh(t,typeof e!="symbol"?e+"":e,i);import{cd as Wh}from"./DYhIMPy1.js";import{bo as Fs,_ as Bn}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B4qnea7H.js","/app/immutable/chunks/IH85nSha.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BUAFIktJ.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/Bvd0DfwC.js","/app/immutable/chunks/COO6ldt4.js","/app/immutable/chunks/CnTu6sc6.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/hwFphMxp.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/vJ7Dp7-k.js","/app/immutable/chunks/B1s_9zgm.js","/app/immutable/chunks/BXyNrc2B.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BgOj6lPu.js","/app/immutable/chunks/CLi8c-Jc.js","/app/immutable/chunks/DCOf4rfq.js","/app/immutable/chunks/CRrFC3B8.js","/app/immutable/chunks/iYz7qSVO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D8Uhwh7R.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/CfdX4Lfl.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/vj4vOyOm.js","/app/immutable/chunks/CmSGn2AH.js","/app/immutable/chunks/CacD4jQL.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Nh=Object.defineProperty;var zh=(t,e,i)=>e in t?Nh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var P=(t,e,i)=>zh(t,typeof e!="symbol"?e+"":e,i);import{cd as Wh}from"./DYhIMPy1.js";import{bo as Fs,_ as Bn}from"./BUAFIktJ.js";import{a as ji}from"./BdWqymET.js";import{i as Ns}from"./D_Kq1QRo.js";import{d as Hh}from"./DV_c4cZz.js";import{t as Uh}from"./CSDwAwlx.js";import{d as Ui}from"./B0Z-1lwJ.js";import{c as Kh}from"./ChTqQfQN.js";import{H as qh}from"./B1s_9zgm.js";import{Iv as _t,Jy as An,go as Vh,aT as Gh,BJ as Yh,zX as Xh,rG as jh}from"./iYz7qSVO.js";import{N as Pn,S as On,H as In,B as $n}from"./ggQuSgBM.js";import{g as Zh}from"./Bz6dDdb9.js";import{f as Jh,l as Qh}from"./HtolvgCH.js";/**
|
|
3
3
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
4
4
|
* @license MIT
|
|
5
5
|
*
|
|
@@ -141,6 +141,6 @@ void main() {
|
|
|
141
141
|
`))}},uf=class extends Error{constructor(t,e){super(t),this.name="ListenerLeakError",this.stack=e}},_f=class extends Error{constructor(t,e){super(t),this.name="ListenerRefusalError",this.stack=e}},ff=0,ur=class{constructor(t){this.value=t,this.id=ff++}},gf=2,pf,ut=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new cf(t?.onListenerError??dr,this._options?.leakWarningThreshold??lf):void 0,this._perfMon=this._options?._profName?new hf(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,e,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);let a=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new _f(`${o}. HINT: Stack shows most frequent listener (${a[1]}-times)`,a[0]);return(this._options?.onListenerError||dr)(l),qt.None}if(this._disposed)return qt.None;e&&(t=t.bind(e));let s=new ur(t),r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=df.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof ur?(this._deliveryQueue??=new mf,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let n=yi(()=>{r?.(),this._removeListener(s)});return i instanceof kn?i.add(n):Array.isArray(i)&&i.push(n),n},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let e=this._listeners,i=e.indexOf(t);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*gf<=e.length){let r=0;for(let n=0;n<e.length;n++)e[n]?e[r++]=e[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=r}}_deliver(t,e){if(!t)return;let i=this._options?.onListenerError||dr;if(!i){t.value(e);return}try{t.value(e)}catch(s){i(s)}}_deliverQueue(t){let e=t.current._listeners;for(;t.i<t.end;)this._deliver(e[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof ur)this._deliver(this._listeners,t);else{let e=this._deliveryQueue;e.enqueue(this,t,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}},mf=class{constructor(){this.i=-1,this.end=0}enqueue(t,e,i){this.i=0,this.end=i,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Oh=Object.freeze(function(t,e){let i=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(i)}}}),vf;(t=>{function e(i){return i===t.None||i===t.Cancelled||i instanceof Sf?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:En.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Oh})})(vf||={});var Sf=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Oh:(this._emitter||(this._emitter=new ut),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},mi="en",_r=!1,ds,Cs=mi,aa=mi,wf,Lt,ni=globalThis,Ge;typeof ni.vscode<"u"&&typeof ni.vscode.process<"u"?Ge=ni.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Ge=process);var bf=typeof Ge?.versions?.electron=="string",Cf=bf&&Ge?.type==="renderer";if(typeof Ge=="object"){Ge.platform,Ge.platform,_r=Ge.platform==="linux",_r&&Ge.env.SNAP&&Ge.env.SNAP_REVISION,Ge.env.CI||Ge.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ds=mi,Cs=mi;let t=Ge.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);ds=e.userLocale,aa=e.osLocale,Cs=e.resolvedLanguage||mi,wf=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!Cf?(Lt=navigator.userAgent,Lt.indexOf("Windows")>=0,Lt.indexOf("Macintosh")>=0,(Lt.indexOf("Macintosh")>=0||Lt.indexOf("iPad")>=0||Lt.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_r=Lt.indexOf("Linux")>=0,Lt?.indexOf("Mobi")>=0,Cs=globalThis._VSCODE_NLS_LANGUAGE||mi,ds=navigator.language.toLowerCase(),aa=ds):console.error("Unable to resolve platform.");var vt=Lt,$t=Cs,yf;(t=>{function e(){return $t}t.value=e;function i(){return $t.length===2?$t==="en":$t.length>=3?$t[0]==="e"&&$t[1]==="n"&&$t[2]==="-":!1}t.isDefaultVariant=i;function s(){return $t==="en"}t.isDefault=s})(yf||={});var xf=typeof ni.postMessage=="function"&&!ni.importScripts;(()=>{if(xf){let t=[];ni.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=t.length;s<r;s++){let n=t[s];if(n.id===i.data.vscodeScheduleAsyncWork){t.splice(s,1),n.callback();return}}});let e=0;return i=>{let s=++e;t.push({id:s,callback:i}),ni.postMessage({vscodeScheduleAsyncWork:s},"*")}}return t=>setTimeout(t)})();var kf=!!(vt&&vt.indexOf("Chrome")>=0);vt&&vt.indexOf("Firefox")>=0;!kf&&vt&&vt.indexOf("Safari")>=0;vt&&vt.indexOf("Edg/")>=0;vt&&vt.indexOf("Android")>=0;function Ih(t,e=0,i){let s=setTimeout(()=>{t()},e);return yi(()=>{clearTimeout(s)})}var Ef;(t=>{async function e(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}t.settled=e;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}t.withAsyncBody=i})(Ef||={});var ha=class Qe{static fromArray(e){return new Qe(i=>{i.emitMany(e)})}static fromPromise(e){return new Qe(async i=>{i.emitMany(await e)})}static fromPromises(e){return new Qe(async i=>{await Promise.all(e.map(async s=>i.emitOne(await s)))})}static merge(e){return new Qe(async i=>{await Promise.all(e.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ut,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(e(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await En.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,i){return new Qe(async s=>{for await(let r of e)s.emitOne(i(r))})}map(e){return Qe.map(this,e)}static filter(e,i){return new Qe(async s=>{for await(let r of e)i(r)&&s.emitOne(r)})}filter(e){return Qe.filter(this,e)}static coalesce(e){return Qe.filter(e,i=>!!i)}coalesce(){return Qe.coalesce(this)}static async toPromise(e){let i=[];for await(let s of e)i.push(s);return i}toPromise(){return Qe.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};ha.EMPTY=ha.fromArray([]);var Lf=class extends qt{constructor(t){super(),this._terminal=t,this._linesCacheTimeout=this._register(new Rs),this._linesCacheDisposables=this._register(new Rs),this._register(yi(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=Mh(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=Ih(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(t){return this._linesCache?.[t]}setLineInCache(t,e){this._linesCache&&(this._linesCache[t]=e)}translateBufferLineToStringWithWrap(t,e){let i=[],s=[0],r=this._terminal.buffer.active.getLine(t);for(;r;){let n=this._terminal.buffer.active.getLine(t+1),o=n?n.isWrapped:!1,a=r.translateToString(!o&&e);if(o&&n){let l=r.getCell(r.length-1);l&&l.getCode()===0&&l.getWidth()===1&&n.getCell(0)?.getWidth()===2&&(a=a.slice(0,-1))}if(i.push(a),o)s.push(s[s.length-1]+a.length);else break;t++,r=n}return[i.join(""),s]}},Mf=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(t){this._cachedSearchTerm=t}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(t){this._lastSearchOptions=t}isValidSearchTerm(t){return!!(t&&t.length>0)}didOptionsChange(t){return this._lastSearchOptions?t?this._lastSearchOptions.caseSensitive!==t.caseSensitive||this._lastSearchOptions.regex!==t.regex||this._lastSearchOptions.wholeWord!==t.wholeWord:!1:!0}shouldUpdateHighlighting(t,e){return e?.decorations?this._cachedSearchTerm===void 0||t!==this._cachedSearchTerm||this.didOptionsChange(e):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},Tf=class{constructor(t,e){this._terminal=t,this._lineCache=e}find(t,e,i,s){if(!t||t.length===0){this._terminal.clearSelection();return}if(i>this._terminal.cols)throw new Error(`Invalid col: ${i} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let r={startRow:e,startCol:i},n=this._findInLine(t,r,s);if(!n)for(let o=e+1;o<this._terminal.buffer.active.baseY+this._terminal.rows&&(r.startRow=o,r.startCol=0,n=this._findInLine(t,r,s),!n);o++);return n}findNextWithSelection(t,e,i){if(!t||t.length===0){this._terminal.clearSelection();return}let s=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=0,n=0;s&&(i===t?(r=s.end.x,n=s.end.y):(r=s.start.x,n=s.start.y)),this._lineCache.initLinesCache();let o={startRow:n,startCol:r},a=this._findInLine(t,o,e);if(!a)for(let l=n+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=l,o.startCol=0,a=this._findInLine(t,o,e),!a);l++);if(!a&&n!==0)for(let l=0;l<n&&(o.startRow=l,o.startCol=0,a=this._findInLine(t,o,e),!a);l++);return!a&&s&&(o.startRow=s.start.y,o.startCol=0,a=this._findInLine(t,o,e)),a}findPreviousWithSelection(t,e,i){if(!t||t.length===0){this._terminal.clearSelection();return}let s=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=this._terminal.buffer.active.baseY+this._terminal.rows-1,n=this._terminal.cols,o=!0;this._lineCache.initLinesCache();let a={startRow:r,startCol:n},l;if(s&&(a.startRow=r=s.start.y,a.startCol=n=s.start.x,i!==t&&(l=this._findInLine(t,a,e,!1),l||(a.startRow=r=s.end.y,a.startCol=n=s.end.x))),l||(l=this._findInLine(t,a,e,o)),!l){a.startCol=Math.max(a.startCol,this._terminal.cols);for(let h=r-1;h>=0&&(a.startRow=h,l=this._findInLine(t,a,e,o),!l);h--);}if(!l&&r!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let h=this._terminal.buffer.active.baseY+this._terminal.rows-1;h>=r&&(a.startRow=h,l=this._findInLine(t,a,e,o),!l);h--);return l}_isWholeWord(t,e,i){return(t===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[t-1]))&&(t+i.length===e.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[t+i.length]))}_findInLine(t,e,i={},s=!1){let r=e.startRow,n=e.startCol;if(this._terminal.buffer.active.getLine(r)?.isWrapped){if(s){e.startCol+=this._terminal.cols;return}return e.startRow--,e.startCol+=this._terminal.cols,this._findInLine(t,e,i)}let o=this._lineCache.getLineFromCache(r);o||(o=this._lineCache.translateBufferLineToStringWithWrap(r,!0),this._lineCache.setLineInCache(r,o));let[a,l]=o,h=this._bufferColsToStringOffset(r,n),c=t,d=a;i.regex||(c=i.caseSensitive?t:t.toLowerCase(),d=i.caseSensitive?a:a.toLowerCase());let u=-1;if(i.regex){let f=RegExp(c,i.caseSensitive?"g":"gi"),g;if(s)for(;g=f.exec(d.slice(0,h));)u=f.lastIndex-g[0].length,t=g[0],f.lastIndex-=t.length-1;else g=f.exec(d.slice(h)),g&&g[0].length>0&&(u=h+(f.lastIndex-g[0].length),t=g[0])}else s?h-c.length>=0&&(u=d.lastIndexOf(c,h-c.length)):u=d.indexOf(c,h);if(u>=0){if(i.wholeWord&&!this._isWholeWord(u,d,t))return;let f=0;for(;f<l.length-1&&u>=l[f+1];)f++;let g=f;for(;g<l.length-1&&u+t.length>=l[g+1];)g++;let C=u-l[f],E=u+t.length-l[g],D=this._stringLengthToBufferSize(r+f,C),B=this._stringLengthToBufferSize(r+g,E)-D+this._terminal.cols*(g-f);return{term:t,col:D,row:r+f,size:B}}}_stringLengthToBufferSize(t,e){let i=this._terminal.buffer.active.getLine(t);if(!i)return 0;for(let s=0;s<e;s++){let r=i.getCell(s);if(!r)break;let n=r.getChars();n.length>1&&(e-=n.length-1);let o=i.getCell(s+1);o&&o.getWidth()===0&&e++}return e}_bufferColsToStringOffset(t,e){let i=t,s=0,r=this._terminal.buffer.active.getLine(i);for(;e>0&&r;){for(let n=0;n<e&&n<this._terminal.cols;n++){let o=r.getCell(n);if(!o)break;o.getWidth()&&(s+=o.getCode()===0?1:o.getChars().length)}if(i++,r=this._terminal.buffer.active.getLine(i),r&&!r.isWrapped)break;e-=this._terminal.cols}return s}},Rf=class extends qt{constructor(t){super(),this._terminal=t,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(yi(()=>this.clearHighlightDecorations()))}createHighlightDecorations(t,e){this.clearHighlightDecorations();for(let i of t){let s=this._createResultDecorations(i,e,!1);if(s)for(let r of s)this._storeDecoration(r,i)}}createActiveDecoration(t,e){let i=this._createResultDecorations(t,e,!0);if(i)return{decorations:i,match:t,dispose(){qi(i)}}}clearHighlightDecorations(){qi(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(t,e){this._highlightedLines.add(t.marker.line),this._highlightDecorations.push({decoration:t,match:e,dispose(){t.dispose()}})}_applyStyles(t,e,i){t.classList.contains("xterm-find-result-decoration")||(t.classList.add("xterm-find-result-decoration"),e&&(t.style.outline=`1px solid ${e}`)),i&&t.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(t,e,i){let s=[],r=t.col,n=t.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+t.row;for(;n>0;){let l=Math.min(this._terminal.cols-r,n);s.push([o,r,l]),r=0,n-=l,o++}let a=[];for(let l of s){let h=this._terminal.registerMarker(l[0]),c=this._terminal.registerDecoration({marker:h,x:l[1],width:l[2],backgroundColor:i?e.activeMatchBackground:e.matchBackground,overviewRulerOptions:this._highlightedLines.has(h.line)?void 0:{color:i?e.activeMatchColorOverviewRuler:e.matchOverviewRuler,position:"center"}});if(c){let d=[];d.push(h),d.push(c.onRender(u=>this._applyStyles(u,i?e.activeMatchBorder:e.matchBorder,!1))),d.push(c.onDispose(()=>qi(d))),a.push(c)}}return a.length===0?void 0:a}},Df=class extends qt{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ut)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(t){this._selectedDecoration=t}updateResults(t,e){this._searchResults=t.slice(0,e)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(t){for(let e=0;e<this._searchResults.length;e++){let i=this._searchResults[e];if(i.row===t.row&&i.col===t.col&&i.size===t.size)return e}return-1}fireResultsChanged(t){if(!t)return;let e=-1;this._selectedDecoration&&(e=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:e,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},Bf=class extends qt{constructor(t){super(),this._highlightTimeout=this._register(new Rs),this._lineCache=this._register(new Rs),this._state=new Mf,this._resultTracker=this._register(new Df),this._highlightLimit=t?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(t){this._terminal=t,this._lineCache.value=new Lf(t),this._engine=new Tf(t,this._lineCache.value),this._decorationManager=new Rf(t),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(yi(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=Ih(()=>{let t=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(t,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(t){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),t||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(t,e,i){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(t,e)&&this._highlightAllMatches(t,e);let s=this._findNextAndSelect(t,e,i);return this._fireResults(e),this._state.cachedSearchTerm=t,s}_highlightAllMatches(t,e){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(t)){this.clearDecorations();return}this.clearDecorations(!0);let i=[],s,r=this._engine.find(t,0,0,e);for(;r&&(s?.row!==r.row||s?.col!==r.col)&&!(i.length>=this._highlightLimit);)s=r,i.push(s),r=this._engine.find(t,s.col+s.term.length>=this._terminal.cols?s.row+1:s.row,s.col+s.term.length>=this._terminal.cols?0:s.col+1,e);this._resultTracker.updateResults(i,this._highlightLimit),e.decorations&&this._decorationManager.createHighlightDecorations(i,e.decorations)}_findNextAndSelect(t,e,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(t))return this._terminal.clearSelection(),this.clearDecorations(),!1;let s=this._engine.findNextWithSelection(t,e,this._state.cachedSearchTerm);return this._selectResult(s,e?.decorations,i?.noScroll)}findPrevious(t,e,i){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(t,e)&&this._highlightAllMatches(t,e);let s=this._findPreviousAndSelect(t,e,i);return this._fireResults(e),this._state.cachedSearchTerm=t,s}_fireResults(t){this._resultTracker.fireResultsChanged(!!t?.decorations)}_findPreviousAndSelect(t,e,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(t))return this._terminal.clearSelection(),this.clearDecorations(),!1;let s=this._engine.findPreviousWithSelection(t,e,this._state.cachedSearchTerm);return this._selectResult(s,e?.decorations,i?.noScroll)}_selectResult(t,e,i){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!t)return this._terminal.clearSelection(),!1;if(this._terminal.select(t.col,t.row,t.size),e){let s=this._decorationManager.createActiveDecoration(t,e);s&&(this._resultTracker.selectedDecoration=s)}if(!i&&(t.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||t.row<this._terminal.buffer.active.viewportY)){let s=t.row-this._terminal.buffer.active.viewportY;s-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(s)}return!0}};const Yt=new ji("TerminalStateMachine");var et=(t=>(t.UNINITIALIZED="uninitialized",t.INITIALIZING="initializing",t.CONNECTING="connecting",t.CONNECTED="connected",t.RECONNECTING="reconnecting",t.DISCONNECTED="disconnected",t.ERROR="error",t.DISPOSED="disposed",t))(et||{});class Af{constructor(e){P(this,"currentState","uninitialized");P(this,"stateListeners",new Map);P(this,"transitionListeners",new Set);P(this,"errorHandlers",new Set);P(this,"transitions",[{from:["uninitialized"],to:"initializing",action:"initialize"},{from:["initializing"],to:"connecting",action:"connect"},{from:["connecting"],to:"connected",action:"connected"},{from:["disconnected","error"],to:"reconnecting",action:"reconnect"},{from:["reconnecting"],to:"connected",action:"reconnected"},{from:["connected","connecting"],to:"disconnected",action:"disconnect"},{from:["initializing","connecting","connected","reconnecting"],to:"error",action:"error"},{from:["uninitialized","initializing","connecting","connected","reconnecting","disconnected","error"],to:"disposed",action:"dispose"}]);this.terminalId=e}getState(){return this.currentState}canTransition(e){const i=this.transitions.find(s=>s.action===e&&s.from.includes(this.currentState));return!(!i||i.guard&&!i.guard())}transition(e){const i=this.transitions.find(r=>r.action===e&&r.from.includes(this.currentState));if(!i)return Yt.warn(`Invalid transition: ${e} from ${this.currentState}`),!1;if(i.guard&&!i.guard())return Yt.warn(`Guard failed for transition: ${e}`),!1;const s=this.currentState;return this.currentState=i.to,Yt.info(`Terminal ${this.terminalId}: ${s} -> ${this.currentState} (${e})`),this.notifyStateListeners(this.currentState),this.notifyTransitionListeners(s,this.currentState),!0}onStateChange(e,i){let s=this.stateListeners.get(e);return s||(s=new Set,this.stateListeners.set(e,s)),s.add(i),()=>{this.stateListeners.get(e)?.delete(i)}}onTransition(e){return this.transitionListeners.add(e),()=>{this.transitionListeners.delete(e)}}onError(e){return this.errorHandlers.add(e),()=>{this.errorHandlers.delete(e)}}reportError(e){Yt.error(`Terminal ${this.terminalId} error:`,e),this.errorHandlers.forEach(i=>{try{i(e)}catch(s){Yt.error("Error handler threw exception:",s)}}),this.currentState!=="disposed"&&this.transition("error")}isHealthy(){return["connected","connecting","reconnecting"].includes(this.currentState)}canAcceptInput(){return this.currentState==="connected"}isDisposed(){return this.currentState==="disposed"}notifyStateListeners(e){this.stateListeners.get(e)?.forEach(i=>{try{i()}catch(s){Yt.error("Error in state listener:",s)}})}notifyTransitionListeners(e,i){this.transitionListeners.forEach(s=>{try{s(e,i)}catch(r){Yt.error("Error in transition listener:",r)}})}dispose(){this.isDisposed()||this.transition("dispose"),this.stateListeners.clear(),this.transitionListeners.clear(),this.errorHandlers.clear()}}const ct=new ji("TerminalBufferManager"),Ln="terminal-buffer-index";let Jt=null,hn=0;const Pf=5e3;function Mn(){const t=Date.now();if(Jt&&t-hn<Pf)return Jt;try{const e=localStorage.getItem(Ln);if(e){const i=JSON.parse(e);Jt=new Map(i.map(s=>[s.key,s.timestamp]))}else Jt=new Map}catch{Jt=new Map}return hn=t,Jt}function Tn(t){try{const e=Array.from(t.entries()).map(([i,s])=>({key:i,timestamp:s}));localStorage.setItem(Ln,JSON.stringify(e)),Jt=t,hn=Date.now()}catch{}}function la(t,e){const i=Mn();i.set(t,e),Tn(i)}function ca(t){const e=Mn();e.delete(t),Tn(e)}const $e=class $e{constructor(e,i){P(this,"storageKey");P(this,"fallbackStorage",new Map);this.workspaceId=e,this.terminalId=i,this.storageKey=`terminal-buffer-${e}-${i}`}async saveBuffer(e,i,s){try{const n={lines:this.trimBuffer(e),cursorX:i,cursorY:s,timestamp:Date.now(),version:$e.BUFFER_VERSION};if(await this.hasStorageSpace(n))try{return localStorage.setItem(this.storageKey,JSON.stringify(n)),la(this.storageKey,n.timestamp),ct.debug(`Saved buffer for terminal ${this.terminalId}`),!0}catch(o){return ct.warn("localStorage failed, using fallback storage:",o),this.fallbackStorage.set(this.storageKey,n),!0}else{await this.cleanupOldBuffers();try{return localStorage.setItem(this.storageKey,JSON.stringify(n)),la(this.storageKey,n.timestamp),!0}catch{return this.fallbackStorage.set(this.storageKey,n),!0}}}catch(r){return ct.error("Failed to save buffer:",r),!1}}async restoreBuffer(){try{const e=localStorage.getItem(this.storageKey);if(e){const s=JSON.parse(e);if(this.isValidSnapshot(s))return ct.debug(`Restored buffer for terminal ${this.terminalId}`),s;localStorage.removeItem(this.storageKey)}const i=this.fallbackStorage.get(this.storageKey);return i&&this.isValidSnapshot(i)?i:null}catch(e){return ct.error("Failed to restore buffer:",e),null}}async clearBuffer(){try{localStorage.removeItem(this.storageKey),this.fallbackStorage.delete(this.storageKey),ca(this.storageKey)}catch(e){ct.error("Failed to clear buffer:",e)}}trimBuffer(e){for(;e.length>0&&!e[e.length-1].trim();)e.pop();return e.length>$e.MAX_BUFFER_SIZE&&(e=e.slice(-1e4)),e.map(i=>i.length>$e.MAX_LINE_LENGTH?`${i.substring(0,$e.MAX_LINE_LENGTH)}…`:i)}isValidSnapshot(e){return!(e.version!==$e.BUFFER_VERSION||Date.now()-e.timestamp>$e.RETENTION_PERIOD||!Array.isArray(e.lines))}async hasStorageSpace(e){try{const i=JSON.stringify(e).length;if("storage"in navigator&&"estimate"in navigator.storage){const s=await navigator.storage.estimate();return(s.quota||0)-(s.usage||0)>i+$e.STORAGE_QUOTA_BUFFER}return!0}catch{return!0}}async cleanupOldBuffers(){try{const e=[],i=Date.now(),s=Mn();for(const[r,n]of s)i-n>$e.RETENTION_PERIOD&&e.push(r);for(const r of e)localStorage.removeItem(r),ca(r),ct.debug(`Cleaned up old buffer: ${r}`);s.size===0&&await this.rebuildBufferIndex()}catch(e){ct.error("Failed to cleanup old buffers:",e)}}async rebuildBufferIndex(){try{const e=new Map;for(let i=0;i<localStorage.length;i++){const s=localStorage.key(i);if(s?.startsWith("terminal-buffer-")&&s!==Ln)try{const r=localStorage.getItem(s);if(r){const n=JSON.parse(r);e.set(s,n.timestamp)}}catch{}}e.size>0&&(Tn(e),ct.debug(`Rebuilt buffer index with ${e.size} entries`))}catch(e){ct.error("Failed to rebuild buffer index:",e)}}getStats(){try{const e=localStorage.getItem(this.storageKey);if(e){const i=JSON.parse(e);return{size:e.length,lineCount:i.lines.length,age:Date.now()-i.timestamp}}return null}catch{return null}}};P($e,"BUFFER_VERSION",1),P($e,"MAX_BUFFER_SIZE",1e4),P($e,"MAX_LINE_LENGTH",1e3),P($e,"RETENTION_PERIOD",1440*60*1e3),P($e,"STORAGE_QUOTA_BUFFER",100*1024);let Ds=$e;const Oi=new ji("TerminalThemeManager"),Se=class Se{constructor(e){P(this,"currentTheme");P(this,"customTerminalTheme",null);P(this,"themeObserver",null);P(this,"transitionTimeout",null);P(this,"darkModeQuery",null);P(this,"darkModeChangeHandler",null);P(this,"themeChangeHandler",null);this.container=e,this.currentTheme=this.detectSystemTheme(),this.setContainer(this.container??null),this.setupThemeObserver()}setContainer(e){this.transitionTimeout&&(clearTimeout(this.transitionTimeout),this.transitionTimeout=null),this.container&&this.container!==e&&(this.container.style.transition=""),this.container=e,this.container&&(this.container.style.backgroundColor=this.currentTheme.background||"transparent")}getCurrentTheme(){return this.currentTheme}applyTheme(e,i){const s=i||this.detectSystemTheme();if(s.name!==this.currentTheme.name)try{this.container&&(this.container.style.transition=`background-color ${Se.TRANSITION_DURATION}ms ease`),e.options.theme=s,this.container&&(this.container.style.backgroundColor=s.background||"transparent"),e.refresh(0,e.rows-1),this.currentTheme=s,Oi.debug(`Applied theme: ${s.name}`),this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.transitionTimeout=setTimeout(()=>{this.container&&(this.container.style.transition="")},Se.TRANSITION_DURATION)}catch(r){Oi.error("Failed to apply theme:",r)}}detectSystemTheme(){if(this.customTerminalTheme)return this.customTerminalTheme;const e=document.documentElement.classList.contains("dark"),i=document.documentElement.classList.contains("light");if(e)return Se.DARK_THEME;if(i)return Se.LIGHT_THEME;const s=document.documentElement.getAttribute("data-theme");if(s==="dark")return Se.DARK_THEME;if(s==="light")return Se.LIGHT_THEME;const n=getComputedStyle(document.documentElement).getPropertyValue("--background").trim();return n&&this.isColorDark(n)||Uh.isDark()?Se.DARK_THEME:Se.LIGHT_THEME}isColorDark(e){const i=this.colorToRgb(e);return i?(.299*i.r+.587*i.g+.114*i.b)/255<.5:!1}colorToRgb(e){if(e.startsWith("#")){const s=e.slice(1);if(s.length===3)return{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16)};if(s.length===6)return{r:parseInt(s.slice(0,2),16),g:parseInt(s.slice(2,4),16),b:parseInt(s.slice(4,6),16)}}const i=e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);return i?{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3])}:null}setupThemeObserver(){typeof window>"u"||(this.themeObserver=new MutationObserver(e=>{for(const i of e)if(i.type==="attributes"){const s=i.attributeName;if(s==="class"||s==="data-theme"){const r=this.detectSystemTheme();r.name!==this.currentTheme.name&&(Oi.debug(`Theme change detected: ${this.currentTheme.name} -> ${r.name}`),Ui("terminal-theme-changed",{theme:r}))}}}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),this.darkModeQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.darkModeChangeHandler=()=>{Oi.debug("System theme preference changed");const e=this.detectSystemTheme();e.name!==this.currentTheme.name&&Ui("terminal-theme-changed",{theme:e})},this.darkModeQuery.addEventListener("change",this.darkModeChangeHandler),this.themeChangeHandler=e=>{const i=e.detail?.isDark,s=e.detail?.terminalColors;let r;s&&Object.keys(s).length>0?(r={...i?Se.DARK_THEME:Se.LIGHT_THEME,...s,name:"custom",isDark:i},this.customTerminalTheme=r):(this.customTerminalTheme=null,r=i?Se.DARK_THEME:Se.LIGHT_THEME),(r.name!==this.currentTheme.name||s)&&(Oi.debug(`App theme changed to ${r.name}`),Ui("terminal-theme-changed",{theme:r}))},window.addEventListener("theme-changed",this.themeChangeHandler))}dispose(){this.themeObserver&&(this.themeObserver.disconnect(),this.themeObserver=null),this.darkModeQuery&&this.darkModeChangeHandler&&(this.darkModeQuery.removeEventListener("change",this.darkModeChangeHandler),this.darkModeQuery=null,this.darkModeChangeHandler=null),this.themeChangeHandler&&(window.removeEventListener("theme-changed",this.themeChangeHandler),this.themeChangeHandler=null),this.transitionTimeout&&(clearTimeout(this.transitionTimeout),this.transitionTimeout=null),this.setContainer(null)}};P(Se,"TRANSITION_DURATION",200),P(Se,"DARK_THEME",{name:"sleek-dark",isDark:!0,background:"#0B0B0E",foreground:"#e4e4e7",cursor:"#fbbf24",cursorAccent:"#1a1a1a",selectionBackground:"#3f3f46",selectionForeground:"#F7F7F7",selectionInactiveBackground:"#27272a",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#d4d4d8",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#f4f4f5"}),P(Se,"LIGHT_THEME",{name:"sleek-light",isDark:!1,background:"#F7F7F8",foreground:"#18181b",cursor:"#f59e0b",cursorAccent:"#F7F7F7",selectionBackground:"#e4e4e7",selectionForeground:"#09090b",selectionInactiveBackground:"#f4f4f5",black:"#18181b",red:"#dc2626",green:"#16a34a",yellow:"#ca8a04",blue:"#2563eb",magenta:"#9333ea",cyan:"#0891b2",white:"#e4e4e7",brightBlack:"#71717a",brightRed:"#ef4444",brightGreen:"#22c55e",brightYellow:"#eab308",brightBlue:"#3b82f6",brightMagenta:"#a855f7",brightCyan:"#06b6d4",brightWhite:"#F7F7F7"});let ln=Se;const Ft="***",Of="(?=[A-Za-z_])[A-Za-z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASS|CREDENTIAL|AUTH|PWD)[A-Za-z0-9_]*",If=new RegExp(`((?:^|(?<=\\s)|&&|;|\\|\\|)\\s*(?:export\\s+)?)(${Of})(=)("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\\\`[^\\\`]*\\\`|\\S+)`,"gi"),$f=/(-[Hh]\s+|--header\s+)(['"])(Authorization:\s*)[^'"]*(\2)/gi,Ff=/([\w+.-]+:\/\/[^\s@]+):([^\s@]+)@(?=\S)/gi,Nf=/(curl\s+(?:\S+\s+)*(?:-u|--user)[=\s]\s*)(["']?)([^\s"':]+):([^\s"']+)\2/gi,zf=/(--(?:password|passwd|token|secret|api-key|api-token|auth-token|access-token|client-secret|private-key))(=)("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\S+)/gi,Wf=/(--(?:password|passwd|token|secret|api-key|api-token|auth-token|access-token|client-secret|private-key))\s+("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\S+)/gi,Hf=/((?:mysql|mongosh?|redis-cli|sshpass)\s+(?:\S+\s+)*-[pP])\s+(\S+)/gi,Uf=/(mysql\s+(?:\S+\s+)*-[pP])(\S+)/gi;function Ut(t){if(!t)return t;let e=t;return e=e.replace($f,`$1$2Authorization: ${Ft}$4`),e=e.replace(Nf,`$1$2$3:${Ft}$2`),e=e.replace(Ff,`$1:${Ft}@`),e=e.replace(zf,`$1$2${Ft}`),e=e.replace(Wf,`$1 ${Ft}`),e=e.replace(Hf,`$1 ${Ft}`),e=e.replace(Uf,`$1${Ft}`),e=e.replace(If,`$1$2$3${Ft}`),e}function Fp(t){try{const e=new URL(t);return`${e.origin}${e.pathname}`.substring(0,100)}catch{return""}}const Xt=Kh("TerminalHistoryTracker"),Qt=class Qt{constructor(){P(this,"histories",new Map);P(this,"MAX_HISTORY_SIZE",10);P(this,"MAX_OUTPUT_LENGTH",500);P(this,"STORAGE_PREFIX","terminal-history-");P(this,"_updateCounter",Wh(0));P(this,"updateCounter",{subscribe:this._updateCounter.subscribe});this.loadHistories()}notifyUpdate(){this._updateCounter.update(e=>e+1)}static getInstance(){return Qt.instance||(Qt.instance=new Qt),Qt.instance}getOrCreateHistory(e,i){let s=this.histories.get(e);return s||(s={terminalId:e,workspaceId:i,commands:[],currentOutput:"",isExecuting:!1},this.histories.set(e,s)),s}onCommandStart(e,i,s){const r=this.getOrCreateHistory(e,i),n=Ut(s);r.currentCommand=n,r.currentOutput="",r.isExecuting=!0,r.lastCommand=n,this.notifyUpdate(),Xt.debug(`Command started for terminal ${e}: ${n}`)}onOutput(e,i,s){const r=this.getOrCreateHistory(e,i);r.currentOutput.length<this.MAX_OUTPUT_LENGTH&&(r.currentOutput+=s,r.currentOutput.length>this.MAX_OUTPUT_LENGTH&&(r.currentOutput=`${r.currentOutput.substring(0,this.MAX_OUTPUT_LENGTH)}...`))}onCommandFinish(e,i){const s=this.getOrCreateHistory(e,i);if(s.currentCommand){const r=Ut(s.currentCommand),n={command:r,timestamp:Date.now(),output:s.currentOutput};s.commands.push(n),s.commands.length>this.MAX_HISTORY_SIZE&&(s.commands=s.commands.slice(-this.MAX_HISTORY_SIZE)),s.lastCommand=r,s.lastOutput=s.currentOutput,this.saveHistory(e,s),Xt.debug(`Command finished for terminal ${e}: ${r}`)}s.currentCommand=void 0,s.currentOutput="",s.isExecuting=!1,this.notifyUpdate()}getHistory(e){return this.histories.get(e)}getHistoriesForWorkspace(e){return Array.from(this.histories.values()).filter(i=>i.workspaceId===e)}getLastCommand(e){return this.histories.get(e)?.lastCommand}getLastOutput(e){return this.histories.get(e)?.lastOutput}saveHistory(e,i){try{const s=`${this.STORAGE_PREFIX}${e}`,r={terminalId:i.terminalId,workspaceId:i.workspaceId,commands:i.commands.slice(-5).map(n=>({...n,command:Ut(n.command)})),lastCommand:i.lastCommand?Ut(i.lastCommand):void 0,lastOutput:i.lastOutput?.substring(0,200)};localStorage.setItem(s,JSON.stringify(r))}catch(s){Xt.warn("Failed to save terminal history:",s)}}loadHistories(){try{const e=Object.keys(localStorage).filter(i=>i.startsWith(this.STORAGE_PREFIX));for(const i of e)try{const s=localStorage.getItem(i);if(s){const r=JSON.parse(s);r.terminalId&&this.histories.set(r.terminalId,{...r,currentOutput:"",isExecuting:!1,commands:r.commands||[]})}}catch(s){Xt.warn(`Failed to load terminal history for ${i}:`,s)}Xt.info(`Loaded ${this.histories.size} terminal histories from localStorage`)}catch(e){Xt.error("Failed to load terminal histories:",e)}}clearHistory(e){this.histories.delete(e);try{localStorage.removeItem(`${this.STORAGE_PREFIX}${e}`)}catch(i){Xt.warn("Failed to clear terminal history:",i)}}clearWorkspaceHistories(e){const i=[];for(const[s,r]of this.histories.entries())r.workspaceId===e&&i.push(s);for(const s of i)this.clearHistory(s)}};P(Qt,"instance");let cn=Qt;const Ii=cn.getInstance();function Kf(t,e){return setTimeout(()=>{try{t.dispose()}catch(i){if(e)e(i);else throw i}},0)}const qf=["panel.focus-next-column","panel.focus-previous-column","global.next-space-alt","global.previous-space-alt","navigation.go-to-tab"];function Vf(t,e,i,s=!1){const r=o=>Pn(o,e),n=s?r("navigation.go-to-device"):Pn("navigation.go-to-tab",e)===On["navigation.go-to-tab"]?On["navigation.go-to-device"]:null;return n&&In(t,n,i)>=0&&!$n("navigation.go-to-device",t,r,i)?!0:qf.some(o=>In(t,r(o),i)>=0&&(o!=="navigation.go-to-tab"||!$n(o,t,r,i)))}const Gf=Bf,I=new ji("TerminalAdapter"),Yf=typeof process<"u"&&process.platform==="win32",Xf=100,Ae=class Ae{constructor(e){P(this,"xterm");P(this,"fitAddon");P(this,"searchAddon");P(this,"webLinksAddon");P(this,"webglAddon",null);P(this,"stateMachine");P(this,"bufferManager");P(this,"themeManager");P(this,"terminalId");P(this,"workspaceId");P(this,"container");P(this,"eventListeners",[]);P(this,"resizeObserver",null);P(this,"reattachFitObserver",null);P(this,"reattachFitTimer",null);P(this,"visibilityObserver",null);P(this,"wasVisible",!0);P(this,"isVisible",!0);P(this,"lastFittedSize",null);P(this,"resizeDebounceTimer",null);P(this,"bufferSaveTimer",null);P(this,"dataDisposable",null);P(this,"resizeDisposable",null);P(this,"selectionDisposable",null);P(this,"ipcCleanup",null);P(this,"themeCleanup",null);P(this,"webglContextLostCleanup",null);P(this,"isDisposed",!1);P(this,"isXtermOpened",!1);P(this,"autoReconnectTimer",null);P(this,"autoReconnectAttempts",0);P(this,"heartbeatTimer",null);P(this,"webglRecoveryAttempts",0);P(this,"exitedNormally",!1);P(this,"lastCwd");P(this,"isExecuting",!1);P(this,"startTime",Date.now());P(this,"commandBuffer","");P(this,"currentLineBuffer","");P(this,"isAtPrompt",!1);P(this,"callbacks");P(this,"terminals");this.workspaceId=e.workspaceId,this.terminalId=e.terminalId||`terminal-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,this.container=e.container,this.terminals=(e.appClient??Hh).terminals,this.callbacks={onReady:e.onReady,onExit:e.onExit,onCommandStart:e.onCommandStart,onCommandFinished:e.onCommandFinished,onCwdChanged:e.onCwdChanged,onError:e.onError,onToggleSearch:e.onToggleSearch},this.stateMachine=new Af(this.terminalId),this.setupStateMachineListeners(),this.bufferManager=new Ds(this.workspaceId,this.terminalId),this.themeManager=new ln(this.container);const i=e.fontFamily??Zh.select(_t.state);this.xterm=new hu({allowProposedApi:!0,fontFamily:i,fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!0,cursorStyle:"block",cursorWidth:1,scrollback:1e4,allowTransparency:!0,windowsPty:Yf?{backend:"conpty"}:void 0,macOptionIsMeta:!0,rightClickSelectsWord:!0,convertEol:!0,drawBoldTextInBrightColors:!0,scrollSensitivity:1,theme:this.themeManager.getCurrentTheme()}),this.fitAddon=new du,this.xterm.loadAddon(this.fitAddon),this.webLinksAddon=new mu((s,r)=>{this.handleLinkClick(r)}),this.xterm.loadAddon(this.webLinksAddon),this.searchAddon=new Gf,this.xterm.loadAddon(this.searchAddon),this.searchAddon.onDidChangeResults(s=>{this.callbacks.onSearchResultsChange?.(s.resultIndex,s.resultCount)})}getSearchDecorations(){return{matchBackground:"#515c6a",matchBorder:"#515c6a",matchOverviewRuler:"#515c6a",activeMatchBackground:"#eab308",activeMatchBorder:"#ca8a04",activeMatchColorOverviewRuler:"#eab308"}}setupStateMachineListeners(){this.stateMachine.onTransition((e,i)=>{i===et.ERROR&&this.handleError(new Error(`Terminal entered error state from ${e}`)),(i===et.DISCONNECTED||i===et.ERROR)&&(this.stopHeartbeat(),this.exitedNormally||this.scheduleAutoReconnect()),i===et.CONNECTED&&(this.autoReconnectAttempts=0,this.cancelAutoReconnect(),this.startHeartbeat())}),this.stateMachine.onError(e=>{this.handleError(e)})}async initialize(e=!1){if(this.isDisposed)throw new Error("Cannot initialize disposed terminal");if(!this.container)throw new Error("Cannot initialize terminal without a container");const i=this.container;if(!this.stateMachine.canTransition("initialize"))throw new Error(`Cannot initialize terminal in state ${this.stateMachine.getState()}`);this.stateMachine.transition("initialize");try{this.isXtermOpened?I.warn(`[initialize] XTerm already opened for terminal ${this.terminalId}, skipping open()`):(this.xterm.open(i),this.isXtermOpened=!0,I.info(`[initialize] XTerm opened for terminal ${this.terminalId}`)),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer for light theme (better anti-aliasing)"),this.themeManager.applyTheme(this.xterm),this.fitTerminalToContainer()||(I.warn("Container has no dimensions, delaying fit"),setTimeout(()=>{this.fitTerminalToContainer()},100)),this.setupResizeObserver(),this.setupXTermEventHandlers(),this.setupThemeChangeListener();const r=this.xterm.cols,n=this.xterm.rows,o=await this.findBackendTerminal(),a=o!==null;if(!e)if(a)try{const l=await this.terminals.getBuffer(this.terminalId,void 0,this.workspaceId);l&&(I.info(`Restoring ${l.length} bytes of buffered output from backend`),this.xterm.write(l),this.parseTerminalOutput(l))}catch(l){I.warn("Could not restore terminal buffer from backend:",l)}else{const l=await this.bufferManager.restoreBuffer();l&&(I.info("Restoring terminal buffer from local storage"),this.restoreFromSnapshot(l))}this.startBufferAutoSave(),this.stateMachine.transition("connect"),a?(this.setupIpcEventHandlers(),this.stateMachine.transition("connected"),this.resize(r,n),o?.isExecuting===!1&&this.hideCursorOnExit(),this.callbacks.onReady?.()):(I.debug(`[initialize] Terminal ${this.terminalId} creating new PTY`),await this.openPtyConnection(r,n)),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()})}catch(s){throw this.stateMachine.reportError(s),s}}async openPtyConnection(e,i){try{const s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_openFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("connected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(s){throw this.stateMachine.reportError(s),s}}async findBackendTerminal(){try{const{terminals:e}=await this.terminals.list(this.workspaceId);return e.find(i=>i.id===this.terminalId)??null}catch(e){return I.warn("Could not check terminal existence:",e),null}}async terminalExistsOnBackend(){return await this.findBackendTerminal()!==null}hideCursorOnExit(){this.isDisposed||(this.xterm.options.cursorBlink=!1,this.xterm.write("\x1B[?25l"))}restoreCursor(){this.isDisposed||(this.xterm.options.cursorBlink=!0,this.xterm.write("\x1B[?25h"))}setupXTermEventHandlers(){this.container&&(this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.resizeDisposable&&(this.resizeDisposable.dispose(),this.resizeDisposable=null),this.selectionDisposable&&(this.selectionDisposable.dispose(),this.selectionDisposable=null),this.xterm.attachCustomKeyEventHandler(e=>{const i=navigator.platform.toUpperCase().includes("MAC"),s=i?e.metaKey:e.ctrlKey;return e.metaKey&&e.key==="k"&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&this.clear(),!1):s&&e.key==="j"&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&_t.dispatch(An(this.workspaceId)),!1):s&&e.key==="f"&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&this.callbacks.onToggleSearch?.(),!1):s&&(e.key==="t"||e.key==="T")&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&Ui("workspace:new-terminal",{workspaceId:this.workspaceId}),!1):s&&(e.key==="w"||e.key==="W")&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&_t.dispatch(Vh(this.workspaceId)),!1):Vf(e,_t.state.userPreferences?.shortcutOverrides??{},i,_t.state.machineRail?.enabled??!1)||s&&e.shiftKey&&!e.altKey&&(e.key==="]"||e.key==="}"||e.key==="["||e.key==="{")?!1:e.ctrlKey&&!e.metaKey&&!e.altKey&&(e.key==="`"||e.key==="~")?(e.type==="keydown"&&(e.shiftKey||e.key==="~"?Ui("workspace:new-terminal",{workspaceId:this.workspaceId}):_t.dispatch(An(this.workspaceId))),!1):!0}),this.dataDisposable=this.xterm.onData(e=>{this.isDisposed||this.write(e)}),this.resizeDisposable=this.xterm.onResize(({cols:e,rows:i})=>{!this.isDisposed&&this.stateMachine.canAcceptInput()&&this.resize(e,i)}),this.selectionDisposable=this.xterm.onSelectionChange(()=>{}))}setupIpcEventHandlers(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null);let e=!1;const i=this.terminals.subscribeEvents(this.terminalId,{onData:({chunk:s})=>{e||this.isDisposed||this.stateMachine.canAcceptInput()&&(this.xterm.write(s),this.parseTerminalOutput(s))},onExit:({exitCode:s})=>{e||this.isDisposed||(this.exitedNormally=!0,this.hideCursorOnExit(),this.callbacks.onExit?.(s),this.stateMachine.transition("disconnect"))},onCwd:({cwd:s})=>{e||this.isDisposed||(this.lastCwd=s,this.callbacks.onCwdChanged?.(s))}},this.workspaceId);this.ipcCleanup=()=>{e=!0;try{i()}catch(s){I.warn("Failed to unsubscribe terminal events:",s)}}}setupResizeObserver(){if(!this.container||!this.isVisible)return;const e=this.container;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>{this.fitTerminalToContainer()},100)}),this.resizeObserver.observe(e),this.setupVisibilityObserver()}setupVisibilityObserver(){if(!this.container)return;const e=this.container;this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.visibilityObserver=new IntersectionObserver(i=>{for(const s of i){const r=s.isIntersecting;r&&!this.wasVisible&&(I.debug(`[visibility] Terminal ${this.terminalId} became visible, reconnecting ResizeObserver`),this.resizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>{this.fitTerminalToContainer()},100)}),this.resizeObserver.observe(e)),this.fitTerminalToContainer()),this.wasVisible=r}}),this.visibilityObserver.observe(e)}loadWebglAddon(){this.disposeWebglAddon();try{this.webglAddon=new J_,this.xterm.loadAddon(this.webglAddon);const e=this.xterm.element?.querySelector("canvas");if(e){const i=s=>{s.preventDefault(),I.warn(`[WebGL] Context lost for terminal ${this.terminalId}, recovering...`),!this.isDisposed&&(this.disposeWebglAddon(),setTimeout(()=>{if(this.isDisposed)return;if(!this.themeManager.getCurrentTheme().isDark){I.info("[WebGL] Skipping WebGL recovery on light theme, using Canvas renderer");return}if(this.webglRecoveryAttempts>=Ae.MAX_WEBGL_RECOVERY_ATTEMPTS){I.warn(`[WebGL] Max recovery attempts (${Ae.MAX_WEBGL_RECOVERY_ATTEMPTS}) reached for terminal ${this.terminalId}, staying on Canvas renderer`);return}this.webglRecoveryAttempts++;try{this.loadWebglAddon(),I.info(`[WebGL] Successfully recovered from context loss (attempt ${this.webglRecoveryAttempts})`)}catch(n){I.warn("[WebGL] Failed to recover from context loss, falling back to Canvas renderer:",n),this.webglAddon=null}},100))};e.addEventListener("webglcontextlost",i),this.webglContextLostCleanup=()=>{e.removeEventListener("webglcontextlost",i)}}}catch(e){I.warn("Failed to load WebGL renderer, falling back to Canvas renderer:",e),this.webglAddon=null}}disposeWebglAddon(){if(this.webglContextLostCleanup&&(this.webglContextLostCleanup(),this.webglContextLostCleanup=null),this.webglAddon){try{this.webglAddon.dispose()}catch(e){I.warn("Error disposing WebGL addon:",e)}this.webglAddon=null}}setupThemeChangeListener(){this.themeCleanup&&(this.themeCleanup(),this.themeCleanup=null);const e=i=>{const s=i.detail?.theme;s&&this.xterm&&(I.info(`[Theme] Theme changed to: ${s.name} (isDark: ${s.isDark})`),this.themeManager.applyTheme(this.xterm,s),s.isDark?this.webglAddon||this.loadWebglAddon():this.webglAddon&&(this.disposeWebglAddon(),I.info("[WebGL] Disposed WebGL addon for light theme (using Canvas renderer)")))};window.addEventListener("terminal-theme-changed",e),this.themeCleanup=()=>{window.removeEventListener("terminal-theme-changed",e)}}parseTerminalOutput(e){Ii.onOutput(this.terminalId,this.workspaceId,e),e.includes("\x1B]133;C\x07")?(this.isExecuting&&(this.isExecuting=!1,this.callbacks.onCommandFinished?.(),Ii.onCommandFinish(this.terminalId,this.workspaceId)),this.commandBuffer="",this.isAtPrompt=!0):e.includes("\x1B]133;A\x07")&&(this.isExecuting||(this.isExecuting=!0,this.callbacks.onCommandStart?.()),this.isAtPrompt=!0,this.commandBuffer="");const i=/[\$%]\s*$/,s=/^.*[\$%]\s+(.+)$/,r=e.split(/\r?\n/);for(const o of r){const a=o.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b\][^\x1b]*\x1b\\/g,"").replace(/\x1b[()][AB0-2]/g,"").replace(/\x1b[=>]/g,"").replace(/\x1b[78]/g,"").replace(/\x1b[DME]/g,"").replace(/\x1b[HZ]/g,"").replace(/\x1b[c]/g,"").replace(/\[\?[0-9;]*[a-zA-Z]/g,"").replace(/\x07/g,"").replace(/\x00-\x08\x0b\x0c\x0e-\x1f/g,"").trim();if(!a||/^\[[\?0-9;]*[a-zA-Z]$/.test(a))continue;const l=a.match(s);if(l&&l[1]){const h=l[1].trim(),c=/^[a-zA-Z0-9.\/~]/.test(h);h.length>0&&!this.isExecuting&&c?(I.info(`[TerminalAdapter] Detected command from output: ${Ut(h)}`),Ii.onCommandStart(this.terminalId,this.workspaceId,h),this.isExecuting=!0,this.callbacks.onCommandStart?.()):h.length>0&&!c&&I.debug(`[TerminalAdapter] Skipping suspicious command detection: ${Ut(h)}`)}i.test(a)&&!l&&(this.isExecuting&&(this.isExecuting=!1,this.callbacks.onCommandFinished?.(),Ii.onCommandFinish(this.terminalId,this.workspaceId),I.debug(`[TerminalAdapter] Command finished, prompt detected: ${Ut(a)}`)),this.isAtPrompt=!0,this.commandBuffer="")}const n=e.match(/\x1b\]7;file:\/\/[^/]*([^\x07]*)\x07/);if(n){const o=decodeURIComponent(n[1]);o!==this.lastCwd&&(this.lastCwd=o,this.callbacks.onCwdChanged?.(o))}}startBufferAutoSave(){this.bufferSaveTimer=setInterval(()=>{this.stateMachine?.canAcceptInput()&&this.saveBuffer()},5e3)}async saveBuffer(){try{const e=this.xterm.buffer.active,i=[];for(let s=0;s<e.length;s++){const r=e.getLine(s);r&&i.push(r.translateToString(!0))}await this.bufferManager.saveBuffer(i,e.cursorX,e.cursorY)}catch(e){I.error("Failed to save buffer:",e)}}restoreFromSnapshot(e){if(e.lines&&e.lines.length>0){this.xterm.clear();const i=[...e.lines];for(;i.length>0&&i[i.length-1].trim()==="";)i.pop();const s=/[\$>#%]\s*$/,r=/@[\w-]+/;if(i.length>0){const n=i[i.length-1],o=i.length>1?i[i.length-2]:"";if(s.test(n)&&r.test(n))i.pop();else if(s.test(n)&&n.trim().length<80)i.pop(),i.length>0&&r.test(i[i.length-1])&&i.pop();else if(i.length>=2){const a=o+n;s.test(a)&&r.test(a)&&(i.pop(),i.pop())}}for(let n=0;n<i.length;n++)n<i.length-1?this.xterm.writeln(i[n]):i[n].trim()&&this.xterm.writeln(i[n]);I.debug(`Restored terminal buffer for ${this.terminalId} with ${i.length} lines (prompt removed)`)}}getCommandFromXtermBuffer(){try{const e=this.xterm.buffer.active,i=e.cursorY+e.baseY,s=e.getLine(i);if(!s)return null;const r=s.translateToString(!0);if(!r||!r.trim())return null;const n=r.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b[()][AB0-2]/g,"").replace(/\x07/g,"").trim();if(!n)return null;const o=n.match(/^.*[\$%#❯➜]\s+(.+)$/);return o&&o[1]?o[1].trim():null}catch{return null}}write(e){if(!(this.isDisposed||!this.stateMachine.canAcceptInput())){if(e==="\r"||e===`
|
|
142
142
|
`){const i=this.getCommandFromXtermBuffer(),s=i||this.commandBuffer.trim();s&&(Ii.onCommandStart(this.terminalId,this.workspaceId,s),this.isExecuting=!0,I.debug(`Command executed: ${Ut(s)}${i?" (from xterm buffer)":" (from keystroke buffer)"}`)),this.commandBuffer="",this.currentLineBuffer=""}else e===""||e==="\b"?this.commandBuffer.length>0&&(this.commandBuffer=this.commandBuffer.slice(0,-1)):e===""?(this.commandBuffer="",this.currentLineBuffer=""):e===""?(this.commandBuffer="",this.currentLineBuffer=""):e.match(/[\x00-\x1F\x7F]/)||(this.commandBuffer+=e,this.currentLineBuffer+=e);this.terminals.write(this.terminalId,e,this.workspaceId).then(i=>{i.success||I.error(`[write] Terminal ${this.terminalId}: write failed - ${i.error}`)}).catch(i=>{I.error(`[write] Terminal ${this.terminalId}: transport error - ${i}`),this.isDisposed||this.stateMachine.reportError(i)})}}resize(e,i){this.isDisposed||!this.stateMachine.canAcceptInput()||this.terminals.resize(this.terminalId,e,i,this.workspaceId).catch(s=>{I.error("Failed to resize terminal:",s)})}focus(){!this.isDisposed&&this.isVisible&&this.xterm.focus()}blur(){this.isDisposed||this.xterm.blur()}setVisible(e){if(!(this.isDisposed||this.isVisible===e)){if(this.isVisible=e,this.wasVisible=e,!e){this.xterm.blur(),this.disconnectLayoutObservers();return}this.setupResizeObserver(),requestAnimationFrame(()=>this.fitTerminalToContainer())}}fitTerminalToContainer(){if(this.isDisposed||!this.isVisible||!this.container)return!1;const{width:e,height:i}=this.container.getBoundingClientRect();return e<=0||i<=0?!1:(this.lastFittedSize?.width===e&&this.lastFittedSize.height===i||(this.fitAddon.fit(),this.lastFittedSize={width:e,height:i}),!0)}disconnectLayoutObservers(){this.resizeObserver?.disconnect(),this.resizeObserver=null,this.visibilityObserver?.disconnect(),this.visibilityObserver=null,this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null)}fitAfterReattach(e){if(this.cancelReattachFit(),this.fitReattachedContainer(e))return;const i=new ResizeObserver(()=>{if(this.reattachFitObserver!==i){i.disconnect();return}this.hasReattachedContainerBox(e)&&(this.reattachFitTimer&&clearTimeout(this.reattachFitTimer),this.reattachFitTimer=setTimeout(()=>{this.reattachFitTimer=null,this.fitReattachedContainer(e)&&this.cancelReattachFit()},Xf))});this.reattachFitObserver=i,i.observe(e)}fitReattachedContainer(e){if(this.isDisposed||this.container!==e)return!0;if(!this.hasReattachedContainerBox(e))return!1;const{width:i,height:s}=e.getBoundingClientRect();return this.fitAddon.fit(),this.lastFittedSize={width:i,height:s},this.xterm.refresh(0,this.xterm.rows-1),!0}hasReattachedContainerBox(e){if(!this.isVisible)return!1;const{width:i,height:s}=e.getBoundingClientRect();return i>0&&s>0}cancelReattachFit(){this.reattachFitObserver?.disconnect(),this.reattachFitObserver=null,this.reattachFitTimer&&(clearTimeout(this.reattachFitTimer),this.reattachFitTimer=null)}clear(){this.isDisposed||this.xterm.clear()}async reattach(e){if(this.isDisposed||this.stateMachine.isDisposed())throw new Error("Cannot reattach disposed terminal");this.cancelAutoReconnect(),this.autoReconnectAttempts=0,this.webglRecoveryAttempts=0,this.exitedNormally=!1,this.setupIpcEventHandlers();const i=this.stateMachine.getState();if(i!==et.CONNECTED){I.info(`[reattach] Terminal ${this.terminalId} not in CONNECTED state (${i}), attempting to restore`);const n=await this.findBackendTerminal();n&&(i===et.DISCONNECTED||i===et.ERROR?(this.stateMachine.transition("reconnect"),this.stateMachine.transition("reconnected")):i===et.CONNECTING&&this.stateMachine.transition("connected"),n.isExecuting===!1&&this.hideCursorOnExit(),I.info(`[reattach] Terminal ${this.terminalId} state restored to ${this.stateMachine.getState()}`))}const s=this.xterm.element;if(s){e.appendChild(s),this.container=e,this.themeManager.setContainer(e),this.disposeWebglAddon(),this.themeManager.applyTheme(this.xterm),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer after move (light theme)"),this.fitAfterReattach(e),this.setupResizeObserver(),this.setupXTermEventHandlers(),this.commandBuffer="",this.currentLineBuffer="",this.isAtPrompt=!1,this.startHeartbeat(),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()});return}I.warn(`Could not move terminal element, recreating for terminal ${this.terminalId}`),this.container&&(this.container.innerHTML=""),this.disposeWebglAddon(),this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.container=e,this.themeManager.setContainer(e),this.isXtermOpened&&I.warn(`[reattach] XTerm was already opened for terminal ${this.terminalId}, calling open() again may cause duplicate handlers`),this.xterm.open(e),this.isXtermOpened=!0,this.themeManager.applyTheme(this.xterm),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer on reattach (light theme)"),this.fitAfterReattach(e),this.setupXTermEventHandlers(),this.setupResizeObserver(),this.commandBuffer="",this.currentLineBuffer="",this.isAtPrompt=!1,this.startHeartbeat(),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()})}updateCallbacks(e){Object.assign(this.callbacks,e)}updateFontFamily(e){this.isDisposed||this.xterm.options.fontFamily!==e&&(this.xterm.options.fontFamily=e)}findNext(e,i){return this.searchAddon.findNext(e,{caseSensitive:i?.caseSensitive??!1,wholeWord:i?.wholeWord??!1,regex:i?.regex??!1,incremental:!1,decorations:this.getSearchDecorations()})}findPrevious(e,i){return this.searchAddon.findPrevious(e,{caseSensitive:i?.caseSensitive??!1,wholeWord:i?.wholeWord??!1,regex:i?.regex??!1,incremental:!1,decorations:this.getSearchDecorations()})}clearSearch(){this.searchAddon.clearDecorations()}getSelection(){return this.xterm.getSelection()}getInfo(){const e=this.bufferManager.getStats();return{id:this.terminalId,workspaceId:this.workspaceId,state:this.stateMachine.getState(),cwd:this.lastCwd,isExecuting:this.isExecuting,stats:e?{bufferSize:e.size,lineCount:e.lineCount,uptime:Date.now()-this.startTime}:void 0}}startHeartbeat(){this.heartbeatTimer||this.isDisposed||(I.debug(`[heartbeat] Starting for terminal ${this.terminalId} (every ${Ae.HEARTBEAT_INTERVAL_MS}ms)`),this.heartbeatTimer=setInterval(()=>{this.performHealthCheck()},Ae.HEARTBEAT_INTERVAL_MS))}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,I.debug(`[heartbeat] Stopped for terminal ${this.terminalId}`))}async performHealthCheck(){if(this.isDisposed||!this.ipcCleanup||this.stateMachine.getState()!==et.CONNECTED)return;let e=null;try{const i=await Promise.race([this.terminalExistsOnBackend(),new Promise((s,r)=>{e=setTimeout(()=>r(new Error("Heartbeat timeout")),Ae.HEARTBEAT_TIMEOUT_MS)})]);if(e&&clearTimeout(e),this.isDisposed)return;i||(I.warn(`[heartbeat] Terminal ${this.terminalId}: PTY not found on backend, transitioning to DISCONNECTED`),this.stopHeartbeat(),this.stateMachine.transition("disconnect"))}catch(i){if(e&&clearTimeout(e),this.isDisposed)return;I.warn(`[heartbeat] Terminal ${this.terminalId}: health check failed:`,i),this.stopHeartbeat(),this.stateMachine.transition("disconnect")}}scheduleAutoReconnect(){if(this.isDisposed)return;if(this.autoReconnectAttempts>=Ae.MAX_RECONNECT_ATTEMPTS){I.warn(`[auto-reconnect] Terminal ${this.terminalId}: max reconnect attempts (${Ae.MAX_RECONNECT_ATTEMPTS}) reached, giving up`);return}this.cancelAutoReconnect();const e=Ae.BASE_RECONNECT_DELAY_MS*Math.pow(2,this.autoReconnectAttempts);this.autoReconnectAttempts++,I.info(`[auto-reconnect] Terminal ${this.terminalId}: scheduling attempt ${this.autoReconnectAttempts}/${Ae.MAX_RECONNECT_ATTEMPTS} in ${e}ms`),this.autoReconnectTimer=setTimeout(()=>{this.autoReconnectTimer=null,this.attemptAutoReconnect()},e)}cancelAutoReconnect(){this.autoReconnectTimer&&(clearTimeout(this.autoReconnectTimer),this.autoReconnectTimer=null)}async attemptAutoReconnect(){if(this.isDisposed)return;const e=this.stateMachine.getState();if(e!==et.DISCONNECTED&&e!==et.ERROR){I.debug(`[auto-reconnect] Terminal ${this.terminalId}: skipping, state is ${e}`);return}this.exitedNormally=!1,I.info(`[auto-reconnect] Terminal ${this.terminalId}: attempting reconnect (attempt ${this.autoReconnectAttempts})`);try{const i=await this.findBackendTerminal();if(this.isDisposed)return;i?(I.info(`[auto-reconnect] Terminal ${this.terminalId}: PTY exists on backend, re-establishing connection`),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnect"),this.stateMachine.transition("reconnected"),this.xterm.cols&&this.xterm.rows&&this.resize(this.xterm.cols,this.xterm.rows),i.isExecuting===!1&&this.hideCursorOnExit(),this.callbacks.onReady?.(),I.info(`[auto-reconnect] Terminal ${this.terminalId}: reconnected successfully`)):(I.info(`[auto-reconnect] Terminal ${this.terminalId}: PTY not found, creating new PTY`),await this.reconnect(),I.info(`[auto-reconnect] Terminal ${this.terminalId}: new PTY created successfully`))}catch(i){I.error(`[auto-reconnect] Terminal ${this.terminalId}: attempt ${this.autoReconnectAttempts} failed:`,i),this.scheduleAutoReconnect()}}handleError(e){I.error(`Terminal ${this.terminalId} error:`,e),this.callbacks.onError?.(e),this.isDisposed||this.xterm.writeln(`\r
|
|
143
143
|
\x1B[31m${Fs.terminal_adapter_errorLine_label({message:e.message})}\x1B[0m\r
|
|
144
|
-
`)}handleLinkClick(e){try{if(qh(e)||this.workspaceId===Gh){I.debug("Opening terminal link in external browser",{uri:e,workspaceId:this.workspaceId}),Ns("shell:openExternal",{url:e});return}Bn(async()=>{const{resolveBrowserLinkForOpen:i}=await import("./
|
|
144
|
+
`)}handleLinkClick(e){try{if(qh(e)||this.workspaceId===Gh){I.debug("Opening terminal link in external browser",{uri:e,workspaceId:this.workspaceId}),Ns("shell:openExternal",{url:e});return}Bn(async()=>{const{resolveBrowserLinkForOpen:i}=await import("./B4qnea7H.js").then(s=>s.b);return{resolveBrowserLinkForOpen:i}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]),import.meta.url).then(({resolveBrowserLinkForOpen:i})=>i(e)).catch(()=>({url:e})).then(i=>{Bn(async()=>{const{getPanelLayoutManager:s}=await import("./vj4vOyOm.js").then(r=>r.p);return{getPanelLayoutManager:s}},__vite__mapDeps([31,21,22,5,23,24,3,8,4,25,15,2,32,33]),import.meta.url).then(({getPanelLayoutManager:s})=>{s(this.workspaceId).openBrowserPanel(i.url,void 0,void 0,i.requestedUrl),I.debug("Opened URL in browser panel",{uri:e,resolvedUrl:i.url,workspaceId:this.workspaceId})}).catch(s=>{I.warn("Failed to open URL in browser panel, falling back to external browser",{uri:e,error:s}),Ns("shell:openExternal",{url:i.url})})})}catch(i){I.warn("Failed to handle link click",{uri:e,error:i}),Ns("shell:openExternal",{url:e})}}async reconnect(){if(this.isDisposed)throw new Error("Cannot reconnect disposed terminal");if(!this.stateMachine.canTransition("reconnect"))throw new Error(`Cannot reconnect in state ${this.stateMachine.getState()}`);this.exitedNormally=!1,this.stateMachine.transition("reconnect");try{const e=this.xterm.cols,i=this.xterm.rows,s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_reconnectFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(e){throw this.stateMachine.reportError(e),e}}detach(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null),this.stopHeartbeat(),this.cancelAutoReconnect(),this.cancelReattachFit(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null);const e=this.xterm.element;e&&e.parentNode&&e.parentNode.removeChild(e),this.themeManager.setContainer(null),this.container=null}dispose(e={}){if(!(this.isDisposed||this.stateMachine.isDisposed())){if(this.isDisposed=!0,this.cancelAutoReconnect(),this.stopHeartbeat(),this.cancelReattachFit(),this.stateMachine.transition("dispose"),this.saveBuffer().catch(()=>{}),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.bufferSaveTimer&&(clearInterval(this.bufferSaveTimer),this.bufferSaveTimer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.dataDisposable){try{this.dataDisposable.dispose()}catch(i){I.error("Error disposing data handler:",i)}this.dataDisposable=null}if(this.resizeDisposable){try{this.resizeDisposable.dispose()}catch(i){I.error("Error disposing resize handler:",i)}this.resizeDisposable=null}if(this.selectionDisposable){try{this.selectionDisposable.dispose()}catch(i){I.error("Error disposing selection handler:",i)}this.selectionDisposable=null}if(this.ipcCleanup){try{this.ipcCleanup()}catch(i){I.error("Error cleaning up IPC handlers:",i)}this.ipcCleanup=null}if(this.themeCleanup){try{this.themeCleanup()}catch(i){I.error("Error cleaning up theme listener:",i)}this.themeCleanup=null}this.eventListeners.forEach(i=>{try{i()}catch(s){I.error("Error cleaning up event listener:",s)}}),this.eventListeners=[],e.killPty!==!1&&this.terminals.kill(this.terminalId,this.workspaceId).catch(i=>{I.error("Error killing PTY connection:",i)});try{this.searchAddon?.dispose&&this.searchAddon.dispose(),this.webLinksAddon?.dispose&&this.webLinksAddon.dispose(),this.disposeWebglAddon(),this.fitAddon?.dispose&&this.fitAddon.dispose()}catch(i){I.error("Error disposing addons:",i)}try{this.themeManager.dispose()}catch(i){I.error("Error disposing theme manager:",i)}try{this.stateMachine.dispose()}catch(i){I.error("Error disposing state machine:",i)}Kf(this.xterm,i=>{I.error("Error disposing xterm:",i)})}}};P(Ae,"MAX_RECONNECT_ATTEMPTS",5),P(Ae,"BASE_RECONNECT_DELAY_MS",1e3),P(Ae,"HEARTBEAT_INTERVAL_MS",3e4),P(Ae,"HEARTBEAT_TIMEOUT_MS",1e4),P(Ae,"MAX_WEBGL_RECOVERY_ATTEMPTS",3);let dn=Ae;const le=new ji("TerminalManager");class jf{constructor(){P(this,"terminals",new Map)}saveTerminalMetadata(e,i,s){try{_t.dispatch(Yh(i,e,s,new Date().toISOString())),le.debug(`[RendererTerminalManager] Saved terminal metadata for ${e}`)}catch(r){le.error("[RendererTerminalManager] Failed to save terminal metadata:",r)}}loadTerminalMetadata(e){try{return Jh.select(_t.state,e).map(i=>({terminalId:i.id,workspaceId:i.workspaceId??e,createdAt:i.createdAt??"",title:i.customName||Qh(i.name)}))}catch(i){le.error("[RendererTerminalManager] Failed to load terminal metadata:",i)}return[]}removeTerminalMetadata(e,i){try{_t.dispatch(Xh(i,e)),le.debug(`[RendererTerminalManager] Removed terminal metadata for ${e}`)}catch(s){le.error("[RendererTerminalManager] Failed to remove terminal metadata:",s)}}hasTerminal(e){return this.terminals.has(e)}async getOrCreateTerminal(e,i,s,r,n=!1){let o=this.terminals.get(e);if(n&&o&&(le.info(`[RendererTerminalManager] Force creating new terminal, disposing existing: ${e}`),this.disposeTerminal(e),o=void 0),o)if(o.workspaceId!==i)le.warn(`[RendererTerminalManager] Terminal ${e} has mismatched workspaceId (has: ${o.workspaceId}, requested: ${i}). Disposing and recreating.`),this.disposeTerminal(e),o=void 0;else return le.info(`[RendererTerminalManager] Reattaching to existing terminal: ${e} (was attached: ${o.isAttached})`),o.container=s,o.isAttached=!0,await o.adapter.reattach(s),r&&(o.adapter.updateCallbacks(r),r.onReady?.()),le.info(`[RendererTerminalManager] Successfully reattached terminal: ${e}`),o.adapter;le.info(`[RendererTerminalManager] Creating new terminal: ${e}`);const a=new dn({workspaceId:i,terminalId:e,container:s,...r});return o={adapter:a,terminalId:e,workspaceId:i,isAttached:!0,container:s},this.terminals.set(e,o),this.saveTerminalMetadata(e,i),await a.initialize(n),a}isAttachedTo(e,i){const s=this.terminals.get(e);return!!s&&s.isAttached&&s.container===i}detachTerminal(e,i){const s=this.terminals.get(e);if(s){if(i&&s.container!==i){le.info(`[RendererTerminalManager] Ignoring detach from a stale surface: ${e}`);return}le.info(`[RendererTerminalManager] Detaching terminal: ${e}`),s.isAttached=!1,s.adapter.detach(),s.container=null}}disposeTerminal(e,i){const s=this.terminals.get(e);s?(le.info(`[RendererTerminalManager] Disposing terminal: ${e}`),s.adapter.dispose(),this.terminals.delete(e),this.removeTerminalMetadata(e,s.workspaceId)):_t.dispatch(jh(e,i))}disposeExitedTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Disposing exited terminal: ${e}`),i.adapter.dispose({killPty:!1}),this.terminals.delete(e))}clearTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Clearing terminal: ${e}`),i.adapter.clear())}getTerminalInfo(e){const i=this.terminals.get(e);return i?i.adapter.getInfo():null}async getBufferContent(e,i){const s=this.terminals.get(e);if(s?.adapter)try{const r=s.adapter.xterm;if(r?.buffer?.active){const n=r.buffer.active,o=[];for(let a=0;a<n.length;a++){const l=n.getLine(a);l&&o.push(l.translateToString(!0))}for(;o.length>0&&!o[o.length-1].trim();)o.pop();if(o.length>0)return o.join(`
|
|
145
145
|
`)}}catch(r){le.warn("[RendererTerminalManager] Failed to read live buffer, falling back:",r)}try{const n=await new Ds(i,e).restoreBuffer();if(n&&n.lines.length>0){const o=[...n.lines];for(;o.length>0&&!o[o.length-1].trim();)o.pop();return o.join(`
|
|
146
146
|
`)}}catch(r){le.error("[RendererTerminalManager] Failed to read persisted buffer:",r)}return null}disposeWorkspaceTerminals(e){const i=[];for(const[s,r]of this.terminals)r.workspaceId===e&&i.push(s);if(i.length>0){le.info(`[RendererTerminalManager] Disposing ${i.length} terminals for workspace ${e}`);for(const s of i)try{const r=this.terminals.get(s);r&&(r.adapter.dispose(),this.terminals.delete(s))}catch(r){le.error(`[RendererTerminalManager] Failed to dispose terminal ${s}:`,r)}}}disposeAll(){le.info(`[RendererTerminalManager] Disposing all ${this.terminals.size} terminals`);for(const[e,i]of this.terminals)try{i.adapter.dispose()}catch(s){le.error(`[RendererTerminalManager] Failed to dispose terminal ${e}:`,s)}this.terminals.clear()}}typeof window<"u"&&!window.__terminalManager&&(window.__terminalManager=new jf);const Zf=window.__terminalManager,Np=Object.freeze(Object.defineProperty({__proto__:null,terminalManager:Zf},Symbol.toStringTag,{value:"Module"}));export{hu as D,mu as L,ln as T,Kf as a,Zf as b,Np as c,Fp as d,du as o,Ut as s,Ii as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as ue,t as ne,bq as v,by as re,b as se,bo as k}from"./41c-5lbJ.js";import{Iv as pe}from"./BuDJvkTk.js";import{bI as de,bs as ie,a7 as le,ay as X,aD as r,W as f,bn as oe,c9 as L,aA as h,a5 as U,bA as G,b_ as T,aB as P,bl as q,bO as j,bS as S,ca as fe,bH as ge,bV as _e,aC as B}from"./DYhIMPy1.js";import{i as A}from"./ClgmQqA9.js";import{c as me,e as ve,f as te,g as ce,s as M}from"./BBCbq-hE.js";import{u as he,I as z,e as $,B as J}from"./-o555Jq8.js";import{e as Ce}from"./CEufllny.js";import{t as we}from"./QLXfiC8k.js";import{F as ke}from"./AOUBMpYk.js";import{M as be}from"./DQ8vH0VY.js";import{a as xe}from"./DGb_dMRY.js";import{aM as Te}from"./DUor0DI_.js";import{f as Se}from"./nLyQInj7.js";import"./De70D2Lx.js";function dt(t,a,c){if(t.metaKey||t.ctrlKey||!(t.currentTarget instanceof Element)||!t.currentTarget.closest("[data-assistant-panels]"))return!1;const e=pe.state.agentSessions.byAgentId[c]?.workspaceId??a,i=t.currentTarget.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId;return ue(async()=>{const{showAssistantContent:o}=await import("./D542lbvk.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]),import.meta.url).then(({showAssistantContent:o})=>o(`intent://local/${e}/agent/${c}`,{layoutId:i})),!0}const ye=Symbol("panel-context");function ft(t){de(ye,{panelId:t})}function Ee(t){if(t?.target)return t.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}function gt(t,a){const c=a?.panelId??Ee(t),e=t.metaKey||t.ctrlKey;return{sourcePanelId:c,openInAdjacentPanel:e}}var Ie=P('<span class="text-subtle animate-pulse"> </span>'),Me=P('<span class="text-green-600 dark:text-green-400 flex items-center gap-0.5"><span class="opacity-70">+</span> <span> </span></span>'),Ae=P('<span class="text-red-600 dark:text-red-400 flex items-center gap-0.5"><span class="opacity-70">-</span> <span> </span></span>'),Le=P('<span class="text-subtle"> </span>'),Ne=P("<!> <!> <!>",1),Pe=P("<div><!></div>");function Re(t,a){if(new.target)return ne({component:Re,...t});ie(a,!0);let c=v(a,"additions",7,0),e=v(a,"deletions",7,0),i=v(a,"showZero",7,!1),o=v(a,"size",7,"sm"),_=v(a,"inline",7,!0),u=v(a,"loading",7,!1),d=v(a,"class",7,""),y=L(()=>i()||c()>0||e()>0||u()),R=L(()=>{switch(o()){case"xs":return"text-ui gap-1";case"sm":return"text-xs gap-1.5";case"md":return"text-sm gap-2";case"lg":return"text-base gap-2.5";default:return"text-xs gap-1.5"}});function H(n){return he(n,{notation:"compact"})}var F={get additions(){return c()},set additions(n=0){c(n),h()},get deletions(){return e()},set deletions(n=0){e(n),h()},get showZero(){return i()},set showZero(n=!1){i(n),h()},get size(){return o()},set size(n="sm"){o(n),h()},get inline(){return _()},set inline(n=!0){_(n),h()},get loading(){return u()},set loading(n=!1){u(n),h()},get class(){return d()},set class(n=""){d(n),h()},$set:re,$on:(n,w)=>se(a,n,w)},C=le(),D=X(C);{var p=n=>{var w=Pe(),K=U(w);{var E=g=>{var m=Ie(),N=q(m,!0);T(O=>j(N,O),[()=>k.shared_lineChangeStats_calculating_label()]),f(g,m)},V=g=>{var m=Ne(),N=X(m);{var O=s=>{var l=Me(),b=S(U(l),2),I=q(b,!0);G(l),T(Y=>j(I,Y),[()=>H(c())]),f(s,l)};A(N,s=>{(c()>0||i())&&s(O)})}var Z=S(N,2);{var W=s=>{var l=Ae(),b=S(U(l),2),I=q(b,!0);G(l),T(Y=>j(I,Y),[()=>H(e())]),f(s,l)};A(Z,s=>{(e()>0||i())&&s(W)})}var x=S(Z,2);{var Q=s=>{var l=Le(),b=q(l,!0);T(I=>j(b,I),[()=>k.shared_lineChangeStats_noChanges_label()]),f(s,l)};A(x,s=>{!c()&&!e()&&!i()&&s(Q)})}f(g,m)};A(K,g=>{u()?g(E):g(V,-1)})}G(w),T(g=>te(w,1,g),[()=>me(ve("whitespace-nowrap",_()?"inline-flex":"flex","items-center font-mono",r(R),d()))]),f(n,w)};A(D,n=>{r(y)&&n(p)})}return f(t,C),oe(F)}const De=new Map([["STRONG","strong"],["B","strong"],["EM","em"],["I","em"],["CODE","code"]]),Oe=new Set(["AUDIO","BUTTON","CANVAS","DETAILS","EMBED","HR","IFRAME","IMG","INPUT","OBJECT","PICTURE","PRE","SELECT","SVG","TABLE","TEXTAREA","VIDEO"]),ze=new Set(["ARTICLE","BLOCKQUOTE","DD","DIV","DT","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","P","SECTION"]);function Be(t){return typeof Intl.Segmenter=="function"?Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t),({segment:a})=>a):Array.from(t)}function ee(t,a,c,e){for(const i of Be(a.replace(/\s+/gu," "))){const o=i===" ";if(!(o&&(!e.hasText||e.lastWasSpace))){if(e.visibleLength>=c){if(o)return;e.truncated||t.append(document.createTextNode("…")),e.truncated=!0;return}t.append(document.createTextNode(i)),e.visibleLength+=1,e.hasText=!0,e.lastWasSpace=o}}}function ae(t,a,c,e){if(e.truncated)return;if(t.nodeType===Node.TEXT_NODE){ee(a,t.textContent??"",c,e);return}if(!(t instanceof HTMLElement)||Oe.has(t.tagName))return;if(t.tagName==="BR"){ee(a," ",c,e);return}const i=De.get(t.tagName);if(i){const o=document.createElement(i);a.append(o);for(const _ of t.childNodes)ae(_,o,c,e);o.textContent||o.remove();return}ze.has(t.tagName)&&e.hasText&&ee(a," ",c,e);for(const o of t.childNodes)ae(o,a,c,e)}async function He(t,a=80){const c=await Te(t,{allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!1,processPrimitives:!1,taskBlockRenderMode:"content"}),e=document.createElement("template");e.innerHTML=c;const i=document.createElement("span"),o={visibleLength:0,hasText:!1,lastWasSpace:!1,truncated:!1},_=Math.max(0,Math.floor(a));for(const u of e.content.childNodes)ae(u,i,_,o);return i.innerHTML.trim()}async function Fe(t){const a=await He(t,Number.MAX_SAFE_INTEGER),c=document.createElement("span");return c.innerHTML=a,(c.textContent??"").replace(/<\/?[A-Za-z][^>]*>/gu,"").replace(/\s+/gu," ").trim()}var Ve=P('<span data-testid="agent-preview-tool-icon"><!></span>'),Ze=P('<span><!> <span class="min-w-0 flex-1 truncate text-inherit opacity-[inherit]" data-testid="agent-preview-tool-text"> </span></span>');function qe(t,a){if(new.target)return ne({component:qe,...t});ie(a,!0);const c=new Set(["figma","sentry","playwright","github","linear","slack","context7"]);let e=v(a,"toolUse",7),i=v(a,"animate",7,!1),o=v(a,"iconSize",7,12),_=v(a,"showIcon",7,!0),u=v(a,"class",7,"");const d=L(()=>xe(e().name,e().input||{})),y=L(()=>[r(d).verb,r(d).subject,r(d).path].filter(Boolean).join(" ").trim()||r(d).verb||k.chat_previewToolLabel_tool_fallback());let R=_e("");fe(()=>{const p=r(y);let n=!1;return Fe(p).then(w=>{n||ge(R,w,!0)}),()=>{n=!0}});var H={get toolUse(){return e()},set toolUse(p){e(p),h()},get animate(){return i()},set animate(p=!1){i(p),h()},get iconSize(){return o()},set iconSize(p=12){o(p),h()},get showIcon(){return _()},set showIcon(p=!0){_(p),h()},get class(){return u()},set class(p=""){u(p),h()},$set:re,$on:(p,n)=>se(a,p,n)},F=le(),C=X(F);{var D=p=>{var n=Ze(),w=U(n);{var K=g=>{var m=Ve(),N=U(m);{var O=x=>{be(x,{get iconName(){return r(d).mcpSource},get label(){return r(d).mcpSource},get size(){return o()}})},Z=L(()=>r(d).mcpSource&&c.has(r(d).mcpSource)),W=x=>{ke(x,{get icon(){return r(d).icon},class:"h-full! w-full! text-inherit opacity-[inherit]"})};A(N,x=>{r(Z)?x(O):x(W,-1)})}G(m),T(()=>{te(m,1,`agent-preview-tool-icon inline-flex shrink-0 items-center justify-center text-inherit opacity-[inherit] ${i()?"animate-pulse":""}`,"svelte-115ywqs"),ce(m,`width: ${o()??""}px; height: ${o()??""}px;`)}),f(g,m)};A(w,g=>{_()&&g(K)})}var E=S(w,2),V=q(E,!0);Ce(E,(g,m)=>we?.(g,m),()=>r(R)),G(n),T(()=>{te(n,1,`type-body inline-flex w-full min-w-0 items-center font-normal ${_()?"gap-1.5":""} ${u()??""}`,"svelte-115ywqs"),j(V,r(R))}),f(p,n)};A(C,p=>{r(d).hidden||p(D)})}return f(t,F),oe(H)}var Ue=B('<circle cx="12" cy="12" r="10" stroke-width="2" fill="none"></circle>'),Ge=B('<path d="M7 12.5L10.5 16L17 9" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path>'),Ke=B('<path d="M5 19L19 5" stroke-width="2.5" stroke-linecap="round"></path>'),We=B('<path d="M13.1372 17.7135C13.1372 18.1682 12.9566 18.6042 12.6351 18.9257C12.3136 19.2472 11.8776 19.4278 11.4229 19.4278C10.9683 19.4278 10.5322 19.2472 10.2107 18.9257C9.88925 18.6042 9.70864 18.1682 9.70864 17.7135C9.70864 17.2589 9.88925 16.8228 10.2107 16.5014C10.5322 16.1799 10.9683 15.9993 11.4229 15.9993C11.8776 15.9993 12.3136 16.1799 12.6351 16.5014C12.9566 16.8228 13.1372 17.2589 13.1372 17.7135ZM10.2109 7.07297C10.3957 6.88872 10.6201 6.7491 10.8671 6.66473C11.114 6.58037 11.377 6.55349 11.6359 6.58615C11.8948 6.61881 12.1428 6.71015 12.361 6.8532C12.5793 6.99625 12.762 7.18724 12.8953 7.4116C13.0285 7.63597 13.1088 7.8878 13.1299 8.14789C13.1511 8.40799 13.1126 8.66948 13.0174 8.91244C12.9222 9.1554 12.7728 9.37342 12.5805 9.54988C12.3883 9.72634 12.1583 9.85659 11.9081 9.93068C11.1212 10.1604 10.1372 10.901 10.1372 12.1421V12.5707C10.1372 12.9117 10.2727 13.2387 10.5138 13.4798C10.7549 13.7209 11.0819 13.8564 11.4229 13.8564C11.7639 13.8564 12.0909 13.7209 12.3321 13.4798C12.5732 13.2387 12.7086 12.9117 12.7086 12.5707V12.3735C13.3281 12.1785 13.8952 11.8451 14.3669 11.3988C14.8387 10.9524 15.2029 10.4046 15.4319 9.79683C15.6609 9.18906 15.7487 8.53719 15.6888 7.89048C15.6289 7.24377 15.4228 6.61913 15.0861 6.06376C14.7494 5.50838 14.2908 5.03681 13.7451 4.68466C13.1994 4.33251 12.5808 4.10899 11.936 4.03101C11.2912 3.95302 10.6371 4.0226 10.0232 4.23449C9.40925 4.44638 8.8515 4.79503 8.39207 5.25411C8.26933 5.37277 8.17145 5.51469 8.10414 5.67158C8.03683 5.82848 8.00145 5.9972 8.00004 6.16792C7.99864 6.33864 8.03125 6.50792 8.09597 6.6659C8.16069 6.82388 8.25623 6.96739 8.37701 7.08805C8.49778 7.20871 8.64138 7.30411 8.79942 7.36868C8.95746 7.43326 9.12677 7.46571 9.29749 7.46414C9.4682 7.46258 9.6369 7.42703 9.79373 7.35958C9.95056 7.29212 10.0924 7.19411 10.2109 7.07125V7.07297Z" fill="white" class="origin-center"></path>'),je=B('<path d="M12 5.5V13.5" stroke="white" stroke-width="3" stroke-linecap="round"></path><circle cx="12" cy="17.5" r="1.6" fill="white" class="origin-center"></circle>',1),Xe=B('<path d="M11.6668 13.649C12.1044 13.649 12.5241 13.4751 12.8336 13.1656C13.1431 12.8562 13.3169 12.4365 13.3169 11.9988C13.3169 11.5611 13.1431 11.1414 12.8336 10.832C12.5241 10.5225 12.1044 10.3486 11.6668 10.3486C11.2291 10.3486 10.8094 10.5225 10.4999 10.832C10.1905 11.1414 10.0166 11.5611 10.0166 11.9988C10.0166 12.4365 10.1905 12.8562 10.4999 13.1656C10.8094 13.4751 11.2291 13.649 11.6668 13.649Z" fill="white" class="origin-center"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38506 12.3064C4.31566 12.1046 4.31566 11.8855 4.38506 11.6837C4.90912 10.1693 5.89241 8.85596 7.198 7.92665C8.50359 6.99734 10.0665 6.4983 11.669 6.49902C13.2716 6.49975 14.834 7.00021 16.1388 7.9307C17.4435 8.8612 18.4256 10.1754 18.9483 11.6903C19.0177 11.8921 19.0177 12.1112 18.9483 12.313C18.4245 13.8278 17.4412 15.1416 16.1355 16.0712C14.8298 17.0008 13.2666 17.5 11.6638 17.4993C10.0609 17.4986 8.49824 16.9979 7.19336 16.0671C5.88848 15.1363 4.90641 13.8217 4.38396 12.3064H4.38506ZM14.9681 11.9984C14.9681 12.8737 14.6204 13.7131 14.0015 14.3321C13.3825 14.951 12.5431 15.2987 11.6678 15.2987C10.7925 15.2987 9.95304 14.951 9.33411 14.3321C8.71517 13.7131 8.36746 12.8737 8.36746 11.9984C8.36746 11.1231 8.71517 10.2836 9.33411 9.66468C9.95304 9.04575 10.7925 8.69803 11.6678 8.69803C12.5431 8.69803 13.3825 9.04575 14.0015 9.66468C14.6204 10.2836 14.9681 11.1231 14.9681 11.9984Z" fill="white" class="origin-center"></path>',1),Je=B('<svg viewBox="0 0 24 24" fill="none"><defs><clipPath><rect x="48%" y="0" width="100%" height="100%"></rect></clipPath></defs><circle cx="50%" cy="50%" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none origin-center"></circle><circle cx="50%" cy="50%" r="45%" stroke-width="2.5" fill="none" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none"></circle><!></svg>');function Qe(t,a){if(new.target)return ne({component:Qe,...t});ie(a,!0);const c=new Set(["not_started","waiting","discussion_needed","blocked","in_progress","review_required","complete","cancelled"]);let e=v(a,"status",7),i=v(a,"size",7,16),o=v(a,"onclick",7);const _=Math.random().toString(36).substring(2,9);let u=L(()=>e()==="todo"?"not_started":e()==="in-progress"?"in_progress":e()==="done"?"complete":typeof e()=="string"&&c.has(e())?e():"unknown");const d={not_started:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},waiting:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},discussion_needed:{stroke:"#f59e0b",fill:"#f59e0b",innerCircleRPercentage:100},blocked:{stroke:"#ef4444",fill:"#ef4444",innerCircleRPercentage:100},in_progress:{stroke:"#00BCFF",fill:"#00BCFF",innerCircleRPercentage:55},review_required:{stroke:"#3b82f6",fill:"#3b82f6",innerCircleRPercentage:100},complete:{stroke:"#22c55e",fill:"#00BD7D",innerCircleRPercentage:100},cancelled:{stroke:"#99999966",fill:"#99999966",innerCircleRPercentage:0},unknown:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0}};let y=L(()=>d[r(u)]||d.not_started);const R={not_started:k.tiptap_taskStatus_notStarted_label,waiting:k.tiptap_taskStatus_waiting_label,discussion_needed:k.tiptap_taskStatus_discussionNeeded_label,blocked:k.tiptap_taskStatus_blocked_label,in_progress:k.tiptap_taskStatus_inProgress_label,review_required:k.tiptap_taskStatus_reviewRequired_label,complete:k.tiptap_taskStatus_complete_label,cancelled:k.tiptap_taskStatus_cancelled_label,unknown:k.tiptap_taskStatus_unknown_label};let H=L(()=>(R[r(u)]??k.tiptap_taskStatus_unknown_label)());var F={get status(){return e()},set status(C){e(C),h()},get size(){return i()},set size(C=16){i(C),h()},get onclick(){return o()},set onclick(C){o(C),h()},$set:re,$on:(C,D)=>se(a,C,D)};{let C=L(()=>k.tiptap_taskStatus_status_tooltip({status:r(H)}));Se(t,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"task-status-icon shrink-0 cursor-pointer bg-transparent border-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-primary-ink rounded-full",get style(){return`width: ${i()??""}px; height: ${i()??""}px;`},get onclick(){return o()},get title(){return r(C)},children:(D,p)=>{var n=Je(),w=U(n),K=q(w),E=S(w),V=S(E),g=S(V);{var m=s=>{},N=s=>{var l=Ue();T(()=>M(l,"stroke",r(y).stroke)),f(s,l)},O=s=>{var l=Ge();z(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},Z=s=>{var l=Ke();T(()=>M(l,"stroke",r(y).stroke)),z(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},W=s=>{var l=We();z(3,l,()=>J,()=>({tier:"slow"})),f(s,l)},x=s=>{var l=je(),b=X(l),I=S(b);z(3,b,()=>$,()=>({tier:"slow"})),z(3,I,()=>J,()=>({tier:"slow"})),f(s,l)},Q=s=>{var l=Xe(),b=X(l),I=S(b);z(3,b,()=>J,()=>({tier:"slow"})),z(3,I,()=>J,()=>({tier:"slow"})),f(s,l)};A(g,s=>{r(u)==="not_started"||r(u)==="waiting"?s(m):r(u)==="in_progress"?s(N,1):r(u)==="complete"?s(O,2):r(u)==="cancelled"?s(Z,3):r(u)==="discussion_needed"?s(W,4):r(u)==="blocked"?s(x,5):r(u)==="review_required"&&s(Q,6)})}G(n),T(()=>{M(n,"width",i()),M(n,"height",i()),ce(n,`width: ${i()??""}px; height: ${i()??""}px;`),M(K,"id",`half-clip-${_??""}`),M(E,"r",`${r(y).innerCircleRPercentage*.5}%`),M(E,"fill",r(y).fill),M(E,"clip-path",r(u)==="in_progress"?`url(#half-clip-${_})`:"none"),M(V,"stroke",r(y).stroke)}),f(D,n)},$$slots:{default:!0}})}return oe(F)}export{qe as A,Re as L,Qe as T,Ee as a,He as b,gt as g,dt as o,Fe as r,ft as s};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CDhg3msv.js","/app/immutable/chunks/BUAFIktJ.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/iYz7qSVO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D8Uhwh7R.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CnTu6sc6.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/DV_c4cZz.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/B1s_9zgm.js","/app/immutable/chunks/BXyNrc2B.js","/app/immutable/chunks/COO6ldt4.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/D_Kq1QRo.js","/app/immutable/chunks/BDDVFcm3.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CacD4jQL.js","/app/immutable/chunks/CGtiJZ6Q.js","/app/immutable/chunks/IH85nSha.js","/app/immutable/chunks/Bvd0DfwC.js","/app/immutable/chunks/hwFphMxp.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/vJ7Dp7-k.js","/app/immutable/chunks/BgOj6lPu.js","/app/immutable/chunks/CLi8c-Jc.js","/app/immutable/chunks/DCOf4rfq.js","/app/immutable/chunks/CRrFC3B8.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/CfdX4Lfl.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/D1PZlLC_.js","/app/immutable/chunks/Bz6dDdb9.js","/app/immutable/chunks/CmSGn2AH.js","/app/immutable/chunks/EbPgJF03.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as ue,t as ne,bq as v,by as re,b as se,bo as k}from"./BUAFIktJ.js";import{Iv as pe}from"./iYz7qSVO.js";import{bI as de,bs as ie,a7 as le,ay as X,aD as r,W as f,bn as oe,c9 as L,aA as h,a5 as U,bA as G,b_ as T,aB as P,bl as q,bO as j,bS as S,ca as fe,bH as ge,bV as _e,aC as B}from"./DYhIMPy1.js";import{i as A}from"./Bvd0DfwC.js";import{c as me,e as ve,f as te,g as ce,s as M}from"./COO6ldt4.js";import{u as he,I as z,e as $,B as J}from"./DCOf4rfq.js";import{e as Ce}from"./vJ7Dp7-k.js";import{t as we}from"./BhzNHo5H.js";import{F as ke}from"./CfdX4Lfl.js";import{M as be}from"./C12ljpSn.js";import{a as xe}from"./D1PZlLC_.js";import{aM as Te}from"./Da7V4qRA.js";import{f as Se}from"./hwFphMxp.js";import"./B1s_9zgm.js";function dt(t,a,c){if(t.metaKey||t.ctrlKey||!(t.currentTarget instanceof Element)||!t.currentTarget.closest("[data-assistant-panels]"))return!1;const e=pe.state.agentSessions.byAgentId[c]?.workspaceId??a,i=t.currentTarget.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId;return ue(async()=>{const{showAssistantContent:o}=await import("./CDhg3msv.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]),import.meta.url).then(({showAssistantContent:o})=>o(`intent://local/${e}/agent/${c}`,{layoutId:i})),!0}const ye=Symbol("panel-context");function ft(t){de(ye,{panelId:t})}function Ee(t){if(t?.target)return t.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}function gt(t,a){const c=a?.panelId??Ee(t),e=t.metaKey||t.ctrlKey;return{sourcePanelId:c,openInAdjacentPanel:e}}var Ie=P('<span class="text-subtle animate-pulse"> </span>'),Me=P('<span class="text-green-600 dark:text-green-400 flex items-center gap-0.5"><span class="opacity-70">+</span> <span> </span></span>'),Ae=P('<span class="text-red-600 dark:text-red-400 flex items-center gap-0.5"><span class="opacity-70">-</span> <span> </span></span>'),Le=P('<span class="text-subtle"> </span>'),Ne=P("<!> <!> <!>",1),Pe=P("<div><!></div>");function Re(t,a){if(new.target)return ne({component:Re,...t});ie(a,!0);let c=v(a,"additions",7,0),e=v(a,"deletions",7,0),i=v(a,"showZero",7,!1),o=v(a,"size",7,"sm"),_=v(a,"inline",7,!0),u=v(a,"loading",7,!1),d=v(a,"class",7,""),y=L(()=>i()||c()>0||e()>0||u()),R=L(()=>{switch(o()){case"xs":return"text-ui gap-1";case"sm":return"text-xs gap-1.5";case"md":return"text-sm gap-2";case"lg":return"text-base gap-2.5";default:return"text-xs gap-1.5"}});function H(n){return he(n,{notation:"compact"})}var F={get additions(){return c()},set additions(n=0){c(n),h()},get deletions(){return e()},set deletions(n=0){e(n),h()},get showZero(){return i()},set showZero(n=!1){i(n),h()},get size(){return o()},set size(n="sm"){o(n),h()},get inline(){return _()},set inline(n=!0){_(n),h()},get loading(){return u()},set loading(n=!1){u(n),h()},get class(){return d()},set class(n=""){d(n),h()},$set:re,$on:(n,w)=>se(a,n,w)},C=le(),D=X(C);{var p=n=>{var w=Pe(),K=U(w);{var E=g=>{var m=Ie(),N=q(m,!0);T(O=>j(N,O),[()=>k.shared_lineChangeStats_calculating_label()]),f(g,m)},V=g=>{var m=Ne(),N=X(m);{var O=s=>{var l=Me(),b=S(U(l),2),I=q(b,!0);G(l),T(Y=>j(I,Y),[()=>H(c())]),f(s,l)};A(N,s=>{(c()>0||i())&&s(O)})}var Z=S(N,2);{var W=s=>{var l=Ae(),b=S(U(l),2),I=q(b,!0);G(l),T(Y=>j(I,Y),[()=>H(e())]),f(s,l)};A(Z,s=>{(e()>0||i())&&s(W)})}var x=S(Z,2);{var Q=s=>{var l=Le(),b=q(l,!0);T(I=>j(b,I),[()=>k.shared_lineChangeStats_noChanges_label()]),f(s,l)};A(x,s=>{!c()&&!e()&&!i()&&s(Q)})}f(g,m)};A(K,g=>{u()?g(E):g(V,-1)})}G(w),T(g=>te(w,1,g),[()=>me(ve("whitespace-nowrap",_()?"inline-flex":"flex","items-center font-mono",r(R),d()))]),f(n,w)};A(D,n=>{r(y)&&n(p)})}return f(t,C),oe(F)}const De=new Map([["STRONG","strong"],["B","strong"],["EM","em"],["I","em"],["CODE","code"]]),Oe=new Set(["AUDIO","BUTTON","CANVAS","DETAILS","EMBED","HR","IFRAME","IMG","INPUT","OBJECT","PICTURE","PRE","SELECT","SVG","TABLE","TEXTAREA","VIDEO"]),ze=new Set(["ARTICLE","BLOCKQUOTE","DD","DIV","DT","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","P","SECTION"]);function Be(t){return typeof Intl.Segmenter=="function"?Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t),({segment:a})=>a):Array.from(t)}function ee(t,a,c,e){for(const i of Be(a.replace(/\s+/gu," "))){const o=i===" ";if(!(o&&(!e.hasText||e.lastWasSpace))){if(e.visibleLength>=c){if(o)return;e.truncated||t.append(document.createTextNode("…")),e.truncated=!0;return}t.append(document.createTextNode(i)),e.visibleLength+=1,e.hasText=!0,e.lastWasSpace=o}}}function ae(t,a,c,e){if(e.truncated)return;if(t.nodeType===Node.TEXT_NODE){ee(a,t.textContent??"",c,e);return}if(!(t instanceof HTMLElement)||Oe.has(t.tagName))return;if(t.tagName==="BR"){ee(a," ",c,e);return}const i=De.get(t.tagName);if(i){const o=document.createElement(i);a.append(o);for(const _ of t.childNodes)ae(_,o,c,e);o.textContent||o.remove();return}ze.has(t.tagName)&&e.hasText&&ee(a," ",c,e);for(const o of t.childNodes)ae(o,a,c,e)}async function He(t,a=80){const c=await Te(t,{allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!1,processPrimitives:!1,taskBlockRenderMode:"content"}),e=document.createElement("template");e.innerHTML=c;const i=document.createElement("span"),o={visibleLength:0,hasText:!1,lastWasSpace:!1,truncated:!1},_=Math.max(0,Math.floor(a));for(const u of e.content.childNodes)ae(u,i,_,o);return i.innerHTML.trim()}async function Fe(t){const a=await He(t,Number.MAX_SAFE_INTEGER),c=document.createElement("span");return c.innerHTML=a,(c.textContent??"").replace(/<\/?[A-Za-z][^>]*>/gu,"").replace(/\s+/gu," ").trim()}var Ve=P('<span data-testid="agent-preview-tool-icon"><!></span>'),Ze=P('<span><!> <span class="min-w-0 flex-1 truncate text-inherit opacity-[inherit]" data-testid="agent-preview-tool-text"> </span></span>');function qe(t,a){if(new.target)return ne({component:qe,...t});ie(a,!0);const c=new Set(["figma","sentry","playwright","github","linear","slack","context7"]);let e=v(a,"toolUse",7),i=v(a,"animate",7,!1),o=v(a,"iconSize",7,12),_=v(a,"showIcon",7,!0),u=v(a,"class",7,"");const d=L(()=>xe(e().name,e().input||{})),y=L(()=>[r(d).verb,r(d).subject,r(d).path].filter(Boolean).join(" ").trim()||r(d).verb||k.chat_previewToolLabel_tool_fallback());let R=_e("");fe(()=>{const p=r(y);let n=!1;return Fe(p).then(w=>{n||ge(R,w,!0)}),()=>{n=!0}});var H={get toolUse(){return e()},set toolUse(p){e(p),h()},get animate(){return i()},set animate(p=!1){i(p),h()},get iconSize(){return o()},set iconSize(p=12){o(p),h()},get showIcon(){return _()},set showIcon(p=!0){_(p),h()},get class(){return u()},set class(p=""){u(p),h()},$set:re,$on:(p,n)=>se(a,p,n)},F=le(),C=X(F);{var D=p=>{var n=Ze(),w=U(n);{var K=g=>{var m=Ve(),N=U(m);{var O=x=>{be(x,{get iconName(){return r(d).mcpSource},get label(){return r(d).mcpSource},get size(){return o()}})},Z=L(()=>r(d).mcpSource&&c.has(r(d).mcpSource)),W=x=>{ke(x,{get icon(){return r(d).icon},class:"h-full! w-full! text-inherit opacity-[inherit]"})};A(N,x=>{r(Z)?x(O):x(W,-1)})}G(m),T(()=>{te(m,1,`agent-preview-tool-icon inline-flex shrink-0 items-center justify-center text-inherit opacity-[inherit] ${i()?"animate-pulse":""}`,"svelte-115ywqs"),ce(m,`width: ${o()??""}px; height: ${o()??""}px;`)}),f(g,m)};A(w,g=>{_()&&g(K)})}var E=S(w,2),V=q(E,!0);Ce(E,(g,m)=>we?.(g,m),()=>r(R)),G(n),T(()=>{te(n,1,`type-body inline-flex w-full min-w-0 items-center font-normal ${_()?"gap-1.5":""} ${u()??""}`,"svelte-115ywqs"),j(V,r(R))}),f(p,n)};A(C,p=>{r(d).hidden||p(D)})}return f(t,F),oe(H)}var Ue=B('<circle cx="12" cy="12" r="10" stroke-width="2" fill="none"></circle>'),Ge=B('<path d="M7 12.5L10.5 16L17 9" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path>'),Ke=B('<path d="M5 19L19 5" stroke-width="2.5" stroke-linecap="round"></path>'),We=B('<path d="M13.1372 17.7135C13.1372 18.1682 12.9566 18.6042 12.6351 18.9257C12.3136 19.2472 11.8776 19.4278 11.4229 19.4278C10.9683 19.4278 10.5322 19.2472 10.2107 18.9257C9.88925 18.6042 9.70864 18.1682 9.70864 17.7135C9.70864 17.2589 9.88925 16.8228 10.2107 16.5014C10.5322 16.1799 10.9683 15.9993 11.4229 15.9993C11.8776 15.9993 12.3136 16.1799 12.6351 16.5014C12.9566 16.8228 13.1372 17.2589 13.1372 17.7135ZM10.2109 7.07297C10.3957 6.88872 10.6201 6.7491 10.8671 6.66473C11.114 6.58037 11.377 6.55349 11.6359 6.58615C11.8948 6.61881 12.1428 6.71015 12.361 6.8532C12.5793 6.99625 12.762 7.18724 12.8953 7.4116C13.0285 7.63597 13.1088 7.8878 13.1299 8.14789C13.1511 8.40799 13.1126 8.66948 13.0174 8.91244C12.9222 9.1554 12.7728 9.37342 12.5805 9.54988C12.3883 9.72634 12.1583 9.85659 11.9081 9.93068C11.1212 10.1604 10.1372 10.901 10.1372 12.1421V12.5707C10.1372 12.9117 10.2727 13.2387 10.5138 13.4798C10.7549 13.7209 11.0819 13.8564 11.4229 13.8564C11.7639 13.8564 12.0909 13.7209 12.3321 13.4798C12.5732 13.2387 12.7086 12.9117 12.7086 12.5707V12.3735C13.3281 12.1785 13.8952 11.8451 14.3669 11.3988C14.8387 10.9524 15.2029 10.4046 15.4319 9.79683C15.6609 9.18906 15.7487 8.53719 15.6888 7.89048C15.6289 7.24377 15.4228 6.61913 15.0861 6.06376C14.7494 5.50838 14.2908 5.03681 13.7451 4.68466C13.1994 4.33251 12.5808 4.10899 11.936 4.03101C11.2912 3.95302 10.6371 4.0226 10.0232 4.23449C9.40925 4.44638 8.8515 4.79503 8.39207 5.25411C8.26933 5.37277 8.17145 5.51469 8.10414 5.67158C8.03683 5.82848 8.00145 5.9972 8.00004 6.16792C7.99864 6.33864 8.03125 6.50792 8.09597 6.6659C8.16069 6.82388 8.25623 6.96739 8.37701 7.08805C8.49778 7.20871 8.64138 7.30411 8.79942 7.36868C8.95746 7.43326 9.12677 7.46571 9.29749 7.46414C9.4682 7.46258 9.6369 7.42703 9.79373 7.35958C9.95056 7.29212 10.0924 7.19411 10.2109 7.07125V7.07297Z" fill="white" class="origin-center"></path>'),je=B('<path d="M12 5.5V13.5" stroke="white" stroke-width="3" stroke-linecap="round"></path><circle cx="12" cy="17.5" r="1.6" fill="white" class="origin-center"></circle>',1),Xe=B('<path d="M11.6668 13.649C12.1044 13.649 12.5241 13.4751 12.8336 13.1656C13.1431 12.8562 13.3169 12.4365 13.3169 11.9988C13.3169 11.5611 13.1431 11.1414 12.8336 10.832C12.5241 10.5225 12.1044 10.3486 11.6668 10.3486C11.2291 10.3486 10.8094 10.5225 10.4999 10.832C10.1905 11.1414 10.0166 11.5611 10.0166 11.9988C10.0166 12.4365 10.1905 12.8562 10.4999 13.1656C10.8094 13.4751 11.2291 13.649 11.6668 13.649Z" fill="white" class="origin-center"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38506 12.3064C4.31566 12.1046 4.31566 11.8855 4.38506 11.6837C4.90912 10.1693 5.89241 8.85596 7.198 7.92665C8.50359 6.99734 10.0665 6.4983 11.669 6.49902C13.2716 6.49975 14.834 7.00021 16.1388 7.9307C17.4435 8.8612 18.4256 10.1754 18.9483 11.6903C19.0177 11.8921 19.0177 12.1112 18.9483 12.313C18.4245 13.8278 17.4412 15.1416 16.1355 16.0712C14.8298 17.0008 13.2666 17.5 11.6638 17.4993C10.0609 17.4986 8.49824 16.9979 7.19336 16.0671C5.88848 15.1363 4.90641 13.8217 4.38396 12.3064H4.38506ZM14.9681 11.9984C14.9681 12.8737 14.6204 13.7131 14.0015 14.3321C13.3825 14.951 12.5431 15.2987 11.6678 15.2987C10.7925 15.2987 9.95304 14.951 9.33411 14.3321C8.71517 13.7131 8.36746 12.8737 8.36746 11.9984C8.36746 11.1231 8.71517 10.2836 9.33411 9.66468C9.95304 9.04575 10.7925 8.69803 11.6678 8.69803C12.5431 8.69803 13.3825 9.04575 14.0015 9.66468C14.6204 10.2836 14.9681 11.1231 14.9681 11.9984Z" fill="white" class="origin-center"></path>',1),Je=B('<svg viewBox="0 0 24 24" fill="none"><defs><clipPath><rect x="48%" y="0" width="100%" height="100%"></rect></clipPath></defs><circle cx="50%" cy="50%" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none origin-center"></circle><circle cx="50%" cy="50%" r="45%" stroke-width="2.5" fill="none" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none"></circle><!></svg>');function Qe(t,a){if(new.target)return ne({component:Qe,...t});ie(a,!0);const c=new Set(["not_started","waiting","discussion_needed","blocked","in_progress","review_required","complete","cancelled"]);let e=v(a,"status",7),i=v(a,"size",7,16),o=v(a,"onclick",7);const _=Math.random().toString(36).substring(2,9);let u=L(()=>e()==="todo"?"not_started":e()==="in-progress"?"in_progress":e()==="done"?"complete":typeof e()=="string"&&c.has(e())?e():"unknown");const d={not_started:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},waiting:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},discussion_needed:{stroke:"#f59e0b",fill:"#f59e0b",innerCircleRPercentage:100},blocked:{stroke:"#ef4444",fill:"#ef4444",innerCircleRPercentage:100},in_progress:{stroke:"#00BCFF",fill:"#00BCFF",innerCircleRPercentage:55},review_required:{stroke:"#3b82f6",fill:"#3b82f6",innerCircleRPercentage:100},complete:{stroke:"#22c55e",fill:"#00BD7D",innerCircleRPercentage:100},cancelled:{stroke:"#99999966",fill:"#99999966",innerCircleRPercentage:0},unknown:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0}};let y=L(()=>d[r(u)]||d.not_started);const R={not_started:k.tiptap_taskStatus_notStarted_label,waiting:k.tiptap_taskStatus_waiting_label,discussion_needed:k.tiptap_taskStatus_discussionNeeded_label,blocked:k.tiptap_taskStatus_blocked_label,in_progress:k.tiptap_taskStatus_inProgress_label,review_required:k.tiptap_taskStatus_reviewRequired_label,complete:k.tiptap_taskStatus_complete_label,cancelled:k.tiptap_taskStatus_cancelled_label,unknown:k.tiptap_taskStatus_unknown_label};let H=L(()=>(R[r(u)]??k.tiptap_taskStatus_unknown_label)());var F={get status(){return e()},set status(C){e(C),h()},get size(){return i()},set size(C=16){i(C),h()},get onclick(){return o()},set onclick(C){o(C),h()},$set:re,$on:(C,D)=>se(a,C,D)};{let C=L(()=>k.tiptap_taskStatus_status_tooltip({status:r(H)}));Se(t,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"task-status-icon shrink-0 cursor-pointer bg-transparent border-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-primary-ink rounded-full",get style(){return`width: ${i()??""}px; height: ${i()??""}px;`},get onclick(){return o()},get title(){return r(C)},children:(D,p)=>{var n=Je(),w=U(n),K=q(w),E=S(w),V=S(E),g=S(V);{var m=s=>{},N=s=>{var l=Ue();T(()=>M(l,"stroke",r(y).stroke)),f(s,l)},O=s=>{var l=Ge();z(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},Z=s=>{var l=Ke();T(()=>M(l,"stroke",r(y).stroke)),z(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},W=s=>{var l=We();z(3,l,()=>J,()=>({tier:"slow"})),f(s,l)},x=s=>{var l=je(),b=X(l),I=S(b);z(3,b,()=>$,()=>({tier:"slow"})),z(3,I,()=>J,()=>({tier:"slow"})),f(s,l)},Q=s=>{var l=Xe(),b=X(l),I=S(b);z(3,b,()=>J,()=>({tier:"slow"})),z(3,I,()=>J,()=>({tier:"slow"})),f(s,l)};A(g,s=>{r(u)==="not_started"||r(u)==="waiting"?s(m):r(u)==="in_progress"?s(N,1):r(u)==="complete"?s(O,2):r(u)==="cancelled"?s(Z,3):r(u)==="discussion_needed"?s(W,4):r(u)==="blocked"?s(x,5):r(u)==="review_required"&&s(Q,6)})}G(n),T(()=>{M(n,"width",i()),M(n,"height",i()),ce(n,`width: ${i()??""}px; height: ${i()??""}px;`),M(K,"id",`half-clip-${_??""}`),M(E,"r",`${r(y).innerCircleRPercentage*.5}%`),M(E,"fill",r(y).fill),M(E,"clip-path",r(u)==="in_progress"?`url(#half-clip-${_})`:"none"),M(V,"stroke",r(y).stroke)}),f(D,n)},$$slots:{default:!0}})}return oe(F)}export{qe as A,Re as L,Qe as T,Ee as a,He as b,gt as g,dt as o,Fe as r,ft as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as ds,j as ct}from"./uXuxG9cN.js";import{bo as c}from"./
|
|
1
|
+
import{m as ds,j as ct}from"./uXuxG9cN.js";import{bo as c}from"./BUAFIktJ.js";import{I8 as it,Iv as o,e as A,bX as fs,i as U,h$ as gs,ny as T,q2 as ps,lP as hs,y0 as _s,nx as W,ro as ms,x$ as ut,rn as dt,nk as ft,np as bs,m2 as Ss,fG as gt,lL as ys,md as ks,nO as $,iv as Cs,aT as ye,aO as se}from"./iYz7qSVO.js";import{bR as ws,cZ as vs,a_ as As,aF as Ts,ci as Is,bJ as Rs,bk as Es,br as Ps,al as xs,cF as Ms,cN as Ns,c3 as $s,bf as Ls}from"./CfdX4Lfl.js";import{a as Os,g as Ds,b as Ws,i as pe,C as le}from"./DypB-Dwi.js";import{Q as Us}from"./B1s_9zgm.js";import{v as Fs}from"./Bz6dDdb9.js";import{d as Hs}from"./BXyNrc2B.js";import{t as C,u as js}from"./DCOf4rfq.js";var he=(e=>(e.ACTIVATING="activating",e.ACTIVE="active",e.ERROR="error",e))(he||{});function al(e){return e.isPending===!0||e.status==="pending"}function Bs(e,t){const s=e.provider||e.metadata?.provider||e.config?.provider;if(s)return s;if(e.model)return(it(e.model).providerId??t)||void 0}function ol(e){return e.messages.length>0}function qs(e){return e.filter(t=>t.type==="text").map(t=>t.text??"").join("")}function Gs(e){return e.contentBlocks?qs(e.contentBlocks):""}const ll=o.createSelector(e=>e.principal),Q=o.createSelector(Os),P=o.createSelector(e=>{const t=e.principal;return t?.status==="ready"&&t.context!==null&&t.context===Q.select(e)?t.snapshot:null}),zs=o.createSelector(e=>P.select(e)?.daemonMode??null),cl=o.createSelector(e=>zs.select(e)==="orchestrator"),il=o.createSelector(e=>P.select(e)?.capabilities.agentPlugins===1),ul=o.createSelector(e=>P.select(e)?.capabilities.messageBlockPages===1),O=o.createSelector(e=>{const t=P.select(e);return t?t.capabilities.hostMembership?t.principal.hostRole??null:t.principal.isAdministrator?"owner":"guest":null}),J=o.createSelector(e=>O.select(e)==="owner"),pt=o.createSelector(e=>e.principal?.status==="revoked"&&e.principal.context!==null&&e.principal.context===Q.select(e)),dl=o.createSelector(e=>{const t=O.select(e);return t==="member"||t==="guest"||pt.select(e)}),fl=o.createSelector(e=>J.select(e)?Q.select(e):null),Zs=o.createSelector(e=>{const t=O.select(e);return t==="owner"||t==="member"}),ce=o.createSelector(e=>Fs.select(e)===!0&&!!P.select(e)&&e.principal.refreshedPresentationVersion===e.principal.presentationVersion),gl=o.createSelector(e=>{const t=ce.select(e),s=P.select(e)?.capabilities;return{hostMembership:t&&s?.hostMembership===!0,manageHostMembers:t&&s?.hostMembership===!0&&J.select(e),personalPairing:t&&s?.personalPairing===!0,authenticatedDevices:t&&s?.authenticatedDevices===!0,collaborationIdentity:t&&s?.collaborationIdentity===!0}}),ie=o.createSelector(Ds),pl=o.createSelector(Ws),hl=o.createSelector(e=>Zs.select(e)&&(J.select(e)||ce.select(e)));function Ks(e,t){const s=e.indexOf("/"),r=s===-1?void 0:e.slice(0,s),n=s===-1?e:e.slice(s+1),a=t?.indexOf("/")??-1,i=t&&a!==-1?t.slice(0,a):void 0;return r&&i&&r.toLowerCase()===i.toLowerCase()?n:e}function ht(e,t,s){return`${Ks(e,s)} #${t}`}function ke(e){return e.resource?.repository.provider==="gitlab"}function _l(e,t){return`${ke(e)?"!":"#"}${t}`}function Vs(e){return e.url??(e.resource||e.monitorAvailability||e.url===null?"":`https://github.com/${e.repo}/pull/${e.prNumber}`)}function Qs(e,t){return ke(e)?`${e.repo} !${e.prNumber}`:ht(e.repo,e.prNumber,t)}function ml(e){return e.resource?ds(e.resource):e.monitorAvailability?`unresolved:${e.monitorId}`:`${e.repo.toLowerCase()}#${e.prNumber}`}function bl(e){switch(e.monitorAvailability?.state){case void 0:case"available":return;case"pending":return c.chat_chatMessage_loading_label();case"reconnect-required":return c.chat_monitoredPrs_status_reconnect();case"restricted":return c.chat_monitoredPrs_status_restricted();case"unresolved":return c.chat_monitoredPrs_status_unresolved();default:return c.chat_monitoredPrs_status_unknown()}}function Sl(e){return e.isDraft===null||e.hasConflicts===null||e.isBehind===null||Object.values(e.checks).some(t=>t===null)||e.approvals.have===null||e.approvals.changesRequested===null||e.availability!==void 0&&Object.values(e.availability).some(t=>t!=="available")}function yl(e,t){if(!ke(t)||!t.resource)return e;const s=new URL(t.resource.repository.instanceBaseUrl);return`${e} (${s.host}${s.pathname.replace(/\/$/,"")})`}function _t(e){return e===A.Halted||e===A.Completed||e===A.Error||e===A.Deleted||e==="completed"||e==="failed"||e==="error"||e==="deleted"}function mt(e){return e.status===A.Halted?!1:!!(e.turnInFlight||e.liveTurnOpen||e.isStreaming||e.isProcessing||e.isResponding||e.isWaitingOnTool||e.lastToolUse?.status?.toLowerCase()==="running")}function bt(e){return e.status===A.Resuming||_t(e.status)||mt(e)?!1:!!(e.isWaitingForOtherAgents||e.status===A.Waiting||e.status==="waiting")}function Ys(e){return _t(e.status)||bt(e)?!1:!!(mt(e)||e.activationState==="activating"||e.status===A.Resuming||e.status===A.Active||e.status===A.Processing||e.status==="active"||e.status==="processing"||e.status==="responding"||e.status==="streaming")}function kl(e){return{isStreaming:e.isStreaming,isProcessing:e.isProcessing,isResponding:e.isResponding,turnInFlight:e.turnInFlight,liveTurnOpen:e.liveTurnOpen,isWaitingOnTool:e.isWaitingOnTool,isWaitingForOtherAgents:e.isWaitingForOtherAgents,lastToolUse:e.lastToolUse,activationState:e.activationState,status:e.status}}function Xs(e){if(!e)return null;const t=e.lastUserMessage||"";let s=e.lastAgentResponse||"",r;const n=e.digest||void 0,a=e.lastMessageRole==="user"||e.lastMessageRole==="assistant"?e.lastMessageRole:void 0;e.isStreaming&&e.lastToolUse?.name?(r={type:"tool_use",id:`live-tool:${e.id}`,name:e.lastToolUse.name,input:{}},s=""):!s&&!e.isStreaming&&e.lastToolUse?.name&&(r={type:"tool_use",id:`wire-tool:${e.id}`,name:e.lastToolUse.name,input:e.lastToolUse.input??{}});const i=e.metadata?.completionReport||void 0,l=fs(e)??void 0;return{id:e.id,name:e.name||c.chat_chatHeader_newChat_fallback(),status:e.status,lastUserMessage:t,lastResponse:s,lastToolUse:r,fileChanges:(e.fileChanges||[]).map(u=>({path:u.path,action:u.type||u.action||"modify",timestamp:u.timestamp||new Date().toISOString()})),messages:e.messages||[],completionReport:i,digest:n,parentAgentId:l,lastMessageRole:a}}function Cl(e,t){if(!e)return"";const s=e.split(`
|
|
2
2
|
`);for(;s.length>0&&s[s.length-1].trim()==="";)s.pop();return s.length===0?"":s.length<=t?s.join(`
|
|
3
3
|
`):`${s.slice(-t).join(`
|
|
4
4
|
`)}...`}const Js={prefix:"fas",iconName:"note-sticky",icon:[16,16,[],"e002","M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"]},_={"file-read":Ls,"file-write":$s,"file-delete":Ns,terminal:Ms,search:ws,"context-engine":xs,api:Ps,workspace:Es,note:Js,meta:Rs,agent:Is,task:Ts,browser:As,generic:vs},er=["workspace-mcp_","workspace_mcp_","filesystem_","browser-mcp_","browser_mcp_"],tr=["_workspace-mcp","-workspace-mcp","_playwright","_browser_mcp","_context_7","_svelte","_npx","_sequential_thinking","_figma","_slack","_sentry","_github","_linear","_notion","_jira"];function St(e){return!!e&&/^(mcp__|mcp\.)/i.test(e)}const Oe=/select:\s*mcp(__|\.)/i,sr=/^select:\s*mcp(__|\.)/i;function rr(e,t={}){if(B(e).toLowerCase()==="toolsearch"||typeof t.query=="string"&&sr.test(t.query))return!0;const s=typeof t._acpTitle=="string"?t._acpTitle:"";return Oe.test(e||"")||Oe.test(s)}function B(e){if(!e)return"";const t=e.match(/\/\/local\/mcp\/(.+)$/);t&&(e=t[1]),e=e.replace(/^mcp__[^_]+__/,""),e=e.replace(/^mcp\.[^.]+\./,"");const s=e.toLowerCase();for(const n of er)if(s.startsWith(n)){e=e.slice(n.length);break}let r=!0;for(;r;){r=!1;const n=e.toLowerCase();for(const a of tr)if(n.endsWith(a)){e=e.slice(0,-a.length),r=!0;break}}return e}function yt(e){const t=e.trim();return/\s/.test(t)?/^[A-Za-z0-9._-]+:\s/.test(t)?!0:t.split(/\s+/).length>=3:!1}function kt(e){const t=e.trim().match(/^List\s+directory\s+\x60([^\x60]+)\x60$/i);if(!t)return null;const s=t[1].trim();return s.length===0?null:{category:"file-read",icon:_["file-read"],verb:c.chat_toolClassifier_listContents_label(),subject:E(s)||s,path:N(s)||null,filePath:s||null,isDirectory:!0}}function Ct(e){const t=e.toLowerCase(),s=t.includes("agent")?"agent":t.includes("note")?"note":t.includes("workspace")?"workspace":"generic";return{category:s,icon:_[s],verb:f(e.trim(),120),subject:null,path:null}}const nr=[{suffix:"_workspace-mcp",source:"workspace-mcp"},{suffix:"-workspace-mcp",source:"workspace-mcp"},{suffix:"_browser_mcp",source:"browser-mcp"},{suffix:"_playwright",source:"playwright"},{suffix:"_sequential_thinking",source:"sequential-thinking"},{suffix:"_context_7",source:"context7"},{suffix:"_figma",source:"figma"},{suffix:"_sentry",source:"sentry"},{suffix:"_github",source:"github"},{suffix:"_linear",source:"linear"},{suffix:"_slack",source:"slack"},{suffix:"_notion",source:"notion"},{suffix:"_jira",source:"jira"},{suffix:"_svelte",source:"svelte"},{suffix:"_npx",source:"npx"}],ar=[{prefix:"workspace-mcp_",source:"workspace-mcp"},{prefix:"workspace_mcp_",source:"workspace-mcp"},{prefix:"browser-mcp_",source:"browser-mcp"},{prefix:"browser_mcp_",source:"browser-mcp"},{prefix:"filesystem_",source:"filesystem"}],De={"github-api":"github",linear:"linear",glean:"glean"},or=new Set(["view","codebase-retrieval","codebase_retrieval","launch-process","launch_process","read-process","read_process","write-process","write_process","kill-process","kill_process","list-processes","list_processes","str-replace-editor","str_replace_editor","save-file","save_file","remove-files","remove_files","web-search","web_search","web-fetch","web_fetch","conversation-retrieval","conversation_retrieval","git-commit-retrieval","git_commit_retrieval","bash","read","edit","run","find","grep"]);function lr(e){if(!e)return;const t=e.match(/\/\/local\/mcp\/(.+)$/);t&&(e=t[1]);const s=e.match(/^mcp__([^_]+)__/);if(s)return s[1].toLowerCase();const r=e.match(/^mcp\.([^.]+)\./);if(r)return r[1].toLowerCase();const n=e.toLowerCase();for(const{prefix:a,source:i}of ar)if(n.startsWith(a))return i;for(const{suffix:a,source:i}of nr)if(n.endsWith(a))return i;if(De[n])return De[n];or.has(n)}function I(e){return typeof e=="string"?e:e==null?"":String(e)}function f(e,t=50){const s=I(e);return s.length>t?`${s.substring(0,t)}...`:s}function Ce(e){if(e==null)return null;if(typeof e=="string")return e;if(Array.isArray(e)){const t=e.filter(s=>s&&typeof s=="object"&&s.type==="text"&&s.text).map(s=>s.text);return t.length>0?t.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s}from"./
|
|
1
|
+
import{d as s}from"./DV_c4cZz.js";import{a as t}from"./BdWqymET.js";import{cG as i}from"./D1PZlLC_.js";import{Iv as a}from"./iYz7qSVO.js";import{setLinkActionMenuLinkedWorkspaces as n}from"./Ddqq3yIK.js";const c=new t("LinkActionMenuLinkedWorkspaces");async function u(r,e){if(i.select(a.state)?.capabilities.prWorkspaceLookup===1)try{const o=await s.workspaces.findByPullRequest(e);n(r,o)}catch(o){c.debug("PR workspace lookup failed",{url:e,error:o})}}export{u as loadLinkActionMenuLinkedWorkspaces};
|