@intent-hq/web 2.350.0 → 2.351.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/{DNZhZg57.js → -o555Jq8.js} +1 -1
- package/web/app/immutable/chunks/{wMJR-wv6.js → 0-xAXZgf.js} +1 -1
- package/web/app/immutable/chunks/{7uJhY2Ro.js → 25Qfa38y.js} +1 -1
- package/web/app/immutable/chunks/{BRWlAcla.js → 3yYmQx2z.js} +1 -1
- package/web/app/immutable/chunks/41c-5lbJ.js +1 -0
- package/web/app/immutable/chunks/{CdmGeaJT.js → 4XRamNN4.js} +1 -1
- package/web/app/immutable/chunks/{CypR-p04.js → 5P8mOVWK.js} +1 -1
- package/web/app/immutable/chunks/{BLSKMxu8.js → 67kYB1lt.js} +1 -1
- package/web/app/immutable/chunks/{BtEQs3u_.js → 6pSwNbUy.js} +3 -3
- package/web/app/immutable/chunks/{BBYhh_eX.js → 73QfWqEv.js} +1 -1
- package/web/app/immutable/chunks/{Cjw1QvKa.js → AOUBMpYk.js} +1 -1
- package/web/app/immutable/chunks/{BT9NukZQ.js → AyGecNlS.js} +1 -1
- package/web/app/immutable/chunks/{Cq31bVAU.js → B-TDUD-n.js} +1 -1
- package/web/app/immutable/chunks/{CncRZ2UX.js → B-hKl_xx.js} +1 -1
- package/web/app/immutable/chunks/{DwWmN_70.js → B043Z8mk.js} +1 -1
- package/web/app/immutable/chunks/{D7v0ZhmL.js → B0QrNgSj.js} +1 -1
- package/web/app/immutable/chunks/{Ca33AaL6.js → B22owOuz.js} +1 -1
- package/web/app/immutable/chunks/{DfHhvXgb.js → B57wBfTw.js} +1 -1
- package/web/app/immutable/chunks/{nelewHAT.js → B5ekpGAe.js} +1 -1
- package/web/app/immutable/chunks/{BmxmL68T.js → B6bPIJ1k.js} +1 -1
- package/web/app/immutable/chunks/{4CvTKhAA.js → B9aafd7C.js} +1 -1
- package/web/app/immutable/chunks/{B1eDx3CN.js → B9l9TMyA.js} +1 -1
- package/web/app/immutable/chunks/{x2y577z4.js → BA4L4UPI.js} +1 -1
- package/web/app/immutable/chunks/{C-Hyxax0.js → BAb3JAL_.js} +1 -1
- package/web/app/immutable/chunks/{Bp_k45o-.js → BBCbq-hE.js} +1 -1
- package/web/app/immutable/chunks/{CNkNQisE.js → BCP62aew.js} +1 -1
- package/web/app/immutable/chunks/{CpRIbMDe.js → BCQGaqgQ.js} +1 -1
- package/web/app/immutable/chunks/{BGNS9xef.js → BDX4YTR9.js} +1 -1
- package/web/app/immutable/chunks/{D897Deqj.js → BDbt9cuZ.js} +1 -1
- package/web/app/immutable/chunks/{BN_2jpxS.js → BEsCIa2p.js} +1 -1
- package/web/app/immutable/chunks/{D4xoTssJ.js → BH-zWM3a.js} +3 -3
- package/web/app/immutable/chunks/{Cn9rdOTG.js → BHcKnFOT.js} +1 -1
- package/web/app/immutable/chunks/{B78lBv8l.js → BI5nb_pF.js} +1 -1
- package/web/app/immutable/chunks/{Dsv-aPKR.js → BJ5nSO_Z.js} +3 -3
- package/web/app/immutable/chunks/{DdDbAXaw.js → BJdaIUzQ.js} +1 -1
- package/web/app/immutable/chunks/BJwMP_No.js +1 -0
- package/web/app/immutable/chunks/{rbrWRnHh.js → BOuXmWAj.js} +1 -1
- package/web/app/immutable/chunks/{C5_BSKQx.js → BPIrwIPC.js} +1 -1
- package/web/app/immutable/chunks/{D_euwo9H.js → BSkWWR3g.js} +1 -1
- package/web/app/immutable/chunks/{DJBAuZjD.js → BTI1m7l8.js} +1 -1
- package/web/app/immutable/chunks/{DU8fiCcb.js → BTLU_fQH.js} +1 -1
- package/web/app/immutable/chunks/{C-8EePTi.js → BXYFidlw.js} +1 -1
- package/web/app/immutable/chunks/{NkFvZgbA.js → BYT1TQGK.js} +1 -1
- package/web/app/immutable/chunks/{CPFtOnI7.js → BYjUWrg8.js} +1 -1
- package/web/app/immutable/chunks/{YeEGAsBO.js → BahcW9Py.js} +1 -1
- package/web/app/immutable/chunks/{CO6Za00z.js → Bd6Rwh69.js} +2 -2
- package/web/app/immutable/chunks/{-SLXtWbg.js → BdKft7gn.js} +1 -1
- package/web/app/immutable/chunks/{ChmnWquS.js → BhX-5zd9.js} +1 -1
- package/web/app/immutable/chunks/{BWW-jWou.js → Bj0v3XMt.js} +1 -1
- package/web/app/immutable/chunks/{Bv8FuKnx.js → BjHlv5EB.js} +1 -1
- package/web/app/immutable/chunks/{DLibMiVC.js → BjVx5o0n.js} +1 -1
- package/web/app/immutable/chunks/{BtEu1RiA.js → BjnapXgD.js} +2 -2
- package/web/app/immutable/chunks/{VSW9MxJG.js → Bkkc9nPJ.js} +3 -3
- package/web/app/immutable/chunks/{BANv-BXH.js → BlcZflKW.js} +1 -1
- package/web/app/immutable/chunks/{B_IuZd0O.js → Bm0VuPYn.js} +1 -1
- package/web/app/immutable/chunks/{eIlGg2ZH.js → Bo40L-We.js} +1 -1
- package/web/app/immutable/chunks/{BHpSEINq.js → BoT__Uvu.js} +1 -1
- package/web/app/immutable/chunks/{BVzVRoQ-.js → BpGfQKt5.js} +1 -1
- package/web/app/immutable/chunks/{BjgP_y-J.js → Bpkh7IXN.js} +1 -1
- package/web/app/immutable/chunks/{DKPFCCGK.js → BrR0973A.js} +1 -1
- package/web/app/immutable/chunks/{HHfiH428.js → BsDTYuK1.js} +1 -1
- package/web/app/immutable/chunks/{BSSsvY4I.js → BuDJvkTk.js} +1 -1
- package/web/app/immutable/chunks/{Cw94LfJC.js → BuupGai6.js} +1 -1
- package/web/app/immutable/chunks/{CDYEdeFG.js → Bv1i2B5u.js} +1 -1
- package/web/app/immutable/chunks/{DVpbdNgF.js → BwzznN4d.js} +1 -1
- package/web/app/immutable/chunks/{BRpVJjVZ.js → ByQWAkHB.js} +1 -1
- package/web/app/immutable/chunks/{DM6SW5ie.js → Byr2ZhFE.js} +1 -1
- package/web/app/immutable/chunks/{d34yYkdR.js → BzXCk-eX.js} +1 -1
- package/web/app/immutable/chunks/{EBvHmS3f.js → C-cC659R.js} +1 -1
- package/web/app/immutable/chunks/{fE-kcmYj.js → C1ha510g.js} +1 -1
- package/web/app/immutable/chunks/{GyHTdhNa.js → C1zdYplM.js} +1 -1
- package/web/app/immutable/chunks/{LeGktTWT.js → C2QAZ2iP.js} +1 -1
- package/web/app/immutable/chunks/{DTzXgeFz.js → C2pyYkiS.js} +1 -1
- package/web/app/immutable/chunks/{Dw4yJGUy.js → C4UmUQ0t.js} +1 -1
- package/web/app/immutable/chunks/{BGFEE7_E.js → C4oYAvfo.js} +1 -1
- package/web/app/immutable/chunks/{C7uOzB-k.js → C4qlKK6F.js} +1 -1
- package/web/app/immutable/chunks/{D93fSt3I.js → C96Cos0M.js} +1 -1
- package/web/app/immutable/chunks/{qVFwsb4j.js → C97vyu8P.js} +1 -1
- package/web/app/immutable/chunks/{BTgmF0VM.js → C9OFPDov.js} +1 -1
- package/web/app/immutable/chunks/{OvIv7krR.js → C9jK2F--.js} +1 -1
- package/web/app/immutable/chunks/{Cs2fCAnT.js → CA8Jy4WC.js} +1 -1
- package/web/app/immutable/chunks/{q3dUaF0j.js → CB3bw4PL.js} +1 -1
- package/web/app/immutable/chunks/{CVslHwOK.js → CBtX8-Aa.js} +1 -1
- package/web/app/immutable/chunks/{rEoZFmiI.js → CCO5tijn.js} +1 -1
- package/web/app/immutable/chunks/{286xXFLf.js → CCw4KHZp.js} +1 -1
- package/web/app/immutable/chunks/{DhoyV3Yf.js → CEpelLfd.js} +2 -2
- package/web/app/immutable/chunks/{D3HUOTfX.js → CEufllny.js} +1 -1
- package/web/app/immutable/chunks/{mxwa8yTT.js → CHnA0xpr.js} +1 -1
- package/web/app/immutable/chunks/{B0tZqpMw.js → CIm0iT4E.js} +1 -1
- package/web/app/immutable/chunks/{8j6wyzW6.js → CKGxulW8.js} +1 -1
- package/web/app/immutable/chunks/{CisyaOFD.js → CKmgmdFa.js} +1 -1
- package/web/app/immutable/chunks/{BVAf1qqU.js → CMWevjI7.js} +1 -1
- package/web/app/immutable/chunks/{WuzNFiDL.js → CNPNgdra.js} +1 -1
- package/web/app/immutable/chunks/{Bx0EPbRG.js → CTh4M5uj.js} +1 -1
- package/web/app/immutable/chunks/{BByPpbtL.js → CTvwRPyF.js} +1 -1
- package/web/app/immutable/chunks/{D7W4zxlI.js → CUBdinib.js} +1 -1
- package/web/app/immutable/chunks/{B4oIQ1kI.js → CVDRxz2f.js} +1 -1
- package/web/app/immutable/chunks/{BC51na55.js → CWUa486r.js} +1 -1
- package/web/app/immutable/chunks/{CBTiE17j.js → CYlvyU3U.js} +1 -1
- package/web/app/immutable/chunks/{2yJgo8xz.js → CYyISHjN.js} +1 -1
- package/web/app/immutable/chunks/{CMvvA2dm.js → C_akaBgq.js} +1 -1
- package/web/app/immutable/chunks/{BD7hz4AD.js → CaPALXDj.js} +1 -1
- package/web/app/immutable/chunks/{DEoOAy1Z.js → CbX7A7fn.js} +1 -1
- package/web/app/immutable/chunks/{Cwzl8GTd.js → Cc0uYvgR.js} +1 -1
- package/web/app/immutable/chunks/{CyRJV2Ki.js → CcYKMJWn.js} +1 -1
- package/web/app/immutable/chunks/{Cosr3Aeo.js → CccgSyFt.js} +2 -2
- package/web/app/immutable/chunks/{B_7vJcZK.js → CdXmpyDy.js} +1 -1
- package/web/app/immutable/chunks/{C8Tr-F9O.js → CgXr85TV.js} +1 -1
- package/web/app/immutable/chunks/{FoUQsQJW.js → CgfVp9Ef.js} +1 -1
- package/web/app/immutable/chunks/{DopiS9Ix.js → Ch2DvoYt.js} +1 -1
- package/web/app/immutable/chunks/{Xn8V9ehY.js → ChD6V-mA.js} +1 -1
- package/web/app/immutable/chunks/{VqXoK0d_.js → CjPfyTRR.js} +1 -1
- package/web/app/immutable/chunks/{khgof0nR.js → Cj__CwtA.js} +1 -1
- package/web/app/immutable/chunks/{DgvbF3tj.js → CjafAhxa.js} +1 -1
- package/web/app/immutable/chunks/{CFE62qf4.js → ClCe1k4i.js} +1 -1
- package/web/app/immutable/chunks/{B-DRVFcy.js → ClgmQqA9.js} +1 -1
- package/web/app/immutable/chunks/{CK2a86W3.js → ClkbPGx9.js} +1 -1
- package/web/app/immutable/chunks/{ZvvpWnYF.js → CrHTQDbT.js} +1 -1
- package/web/app/immutable/chunks/{DwEnF1oU.js → CramXAJ0.js} +1 -1
- package/web/app/immutable/chunks/{BkMQXe7-.js → Crf39e2Q.js} +1 -1
- package/web/app/immutable/chunks/{DISea0WG.js → CrkDo76r.js} +1 -1
- package/web/app/immutable/chunks/{CtMMpgin.js → CuCrpEmq.js} +1 -1
- package/web/app/immutable/chunks/{VbWa-HQf.js → CuHfgFFh.js} +1 -1
- package/web/app/immutable/chunks/{BjYS0G-V.js → Cv3VBAcZ.js} +1 -1
- package/web/app/immutable/chunks/{Dv1uFWMY.js → Cw23SInT.js} +1 -1
- package/web/app/immutable/chunks/{DQWngE5E.js → Cxn17X4d.js} +2 -2
- package/web/app/immutable/chunks/{DEkf_jel.js → Cy3svQNQ.js} +1 -1
- package/web/app/immutable/chunks/{Dy0WXzUp.js → D-fvD02O.js} +2 -2
- package/web/app/immutable/chunks/{B2r-op5b.js → D07rIrLM.js} +1 -1
- package/web/app/immutable/chunks/{iP2vS2hx.js → D2kFrNtb.js} +1 -1
- package/web/app/immutable/chunks/{DEWFL8HN.js → D542lbvk.js} +2 -2
- package/web/app/immutable/chunks/{MbX_TGmS.js → D68o263s.js} +1 -1
- package/web/app/immutable/chunks/{26eANJdh.js → D6kdeziR.js} +1 -1
- package/web/app/immutable/chunks/{C9CjIm-I.js → D6ncbN-K.js} +1 -1
- package/web/app/immutable/chunks/{B99vgEcA.js → D9WrXbf9.js} +1 -1
- package/web/app/immutable/chunks/{32pNLDLJ.js → D9XKGcAY.js} +1 -1
- package/web/app/immutable/chunks/{Db1OxcFa.js → DE4arwhh.js} +1 -1
- package/web/app/immutable/chunks/{BDh1WR6p.js → DEVAGsyG.js} +1 -1
- package/web/app/immutable/chunks/{CVNsMUrN.js → DGRqvVY1.js} +2 -2
- package/web/app/immutable/chunks/{vCsRAP9U.js → DGaDkdng.js} +1 -1
- package/web/app/immutable/chunks/{CbVK4mzc.js → DGb_dMRY.js} +1 -1
- package/web/app/immutable/chunks/{BCazrMx2.js → DL304mi1.js} +1 -1
- package/web/app/immutable/chunks/{B1uWzETW.js → DLiD3Y7h.js} +1 -1
- package/web/app/immutable/chunks/DMIrVtTU.js +1 -0
- package/web/app/immutable/chunks/{CIwCBz4N.js → DPemhAGL.js} +1 -1
- package/web/app/immutable/chunks/{CKET0e35.js → DQ8vH0VY.js} +1 -1
- package/web/app/immutable/chunks/{B_5CVv0g.js → DQ_x-k0O.js} +3 -3
- package/web/app/immutable/chunks/{2rtvtln4.js → DQjekoSU.js} +1 -1
- package/web/app/immutable/chunks/{BwgrW8yQ.js → DRRbh3V4.js} +1 -1
- package/web/app/immutable/chunks/{C82N7Ttz.js → DRiReCwX.js} +1 -1
- package/web/app/immutable/chunks/{Dqx3L5zl.js → DUor0DI_.js} +1 -1
- package/web/app/immutable/chunks/{BmMUMiCr.js → DWgWsm2y.js} +1 -1
- package/web/app/immutable/chunks/{CM0lKKPd.js → D_P8KoFV.js} +1 -1
- package/web/app/immutable/chunks/{BMcc0dQQ.js → Dc8XEwi0.js} +1 -1
- package/web/app/immutable/chunks/{Dqy9L9od.js → DcxuGfvW.js} +1 -1
- package/web/app/immutable/chunks/{Bj1gLv3I.js → DdfHQxRr.js} +1 -1
- package/web/app/immutable/chunks/{DZ-cwX5R.js → De70D2Lx.js} +2 -2
- package/web/app/immutable/chunks/{CzZDc-Ii.js → DfA_Upom.js} +1 -1
- package/web/app/immutable/chunks/{CMncH4az.js → DfuAejzr.js} +1 -1
- package/web/app/immutable/chunks/{DbM1yRvv.js → DhhomoFS.js} +1 -1
- package/web/app/immutable/chunks/{408Hki4d.js → DipCXz5L.js} +1 -1
- package/web/app/immutable/chunks/{D3wOVtz4.js → DjE6Tn4o.js} +1 -1
- package/web/app/immutable/chunks/{DTowKbOf.js → Dq9dLpt4.js} +4 -4
- package/web/app/immutable/chunks/{3hKPUzWE.js → DqKef_Yi.js} +1 -1
- package/web/app/immutable/chunks/{thMcSp0N.js → DsewpLhd.js} +1 -1
- package/web/app/immutable/chunks/{DhNmiaLk.js → DtV2WjXp.js} +1 -1
- package/web/app/immutable/chunks/{LIrM5l7a.js → DtWKfIHW.js} +1 -1
- package/web/app/immutable/chunks/{BwZVuT_r.js → DuPQa1Hv.js} +4 -4
- package/web/app/immutable/chunks/{CJeZnjZ2.js → Dv-TQImR.js} +1 -1
- package/web/app/immutable/chunks/{DokA8xhc.js → DvmJXjP_.js} +1 -1
- package/web/app/immutable/chunks/{DR7u6lm0.js → DwR2QVtr.js} +1 -1
- package/web/app/immutable/chunks/{D6FxazmU.js → DwqB2LW1.js} +1 -1
- package/web/app/immutable/chunks/{CrGdgRLR.js → Dy3sS5WY.js} +1 -1
- package/web/app/immutable/chunks/{DLbCIONA.js → Dy5C9WSY.js} +1 -1
- package/web/app/immutable/chunks/{Crbgpexl.js → DzIV-I7E.js} +1 -1
- package/web/app/immutable/chunks/{DiRf9bEu.js → DzqZnAgo.js} +4 -4
- package/web/app/immutable/chunks/{CQGn51Fx.js → ETkf7dmN.js} +1 -1
- package/web/app/immutable/chunks/{BRXwopQ4.js → FHXrLz5A.js} +1 -1
- package/web/app/immutable/chunks/{BR3-na8H.js → FbHjHDf9.js} +1 -1
- package/web/app/immutable/chunks/{2B0vRGaJ.js → G1rQ1ZLS.js} +1 -1
- package/web/app/immutable/chunks/{DP5_VjDz.js → GfKb8O3O.js} +1 -1
- package/web/app/immutable/chunks/{Cbr15rLJ.js → Ghm7WpFi.js} +1 -1
- package/web/app/immutable/chunks/{Y5hz4Ndf.js → Ju7PAma1.js} +1 -1
- package/web/app/immutable/chunks/{qWDVui2f.js → KcC0pRTT.js} +1 -1
- package/web/app/immutable/chunks/{CH0shWeP.js → Lx7mQEPN.js} +1 -1
- package/web/app/immutable/chunks/{By_ZupfB.js → N7G-ZTah.js} +5 -5
- package/web/app/immutable/chunks/{C22o2A7n.js → NFc5A7UL.js} +1 -1
- package/web/app/immutable/chunks/{C6DrVy6-.js → Og4xuM7g.js} +1 -1
- package/web/app/immutable/chunks/{CEHfILB1.js → QFwPCSKD.js} +1 -1
- package/web/app/immutable/chunks/{CKe6gKEB.js → QLXfiC8k.js} +1 -1
- package/web/app/immutable/chunks/{Auy4scdV.js → QPRdLPHE.js} +1 -1
- package/web/app/immutable/chunks/{DZUdTlgs.js → R6z5Bqeu.js} +1 -1
- package/web/app/immutable/chunks/{D2JEXCBC.js → RjrC7VFY.js} +1 -1
- package/web/app/immutable/chunks/{BUPCpU_w.js → SXjX79W0.js} +3 -3
- package/web/app/immutable/chunks/{DJHJbx3B.js → Sa9G_k7P.js} +1 -1
- package/web/app/immutable/chunks/{Ari-xzJB.js → SoUJpC1P.js} +1 -1
- package/web/app/immutable/chunks/{DcSI1nK9.js → UMKs78qL.js} +1 -1
- package/web/app/immutable/chunks/{2GRAEVbl.js → Uea955Vz.js} +1 -1
- package/web/app/immutable/chunks/{CClSMHHc.js → VIOarPUD.js} +1 -1
- package/web/app/immutable/chunks/{Lp_ZOIfH.js → VmRBMU-H.js} +2 -2
- package/web/app/immutable/chunks/{D3v_P2Uq.js → W2yoNJFv.js} +1 -1
- package/web/app/immutable/chunks/{ouB3SqBV.js → X0wrjHux.js} +1 -1
- package/web/app/immutable/chunks/{Ctvf1zqH.js → XVViy8ZW.js} +1 -1
- package/web/app/immutable/chunks/{BNuxEAQs.js → ZngqFVq2.js} +1 -1
- package/web/app/immutable/chunks/{CxxiwOxz.js → _6UbyZFm.js} +1 -1
- package/web/app/immutable/chunks/{hqwi43PO.js → a6ao35lO.js} +1 -1
- package/web/app/immutable/chunks/{D8acXZuO.js → af7yduyJ.js} +12 -12
- package/web/app/immutable/chunks/{kNB7-RPS.js → b1qSM27E.js} +1 -1
- package/web/app/immutable/chunks/{DldD9pcf.js → b8GoMhSt.js} +1 -1
- package/web/app/immutable/chunks/{WydNOMQI.js → bV1WTvQr.js} +1 -1
- package/web/app/immutable/chunks/{B79m0-as.js → cKfnoB88.js} +1 -1
- package/web/app/immutable/chunks/{CncaMZP7.js → dAVgSJe8.js} +1 -1
- package/web/app/immutable/chunks/{B25aSyPj.js → dvtNrmBJ.js} +1 -1
- package/web/app/immutable/chunks/{DW8-b4qF.js → fKGM3H1S.js} +1 -1
- package/web/app/immutable/chunks/{Bryo-Obg.js → gWaxvgpv.js} +4 -4
- package/web/app/immutable/chunks/{D68W4EG9.js → gtyJplKf.js} +1 -1
- package/web/app/immutable/chunks/{BIt-EHGB.js → hYtFXuM6.js} +1 -1
- package/web/app/immutable/chunks/{dt-eIcjK.js → jmGUW687.js} +1 -1
- package/web/app/immutable/chunks/{BVjxveE3.js → jqiN8Ebl.js} +2 -2
- package/web/app/immutable/chunks/{BXpSvmYd.js → jyFhDlZn.js} +1 -1
- package/web/app/immutable/chunks/{ktHrl9fr.js → mgh5gPA4.js} +1 -1
- package/web/app/immutable/chunks/{CxF8YFum.js → nLyQInj7.js} +1 -1
- package/web/app/immutable/chunks/nbfGErIW.js +1 -0
- package/web/app/immutable/chunks/{B2otWDii.js → nqpg2Djj.js} +1 -1
- package/web/app/immutable/chunks/{BRvIFAVQ.js → oNlT93oA.js} +1 -1
- package/web/app/immutable/chunks/{CNCNgnPl.js → ot3p-Y1j.js} +1 -1
- package/web/app/immutable/chunks/{xCXPOQKs.js → pA6KCKbP.js} +1 -1
- package/web/app/immutable/chunks/{B3aPtdPQ.js → sHSA98Ae.js} +1 -1
- package/web/app/immutable/chunks/{C7_ws2_m.js → sxpeFI4o.js} +1 -1
- package/web/app/immutable/chunks/{ZlJ0OsQO.js → ugjOCd8V.js} +3 -3
- package/web/app/immutable/chunks/{DBwXC8Tc.js → uoJ0nI_z.js} +1 -1
- package/web/app/immutable/chunks/{xt_aYD5Y.js → v23yk8Nl.js} +1 -1
- package/web/app/immutable/chunks/{935km0k5.js → vLUkS5Lr.js} +1 -1
- package/web/app/immutable/chunks/{cHlEaLvO.js → vSLEtuRc.js} +1 -1
- package/web/app/immutable/chunks/{BocgQf5E.js → zB3SalmM.js} +1 -1
- package/web/app/immutable/entry/{app.CWKtj1qb.js → app.D9kIVkFi.js} +3 -3
- package/web/app/immutable/entry/start.CsSnQcM4.js +1 -0
- package/web/app/immutable/nodes/{0.C-ApG_ZV.js → 0.CycxDG0L.js} +1 -1
- package/web/app/immutable/nodes/{1.7Yef1c7P.js → 1.DBDsO8vk.js} +1 -1
- package/web/app/immutable/nodes/{10.CgeOLrTm.js → 10.DeWMsWJr.js} +1 -1
- package/web/app/immutable/nodes/{11.BNBCl9Ko.js → 11.D3R05nAN.js} +1 -1
- package/web/app/immutable/nodes/{12.BriSlPZC.js → 12.FwwO1QwE.js} +1 -1
- package/web/app/immutable/nodes/{13.QpfX0_5g.js → 13.BXCK1uUO.js} +3 -3
- package/web/app/immutable/nodes/{14.D6hgWRXD.js → 14.CaU020TI.js} +1 -1
- package/web/app/immutable/nodes/{15.DdEMX_Kl.js → 15.DBweoCJ3.js} +1 -1
- package/web/app/immutable/nodes/{16.rtMs5JTy.js → 16.x7FRjB-z.js} +1 -1
- package/web/app/immutable/nodes/{17.DDfq3IKN.js → 17.nVKVEw2j.js} +1 -1
- package/web/app/immutable/nodes/{18.4frHbkPA.js → 18.D8Pypemm.js} +2 -2
- package/web/app/immutable/nodes/{2.BMmCaZ13.js → 2.bw2OhfV2.js} +4 -4
- package/web/app/immutable/nodes/{3.LGsMTwHE.js → 3.C3rwANJW.js} +1 -1
- package/web/app/immutable/nodes/{4.D_DWD0G6.js → 4.D3HKzTPL.js} +1 -1
- package/web/app/immutable/nodes/{5.NArgqqzw.js → 5.f1pRghhu.js} +1 -1
- package/web/app/immutable/nodes/{6.eVsatkxX.js → 6.rpNMjH5t.js} +1 -1
- package/web/app/immutable/nodes/{7.DfBjcCho.js → 7.BSbrbiiB.js} +1 -1
- package/web/app/immutable/nodes/8.DbrZFert.js +14 -0
- package/web/app/immutable/nodes/{9.DcP-Tpxp.js → 9.D--sfpfT.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +46 -46
- package/web/index.html +18 -18
- package/web/app/immutable/chunks/DGQ1ECsI.js +0 -1
- package/web/app/immutable/chunks/DxLMmDZH.js +0 -1
- package/web/app/immutable/chunks/H2SodBVA.js +0 -1
- package/web/app/immutable/chunks/Hc3ynozM.js +0 -1
- package/web/app/immutable/entry/start.DscDu9_j.js +0 -1
- package/web/app/immutable/nodes/8.mrAj_KlQ.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
var qt=Object.defineProperty;var gt=c=>{throw TypeError(c)};var Ut=(c,e,n)=>e in c?qt(c,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[e]=n;var q=(c,e,n)=>Ut(c,typeof e!="symbol"?e+"":e,n),Je=(c,e,n)=>e.has(c)||gt("Cannot "+n);var m=(c,e,n)=>(Je(c,e,"read from private field"),n?n.call(c):e.get(c)),T=(c,e,n)=>e.has(c)?gt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(c):e.set(c,n),Ye=(c,e,n,i)=>(Je(c,e,"write to private field"),i?i.call(c,n):e.set(c,n),n),ft=(c,e,n)=>(Je(c,e,"access private method"),n);import{t as te,bq as r,by as re,b as se,br as Ee,bo as ce,bt as Ze}from"./DGQ1ECsI.js";import{c9 as I,aD as a,bH as k,ca as ye,bV as N,bo as yt,bs as ne,a7 as V,ay as A,W as F,bn as ae,aA as s,a5 as de,bf as fe,bA as ge,aB as Be,b_ as _e,bS as ve,be as $e,b$ as et,bO as tt,br as Wt,c5 as $,bI as Qt,aG as Xt}from"./DYhIMPy1.js";import{i as Y}from"./B-DRVFcy.js";import{s as H}from"./ChmnWquS.js";import{c as pe}from"./CJeZnjZ2.js";import{h as Jt,aD as Yt,ar as Zt,an as _t,l as $t,a6 as er,at as tr,aq as pt,ay as rr,a3 as sr,az as Ve,aS as mt,a$ as nr,av as U,aQ as xt,a_ as ar,aa as ir,f as ht}from"./CxF8YFum.js";import{_ as Ct}from"./DZ-cwX5R.js";import{O as or}from"./YeEGAsBO.js";import{a as ur,D as lr}from"./C6DrVy6-.js";import{b as at,e as be,s as wt,c as cr,f as dr}from"./Bp_k45o-.js";import"./CzZDc-Ii.js";import{e as gr,P as bt}from"./286xXFLf.js";import{b as fr}from"./BaIAhI85.js";import{i as mr}from"./CC7to1B5.js";import"./rEoZFmiI.js";import"./B2r-op5b.js";import{g as hr}from"./CM0lKKPd.js";const rt=rr({component:"toggle-group",parts:["root","item"]}),St=new Jt("ToggleGroup.Root");var xe;class It{constructor(e){q(this,"opts");q(this,"rovingFocusGroup");q(this,"attachment");T(this,xe,I(()=>({id:this.opts.id.current,[rt.root]:"",role:"group","data-orientation":this.opts.orientation.current,"data-disabled":pt(this.opts.disabled.current),...this.attachment})));this.opts=e,this.attachment=_t(this.opts.ref),this.rovingFocusGroup=new sr({candidateAttr:rt.item,rootNode:e.ref,loop:e.loop,orientation:e.orientation})}get props(){return a(m(this,xe))}set props(e){k(m(this,xe),e)}}xe=new WeakMap;var Ce;class br extends It{constructor(n){super(n);q(this,"opts");q(this,"isMulti",!1);T(this,Ce,I(()=>this.opts.value.current!==""));this.opts=n}get anyPressed(){return a(m(this,Ce))}set anyPressed(n){k(m(this,Ce),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i){this.includesItem(n)?this.opts.value.current="":(this.opts.value.current=n,this.rovingFocusGroup.setCurrentTabStopId(i))}}Ce=new WeakMap;var we;class vr extends It{constructor(n){super(n);q(this,"opts");q(this,"isMulti",!0);T(this,we,I(()=>this.opts.value.current.length>0));this.opts=n}get anyPressed(){return a(m(this,we))}set anyPressed(n){k(m(this,we),n)}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(d=>d!==n):(this.opts.value.current=[...this.opts.value.current,n],this.rovingFocusGroup.setCurrentTabStopId(i))}}we=new WeakMap;class yr{static create(e){const{type:n,...i}=e,d=n==="single"?new br(i):new vr(i);return St.set(d)}}var ee,Se,Oe,De,Ge,Pt,he,Ie,Pe;const it=class it{constructor(e,n){T(this,Ge);q(this,"opts");q(this,"root");q(this,"attachment");T(this,ee,I(()=>this.opts.disabled.current||this.root.opts.disabled.current));T(this,Se,I(()=>this.root.includesItem(this.opts.value.current)));T(this,Oe,I(()=>this.root.isMulti?void 0:Yt(this.isPressed,!1)));T(this,De,I(()=>this.root.isMulti?Zt(this.isPressed):void 0));T(this,he,N(0));T(this,Ie,I(()=>({pressed:this.isPressed})));T(this,Pe,I(()=>({id:this.opts.id.current,role:this.root.isMulti?void 0:"radio",tabindex:a(m(this,he)),"data-orientation":this.root.opts.orientation.current,"data-disabled":pt(a(m(this,ee))),"data-state":_r(this.isPressed),"data-value":this.opts.value.current,"aria-pressed":a(m(this,De)),"aria-checked":a(m(this,Oe)),disabled:tr(a(m(this,ee))),[rt.item]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment})));this.opts=e,this.root=n,this.attachment=_t(this.opts.ref),ye(()=>{this.root.opts.rovingFocus.current?k(m(this,he),this.root.rovingFocusGroup.getTabIndex(this.opts.ref.current),!0):k(m(this,he),0)}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}static create(e){return new it(e,St.get())}get isPressed(){return a(m(this,Se))}set isPressed(e){k(m(this,Se),e)}onclick(e){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)}onkeydown(e){if(!a(m(this,ee))){if(e.key===$t||e.key===er){e.preventDefault(),ft(this,Ge,Pt).call(this);return}this.root.opts.rovingFocus.current&&this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}get snippetProps(){return a(m(this,Ie))}set snippetProps(e){k(m(this,Ie),e)}get props(){return a(m(this,Pe))}set props(e){k(m(this,Pe),e)}};ee=new WeakMap,Se=new WeakMap,Oe=new WeakMap,De=new WeakMap,Ge=new WeakSet,Pt=function(){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)},he=new WeakMap,Ie=new WeakMap,Pe=new WeakMap;let st=it;function _r(c){return c?"on":"off"}var pr=new Set(["$$slots","$$events","$$legacy","id","ref","value","onValueChange","type","disabled","loop","orientation","rovingFocus","child","children"]),xr=Be("<div><!></div>");function nt(c,e){const n=yt();if(new.target)return te({component:nt,...c});ne(e,!0);let i=r(e,"id",23,()=>Ve(n)),d=r(e,"ref",15,null),g=r(e,"value",15),f=r(e,"onValueChange",7,mt),y=r(e,"type",7),C=r(e,"disabled",7,!1),h=r(e,"loop",7,!0),w=r(e,"orientation",7,"horizontal"),_=r(e,"rovingFocus",7,!0),P=r(e,"child",7),v=r(e,"children",7),x=Ee(e,pr);function S(){g()===void 0&&g(y()==="single"?"":[])}S(),nr.pre(()=>g(),()=>{S()});const z=yr.create({id:U(()=>i()),value:U(()=>g(),l=>{g(l),f()(l)}),disabled:U(()=>C()),loop:U(()=>h()),orientation:U(()=>w()),rovingFocus:U(()=>_()),type:y(),ref:U(()=>d(),l=>d(l))}),b=I(()=>xt(x,z.props));var o={get id(){return i()},set id(l=Ve(n)){i(l),s()},get ref(){return d()},set ref(l=null){d(l),s()},get value(){return g()},set value(l){g(l),s()},get onValueChange(){return f()},set onValueChange(l=mt){f(l),s()},get type(){return y()},set type(l){y(l),s()},get disabled(){return C()},set disabled(l=!1){C(l),s()},get loop(){return h()},set loop(l=!0){h(l),s()},get orientation(){return w()},set orientation(l="horizontal"){w(l),s()},get rovingFocus(){return _()},set rovingFocus(l=!0){_(l),s()},get child(){return P()},set child(l){P(l),s()},get children(){return v()},set children(l){v(l),s()},$set:re,$on:(l,E)=>se(e,l,E)},p=V(),L=A(p);{var K=l=>{var E=V(),B=A(E);H(B,P,()=>({props:a(b)})),F(l,E)},t=l=>{var E=xr();at(E,()=>({...a(b)}));var B=de(E);H(B,()=>v()??fe),ge(E),F(l,E)};Y(L,l=>{P()?l(K):l(t,-1)})}return F(c,p),ae(o)}var Cr=new Set(["$$slots","$$events","$$legacy","children","child","ref","value","disabled","id","type"]),wr=Be("<button><!></button>");function kt(c,e){const n=yt();if(new.target)return te({component:kt,...c});ne(e,!0);let i=r(e,"children",7),d=r(e,"child",7),g=r(e,"ref",15,null),f=r(e,"value",7),y=r(e,"disabled",7,!1),C=r(e,"id",23,()=>Ve(n)),h=r(e,"type",7,"button"),w=Ee(e,Cr);const _=st.create({id:U(()=>C()),value:U(()=>f()),disabled:U(()=>y()??!1),ref:U(()=>g(),o=>g(o))}),P=I(()=>xt(w,_.props,{type:h()}));var v={get children(){return i()},set children(o){i(o),s()},get child(){return d()},set child(o){d(o),s()},get ref(){return g()},set ref(o=null){g(o),s()},get value(){return f()},set value(o){f(o),s()},get disabled(){return y()},set disabled(o=!1){y(o),s()},get id(){return C()},set id(o=Ve(n)){C(o),s()},get type(){return h()},set type(o="button"){h(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},x=V(),S=A(x);{var z=o=>{var p=V(),L=A(p);{let K=I(()=>({props:a(P),..._.snippetProps}));H(L,d,()=>a(K))}F(o,p)},b=o=>{var p=wr();at(p,()=>({...a(P)}));var L=de(p);H(L,()=>i()??fe,()=>_.snippetProps),ge(p),F(o,p)};Y(S,o=>{d()?o(z):o(b,-1)})}return F(c,x),ae(v)}var Sr=new Set(["$$slots","$$events","$$legacy","children","onSubmit","busy","enterKey","modEnter","class"]),Ir=Be('<form><fieldset class="contents"><!></fieldset></form>');function Ft(c,e){if(new.target)return te({component:Ft,...c});ne(e,!0);let n=r(e,"children",7),i=r(e,"onSubmit",7),d=r(e,"busy",7,!1),g=r(e,"enterKey",7,"submit"),f=r(e,"modEnter",7,"submit"),y=r(e,"class",7),C=Ee(e,Sr),h,w=N(!1);const _=I(()=>d()||a(w));async function P(o){if(o.preventDefault(),!a(_)){k(w,!0);try{await i()(o)}finally{k(w,!1)}}}function v(o){if(o.key!=="Enter"||o.isComposing||o.defaultPrevented||a(_))return;const p=o.target,L=mr(p),K=p.closest('button, a[href], select, summary, [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"], [role="combobox"], [role="slider"]');if(K&&h.contains(K)||p instanceof HTMLInputElement&&!["text","search","email","url","tel","password","number"].includes(p.type))return;const t=o.metaKey||o.ctrlKey;(t?f()==="submit":!L&&g()==="submit")?(o.preventDefault(),h.requestSubmit()):(!L||t)&&o.preventDefault()}var x={get children(){return n()},set children(o){n(o),s()},get onSubmit(){return i()},set onSubmit(o){i(o),s()},get busy(){return d()},set busy(o=!1){d(o),s()},get enterKey(){return g()},set enterKey(o="submit"){g(o),s()},get modEnter(){return f()},set modEnter(o="submit"){f(o),s()},get class(){return y()},set class(o){y(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},S=Ir();at(S,o=>({"data-slot":"form","aria-busy":a(_)||void 0,class:o,onsubmit:P,onkeydown:v,...C}),[()=>be("grid gap-4",y())]);var z=de(S),b=de(z);return H(b,n),ge(z),ge(S),fr(S,o=>h=o,()=>h),_e(()=>{z.disabled=a(_),wt(z,"aria-busy",a(_)||void 0)}),F(c,S),ae(x)}var Pr=Be('<div data-slot="form-actions"><div data-slot="form-actions-destructive" class="flex items-center"><!></div> <div data-slot="form-actions-end" class="ml-auto flex items-center gap-2"><!> <!> <!></div></div>');function Lt(c,e){if(new.target)return te({component:Lt,...c});ne(e,!0);let n=r(e,"destructive",7),i=r(e,"secondary",7),d=r(e,"primary",7),g=r(e,"hint",7),f=r(e,"class",7);const y=ar();var C={get destructive(){return n()},set destructive(b){n(b),s()},get secondary(){return i()},set secondary(b){i(b),s()},get primary(){return d()},set primary(b){d(b),s()},get hint(){return g()},set hint(b){g(b),s()},get class(){return f()},set class(b){f(b),s()},$set:re,$on:(b,o)=>se(e,b,o)},h=Pr(),w=de(h),_=de(w);H(_,()=>n()??fe),ge(w);var P=ve(w,2),v=de(P);{var x=b=>{ir(b,{children:(o,p)=>{$e();var L=et();_e(()=>tt(L,g())),F(o,L)},$$slots:{default:!0}})};Y(v,b=>{g()&&b(x)})}var S=ve(v,2);H(S,()=>i()??fe);var z=ve(S,2);return H(z,d),ge(P),ge(h),_e(b=>{wt(h,"data-size",y),dr(h,1,b)},[()=>cr(be("flex items-center justify-between",y==="compact"?"gap-2":"gap-3",f()))]),F(c,h),ae(C)}function zt(c,e){if(new.target)return te({component:zt,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"titleId",7),y=r(e,"descriptionId",7),C=r(e,"children",7),h=r(e,"footer",7),w=r(e,"submitLabel",23,()=>ce.modals_bulkActionConfirm_confirm_label()),_=r(e,"cancelLabel",23,()=>ce.modals_bulkActionConfirm_cancel_label()),P=r(e,"submitVariant",7,"primary"),v=r(e,"canSubmit",7,!0),x=r(e,"busy",7,!1),S=r(e,"submitBusy",7,!1),z=r(e,"role",7,"dialog"),b=r(e,"dismissOnInteractOutside",7,!0),o=r(e,"showCancel",7,!0),p=r(e,"showCloseButton",7,!0),L=r(e,"closeLabel",23,()=>ce.ui_dialog_close_ariaLabel()),K=r(e,"class",7),t=r(e,"size",7,"default"),l=r(e,"initialFocus",7),E=r(e,"focusContent",7,!1),B=r(e,"focusSubmit",7,!1),W=r(e,"focusCancel",7,!1),D=r(e,"escapeKeydownBehavior",7,"close"),G=r(e,"enterKey",7,"submit"),O=r(e,"modEnter",7,"submit"),ie=r(e,"onfocusin",7),Q=r(e,"onCloseAutoFocus",7),X=r(e,"onSubmit",7),oe=r(e,"onCancel",7),ue=N(!1),j=N(""),Me=N(!1),Ae=N(null),Re=N(null),Ne=N(null);const J=I(()=>x()||a(ue));ye(()=>{n()&&(k(Me,!1),k(j,""))});function He(){a(J)||a(Me)||(k(Me,!0),n(!1),oe()?.())}async function Bt(){if(!(a(J)||S()||!v())){k(ue,!0),k(j,"");try{await X()()}catch{k(j,ce.ui_dialog_submitFailed_error(),!0)}finally{k(ue,!1)}}}function At(u){const Z=l()??(W()?a(Re):B()?a(Ne):E()?a(Ae):null);Z&&(Z.focus(),Z.ownerDocument.activeElement===Z&&u.preventDefault())}var Tt={get open(){return n()},set open(u=!1){n(u),s()},get static(){return i()},set static(u=!1){i(u),s()},get title(){return d()},set title(u){d(u),s()},get description(){return g()},set description(u){g(u),s()},get titleId(){return f()},set titleId(u){f(u),s()},get descriptionId(){return y()},set descriptionId(u){y(u),s()},get children(){return C()},set children(u){C(u),s()},get footer(){return h()},set footer(u){h(u),s()},get submitLabel(){return w()},set submitLabel(u=ce.modals_bulkActionConfirm_confirm_label()){w(u),s()},get cancelLabel(){return _()},set cancelLabel(u=ce.modals_bulkActionConfirm_cancel_label()){_(u),s()},get submitVariant(){return P()},set submitVariant(u="primary"){P(u),s()},get canSubmit(){return v()},set canSubmit(u=!0){v(u),s()},get busy(){return x()},set busy(u=!1){x(u),s()},get submitBusy(){return S()},set submitBusy(u=!1){S(u),s()},get role(){return z()},set role(u="dialog"){z(u),s()},get dismissOnInteractOutside(){return b()},set dismissOnInteractOutside(u=!0){b(u),s()},get showCancel(){return o()},set showCancel(u=!0){o(u),s()},get showCloseButton(){return p()},set showCloseButton(u=!0){p(u),s()},get closeLabel(){return L()},set closeLabel(u=ce.ui_dialog_close_ariaLabel()){L(u),s()},get class(){return K()},set class(u){K(u),s()},get size(){return t()},set size(u="default"){t(u),s()},get initialFocus(){return l()},set initialFocus(u){l(u),s()},get focusContent(){return E()},set focusContent(u=!1){E(u),s()},get focusSubmit(){return B()},set focusSubmit(u=!1){B(u),s()},get focusCancel(){return W()},set focusCancel(u=!1){W(u),s()},get escapeKeydownBehavior(){return D()},set escapeKeydownBehavior(u="close"){D(u),s()},get enterKey(){return G()},set enterKey(u="submit"){G(u),s()},get modEnter(){return O()},set modEnter(u="submit"){O(u),s()},get onfocusin(){return ie()},set onfocusin(u){ie(u),s()},get onCloseAutoFocus(){return Q()},set onCloseAutoFocus(u){Q(u),s()},get onSubmit(){return X()},set onSubmit(u){X(u),s()},get onCancel(){return oe()},set onCancel(u){oe(u),s()},$set:re,$on:(u,Z)=>se(e,u,Z)},ot=V(),Kt=A(ot);return pe(Kt,()=>or,(u,Z)=>{Z(u,{get open(){return n()},get staticPosition(){return i()},onOpenChange:je=>!je&&He(),children:(je,Ar)=>{var ut=V(),Vt=A(ut);{let Ot=I(()=>be("flex min-h-0 flex-col overflow-hidden p-0",K()));pe(Vt,()=>ur,(Dt,Gt)=>{Gt(Dt,{get role(){return z()},get size(){return t()},get class(){return a(Ot)},get closeDisabled(){return a(J)},get showCloseButton(){return p()},get closeLabel(){return L()},get escapeKeydownBehavior(){return D()},onOpenAutoFocus:At,get onCloseAutoFocus(){return Q()},get onfocusin(){return ie()},onkeydown:M=>{M.key==="Escape"&&gr(a(Ae),M)||M.key==="Escape"&&D()==="close"&&(M.preventDefault(),M.stopPropagation(),He())},onInteractOutside:M=>(a(J)||!b())&&M.preventDefault(),onEscapeKeydown:M=>a(J)&&M.preventDefault(),get ref(){return a(Ae)},set ref(M){k(Ae,M,!0)},children:(M,Tr)=>{Ft(M,{onSubmit:Bt,get busy(){return a(J)},get enterKey(){return G()},get modEnter(){return O()},class:"flex min-h-0 min-w-0 flex-1 flex-col",children:(Mt,Kr)=>{lr(Mt,{get title(){return d()},get description(){return g()},get titleId(){return f()},get descriptionId(){return y()},get children(){return C()},get error(){return a(j)},footer:Rt=>{var lt=V(),Nt=A(lt);{var Ht=me=>{var qe=V(),ct=A(qe);H(ct,h),F(me,qe)},jt=me=>{Lt(me,{secondary:Ue=>{var Te=V(),We=A(Te);{var Qe=le=>{ht(le,{variant:"ghost-light",get disabled(){return a(J)},onclick:He,get ref(){return a(Re)},set ref(Ke){k(Re,Ke,!0)},children:(Ke,Xe)=>{$e();var dt=et();_e(()=>tt(dt,_())),F(Ke,dt)},$$slots:{default:!0}})};Y(We,le=>{o()&&le(Qe)})}F(Ue,Te)},primary:Ue=>{{let Te=I(()=>B()?"focus-visible:outline focus-visible:-outline-offset-1":void 0),We=I(()=>a(J)||S()),Qe=I(()=>!v()||a(J)||S());ht(Ue,{type:"submit",get variant(){return P()},get class(){return a(Te)},get loading(){return a(We)},get disabled(){return a(Qe)},get ref(){return a(Ne)},set ref(le){k(Ne,le,!0)},children:(le,Ke)=>{$e();var Xe=et();_e(()=>tt(Xe,w())),F(le,Xe)},$$slots:{default:!0}})}},$$slots:{secondary:!0,primary:!0}})};Y(Nt,me=>{h()?me(Ht):me(jt,-1)})}F(Rt,lt)},$$slots:{footer:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})})}F(je,ut)},$$slots:{default:!0}})}),F(c,ot),ae(Tt)}function kr(c,e){if(new.target)return te({component:kr,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"confirmLabel",7),y=r(e,"cancelLabel",7),C=r(e,"details",7),h=r(e,"busy",7,!1),w=r(e,"submitBusy",7,!1),_=r(e,"canSubmit",7,!0),P=r(e,"focusSubmit",7,!0),v=r(e,"focusCancel",7,!1),x=r(e,"enterKey",7,"submit"),S=r(e,"modEnter",7,"submit"),z=r(e,"destructive",7,!0),b=r(e,"class",7),o=r(e,"closeLabel",7),p=r(e,"onConfirm",7),L=r(e,"onCancel",7);var K={get open(){return n()},set open(t=!1){n(t),s()},get static(){return i()},set static(t=!1){i(t),s()},get title(){return d()},set title(t){d(t),s()},get description(){return g()},set description(t){g(t),s()},get confirmLabel(){return f()},set confirmLabel(t){f(t),s()},get cancelLabel(){return y()},set cancelLabel(t){y(t),s()},get details(){return C()},set details(t){C(t),s()},get busy(){return h()},set busy(t=!1){h(t),s()},get submitBusy(){return w()},set submitBusy(t=!1){w(t),s()},get canSubmit(){return _()},set canSubmit(t=!0){_(t),s()},get focusSubmit(){return P()},set focusSubmit(t=!0){P(t),s()},get focusCancel(){return v()},set focusCancel(t=!1){v(t),s()},get enterKey(){return x()},set enterKey(t="submit"){x(t),s()},get modEnter(){return S()},set modEnter(t="submit"){S(t),s()},get destructive(){return z()},set destructive(t=!0){z(t),s()},get class(){return b()},set class(t){b(t),s()},get closeLabel(){return o()},set closeLabel(t){o(t),s()},get onConfirm(){return p()},set onConfirm(t){p(t),s()},get onCancel(){return L()},set onCancel(t){L(t),s()},$set:re,$on:(t,l)=>se(e,t,l)};{let t=I(()=>z()?"destructive":"default");zt(c,{get static(){return i()},get title(){return d()},get description(){return g()},get submitLabel(){return f()},get cancelLabel(){return y()},get submitVariant(){return a(t)},get busy(){return h()},get submitBusy(){return w()},get canSubmit(){return _()},get focusSubmit(){return P()},get focusCancel(){return v()},get enterKey(){return x()},get modEnter(){return S()},get class(){return b()},get closeLabel(){return o()},get onSubmit(){return p()},get onCancel(){return L()},get open(){return n()},set open(l){n(l)},children:(l,E)=>{var B=V(),W=A(B);{var D=G=>{var O=V(),ie=A(O);H(ie,C),F(G,O)};Y(W,G=>{C()&&G(D)})}F(l,B)},$$slots:{default:!0}})}return ae(K)}var R,ke,Fe,Le,ze;class Fr{constructor(e,n){T(this,R,N(Wt([])));T(this,ke);T(this,Fe);T(this,Le,N(null));T(this,ze,N(0));Ye(this,ke,e),Ye(this,Fe,n)}get hover(){return a(m(this,Le))}set hover(e){k(m(this,Le),e,!0)}get keyboardIndex(){return a(m(this,ze))}set keyboardIndex(e){k(m(this,ze),e,!0)}get selectedIndexes(){const e=new Set(m(this,ke).call(this));return a(m(this,R)).flatMap((n,i)=>n&&e.has(n.value)?[i]:[])}allocate(e){return $(()=>{const n={value:e,element:null,disabled:!1},i=a(m(this,R)).indexOf(void 0);return i<0?a(m(this,R)).push(n)-1:(a(m(this,R))[i]=n,i)})}release(e){$(()=>{a(m(this,R))[e]&&(a(m(this,R))[e]=void 0,this.hover?.activeIndex===e&&this.hover.setActiveIndex(null),this.hover?.registerItem(e,null))})}update(e,n,i){$(()=>{const d=a(m(this,R))[e];d&&(d.value=n,d.disabled=i)})}register(e,n){$(()=>{const i=a(m(this,R))[e];i&&(i.element=n,this.hover?.registerItem(e,n))})}connect(e){$(()=>{this.hover?.destroy(),this.hover=hr(e,{axis:m(this,Fe)});for(const[n,i]of a(m(this,R)).entries())i?.element&&this.hover.registerItem(n,i.element)})}disconnect(){$(()=>{this.hover?.destroy(),this.hover=null})}activate(e){this.keyboardIndex=e,this.hover?.setActiveIndex(e)}focusAdjacent(e,n){const i=a(m(this,R)).map((f,y)=>({entry:f,entryIndex:y})).filter(({entry:f})=>f?.element&&!f.disabled),d=i.findIndex(({entryIndex:f})=>f===e);if(d<0||i.length===0)return;const g=i[(d+n+i.length)%i.length];this.activate(g.entryIndex),g.entry?.element?.focus()}}R=new WeakMap,ke=new WeakMap,Fe=new WeakMap,Le=new WeakMap,ze=new WeakMap;const Et=Symbol("toggle-group");var Lr=new Set(["$$slots","$$events","$$legacy","value","onValueChange","type","disabled","axis","variant","size","class","children"]),vt=Be("<!> <!>",1);function zr(c,e){if(new.target)return te({component:zr,...c});ne(e,!0);const n=Ct({base:"relative isolate inline-flex shrink-0 items-center justify-center gap-0.5 rounded-(--radius-medium) border-0 bg-card",variants:{variant:{default:"shadow-(--elevation-raised)",outline:"border border-border shadow-none",flat:"bg-muted/40 shadow-none"},size:{default:"",xs:"",sm:"",lg:""}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",15),d=r(e,"onValueChange",7),g=r(e,"type",7,"single"),f=r(e,"disabled",7,!1),y=r(e,"axis",7,"x"),C=r(e,"variant",7,"default"),h=r(e,"size",7,"default"),w=r(e,"class",7,""),_=r(e,"children",7),P=Ee(e,Lr),v=N(null);const x=new Fr(()=>Array.isArray(i())?i():typeof i()=="string"&&i()?[i()]:[],$(()=>y()));Qt(Et,{state:x,get size(){return h()},get variant(){return C()}}),ye(()=>{if(a(v))return x.connect(a(v)),()=>x.disconnect()});function S(t){i(t),d()?.(t)}function z(t){i(t),d()?.(t)}var b={get value(){return i()},set value(t){i(t),s()},get onValueChange(){return d()},set onValueChange(t){d(t),s()},get type(){return g()},set type(t="single"){g(t),s()},get disabled(){return f()},set disabled(t=!1){f(t),s()},get axis(){return y()},set axis(t="x"){y(t),s()},get variant(){return C()},set variant(t="default"){C(t),s()},get size(){return h()},set size(t="default"){h(t),s()},get class(){return w()},set class(t=""){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},o=V(),p=A(o);{var L=t=>{var l=V(),E=A(l);{let B=I(()=>Array.isArray(i())?i():[]),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"multiple",get value(){return a(B)},onValueChange:z,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)},K=t=>{var l=V(),E=A(l);{let B=I(()=>typeof i()=="string"?i():""),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"single",get value(){return a(B)},onValueChange:S,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)};Y(p,t=>{g()==="multiple"?t(L):t(K,-1)})}return F(c,o),ae(b)}var Er=new Set(["$$slots","$$events","$$legacy","value","disabled","variant","size","tooltip","class","onclick","onfocus","children"]);function Br(c,e){if(new.target)return te({component:Br,...c});ne(e,!0);const n=Ct({base:"type-caption relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--radius-medium) border-0 bg-transparent font-normal text-muted-foreground transition-[color,font-weight] duration-spring-fast ease-spring-fast hover:text-foreground active:bg-active disabled:pointer-events-none disabled:opacity-50 data-[state=on]:[--text-caption-weight:500] data-[state=on]:text-foreground motion-reduce:transition-none",variants:{variant:{default:"",outline:"bg-transparent",flat:""},size:{default:"h-(--control-height-medium) min-w-8 px-2",xs:"h-(--control-height-small) min-w-7 px-1.5",sm:"h-(--control-height-small) min-w-7 px-1.5",lg:"h-(--control-height-large) min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",7),d=r(e,"disabled",7,!1),g=r(e,"variant",7,void 0),f=r(e,"size",7,void 0),y=r(e,"tooltip",7,void 0),C=r(e,"class",7,""),h=r(e,"onclick",7),w=r(e,"onfocus",7),_=r(e,"children",7),P=Ee(e,Er);const v=Xt(Et),x=v.state.allocate($(()=>i()));let S=N(null);const z=I(()=>f()??v?.size??"default"),b=I(()=>g()??v?.variant??"default");ye(()=>v.state.update(x,i(),d())),ye(()=>(v.state.register(x,a(S)),()=>v.state.register(x,null)));function o(t){v.state.activate(x),w()?.(t)}var p={get value(){return i()},set value(t){i(t),s()},get disabled(){return d()},set disabled(t=!1){d(t),s()},get variant(){return g()},set variant(t=void 0){g(t),s()},get size(){return f()},set size(t=void 0){f(t),s()},get tooltip(){return y()},set tooltip(t=void 0){y(t),s()},get class(){return C()},set class(t=""){C(t),s()},get onclick(){return h()},set onclick(t){h(t),s()},get onfocus(){return w()},set onfocus(t){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},L=V(),K=A(L);{let t=I(()=>be(n({variant:a(b),size:a(z)}),C()));pe(K,()=>kt,(l,E)=>{E(l,Ze({get value(){return i()},get title(){return y()},get disabled(){return d()},get onclick(){return h()},onfocus:o,get class(){return a(t)}},()=>P,{get ref(){return a(S)},set ref(B){k(S,B,!0)},children:(B,W)=>{var D=V(),G=A(D);H(G,()=>_()??fe),F(B,D)},$$slots:{default:!0}}))})}return F(c,L),ae(p)}export{Fr as C,kr as D,Ft as F,zr as T,Lt as a,zt as b,Br as c};
|
|
1
|
+
var qt=Object.defineProperty;var gt=c=>{throw TypeError(c)};var Ut=(c,e,n)=>e in c?qt(c,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[e]=n;var q=(c,e,n)=>Ut(c,typeof e!="symbol"?e+"":e,n),Je=(c,e,n)=>e.has(c)||gt("Cannot "+n);var m=(c,e,n)=>(Je(c,e,"read from private field"),n?n.call(c):e.get(c)),T=(c,e,n)=>e.has(c)?gt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(c):e.set(c,n),Ye=(c,e,n,i)=>(Je(c,e,"write to private field"),i?i.call(c,n):e.set(c,n),n),ft=(c,e,n)=>(Je(c,e,"access private method"),n);import{t as te,bq as r,by as re,b as se,br as Ee,bo as ce,bt as Ze}from"./41c-5lbJ.js";import{c9 as I,aD as a,bH as k,ca as ye,bV as N,bo as yt,bs as ne,a7 as V,ay as A,W as F,bn as ae,aA as s,a5 as de,bf as fe,bA as ge,aB as Be,b_ as _e,bS as ve,be as $e,b$ as et,bO as tt,br as Wt,c5 as $,bI as Qt,aG as Xt}from"./DYhIMPy1.js";import{i as Y}from"./ClgmQqA9.js";import{s as H}from"./BhX-5zd9.js";import{c as pe}from"./Dv-TQImR.js";import{h as Jt,aD as Yt,ar as Zt,an as _t,l as $t,a6 as er,at as tr,aq as pt,ay as rr,a3 as sr,az as Ve,aS as mt,a$ as nr,av as U,aQ as xt,a_ as ar,aa as ir,f as ht}from"./nLyQInj7.js";import{_ as Ct}from"./De70D2Lx.js";import{O as or}from"./BahcW9Py.js";import{a as ur,D as lr}from"./Og4xuM7g.js";import{b as at,e as be,s as wt,c as cr,f as dr}from"./BBCbq-hE.js";import"./DfA_Upom.js";import{e as gr,P as bt}from"./CCw4KHZp.js";import{b as fr}from"./BaIAhI85.js";import{i as mr}from"./CC7to1B5.js";import"./CCO5tijn.js";import"./D07rIrLM.js";import{g as hr}from"./D_P8KoFV.js";const rt=rr({component:"toggle-group",parts:["root","item"]}),St=new Jt("ToggleGroup.Root");var xe;class It{constructor(e){q(this,"opts");q(this,"rovingFocusGroup");q(this,"attachment");T(this,xe,I(()=>({id:this.opts.id.current,[rt.root]:"",role:"group","data-orientation":this.opts.orientation.current,"data-disabled":pt(this.opts.disabled.current),...this.attachment})));this.opts=e,this.attachment=_t(this.opts.ref),this.rovingFocusGroup=new sr({candidateAttr:rt.item,rootNode:e.ref,loop:e.loop,orientation:e.orientation})}get props(){return a(m(this,xe))}set props(e){k(m(this,xe),e)}}xe=new WeakMap;var Ce;class br extends It{constructor(n){super(n);q(this,"opts");q(this,"isMulti",!1);T(this,Ce,I(()=>this.opts.value.current!==""));this.opts=n}get anyPressed(){return a(m(this,Ce))}set anyPressed(n){k(m(this,Ce),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i){this.includesItem(n)?this.opts.value.current="":(this.opts.value.current=n,this.rovingFocusGroup.setCurrentTabStopId(i))}}Ce=new WeakMap;var we;class vr extends It{constructor(n){super(n);q(this,"opts");q(this,"isMulti",!0);T(this,we,I(()=>this.opts.value.current.length>0));this.opts=n}get anyPressed(){return a(m(this,we))}set anyPressed(n){k(m(this,we),n)}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(d=>d!==n):(this.opts.value.current=[...this.opts.value.current,n],this.rovingFocusGroup.setCurrentTabStopId(i))}}we=new WeakMap;class yr{static create(e){const{type:n,...i}=e,d=n==="single"?new br(i):new vr(i);return St.set(d)}}var ee,Se,Oe,De,Ge,Pt,he,Ie,Pe;const it=class it{constructor(e,n){T(this,Ge);q(this,"opts");q(this,"root");q(this,"attachment");T(this,ee,I(()=>this.opts.disabled.current||this.root.opts.disabled.current));T(this,Se,I(()=>this.root.includesItem(this.opts.value.current)));T(this,Oe,I(()=>this.root.isMulti?void 0:Yt(this.isPressed,!1)));T(this,De,I(()=>this.root.isMulti?Zt(this.isPressed):void 0));T(this,he,N(0));T(this,Ie,I(()=>({pressed:this.isPressed})));T(this,Pe,I(()=>({id:this.opts.id.current,role:this.root.isMulti?void 0:"radio",tabindex:a(m(this,he)),"data-orientation":this.root.opts.orientation.current,"data-disabled":pt(a(m(this,ee))),"data-state":_r(this.isPressed),"data-value":this.opts.value.current,"aria-pressed":a(m(this,De)),"aria-checked":a(m(this,Oe)),disabled:tr(a(m(this,ee))),[rt.item]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment})));this.opts=e,this.root=n,this.attachment=_t(this.opts.ref),ye(()=>{this.root.opts.rovingFocus.current?k(m(this,he),this.root.rovingFocusGroup.getTabIndex(this.opts.ref.current),!0):k(m(this,he),0)}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}static create(e){return new it(e,St.get())}get isPressed(){return a(m(this,Se))}set isPressed(e){k(m(this,Se),e)}onclick(e){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)}onkeydown(e){if(!a(m(this,ee))){if(e.key===$t||e.key===er){e.preventDefault(),ft(this,Ge,Pt).call(this);return}this.root.opts.rovingFocus.current&&this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}get snippetProps(){return a(m(this,Ie))}set snippetProps(e){k(m(this,Ie),e)}get props(){return a(m(this,Pe))}set props(e){k(m(this,Pe),e)}};ee=new WeakMap,Se=new WeakMap,Oe=new WeakMap,De=new WeakMap,Ge=new WeakSet,Pt=function(){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)},he=new WeakMap,Ie=new WeakMap,Pe=new WeakMap;let st=it;function _r(c){return c?"on":"off"}var pr=new Set(["$$slots","$$events","$$legacy","id","ref","value","onValueChange","type","disabled","loop","orientation","rovingFocus","child","children"]),xr=Be("<div><!></div>");function nt(c,e){const n=yt();if(new.target)return te({component:nt,...c});ne(e,!0);let i=r(e,"id",23,()=>Ve(n)),d=r(e,"ref",15,null),g=r(e,"value",15),f=r(e,"onValueChange",7,mt),y=r(e,"type",7),C=r(e,"disabled",7,!1),h=r(e,"loop",7,!0),w=r(e,"orientation",7,"horizontal"),_=r(e,"rovingFocus",7,!0),P=r(e,"child",7),v=r(e,"children",7),x=Ee(e,pr);function S(){g()===void 0&&g(y()==="single"?"":[])}S(),nr.pre(()=>g(),()=>{S()});const z=yr.create({id:U(()=>i()),value:U(()=>g(),l=>{g(l),f()(l)}),disabled:U(()=>C()),loop:U(()=>h()),orientation:U(()=>w()),rovingFocus:U(()=>_()),type:y(),ref:U(()=>d(),l=>d(l))}),b=I(()=>xt(x,z.props));var o={get id(){return i()},set id(l=Ve(n)){i(l),s()},get ref(){return d()},set ref(l=null){d(l),s()},get value(){return g()},set value(l){g(l),s()},get onValueChange(){return f()},set onValueChange(l=mt){f(l),s()},get type(){return y()},set type(l){y(l),s()},get disabled(){return C()},set disabled(l=!1){C(l),s()},get loop(){return h()},set loop(l=!0){h(l),s()},get orientation(){return w()},set orientation(l="horizontal"){w(l),s()},get rovingFocus(){return _()},set rovingFocus(l=!0){_(l),s()},get child(){return P()},set child(l){P(l),s()},get children(){return v()},set children(l){v(l),s()},$set:re,$on:(l,E)=>se(e,l,E)},p=V(),L=A(p);{var K=l=>{var E=V(),B=A(E);H(B,P,()=>({props:a(b)})),F(l,E)},t=l=>{var E=xr();at(E,()=>({...a(b)}));var B=de(E);H(B,()=>v()??fe),ge(E),F(l,E)};Y(L,l=>{P()?l(K):l(t,-1)})}return F(c,p),ae(o)}var Cr=new Set(["$$slots","$$events","$$legacy","children","child","ref","value","disabled","id","type"]),wr=Be("<button><!></button>");function kt(c,e){const n=yt();if(new.target)return te({component:kt,...c});ne(e,!0);let i=r(e,"children",7),d=r(e,"child",7),g=r(e,"ref",15,null),f=r(e,"value",7),y=r(e,"disabled",7,!1),C=r(e,"id",23,()=>Ve(n)),h=r(e,"type",7,"button"),w=Ee(e,Cr);const _=st.create({id:U(()=>C()),value:U(()=>f()),disabled:U(()=>y()??!1),ref:U(()=>g(),o=>g(o))}),P=I(()=>xt(w,_.props,{type:h()}));var v={get children(){return i()},set children(o){i(o),s()},get child(){return d()},set child(o){d(o),s()},get ref(){return g()},set ref(o=null){g(o),s()},get value(){return f()},set value(o){f(o),s()},get disabled(){return y()},set disabled(o=!1){y(o),s()},get id(){return C()},set id(o=Ve(n)){C(o),s()},get type(){return h()},set type(o="button"){h(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},x=V(),S=A(x);{var z=o=>{var p=V(),L=A(p);{let K=I(()=>({props:a(P),..._.snippetProps}));H(L,d,()=>a(K))}F(o,p)},b=o=>{var p=wr();at(p,()=>({...a(P)}));var L=de(p);H(L,()=>i()??fe,()=>_.snippetProps),ge(p),F(o,p)};Y(S,o=>{d()?o(z):o(b,-1)})}return F(c,x),ae(v)}var Sr=new Set(["$$slots","$$events","$$legacy","children","onSubmit","busy","enterKey","modEnter","class"]),Ir=Be('<form><fieldset class="contents"><!></fieldset></form>');function Ft(c,e){if(new.target)return te({component:Ft,...c});ne(e,!0);let n=r(e,"children",7),i=r(e,"onSubmit",7),d=r(e,"busy",7,!1),g=r(e,"enterKey",7,"submit"),f=r(e,"modEnter",7,"submit"),y=r(e,"class",7),C=Ee(e,Sr),h,w=N(!1);const _=I(()=>d()||a(w));async function P(o){if(o.preventDefault(),!a(_)){k(w,!0);try{await i()(o)}finally{k(w,!1)}}}function v(o){if(o.key!=="Enter"||o.isComposing||o.defaultPrevented||a(_))return;const p=o.target,L=mr(p),K=p.closest('button, a[href], select, summary, [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"], [role="combobox"], [role="slider"]');if(K&&h.contains(K)||p instanceof HTMLInputElement&&!["text","search","email","url","tel","password","number"].includes(p.type))return;const t=o.metaKey||o.ctrlKey;(t?f()==="submit":!L&&g()==="submit")?(o.preventDefault(),h.requestSubmit()):(!L||t)&&o.preventDefault()}var x={get children(){return n()},set children(o){n(o),s()},get onSubmit(){return i()},set onSubmit(o){i(o),s()},get busy(){return d()},set busy(o=!1){d(o),s()},get enterKey(){return g()},set enterKey(o="submit"){g(o),s()},get modEnter(){return f()},set modEnter(o="submit"){f(o),s()},get class(){return y()},set class(o){y(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},S=Ir();at(S,o=>({"data-slot":"form","aria-busy":a(_)||void 0,class:o,onsubmit:P,onkeydown:v,...C}),[()=>be("grid gap-4",y())]);var z=de(S),b=de(z);return H(b,n),ge(z),ge(S),fr(S,o=>h=o,()=>h),_e(()=>{z.disabled=a(_),wt(z,"aria-busy",a(_)||void 0)}),F(c,S),ae(x)}var Pr=Be('<div data-slot="form-actions"><div data-slot="form-actions-destructive" class="flex items-center"><!></div> <div data-slot="form-actions-end" class="ml-auto flex items-center gap-2"><!> <!> <!></div></div>');function Lt(c,e){if(new.target)return te({component:Lt,...c});ne(e,!0);let n=r(e,"destructive",7),i=r(e,"secondary",7),d=r(e,"primary",7),g=r(e,"hint",7),f=r(e,"class",7);const y=ar();var C={get destructive(){return n()},set destructive(b){n(b),s()},get secondary(){return i()},set secondary(b){i(b),s()},get primary(){return d()},set primary(b){d(b),s()},get hint(){return g()},set hint(b){g(b),s()},get class(){return f()},set class(b){f(b),s()},$set:re,$on:(b,o)=>se(e,b,o)},h=Pr(),w=de(h),_=de(w);H(_,()=>n()??fe),ge(w);var P=ve(w,2),v=de(P);{var x=b=>{ir(b,{children:(o,p)=>{$e();var L=et();_e(()=>tt(L,g())),F(o,L)},$$slots:{default:!0}})};Y(v,b=>{g()&&b(x)})}var S=ve(v,2);H(S,()=>i()??fe);var z=ve(S,2);return H(z,d),ge(P),ge(h),_e(b=>{wt(h,"data-size",y),dr(h,1,b)},[()=>cr(be("flex items-center justify-between",y==="compact"?"gap-2":"gap-3",f()))]),F(c,h),ae(C)}function zt(c,e){if(new.target)return te({component:zt,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"titleId",7),y=r(e,"descriptionId",7),C=r(e,"children",7),h=r(e,"footer",7),w=r(e,"submitLabel",23,()=>ce.modals_bulkActionConfirm_confirm_label()),_=r(e,"cancelLabel",23,()=>ce.modals_bulkActionConfirm_cancel_label()),P=r(e,"submitVariant",7,"primary"),v=r(e,"canSubmit",7,!0),x=r(e,"busy",7,!1),S=r(e,"submitBusy",7,!1),z=r(e,"role",7,"dialog"),b=r(e,"dismissOnInteractOutside",7,!0),o=r(e,"showCancel",7,!0),p=r(e,"showCloseButton",7,!0),L=r(e,"closeLabel",23,()=>ce.ui_dialog_close_ariaLabel()),K=r(e,"class",7),t=r(e,"size",7,"default"),l=r(e,"initialFocus",7),E=r(e,"focusContent",7,!1),B=r(e,"focusSubmit",7,!1),W=r(e,"focusCancel",7,!1),D=r(e,"escapeKeydownBehavior",7,"close"),G=r(e,"enterKey",7,"submit"),O=r(e,"modEnter",7,"submit"),ie=r(e,"onfocusin",7),Q=r(e,"onCloseAutoFocus",7),X=r(e,"onSubmit",7),oe=r(e,"onCancel",7),ue=N(!1),j=N(""),Me=N(!1),Ae=N(null),Re=N(null),Ne=N(null);const J=I(()=>x()||a(ue));ye(()=>{n()&&(k(Me,!1),k(j,""))});function He(){a(J)||a(Me)||(k(Me,!0),n(!1),oe()?.())}async function Bt(){if(!(a(J)||S()||!v())){k(ue,!0),k(j,"");try{await X()()}catch{k(j,ce.ui_dialog_submitFailed_error(),!0)}finally{k(ue,!1)}}}function At(u){const Z=l()??(W()?a(Re):B()?a(Ne):E()?a(Ae):null);Z&&(Z.focus(),Z.ownerDocument.activeElement===Z&&u.preventDefault())}var Tt={get open(){return n()},set open(u=!1){n(u),s()},get static(){return i()},set static(u=!1){i(u),s()},get title(){return d()},set title(u){d(u),s()},get description(){return g()},set description(u){g(u),s()},get titleId(){return f()},set titleId(u){f(u),s()},get descriptionId(){return y()},set descriptionId(u){y(u),s()},get children(){return C()},set children(u){C(u),s()},get footer(){return h()},set footer(u){h(u),s()},get submitLabel(){return w()},set submitLabel(u=ce.modals_bulkActionConfirm_confirm_label()){w(u),s()},get cancelLabel(){return _()},set cancelLabel(u=ce.modals_bulkActionConfirm_cancel_label()){_(u),s()},get submitVariant(){return P()},set submitVariant(u="primary"){P(u),s()},get canSubmit(){return v()},set canSubmit(u=!0){v(u),s()},get busy(){return x()},set busy(u=!1){x(u),s()},get submitBusy(){return S()},set submitBusy(u=!1){S(u),s()},get role(){return z()},set role(u="dialog"){z(u),s()},get dismissOnInteractOutside(){return b()},set dismissOnInteractOutside(u=!0){b(u),s()},get showCancel(){return o()},set showCancel(u=!0){o(u),s()},get showCloseButton(){return p()},set showCloseButton(u=!0){p(u),s()},get closeLabel(){return L()},set closeLabel(u=ce.ui_dialog_close_ariaLabel()){L(u),s()},get class(){return K()},set class(u){K(u),s()},get size(){return t()},set size(u="default"){t(u),s()},get initialFocus(){return l()},set initialFocus(u){l(u),s()},get focusContent(){return E()},set focusContent(u=!1){E(u),s()},get focusSubmit(){return B()},set focusSubmit(u=!1){B(u),s()},get focusCancel(){return W()},set focusCancel(u=!1){W(u),s()},get escapeKeydownBehavior(){return D()},set escapeKeydownBehavior(u="close"){D(u),s()},get enterKey(){return G()},set enterKey(u="submit"){G(u),s()},get modEnter(){return O()},set modEnter(u="submit"){O(u),s()},get onfocusin(){return ie()},set onfocusin(u){ie(u),s()},get onCloseAutoFocus(){return Q()},set onCloseAutoFocus(u){Q(u),s()},get onSubmit(){return X()},set onSubmit(u){X(u),s()},get onCancel(){return oe()},set onCancel(u){oe(u),s()},$set:re,$on:(u,Z)=>se(e,u,Z)},ot=V(),Kt=A(ot);return pe(Kt,()=>or,(u,Z)=>{Z(u,{get open(){return n()},get staticPosition(){return i()},onOpenChange:je=>!je&&He(),children:(je,Ar)=>{var ut=V(),Vt=A(ut);{let Ot=I(()=>be("flex min-h-0 flex-col overflow-hidden p-0",K()));pe(Vt,()=>ur,(Dt,Gt)=>{Gt(Dt,{get role(){return z()},get size(){return t()},get class(){return a(Ot)},get closeDisabled(){return a(J)},get showCloseButton(){return p()},get closeLabel(){return L()},get escapeKeydownBehavior(){return D()},onOpenAutoFocus:At,get onCloseAutoFocus(){return Q()},get onfocusin(){return ie()},onkeydown:M=>{M.key==="Escape"&&gr(a(Ae),M)||M.key==="Escape"&&D()==="close"&&(M.preventDefault(),M.stopPropagation(),He())},onInteractOutside:M=>(a(J)||!b())&&M.preventDefault(),onEscapeKeydown:M=>a(J)&&M.preventDefault(),get ref(){return a(Ae)},set ref(M){k(Ae,M,!0)},children:(M,Tr)=>{Ft(M,{onSubmit:Bt,get busy(){return a(J)},get enterKey(){return G()},get modEnter(){return O()},class:"flex min-h-0 min-w-0 flex-1 flex-col",children:(Mt,Kr)=>{lr(Mt,{get title(){return d()},get description(){return g()},get titleId(){return f()},get descriptionId(){return y()},get children(){return C()},get error(){return a(j)},footer:Rt=>{var lt=V(),Nt=A(lt);{var Ht=me=>{var qe=V(),ct=A(qe);H(ct,h),F(me,qe)},jt=me=>{Lt(me,{secondary:Ue=>{var Te=V(),We=A(Te);{var Qe=le=>{ht(le,{variant:"ghost-light",get disabled(){return a(J)},onclick:He,get ref(){return a(Re)},set ref(Ke){k(Re,Ke,!0)},children:(Ke,Xe)=>{$e();var dt=et();_e(()=>tt(dt,_())),F(Ke,dt)},$$slots:{default:!0}})};Y(We,le=>{o()&&le(Qe)})}F(Ue,Te)},primary:Ue=>{{let Te=I(()=>B()?"focus-visible:outline focus-visible:-outline-offset-1":void 0),We=I(()=>a(J)||S()),Qe=I(()=>!v()||a(J)||S());ht(Ue,{type:"submit",get variant(){return P()},get class(){return a(Te)},get loading(){return a(We)},get disabled(){return a(Qe)},get ref(){return a(Ne)},set ref(le){k(Ne,le,!0)},children:(le,Ke)=>{$e();var Xe=et();_e(()=>tt(Xe,w())),F(le,Xe)},$$slots:{default:!0}})}},$$slots:{secondary:!0,primary:!0}})};Y(Nt,me=>{h()?me(Ht):me(jt,-1)})}F(Rt,lt)},$$slots:{footer:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})})}F(je,ut)},$$slots:{default:!0}})}),F(c,ot),ae(Tt)}function kr(c,e){if(new.target)return te({component:kr,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"confirmLabel",7),y=r(e,"cancelLabel",7),C=r(e,"details",7),h=r(e,"busy",7,!1),w=r(e,"submitBusy",7,!1),_=r(e,"canSubmit",7,!0),P=r(e,"focusSubmit",7,!0),v=r(e,"focusCancel",7,!1),x=r(e,"enterKey",7,"submit"),S=r(e,"modEnter",7,"submit"),z=r(e,"destructive",7,!0),b=r(e,"class",7),o=r(e,"closeLabel",7),p=r(e,"onConfirm",7),L=r(e,"onCancel",7);var K={get open(){return n()},set open(t=!1){n(t),s()},get static(){return i()},set static(t=!1){i(t),s()},get title(){return d()},set title(t){d(t),s()},get description(){return g()},set description(t){g(t),s()},get confirmLabel(){return f()},set confirmLabel(t){f(t),s()},get cancelLabel(){return y()},set cancelLabel(t){y(t),s()},get details(){return C()},set details(t){C(t),s()},get busy(){return h()},set busy(t=!1){h(t),s()},get submitBusy(){return w()},set submitBusy(t=!1){w(t),s()},get canSubmit(){return _()},set canSubmit(t=!0){_(t),s()},get focusSubmit(){return P()},set focusSubmit(t=!0){P(t),s()},get focusCancel(){return v()},set focusCancel(t=!1){v(t),s()},get enterKey(){return x()},set enterKey(t="submit"){x(t),s()},get modEnter(){return S()},set modEnter(t="submit"){S(t),s()},get destructive(){return z()},set destructive(t=!0){z(t),s()},get class(){return b()},set class(t){b(t),s()},get closeLabel(){return o()},set closeLabel(t){o(t),s()},get onConfirm(){return p()},set onConfirm(t){p(t),s()},get onCancel(){return L()},set onCancel(t){L(t),s()},$set:re,$on:(t,l)=>se(e,t,l)};{let t=I(()=>z()?"destructive":"default");zt(c,{get static(){return i()},get title(){return d()},get description(){return g()},get submitLabel(){return f()},get cancelLabel(){return y()},get submitVariant(){return a(t)},get busy(){return h()},get submitBusy(){return w()},get canSubmit(){return _()},get focusSubmit(){return P()},get focusCancel(){return v()},get enterKey(){return x()},get modEnter(){return S()},get class(){return b()},get closeLabel(){return o()},get onSubmit(){return p()},get onCancel(){return L()},get open(){return n()},set open(l){n(l)},children:(l,E)=>{var B=V(),W=A(B);{var D=G=>{var O=V(),ie=A(O);H(ie,C),F(G,O)};Y(W,G=>{C()&&G(D)})}F(l,B)},$$slots:{default:!0}})}return ae(K)}var R,ke,Fe,Le,ze;class Fr{constructor(e,n){T(this,R,N(Wt([])));T(this,ke);T(this,Fe);T(this,Le,N(null));T(this,ze,N(0));Ye(this,ke,e),Ye(this,Fe,n)}get hover(){return a(m(this,Le))}set hover(e){k(m(this,Le),e,!0)}get keyboardIndex(){return a(m(this,ze))}set keyboardIndex(e){k(m(this,ze),e,!0)}get selectedIndexes(){const e=new Set(m(this,ke).call(this));return a(m(this,R)).flatMap((n,i)=>n&&e.has(n.value)?[i]:[])}allocate(e){return $(()=>{const n={value:e,element:null,disabled:!1},i=a(m(this,R)).indexOf(void 0);return i<0?a(m(this,R)).push(n)-1:(a(m(this,R))[i]=n,i)})}release(e){$(()=>{a(m(this,R))[e]&&(a(m(this,R))[e]=void 0,this.hover?.activeIndex===e&&this.hover.setActiveIndex(null),this.hover?.registerItem(e,null))})}update(e,n,i){$(()=>{const d=a(m(this,R))[e];d&&(d.value=n,d.disabled=i)})}register(e,n){$(()=>{const i=a(m(this,R))[e];i&&(i.element=n,this.hover?.registerItem(e,n))})}connect(e){$(()=>{this.hover?.destroy(),this.hover=hr(e,{axis:m(this,Fe)});for(const[n,i]of a(m(this,R)).entries())i?.element&&this.hover.registerItem(n,i.element)})}disconnect(){$(()=>{this.hover?.destroy(),this.hover=null})}activate(e){this.keyboardIndex=e,this.hover?.setActiveIndex(e)}focusAdjacent(e,n){const i=a(m(this,R)).map((f,y)=>({entry:f,entryIndex:y})).filter(({entry:f})=>f?.element&&!f.disabled),d=i.findIndex(({entryIndex:f})=>f===e);if(d<0||i.length===0)return;const g=i[(d+n+i.length)%i.length];this.activate(g.entryIndex),g.entry?.element?.focus()}}R=new WeakMap,ke=new WeakMap,Fe=new WeakMap,Le=new WeakMap,ze=new WeakMap;const Et=Symbol("toggle-group");var Lr=new Set(["$$slots","$$events","$$legacy","value","onValueChange","type","disabled","axis","variant","size","class","children"]),vt=Be("<!> <!>",1);function zr(c,e){if(new.target)return te({component:zr,...c});ne(e,!0);const n=Ct({base:"relative isolate inline-flex shrink-0 items-center justify-center gap-0.5 rounded-(--radius-medium) border-0 bg-card",variants:{variant:{default:"shadow-(--elevation-raised)",outline:"border border-border shadow-none",flat:"bg-muted/40 shadow-none"},size:{default:"",xs:"",sm:"",lg:""}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",15),d=r(e,"onValueChange",7),g=r(e,"type",7,"single"),f=r(e,"disabled",7,!1),y=r(e,"axis",7,"x"),C=r(e,"variant",7,"default"),h=r(e,"size",7,"default"),w=r(e,"class",7,""),_=r(e,"children",7),P=Ee(e,Lr),v=N(null);const x=new Fr(()=>Array.isArray(i())?i():typeof i()=="string"&&i()?[i()]:[],$(()=>y()));Qt(Et,{state:x,get size(){return h()},get variant(){return C()}}),ye(()=>{if(a(v))return x.connect(a(v)),()=>x.disconnect()});function S(t){i(t),d()?.(t)}function z(t){i(t),d()?.(t)}var b={get value(){return i()},set value(t){i(t),s()},get onValueChange(){return d()},set onValueChange(t){d(t),s()},get type(){return g()},set type(t="single"){g(t),s()},get disabled(){return f()},set disabled(t=!1){f(t),s()},get axis(){return y()},set axis(t="x"){y(t),s()},get variant(){return C()},set variant(t="default"){C(t),s()},get size(){return h()},set size(t="default"){h(t),s()},get class(){return w()},set class(t=""){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},o=V(),p=A(o);{var L=t=>{var l=V(),E=A(l);{let B=I(()=>Array.isArray(i())?i():[]),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"multiple",get value(){return a(B)},onValueChange:z,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)},K=t=>{var l=V(),E=A(l);{let B=I(()=>typeof i()=="string"?i():""),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"single",get value(){return a(B)},onValueChange:S,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)};Y(p,t=>{g()==="multiple"?t(L):t(K,-1)})}return F(c,o),ae(b)}var Er=new Set(["$$slots","$$events","$$legacy","value","disabled","variant","size","tooltip","class","onclick","onfocus","children"]);function Br(c,e){if(new.target)return te({component:Br,...c});ne(e,!0);const n=Ct({base:"type-caption relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--radius-medium) border-0 bg-transparent font-normal text-muted-foreground transition-[color,font-weight] duration-spring-fast ease-spring-fast hover:text-foreground active:bg-active disabled:pointer-events-none disabled:opacity-50 data-[state=on]:[--text-caption-weight:500] data-[state=on]:text-foreground motion-reduce:transition-none",variants:{variant:{default:"",outline:"bg-transparent",flat:""},size:{default:"h-(--control-height-medium) min-w-8 px-2",xs:"h-(--control-height-small) min-w-7 px-1.5",sm:"h-(--control-height-small) min-w-7 px-1.5",lg:"h-(--control-height-large) min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",7),d=r(e,"disabled",7,!1),g=r(e,"variant",7,void 0),f=r(e,"size",7,void 0),y=r(e,"tooltip",7,void 0),C=r(e,"class",7,""),h=r(e,"onclick",7),w=r(e,"onfocus",7),_=r(e,"children",7),P=Ee(e,Er);const v=Xt(Et),x=v.state.allocate($(()=>i()));let S=N(null);const z=I(()=>f()??v?.size??"default"),b=I(()=>g()??v?.variant??"default");ye(()=>v.state.update(x,i(),d())),ye(()=>(v.state.register(x,a(S)),()=>v.state.register(x,null)));function o(t){v.state.activate(x),w()?.(t)}var p={get value(){return i()},set value(t){i(t),s()},get disabled(){return d()},set disabled(t=!1){d(t),s()},get variant(){return g()},set variant(t=void 0){g(t),s()},get size(){return f()},set size(t=void 0){f(t),s()},get tooltip(){return y()},set tooltip(t=void 0){y(t),s()},get class(){return C()},set class(t=""){C(t),s()},get onclick(){return h()},set onclick(t){h(t),s()},get onfocus(){return w()},set onfocus(t){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},L=V(),K=A(L);{let t=I(()=>be(n({variant:a(b),size:a(z)}),C()));pe(K,()=>kt,(l,E)=>{E(l,Ze({get value(){return i()},get title(){return y()},get disabled(){return d()},get onclick(){return h()},onfocus:o,get class(){return a(t)}},()=>P,{get ref(){return a(S)},set ref(B){k(S,B,!0)},children:(B,W)=>{var D=V(),G=A(D);H(G,()=>_()??fe),F(B,D)},$$slots:{default:!0}}))})}return F(c,L),ae(p)}export{Fr as C,kr as D,Ft as F,zr as T,Lt as a,zt as b,Br as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as zt,bq as ee,_ as Jr,by as Lt,bu as ce,bs as ir,b as At,bo as c}from"./DGQ1ECsI.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as F,aB as P,bj as Xr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./DYhIMPy1.js";import{i as Q}from"./B-DRVFcy.js";import{k as Pr}from"./B99vgEcA.js";import{g as Ct}from"./D3HUOTfX.js";import{c as Rt}from"./CJeZnjZ2.js";import{b as $r}from"./BaIAhI85.js";import{Iv as j,nx as kr,vy as Ir,vx as Cr,KJ as Qr,KK as ea,ev as ta,ew as ra,K9 as fr,lJ as Gt,BE as vr,s1 as pr,nV as aa,zg as oa,a7 as gr,I$ as ia,Jg as na,n8 as sa,iF as la,nz as da,u$ as ca,zD as ua,K8 as fa}from"./BSSsvY4I.js";import{g as va}from"./DfN8_dcw.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./cHlEaLvO.js";import{bA as ya,bN as Pa,dr as $a}from"./CbVK4mzc.js";import{w as _r,d as ka}from"./AkTa_qqm.js";import{f as Ia}from"./2yJgo8xz.js";import{k as Qt}from"./CK2a86W3.js";import{f as Ce}from"./CxF8YFum.js";import{h as Ca}from"./DZ-cwX5R.js";import"./ChmnWquS.js";import{s as at,g as It,f as hr}from"./Bp_k45o-.js";import{F as et,a8 as Fa,aq as Sa,aV as Da,a$ as jt,co as Ta,cp as Ea,bi as Ra,cN as Ma,c4 as Ua}from"./Cjw1QvKa.js";import{d as ja,f as Va,t as wr}from"./Cw94LfJC.js";import{c as za}from"./ChTqQfQN.js";import"./B_7vJcZK.js";import{$ as La}from"./D8acXZuO.js";import{i as er,b as Aa,a as Wa}from"./H2jLkRRS.js";import{C as ar,p as Na}from"./2rtvtln4.js";import{M as Ba}from"./DiRf9bEu.js";import{t as tr,u as Fr}from"./DNZhZg57.js";import"./d34yYkdR.js";import"./286xXFLf.js";import{M as Mt}from"./CPFtOnI7.js";import{V as Oa}from"./C9CjIm-I.js";import{bR as Ha,b5 as qa}from"./Dqx3L5zl.js";import{ap as Ka}from"./DTowKbOf.js";import{G as Ja}from"./ggQuSgBM.js";import{g as Xa,W as Ya}from"./BocgQf5E.js";import{r as Ga,p as Za}from"./CVNsMUrN.js";import{l as Qa}from"./C7_ws2_m.js";const Sr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<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),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return zt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Fe=crypto.randomUUID(),we=Sr(Fe),ge=new WeakMap;let G=N(null),Je=N(void 0),z=N(1),B=N(1),se=N(!0),me=N(!1),Se=N(null),A=N(0);const be=n(()=>ye()?.error??e(Se)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Fe,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Fe,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Se,null),f(se,!0),f(z,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Jr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(G,M)}catch(W){if(I)return;f(Se,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Je),b=e(z),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const J=(ge.get(E)??1)-1;J?ge.set(E,J):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const J=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));I.width=Math.ceil(J.width*Z),I.height=Math.ceil(J.height*Z),I.style.width=`${J.width}px`,I.style.height=`${J.height}px`,_e=E.render({canvas:I,viewport:J,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Se,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:Lt,$on:(d,I)=>At(w,d,I)},Ve=to(),Be=T(Ve);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());ja(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Va(d,{get label(){return e(I)},count:1,class:"p-4"})}},S=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(z)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(z,-1),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=F(M,!0),E=p(M,2);{let ue=n(()=>e(z)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(z),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var J=p(oe,2),Z=F(J,!0),it=p(J,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Je,ue),()=>e(Je)),x(nt),k((ue,Ee,ze)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",ze),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(z)),total:tr(e(G).numPages)}),()=>Fr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(z))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(S,2)})}x(Ve),l(X,Ve);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return zt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Je,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Fe=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Je=ro(G),z=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(Qr(G))});function Se(){if(me||e(z))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(G,i.hostname,i.toString()))}function A(i){if(me)return;const S=i.currentTarget.error?.code;S===2?f(ge,"network"):S!==1&&Se()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Fe()},set downloading(i){Fe(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:Lt,$on:(i,S)=>At(w,i,S)},De=so(),Ne=T(De);{var Ve=i=>{var S=io(),Te=T(S),d=F(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),J=F(oe,!0);k(Z=>g(J,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),J=F(oe,!0);k(Z=>g(J,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(z)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Fe()},children:(oe,J)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(S),k(()=>g(d,ae())),l(i,S)},Be=i=>{var S=no(),Te=F(S,!0);k(d=>{at(S,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",S,A),rt("loadedmetadata",S,d=>{d.currentTarget.videoWidth===0&&Se()}),l(i,S)};Q(Ne,i=>{e(B)||e(z)?i(Ve):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<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>'),uo=P('<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>'),fo=P('<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>'),vo=P("<!> ",1),po=P('<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>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<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>'),bo=P('<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>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Vt(X,w){if(new.target)return zt({component:Vt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=F(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Se))),l(t,a)},ot=za("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Fe=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Je=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"},z=n(()=>Je(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Se=n(()=>Fr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Ve=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function S(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Ve,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Ve,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=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"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Fe()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},J=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(z)==="video"?M():e(z)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):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":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
|
|
1
|
+
import{t as zt,bq as ee,_ as Jr,by as Lt,bu as ce,bs as ir,b as At,bo as c}from"./41c-5lbJ.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as F,aB as P,bj as Xr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./DYhIMPy1.js";import{i as Q}from"./ClgmQqA9.js";import{k as Pr}from"./D9WrXbf9.js";import{g as Ct}from"./CEufllny.js";import{c as Rt}from"./Dv-TQImR.js";import{b as $r}from"./BaIAhI85.js";import{Iv as j,nx as kr,vy as Ir,vx as Cr,KJ as Qr,KK as ea,ev as ta,ew as ra,K9 as fr,lJ as Gt,BE as vr,s1 as pr,nV as aa,zg as oa,a7 as gr,I$ as ia,Jg as na,n8 as sa,iF as la,nz as da,u$ as ca,zD as ua,K8 as fa}from"./BuDJvkTk.js";import{g as va}from"./DfN8_dcw.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./vSLEtuRc.js";import{bA as ya,bN as Pa,dr as $a}from"./DGb_dMRY.js";import{w as _r,d as ka}from"./AkTa_qqm.js";import{f as Ia}from"./CYyISHjN.js";import{k as Qt}from"./ClkbPGx9.js";import{f as Ce}from"./nLyQInj7.js";import{h as Ca}from"./De70D2Lx.js";import"./BhX-5zd9.js";import{s as at,g as It,f as hr}from"./BBCbq-hE.js";import{F as et,a8 as Fa,aq as Sa,aV as Da,a$ as jt,co as Ta,cp as Ea,bi as Ra,cN as Ma,c4 as Ua}from"./AOUBMpYk.js";import{d as ja,f as Va,t as wr}from"./BuupGai6.js";import{c as za}from"./ChTqQfQN.js";import"./CdXmpyDy.js";import{$ as La}from"./af7yduyJ.js";import{i as er,b as Aa,a as Wa}from"./H2jLkRRS.js";import{C as ar,p as Na}from"./DQjekoSU.js";import{M as Ba}from"./DzqZnAgo.js";import{t as tr,u as Fr}from"./-o555Jq8.js";import"./BzXCk-eX.js";import"./CCw4KHZp.js";import{M as Mt}from"./BYjUWrg8.js";import{V as Oa}from"./D6ncbN-K.js";import{bR as Ha,b5 as qa}from"./DUor0DI_.js";import{ap as Ka}from"./Dq9dLpt4.js";import{G as Ja}from"./ggQuSgBM.js";import{g as Xa,W as Ya}from"./zB3SalmM.js";import{r as Ga,p as Za}from"./DGRqvVY1.js";import{l as Qa}from"./sxpeFI4o.js";const Sr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<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),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return zt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Fe=crypto.randomUUID(),we=Sr(Fe),ge=new WeakMap;let G=N(null),Je=N(void 0),z=N(1),B=N(1),se=N(!0),me=N(!1),Se=N(null),A=N(0);const be=n(()=>ye()?.error??e(Se)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Fe,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Fe,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Se,null),f(se,!0),f(z,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Jr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(G,M)}catch(W){if(I)return;f(Se,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Je),b=e(z),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const J=(ge.get(E)??1)-1;J?ge.set(E,J):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const J=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));I.width=Math.ceil(J.width*Z),I.height=Math.ceil(J.height*Z),I.style.width=`${J.width}px`,I.style.height=`${J.height}px`,_e=E.render({canvas:I,viewport:J,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Se,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:Lt,$on:(d,I)=>At(w,d,I)},Ve=to(),Be=T(Ve);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());ja(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Va(d,{get label(){return e(I)},count:1,class:"p-4"})}},S=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(z)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(z,-1),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=F(M,!0),E=p(M,2);{let ue=n(()=>e(z)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(z),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var J=p(oe,2),Z=F(J,!0),it=p(J,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Je,ue),()=>e(Je)),x(nt),k((ue,Ee,ze)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",ze),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(z)),total:tr(e(G).numPages)}),()=>Fr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(z))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(S,2)})}x(Ve),l(X,Ve);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return zt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Je,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Fe=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Je=ro(G),z=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(Qr(G))});function Se(){if(me||e(z))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(G,i.hostname,i.toString()))}function A(i){if(me)return;const S=i.currentTarget.error?.code;S===2?f(ge,"network"):S!==1&&Se()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Fe()},set downloading(i){Fe(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:Lt,$on:(i,S)=>At(w,i,S)},De=so(),Ne=T(De);{var Ve=i=>{var S=io(),Te=T(S),d=F(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),J=F(oe,!0);k(Z=>g(J,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),J=F(oe,!0);k(Z=>g(J,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(z)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Fe()},children:(oe,J)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(S),k(()=>g(d,ae())),l(i,S)},Be=i=>{var S=no(),Te=F(S,!0);k(d=>{at(S,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",S,A),rt("loadedmetadata",S,d=>{d.currentTarget.videoWidth===0&&Se()}),l(i,S)};Q(Ne,i=>{e(B)||e(z)?i(Ve):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<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>'),uo=P('<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>'),fo=P('<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>'),vo=P("<!> ",1),po=P('<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>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<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>'),bo=P('<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>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Vt(X,w){if(new.target)return zt({component:Vt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=F(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Se))),l(t,a)},ot=za("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Fe=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Je=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"},z=n(()=>Je(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Se=n(()=>Fr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Ve=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function S(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Ve,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Ve,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=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"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Fe()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},J=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(z)==="video"?M():e(z)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):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":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
|
|
2
2
|
`).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Fe()},set isBinary(t){Fe(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return G()},set downloading(t=!1){G(t),te()},$set:Lt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var ze=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Fa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),St=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Sa},size:"sm",class:"text-green-500"})},Ye=Ie=>{et(Ie,{get icon(){return Da},size:"sm"})};Q(St,Ie=>{e(A)?Ie(Dt):Ie(Ye,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||G()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),V=F(D,!0);x(u);var H=p(u,2),xe=F(H);x(a),k(he=>{g(V,e(B)),hr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,S),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||G()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=F(R,!0);x(u);var D=p(u,2),V=F(D);x(a),k(H=>{g(O,e(B)),hr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(V,"src",H),at(V,"alt",e(B)),It(V,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,S),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},Le=t=>{const a=n(M);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return G()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,V)=>{g(m,e(B)),at(R,"src",D),g(O,` ${V??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=F(u,!0),h=p(u,2);{let R=n(()=>!we()||G());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var V=vo(),H=ne(V);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,V)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,V)=>`header-${V}-${D}`,(D,V)=>{var H=go(),xe=F(H,!0);k(()=>g(xe,e(V))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,V)=>`row-${V}`,(D,V,H)=>{var xe=_o();Ct(xe,23,()=>e(V),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=F(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Xe=t=>{var a=wo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},Ft=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(z)==="image"?t(ze):e(z)==="svg"?t(fe,1):e(z)==="video"?t(Le,2):e(z)==="audio"?t(mt,3):e(z)==="pdf"?t(Bt,4):e(z)==="json"?t(Ot,5):e(z)==="csv"?t(Oe,6):e(z)==="archive"?t(Xe,7):e(z)==="binary"?t(Ht,8):t(Ft,-1)})}return x(ue),l(X,ue),Nt(ut)}Yr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(X){return yo.test(X)?"access-denied":X===c.files_read_notFound_error()||Po.test(X)?"not-found":"generic"}function ko(X){switch(X){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),Fo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),So=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Mo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Uo=P('<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>'),jo=P('<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>'),Vo=P('<div class="h-full overflow-auto p-4"><!></div>');function zo(X,w){if(new.target)return zt({component:zo,...X});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(J,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Fe=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),G=()=>ce(ut,"$isFileDirtyStore",A),Je=()=>ce(ue,"$fileLastUpdatedStore",A),z=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(Ve,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Se=()=>ce(Le,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Mt,(pt,xt)=>{xt(pt,{get icon(){return Ra},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(V)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ye)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ye)));Oa(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ye)},onTogglePreview:()=>f(Ye,!e(Ye)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(na()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(ia())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(V)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Mt,(Pt,$t)=>{$t(Pt,{get icon(){return Ua},get label(){return e(yt)},onclick:Lr})})}l(We,Ge)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Mt,($t,Jt)=>{Jt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Ge)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Mt,(Ge,dt)=>{dt(Ge,{get icon(){return Ma},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},Ve=Ha(),Be=qa();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),S=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!S()||!r||e(d)))return j.dispatch(ta(r,"files")),()=>j.dispatch(ra(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ia(o().filePath,e(d)):o().filePath),M=Gr(e(W));pe(()=>{M.set(e(W))});const _e=pa(i(),M),E=ga(i(),M),oe=ma(i(),M),J=_a(i(),M),Z=ha(i(),M),it=Qa(i()),nt=wa(i(),M),st=ba(i(),M),ut=mr(i(),M),ue=xa(i(),M),Ee=ya(i()),ze=va(),fe=crypto.randomUUID(),Le=Sr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=Pa(i(),mt),Ot=$a(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Xe=n(ot),Ht=Xa();pe(()=>{e(Xe)!==null&&e(Xe)!==void 0&&Ht?.markContentLoaded()});const Ft=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ga(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Fe();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Ut(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),V=n(ge),H=n(G),xe=n(Je),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),St=N(void 0),Dt=N(void 0),Ye=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(St,{line:r},!0),f(Ye,!1))});const Ie=n(()=>e(d)?_r(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(Aa(o().filePath)||e(Oe)&&Wa(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?_r(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{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);pe(()=>{if(!S()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(Ft)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?da(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!S()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Ca("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await La($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(fr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:z().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Gt(C.localContent),Re=mr.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(vr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!S())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(pr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(pr($,r,s??r)))});function Mr(){return e(Xe)??""}function Ur(r){e(b)||e(V)||!o().filePath||!i()||!e(ht)||j.dispatch(fa(i(),o().filePath,Gt(r)))}function jr(){if(e(b)||e(V)||!o().filePath||!e(ht)||e(Xe)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(vr(i(),o().filePath,e(ht),Gt(r.localContent)))}function Vr(r){const s=o().filePath;!s||!i()||(j.dispatch(ua(i(),s)),j.dispatch(fr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!S())return;const $=i(),C=crypto.randomUUID();return j.dispatch(aa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(oa($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Na($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===gr.Addition?"+":le.type===gr.Deletion?"-":" ")+le.content)}))):[],!0)});function zr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Ja(r,Ka(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function Lr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ca(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await ka(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=sa(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(la(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!ze||!S())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{ze.registerActions({display:De,actions:Ne}),ze.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return S()},set isActive(r){S(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:Lt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>S()&&zr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=Fo(),U=T(v),q=F(U,!0),L=p(U,2),Me=F(L,!0);x(v),k(Y=>{g(q,Y),g(Me,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),U=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(U,L=>{S()&&L(q)})}l(_,v)},qe=_=>{var v=je(),U=ne(v);{var q=Y=>{var K=br(),ie=T(K),Ue=F(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(Y,K)},L=Y=>{Vt(Y,{get filePath(){return o().filePath},get sourceUrl(){return Se().url},allowDownload:!1})},Me=Y=>{var K=So(),ie=T(K),Ue=F(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_preparing_label()]),l(Y,K)};Q(U,Y=>{Se()?.error?Y(q):Se()?.url?Y(L,1):Y(Me,-1)})}l(_,v)},pt=_=>{var v=je(),U=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(U,L=>{S()&&L(q)})}l(_,v)},xt=_=>{var v=br(),U=T(v),q=F(U,!0);x(v),k(L=>g(q,L),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),U=n(()=>!e(b)&&e(wt));Vt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(U)},get downloading(){return e(lt)}})}},Ge=_=>{var v=xr(),U=T(v),q=F(U,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),U=T(v);Ct(U,20,()=>[...Array(20).keys()],q=>q,(q,L)=>{var Me=Do(),Y=T(Me);wr(Y,{class:"h-3 w-8 shrink-0"});var K=p(Y,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Me),l(q,Me)}),x(U),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ya(_,{get view(){return e(v)}})}},Pt=_=>{var v=Uo(),U=T(v),q=F(U,!0),L=p(U,2),Me=F(L,!0),Y=p(L,2);{var K=ve=>{var Ke=Eo(),ct=F(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(Y,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(Y,2);{var Ue=ve=>{var Ke=Mo(),ct=ne(Ke),Xt=F(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Yt=Ro(),qr=T(Yt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Vr(cr),children:(Kr,Lo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Yt),l(kt,Yt)}),x(dr),k(kt=>g(Xt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Ue)})}x(v),k(ve=>{g(q,ve),g(Me,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),U=T(v),q=F(U,!0),L=p(U,2),Me=F(L,!0),Y=p(L,2);{var K=ie=>{{let Ue=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Ue)},children:(ve,Ke)=>{Ze();var ct=tt();k(Xt=>g(ct,Xt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(Y,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Me,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Jt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var U=je(),q=ne(U);{var L=K=>{{let ie=n(()=>o().filePath||""),Ue=n(()=>!e(b)&&e(wt));Vt(K,{get filePath(){return e(ie)},get fileContent(){return e(Xe)},get language(){return e(Kt)},get isBinary(){return e(V)},onDownload:Et,get allowDownload(){return e(Ue)},get downloading(){return e(lt)}})}},Me=K=>{var ie=Vo(),Ue=T(ie);Ba(Ue,{get content(){return e(Xe)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},Y=K=>{var ie=Mr,Ue=Ur;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Ue(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(St)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(L):e(Tt)&&e(Ye)?K(Me,1):K(Y,-1)})}l(_,U)},Hr=_=>{var v=xr(),U=T(v),q=F(U,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Ge,6):e(Ft)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(V)?_($t,10):e(Xe)!==null?_(Jt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(X,lr);var Or=Nt(Wr);return be(),Or}export{zo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./BH-zWM3a.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{a as conf,m as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e}from"./
|
|
1
|
+
import{p as e}from"./BBCbq-hE.js";const t=[{id:"editorial-card",title:"Editorial card states",states:["default","group","inline","outlined","separated","selected","fluid-hover","header","flush-content","interactive","pressed","empty","long-content","compact","zoom-200","inert","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"card",source:"src/lib/components/ui/card/card.svelte",publicImport:"$lib/components/ui/card",legacyImports:[],exports:["Action","CARD_CONTENT_INSET_CLASS","CARD_ROW_GUTTER_CLASS","Card","CardAction","CardContent","CardDescription","CardFooter","CardGroup","CardHeader","CardTitle","Content","Description","Footer","Group","Header","Root","Title","cardMetadata"],usage:`<script lang="ts">
|
|
2
2
|
import * as Card from '$lib/components/ui/card';
|
|
3
3
|
<\/script>
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Iv as N}from"./
|
|
1
|
+
import{Iv as N}from"./BuDJvkTk.js";const z=N.createSelector((t,e,o)=>Object.values(t.taskAgentAssociations?.byWorkspaceId[e]?.byNoteId[o]??{})),D=N.createSelector((t,e,o)=>{const n=t.taskAgentAssociations?.byWorkspaceId[e]?.byNoteId??{};return Object.values(n).flatMap(s=>Object.values(s)).filter(s=>s.agentId===o)});let b=1;const I=new WeakMap;function $(t){let e=I.get(t);return e||(e=b++,I.set(t,e)),e}function m(t){if(t==null)return"";if(typeof t=="string")return`s:${t.length}:${t.slice(0,16)}:${t.slice(-16)}`;if(typeof t!="object")return`${typeof t}:${String(t)}`;if(Array.isArray(t))return`a:${$(t)}:${t.length}`;const e=Object.keys(t).sort();return`o:${$(t)}:${e.map(o=>`${o}=${m(t[o])}`).join(",")}`}function K(t){const e=[`message:${t.id||""}:${t.appMessageId||""}:${t.role}`];for(const o of t.toolCalls||[])e.push(`call:${o.id}:${o.status||""}:${o.error||""}`);for(const o of t.toolResults||[])e.push(`result:${o.toolCallId}:${o.isError?"1":"0"}:${m(o.content)}`);for(const[o,n]of(t.contentBlocks||[]).entries())if(n.type==="tool_use"){const s=n.metadata;e.push(`use:${o}:${n.id||""}:${n.tool_use_id||""}:${n.toolCallId||""}:${s?.toolId||""}:${n.name||""}:${n.toolName||""}:${m(n.input)}:${m(s?.toolInput)}`)}else n.type==="tool_result"&&e.push(`result-block:${o}:${n.id||""}:${n.tool_use_id||""}:${n.toolCallId||""}:${n.is_error?"1":"0"}:${n.isError?"1":"0"}:${m(n.content||n.text)}`);return e.join("|")}function y(t){if(!t)return!1;const e=typeof t=="string"?t:JSON.stringify(t);return[/tool .* not found/i,/tool .* not available/i,/unknown tool/i,/invalid tool/i,/tool execution failed/i,/failed to execute tool/i,/tool error:/i].some(n=>n.test(e))}const S=new WeakMap;function k(t){const e=S.get(t);if(e)return e;const o=new Set;if(t.toolResults)for(const n of t.toolResults)(n.isError||y(n.content))&&n.toolCallId&&o.add(n.toolCallId);if(t.toolCalls)for(const n of t.toolCalls)(n.status==="failed"||n.error)&&n.id&&o.add(n.id);if(t.contentBlocks){const n=t.contentBlocks;for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="tool_result"){const r=i.is_error||i.isError,l=y(i.content||i.text);if(r||l){let a=i.tool_use_id||i.toolCallId||i.id;if(!a&&s>0){const f=n[s-1];f.type==="tool_use"&&(a=f.id||f.tool_use_id||f.toolCallId)}a&&o.add(a)}}}}return S.set(t,o),o}function U(t){const e=new Map;if(t.role!=="assistant"||!t.contentBlocks)return{changes:[],totalFiles:0,totalAdditions:0,totalDeletions:0};const o=k(t);for(const s of t.contentBlocks){if(s.type!=="tool_use")continue;const i=s.id||s.tool_use_id||s.toolCallId;if(i&&o.has(i))continue;const r=A(s);if(r){const l=e.get(r.filePath);l?(l.additions+=r.additions,l.deletions+=r.deletions,l.action=r.action,l.newContent=r.newContent,l.toolCallId=r.toolCallId,l.toolName=r.toolName):e.set(r.filePath,{...r})}}const n=Array.from(e.values()).filter(s=>!(s.oldContent!==void 0&&s.newContent!==void 0&&s.oldContent===s.newContent));return{changes:n,totalFiles:n.length,totalAdditions:n.reduce((s,i)=>s+i.additions,0),totalDeletions:n.reduce((s,i)=>s+i.deletions,0)}}function v(t){const e=new Map,o=new Set;for(const s of t){const i=k(s);for(const r of i)o.add(r)}for(const s of t)if(!(s.role!=="assistant"||!s.contentBlocks))for(const i of s.contentBlocks){if(i.type!=="tool_use")continue;const r=i.id||i.tool_use_id||i.toolCallId;if(r&&o.has(r))continue;const l=A(i);if(l){const a=e.get(l.filePath);a?(a.additions+=l.additions,a.deletions+=l.deletions,a.action=l.action,a.newContent=l.newContent,a.toolCallId=l.toolCallId,a.toolName=l.toolName):e.set(l.filePath,{...l})}}const n=Array.from(e.values()).filter(s=>!(s.oldContent!==void 0&&s.newContent!==void 0&&s.oldContent===s.newContent));return{changes:n,totalFiles:n.length,totalAdditions:n.reduce((s,i)=>s+i.additions,0),totalDeletions:n.reduce((s,i)=>s+i.deletions,0)}}function M(t){const e=[];for(let o=t.length-1;o>=0;o--){const n=t[o];if(n.role==="user")break;n.role==="assistant"&&e.unshift(n)}return e}function V(t){const e=v(t).changes.map(n=>n.filePath),o=new Set(v(M(t)).changes.map(n=>n.filePath));return e.length===o.size&&e.every(n=>o.has(n))}const T=new Set(["spec","notes","tasks","readme","todo","changelog"]),O=new Set(["workspace_api","get_note","create_note","update_note","add_to_note","edit_note","delegate_task","create_agent"]);function E(t){let e=t.toLowerCase();const o=e.match(/\/\/local\/mcp\/(.+)$/);for(o&&(e=o[1]),e=e.replace(/^mcp__[^_]+__/,""),e=e.replace(/^workspace[-_]mcp[-_]/,"");/[-_]workspace-mcp$/.test(e);)e=e.replace(/[-_]workspace-mcp$/,"");return e}function L(t){const e=t.metadata;return[t.name,t.toolName,e?.toolName].some(n=>typeof n=="string"&&O.has(E(n)))}function x(t){if(/\s/.test(t))return!1;const e=t.includes("."),o=t.includes("/")||t.includes("\\");return e||o}function C(t){if(!t)return!1;const e=t.toLowerCase().trim();if(T.has(e)||e.includes(".workspace/notes/"))return!0;const o=e.includes("."),n=e.includes("/")||e.includes("\\");return!!(!o&&!n&&/^[a-z][a-z0-9-_]*$/.test(e))}function A(t){if(L(t))return null;if(t.inputTruncated===!0){const e=F(t);return e?{...e,additions:0,deletions:0,oldContent:void 0,newContent:void 0,startLineNumber:void 0}:null}return F(t)}function F(t){const e=typeof t.name=="string"&&t.name?t.name:typeof t.toolName=="string"?t.toolName:"",o=t.input||t.metadata?.toolInput||{},n=t.id||t.tool_use_id||t.metadata?.toolId||"",s=e.toLowerCase();if(s==="str_replace_editor"||s==="str-replace-editor"||s.startsWith("edit ")){const r=j(n,e,o);return r&&C(r.filePath)?null:r}const i=s==="save_file"||s==="save-file"||s==="write_file"||s==="write-file"||s==="create_file"||s==="create-file";if(i||s.startsWith("save ")||s.startsWith("create ")){const r=W(n,e,o,i);return r&&C(r.filePath)?null:r}if(s==="remove_files"||s==="remove-files"){const r=B(n,e,o);return r&&C(r.filePath)?null:r}return null}function p(t){if(t==null||typeof t=="object")return"";const e=typeof t=="string"?t:String(t);return e&&e.replace(/\\n/g,`
|
|
2
2
|
`).replace(/\\t/g," ").replace(/\\r/g,"\r")}function _(t){return typeof t!="string"?null:t.trim()||null}function P(t){if(Array.isArray(t)){for(const e of t){const o=_(e);if(o)return o}return null}return _(t)}function j(t,e,o){let n=_(o.path);if(!n&&typeof e=="string"&&e.toLowerCase().startsWith("edit ")){const c=_(e.substring(5));n=c&&x(c)?c:null}if(!n)return null;if(o.command==="create"){const c=o.file_text??"",d=p(c),u=d?d.split(`
|
|
3
3
|
`):[];return{filePath:n,action:"create",additions:u.length,deletions:0,toolName:e,toolCallId:t,oldContent:"",newContent:d}}let s=0,i=0;const r=[],l=[];let a;if(Array.isArray(o.str_replace_entries))for(const c of o.str_replace_entries){const d=c.old_str,u=c.new_str,h=c.old_str_start_line_number;if(d!==void 0&&u!==void 0){const g=p(d),w=p(u);i+=g?g.split(`
|
|
4
4
|
`).length:0,s+=w?w.split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nv as P,nG as g,Iv as h,uM as d,uR as p,uO as y,gM as v,gn as f,gO as m,gN as A,A7 as u,A6 as L,CY as S,Cy as F,CB as C,Aa as O,tn as z,B8 as B,tg as M,to as x,tp as R,gE as _,gP as j,gq as D,gp as G,Ks as K,Kq as E,Kr as H,K9 as V,nf as q,I9 as U,gG as J,tl as N,Kn as W,Kp as Y,A_ as Q,J3 as X,AS as Z,d0 as $,oe as ss,og as es,of as ts,oh as as,DG as is,hT as os,yJ as rs,g0 as T,i6 as cs,i0 as hs,qy as ls}from"./
|
|
1
|
+
import{nv as P,nG as g,Iv as h,uM as d,uR as p,uO as y,gM as v,gn as f,gO as m,gN as A,A7 as u,A6 as L,CY as S,Cy as F,CB as C,Aa as O,tn as z,B8 as B,tg as M,to as x,tp as R,gE as _,gP as j,gq as D,gp as G,Ks as K,Kq as E,Kr as H,K9 as V,nf as q,I9 as U,gG as J,tl as N,Kn as W,Kp as Y,A_ as Q,J3 as X,AS as Z,d0 as $,oe as ss,og as es,of as ts,oh as as,DG as is,hT as os,yJ as rs,g0 as T,i6 as cs,i0 as hs,qy as ls}from"./BuDJvkTk.js";import{bo as ns}from"./41c-5lbJ.js";import{F as ds,e as ps,z as us,p as I,v as Is,G as b,J as bs}from"./CYyISHjN.js";function ws(i,s,e,t){const a=s?.activeTabId;if(!s||!a||!s.tabs.some(r=>r.id===a))return null;const o=t?P(t).map(g):i.map(r=>[r]),c=o.findIndex(r=>r.includes(s.id));if(c<0)return null;const n=o[c+(e==="next"?1:-1)]?.[0];return n?{kind:"neighbor",tabId:a,targetPanelId:n}:o.length>=4||s.tabs.length<2&&o[c].length<2?null:{kind:"edge",tabId:a,position:e==="next"?"after":"before"}}class k{constructor(s){this.workspaceId=s}get state(){return h.state}dispatch(s){h.dispatch(s)}getPanelIds(){return ds.select(this.state,this.workspaceId)}getAllTabs(){return ps.select(this.state,this.workspaceId)}getPanel(s){return us.select(this.state,this.workspaceId,s)??null}getOtherPanelId(){const s=this.getPanelIds();if(s.length<2)return null;const e=I.select(this.state,this.workspaceId);return s.find(t=>t!==e)??null}openTab(s,e){if(e){this.dispatch(d(this.workspaceId,s,e));return}this.dispatch(p(this.workspaceId,s))}openUserTab(s,e){const t=e??I.select(this.state,this.workspaceId)??void 0;if(t){this.dispatch(d(this.workspaceId,s,t,void 0,!0));return}this.dispatch(p(this.workspaceId,s,{force:!0}))}openTabInAdjacentOrSplit(s,e,t){this.dispatch(y(this.workspaceId,s,e,t))}openBrowserPanel(s,e,t,a){const o={type:"browser",title:ns.layout_tabTypes_browser_title(),browserUrl:s??"about:blank",...a===void 0?{}:{browserRequestedUrl:a},contextItemId:e,closable:!0};this.openTabInAdjacentOrSplit(o,t)}closeTab(s,e){this.dispatch(v(this.workspaceId,s,e))}closeActiveTab(s){this.dispatch(f(this.workspaceId,s))}closeTabsByType(s,e,t){this.dispatch(m(this.workspaceId,s,e,t))}closeTabsByAgentId(s){this.dispatch(A(this.workspaceId,s))}reopenClosedTab(s,e){this.dispatch(u(this.workspaceId,void 0,s,e))}reopenLastClosed(){const s=Is.select(this.state,this.workspaceId);s?.kind==="column"?this.dispatch(L(this.workspaceId)):s?.kind==="tab"&&this.dispatch(u(this.workspaceId))}setActiveTab(s,e){this.dispatch(S(this.workspaceId,s,e))}selectNextTab(s){this.dispatch(F(this.workspaceId,s))}selectPreviousTab(s){this.dispatch(C(this.workspaceId,s))}reorderTabs(s,e,t){this.dispatch(O(this.workspaceId,s,e,t))}moveTabToPanel(s,e,t,a){this.dispatch(z(this.workspaceId,s,e,t,a))}moveActivePaneToColumn(s,e){const t=ws(this.getPanelIds(),this.getPanel(s),e,b.select(this.state,this.workspaceId));return t?(t.kind==="neighbor"?this.moveTabToPanel(t.tabId,s,t.targetPanelId):this.moveTabToSplitLevel(t.tabId,s,[],t.position,"horizontal"),!0):!1}canMoveActivePaneVertically(s,e){return B(b.select(this.state,this.workspaceId),this.getPanel(s),e)!==null}moveActivePaneVertically(s,e){return this.canMoveActivePaneVertically(s,e)?(this.dispatch(M(this.workspaceId,s,e)),!0):!1}moveTabToSplit(s,e,t,a){this.dispatch(x(this.workspaceId,s,e,t,a))}moveTabToSplitLevel(s,e,t,a,o){this.dispatch(R(this.workspaceId,s,e,t,a,o))}closeOtherTabs(s,e){this.dispatch(_(this.workspaceId,s,e))}closeTabsToRight(s,e){this.dispatch(j(this.workspaceId,s,e))}closeAllTabs(s){this.dispatch(D(this.workspaceId,s))}closeAllOthersEverywhere(s,e){this.dispatch(G(this.workspaceId,s,e))}updateTabTitle(s,e){this.dispatch(K(this.workspaceId,s,e))}updateTabBrowserUrl(s,e){this.dispatch(E(this.workspaceId,s,e))}updateTabFavicon(s,e){this.dispatch(H(this.workspaceId,s,e))}updateFileTabPath(s,e){this.dispatch(V(this.workspaceId,s,e))}focusPanel(s){this.dispatch(q(this.workspaceId,s))}splitPanel(s,e,t){this.dispatch(U(this.workspaceId,s,e,t))}closePanel(s){this.dispatch(J(this.workspaceId,s))}movePanel(s,e,t){this.dispatch(N(this.workspaceId,s,e,t))}updateSizes(s,e){this.dispatch(W(this.workspaceId,s,e))}updateSplitSizes(s,e){this.dispatch(Y(this.workspaceId,s,e))}resizeRootDivider(s,e){this.dispatch(Q(this.workspaceId,s,e))}toggleExpandPanel(s){this.dispatch(X(this.workspaceId,s))}resetLayout(){this.dispatch(Z(this.workspaceId))}applyPreset(s){this.dispatch($(this.workspaceId,s))}goBack(){this.dispatch(ss(this.workspaceId))}goForward(){this.dispatch(es(this.workspaceId))}goBackInFocusHistory(){this.dispatch(ts(this.workspaceId))}goForwardInFocusHistory(){this.dispatch(as(this.workspaceId))}setDeferSpecTab(s){this.dispatch(is(this.workspaceId,s))}consumePendingFocus(s){this.dispatch(os(this.workspaceId,s))}reconcileStaleAgentTabs(s,e,t){const a=Array.isArray(s)?s:Array.from(s);this.dispatch(rs(this.workspaceId,a,e,t))}clearLayout(){this.dispatch(T(this.workspaceId))}createGridLayout(s){return this.dispatch(cs(this.workspaceId,s)),this.getPanelIds()}batchMutations(s){return s()}initializeLayout(s){const e=s??hs();this.dispatch(ls(this.workspaceId,e))}cyclePresets(){const s=bs.select(this.state,this.workspaceId),e=Object.keys(s).length;e<=1?this.applyPreset("split-horizontal"):e===2?this.applyPreset("three-column"):this.applyPreset("single")}}const l=new Map;function Ts(i){let s=l.get(i);return s||(s=new k(i),l.set(i,s)),s}function ks(i){return!0}function Ps(i){l.delete(i)}function w(i){h.dispatch(T(i))}const fs=Object.freeze(Object.defineProperty({__proto__:null,PanelLayoutAdapter:k,clearPanelLayoutAdapter:Ps,clearPanelLayoutFn:w,clearPanelLayoutForWorkspace:w,getPanelLayoutManager:Ts,hasPanelLayoutManager:ks},Symbol.toStringTag,{value:"Module"}));export{Ps as c,Ts as g,ks as h,fs as p,ws as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ye,bq as h,by as Ze,b as $e,bs as nt,bo as k,bu as Ve}from"./DGQ1ECsI.js";import{bo as st,bs as et,a7 as U,ay as y,aD as e,bS as X,W as c,a5 as Pe,bA as De,bH as V,bl as _e,b_ as oe,bO as de,bn as tt,bf as je,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Le,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./DJ8_lZZl.js";import{Iv as Ue,mT as pt,uA as ft}from"./BSSsvY4I.js";import{bb as ht}from"./DEoOAy1Z.js";import{cn as vt}from"./CbVK4mzc.js";import{c as gt}from"./ChTqQfQN.js";import{i as Xe,t as He}from"./H2jLkRRS.js";import{w as _t}from"./ggQuSgBM.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./Cjw1QvKa.js";import{k as K,w as Ft}from"./CK2a86W3.js";import{s as Ne,f as xe,c as Wt}from"./Bp_k45o-.js";import{s as Ct}from"./ChmnWquS.js";import{w as xt}from"./DZ-cwX5R.js";import"./B_7vJcZK.js";import{i as M}from"./B-DRVFcy.js";import{g as It,e as Te}from"./D3HUOTfX.js";import{c as Q}from"./CJeZnjZ2.js";import{a as Pt,r as Dt}from"./DP5_VjDz.js";import{f as Mt,aa as Et}from"./CxF8YFum.js";import{M as Ot,t as Be}from"./CKe6gKEB.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as Vt}from"./Cw94LfJC.js";import{m as ze}from"./286xXFLf.js";var jt=H('<img alt="" class="size-4"/>'),Lt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Ut=H("<span> </span>"),Xt=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=je)=>{var O=U(),S=y(O);{var j=W=>{const x=w(()=>Pt(r().editor));var L=U(),m=y(L);{var f=s=>{var i=jt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=U(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Dt(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,L)},R=W=>{var x=U(),L=y(x);Ct(L,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(j):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=je)=>{var O=Qe(),S=y(O);{var j=m=>{var f=Lt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=X(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(j):m(R,-1)})}var q=X(S,2);{var W=m=>{var f=Xt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=X(q,2);{var L=m=>{var f=Ht(),o=Pe(f);Et(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>xt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Wt(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(L)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=U(),ie=y(se);return It(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),j=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=U(),T=y(b);{var ae=a=>{var n=U(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var L=X(W,2);{var m=i=>{var b=U(),T=y(b);{var ae=g=>{var C=U(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=X(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=X(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=X(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=X(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=U(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=U(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=U(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>Vt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);Mt(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?V(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=X(I,2);ne(B,()=>e(r));var Z=X(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=U(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=X(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=X(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(L,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=X(L,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>Ve(T,"$installedEditors$",ne),Ie=()=>Ve(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),j=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),L=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Le(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Ue.dispatch(pt())}),Le(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?V(a,le,!0):Xe(u())?V(a,u().replace(/\\/g,"/"),!0):V(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),V(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else V(a,u()),V(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else V(a,u()),V(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{V(a,u()),V(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(V(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Ue.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Xe(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){V(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{V(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),j()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(L())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return j()},set showFileNameCopy(t=!1){j(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return L()},set additionalActions(t=[]){L(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
|
|
1
|
+
import{t as Ye,bq as h,by as Ze,b as $e,bs as nt,bo as k,bu as Ve}from"./41c-5lbJ.js";import{bo as st,bs as et,a7 as U,ay as y,aD as e,bS as X,W as c,a5 as Pe,bA as De,bH as V,bl as _e,b_ as oe,bO as de,bn as tt,bf as je,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Le,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./DJ8_lZZl.js";import{Iv as Ue,mT as pt,uA as ft}from"./BuDJvkTk.js";import{bb as ht}from"./CbX7A7fn.js";import{cn as vt}from"./DGb_dMRY.js";import{c as gt}from"./ChTqQfQN.js";import{i as Xe,t as He}from"./H2jLkRRS.js";import{w as _t}from"./ggQuSgBM.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./AOUBMpYk.js";import{k as K,w as Ft}from"./ClkbPGx9.js";import{s as Ne,f as xe,c as Wt}from"./BBCbq-hE.js";import{s as Ct}from"./BhX-5zd9.js";import{w as xt}from"./De70D2Lx.js";import"./CdXmpyDy.js";import{i as M}from"./ClgmQqA9.js";import{g as It,e as Te}from"./CEufllny.js";import{c as Q}from"./Dv-TQImR.js";import{a as Pt,r as Dt}from"./GfKb8O3O.js";import{f as Mt,aa as Et}from"./nLyQInj7.js";import{M as Ot,t as Be}from"./QLXfiC8k.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as Vt}from"./BuupGai6.js";import{m as ze}from"./CCw4KHZp.js";var jt=H('<img alt="" class="size-4"/>'),Lt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Ut=H("<span> </span>"),Xt=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=je)=>{var O=U(),S=y(O);{var j=W=>{const x=w(()=>Pt(r().editor));var L=U(),m=y(L);{var f=s=>{var i=jt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=U(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Dt(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,L)},R=W=>{var x=U(),L=y(x);Ct(L,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(j):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=je)=>{var O=Qe(),S=y(O);{var j=m=>{var f=Lt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=X(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(j):m(R,-1)})}var q=X(S,2);{var W=m=>{var f=Xt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=X(q,2);{var L=m=>{var f=Ht(),o=Pe(f);Et(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>xt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Wt(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(L)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=U(),ie=y(se);return It(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),j=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=U(),T=y(b);{var ae=a=>{var n=U(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var L=X(W,2);{var m=i=>{var b=U(),T=y(b);{var ae=g=>{var C=U(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=X(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=X(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=X(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=X(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=U(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=U(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=U(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>Vt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);Mt(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?V(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=X(I,2);ne(B,()=>e(r));var Z=X(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=U(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=X(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=X(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(L,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=X(L,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>Ve(T,"$installedEditors$",ne),Ie=()=>Ve(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),j=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),L=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Le(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Ue.dispatch(pt())}),Le(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?V(a,le,!0):Xe(u())?V(a,u().replace(/\\/g,"/"),!0):V(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),V(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else V(a,u()),V(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else V(a,u()),V(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{V(a,u()),V(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(V(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Ue.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Xe(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){V(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{V(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),j()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(L())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return j()},set showFileNameCopy(t=!1){j(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return L()},set additionalActions(t=[]){L(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
|