@intent-hq/web 2.320.1 → 2.321.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{4o1DPfmL.js → -x_SoK5J.js} +1 -1
- package/web/app/immutable/chunks/{DJbnWCnN.js → 0Orrh1Id.js} +6 -6
- package/web/app/immutable/chunks/{Wm9WFHAU.js → 0TFOtiMK.js} +1 -1
- package/web/app/immutable/chunks/{DgvFQ5ps.js → 0x0gscua.js} +1 -1
- package/web/app/immutable/chunks/{D2Hsf4lo.js → 45y_L1a9.js} +1 -1
- package/web/app/immutable/chunks/{CVQvxrRM.js → 4iRc0E9v.js} +1 -1
- package/web/app/immutable/chunks/{CcjhvQaU.js → 5MGYaOe_.js} +1 -1
- package/web/app/immutable/chunks/{D7hkdi6r.js → 5QXDo1_h.js} +1 -1
- package/web/app/immutable/chunks/{VlQJw7Mt.js → 6cxhz2FS.js} +1 -1
- package/web/app/immutable/chunks/{B-NH8jPK.js → 7fl6VDRo.js} +1 -1
- package/web/app/immutable/chunks/{BIzCpN2r.js → 8OpKoiOO.js} +1 -1
- package/web/app/immutable/chunks/{Byh9jXBr.js → 8biy-UQv.js} +1 -1
- package/web/app/immutable/chunks/{Ck3dkN4B.js → Ab2YxsyL.js} +1 -1
- package/web/app/immutable/chunks/{CAoY2-K6.js → B-WefpDP.js} +1 -1
- package/web/app/immutable/chunks/{CQX4KubR.js → B0FM877X.js} +1 -1
- package/web/app/immutable/chunks/{C23Piy_l.js → B0FYEeEw.js} +1 -1
- package/web/app/immutable/chunks/{CpEHCOut.js → B0JWnOsx.js} +1 -1
- package/web/app/immutable/chunks/{C0Eg_x6y.js → B0pgN3Jj.js} +1 -1
- package/web/app/immutable/chunks/{BJfH3e03.js → B1WyTcs2.js} +3 -3
- package/web/app/immutable/chunks/{C-r1nQ0P.js → B2c_0_UD.js} +2 -2
- package/web/app/immutable/chunks/{BtxYdCDO.js → B2yYgkwz.js} +1 -1
- package/web/app/immutable/chunks/{DnIfn_Q5.js → B5nbjbRb.js} +1 -1
- package/web/app/immutable/chunks/{Cmsg1-Jz.js → B6DUgu-2.js} +1 -1
- package/web/app/immutable/chunks/{BpzYGtC7.js → B7BTR3Z_.js} +1 -1
- package/web/app/immutable/chunks/{eeOO6ePS.js → B9MBednq.js} +1 -1
- package/web/app/immutable/chunks/{GzyujEXJ.js → BBZiE97y.js} +1 -1
- package/web/app/immutable/chunks/{CjOd6IrN.js → BBeErNG6.js} +1 -1
- package/web/app/immutable/chunks/{CwKQMp5y.js → BC1v75_H.js} +1 -1
- package/web/app/immutable/chunks/{D02FkLBh.js → BD8I8FK1.js} +1 -1
- package/web/app/immutable/chunks/{gV7ZxrZ2.js → BDgfVkJh.js} +1 -1
- package/web/app/immutable/chunks/{DBEuoua2.js → BEQ_aNVt.js} +2 -2
- package/web/app/immutable/chunks/{C-_w8CdN.js → BG-UHIO1.js} +2 -2
- package/web/app/immutable/chunks/{BtA94G-4.js → BGFrQA7m.js} +1 -1
- package/web/app/immutable/chunks/{CW_i4yzi.js → BGiTQR4x.js} +1 -1
- package/web/app/immutable/chunks/{O4y88_QN.js → BLhWzQz2.js} +1 -1
- package/web/app/immutable/chunks/{BRqOyyER.js → BM51eWC-.js} +1 -1
- package/web/app/immutable/chunks/{VE9Tc-Fm.js → BMH4mbSd.js} +2 -2
- package/web/app/immutable/chunks/{CpnH3je1.js → BMc6OzJ-.js} +2 -2
- package/web/app/immutable/chunks/{Dkt7Tsgw.js → BMvbnoDk.js} +1 -1
- package/web/app/immutable/chunks/{DAgho_P-.js → BOaNSc_1.js} +1 -1
- package/web/app/immutable/chunks/{BZrP_BN5.js → BOrghaSd.js} +2 -2
- package/web/app/immutable/chunks/{DDRNgELR.js → BPp7FHiR.js} +1 -1
- package/web/app/immutable/chunks/{C0HDG-tg.js → BS5yagDq.js} +1 -1
- package/web/app/immutable/chunks/{4EPU-1_C.js → BWHu0fap.js} +1 -1
- package/web/app/immutable/chunks/{CT5WLLvq.js → BX-dt_Uh.js} +1 -1
- package/web/app/immutable/chunks/{DnWPcgvb.js → BXPwex0u.js} +1 -1
- package/web/app/immutable/chunks/{CDFwOYFZ.js → BXean12D.js} +1 -1
- package/web/app/immutable/chunks/{BTVnc-yD.js → BZyfa8QR.js} +1 -1
- package/web/app/immutable/chunks/{DcQGtdYG.js → BbCn81lZ.js} +1 -1
- package/web/app/immutable/chunks/{D2MFHl3c.js → Bc-CUZMV.js} +1 -1
- package/web/app/immutable/chunks/{49Xcxy9Z.js → Bcc7Bzbg.js} +1 -1
- package/web/app/immutable/chunks/{DQSz8rIC.js → BcpqnYRX.js} +5 -5
- package/web/app/immutable/chunks/{H5XG0yyu.js → BdWpSBC4.js} +2 -2
- package/web/app/immutable/chunks/{BxxQ5pIU.js → BeqbwVaJ.js} +1 -1
- package/web/app/immutable/chunks/{DgDI47Tl.js → BflC9e-C.js} +1 -1
- package/web/app/immutable/chunks/{DSP3ClFU.js → Bgw4M5Hc.js} +1 -1
- package/web/app/immutable/chunks/{lzfQOUtM.js → Bi4OiJD3.js} +1 -1
- package/web/app/immutable/chunks/{CIH3mb7Y.js → BkR5Qiti.js} +1 -1
- package/web/app/immutable/chunks/{BMJ3_jM1.js → Bknqawxe.js} +1 -1
- package/web/app/immutable/chunks/{2d9ARddo.js → Bm_1OUSw.js} +1 -1
- package/web/app/immutable/chunks/{DVX1HL-4.js → Bmmshx2M.js} +1 -1
- package/web/app/immutable/chunks/{DYepVMa7.js → Bo4s1kgI.js} +3 -3
- package/web/app/immutable/chunks/{D_FHOcPH.js → Bok30zBH.js} +1 -1
- package/web/app/immutable/chunks/{DsQHEEWt.js → BsB3ty-n.js} +1 -1
- package/web/app/immutable/chunks/{BsCDeyle.js → BtTBXjdJ.js} +1 -1
- package/web/app/immutable/chunks/{r2I2bB7k.js → BtWwzwrf.js} +1 -1
- package/web/app/immutable/chunks/{D8UQMJEh.js → BvkV35-O.js} +1 -1
- package/web/app/immutable/chunks/{fUyHJpWx.js → BwICfRz9.js} +1 -1
- package/web/app/immutable/chunks/{CfpYQrWa.js → BwYRCP9e.js} +1 -1
- package/web/app/immutable/chunks/{C9Az19Q-.js → ByKL05wN.js} +1 -1
- package/web/app/immutable/chunks/{u-Ou3zHY.js → Byv2GcxJ.js} +2 -2
- package/web/app/immutable/chunks/{D-NAfI6p.js → BziQ6zwo.js} +1 -1
- package/web/app/immutable/chunks/{SrOLwB5L.js → C-RJDuZ9.js} +1 -1
- package/web/app/immutable/chunks/{IsZuHG2a.js → C-neqscP.js} +1 -1
- package/web/app/immutable/chunks/{CtNKFf3W.js → C06rhFz-.js} +1 -1
- package/web/app/immutable/chunks/{VKc1-U2z.js → C0VXEpDj.js} +1 -1
- package/web/app/immutable/chunks/{ivVGXMNS.js → C0mBOV7w.js} +1 -1
- package/web/app/immutable/chunks/{B9MzVcgv.js → C11XjPnf.js} +3 -3
- package/web/app/immutable/chunks/{55B_mQC6.js → C3AKbypo.js} +6 -6
- package/web/app/immutable/chunks/{ChV6OcuF.js → C3lgqjB4.js} +1 -1
- package/web/app/immutable/chunks/{DFRP5ruh.js → C5aeZ3Yo.js} +2 -2
- package/web/app/immutable/chunks/{Bk4gFCP5.js → C6-BVYMv.js} +1 -1
- package/web/app/immutable/chunks/C76-jvlr.js +19 -0
- package/web/app/immutable/chunks/{DlUfd75E.js → C7JWgw8J.js} +3 -3
- package/web/app/immutable/chunks/{DjWen1vr.js → C804xHCz.js} +1 -1
- package/web/app/immutable/chunks/{DdteGby8.js → C8xPpxcv.js} +1 -1
- package/web/app/immutable/chunks/{BoUhyyfU.js → C8zzua9V.js} +1 -1
- package/web/app/immutable/chunks/{CuTNRxpo.js → CAgY0H5Q.js} +1 -1
- package/web/app/immutable/chunks/{ApbPdiAE.js → CBxbaIvA.js} +1 -1
- package/web/app/immutable/chunks/CCaX_DIa.js +1 -0
- package/web/app/immutable/chunks/{7z2H_RtS.js → CCnP87Jb.js} +1 -1
- package/web/app/immutable/chunks/{CrkvePNd.js → CCsRc7xx.js} +1 -1
- package/web/app/immutable/chunks/{CXux1NAJ.js → CDsY8gY8.js} +1 -1
- package/web/app/immutable/chunks/{DMu4mjpX.js → CEFpGNTq.js} +1 -1
- package/web/app/immutable/chunks/{V4Dt-iuy.js → CEj75uMJ.js} +1 -1
- package/web/app/immutable/chunks/{Le4YFzxz.js → CG9qWr93.js} +3 -3
- package/web/app/immutable/chunks/{DjfcjPFA.js → CGBBhq8k.js} +1 -1
- package/web/app/immutable/chunks/{DU9iEtZ1.js → CGIf2jXM.js} +1 -1
- package/web/app/immutable/chunks/{BS3L5ssG.js → CGVJO4eq.js} +1 -1
- package/web/app/immutable/chunks/{ipFV2AXr.js → CHM5tGJ6.js} +1 -1
- package/web/app/immutable/chunks/CHRkLzGl.js +1 -0
- package/web/app/immutable/chunks/{D5BYjywr.js → CHZAzCO9.js} +2 -2
- package/web/app/immutable/chunks/{Dby-RtfB.js → CIh8Ybhq.js} +1 -1
- package/web/app/immutable/chunks/{BnY6qa9O.js → CKO4faLg.js} +1 -1
- package/web/app/immutable/chunks/{Cm-Ux8AK.js → CKwPlZ66.js} +1 -1
- package/web/app/immutable/chunks/{5BaUgoc7.js → CLmrIbfi.js} +1 -1
- package/web/app/immutable/chunks/{DeFnstZp.js → CM7Hb3PZ.js} +1 -1
- package/web/app/immutable/chunks/{JwXVdNK9.js → CN70DRE5.js} +1 -1
- package/web/app/immutable/chunks/{Dbcyn1sm.js → CPKLysog.js} +1 -1
- package/web/app/immutable/chunks/CRyHSgI1.js +1 -0
- package/web/app/immutable/chunks/{Bv7Cc181.js → CS7dHtKw.js} +1 -1
- package/web/app/immutable/chunks/{XL81JlY3.js → CTlGDL05.js} +1 -1
- package/web/app/immutable/chunks/{DkrIcKd4.js → CVjlpAWj.js} +3 -3
- package/web/app/immutable/chunks/{vnFqKiHP.js → CVrH3Neh.js} +1 -1
- package/web/app/immutable/chunks/{D7ZBvVv7.js → CXIZuwd7.js} +1 -1
- package/web/app/immutable/chunks/{IYLMGQxr.js → CY9IKMQG.js} +1 -1
- package/web/app/immutable/chunks/{CKiOztob.js → CYOvUFvY.js} +1 -1
- package/web/app/immutable/chunks/{DOxrGs5l.js → CZEWv-Gf.js} +1 -1
- package/web/app/immutable/chunks/{jiIr1QvR.js → C_Vz3LCC.js} +1 -1
- package/web/app/immutable/chunks/{sOHh4EMg.js → Cb3FWEmc.js} +1 -1
- package/web/app/immutable/chunks/{BvO0zD3q.js → Cbqk5Mud.js} +1 -1
- package/web/app/immutable/chunks/{BkH6TsO0.js → CchM71Qw.js} +1 -1
- package/web/app/immutable/chunks/{zl8Sz0Gx.js → CdGIN-T1.js} +3 -3
- package/web/app/immutable/chunks/{V_BIwIYH.js → CdVKa6AF.js} +2 -2
- package/web/app/immutable/chunks/{CMcfEzCt.js → Ced26xBL.js} +1 -1
- package/web/app/immutable/chunks/{DukwQosN.js → Ci959ZOg.js} +1 -1
- package/web/app/immutable/chunks/{DDhu5Shq.js → Cja4W1Zb.js} +4 -4
- package/web/app/immutable/chunks/{DtL3mwiX.js → CmAVmm3T.js} +1 -1
- package/web/app/immutable/chunks/CmYXfe7_.js +1 -0
- package/web/app/immutable/chunks/{BoAwi0I6.js → CoUfnBeR.js} +1 -1
- package/web/app/immutable/chunks/{COuKp8NZ.js → Cq6ekj5I.js} +1 -1
- package/web/app/immutable/chunks/{CrF5hjNA.js → CqGkRJXi.js} +1 -1
- package/web/app/immutable/chunks/{CGVZRNqq.js → Cqay3Iio.js} +1 -1
- package/web/app/immutable/chunks/{D8l-pxCs.js → CsqvO7xN.js} +1 -1
- package/web/app/immutable/chunks/{DQhHyGm2.js → Ctggj9Y1.js} +1 -1
- package/web/app/immutable/chunks/{CTIoKRdg.js → Cts399i7.js} +1 -1
- package/web/app/immutable/chunks/{TRcwahzR.js → CulY8r4s.js} +1 -1
- package/web/app/immutable/chunks/{3TX-_riq.js → CvBuWqyP.js} +4 -4
- package/web/app/immutable/chunks/{DB531Hr_.js → CvegPRPp.js} +2 -2
- package/web/app/immutable/chunks/{Do2QepJk.js → Cwv7iryQ.js} +1 -1
- package/web/app/immutable/chunks/{CYvGLw1Y.js → CxQ0SCX2.js} +1 -1
- package/web/app/immutable/chunks/{DZxiqmZj.js → CxZuxrAL.js} +1 -1
- package/web/app/immutable/chunks/{sWFJeG75.js → Cz8iOYm8.js} +1 -1
- package/web/app/immutable/chunks/{DUW0BlH5.js → CztKENY4.js} +1 -1
- package/web/app/immutable/chunks/{XWXuV5J_.js → D26IPp5S.js} +1 -1
- package/web/app/immutable/chunks/{mEKKjA-u.js → D2iCI9dn.js} +1 -1
- package/web/app/immutable/chunks/{CZFJH8pA.js → D2zJp5fS.js} +29 -29
- package/web/app/immutable/chunks/{Bv-JB2Uu.js → D4e2w8TP.js} +1 -1
- package/web/app/immutable/chunks/{BmGPu7Nl.js → D5lr7eae.js} +2 -2
- package/web/app/immutable/chunks/{9Lm8k_8r.js → D6dCvfQe.js} +1 -1
- package/web/app/immutable/chunks/{CMeoq2YD.js → D7q-DSVP.js} +1 -1
- package/web/app/immutable/chunks/{Btkc4GhJ.js → D84A4J8d.js} +1 -1
- package/web/app/immutable/chunks/{Df_CcsUd.js → DDdLPEvL.js} +1 -1
- package/web/app/immutable/chunks/{DU9yd1xn.js → DDnwQoVq.js} +1 -1
- package/web/app/immutable/chunks/{MJGmlCLu.js → DFcwI6Rh.js} +1 -1
- package/web/app/immutable/chunks/{BQKHJuv8.js → DFyBaL9d.js} +1 -1
- package/web/app/immutable/chunks/{CCmXROuj.js → DI4wCe7O.js} +1 -1
- package/web/app/immutable/chunks/{DSbw-nyW.js → DJKXcaw9.js} +1 -1
- package/web/app/immutable/chunks/{B524kvVw.js → DMRQ6CDd.js} +2 -2
- package/web/app/immutable/chunks/{i3h2CX4F.js → DMvfzQWM.js} +1 -1
- package/web/app/immutable/chunks/{KJelEqX3.js → DNFHGDC9.js} +1 -1
- package/web/app/immutable/chunks/{R6dAjEem.js → DNNMwmDG.js} +1 -1
- package/web/app/immutable/chunks/{CZ5Pr0zI.js → DOzF5uE-.js} +1 -1
- package/web/app/immutable/chunks/{DDdEHmdT.js → DPoarPZL.js} +1 -1
- package/web/app/immutable/chunks/{273-ejOd.js → DR4i54x0.js} +1 -1
- package/web/app/immutable/chunks/{CCVg2HgS.js → DRpDjwRs.js} +1 -1
- package/web/app/immutable/chunks/{Dy4G53ce.js → DS2Q5gr9.js} +1 -1
- package/web/app/immutable/chunks/{B-ukGsyU.js → DSdY0J1g.js} +1 -1
- package/web/app/immutable/chunks/{DgvGDMI5.js → DXySew1R.js} +1 -1
- package/web/app/immutable/chunks/{C72zM9oE.js → DYfBNrOV.js} +1 -1
- package/web/app/immutable/chunks/{CCghBHzC.js → DYhpST_X.js} +1 -1
- package/web/app/immutable/chunks/{QeTaV4Op.js → DZAWjsA4.js} +1 -1
- package/web/app/immutable/chunks/{CBE9bOjQ.js → DZtstCLQ.js} +1 -1
- package/web/app/immutable/chunks/{B1892jNy.js → D_HysCp7.js} +1 -1
- package/web/app/immutable/chunks/{BOypJjQg.js → Dd0rdLMI.js} +1 -1
- package/web/app/immutable/chunks/{CwSP6heW.js → Dd7A9glX.js} +1 -1
- package/web/app/immutable/chunks/{C2pLxq9N.js → Dgqdx3pd.js} +1 -1
- package/web/app/immutable/chunks/{Ca0VZzWN.js → DhtKWu39.js} +1 -1
- package/web/app/immutable/chunks/{BBvT7Bb8.js → Dix9BiYu.js} +1 -1
- package/web/app/immutable/chunks/{CK2xtMaJ.js → DjqPgoUP.js} +1 -1
- package/web/app/immutable/chunks/DlBxdhh5.js +2 -0
- package/web/app/immutable/chunks/{CgQiyraX.js → DlZzAKZ2.js} +1 -1
- package/web/app/immutable/chunks/{CW_MTCOu.js → DnfX8iZ_.js} +1 -1
- package/web/app/immutable/chunks/Dritbi2C.js +6 -0
- package/web/app/immutable/chunks/{cYktK7bI.js → DsRLPs6I.js} +10 -10
- package/web/app/immutable/chunks/{DVijqcE1.js → Du7yAEgM.js} +1 -1
- package/web/app/immutable/chunks/{oB6nSTCC.js → DuMlpvYZ.js} +1 -1
- package/web/app/immutable/chunks/{DbSP_yi5.js → DwNzQjT_.js} +1 -1
- package/web/app/immutable/chunks/{DWcUEP_3.js → DwsRDnkS.js} +4 -4
- package/web/app/immutable/chunks/{T2aO1XPv.js → DyVNmy1r.js} +1 -1
- package/web/app/immutable/chunks/{IwQXvQKq.js → I0eHZGMz.js} +1 -1
- package/web/app/immutable/chunks/{DLme1vI4.js → JfyBNQs2.js} +1 -1
- package/web/app/immutable/chunks/{YGDnq71P.js → NeHKo0ZG.js} +1 -1
- package/web/app/immutable/chunks/{CAhuuwZ9.js → O0CxvO89.js} +1 -1
- package/web/app/immutable/chunks/{DudXAl_N.js → Ob5NWDgS.js} +1 -1
- package/web/app/immutable/chunks/{Dczc0YMo.js → PUalo3UE.js} +1 -1
- package/web/app/immutable/chunks/{DXjHY2hF.js → QGE3iD8D.js} +1 -1
- package/web/app/immutable/chunks/{_p09hiud.js → QSR6vsk4.js} +1 -1
- package/web/app/immutable/chunks/{9tzjcklF.js → QjpXu0Du.js} +1 -1
- package/web/app/immutable/chunks/{CPObUSo8.js → UEd-gngc.js} +1 -1
- package/web/app/immutable/chunks/VEkj47bo.js +1 -0
- package/web/app/immutable/chunks/{Cx547a39.js → VeIqG7dc.js} +4 -4
- package/web/app/immutable/chunks/{j3QkolT-.js → XF_IbTR1.js} +3 -3
- package/web/app/immutable/chunks/{CcVvQKcJ.js → XV0T3w4n.js} +1 -1
- package/web/app/immutable/chunks/{Dk1FwKDL.js → YO4PhogQ.js} +1 -1
- package/web/app/immutable/chunks/{BLl4jbbs.js → aLZSbque.js} +2 -2
- package/web/app/immutable/chunks/{DKBox7Ew.js → csuWDYc9.js} +1 -1
- package/web/app/immutable/chunks/{CnlzKY2y.js → dmSYAakE.js} +1 -1
- package/web/app/immutable/chunks/eK7OULll.js +1 -0
- package/web/app/immutable/chunks/{Cugknw1m.js → gCXIPBa3.js} +1 -1
- package/web/app/immutable/chunks/{CJhkZF1l.js → hxIWaKu8.js} +1 -1
- package/web/app/immutable/chunks/{C3lmZVdU.js → jMKjj8ae.js} +1 -1
- package/web/app/immutable/chunks/{Dpk7e0gp.js → jvHJQ-Xz.js} +1 -1
- package/web/app/immutable/chunks/{BB6TPLRQ.js → k4eU_FWk.js} +1 -1
- package/web/app/immutable/chunks/{BigdBsL9.js → nLw8YrmA.js} +1 -1
- package/web/app/immutable/chunks/{mk8wN9pR.js → nR16njgN.js} +1 -1
- package/web/app/immutable/chunks/{Dld3dCA-.js → o5rEX9Xy.js} +1 -1
- package/web/app/immutable/chunks/{B30Ssr1r.js → p5gLe3PS.js} +1 -1
- package/web/app/immutable/chunks/{VKC6gzws.js → pnKMO5U0.js} +53 -53
- package/web/app/immutable/chunks/{CGTFiYKr.js → reR1kPlm.js} +1 -1
- package/web/app/immutable/chunks/{BwfkZxtl.js → tGqA6xQ9.js} +1 -1
- package/web/app/immutable/chunks/uLB4Kp9c.js +1 -0
- package/web/app/immutable/chunks/{CI-U2zwu.js → ubLEbEcV.js} +1 -1
- package/web/app/immutable/chunks/{Dtei9o3U.js → uyOfKmty.js} +3 -3
- package/web/app/immutable/chunks/{DVRDTT5s.js → vUGF5JqJ.js} +1 -1
- package/web/app/immutable/chunks/{DamIfQPR.js → vzGm0J_h.js} +1 -1
- package/web/app/immutable/chunks/{Dlalsrb2.js → w6mFE4SD.js} +1 -1
- package/web/app/immutable/chunks/{OvSKCwS-.js → z3QVK190.js} +2 -2
- package/web/app/immutable/entry/{app.DnikQ4I9.js → app.PHHlgSoZ.js} +3 -3
- package/web/app/immutable/entry/start.Cltn4m6a.js +1 -0
- package/web/app/immutable/nodes/{0.C7A1xQm9.js → 0.D7bJjS_y.js} +1 -1
- package/web/app/immutable/nodes/{1.D3O5lTcl.js → 1.B3gH8FG5.js} +1 -1
- package/web/app/immutable/nodes/{10.BaLN4VIK.js → 10.NQcSgQgq.js} +4 -4
- package/web/app/immutable/nodes/{11.DNy1N3E_.js → 11.Drfz7PRj.js} +1 -1
- package/web/app/immutable/nodes/{12.CkJqJXDQ.js → 12.gXokqM9g.js} +1 -1
- package/web/app/immutable/nodes/{13.BQO-XqRU.js → 13.DFxxGy6Y.js} +3 -3
- package/web/app/immutable/nodes/{14.BycEEfsq.js → 14.7T2ChNl_.js} +1 -1
- package/web/app/immutable/nodes/{15.Cul5GEsK.js → 15.CgEeXtgJ.js} +1 -1
- package/web/app/immutable/nodes/{16.BjrtGDLp.js → 16.CWrHY2VB.js} +2 -2
- package/web/app/immutable/nodes/{2.Cfk2c4l0.js → 2.DQ6QcB9c.js} +8 -8
- package/web/app/immutable/nodes/{3.Dp8QGgRH.js → 3.Fjkgohv2.js} +1 -1
- package/web/app/immutable/nodes/{4.D3m3OUdj.js → 4.D1BNF_ep.js} +1 -1
- package/web/app/immutable/nodes/{5.BMBYYbKi.js → 5.C5OySrRk.js} +2 -2
- package/web/app/immutable/nodes/{6.BIo4yUgT.js → 6.BrxG9qCf.js} +1 -1
- package/web/app/immutable/nodes/{7.DdNd4GXX.js → 7.CvdabbdY.js} +1 -1
- package/web/app/immutable/nodes/8.BSQtFfFS.js +15 -0
- package/web/app/immutable/nodes/{9.kCWJBZ1N.js → 9.D6DS9Z9f.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +18 -18
- package/web/app/immutable/chunks/4Qt-u50Z.js +0 -1
- package/web/app/immutable/chunks/B--T3tY0.js +0 -19
- package/web/app/immutable/chunks/BJzlL5VK.js +0 -1
- package/web/app/immutable/chunks/C7-4lB53.js +0 -6
- package/web/app/immutable/chunks/CR8nwpLC.js +0 -1
- package/web/app/immutable/chunks/CduK2Osu.js +0 -1
- package/web/app/immutable/chunks/CmTfIBH2.js +0 -2
- package/web/app/immutable/chunks/DakbBhJV.js +0 -1
- package/web/app/immutable/chunks/DclJ6-AA.js +0 -1
- package/web/app/immutable/chunks/DozYGPQ1.js +0 -1
- package/web/app/immutable/entry/start.DW0TPq6E.js +0 -1
- package/web/app/immutable/nodes/8.Cp6GdAVQ.js +0 -15
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as Mt,bq as ae,_ as Vr,a_ as re,by as Ut,bu as be,bs as Zt,b as jt,bo as d}from"./DozYGPQ1.js";import{bs as Et,ca as ke,aD as e,bH as u,a5 as R,bA as P,W as s,bn as zt,bV as O,c9 as i,aA as oe,c6 as Ot,ay as ue,be as Ge,b$ as et,b_ as C,bO as g,bS as p,bl as S,aB as k,bj as Ar,aw as tt,ai as Nr,c5 as pr,a as gr,a7 as je,aj as vt,cd as Wr,br as Br}from"./DYhIMPy1.js";import{F as mr,G as Or}from"./BBvT7Bb8.js";import{s as rt,l as yt,k as or,h as Pt}from"./CBE9bOjQ.js";import{c as St}from"./MJGmlCLu.js";import{b as _r}from"./BaIAhI85.js";import{HQ as A,nk as hr,u$ as wr,u_ as br,K3 as qr,K4 as Hr,eB as Kr,eC as Xr,Ju as ir,lv as qt,B5 as nr,rE as sr,nI as Jr,yI as Yr,a9 as lr,Ik as Gr,IB as Zr,mW as Qr,iM as ea,nm as ta,uq as ra,z3 as aa,Jt as oa}from"./DYepVMa7.js";import{g as ia}from"./DfN8_dcw.js";import{a as na,g as sa,i as la,c as da,h as ca,d as ua,e as dr,f as fa,b as Ht}from"./Dld3dCA-.js";import{by as va,bL as pa,dm as ga}from"./SrOLwB5L.js";import{w as cr,d as ma}from"./gV7ZxrZ2.js";import{f as _a}from"./CDFwOYFZ.js";import{n as Kt}from"./4o1DPfmL.js";import{f as Fe,ax as ha}from"./DkrIcKd4.js";import"./B30Ssr1r.js";import{F as Qe,ab as wa,at as ba,aX as xa,b1 as Tt,co as ya,cp as Pa,bk as $a,cN as ka,c5 as Ia}from"./CpEHCOut.js";import{g as Ca,i as Fa,w as ur}from"./Dlalsrb2.js";import{c as Sa}from"./ChTqQfQN.js";import"./CnlzKY2y.js";import{V as Da}from"./VKC6gzws.js";import{i as Xt,b as Ta,a as Ra}from"./H2jLkRRS.js";import{C as Yt,p as Ma}from"./Cmsg1-Jz.js";import{M as Ua}from"./DDhu5Shq.js";import{t as Jt,u as xr}from"./C72zM9oE.js";import"./9Lm8k_8r.js";import"./D_FHOcPH.js";import{M as Dt}from"./BigdBsL9.js";import{V as ja}from"./CMeoq2YD.js";import{bN as Ea,b4 as za}from"./VKc1-U2z.js";import{al as La}from"./CZFJH8pA.js";const yr=A.createSelector((Y,x)=>hr(Y.pdfPreview.previews,x));var Va=k('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),Aa=k('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function Gt(Y,x){if(new.target)return Mt({component:Gt,...Y});Et(x,!0);const Ie=()=>be(xe,"$preview",at),[at,ie]=Zt();let $=ae(x,"workspaceId",7),ne=ae(x,"filePath",7),Ce=ae(x,"gitRootId",7);const Se=crypto.randomUUID(),xe=yr(Se),_e=new WeakMap;let Q=O(null),He=O(void 0),N=O(1),B=O(1),se=O(!0),E=O(!1),ze=O(null),Ne=O(0);const ye=i(()=>Ie()?.error??e(ze)),De=i(()=>e(ye)==="missing"?d.file_pdf_missing_error():e(ye)==="large"?d.file_pdf_large_error():e(ye)==="invalid"?d.file_pdf_invalid_error():e(ye)==="password"?d.file_pdf_password_error():d.file_pdf_load_error());ke(()=>{const l=$(),y=ne();e(Ne);const z=crypto.randomUUID();return A.dispatch(wr(Se,z,l,y,...Ce()?[{gitRootId:Ce()}]:[])),()=>{A.dispatch(br(Se,z))}}),ke(()=>{const l=Ie()?.url;let y=!1,z;if(u(Q,null),u(ze,null),u(se,!0),u(N,1),u(B,1),!!l)return(async()=>{try{const{loadPdfDocument:X}=await Vr(async()=>{const{loadPdfDocument:he}=await import("./cb1JHFKl.js");return{loadPdfDocument:he}},[],import.meta.url);if(y)return;z=X(l);const le=await z.promise;y||u(Q,le)}catch(X){if(y)return;u(ze,X instanceof Error&&X.name==="PasswordException"?"password":X instanceof Error&&X.name==="InvalidPDFException"?"invalid":"load",!0)}finally{y||u(se,!1)}})(),()=>{y=!0,z?.destroy()}}),ke(()=>{const l=e(Q),y=e(He),z=e(N),X=e(B);if(!l||!y)return;let le=!1,he,U;const de=()=>{if(!U)return;const J=(_e.get(U)??1)-1;J?_e.set(U,J):(_e.delete(U),U.cleanup()),U=void 0};return u(E,!0),(async()=>{try{if(U=await l.getPage(z),_e.set(U,(_e.get(U)??0)+1),le){de();return}const J=U.getViewport({scale:X}),ee=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));y.width=Math.ceil(J.width*ee),y.height=Math.ceil(J.height*ee),y.style.width=`${J.width}px`,y.style.height=`${J.height}px`,he=U.render({canvas:y,viewport:J,transform:[ee,0,0,ee,0,0]}),await he.promise}catch{le||u(ze,"invalid")}finally{le||u(E,!1)}})(),()=>{le=!0,he?.cancel(),he?he.promise.then(de,de):de()}});var We={get workspaceId(){return $()},set workspaceId(l){$(l),oe()},get filePath(){return ne()},set filePath(l){ne(l),oe()},get gitRootId(){return Ce()},set gitRootId(l){Ce(l),oe()},$set:Ut,$on:(l,y)=>jt(x,l,y)},o=Aa(),c=R(o);{var M=l=>{{const y=X=>{Ge();var le=et();C(()=>g(le,e(De))),s(X,le)};let z=i(()=>d.ui_combobox_retry_label());Ca(l,{onRetry:()=>Ot(Ne),get retryLabel(){return e(z)},class:"m-auto",message:y,$$slots:{message:!0}})}},m=l=>{{let y=i(()=>d.file_pdf_loading_label());Fa(l,{get label(){return e(y)},count:1,class:"p-4"})}},w=l=>{var y=Va(),z=ue(y),X=R(z);{let ge=i(()=>e(N)<=1);Fe(X,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N,-1),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_previous_label()]),s(Pe,$e)},$$slots:{default:!0}})}var le=p(X,2),he=S(le,!0),U=p(le,2);{let ge=i(()=>e(N)>=e(Q).numPages);Fe(U,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_next_label()]),s(Pe,$e)},$$slots:{default:!0}})}var de=p(U,2);{let ge=i(()=>e(B)<=.25);Fe(de,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.max(.25,e(B)-.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomOut_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}var J=p(de,2),ee=S(J,!0),ot=p(J,2);{let ge=i(()=>e(B)>=3);Fe(ot,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.min(3,e(B)+.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomIn_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}P(z);var it=p(z,2),Ke=R(it);let Ze;_r(Ke,ge=>u(He,ge),()=>e(He)),P(it),C((ge,Pe,Xe)=>{g(he,ge),g(ee,Pe),rt(it,"aria-busy",e(E)),rt(Ke,"aria-label",Xe),Ze=yt(Ke,"",Ze,{visibility:e(E)?"hidden":"visible"})},[()=>d.file_pdf_page_label({page:Jt(e(N)),total:Jt(e(Q).numPages)}),()=>xr(e(B),{style:"percent"}),()=>d.file_pdf_canvas_ariaLabel({name:ne(),page:Jt(e(N))})]),s(l,y)};re(c,l=>{e(ye)?l(M):e(se)||Ie()?.status==="loading"?l(m,1):e(Q)&&l(w,2)})}P(o),s(Y,o);var Le=zt(We);return ie(),Le}const Na=A.createSelector((Y,x)=>hr(Y.videoPreview.previews,x));var Wa=k('<p role="status"> </p>'),Ba=k('<p role="alert"> </p>'),Oa=k('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),qa=k('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),Ha=k('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Pr(Y,x){if(new.target)return Mt({component:Pr,...Y});Et(x,!0);const Ie=()=>be(He,"$preview",at),[at,ie]=Zt();let $=ae(x,"sourceUrl",7),ne=ae(x,"fileName",7),Ce=ae(x,"allowDownload",7),Se=ae(x,"downloading",7),xe=ae(x,"onDownload",7),_e=O(null);const Q=crypto.randomUUID(),He=Na(Q),N=i(()=>Ie()?.status==="loading"),B=i(()=>e(_e)??Ie()?.error);let se=!1,E=!1;Ar(()=>{E=!0,A.dispatch(qr(Q))});function ze(){if(E||e(N))return;const m=$().startsWith("workspace-file://")?new URL($()):null;if(se||!m||!m.pathname.toLowerCase().endsWith(".mp4")){u(_e,"unsupported");return}se=!0,m.searchParams.set("preview","h264"),A.dispatch(Hr(Q,m.hostname,m.toString()))}function Ne(m){if(E)return;const w=m.currentTarget.error?.code;w===2?u(_e,"network"):w!==1&&ze()}var ye={get sourceUrl(){return $()},set sourceUrl(m){$(m),oe()},get fileName(){return ne()},set fileName(m){ne(m),oe()},get allowDownload(){return Ce()},set allowDownload(m){Ce(m),oe()},get downloading(){return Se()},set downloading(m){Se(m),oe()},get onDownload(){return xe()},set onDownload(m){xe(m),oe()},$set:Ut,$on:(m,w)=>jt(x,m,w)},De=Ha(),We=R(De);{var o=m=>{var w=Oa(),Le=R(w),l=S(Le,!0),y=p(Le,2);{var z=U=>{var de=Wa(),J=S(de,!0);C(ee=>g(J,ee),[()=>d.editor_fileViewer_videoPreparing_label()]),s(U,de)},X=U=>{var de=Ba(),J=S(de,!0);C(ee=>g(J,ee),[()=>e(B)==="network"?d.editor_fileViewer_videoLoad_error():d.editor_fileViewer_videoUnsupported_label()]),s(U,de)};re(y,U=>{e(N)?U(z):U(X,-1)})}var le=p(y,2);{var he=U=>{Fe(U,{variant:"secondary",size:"sm",get onclick(){return xe()},get disabled(){return Se()},children:(de,J)=>{Ge();var ee=et();C(ot=>g(ee,ot),[()=>d.layout_fileTab_downloadFile_label()]),s(de,ee)},$$slots:{default:!0}})};re(le,U=>{Ce()&&U(he)})}P(w),C(()=>g(l,ne())),s(m,w)},c=m=>{var w=qa(),Le=S(w,!0);C(l=>{rt(w,"src",Ie()?.url??$()),g(Le,l)},[()=>d.editor_fileViewer_videoUnsupported_label()]),tt("error",w,Ne),tt("loadedmetadata",w,l=>{l.currentTarget.videoWidth===0&&ze()}),s(m,w)};re(We,m=>{e(B)||e(N)?m(o):m(c,-1)})}P(De),s(Y,De);var M=zt(ye);return ie(),M}var Ka=k('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),Xa=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ja=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ya=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),Ga=k("<!> ",1),Za=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),Qa=k('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),eo=k('<td class="border border-border px-2 py-1 text-xs"> </td>'),to=k("<tr></tr>"),ro=k('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),ao=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),oo=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),io=k('<div class="h-full flex flex-col"><!></div>');function Rt(Y,x){if(new.target)return Mt({component:Rt,...Y});Et(x,!0);const Ie=t=>{var a=Ka(),f=ue(a);{let D=i(()=>d.editor_fileViewer_zoomOut_tooltip());Fe(f,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:de,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return ya},size:"sm"})},$$slots:{default:!0}})}var _=p(f,2),h=S(_,!0),j=p(_,2);{let D=i(()=>d.editor_fileViewer_zoomIn_tooltip());Fe(j,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:U,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return Pa},size:"sm"})},$$slots:{default:!0}})}Ge(2),C(()=>g(h,e(ze))),s(t,a)},at=Sa("FileViewer");let ie=ae(x,"filePath",7),$=ae(x,"fileContent",7,""),ne=ae(x,"sourceUrl",7),Ce=ae(x,"language",7),Se=ae(x,"isBinary",7),xe=ae(x,"allowDownload",7,!0),_e=ae(x,"onDownload",7),Q=ae(x,"downloading",7,!1);const He=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},N=i(()=>He(ie())),B=i(()=>ie().split("/").pop()||d.editor_fileViewer_unknown_fallback());let se=O(100),E=O(0);const ze=i(()=>xr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let Ne=O(!1),ye=O(0),De=O(0),We=O(0),o=O(0),c=O(!1),M=null;function m(){const t=M;M=null,u(c,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function w(t){if(t.button!==0||!t.isPrimary||M)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),M={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},u(c,!0),t.preventDefault()}function Le(t){if(!(!M||t.pointerId!==M.pointerId)){if((t.buttons&1)===0){m();return}u(We,M.viewport.scrollLeft,!0),u(o,M.viewport.scrollTop,!0),u(ye,e(ye)+(t.clientX-M.x)),u(De,e(De)+(t.clientY-M.y)),M.x=t.clientX,M.y=t.clientY}}function l(t){t.pointerId===M?.pointerId&&m()}ke(()=>{ie(),ne(),e(se),e(E),u(We,0),u(o,0)}),ke(()=>(ie(),ne(),pr(()=>{m(),u(ye,0),u(De,0)}),m));const y=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},z=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},X=()=>{if(ne())return ne();if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():Se()?`data:${y(ie())};base64,${$()}`:`data:${y(ie())};base64,${$()}`;if($()instanceof ArrayBuffer){const a=new Uint8Array($()).reduce((_,h)=>_+String.fromCharCode(h),""),f=btoa(a);return`data:${y(ie())};base64,${f}`}return""},le=()=>{if(ne())return ne();const t=z(ie());if(!t)return"";if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():`data:${t};base64,${$()}`;const a=new Uint8Array($()),f=[],_=32768;for(let h=0;h<a.length;h+=_)f.push(String.fromCharCode(...a.subarray(h,h+_)));return`data:${t};base64,${btoa(f.join(""))}`},he=()=>{const t=typeof $()=="string"?new TextEncoder().encode($()):new Uint8Array($()),a=[],f=32768;for(let _=0;_<t.length;_+=f)a.push(String.fromCharCode(...t.subarray(_,_+f)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},U=()=>{u(se,Math.min(e(se)+25,500),!0)},de=()=>{u(se,Math.max(e(se)-25,25),!0)},J=()=>{u(E,(e(E)+90)%360)},ee=()=>{if(!xe()||Q())return;if(_e()){_e()();return}const t=document.createElement("a");t.href=e(N)==="video"?le():e(N)==="svg"?he():X(),t.download=e(B),t.click()},ot=async()=>{try{const t=X(),a=new Image;a.crossOrigin="anonymous";const f=await new Promise((_,h)=>{a.onload=()=>{const j=document.createElement("canvas");j.width=a.naturalWidth,j.height=a.naturalHeight;const D=j.getContext("2d");if(!D){h(new Error("Failed to get canvas context"));return}D.drawImage(a,0,0),j.toBlob(T=>{T?_(T):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),u(Ne,!0),setTimeout(()=>u(Ne,!1),2e3)}catch(t){at.error("Failed to copy image:",t)}},it=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},Ke=t=>t.split(`
|
|
1
|
+
import{t as Mt,bq as ae,_ as Vr,a_ as re,by as Ut,bu as be,bs as Zt,b as jt,bo as d}from"./eK7OULll.js";import{bs as Et,ca as ke,aD as e,bH as u,a5 as R,bA as P,W as s,bn as zt,bV as O,c9 as i,aA as oe,c6 as Ot,ay as ue,be as Ge,b$ as et,b_ as C,bO as g,bS as p,bl as S,aB as k,bj as Ar,aw as tt,ai as Nr,c5 as pr,a as gr,a7 as je,aj as vt,cd as Wr,br as Br}from"./DYhIMPy1.js";import{F as mr,G as Or}from"./Dix9BiYu.js";import{s as rt,l as yt,k as or,h as Pt}from"./DZtstCLQ.js";import{c as St}from"./DFcwI6Rh.js";import{b as _r}from"./BaIAhI85.js";import{HR as A,nk as hr,u$ as wr,u_ as br,K4 as qr,K5 as Hr,eB as Kr,eC as Xr,Jv as ir,lv as qt,B5 as nr,rE as sr,nI as Jr,yI as Yr,a9 as lr,Il as Gr,IC as Zr,mW as Qr,iM as ea,nm as ta,uq as ra,z3 as aa,Ju as oa}from"./Bo4s1kgI.js";import{g as ia}from"./DfN8_dcw.js";import{a as na,g as sa,i as la,c as da,h as ca,d as ua,e as dr,f as fa,b as Ht}from"./o5rEX9Xy.js";import{by as va,bL as pa,dm as ga}from"./C-RJDuZ9.js";import{w as cr,d as ma}from"./BDgfVkJh.js";import{f as _a}from"./BXean12D.js";import{n as Kt}from"./-x_SoK5J.js";import{f as Fe,ax as ha}from"./CVjlpAWj.js";import"./p5gLe3PS.js";import{F as Qe,ab as wa,at as ba,aX as xa,b1 as Tt,co as ya,cp as Pa,bk as $a,cN as ka,c5 as Ia}from"./B0JWnOsx.js";import{g as Ca,i as Fa,w as ur}from"./w6mFE4SD.js";import{c as Sa}from"./ChTqQfQN.js";import"./dmSYAakE.js";import{V as Da}from"./pnKMO5U0.js";import{i as Xt,b as Ta,a as Ra}from"./H2jLkRRS.js";import{C as Yt,p as Ma}from"./B6DUgu-2.js";import{M as Ua}from"./Cja4W1Zb.js";import{t as Jt,u as xr}from"./DYfBNrOV.js";import"./D6dCvfQe.js";import"./Bok30zBH.js";import{M as Dt}from"./nLw8YrmA.js";import{V as ja}from"./D7q-DSVP.js";import{bN as Ea,b4 as za}from"./C0VXEpDj.js";import{al as La}from"./D2zJp5fS.js";const yr=A.createSelector((Y,x)=>hr(Y.pdfPreview.previews,x));var Va=k('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),Aa=k('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function Gt(Y,x){if(new.target)return Mt({component:Gt,...Y});Et(x,!0);const Ie=()=>be(xe,"$preview",at),[at,ie]=Zt();let $=ae(x,"workspaceId",7),ne=ae(x,"filePath",7),Ce=ae(x,"gitRootId",7);const Se=crypto.randomUUID(),xe=yr(Se),_e=new WeakMap;let Q=O(null),He=O(void 0),N=O(1),B=O(1),se=O(!0),E=O(!1),ze=O(null),Ne=O(0);const ye=i(()=>Ie()?.error??e(ze)),De=i(()=>e(ye)==="missing"?d.file_pdf_missing_error():e(ye)==="large"?d.file_pdf_large_error():e(ye)==="invalid"?d.file_pdf_invalid_error():e(ye)==="password"?d.file_pdf_password_error():d.file_pdf_load_error());ke(()=>{const l=$(),y=ne();e(Ne);const z=crypto.randomUUID();return A.dispatch(wr(Se,z,l,y,...Ce()?[{gitRootId:Ce()}]:[])),()=>{A.dispatch(br(Se,z))}}),ke(()=>{const l=Ie()?.url;let y=!1,z;if(u(Q,null),u(ze,null),u(se,!0),u(N,1),u(B,1),!!l)return(async()=>{try{const{loadPdfDocument:X}=await Vr(async()=>{const{loadPdfDocument:he}=await import("./cb1JHFKl.js");return{loadPdfDocument:he}},[],import.meta.url);if(y)return;z=X(l);const le=await z.promise;y||u(Q,le)}catch(X){if(y)return;u(ze,X instanceof Error&&X.name==="PasswordException"?"password":X instanceof Error&&X.name==="InvalidPDFException"?"invalid":"load",!0)}finally{y||u(se,!1)}})(),()=>{y=!0,z?.destroy()}}),ke(()=>{const l=e(Q),y=e(He),z=e(N),X=e(B);if(!l||!y)return;let le=!1,he,U;const de=()=>{if(!U)return;const J=(_e.get(U)??1)-1;J?_e.set(U,J):(_e.delete(U),U.cleanup()),U=void 0};return u(E,!0),(async()=>{try{if(U=await l.getPage(z),_e.set(U,(_e.get(U)??0)+1),le){de();return}const J=U.getViewport({scale:X}),ee=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));y.width=Math.ceil(J.width*ee),y.height=Math.ceil(J.height*ee),y.style.width=`${J.width}px`,y.style.height=`${J.height}px`,he=U.render({canvas:y,viewport:J,transform:[ee,0,0,ee,0,0]}),await he.promise}catch{le||u(ze,"invalid")}finally{le||u(E,!1)}})(),()=>{le=!0,he?.cancel(),he?he.promise.then(de,de):de()}});var We={get workspaceId(){return $()},set workspaceId(l){$(l),oe()},get filePath(){return ne()},set filePath(l){ne(l),oe()},get gitRootId(){return Ce()},set gitRootId(l){Ce(l),oe()},$set:Ut,$on:(l,y)=>jt(x,l,y)},o=Aa(),c=R(o);{var M=l=>{{const y=X=>{Ge();var le=et();C(()=>g(le,e(De))),s(X,le)};let z=i(()=>d.ui_combobox_retry_label());Ca(l,{onRetry:()=>Ot(Ne),get retryLabel(){return e(z)},class:"m-auto",message:y,$$slots:{message:!0}})}},m=l=>{{let y=i(()=>d.file_pdf_loading_label());Fa(l,{get label(){return e(y)},count:1,class:"p-4"})}},w=l=>{var y=Va(),z=ue(y),X=R(z);{let ge=i(()=>e(N)<=1);Fe(X,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N,-1),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_previous_label()]),s(Pe,$e)},$$slots:{default:!0}})}var le=p(X,2),he=S(le,!0),U=p(le,2);{let ge=i(()=>e(N)>=e(Q).numPages);Fe(U,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_next_label()]),s(Pe,$e)},$$slots:{default:!0}})}var de=p(U,2);{let ge=i(()=>e(B)<=.25);Fe(de,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.max(.25,e(B)-.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomOut_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}var J=p(de,2),ee=S(J,!0),ot=p(J,2);{let ge=i(()=>e(B)>=3);Fe(ot,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.min(3,e(B)+.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomIn_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}P(z);var it=p(z,2),Ke=R(it);let Ze;_r(Ke,ge=>u(He,ge),()=>e(He)),P(it),C((ge,Pe,Xe)=>{g(he,ge),g(ee,Pe),rt(it,"aria-busy",e(E)),rt(Ke,"aria-label",Xe),Ze=yt(Ke,"",Ze,{visibility:e(E)?"hidden":"visible"})},[()=>d.file_pdf_page_label({page:Jt(e(N)),total:Jt(e(Q).numPages)}),()=>xr(e(B),{style:"percent"}),()=>d.file_pdf_canvas_ariaLabel({name:ne(),page:Jt(e(N))})]),s(l,y)};re(c,l=>{e(ye)?l(M):e(se)||Ie()?.status==="loading"?l(m,1):e(Q)&&l(w,2)})}P(o),s(Y,o);var Le=zt(We);return ie(),Le}const Na=A.createSelector((Y,x)=>hr(Y.videoPreview.previews,x));var Wa=k('<p role="status"> </p>'),Ba=k('<p role="alert"> </p>'),Oa=k('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),qa=k('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),Ha=k('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Pr(Y,x){if(new.target)return Mt({component:Pr,...Y});Et(x,!0);const Ie=()=>be(He,"$preview",at),[at,ie]=Zt();let $=ae(x,"sourceUrl",7),ne=ae(x,"fileName",7),Ce=ae(x,"allowDownload",7),Se=ae(x,"downloading",7),xe=ae(x,"onDownload",7),_e=O(null);const Q=crypto.randomUUID(),He=Na(Q),N=i(()=>Ie()?.status==="loading"),B=i(()=>e(_e)??Ie()?.error);let se=!1,E=!1;Ar(()=>{E=!0,A.dispatch(qr(Q))});function ze(){if(E||e(N))return;const m=$().startsWith("workspace-file://")?new URL($()):null;if(se||!m||!m.pathname.toLowerCase().endsWith(".mp4")){u(_e,"unsupported");return}se=!0,m.searchParams.set("preview","h264"),A.dispatch(Hr(Q,m.hostname,m.toString()))}function Ne(m){if(E)return;const w=m.currentTarget.error?.code;w===2?u(_e,"network"):w!==1&&ze()}var ye={get sourceUrl(){return $()},set sourceUrl(m){$(m),oe()},get fileName(){return ne()},set fileName(m){ne(m),oe()},get allowDownload(){return Ce()},set allowDownload(m){Ce(m),oe()},get downloading(){return Se()},set downloading(m){Se(m),oe()},get onDownload(){return xe()},set onDownload(m){xe(m),oe()},$set:Ut,$on:(m,w)=>jt(x,m,w)},De=Ha(),We=R(De);{var o=m=>{var w=Oa(),Le=R(w),l=S(Le,!0),y=p(Le,2);{var z=U=>{var de=Wa(),J=S(de,!0);C(ee=>g(J,ee),[()=>d.editor_fileViewer_videoPreparing_label()]),s(U,de)},X=U=>{var de=Ba(),J=S(de,!0);C(ee=>g(J,ee),[()=>e(B)==="network"?d.editor_fileViewer_videoLoad_error():d.editor_fileViewer_videoUnsupported_label()]),s(U,de)};re(y,U=>{e(N)?U(z):U(X,-1)})}var le=p(y,2);{var he=U=>{Fe(U,{variant:"secondary",size:"sm",get onclick(){return xe()},get disabled(){return Se()},children:(de,J)=>{Ge();var ee=et();C(ot=>g(ee,ot),[()=>d.layout_fileTab_downloadFile_label()]),s(de,ee)},$$slots:{default:!0}})};re(le,U=>{Ce()&&U(he)})}P(w),C(()=>g(l,ne())),s(m,w)},c=m=>{var w=qa(),Le=S(w,!0);C(l=>{rt(w,"src",Ie()?.url??$()),g(Le,l)},[()=>d.editor_fileViewer_videoUnsupported_label()]),tt("error",w,Ne),tt("loadedmetadata",w,l=>{l.currentTarget.videoWidth===0&&ze()}),s(m,w)};re(We,m=>{e(B)||e(N)?m(o):m(c,-1)})}P(De),s(Y,De);var M=zt(ye);return ie(),M}var Ka=k('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),Xa=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ja=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ya=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),Ga=k("<!> ",1),Za=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),Qa=k('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),eo=k('<td class="border border-border px-2 py-1 text-xs"> </td>'),to=k("<tr></tr>"),ro=k('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),ao=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),oo=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),io=k('<div class="h-full flex flex-col"><!></div>');function Rt(Y,x){if(new.target)return Mt({component:Rt,...Y});Et(x,!0);const Ie=t=>{var a=Ka(),f=ue(a);{let D=i(()=>d.editor_fileViewer_zoomOut_tooltip());Fe(f,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:de,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return ya},size:"sm"})},$$slots:{default:!0}})}var _=p(f,2),h=S(_,!0),j=p(_,2);{let D=i(()=>d.editor_fileViewer_zoomIn_tooltip());Fe(j,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:U,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return Pa},size:"sm"})},$$slots:{default:!0}})}Ge(2),C(()=>g(h,e(ze))),s(t,a)},at=Sa("FileViewer");let ie=ae(x,"filePath",7),$=ae(x,"fileContent",7,""),ne=ae(x,"sourceUrl",7),Ce=ae(x,"language",7),Se=ae(x,"isBinary",7),xe=ae(x,"allowDownload",7,!0),_e=ae(x,"onDownload",7),Q=ae(x,"downloading",7,!1);const He=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},N=i(()=>He(ie())),B=i(()=>ie().split("/").pop()||d.editor_fileViewer_unknown_fallback());let se=O(100),E=O(0);const ze=i(()=>xr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let Ne=O(!1),ye=O(0),De=O(0),We=O(0),o=O(0),c=O(!1),M=null;function m(){const t=M;M=null,u(c,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function w(t){if(t.button!==0||!t.isPrimary||M)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),M={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},u(c,!0),t.preventDefault()}function Le(t){if(!(!M||t.pointerId!==M.pointerId)){if((t.buttons&1)===0){m();return}u(We,M.viewport.scrollLeft,!0),u(o,M.viewport.scrollTop,!0),u(ye,e(ye)+(t.clientX-M.x)),u(De,e(De)+(t.clientY-M.y)),M.x=t.clientX,M.y=t.clientY}}function l(t){t.pointerId===M?.pointerId&&m()}ke(()=>{ie(),ne(),e(se),e(E),u(We,0),u(o,0)}),ke(()=>(ie(),ne(),pr(()=>{m(),u(ye,0),u(De,0)}),m));const y=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},z=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},X=()=>{if(ne())return ne();if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():Se()?`data:${y(ie())};base64,${$()}`:`data:${y(ie())};base64,${$()}`;if($()instanceof ArrayBuffer){const a=new Uint8Array($()).reduce((_,h)=>_+String.fromCharCode(h),""),f=btoa(a);return`data:${y(ie())};base64,${f}`}return""},le=()=>{if(ne())return ne();const t=z(ie());if(!t)return"";if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():`data:${t};base64,${$()}`;const a=new Uint8Array($()),f=[],_=32768;for(let h=0;h<a.length;h+=_)f.push(String.fromCharCode(...a.subarray(h,h+_)));return`data:${t};base64,${btoa(f.join(""))}`},he=()=>{const t=typeof $()=="string"?new TextEncoder().encode($()):new Uint8Array($()),a=[],f=32768;for(let _=0;_<t.length;_+=f)a.push(String.fromCharCode(...t.subarray(_,_+f)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},U=()=>{u(se,Math.min(e(se)+25,500),!0)},de=()=>{u(se,Math.max(e(se)-25,25),!0)},J=()=>{u(E,(e(E)+90)%360)},ee=()=>{if(!xe()||Q())return;if(_e()){_e()();return}const t=document.createElement("a");t.href=e(N)==="video"?le():e(N)==="svg"?he():X(),t.download=e(B),t.click()},ot=async()=>{try{const t=X(),a=new Image;a.crossOrigin="anonymous";const f=await new Promise((_,h)=>{a.onload=()=>{const j=document.createElement("canvas");j.width=a.naturalWidth,j.height=a.naturalHeight;const D=j.getContext("2d");if(!D){h(new Error("Failed to get canvas context"));return}D.drawImage(a,0,0),j.toBlob(T=>{T?_(T):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),u(Ne,!0),setTimeout(()=>u(Ne,!1),2e3)}catch(t){at.error("Failed to copy image:",t)}},it=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},Ke=t=>t.split(`
|
|
2
2
|
`).map(f=>f.split(",").map(_=>_.trim()));var Ze={get filePath(){return ie()},set filePath(t){ie(t),oe()},get fileContent(){return $()},set fileContent(t=""){$(t),oe()},get sourceUrl(){return ne()},set sourceUrl(t){ne(t),oe()},get language(){return Ce()},set language(t){Ce(t),oe()},get isBinary(){return Se()},set isBinary(t){Se(t),oe()},get allowDownload(){return xe()},set allowDownload(t=!0){xe(t),oe()},get onDownload(){return _e()},set onDownload(t){_e(t),oe()},get downloading(){return Q()},set downloading(t=!1){Q(t),oe()},$set:Ut,$on:(t,a)=>jt(x,t,a)},ge=io();tt("blur",gr,m);var Pe=R(ge);{var Xe=t=>{var a=Xa(),f=R(a),_=R(f);Ie(_);var h=p(_,2);{let te=i(()=>d.editor_fileViewer_rotate_tooltip());Fe(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(te)},children:(we,Te)=>{Qe(we,{get icon(){return wa},size:"sm"})},$$slots:{default:!0}})}var j=p(h,4);{let te=i(()=>d.editor_fileViewer_copyImage_tooltip());Fe(j,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ot,get title(){return e(te)},children:(we,Te)=>{var Ee=je(),Be=ue(Ee);{var Vt=Je=>{Qe(Je,{get icon(){return ba},size:"sm",class:"text-green-500"})},pt=Je=>{Qe(Je,{get icon(){return xa},size:"sm"})};re(Be,Je=>{e(Ne)?Je(Vt):Je(pt,-1)})}s(we,Ee)},$$slots:{default:!0}})}var D=p(j,2);{let te=i(()=>!xe()||Q()),we=i(()=>d.editor_fileViewer_download_tooltip());Fe(D,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ee,get disabled(){return e(te)},get title(){return e(we)},children:(Te,Ee)=>{Qe(Te,{get icon(){return Tt},size:"sm"})},$$slots:{default:!0}})}var T=p(D,2),q=S(T,!0);P(f);var L=p(f,2),G=S(L);P(a),C(te=>{g(q,e(B)),or(L,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(c)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),yt(L,`--pan-scroll-x: ${e(We)??""}px; --pan-scroll-y: ${e(o)??""}px;`),rt(G,"src",te),rt(G,"alt",e(B)),yt(G,`translate: ${e(ye)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(E)??""}deg); transition: transform 0.2s;`)},[()=>X()]),vt("pointerdown",L,w),vt("pointermove",L,Le),vt("pointerup",L,l),tt("pointercancel",L,l),tt("lostpointercapture",L,l),s(t,a)},$e=t=>{var a=Ja(),f=R(a),_=R(f);Ie(_);var h=p(_,2);{let L=i(()=>!xe()||Q()),G=i(()=>d.editor_fileViewer_download_tooltip());Fe(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ee,get disabled(){return e(L)},get title(){return e(G)},children:(te,we)=>{Qe(te,{get icon(){return Tt},size:"sm"})},$$slots:{default:!0}})}var j=p(h,2),D=S(j,!0);P(f);var T=p(f,2),q=S(T);P(a),C(L=>{g(D,e(B)),or(T,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(c)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),yt(T,`--pan-scroll-x: ${e(We)??""}px; --pan-scroll-y: ${e(o)??""}px;`),rt(q,"src",L),rt(q,"alt",e(B)),yt(q,`translate: ${e(ye)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>he()]),vt("pointerdown",T,w),vt("pointermove",T,Le),vt("pointerup",T,l),tt("pointercancel",T,l),tt("lostpointercapture",T,l),s(t,a)},fe=t=>{const a=i(le);var f=je(),_=ue(f);mr(_,()=>ie()+e(a),h=>{Pr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return xe()},get downloading(){return Q()},onDownload:ee})}),s(t,f)},nt=t=>{var a=Ya(),f=p(R(a),2),_=S(f,!0),h=p(f,2),j=R(h),D=p(j);P(h),P(a),C((T,q)=>{g(_,e(B)),rt(j,"src",T),g(D,` ${q??""}`)},[()=>X(),()=>d.editor_fileViewer_audioUnsupported_label()]),s(t,a)},$t=t=>{var a=Za(),f=p(R(a),2),_=S(f,!0),h=p(f,2);{let j=i(()=>!xe()||Q());Fe(h,{size:"sm",variant:"secondary",onclick:ee,get disabled(){return e(j)},children:(D,T)=>{var q=Ga(),L=ue(q);Qe(L,{get icon(){return Tt},size:"sm",class:"mr-2"});var G=p(L);C(te=>g(G,` ${te??""}`),[()=>d.editor_fileViewer_downloadPdf_label()]),s(D,q)},$$slots:{default:!0}})}P(a),C(j=>g(_,j),[()=>d.editor_fileViewer_pdfUnavailable_label()]),s(t,a)},ct=t=>{{let a=i(()=>it($().toString()));Yt(t,{get value(){return e(a)},language:"json",get fileName(){return ie()},lineNumbers:!0,readOnly:!0})}},ut=t=>{const a=i(()=>Ke($().toString()));var f=ro(),_=R(f),h=R(_),j=R(h);Pt(j,23,()=>e(a)[0]||[],(T,q)=>`header-${q}-${T}`,(T,q)=>{var L=Qa(),G=S(L,!0);C(()=>g(G,e(q))),s(T,L)}),P(j),P(h);var D=p(h);Pt(D,23,()=>e(a).slice(1),(T,q)=>`row-${q}`,(T,q,L)=>{var G=to();Pt(G,23,()=>e(q),(te,we)=>`cell-${e(L)}-${we}`,(te,we)=>{var Te=eo(),Ee=S(Te,!0);C(()=>g(Ee,e(we))),s(te,Te)}),P(G),s(T,G)}),P(D),P(_),P(f),s(t,f)},kt=t=>{var a=ao(),f=p(R(a),2),_=S(f,!0),h=p(f,2),j=S(h,!0);P(a),C(D=>{g(_,e(B)),g(j,D)},[()=>d.editor_fileViewer_archive_label()]),s(t,a)},Lt=t=>{var a=oo(),f=p(R(a),2),_=S(f,!0),h=p(f,2),j=S(h,!0);P(a),C(D=>{g(_,e(B)),g(j,D)},[()=>d.editor_fileViewer_binary_label()]),s(t,a)},It=t=>{{let a=i(()=>$().toString());Yt(t,{get value(){return e(a)},get language(){return Ce()},get fileName(){return ie()},lineNumbers:!0,highlightActiveLine:!0})}};re(Pe,t=>{e(N)==="image"?t(Xe):e(N)==="svg"?t($e,1):e(N)==="video"?t(fe,2):e(N)==="audio"?t(nt,3):e(N)==="pdf"?t($t,4):e(N)==="json"?t(ct,5):e(N)==="csv"?t(ut,6):e(N)==="archive"?t(kt,7):e(N)==="binary"?t(Lt,8):t(It,-1)})}return P(ge),s(Y,ge),zt(Ze)}Nr(["pointerdown","pointermove","pointerup"]);const no=/access denied|permission denied|outside (?:the )?workspace/i,so=/file not found|no such file or directory/i;function lo(Y){return no.test(Y)?"access-denied":Y===d.files_read_notFound_error()||so.test(Y)?"not-found":"generic"}function co(Y){switch(Y){case"access-denied":return d.layout_fileTab_errorAccessDenied_label();case"not-found":return d.layout_fileTab_errorNotFound_label();case"generic":return d.layout_fileTab_errorGeneric_label()}}var uo=k("<!> <!>",1),fo=k("<!> <!> <!>",1),vo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),fr=k('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),po=k('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),vr=k('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),go=k('<div class="flex items-center gap-3"><!> <!></div>'),mo=k('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),_o=k('<p class="text-xs"> </p>'),ho=k("<li><!></li>"),wo=k('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),bo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),xo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),yo=k('<div class="h-full overflow-auto p-4"><!></div>');function Po(Y,x){if(new.target)return Mt({component:Po,...Y});Et(x,!0);const Ie=()=>be($e,"$workspace",E),at=()=>be(X,"$fileContentStore",E),ie=()=>be(le,"$fileLoadingStore",E),$=()=>be(he,"$fileSavingStore",E),ne=()=>be(U,"$fileErrorStore",E),Ce=()=>be(de,"$fileNotFoundCandidatesStore",E),Se=()=>be(J,"$isFileBinaryStore",E),xe=()=>be(ee,"$isFileDirtyStore",E),_e=()=>be(ot,"$fileLastUpdatedStore",E),Q=()=>be(it,"$ftChanges$",E),He=()=>be(Xe,"$gutterRead$",E),N=()=>be(De,"$lineWrapping",E),B=()=>be(We,"$diffIndicators",E),se=()=>be(ge,"$rootMediaPreview",E),[E,ze]=Zt(),Ne=r=>{var n=uo(),I=ue(n);{var F=pe=>{var Ve=je(),Oe=ue(Ve);St(Oe,()=>Dt,(ft,_t)=>{_t(ft,{get icon(){return $a},get label(){return e(_)},disabled:!0})}),s(pe,Ve)};re(I,pe=>{!e(te)&&!e(l)&&!e(t)&&pe(F)})}var ve=p(I,2);{var Re=pe=>{{let Ve=i(()=>!e(Ct)||!e(L)),Oe=i(()=>!e(l)&&(!e(Ct)||!e(L)));ja(pe,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Ct)},get previewEnabled(){return e(L)},onTogglePreview:()=>u(L,!e(L)),get showWrap(){return e(Ve)},get wrapEnabled(){return N()},onToggleWrap:()=>A.dispatch(Zr()),get showDiff(){return e(Oe)},get diffEnabled(){return B()},onToggleDiff:()=>A.dispatch(Gr())})}};re(ve,pe=>{o().filePath&&!e(te)&&!e(t)&&pe(Re)})}s(r,n)},ye=r=>{var n=je(),I=ue(n);{var F=ve=>{var Re=fo(),pe=ue(Re);{var Ve=Ae=>{var Ye=je(),lt=ue(Ye);{let ht=i(()=>d.layout_fileTab_goToChanges_tooltip());St(lt,()=>Dt,(wt,bt)=>{bt(wt,{get icon(){return Ia},get label(){return e(ht)},onclick:Tr})})}s(Ae,Ye)};re(pe,Ae=>{e(kr)&&Ae(Ve)})}var Oe=p(pe,2);{var ft=Ae=>{var Ye=je(),lt=ue(Ye);{let ht=i(()=>d.layout_fileTab_downloadFile_label()),wt=i(()=>!e(gt)||e(st));St(lt,()=>Dt,(bt,Nt)=>{Nt(bt,{get icon(){return Tt},get label(){return e(ht)},onclick:Ft,get disabled(){return e(wt)}})})}s(Ae,Ye)};re(Oe,Ae=>{e(Be)&&Ae(ft)})}var _t=p(Oe,2);{let Ae=i(()=>d.layout_fileTab_deleteFile_tooltip());St(_t,()=>Dt,(Ye,lt)=>{lt(Ye,{get icon(){return ka},get label(){return e(Ae)},onclick:Rr,destructive:!0})})}s(ve,Re)};re(I,ve=>{o().filePath&&!e(te)&&!e(l)&&ve(F)})}s(r,n)},De=Ea(),We=za();let o=ae(x,"tab",7),c=ae(x,"workspaceId",7),M=ae(x,"isActive",7),m=ae(x,"isPanelFocused",7);ke(()=>{const r=c();if(!(!M()||!r||e(w)))return A.dispatch(Kr(r,"files")),()=>A.dispatch(Xr(r,"files"))});const w=i(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),Le=i(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),l=i(()=>!!e(w)),y=i(()=>o().filePath?_a(o().filePath,e(w)):o().filePath),z=Wr(e(y));ke(()=>{z.set(e(y))});const X=na(c(),z),le=sa(c(),z),he=la(c(),z),U=da(c(),z),de=ca(c(),z),J=ua(c(),z),ee=dr(c(),z),ot=fa(c(),z),it=va(c()),Ke=ia(),Ze=crypto.randomUUID(),ge=yr(Ze),Pe=`file-gutter:${crypto.randomUUID()}`,Xe=pa(c(),Pe),$e=ga(c()),fe=i(()=>Ie()?.worktreePath||Ie()?.repositoryPath||Ie()?.path||null),nt=i(at),$t=i(ie),ct=i($),ut=i(ne),kt=i(()=>e(ut)?lo(e(ut)):"generic"),Lt=5,It=i(()=>(Ce()??[]).slice(0,Lt)),t=i(Se),a=i(xe),f=i(_e),_=i(()=>e(ct)?d.ui_saveIndicator_saving_tooltip():e(a)?d.ui_saveIndicator_autoSaving_tooltip():d.ui_saveIndicator_saved_tooltip());let h=O(null),j=O(Br([])),D=O(null),T=O(void 0),q=O(void 0),L=O(!0);ke(()=>{const r=o().data?.line,n=o().data?.jumpTimestamp;!r||n!==void 0&&n===e(q)||(u(q,n,!0),u(T,{line:r},!0),u(L,!1))});const G=i(()=>e(w)?cr(o().filePath,e(Le)):null),te=i(()=>e(w)?!e(G):!!(o().filePath&&(Ta(o().filePath)||e(fe)&&Ra(o().filePath,e(fe))))),we=i(()=>o().filePath&&e(fe)?Xt(o().filePath)?o().filePath:`${e(fe)}/${o().filePath}`:null),Te=i(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),Ee=i(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Be=i(()=>c()&&/^[A-Za-z0-9._-]+$/.test(c())?cr(o().filePath,e(fe)):null),Vt=i(()=>!e(w)&&e(Be)?e(Be).split("/").slice(0,-1).join("/"):void 0),pt=i(()=>e(Te)||e(Ee)?e(Be):null),Je=i(()=>e(w)&&e(Ee)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);ke(()=>{if(!M()||!e(w)||!e(G)||!e(Je))return;const r=crypto.randomUUID();return A.dispatch(wr(Ze,r,c(),e(G),{gitRootId:e(w),mimeType:e(Je)})),()=>A.dispatch(br(Ze,r))});let st=O(!1);const gt=i(()=>!!e(Be)&&!e($t)&&(!e(Ee)||e(D)===e(Be))),Qt=i(()=>e(D)&&c()?`workspace-file://${c()}/${e(D).split("/").map(encodeURIComponent).join("/")}`:null),At=i(()=>o().filePath?ta(o().filePath):"plaintext"),Ct=i(()=>e(At)==="markdown");ke(()=>{if(!M()||e(Te)||e(w))return;const r=e(pt),n=o().filePath,I=c(),F=o().id;if(u(D,null),!r||!n||!I)return;let ve=!1;const Re=()=>!ve&&c()===I&&o().id===F&&o().filePath===n;return(async()=>{let pe=!1;try{pe=(await ha("file.stat",{workspaceId:I,path:r}))?.isFile===!0}catch{}if(!Re())return;if(pe){u(D,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){u(D,r,!0);return}const{candidates:Ve,truncated:Oe}=await Da(I,r);if(Re()){if(!Oe&&Ve.length===1){A.dispatch(ir(I,n,Ve[0],F));return}u(D,r,!0)}})(),()=>{ve=!0}});function $r(r,n){return!!(r.file===n||r.relativePath===n||r.relativePath&&n.endsWith("/"+r.relativePath)||r.file&&n.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+n)||r.file&&r.file.endsWith("/"+n))}const mt=i(()=>e(l)||!o().filePath?null:Q().find(r=>$r(r,o().filePath))??null),kr=i(()=>!!e(mt));ke(()=>{if(e(l))return;const r=c(),n=o().filePath,I=e(fe);return()=>{if(!r||!n)return;const F=Ht.select(A.state,r,n);if(F?.kind!=="editable-text")return;const ve=qt(F.localContent),Re=dr.select(A.state,r,n),pe=Xt(n)?n:I?`${I}/${n}`:null;Re&&pe&&A.dispatch(nr(r,n,pe,ve))}}),ke(()=>{const r=o().filePath,n=e(we),I=c();if(!M())return;const F=!e(w)&&!!r&&Xt(r)&&!e(fe);r&&I&&!e(te)&&!e(Ee)&&!e(Te)&&!F&&(e(w)&&e(G)&&e(y)?A.dispatch(sr(I,e(y),n??r,{gitRoot:{id:e(w),relativePath:e(G)}})):A.dispatch(sr(I,r,n??r)))});function Ir(){return e(nt)??""}function Cr(r){e(l)||e(t)||!o().filePath||!c()||!e(we)||A.dispatch(oa(c(),o().filePath,qt(r)))}function Fr(){if(e(l)||e(t)||!o().filePath||!e(we)||e(nt)===null||e(ct))return;const r=Ht.select(A.state,c(),o().filePath);r?.kind==="editable-text"&&A.dispatch(nr(c(),o().filePath,e(we),qt(r.localContent)))}function Sr(r){const n=o().filePath;!n||!c()||(A.dispatch(aa(c(),n)),A.dispatch(ir(c(),n,r,o().id)))}ke(()=>{const r=o().filePath,n=e(mt);if(!r||!n){u(j,[],!0);return}if(!M())return;const I=c(),F=crypto.randomUUID();return A.dispatch(Jr(I,Pe,F,{kind:"diffs",path:r,staged:n.stage==="staged"})),()=>{A.dispatch(Yr(I,Pe,F))}}),ke(()=>{const r=He(),n=r?.result?.kind==="diffs"?r.result.chunks:[],I=n.find(F=>F.file===o().filePath)??n[0];u(j,I?Ma(I.chunks.map(F=>({oldStart:F.oldStart,oldLines:F.oldLines,newStart:F.newStart,newLines:F.newLines,lines:F.lines.map(ve=>(ve.type===lr.Addition?"+":ve.type===lr.Deletion?"-":" ")+ve.content)}))):[],!0)});function Dr(r){const n=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),I=Re=>Or(r,La(Re),n);if(I("editor.save")){r.preventDefault(),e(a)&&!e(ct)&&Fr();return}const F=I("editor.undo")?"undo":I("editor.redo")?"redo":I("editor.toggle-task-list")?"toggle-task-list":I("editor.copy")?"copy":I("editor.select-all")?"select-all":null;if(!F||e(l)&&F!=="copy"&&F!=="select-all")return;F!=="toggle-task-list"&&e(h)?.runShortcut(F)&&r.preventDefault()}function Tr(r){if(!o().filePath||!e(mt))return;const n=r?.metaKey||r?.ctrlKey||!1,F=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;A.dispatch(ra(c(),e(mt),{filePath:o().filePath,changeId:e(mt).id,openInAdjacentPanel:n,sourcePanelId:F}))}async function Ft(){const r=e(Be);if(!(e(l)||!r||!c()||!e(gt)||e(st))){u(st,!0);try{const n=await ma(c(),r,e(fe));!n?.success&&!n?.canceled&&Kt.error(n?.error?.message||d.layout_fileTab_downloadFailed_error())}catch{Kt.error(d.layout_fileTab_downloadFailed_error())}finally{u(st,!1)}}}function Rr(){const r=e(we);if(e(l)||!o().filePath||!c()||!r)return;const n=Qr(Ht.select(A.state,c(),o().filePath));if(!n){Kt.error(d.ui_reversibleActions_failed_error({message:d.fileExplorer_tree_undoUnavailable_error()}));return}A.dispatch(ea(c(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:n}))}ke(()=>{if(!Ke||!M())return;const r={isDirty:!e(l)&&e(a),isSaving:!e(l)&&e(ct)};pr(()=>{Ke.registerActions({display:Ne,actions:ye}),Ke.registerState(r)})});var Mr={get tab(){return o()},set tab(r){o(r),oe()},get workspaceId(){return c()},set workspaceId(r){c(r),oe()},get isActive(){return M()},set isActive(r){M(r),oe()},get isPanelFocused(){return m()},set isPanelFocused(r){m(r),oe()},$set:Ut,$on:(r,n)=>jt(x,r,n)},er=je();tt("keydown",gr,r=>M()&&Dr(r));var Ur=ue(er);{var jr=r=>{var n=je(),I=ue(n);mr(I,()=>o().filePath,F=>{var ve=je(),Re=ue(ve);{var pe=b=>{var v=vo(),V=R(v),H=S(V,!0),W=p(V,2),Me=S(W,!0);P(v),C(Z=>{g(H,Z),g(Me,o().filePath)},[()=>d.layout_fileTab_outsideWorkspace_label()]),s(b,v)},Ve=b=>{var v=je(),V=ue(v);{var H=W=>{Gt(W,{get workspaceId(){return c()},get filePath(){return e(G)},get gitRootId(){return e(w)}})};re(V,W=>{M()&&W(H)})}s(b,v)},Oe=b=>{var v=je(),V=ue(v);{var H=Z=>{var K=fr(),ce=R(K),Ue=S(ce,!0);P(K),C(me=>g(Ue,me),[()=>d.layout_fileTab_errorLoading_label()]),s(Z,K)},W=Z=>{Rt(Z,{get filePath(){return o().filePath},get sourceUrl(){return se().url},allowDownload:!1})},Me=Z=>{var K=po(),ce=R(K),Ue=S(ce,!0);P(K),C(me=>g(Ue,me),[()=>d.layout_fileTab_preparing_label()]),s(Z,K)};re(V,Z=>{se()?.error?Z(H):se()?.url?Z(W,1):Z(Me,-1)})}s(b,v)},ft=b=>{var v=je(),V=ue(v);{var H=W=>{Gt(W,{get workspaceId(){return c()},get filePath(){return e(pt)}})};re(V,W=>{M()&&W(H)})}s(b,v)},_t=b=>{var v=fr(),V=R(v),H=S(V,!0);P(v),C(W=>g(H,W),[()=>d.file_pdf_load_error()]),s(b,v)},Ae=b=>{{let v=i(()=>e(D)??o().filePath),V=i(()=>!e(l)&&e(gt));Rt(b,{get filePath(){return e(v)},get sourceUrl(){return e(Qt)},onDownload:Ft,get allowDownload(){return e(V)},get downloading(){return e(st)}})}},Ye=b=>{var v=vr(),V=R(v),H=S(V,!0);P(v),C(W=>g(H,W),[()=>d.layout_fileTab_preparing_label()]),s(b,v)},lt=b=>{var v=mo(),V=R(v);Pt(V,20,()=>[...Array(20).keys()],H=>H,(H,W)=>{var Me=go(),Z=R(Me);ur(Z,{class:"h-3 w-8 shrink-0"});var K=p(Z,2);ur(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),P(Me),s(H,Me)}),P(V),P(v),s(b,v)},ht=b=>{var v=bo(),V=R(v),H=S(V,!0),W=p(V,2),Me=S(W,!0),Z=p(W,2);{var K=me=>{var qe=_o(),dt=S(qe,!0);C(()=>g(dt,e(ut))),s(me,qe)};re(Z,me=>{e(kt)==="generic"&&me(K)})}var ce=p(Z,2);{var Ue=me=>{var qe=wo(),dt=ue(qe),Wt=S(dt,!0),tr=p(dt,2);Pt(tr,20,()=>e(It),xt=>xt,(xt,rr)=>{var Bt=ho(),zr=R(Bt);Fe(zr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Sr(rr),children:(Lr,$o)=>{Ge();var ar=et();C(()=>g(ar,rr)),s(Lr,ar)},$$slots:{default:!0}}),P(Bt),s(xt,Bt)}),P(tr),C(xt=>g(Wt,xt),[()=>d.layout_fileTab_didYouMean_label()]),s(me,qe)};re(ce,me=>{e(It).length>0&&me(Ue)})}P(v),C(me=>{g(H,me),g(Me,o().filePath)},[()=>co(e(kt))]),s(b,v)},wt=b=>{var v=xo(),V=R(v),H=S(V,!0),W=p(V,2),Me=S(W,!0),Z=p(W,2);{var K=ce=>{{let Ue=i(()=>!e(gt)||e(st));Fe(ce,{variant:"secondary",size:"sm",onclick:Ft,get disabled(){return e(Ue)},children:(me,qe)=>{Ge();var dt=et();C(Wt=>g(dt,Wt),[()=>d.layout_fileTab_downloadFile_label()]),s(me,dt)},$$slots:{default:!0}})}};re(Z,ce=>{!e(l)&&e(Be)&&ce(K)})}P(v),C(ce=>{g(H,ce),g(Me,o().filePath)},[()=>d.editor_fileViewer_binary_label()]),s(b,v)},bt=b=>{const v=i(()=>o().filePath?.toLowerCase().endsWith(".svg"));var V=je(),H=ue(V);{var W=K=>{{let ce=i(()=>o().filePath||""),Ue=i(()=>!e(l)&&e(gt));Rt(K,{get filePath(){return e(ce)},get fileContent(){return e(nt)},get language(){return e(At)},get isBinary(){return e(t)},onDownload:Ft,get allowDownload(){return e(Ue)},get downloading(){return e(st)}})}},Me=K=>{var ce=yo(),Ue=R(ce);Ua(Ue,{get content(){return e(nt)},get workspaceId(){return c()},get relativeMediaBase(){return e(Vt)},renderRichFencesAsCode:!0,renderDiagrams:!0}),P(ce),s(K,ce)},Z=K=>{var ce=Ir,Ue=Cr;{let me=i(()=>B()?e(j):[]);_r(Yt(K,{get value(){return ce()},set value(qe){Ue(qe)},get language(){return e(At)},get readOnly(){return e(l)},get fileName(){return o().filePath},get workspaceId(){return c()},get filePath(){return o().filePath},get lineWrapping(){return N()},get lineChanges(){return e(me)},get jumpTo(){return e(T)},get externalContentVersion(){return e(f)},get isPanelFocused(){return m()}}),qe=>u(h,qe,!0),()=>e(h))}};re(H,K=>{e(v)?K(W):e(Ct)&&e(L)?K(Me,1):K(Z,-1)})}s(b,V)},Nt=b=>{var v=vr(),V=R(v),H=S(V,!0);P(v),C(W=>g(H,W),[()=>d.layout_fileTab_preparing_label()]),s(b,v)};re(Re,b=>{e(te)?b(pe):e(w)&&e(Te)&&e(G)?b(Ve,1):e(w)&&e(Ee)?b(Oe,2):e(Te)&&e(pt)?b(ft,3):e(Te)?b(_t,4):e(Qt)?b(Ae,5):e(Ee)?b(Ye,6):e($t)?b(lt,7):e(ut)?b(ht,8):e(t)?b(wt,9):e(nt)!==null?b(bt,10):b(Nt,-1)})}s(F,ve)}),s(r,n)};re(Ur,r=>{o().filePath&&r(jr)})}s(Y,er);var Er=zt(Mr);return ze(),Er}export{Po as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r}from"./
|
|
1
|
+
import{g as r}from"./C11XjPnf.js";import{l as d}from"./ChTqQfQN.js";let n=!1,t=!1;function c(){if(!n)try{r.defineTheme("app-dark",{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#569cd6"},{token:"string",foreground:"#ce9178"},{token:"number",foreground:"#b5cea8"},{token:"comment",foreground:"#6a9955"}],colors:{"editor.background":"#1B1B23","editor.foreground":"#d4d4d4","editor.selectionBackground":"#264f78","editor.lineHighlightBackground":"#0B0B0E","diffEditor.insertedLineBackground":"#22c55e18","diffEditor.removedLineBackground":"#ef444418","diffEditor.insertedTextBackground":"#22c55e70","diffEditor.removedTextBackground":"#ef444470","diffEditorGutter.insertedLineBackground":"#22c55ecc","diffEditorGutter.removedLineBackground":"#ef4444cc","diffEditor.insertedTextBorder":"#22c55e99","diffEditor.removedTextBorder":"#ef444499","diffEditor.diagonalFill":"#374151","diffEditorOverview.insertedForeground":"#22c55ecc","diffEditorOverview.removedForeground":"#ef4444cc"}}),r.defineTheme("app-light",{base:"vs",inherit:!0,rules:[{token:"keyword",foreground:"#7c3aed"},{token:"keyword.control",foreground:"#7c3aed"},{token:"keyword.operator",foreground:"#7c3aed"},{token:"operator",foreground:"#374151"},{token:"variable",foreground:"#374151"},{token:"variable.other",foreground:"#374151"},{token:"variable.parameter",foreground:"#374151"},{token:"variable.language",foreground:"#7c3aed"},{token:"type",foreground:"#b45309"},{token:"class",foreground:"#b45309"},{token:"interface",foreground:"#b45309"},{token:"enum",foreground:"#b45309"},{token:"function",foreground:"#1d4ed8"},{token:"function.declaration",foreground:"#1d4ed8"},{token:"function.call",foreground:"#1d4ed8"},{token:"string",foreground:"#047857"},{token:"string.quoted",foreground:"#047857"},{token:"string.quoted.single",foreground:"#047857"},{token:"string.quoted.double",foreground:"#047857"},{token:"number",foreground:"#c2410c"},{token:"comment",foreground:"#6b7280"},{token:"comment.line",foreground:"#6b7280"},{token:"comment.block",foreground:"#6b7280"},{token:"invalid",foreground:"#b91c1c"}],colors:{"editor.background":"#ffffff","editor.foreground":"#1f2937","editor.lineNumbersBackground":"#f9fafb","editor.lineNumbersForeground":"#9ca3af","editor.selectionBackground":"#dbeafe","editor.lineHighlightBackground":"#f3f4f6","editorCursor.foreground":"#1f2937","editorWhitespace.foreground":"#e5e7eb","diffEditor.insertedLineBackground":"#22c55e18","diffEditor.removedLineBackground":"#ef444418","diffEditor.insertedTextBackground":"#22c55e70","diffEditor.removedTextBackground":"#ef444470","diffEditorGutter.insertedLineBackground":"#22c55ecc","diffEditorGutter.removedLineBackground":"#ef4444cc","diffEditor.insertedTextBorder":"#22c55e99","diffEditor.removedTextBorder":"#ef444499","diffEditor.diagonalFill":"#e5e7eb55","diffEditorOverview.insertedForeground":"#22c55ecc","diffEditorOverview.removedForeground":"#ef4444cc"}}),n=!0}catch(e){d.error("Failed to initialize Monaco themes:",e)}}function u(e){try{r.defineTheme("app-custom",e),r.setTheme("app-custom"),t=!0}catch(o){d.error("Failed to apply custom Monaco theme:",o)}}function a(e){try{t=!1,r.setTheme(e?"app-dark":"app-light")}catch(o){d.error("Failed to revert Monaco theme:",o)}}function g(e){return t?"app-custom":e?"app-dark":"app-light"}export{u as applyCustomMonacoTheme,c as defineMonacoThemes,g as getActiveMonacoThemeName,a as revertMonacoTheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{on as o}from"./Bo4s1kgI.js";import{aB as r}from"./C-RJDuZ9.js";function c(n,e){if(!e)return!0;const t=r.select(n,e);return!!t&&!o(t)}export{c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,B as w,ay as x}from"./
|
|
1
|
+
import{b as a,B as w,ay as x}from"./DwsRDnkS.js";var g=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=B(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{g as s};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{z as se,N as re,dC as O,cD as T,dm as oe,ak as ae,a$ as V,y as ie,dO as ue}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BD8I8FK1.js","/app/immutable/chunks/-x_SoK5J.js","/app/immutable/chunks/Dix9BiYu.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/eK7OULll.js","/app/immutable/chunks/UyBYtOpv.js","/app/immutable/chunks/DZtstCLQ.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CVjlpAWj.js","/app/immutable/chunks/p5gLe3PS.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/DFcwI6Rh.js","/app/immutable/chunks/XV0T3w4n.js","/app/immutable/chunks/BlOn95cv.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DYfBNrOV.js","/app/immutable/chunks/dmSYAakE.js","/app/immutable/chunks/Bo4s1kgI.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/B0JWnOsx.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/QSR6vsk4.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CxZuxrAL.js","/app/immutable/chunks/Dritbi2C.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/4iRc0E9v.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/B-WefpDP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{z as se,N as re,dC as O,cD as T,dm as oe,ak as ae,a$ as V,y as ie,dO as ue}from"./C-RJDuZ9.js";import{_ as R,bo as S}from"./eK7OULll.js";import{vd as ce,A_ as q,nk as f,vf as le,Cd as W,HR as c,cB as de,cC as fe,nl as G,n7 as me,c as E,fK as pe,g as ge,lz as he,cJ as Se}from"./Bo4s1kgI.js";import{bU as ye}from"./C0VXEpDj.js";import{x as be,J as Ae,ai as we,ar as Me}from"./DsRLPs6I.js";import{a as B}from"./DypB-Dwi.js";import{y as Ce}from"./aLZSbque.js";import{by as Ie}from"./CVjlpAWj.js";import{C as _e}from"./BvFAWM27.js";import{q as ve,v as Te}from"./DYfBNrOV.js";import{i as Re}from"./CvegPRPp.js";function $e(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function wt(e,t){return e.targetAgentId===t}function Mt(e){const t=e.element,n=e.viewport,s=$e(e),r=t?`<${t.tagName.toLowerCase()}> · ${s}`:e.title||s,o=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
|
|
3
3
|
`);return[{id:`${e.id}-image`,type:"file",label:r,imageData:e.image.data,imageMimeType:e.image.mimeType},{id:`${e.id}-context`,type:"selection",label:r,content:o}]}function ke(e,t){const n=t.filter(s=>s.type==="selection").flatMap(s=>s.content?.trim()?[s.content.trim()]:[]);return[e.trim(),...n].filter(Boolean).join(`
|
|
4
4
|
`)}function Ee(e){const t=e.filter(s=>(s.imageData||s.attachmentId)&&s.imageMimeType).map(s=>s.attachmentId?{type:"image",attachmentId:s.attachmentId,...s.imageMimeType.includes("/")?{mimeType:s.imageMimeType}:{}}:{type:"image",data:s.imageData,mimeType:s.imageMimeType,...s.placementFileName?{placementFileName:s.placementFileName}:{}}),n=e.filter(s=>s.attachmentId&&!s.imageMimeType).map(s=>({type:"file",attachmentId:s.attachmentId,fileName:s.label,...s.attachmentMimeType?{mimeType:s.attachmentMimeType}:{},...s.attachmentSize!==void 0?{size:s.attachmentSize}:{}}));return{imageBlocks:t,fileBlocks:n}}function Le(e=[],t=[],n=[]){const s=[];for(const r of t)r.type==="file"&&r.filePath?s.push(`[Currently viewing file: ${r.filePath}]`):r.type==="diff"&&r.filePath?s.push(`[Currently viewing diff for: ${r.filePath}]`):r.type==="note"&&r.noteId?s.push(`[Currently viewing note: "${r.label}" (ID: ${r.noteId}). Read it with ws.note.read("${r.noteId}").]`):r.type==="spec"?s.push("[Currently viewing: Spec]"):r.type==="browser"&&r.browserUrl&&s.push(`[Currently viewing browser: ${r.browserUrl}]`);for(const r of n){const o=r.text.trim(),a=o.length>500?o.substring(0,500)+"...":o,i=r.sourceLabel?` from ${r.sourceLabel}`:"";s.push(`[Selected text${i}:
|
|
5
5
|
\`\`\`
|
|
6
6
|
${a}
|
|
7
7
|
\`\`\`]`)}return ke(s.join(`
|
|
8
|
-
`),e)}function Ct(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const s=n(),{imageBlocks:r,fileBlocks:o}=Ee(s.contextItems);return{fields:{contextItems:s.contextItems,workspaceContextStr:Le(s.contextItems,s.checkedPanels,s.checkedSelections),noteIds:s.noteIds,...r.length>0?{imageBlocks:r}:{},...o.length>0?{fileBlocks:o}:{},...s.pickedMentions?{messageMetadata:s.pickedMentions}:{}},hasAttachments:r.length>0||o.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function It(e,t){if(e)return e.model}function xe({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function _t({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s=0}){return!(e?se(e):!1)&&!xe({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s})}function vt(e){return re(e.messageMetadata)}function He(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Tt(e){return He({...e,createdAt:Date.parse(e.queuedAt)})}const Pe="chat-read:",y=new Map,$=new Set;function Rt(e,t){let n=y.get(e);n||(n=new Set,y.set(e,n)),n.add(t)}function $t(e,t){const n=y.get(e);if(!(!n||!n.delete(t))&&n.size===0){y.delete(e);for(const s of[...$])s(e)}}function kt(e){return $.add(e),()=>$.delete(e)}function Et(e){return y.has(e)}function Lt(e){const t=y.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pe))return!0;return!1}function De(e,t,n){const s=e.state.pendingSubmissions.byAgentId[t.agentId];if(!s||!q(s.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(le(t,r));const o=e.state.pendingSubmissions.byAgentId[t.agentId];return o&&f(o.submissions,r.id)?r:null}function Oe(e,t,n,s,r){const o=O.select(e.state,n),a=T.select(e.state)?.principal.id,i=B(e.state);if(!o||!a||!i)return null;const u=be(t,n),l={agentId:t,workspaceId:n,principalId:a,participation:o,authority:i,owner:u.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},m=()=>u.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&O.select(e.state,n)===o&&T.select(e.state)?.principal.id===a&&B(e.state)===i;if(!m())return null;e.dispatch(ce(l,s,oe.select(e.state,n)));const d=De(e,l,r);return d?{scope:l,submission:d,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return m()&&!!h&&q(h.scope,l)&&(!!f(h.operations,d.id)||!!f(h.submissions,d.id))}}:null}function k(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const s=n.userAppMessageId??Ae();return Oe(e,t,n.wsId,T.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:s,destination:!n.forceSubmit&&ae.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function Be(e,t,n){const s=k(e,t,n);return s?(e.dispatch(W(t,{...n,userAppMessageId:s.submission.appMessageId,submission:{scope:s.scope,id:s.submission.id}})),!0):!1}async function Ue(e,t,n,s){const r=n.submission;if(!r)return"legacy";const o=r.reference,a=()=>o.scope.agentId===e&&o.scope.workspaceId===t&&V.select(c.state,e)===n?ye.select(c.state,o.scope):void 0,i=a();if(!i)return null;if(!i.supported)return"legacy";const u={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:s??n.options?.model};if(r.outcome==="rejected"){const p=f(i.tombstones,o.id);return f(i.submissions,o.id)||p&&p.reason!=="rejected"?null:k(c,e,u)}if(r.outcome==="accepted")return k(c,e,u);await Promise.all([we(e,t).catch(()=>{}),Me(e,t).catch(()=>{})]);const l=a();if(!l||f(l.submissions,o.id)?.status!=="uncertain")return null;const{notify:m}=await R(async()=>{const{notify:p}=await import("./D02FkLBh.js").then(ne=>ne.i);return{notify:p}},__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]),import.meta.url);if(a()!==l)return null;let d=!1;const h=()=>{d=!0};return m.warning(S.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${o.id}`,duration:Number.POSITIVE_INFINITY,action:{label:S.agent_chatSend_resend_label(),onClick:()=>{if(d)return;d=!0;const p=a();!p||p.generation!==l.generation||p.submissions!==l.submissions||p.observationVersion!==l.observationVersion||f(p.submissions,o.id)?.status!=="uncertain"||Be(c,e,u)}},cancel:{label:S.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function xt(e,t,n){const s=V.select(c.state,e),r=s?.submission?await Ue(e,t,s,n):"legacy";if(r){if(r==="legacy"){await c.dispatch(n===void 0?de(e,t):fe(e,t,n));return}!r.isCurrent()||!s||c.dispatch(W(e,{wsId:t,text:s.text,imageBlocks:s.options?.imageBlocks,fileBlocks:s.options?.fileBlocks,noteIds:s.options?.noteIds,messageMetadata:s.options?.messageMetadata,model:n??s.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Ht=c.createSelector((e,t)=>{const n=f(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:G(n.saves)}:void 0});function Ne(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==E.Deleted&&!t.notificationsMuted&&pe(t)==="topLevel"}function Fe(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Ce(e.metadata,t)?t:null}function Ve(e){return e.status===E.Error&&!ie(ue(e))}function Pt(e,t){return t.filter(n=>Ne(e,n)).flatMap(n=>{const s=me(n),r=Fe(n),o=n.status===E.Error;if(!s&&!r&&!o)return[];const a=s?.timestamp??(o?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:s?.kind??(o?"failed":"question"),reason:s?.reason,timestamp:a&&Number.isFinite(Date.parse(a))?a:void 0,questionMessageId:r,canRetry:Ve(n)}]})}function Dt(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ot(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function L(e){const t=Ie(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),s=t.repo.toLowerCase();return{owner:n,repo:s,number:t.number,id:`${n}/${s}#${t.number}`,url:`https://github.com/${n}/${s}/pull/${t.number}`}}function Bt(e,t,n,s){const r=e.filter(o=>s?s.includes(o.id):n?o.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(a=>a.owner?.toLowerCase()===o.repositoryOwner?.toLowerCase()&&a.name.toLowerCase()===o.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(o=>[...(o.pullRequests??[]).map(a=>a.url),o.activePullRequest?.url,o.prUrl]).flatMap(o=>{const a=o?L(o):null;return a?[[a.id,{owner:a.owner,repo:a.repo,number:a.number}]]:[]})).values()].sort((o,a)=>`${o.owner}/${o.repo}#${o.number}`.localeCompare(`${a.owner}/${a.repo}#${a.number}`))}function Ut(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Nt=c.createSelector(e=>e.homeIntegrations),Ft=c.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,s)=>(s.updatedAt??"").localeCompare(n.updatedAt??""))}}),K=c.createSelector(e=>G(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:L(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Vt=c.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?L(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return K.select(e).find(s=>s.url===n)??null}),qt=c.createSelector(e=>K.select(e).map(t=>t.url));let C=null;function Wt(e){return C=e,()=>{C===e&&(C=null)}}function Gt(){return C}function Kt(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function jt(e,t,n){if(e.length===0)return null;const s=t===null?-1:e.indexOf(t);return s===-1?e[0]:e[s+(n==="clockwise"?1:-1)]??null}let I=null;function zt(e){return I=e,()=>{I===e&&(I=null)}}function Qt(){return I}function Yt(e){return Te(e)}function qe(e){return ve(e)}function We(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function M(e){if(e.length===0)return[];const t=[];let n=null;for(const s of e){const r=s.timestamp?typeof s.timestamp=="string"?new Date(s.timestamp):s.timestamp:new Date;(!n||!We(n.date,r))&&(n={date:r,label:qe(r),messages:[]},t.push(n)),n.messages.push(s)}return t}function Jt(e){const t=new Map;return e.map(({date:n})=>{const s=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(s)??0;return t.set(s,r+1),r===0?s:`${s}#${r}`})}function Xt(e,t){const n=new Map;let s=t?null:void 0;for(const[r,o]of e.groups.entries()){r===e.gapBeforeGroupIndex&&(s=void 0);for(const a of o.messages)s!==void 0&&n.set(a.id,s),a.role==="user"&&!Re(a)&&(s=a)}return n}function Ge(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function v(e,t){const n=new Map;return e.map(s=>{const r=`${t}-${Ge(s.date)}`,o=(n.get(r)??0)+1;return n.set(r,o),{...s,groupKey:o===1?r:`${r}-${o}`}})}function Ke(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(o=>o.id)),s=new Set(t.map(o=>o.appMessageId).filter(o=>typeof o=="string"&&o.length>0)),r=e.filter(o=>!n.has(o.id)&&!(typeof o.appMessageId=="string"&&o.appMessageId.length>0&&s.has(o.appMessageId)));return r.length===e.length?e:r}function Zt(e,t,n){if(e=Ke(e,t),e.length===0)return{groups:M(t),gapBeforeGroupIndex:null};if(!n)return{groups:v(M([...e,...t]),"d"),gapBeforeGroupIndex:null};const s=v(M(e),"h"),r=v(M(t),"t");return{groups:[...s,...r],gapBeforeGroupIndex:s.length}}function en(e){const{scrollTop:t,threshold:n,fetching:s,exhausted:r,historyCount:o,tailCount:a,tailTruncated:i,totalMessages:u,spacerAbove:l=0}=e;return t>n+l||s||r?!1:o>0||i||u>a+o}const tn=300;function nn(e){const{fetching:t,chainEvaluationPending:n,visible:s,hideArmed:r}=e;return t||n?s&&!r?"none":"show":s&&!r?"arm-hide":"none"}const U=24,je=320;function x(e){return Number.isFinite(e)?Math.min(je,Math.max(U,e)):U}const ze=.2,Qe=.12;function Ye(e,t,n=ze){const s=x(t);return e===null||!Number.isFinite(e)?s:e+n*(s-e)}function sn(e,t){const n=x(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function rn(e){const{totalMessages:t,residentCount:n,exhausted:s,residentContentHeight:r,currentSpacerHeight:o,viewportHeight:a}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Ye(i,r/n));const u=e.unloadedRows??t-n,m=s||t<=0||n<=0||u<=0||i===null?0:Math.round(u*i),d=Math.abs(m-o);return d===0?{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}:m===0||o===0||d>o*Qe||a>0&&d>a?{spacerHeight:m,rowHeightEma:i,applied:!0,scrollTopDelta:m-o}:{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Je=_e,Xe=2;function on(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:s,pageSize:r=Je,nearPages:o=Xe}=e;if(n<=0||t>=n)return"serial";const a=x(s??Number.NaN);return(n-Math.max(0,t))/a>o*r?"seek":"serial"}const j=200,Ze=1;function an(e,t,n=j){const s=t.timestamp-n;return[...e.filter(r=>r.timestamp>=s),t]}function un(e){const{samples:t,viewportHeight:n,windowMs:s=j,viewportFactor:r=Ze}=e;if(n<=0||t.length<2)return"gentle";const o=t[t.length-1].timestamp-s,a=t.filter(u=>u.timestamp>=o);if(a.length<2)return"gentle";let i=0;for(let u=1;u<a.length;u+=1)i+=Math.abs(a[u].scrollTop-a[u-1].scrollTop);return i>n*r?"rapid":"gentle"}function cn(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:s}=e;if(s<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(s-1,Math.max(0,Math.floor(r*s)))}function ln(e){const{totalMessages:t,residentCount:n,exhausted:s,startOrdinalEstimate:r,gapToTail:o}=e,a=Math.max(0,t-n);if(a===0)return{above:0,below:0};if(!o)return{above:s?0:a,below:0};if(s)return{above:0,below:a};if(r!==null){const u=Math.min(a,Math.max(0,Math.round(r)));return{above:u,below:a-u}}const i=Math.min(a,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:a-i,below:i}}function dn(e){const{exhausted:t,historyCount:n,tailCount:s,tailTruncated:r,totalMessages:o}=e;return t?!0:n>0?!1:!r&&o<=s}const z=new Map;function Q(e,t){return`${e}\0${t}`}function fn(e,t){return z.get(Q(e,t))}function mn(e,t,n){z.set(Q(e,t),n)}const pn=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.userMessageIndexes,n):void 0}),gn=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.retryAgents,n):void 0});function et(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const o=e/1e3,a=o.toFixed(1);return a.endsWith(".0")?`${Math.round(o)}s`:`${a}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${s}m ${r}s`:`${s}m ${r}s`}function hn(e){return et(Math.max(1e3,Math.round(e/1e3)*1e3))}const tt=new Set(["launch","init","session-create","session-load","prompt"]),nt=new Set(["tool-call","tool-waiting"]);function st(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function Sn(e){return e&&tt.has(e)?"pulse":e&&nt.has(e)?"twist":"bloom"}const Y="stalled";function yn(e,t){const n=st(e);return!n||n.phase!==Y||typeof t=="number"&&t>n.timestamp?null:n}function bn(e){let t=null;for(const n of e)n.phase!==Y&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const N={get title(){return S.chat_streamingStatus_sessionCorrupted_title()},get message(){return S.chat_streamingStatus_sessionCorrupted_message()}};function An(e,t){return e?t===!0?{corrupted:!0,title:N.title,message:N.message,detail:e}:{corrupted:!1,title:S.chat_streamingStatus_responseFailed_label(),message:e,detail:null}:null}const wn=c.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),Mn=c.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Cn=c.createSelector(e=>{const t=[];for(const o of Object.values(e.panelLayout.byWorkspaceId))for(const a of Object.values(o.panels))for(const i of a.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),s=new Set(e.agentSessions.agentIdsByWorkspace[ge]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(o=>s.has(o)),dividerSessionAgentIds:n,openAgentTabIds:t}}),In=c.createSelector((e,t)=>f(e.questionUi.consumers,t)),rt=3e4,A=new Map;function _n(e,t){const n=A.get(e);n&&clearTimeout(n.timer);const s=setTimeout(()=>A.delete(e),rt);A.set(e,{value:t,timer:s})}function vn(e){const t=A.get(e);if(t)return clearTimeout(t.timer),A.delete(e),t.value}const J=c.createSelector((e,t,n)=>e.agentWorkers?.byKey[Se(t,n)]??he),ot=c.createSelector((e,t,n)=>{const s=J.select(e,t,n);return s.status==="unsupported"?[]:(s.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Tn=c.createSelector((e,t,n)=>{const s=J.select(e,t,n);return s.status==="failed"?!0:s.status!=="ready"||!s.snapshot?!1:s.snapshot.truncated?!0:s.snapshot.support.status!=="supported"&&ot.select(e,t,n).length>0}),at=1e3,X={requireViewedAndFocused:!0,requireAssistantTail:!0},w=new Map,g=new Map;let b=null;function H(e){(e===void 0||b===e)&&(b=null)}const it=200;function ut(e,t){if(g.delete(e),g.set(e,t),g.size>it){const n=g.keys().next().value;n!==void 0&&g.delete(n)}}function Z(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function Rn(e){return Z(e)?.id??null}function $n(e){P(e,{requireViewedAndFocused:!0})}function kn(e){P(e,{requireViewedAndFocused:!1})}function En(e){H(),P(e,X)}function Ln(e){b===e&&(w.has(e)||(b=null,D(e,X)))}function xn(e){for(const t of e)typeof t!="string"||t.length===0||(ee(t),H(t),D(t,{requireViewedAndFocused:!1}))}function ee(e){const t=w.get(e);t&&(clearTimeout(t.timer),w.delete(e))}function P(e,t){ee(e),H(e);const n=setTimeout(()=>{w.delete(e),D(e,t)},at);w.set(e,{timer:n,gates:t})}let F=null;function ct(){return F??=Promise.all([R(()=>import("./_p09hiud.js"),__vite__mapDeps([25,17,18,3,19,20,13,5,9,4,2,26,27]),import.meta.url),R(()=>import("./C7-4lB53.js").then(e=>e.Z),__vite__mapDeps([28,29,4,3,17,18,19,20,13,5,9,2,8,6,7,10,11,12,14,30,31,32,33]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),F}async function D(e,t){let n=null;try{const{appStore:s,appClient:r}=await ct(),o=s.state;if(t.requireViewedAndFocused&&(o.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const a=o.agentSessions?.byAgentId[e];if(!a)return;const i=typeof a.workspaceId=="string"?a.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&o.chatState?.byAgentId[e]?.initialHistoryPending){b=e;return}const u=Z(a.messages??[]);if(!u){t.requireAssistantTail&&(b=e);return}if(t.requireAssistantTail&&u.role!=="assistant")return;const l=u.id;if(g.get(e)===l)return;ut(e,l),n=l,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:l})).success&&g.get(e)===n&&g.delete(e)}catch{n!==null&&g.get(e)===n&&g.delete(e)}}const _=new Map;function te(e,t){return`${e}\0${t}`}function Hn(e,t){return _.get(te(e,t))}function Pn(e,t,n){_.set(te(e,t),n)}function Dn(e){if(e.length===0)return;const t=new Set(e);for(const n of[..._.keys()]){const s=n.slice(n.indexOf("\0")+1);t.has(s)&&_.delete(n)}}export{rn as $,bn as A,Sn as B,Et as C,Lt as D,Kt as E,Xt as F,dn as G,Pe as H,vt as I,cn as J,xn as K,Ln as L,at as M,$n as N,tn as O,kn as P,En as Q,j as R,Rn as S,nn as T,kt as U,U as V,He as W,Ct as X,Ue as Y,Tt as Z,zt as _,Rt as a,Wt as a0,$t as a1,H as a2,xt as a3,It as a4,sn as a5,ot as a6,J as a7,Tn as a8,Ht as a9,Mn as aa,Cn as ab,wn as ac,Nt as ad,Vt as ae,Ft as af,qt as ag,K as ah,In as ai,gn as aj,pn as ak,Pn as al,mn as am,en as an,Ut as ao,ln as ap,_n as aq,jt as ar,Be as as,vn as at,k as b,an as c,wt as d,Mt as e,Jt as f,Le as g,_t as h,un as i,on as j,Dn as k,Bt as l,Zt as m,An as n,Ot as o,Ke as p,Ee as q,hn as r,Yt as s,yn as t,Hn as u,fn as v,Qt as w,Pt as x,Gt as y,Dt as z};
|
|
8
|
+
`),e)}function Ct(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const s=n(),{imageBlocks:r,fileBlocks:o}=Ee(s.contextItems);return{fields:{contextItems:s.contextItems,workspaceContextStr:Le(s.contextItems,s.checkedPanels,s.checkedSelections),noteIds:s.noteIds,...r.length>0?{imageBlocks:r}:{},...o.length>0?{fileBlocks:o}:{},...s.pickedMentions?{messageMetadata:s.pickedMentions}:{}},hasAttachments:r.length>0||o.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function It(e,t){if(e)return e.model}function xe({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function _t({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s=0}){return!(e?se(e):!1)&&!xe({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s})}function vt(e){return re(e.messageMetadata)}function He(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Tt(e){return He({...e,createdAt:Date.parse(e.queuedAt)})}const Pe="chat-read:",y=new Map,$=new Set;function Rt(e,t){let n=y.get(e);n||(n=new Set,y.set(e,n)),n.add(t)}function $t(e,t){const n=y.get(e);if(!(!n||!n.delete(t))&&n.size===0){y.delete(e);for(const s of[...$])s(e)}}function kt(e){return $.add(e),()=>$.delete(e)}function Et(e){return y.has(e)}function Lt(e){const t=y.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pe))return!0;return!1}function De(e,t,n){const s=e.state.pendingSubmissions.byAgentId[t.agentId];if(!s||!q(s.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(le(t,r));const o=e.state.pendingSubmissions.byAgentId[t.agentId];return o&&f(o.submissions,r.id)?r:null}function Oe(e,t,n,s,r){const o=O.select(e.state,n),a=T.select(e.state)?.principal.id,i=B(e.state);if(!o||!a||!i)return null;const u=be(t,n),l={agentId:t,workspaceId:n,principalId:a,participation:o,authority:i,owner:u.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},m=()=>u.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&O.select(e.state,n)===o&&T.select(e.state)?.principal.id===a&&B(e.state)===i;if(!m())return null;e.dispatch(ce(l,s,oe.select(e.state,n)));const d=De(e,l,r);return d?{scope:l,submission:d,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return m()&&!!h&&q(h.scope,l)&&(!!f(h.operations,d.id)||!!f(h.submissions,d.id))}}:null}function k(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const s=n.userAppMessageId??Ae();return Oe(e,t,n.wsId,T.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:s,destination:!n.forceSubmit&&ae.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function Be(e,t,n){const s=k(e,t,n);return s?(e.dispatch(W(t,{...n,userAppMessageId:s.submission.appMessageId,submission:{scope:s.scope,id:s.submission.id}})),!0):!1}async function Ue(e,t,n,s){const r=n.submission;if(!r)return"legacy";const o=r.reference,a=()=>o.scope.agentId===e&&o.scope.workspaceId===t&&V.select(c.state,e)===n?ye.select(c.state,o.scope):void 0,i=a();if(!i)return null;if(!i.supported)return"legacy";const u={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:s??n.options?.model};if(r.outcome==="rejected"){const p=f(i.tombstones,o.id);return f(i.submissions,o.id)||p&&p.reason!=="rejected"?null:k(c,e,u)}if(r.outcome==="accepted")return k(c,e,u);await Promise.all([we(e,t).catch(()=>{}),Me(e,t).catch(()=>{})]);const l=a();if(!l||f(l.submissions,o.id)?.status!=="uncertain")return null;const{notify:m}=await R(async()=>{const{notify:p}=await import("./BD8I8FK1.js").then(ne=>ne.i);return{notify:p}},__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]),import.meta.url);if(a()!==l)return null;let d=!1;const h=()=>{d=!0};return m.warning(S.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${o.id}`,duration:Number.POSITIVE_INFINITY,action:{label:S.agent_chatSend_resend_label(),onClick:()=>{if(d)return;d=!0;const p=a();!p||p.generation!==l.generation||p.submissions!==l.submissions||p.observationVersion!==l.observationVersion||f(p.submissions,o.id)?.status!=="uncertain"||Be(c,e,u)}},cancel:{label:S.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function xt(e,t,n){const s=V.select(c.state,e),r=s?.submission?await Ue(e,t,s,n):"legacy";if(r){if(r==="legacy"){await c.dispatch(n===void 0?de(e,t):fe(e,t,n));return}!r.isCurrent()||!s||c.dispatch(W(e,{wsId:t,text:s.text,imageBlocks:s.options?.imageBlocks,fileBlocks:s.options?.fileBlocks,noteIds:s.options?.noteIds,messageMetadata:s.options?.messageMetadata,model:n??s.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Ht=c.createSelector((e,t)=>{const n=f(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:G(n.saves)}:void 0});function Ne(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==E.Deleted&&!t.notificationsMuted&&pe(t)==="topLevel"}function Fe(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Ce(e.metadata,t)?t:null}function Ve(e){return e.status===E.Error&&!ie(ue(e))}function Pt(e,t){return t.filter(n=>Ne(e,n)).flatMap(n=>{const s=me(n),r=Fe(n),o=n.status===E.Error;if(!s&&!r&&!o)return[];const a=s?.timestamp??(o?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:s?.kind??(o?"failed":"question"),reason:s?.reason,timestamp:a&&Number.isFinite(Date.parse(a))?a:void 0,questionMessageId:r,canRetry:Ve(n)}]})}function Dt(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ot(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function L(e){const t=Ie(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),s=t.repo.toLowerCase();return{owner:n,repo:s,number:t.number,id:`${n}/${s}#${t.number}`,url:`https://github.com/${n}/${s}/pull/${t.number}`}}function Bt(e,t,n,s){const r=e.filter(o=>s?s.includes(o.id):n?o.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(a=>a.owner?.toLowerCase()===o.repositoryOwner?.toLowerCase()&&a.name.toLowerCase()===o.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(o=>[...(o.pullRequests??[]).map(a=>a.url),o.activePullRequest?.url,o.prUrl]).flatMap(o=>{const a=o?L(o):null;return a?[[a.id,{owner:a.owner,repo:a.repo,number:a.number}]]:[]})).values()].sort((o,a)=>`${o.owner}/${o.repo}#${o.number}`.localeCompare(`${a.owner}/${a.repo}#${a.number}`))}function Ut(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Nt=c.createSelector(e=>e.homeIntegrations),Ft=c.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,s)=>(s.updatedAt??"").localeCompare(n.updatedAt??""))}}),K=c.createSelector(e=>G(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:L(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Vt=c.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?L(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return K.select(e).find(s=>s.url===n)??null}),qt=c.createSelector(e=>K.select(e).map(t=>t.url));let C=null;function Wt(e){return C=e,()=>{C===e&&(C=null)}}function Gt(){return C}function Kt(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function jt(e,t,n){if(e.length===0)return null;const s=t===null?-1:e.indexOf(t);return s===-1?e[0]:e[s+(n==="clockwise"?1:-1)]??null}let I=null;function zt(e){return I=e,()=>{I===e&&(I=null)}}function Yt(){return I}function Qt(e){return Te(e)}function qe(e){return ve(e)}function We(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function M(e){if(e.length===0)return[];const t=[];let n=null;for(const s of e){const r=s.timestamp?typeof s.timestamp=="string"?new Date(s.timestamp):s.timestamp:new Date;(!n||!We(n.date,r))&&(n={date:r,label:qe(r),messages:[]},t.push(n)),n.messages.push(s)}return t}function Jt(e){const t=new Map;return e.map(({date:n})=>{const s=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(s)??0;return t.set(s,r+1),r===0?s:`${s}#${r}`})}function Xt(e,t){const n=new Map;let s=t?null:void 0;for(const[r,o]of e.groups.entries()){r===e.gapBeforeGroupIndex&&(s=void 0);for(const a of o.messages)s!==void 0&&n.set(a.id,s),a.role==="user"&&!Re(a)&&(s=a)}return n}function Ge(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function v(e,t){const n=new Map;return e.map(s=>{const r=`${t}-${Ge(s.date)}`,o=(n.get(r)??0)+1;return n.set(r,o),{...s,groupKey:o===1?r:`${r}-${o}`}})}function Ke(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(o=>o.id)),s=new Set(t.map(o=>o.appMessageId).filter(o=>typeof o=="string"&&o.length>0)),r=e.filter(o=>!n.has(o.id)&&!(typeof o.appMessageId=="string"&&o.appMessageId.length>0&&s.has(o.appMessageId)));return r.length===e.length?e:r}function Zt(e,t,n){if(e=Ke(e,t),e.length===0)return{groups:M(t),gapBeforeGroupIndex:null};if(!n)return{groups:v(M([...e,...t]),"d"),gapBeforeGroupIndex:null};const s=v(M(e),"h"),r=v(M(t),"t");return{groups:[...s,...r],gapBeforeGroupIndex:s.length}}function en(e){const{scrollTop:t,threshold:n,fetching:s,exhausted:r,historyCount:o,tailCount:a,tailTruncated:i,totalMessages:u,spacerAbove:l=0}=e;return t>n+l||s||r?!1:o>0||i||u>a+o}const tn=300;function nn(e){const{fetching:t,chainEvaluationPending:n,visible:s,hideArmed:r}=e;return t||n?s&&!r?"none":"show":s&&!r?"arm-hide":"none"}const U=24,je=320;function x(e){return Number.isFinite(e)?Math.min(je,Math.max(U,e)):U}const ze=.2,Ye=.12;function Qe(e,t,n=ze){const s=x(t);return e===null||!Number.isFinite(e)?s:e+n*(s-e)}function sn(e,t){const n=x(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function rn(e){const{totalMessages:t,residentCount:n,exhausted:s,residentContentHeight:r,currentSpacerHeight:o,viewportHeight:a}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Qe(i,r/n));const u=e.unloadedRows??t-n,m=s||t<=0||n<=0||u<=0||i===null?0:Math.round(u*i),d=Math.abs(m-o);return d===0?{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}:m===0||o===0||d>o*Ye||a>0&&d>a?{spacerHeight:m,rowHeightEma:i,applied:!0,scrollTopDelta:m-o}:{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Je=_e,Xe=2;function on(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:s,pageSize:r=Je,nearPages:o=Xe}=e;if(n<=0||t>=n)return"serial";const a=x(s??Number.NaN);return(n-Math.max(0,t))/a>o*r?"seek":"serial"}const j=200,Ze=1;function an(e,t,n=j){const s=t.timestamp-n;return[...e.filter(r=>r.timestamp>=s),t]}function un(e){const{samples:t,viewportHeight:n,windowMs:s=j,viewportFactor:r=Ze}=e;if(n<=0||t.length<2)return"gentle";const o=t[t.length-1].timestamp-s,a=t.filter(u=>u.timestamp>=o);if(a.length<2)return"gentle";let i=0;for(let u=1;u<a.length;u+=1)i+=Math.abs(a[u].scrollTop-a[u-1].scrollTop);return i>n*r?"rapid":"gentle"}function cn(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:s}=e;if(s<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(s-1,Math.max(0,Math.floor(r*s)))}function ln(e){const{totalMessages:t,residentCount:n,exhausted:s,startOrdinalEstimate:r,gapToTail:o}=e,a=Math.max(0,t-n);if(a===0)return{above:0,below:0};if(!o)return{above:s?0:a,below:0};if(s)return{above:0,below:a};if(r!==null){const u=Math.min(a,Math.max(0,Math.round(r)));return{above:u,below:a-u}}const i=Math.min(a,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:a-i,below:i}}function dn(e){const{exhausted:t,historyCount:n,tailCount:s,tailTruncated:r,totalMessages:o}=e;return t?!0:n>0?!1:!r&&o<=s}const z=new Map;function Y(e,t){return`${e}\0${t}`}function fn(e,t){return z.get(Y(e,t))}function mn(e,t,n){z.set(Y(e,t),n)}const pn=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.userMessageIndexes,n):void 0}),gn=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.retryAgents,n):void 0});function et(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const o=e/1e3,a=o.toFixed(1);return a.endsWith(".0")?`${Math.round(o)}s`:`${a}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${s}m ${r}s`:`${s}m ${r}s`}function hn(e){return et(Math.max(1e3,Math.round(e/1e3)*1e3))}const tt=new Set(["launch","init","session-create","session-load","prompt"]),nt=new Set(["tool-call","tool-waiting"]);function st(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function Sn(e){return e&&tt.has(e)?"pulse":e&&nt.has(e)?"twist":"bloom"}const Q="stalled";function yn(e,t){const n=st(e);return!n||n.phase!==Q||typeof t=="number"&&t>n.timestamp?null:n}function bn(e){let t=null;for(const n of e)n.phase!==Q&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const N={get title(){return S.chat_streamingStatus_sessionCorrupted_title()},get message(){return S.chat_streamingStatus_sessionCorrupted_message()}};function An(e,t){return e?t===!0?{corrupted:!0,title:N.title,message:N.message,detail:e}:{corrupted:!1,title:S.chat_streamingStatus_responseFailed_label(),message:e,detail:null}:null}const wn=c.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),Mn=c.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Cn=c.createSelector(e=>{const t=[];for(const o of Object.values(e.panelLayout.byWorkspaceId))for(const a of Object.values(o.panels))for(const i of a.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),s=new Set(e.agentSessions.agentIdsByWorkspace[ge]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(o=>s.has(o)),dividerSessionAgentIds:n,openAgentTabIds:t}}),In=c.createSelector((e,t)=>f(e.questionUi.consumers,t)),rt=3e4,A=new Map;function _n(e,t){const n=A.get(e);n&&clearTimeout(n.timer);const s=setTimeout(()=>A.delete(e),rt);A.set(e,{value:t,timer:s})}function vn(e){const t=A.get(e);if(t)return clearTimeout(t.timer),A.delete(e),t.value}const J=c.createSelector((e,t,n)=>e.agentWorkers?.byKey[Se(t,n)]??he),ot=c.createSelector((e,t,n)=>{const s=J.select(e,t,n);return s.status==="unsupported"?[]:(s.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Tn=c.createSelector((e,t,n)=>{const s=J.select(e,t,n);return s.status==="failed"?!0:s.status!=="ready"||!s.snapshot?!1:s.snapshot.truncated?!0:s.snapshot.support.status!=="supported"&&ot.select(e,t,n).length>0}),at=1e3,X={requireViewedAndFocused:!0,requireAssistantTail:!0},w=new Map,g=new Map;let b=null;function H(e){(e===void 0||b===e)&&(b=null)}const it=200;function ut(e,t){if(g.delete(e),g.set(e,t),g.size>it){const n=g.keys().next().value;n!==void 0&&g.delete(n)}}function Z(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function Rn(e){return Z(e)?.id??null}function $n(e){P(e,{requireViewedAndFocused:!0})}function kn(e){P(e,{requireViewedAndFocused:!1})}function En(e){H(),P(e,X)}function Ln(e){b===e&&(w.has(e)||(b=null,D(e,X)))}function xn(e){for(const t of e)typeof t!="string"||t.length===0||(ee(t),H(t),D(t,{requireViewedAndFocused:!1}))}function ee(e){const t=w.get(e);t&&(clearTimeout(t.timer),w.delete(e))}function P(e,t){ee(e),H(e);const n=setTimeout(()=>{w.delete(e),D(e,t)},at);w.set(e,{timer:n,gates:t})}let F=null;function ct(){return F??=Promise.all([R(()=>import("./QSR6vsk4.js"),__vite__mapDeps([25,17,18,3,19,20,13,5,9,4,2,26,27]),import.meta.url),R(()=>import("./Dritbi2C.js").then(e=>e.Z),__vite__mapDeps([28,29,4,3,17,18,19,20,13,5,9,2,8,6,7,10,11,12,14,30,31,32,33]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),F}async function D(e,t){let n=null;try{const{appStore:s,appClient:r}=await ct(),o=s.state;if(t.requireViewedAndFocused&&(o.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const a=o.agentSessions?.byAgentId[e];if(!a)return;const i=typeof a.workspaceId=="string"?a.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&o.chatState?.byAgentId[e]?.initialHistoryPending){b=e;return}const u=Z(a.messages??[]);if(!u){t.requireAssistantTail&&(b=e);return}if(t.requireAssistantTail&&u.role!=="assistant")return;const l=u.id;if(g.get(e)===l)return;ut(e,l),n=l,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:l})).success&&g.get(e)===n&&g.delete(e)}catch{n!==null&&g.get(e)===n&&g.delete(e)}}const _=new Map;function te(e,t){return`${e}\0${t}`}function Hn(e,t){return _.get(te(e,t))}function Pn(e,t,n){_.set(te(e,t),n)}function Dn(e){if(e.length===0)return;const t=new Set(e);for(const n of[..._.keys()]){const s=n.slice(n.indexOf("\0")+1);t.has(s)&&_.delete(n)}}export{rn as $,bn as A,Sn as B,Et as C,Lt as D,Kt as E,Xt as F,dn as G,Pe as H,vt as I,cn as J,xn as K,Ln as L,at as M,$n as N,tn as O,kn as P,En as Q,j as R,Rn as S,nn as T,kt as U,U as V,He as W,Ct as X,Ue as Y,Tt as Z,zt as _,Rt as a,Wt as a0,$t as a1,H as a2,xt as a3,It as a4,sn as a5,ot as a6,J as a7,Tn as a8,Ht as a9,Mn as aa,Cn as ab,wn as ac,Nt as ad,Vt as ae,Ft as af,qt as ag,K as ah,In as ai,gn as aj,pn as ak,Pn as al,mn as am,en as an,Ut as ao,ln as ap,_n as aq,jt as ar,Be as as,vn as at,k as b,an as c,wt as d,Mt as e,Jt as f,Le as g,_t as h,un as i,on as j,Dn as k,Bt as l,Zt as m,An as n,Ot as o,Ke as p,Ee as q,hn as r,Qt as s,yn as t,Hn as u,fn as v,Yt as w,Pt as x,Gt as y,Dt as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./C11XjPnf.js";const t={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{t as conf,s as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as u,bq as l,by as p,br as b,b as g}from"./
|
|
1
|
+
import{t as u,bq as l,by as p,br as b,b as g}from"./eK7OULll.js";import{bs as h,a5 as _,bA as v,W as x,bn as y,aA as o,aB as S}from"./DYhIMPy1.js";import{s as w}from"./p5gLe3PS.js";import{c as A,f as C}from"./DZtstCLQ.js";import{b as k}from"./BaIAhI85.js";var q=new Set(["$$slots","$$events","$$legacy","ref","children","class"]),B=S("<section><!></section>");function N(c,s){if(new.target)return u({component:N,...c});h(s,!0);let r=l(s,"ref",15,null),a=l(s,"children",7),n=l(s,"class",7),i=b(s,q);var f={get ref(){return r()},set ref(e=null){r(e),o()},get children(){return a()},set children(e){a(e),o()},get class(){return n()},set class(e){n(e),o()},$set:p,$on:(e,d)=>g(s,e,d)},t=B();A(t,e=>({"data-slot":"screen",class:e,...i}),[()=>C("flex min-h-0 min-w-0 flex-col bg-background text-foreground",n())]);var m=_(t);return w(m,a),v(t),k(t,e=>r(e),()=>r()),x(c,t),y(f)}export{N as S};
|