@intent-hq/web 2.303.1 → 2.303.2
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/{BeoKf2Nm.js → 00uxEElC.js} +1 -1
- package/web/app/immutable/chunks/{Brbvu9Bf.js → 0_F49j-u.js} +1 -1
- package/web/app/immutable/chunks/{CgoYLyrh.js → 16TQPnhH.js} +1 -1
- package/web/app/immutable/chunks/{CqIXbU6G.js → 1PMPyNG_.js} +1 -1
- package/web/app/immutable/chunks/{K-3wWXoG.js → 1mYCesh4.js} +1 -1
- package/web/app/immutable/chunks/{jfXvxS2S.js → 27ieI8Q7.js} +1 -1
- package/web/app/immutable/chunks/{8L6UQh4N.js → 4NAJ4wU0.js} +1 -1
- package/web/app/immutable/chunks/{EY1yX4lQ.js → 4SHq9vZB.js} +1 -1
- package/web/app/immutable/chunks/{DyzwKjcO.js → 80lJL4Bn.js} +1 -1
- package/web/app/immutable/chunks/{DDXSm5kb.js → 8SGgBOu4.js} +1 -1
- package/web/app/immutable/chunks/{BZlF9cZE.js → Af4e_CfR.js} +1 -1
- package/web/app/immutable/chunks/{Br_vwCYL.js → B0Ix4oHU.js} +3 -3
- package/web/app/immutable/chunks/{LYkiL1Z7.js → B0yoZLtl.js} +1 -1
- package/web/app/immutable/chunks/{YaNhYlLh.js → B43OyUe0.js} +1 -1
- package/web/app/immutable/chunks/{n309YBvY.js → B4W6-XXO.js} +1 -1
- package/web/app/immutable/chunks/{DXwWG0kg.js → B59NonPS.js} +1 -1
- package/web/app/immutable/chunks/{Dz0HBLX5.js → B8eTvp12.js} +1 -1
- package/web/app/immutable/chunks/{DE-ZJyo7.js → B8vlcOwv.js} +1 -1
- package/web/app/immutable/chunks/{DsuTjoON.js → BAY-mFnP.js} +1 -1
- package/web/app/immutable/chunks/{bFa0TDbD.js → BC_OV_w3.js} +6 -6
- package/web/app/immutable/chunks/{C6q6LFl7.js → BD0xH6ju.js} +6 -6
- package/web/app/immutable/chunks/{MPaSCQWF.js → BGn-A48v.js} +2 -2
- package/web/app/immutable/chunks/{Bp0o4QK_.js → BIGW16GS.js} +1 -1
- package/web/app/immutable/chunks/{DIPmbnAQ.js → BJuRmCrE.js} +1 -1
- package/web/app/immutable/chunks/{BOUU5n11.js → BKmyS2KM.js} +1 -1
- package/web/app/immutable/chunks/{Da8-5i7r.js → BNJMdNln.js} +1 -1
- package/web/app/immutable/chunks/{D1wQuS9X.js → BNf1F4jC.js} +1 -1
- package/web/app/immutable/chunks/{B5OCTRwy.js → BNqPvIBf.js} +1 -1
- package/web/app/immutable/chunks/{B6AD3L6o.js → BOYIvbV1.js} +1 -1
- package/web/app/immutable/chunks/{C2zQhN_1.js → BQV3Ny-c.js} +1 -1
- package/web/app/immutable/chunks/{B__rt0-I.js → BR34HSgY.js} +4 -4
- package/web/app/immutable/chunks/{CQp6uUPO.js → BTYvk2mh.js} +1 -1
- package/web/app/immutable/chunks/{CDjySRKh.js → BYUq5x3t.js} +1 -1
- package/web/app/immutable/chunks/{8ouV2ksN.js → BZltciVZ.js} +1 -1
- package/web/app/immutable/chunks/B_2S_hHs.js +1 -0
- package/web/app/immutable/chunks/{CCkicAWR.js → Bb19RpMB.js} +1 -1
- package/web/app/immutable/chunks/{PM-2gCwH.js → BdDWti3j.js} +2 -2
- package/web/app/immutable/chunks/{Bfve9onU.js → BdMGXlaL.js} +1 -1
- package/web/app/immutable/chunks/{D4uurSjm.js → BeH4qLDH.js} +2 -2
- package/web/app/immutable/chunks/{DLg1LKff.js → BehTaWRy.js} +1 -1
- package/web/app/immutable/chunks/{CbgVFYxx.js → Bf2SLLHW.js} +1 -1
- package/web/app/immutable/chunks/{BnaVNQ5C.js → BgAd01eY.js} +1 -1
- package/web/app/immutable/chunks/{C0AUyzcq.js → BjZIrkYy.js} +1 -1
- package/web/app/immutable/chunks/{DiIl-PCx.js → Bm6CXfx7.js} +1 -1
- package/web/app/immutable/chunks/{DYrmWLZS.js → BmQTD8A8.js} +1 -1
- package/web/app/immutable/chunks/{CyrC60Vp.js → BnwJCd5q.js} +1 -1
- package/web/app/immutable/chunks/{uaFePogj.js → Bny3Va3q.js} +1 -1
- package/web/app/immutable/chunks/{BFf5Uhiw.js → BpPaCMNY.js} +2 -2
- package/web/app/immutable/chunks/{CuxOQF3U.js → BpznL-Sx.js} +1 -1
- package/web/app/immutable/chunks/{YgJaoLfT.js → Bq0ctQK9.js} +1 -1
- package/web/app/immutable/chunks/{DDXJdNWs.js → BqNKVfCm.js} +1 -1
- package/web/app/immutable/chunks/{BIZa5Cf_.js → BqfQpM-F.js} +1 -1
- package/web/app/immutable/chunks/{CDIkpSZv.js → BrRwX7DO.js} +1 -1
- package/web/app/immutable/chunks/{D4t7Z7vv.js → BsYKjXz_.js} +1 -1
- package/web/app/immutable/chunks/{CflfeJIa.js → Bt6eGVSt.js} +1 -1
- package/web/app/immutable/chunks/{Bj8NtCfK.js → Bt9uePlA.js} +1 -1
- package/web/app/immutable/chunks/{DdAufyF9.js → Bu9lZqPK.js} +2 -2
- package/web/app/immutable/chunks/{CMdvdycX.js → BuvWIiNr.js} +1 -1
- package/web/app/immutable/chunks/{BEpG-KhT.js → Bv033Zz3.js} +1 -1
- package/web/app/immutable/chunks/{Bc8F17WQ.js → Bv7kzLZM.js} +1 -1
- package/web/app/immutable/chunks/{Dam5_Z8s.js → Bx6JcGvf.js} +3 -3
- package/web/app/immutable/chunks/{Mfxk6hrK.js → By4T0eds.js} +1 -1
- package/web/app/immutable/chunks/{CDHK1MhW.js → ByA1TTJR.js} +1 -1
- package/web/app/immutable/chunks/{VNIUMXZ1.js → BzpcSTCe.js} +1 -1
- package/web/app/immutable/chunks/{Ddsqeq3q.js → C-EKIkEj.js} +1 -1
- package/web/app/immutable/chunks/{D-M2DNIU.js → C0PJP29a.js} +1 -1
- package/web/app/immutable/chunks/{C5b0K3dK.js → C3cCqJG4.js} +1 -1
- package/web/app/immutable/chunks/{BvuwU8jV.js → C5VEh5uc.js} +7 -7
- package/web/app/immutable/chunks/{CMmFp0Pt.js → C8Y8MofM.js} +1 -1
- package/web/app/immutable/chunks/{CGTwtuZB.js → CB9_hf7T.js} +1 -1
- package/web/app/immutable/chunks/{DHaw_3Nr.js → CBdGUJdw.js} +1 -1
- package/web/app/immutable/chunks/{BE5Fv7qN.js → CBeI_yeK.js} +1 -1
- package/web/app/immutable/chunks/{BbwEzwME.js → CFXCYKJP.js} +1 -1
- package/web/app/immutable/chunks/{DTonRSsv.js → CHRWNuEU.js} +1 -1
- package/web/app/immutable/chunks/{Dm6zmEG5.js → CJ6fKCMV.js} +1 -1
- package/web/app/immutable/chunks/{CjPzTuqd.js → CMrQ4XgK.js} +1 -1
- package/web/app/immutable/chunks/{D8GJ611X.js → CN2zlwHC.js} +1 -1
- package/web/app/immutable/chunks/{JxxJ9mXU.js → CPCUj0SC.js} +1 -1
- package/web/app/immutable/chunks/{BK4u9wtb.js → CPo0z1NF.js} +1 -1
- package/web/app/immutable/chunks/{C6BkQqQb.js → CQAi9FSX.js} +1 -1
- package/web/app/immutable/chunks/{CcWcrRx2.js → CQmHuNgQ.js} +1 -1
- package/web/app/immutable/chunks/{Bosjw8O3.js → CQw7GTs6.js} +1 -1
- package/web/app/immutable/chunks/{i6zTaEpb.js → CWEt6bXk.js} +1 -1
- package/web/app/immutable/chunks/{BVN4ilux.js → CWFKACW0.js} +1 -1
- package/web/app/immutable/chunks/{CTFAhMsj.js → CXDa1oob.js} +1 -1
- package/web/app/immutable/chunks/{BJZA2e1k.js → C_8qE1Ea.js} +1 -1
- package/web/app/immutable/chunks/{DAL0Y3FS.js → C_PzkP6E.js} +1 -1
- package/web/app/immutable/chunks/{BhPgWKZZ.js → C_c9fmWH.js} +1 -1
- package/web/app/immutable/chunks/{DTbuwXvH.js → CaZjPP9e.js} +1 -1
- package/web/app/immutable/chunks/{B_RQpkN5.js → CbVMangE.js} +1 -1
- package/web/app/immutable/chunks/{DJGQatsU.js → ChsApY2J.js} +1 -1
- package/web/app/immutable/chunks/{DIKzzQEG.js → CjD72_YJ.js} +1 -1
- package/web/app/immutable/chunks/{aPknFgnB.js → CjyLrIKT.js} +1 -1
- package/web/app/immutable/chunks/{BRWGra38.js → Ckh5WWeA.js} +1 -1
- package/web/app/immutable/chunks/{Cbo9e-lk.js → CrPX2-Do.js} +1 -1
- package/web/app/immutable/chunks/{8wsU44-j.js → CsPa9HxL.js} +1 -1
- package/web/app/immutable/chunks/{DZVScUjw.js → CtJ4QAPx.js} +1 -1
- package/web/app/immutable/chunks/{Di_N5xxx.js → CtMKqOD8.js} +1 -1
- package/web/app/immutable/chunks/{A4Dmh4Er.js → CtR_aYLO.js} +1 -1
- package/web/app/immutable/chunks/{CpO5voiW.js → CtnKv097.js} +1 -1
- package/web/app/immutable/chunks/{C5PE5dRA.js → CwGSuPgH.js} +1 -1
- package/web/app/immutable/chunks/{IS2i-qON.js → Cx0BWf2W.js} +2 -2
- package/web/app/immutable/chunks/{CnXUfSkf.js → D-P-dlJm.js} +1 -1
- package/web/app/immutable/chunks/{CE9oTb_7.js → D0P3i4zR.js} +1 -1
- package/web/app/immutable/chunks/{BA0tWkIy.js → D1LK1GGR.js} +1 -1
- package/web/app/immutable/chunks/{CRf1KTYE.js → D2uYpDGE.js} +1 -1
- package/web/app/immutable/chunks/{D-D5GX62.js → D3_DSRwK.js} +1 -1
- package/web/app/immutable/chunks/{Du_FFECf.js → D4z6L4My.js} +4 -4
- package/web/app/immutable/chunks/{TO63wgKH.js → D6gIQvhr.js} +1 -1
- package/web/app/immutable/chunks/{CXYSZJwQ.js → D9WcidNh.js} +1 -1
- package/web/app/immutable/chunks/{DW0i1p3h.js → D9xXuqJT.js} +3 -3
- package/web/app/immutable/chunks/{DKXptzLp.js → DBy0KL7v.js} +1 -1
- package/web/app/immutable/chunks/{NBksFwgt.js → DBzoyXfv.js} +1 -1
- package/web/app/immutable/chunks/{DyUJKXsD.js → DGC8CG3j.js} +1 -1
- package/web/app/immutable/chunks/{DnZciTxO.js → DHHxqqbm.js} +1 -1
- package/web/app/immutable/chunks/{Bg-9J17z.js → DHpbS8ZT.js} +1 -1
- package/web/app/immutable/chunks/{6HM0WwrI.js → DIRIzGp9.js} +1 -1
- package/web/app/immutable/chunks/{CrHeSy6g.js → DJPjZO1e.js} +1 -1
- package/web/app/immutable/chunks/{Dcd7scoM.js → DKYgLLV7.js} +4 -4
- package/web/app/immutable/chunks/{hV-a3cEo.js → DLAMU8JP.js} +1 -1
- package/web/app/immutable/chunks/{CbfNaFu6.js → DMjEYXkO.js} +1 -1
- package/web/app/immutable/chunks/{CyntsY8m.js → DP49kiGN.js} +1 -1
- package/web/app/immutable/chunks/{zZLFVw4s.js → DQe9PqN1.js} +1 -1
- package/web/app/immutable/chunks/{CcwPQ9O4.js → DSXZRa59.js} +1 -1
- package/web/app/immutable/chunks/{CJ9pemY5.js → DUPA9j6z.js} +1 -1
- package/web/app/immutable/chunks/{BXoIE56p.js → DVElz61c.js} +1 -1
- package/web/app/immutable/chunks/{Bu7emN7b.js → DW7zmdfj.js} +1 -1
- package/web/app/immutable/chunks/{Ba6ldMEi.js → DXlS97NX.js} +1 -1
- package/web/app/immutable/chunks/{BD6dhUAy.js → DY2NSWQA.js} +1 -1
- package/web/app/immutable/chunks/{BP5uTKE_.js → DYUcU12p.js} +1 -1
- package/web/app/immutable/chunks/{D5ffGNx9.js → Dc-LMfqP.js} +1 -1
- package/web/app/immutable/chunks/{w3jeSEdx.js → Dcl9PBqG.js} +1 -1
- package/web/app/immutable/chunks/{Mw-Gpasz.js → Dh58itL6.js} +1 -1
- package/web/app/immutable/chunks/{B_USDn20.js → DjLmwxj2.js} +1 -1
- package/web/app/immutable/chunks/{DCtWL3QH.js → DkCy9df6.js} +1 -1
- package/web/app/immutable/chunks/{DHzasNfT.js → DksBb8YR.js} +1 -1
- package/web/app/immutable/chunks/{BVvgEXvX.js → Dm-ly3pD.js} +1 -1
- package/web/app/immutable/chunks/{CQ3a1EyG.js → Dnce1kL4.js} +1 -1
- package/web/app/immutable/chunks/{pbklRmq5.js → Doj9MsHo.js} +1 -1
- package/web/app/immutable/chunks/{8CC8TVgI.js → Dq9THA-s.js} +1 -1
- package/web/app/immutable/chunks/{bzm-2n30.js → Dss2LRs8.js} +1 -1
- package/web/app/immutable/chunks/{DjDCBOVS.js → Dt12oijM.js} +1 -1
- package/web/app/immutable/chunks/{C1SVvLkf.js → Dt_YHb8y.js} +1 -1
- package/web/app/immutable/chunks/{A5biXxJf.js → DvXLHS0T.js} +1 -1
- package/web/app/immutable/chunks/{CKMwvgmW.js → Dw0cAOdh.js} +1 -1
- package/web/app/immutable/chunks/{BKb1USDa.js → DzCBift4.js} +1 -1
- package/web/app/immutable/chunks/{CrqpGEjY.js → DzyWp8BX.js} +1 -1
- package/web/app/immutable/chunks/{CjHpP5RK.js → FVjdVgy8.js} +1 -1
- package/web/app/immutable/chunks/{qVeyMZUH.js → Ga0tOshJ.js} +1 -1
- package/web/app/immutable/chunks/{D6_E0s-v.js → GmnYJDe5.js} +1 -1
- package/web/app/immutable/chunks/{BFAvFQtn.js → HJsrETfU.js} +1 -1
- package/web/app/immutable/chunks/{CxXNCTXN.js → I2TUHdNR.js} +1 -1
- package/web/app/immutable/chunks/{DeIkS6Ir.js → IJrjG441.js} +1 -1
- package/web/app/immutable/chunks/{CSxiQIqf.js → J4NypHg6.js} +1 -1
- package/web/app/immutable/chunks/{3C0u635Z.js → JkPZevtU.js} +1 -1
- package/web/app/immutable/chunks/{os23peQy.js → KOu-Cq5S.js} +1 -1
- package/web/app/immutable/chunks/{BDnl1KXt.js → KgMNo-wX.js} +1 -1
- package/web/app/immutable/chunks/{DtVW9_m7.js → N40ygtio.js} +1 -1
- package/web/app/immutable/chunks/{DqZfiNRX.js → NcsNOGAa.js} +1 -1
- package/web/app/immutable/chunks/{Cqpkx5D-.js → PNb0FkcG.js} +1 -1
- package/web/app/immutable/chunks/{d5YX3jLF.js → Q3WVX75B.js} +1 -1
- package/web/app/immutable/chunks/{2nZ4DEDk.js → QpyyH1fV.js} +1 -1
- package/web/app/immutable/chunks/{bU-QghYU.js → RTUC_gqV.js} +1 -1
- package/web/app/immutable/chunks/{UNcL8nMD.js → RYOcIy3J.js} +1 -1
- package/web/app/immutable/chunks/{BbfCrwpS.js → SQR2mS9I.js} +1 -1
- package/web/app/immutable/chunks/{C_lHU_9L.js → T3bfkv-Z.js} +2 -2
- package/web/app/immutable/chunks/{CRASodpm.js → _bcJX7ZM.js} +1 -1
- package/web/app/immutable/chunks/{sPXVt7LC.js → ahHOUTHC.js} +1 -1
- package/web/app/immutable/chunks/{BEOehA7p.js → c7MI1Uwa.js} +1 -1
- package/web/app/immutable/chunks/{DtPH5jDv.js → cwEGs1kY.js} +1 -1
- package/web/app/immutable/chunks/{lM8ThUgn.js → gKuhYg6Y.js} +1 -1
- package/web/app/immutable/chunks/{k-g3rTlx.js → h37S7kk-.js} +1 -1
- package/web/app/immutable/chunks/{B7kIvU97.js → hRfGY9BA.js} +1 -1
- package/web/app/immutable/chunks/{kGwqxarX.js → i9Hk2neJ.js} +1 -1
- package/web/app/immutable/chunks/{CQchJimX.js → jkdGOTth.js} +1 -1
- package/web/app/immutable/chunks/{CPUt5W4G.js → n7x1c6w9.js} +1 -1
- package/web/app/immutable/chunks/{D0ftNzpH.js → rtWGCI8s.js} +1 -1
- package/web/app/immutable/chunks/{x7K3UR1M.js → sLctU0Rs.js} +1 -1
- package/web/app/immutable/chunks/{CU742qVA.js → xCF3kBw_.js} +1 -1
- package/web/app/immutable/chunks/{CluMc6c4.js → xZ9BClBk.js} +5 -5
- package/web/app/immutable/chunks/{DDevx-cQ.js → yQjZw-Rk.js} +1 -1
- package/web/app/immutable/chunks/{tjLyHM1H.js → zbpnNt59.js} +1 -1
- package/web/app/immutable/entry/{app.DE4M1e5K.js → app.DYPZuUAX.js} +2 -2
- package/web/app/immutable/entry/start.CkreMjRr.js +1 -0
- package/web/app/immutable/nodes/{0.DzKcGMpw.js → 0.DNhWEYGp.js} +1 -1
- package/web/app/immutable/nodes/{1.BRKnSVrJ.js → 1.C9L1F6aA.js} +1 -1
- package/web/app/immutable/nodes/{10.Dq2vvlba.js → 10.B8AiTDsb.js} +1 -1
- package/web/app/immutable/nodes/{14.vi5_3ajt.js → 14.BKuNc4_Z.js} +1 -1
- package/web/app/immutable/nodes/{16.B4hQ-11c.js → 16.CtflurYW.js} +2 -2
- package/web/app/immutable/nodes/{2.CIWkcax4.js → 2.B4ArXfgw.js} +3 -3
- package/web/app/immutable/nodes/{3.nHUMIbz4.js → 3.FN9eOco4.js} +1 -1
- package/web/app/immutable/nodes/{4.CuGifUZf.js → 4.ChyHBjf2.js} +1 -1
- package/web/app/immutable/nodes/{5.B28pUbsn.js → 5.mYT25e0t.js} +1 -1
- package/web/app/immutable/nodes/{6.D04srF9Y.js → 6.BDco5Lux.js} +1 -1
- package/web/app/immutable/nodes/{7.U-29Oxv0.js → 7.CMc5WExh.js} +1 -1
- package/web/app/immutable/nodes/{8.Bw_t7MQd.js → 8.DZjomBnv.js} +2 -2
- package/web/app/immutable/nodes/{9.Dr8DgxLF.js → 9.TMF_rwOS.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/Ds156ydk.js +0 -1
- package/web/app/immutable/entry/start.Cx6ojV1T.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as tt}from"./
|
|
1
|
+
import{p as tt}from"./IJrjG441.js";import{p as et}from"./CtnKv097.js";import{K as at,aF as rt,L as it,aG as nt,O as ot,aI as st,a as l,ad as z,N as lt,j as ct,aE as dt,an as gt,r as pt,k as ht,y as ft}from"./C5VEh5uc.js";import"./BC_OV_w3.js";import{d as I}from"./DBzoyXfv.js";import{o as ut}from"./CmKTTxBW.js";import{d as mt}from"./DvXLHS0T.js";var vt=ft.pie,L={sections:new Map,showData:!1},T=L.sections,R=L.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{T=new Map,R=L.showData,ht()},"clear"),Ct=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),$t=l(()=>T,"getSections"),yt=l(t=>{R=t},"setShowData"),Dt=l(()=>R,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:st,getDiagramTitle:ot,setAccTitle:nt,getAccTitle:it,setAccDescription:rt,getAccDescription:at,addSection:Ct,getSections:$t,setShowData:yt,getShowData:Dt},Tt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),bt={parse:l(async t=>{const a=await et("pie",t);z.debug(a),Tt(a,U)},"parse")},At=l(t=>`
|
|
2
2
|
.pieCircle{
|
|
3
3
|
stroke: ${t.pieStrokeColor};
|
|
4
4
|
stroke-width : ${t.pieStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Du=Object.defineProperty;var Nu=(t,e,r)=>e in t?Du(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ie=(t,e,r)=>Nu(t,typeof e!="symbol"?e+"":e,r);import{cA as Ft,aS as Lu,dl as gl,Z as A0,X as sa,Y as Pu,W as Ou,a0 as _u,aa as $u,S as Bu,dM as qu,L as Fu,b8 as vl,cD as t0,dk as bl,aR as Hu,aV as Uu,cl as Wu,c7 as Gu,dg as Na,dG as ju,dA as Vu,ax as Ln,ak as Xu,as as ci,dx as Ku,dC as yl,dz as Yu}from"./BtwWpYbv.js";import{D as bs,bw as Zu,bM as Qu,b1 as Ju}from"./D1wQuS9X.js";import{J as e1}from"./D5WwA0O_.js";import{xD as un,Hi as E,n5 as ye,n4 as Se,aP as t1,g as wl,y as De,bh as r0,jK as ui,lo as hn,am as Ut,ln as ys,lx as ws,lu as ks,jh as kl,gi as La,FP as r1,se as n1,yZ as a1,o8 as i1,ma as dn,Ax as s1,iq as o1,lH as l1,li as c1}from"./CM_x_DK5.js";import{bo as re}from"./rfbsWJY8.js";import{t as Je}from"./DVqY3xlL.js";import{T as u1,x as yr,y as wr}from"./L8URHs0O.js";import{a as n0}from"./BJzHxIyr.js";import{o as pe,r as Ht,f as a0,s as V,e as Xe,l as i0,n as Le,c as sr,b as He,u as h1,d as d1}from"./CpHIRYx9.js";import{j as xl}from"./DVkfuwKw.js";import{r as p1}from"./Bb8-l2NT.js";import{b as m1}from"./DjMZotf0.js";import{i as Ge}from"./VdNAjP0_.js";import{l as oa,c as f1}from"./ChTqQfQN.js";import{ax as s0}from"./_hjrl4Qq.js";import{i as xs}from"./CkCUFgWs.js";import{f as hi,u as Sl,v as Al,i as g1,s as Tl,n as v1,p as b1}from"./hnekB-ms.js";const We=[];for(let t=0;t<256;++t)We.push((t+256).toString(16).slice(1));function y1(t,e=0){return(We[t[e+0]]+We[t[e+1]]+We[t[e+2]]+We[t[e+3]]+"-"+We[t[e+4]]+We[t[e+5]]+"-"+We[t[e+6]]+We[t[e+7]]+"-"+We[t[e+8]]+We[t[e+9]]+"-"+We[t[e+10]]+We[t[e+11]]+We[t[e+12]]+We[t[e+13]]+We[t[e+14]]+We[t[e+15]]).toLowerCase()}const w1=new Uint8Array(16);function k1(){return crypto.getRandomValues(w1)}function di(t,e,r){return crypto.randomUUID?crypto.randomUUID():x1(t)}function x1(t,e,r){t=t||{};const n=t.random??t.rng?.()??k1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,y1(n)}function pi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=pi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?e1(r.replace(/\.git\/?$/,""),e):null}function V2(t,e){return t.type==="local"?t.plainFolder?"folder":"local":pi(t,e)?.provider==="gitlab"?"gitlab":"github"}function El(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function X2(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=El(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function K2(t){return t.type==="local"&&t.path?t.path:void 0}const S1=["/.clones/","/.repo-cache/"];function Y2(t){const e=t.replaceAll("\\","/");return S1.some(r=>e.includes(r))}function Z2(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function A1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function Q2(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??A1(r)}}function J2(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,El(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const T1="known-repos",E1=6e4;function M1({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=un(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(un(s),s);for(const s of e.repos)a.set(un(s),s)}const i=[...a.values()].filter(s=>!r[un(s)]);return n==="all"?i:i.slice(0,9)}function e5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function t5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<E1?"skip":"load"}function r5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=pi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function C1({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(bs)?bs:null;return s===null||!i(s)?null:s}const n5=E.createSelector(t=>t.workspaceInitializer.hydrated),a5=E.createSelector(t=>t.workspaceInitializer.compactFormState),i5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),s5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),o5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),l5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),c5=E.createSelector(t=>ye(t.workspaceInitializer.recentRepos)),u5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),h5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),d5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),p5=E.createSelector(t=>ye(t.workspaceInitializer.remoteSetups)),m5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),f5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),g5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),v5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),b5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),y5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),w5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),k5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),x5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),S5=E.createSelector(t=>C1({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Qu.select(t),orchestratorId:Zu.select(t)?.id??null})),I1=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=Ft.select(t);return e&&r&&Lu.select(t)?JSON.stringify([r,e]):null}),A5=E.createSelector(t=>{const e=I1.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),z1=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,T1),r=Ft.select(t);return M1({saved:ye(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),T5=E.createSelector(t=>gl.select(t)?z1.select(t):[]),E5=E.createSelector(t=>Ju.select(t)||void 0),Ss="workspace-debug-flags",pn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class R1{constructor(){ie(this,"flags");ie(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return pn;try{const e=localStorage.getItem(Ss);if(e)return{...pn,...JSON.parse(e)}}catch(e){oa.error("Failed to load debug flags:",e)}return pn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Ss,JSON.stringify(this.flags))}catch(e){oa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...pn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),oa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const la=new R1;function M5(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function D1(t){return t.charAt(0).toUpperCase()+t.slice(1)}function C5(t){if(!t||t.trim().length===0)return re.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return re.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return re.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return re.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return re.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return re.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return re.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return re.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return re.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return re.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return re.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return re.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return re.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return re.workspace_sidebarHeader_branchTooLong_error()}function I5(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Pa(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function z5(t,e){return`${e}:${t.agentId??"manual"}`}function N1(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function L1(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function P1(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function R5(t,e,r,n){const a=N1(t,e),i=n?` (origin/${n})`:"";return r?a===1?re.workspace_sidebarChanges_addToPr_one({suffix:i}):re.workspace_sidebarChanges_addToPr_many({count:Je(a),suffix:i}):a===1?re.workspace_sidebarChanges_pushToRemote_one({suffix:i}):re.workspace_sidebarChanges_pushToRemote_many({count:Je(a),suffix:i})}function D5(t,e,r){const n=L1(t,e),a=r?` (origin/${r})`:"";return n===1?re.workspace_sidebarChanges_undoPush_one({suffix:a}):re.workspace_sidebarChanges_undoPush_many({count:Je(n),suffix:a})}function N5(t,e){const r=P1(t,e);return r===1?re.workspace_sidebarChanges_undoCommit_one():re.workspace_sidebarChanges_undoCommit_many({count:Je(r)})}function L5(t,e){return e===0&&t.length>0}function P5(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function O5(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function _5(t,e,r){return r?.path===t&&r?.staged===e}function $5(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function B5(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function O1(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function q5(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=O1(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Pa(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?mi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Pa(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function F5(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??t1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function _1(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function ca(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=A0(i),c=o.toLowerCase(),h=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===sa(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?sa(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${Pu(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?sa(i):void 0,url:o,htmlUrl:o,status:_1(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:mi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function mi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function H5(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const x of n)x.repoOwner&&x.repoName&&s.add(`${x.repoOwner}/${x.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(x=>x.crossRepo)){o=[];for(const x of t)x.crossRepo?s.has(x.crossRepo.toLowerCase())?c.push(x):h.push(x):o.push(x)}const p=[],f=[],g=[];for(const x of e){const C=x.repo.toLowerCase();A0(x)&&o.some(U=>U.url===A0(x))||!x.resource&&!x.monitorAvailability&&(!i||C===i)?p.push(x):A0(x)&&c.some(U=>U.url===A0(x))||!x.resource&&!x.monitorAvailability&&s.has(C)?f.push(x):g.push(x)}const w=ca(o,p,r),S=r?.split("/")[0],M=new Set([...w,...c,...h].map(x=>`${(x.crossRepo??r??"").toLowerCase()}#${x.number}`)),z=[...c];for(const x of n){if(!x.repoOwner||!x.repoName)continue;const C=`${x.repoOwner}/${x.repoName}`;for(const U of x.pullRequests??[]){const Y=`${C.toLowerCase()}#${U.number}`;if(M.has(Y))continue;M.add(Y);const K=U.url||`https://github.com/${C}/pull/${U.number}`,T=i!==void 0&&C.toLowerCase()===i;z.push({number:U.number,title:a(U),url:K,htmlUrl:K,status:Pa(U.status),createdAt:U.createdAt,updatedAt:U.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:mi(C,S)})}}return{own:w,otherRoots:ca(z,f,r),otherTracked:ca(h,g,r)}}function As(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function U5(t){const e=t.status==="merged"?re.workspace_prSection_merged_label():t.status==="closed"?re.workspace_prSection_closed_label():t.status==="draft"?re.workspace_prSection_statusDraft_label():As(t)?re.workspace_prSection_statusQueued_label():re.workspace_prSection_statusOpen_label(),r=[Ou(t)??e],n=As(t)?u1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(re.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(re.workspace_prSection_statusChecks_tooltip({passed:Je(a.checks.passed),failed:Je(a.checks.failed),pending:Je(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?re.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?re.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:Je(a.approvals.have),needed:Je(a.approvals.needed)}):re.workspace_prSection_statusApprovals_tooltip({count:Je(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(re.workspace_prSection_statusChangesRequested_tooltip({count:Je(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(re.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(re.workspace_prSection_statusUnresolvedThreads_tooltip({count:Je(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(re.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(D1(a.mergeBlockedReason))),r.join(`
|
|
1
|
+
var Du=Object.defineProperty;var Nu=(t,e,r)=>e in t?Du(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ie=(t,e,r)=>Nu(t,typeof e!="symbol"?e+"":e,r);import{cA as Ft,aS as Lu,dl as gl,Z as A0,X as sa,Y as Pu,W as Ou,a0 as _u,aa as $u,S as Bu,dM as qu,L as Fu,b8 as vl,cD as t0,dk as bl,aR as Hu,aV as Uu,cl as Wu,c7 as Gu,dg as Na,dG as ju,dA as Vu,ax as Ln,ak as Xu,as as ci,dx as Ku,dC as yl,dz as Yu}from"./BtwWpYbv.js";import{D as bs,bw as Zu,bM as Qu,b1 as Ju}from"./BNf1F4jC.js";import{J as e1}from"./D5WwA0O_.js";import{xD as un,Hi as E,n5 as ye,n4 as Se,aP as t1,g as wl,y as De,bh as r0,jK as ui,lo as hn,am as Ut,ln as ys,lx as ws,lu as ks,jh as kl,gi as La,FP as r1,se as n1,yZ as a1,o8 as i1,ma as dn,Ax as s1,iq as o1,lH as l1,li as c1}from"./CM_x_DK5.js";import{bo as re}from"./rfbsWJY8.js";import{t as Je}from"./DVqY3xlL.js";import{T as u1,x as yr,y as wr}from"./L8URHs0O.js";import{a as n0}from"./BJzHxIyr.js";import{o as pe,r as Ht,f as a0,s as V,e as Xe,l as i0,n as Le,c as sr,b as He,u as h1,d as d1}from"./CpHIRYx9.js";import{j as xl}from"./DVkfuwKw.js";import{r as p1}from"./Bb8-l2NT.js";import{b as m1}from"./DjMZotf0.js";import{i as Ge}from"./VdNAjP0_.js";import{l as oa,c as f1}from"./ChTqQfQN.js";import{ax as s0}from"./_hjrl4Qq.js";import{i as xs}from"./CkCUFgWs.js";import{f as hi,u as Sl,v as Al,i as g1,s as Tl,n as v1,p as b1}from"./hnekB-ms.js";const We=[];for(let t=0;t<256;++t)We.push((t+256).toString(16).slice(1));function y1(t,e=0){return(We[t[e+0]]+We[t[e+1]]+We[t[e+2]]+We[t[e+3]]+"-"+We[t[e+4]]+We[t[e+5]]+"-"+We[t[e+6]]+We[t[e+7]]+"-"+We[t[e+8]]+We[t[e+9]]+"-"+We[t[e+10]]+We[t[e+11]]+We[t[e+12]]+We[t[e+13]]+We[t[e+14]]+We[t[e+15]]).toLowerCase()}const w1=new Uint8Array(16);function k1(){return crypto.getRandomValues(w1)}function di(t,e,r){return crypto.randomUUID?crypto.randomUUID():x1(t)}function x1(t,e,r){t=t||{};const n=t.random??t.rng?.()??k1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,y1(n)}function pi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=pi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?e1(r.replace(/\.git\/?$/,""),e):null}function V2(t,e){return t.type==="local"?t.plainFolder?"folder":"local":pi(t,e)?.provider==="gitlab"?"gitlab":"github"}function El(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function X2(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=El(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function K2(t){return t.type==="local"&&t.path?t.path:void 0}const S1=["/.clones/","/.repo-cache/"];function Y2(t){const e=t.replaceAll("\\","/");return S1.some(r=>e.includes(r))}function Z2(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function A1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function Q2(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??A1(r)}}function J2(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,El(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const T1="known-repos",E1=6e4;function M1({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=un(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(un(s),s);for(const s of e.repos)a.set(un(s),s)}const i=[...a.values()].filter(s=>!r[un(s)]);return n==="all"?i:i.slice(0,9)}function e5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function t5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<E1?"skip":"load"}function r5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=pi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function C1({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(bs)?bs:null;return s===null||!i(s)?null:s}const n5=E.createSelector(t=>t.workspaceInitializer.hydrated),a5=E.createSelector(t=>t.workspaceInitializer.compactFormState),i5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),s5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),o5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),l5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),c5=E.createSelector(t=>ye(t.workspaceInitializer.recentRepos)),u5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),h5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),d5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),p5=E.createSelector(t=>ye(t.workspaceInitializer.remoteSetups)),m5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),f5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),g5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),v5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),b5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),y5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),w5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),k5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),x5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),S5=E.createSelector(t=>C1({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Qu.select(t),orchestratorId:Zu.select(t)?.id??null})),I1=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=Ft.select(t);return e&&r&&Lu.select(t)?JSON.stringify([r,e]):null}),A5=E.createSelector(t=>{const e=I1.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),z1=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,T1),r=Ft.select(t);return M1({saved:ye(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),T5=E.createSelector(t=>gl.select(t)?z1.select(t):[]),E5=E.createSelector(t=>Ju.select(t)||void 0),Ss="workspace-debug-flags",pn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class R1{constructor(){ie(this,"flags");ie(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return pn;try{const e=localStorage.getItem(Ss);if(e)return{...pn,...JSON.parse(e)}}catch(e){oa.error("Failed to load debug flags:",e)}return pn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Ss,JSON.stringify(this.flags))}catch(e){oa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...pn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),oa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const la=new R1;function M5(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function D1(t){return t.charAt(0).toUpperCase()+t.slice(1)}function C5(t){if(!t||t.trim().length===0)return re.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return re.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return re.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return re.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return re.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return re.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return re.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return re.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return re.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return re.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return re.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return re.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return re.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return re.workspace_sidebarHeader_branchTooLong_error()}function I5(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Pa(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function z5(t,e){return`${e}:${t.agentId??"manual"}`}function N1(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function L1(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function P1(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function R5(t,e,r,n){const a=N1(t,e),i=n?` (origin/${n})`:"";return r?a===1?re.workspace_sidebarChanges_addToPr_one({suffix:i}):re.workspace_sidebarChanges_addToPr_many({count:Je(a),suffix:i}):a===1?re.workspace_sidebarChanges_pushToRemote_one({suffix:i}):re.workspace_sidebarChanges_pushToRemote_many({count:Je(a),suffix:i})}function D5(t,e,r){const n=L1(t,e),a=r?` (origin/${r})`:"";return n===1?re.workspace_sidebarChanges_undoPush_one({suffix:a}):re.workspace_sidebarChanges_undoPush_many({count:Je(n),suffix:a})}function N5(t,e){const r=P1(t,e);return r===1?re.workspace_sidebarChanges_undoCommit_one():re.workspace_sidebarChanges_undoCommit_many({count:Je(r)})}function L5(t,e){return e===0&&t.length>0}function P5(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function O5(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function _5(t,e,r){return r?.path===t&&r?.staged===e}function $5(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function B5(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function O1(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function q5(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=O1(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Pa(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?mi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Pa(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function F5(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??t1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function _1(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function ca(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=A0(i),c=o.toLowerCase(),h=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===sa(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?sa(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${Pu(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?sa(i):void 0,url:o,htmlUrl:o,status:_1(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:mi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function mi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function H5(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const x of n)x.repoOwner&&x.repoName&&s.add(`${x.repoOwner}/${x.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(x=>x.crossRepo)){o=[];for(const x of t)x.crossRepo?s.has(x.crossRepo.toLowerCase())?c.push(x):h.push(x):o.push(x)}const p=[],f=[],g=[];for(const x of e){const C=x.repo.toLowerCase();A0(x)&&o.some(U=>U.url===A0(x))||!x.resource&&!x.monitorAvailability&&(!i||C===i)?p.push(x):A0(x)&&c.some(U=>U.url===A0(x))||!x.resource&&!x.monitorAvailability&&s.has(C)?f.push(x):g.push(x)}const w=ca(o,p,r),S=r?.split("/")[0],M=new Set([...w,...c,...h].map(x=>`${(x.crossRepo??r??"").toLowerCase()}#${x.number}`)),z=[...c];for(const x of n){if(!x.repoOwner||!x.repoName)continue;const C=`${x.repoOwner}/${x.repoName}`;for(const U of x.pullRequests??[]){const Y=`${C.toLowerCase()}#${U.number}`;if(M.has(Y))continue;M.add(Y);const K=U.url||`https://github.com/${C}/pull/${U.number}`,T=i!==void 0&&C.toLowerCase()===i;z.push({number:U.number,title:a(U),url:K,htmlUrl:K,status:Pa(U.status),createdAt:U.createdAt,updatedAt:U.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:mi(C,S)})}}return{own:w,otherRoots:ca(z,f,r),otherTracked:ca(h,g,r)}}function As(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function U5(t){const e=t.status==="merged"?re.workspace_prSection_merged_label():t.status==="closed"?re.workspace_prSection_closed_label():t.status==="draft"?re.workspace_prSection_statusDraft_label():As(t)?re.workspace_prSection_statusQueued_label():re.workspace_prSection_statusOpen_label(),r=[Ou(t)??e],n=As(t)?u1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(re.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(re.workspace_prSection_statusChecks_tooltip({passed:Je(a.checks.passed),failed:Je(a.checks.failed),pending:Je(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?re.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?re.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:Je(a.approvals.have),needed:Je(a.approvals.needed)}):re.workspace_prSection_statusApprovals_tooltip({count:Je(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(re.workspace_prSection_statusChangesRequested_tooltip({count:Je(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(re.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(re.workspace_prSection_statusUnresolvedThreads_tooltip({count:Je(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(re.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(D1(a.mergeBlockedReason))),r.join(`
|
|
2
2
|
`)}function W5(t,e){return e.has(t??"manual")}function G5(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const Ml=500;function j5(t,e=Ml){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function V5(t,e,r=Ml){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function X5(t){if(t.hiddenCount<=0)return"";const e=Je(t.shown),r=Je(t.shown+t.hiddenCount);return t.hiddenCount===1?re.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):re.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:Je(t.hiddenCount)})}function $1(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Oa(t){return t.startsWith("@")?t.slice(1):t}function B1(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return Oa(String(a));const i=[r,e,n.trim()].map(Oa).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?_u(s).path:void 0}function q1(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function F1(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=$1(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=B1(i,n,r,t.textContent||"");c&&(s.filePath=c);const h=q1(i);h!==void 0&&(s.line=h)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,h=c?Oa(String(c)).replace(/\/+$/,""):"";h&&(s.folderPath=h)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function K5(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function fi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Dr=fi();function Cl(t){Dr=t}var Er={exec:()=>null};function Ur(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function le(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ve.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var H1=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ve={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ur(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ur(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ur(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ur(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Ur(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Ur(t=>new RegExp(`^ {0,${t}}>`))},U1=/^(?:[ \t]*(?:\n|$))+/,W1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,G1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,j1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,gi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Il=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zl=le(Il).replace(/bull/g,gi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),V1=le(Il).replace(/bull/g,gi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),vi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,X1=/^[^\n]+/,bi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,K1=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Y1=le(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,gi).getRegex(),Pn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z1=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yi).replace("tag",Pn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rl=t=>le(vi).replace("hr",$0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pn).getRegex(),Q1=Rl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),J1=Rl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),eh=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",J1).getRegex(),wi={blockquote:eh,code:W1,def:K1,fences:G1,heading:j1,hr:$0,html:Z1,lheading:zl,list:Y1,newline:U1,paragraph:Q1,table:Er,text:X1},Ts=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pn).getRegex(),th={...wi,lheading:V1,table:Ts,paragraph:le(vi).replace("hr",$0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ts).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pn).getRegex()},rh={...wi,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Er,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(vi).replace("hr",$0).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",zl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nh=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ah=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dl=/^( {2,}|\\)\n(?!\s*$)/,ih=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wt=/[\p{P}\p{S}]/u,o0=/[\s\p{P}\p{S}]/u,B0=/[^\s\p{P}\p{S}]/u,sh=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,o0).getRegex(),oh=/[\p{Pi}\p{Ps}"']/u,Nl=/(?!~)[\p{P}\p{S}]/u,lh=/(?!~)[\s\p{P}\p{S}]/u,ch=/(?:[^\s\p{P}\p{S}]|~)/u,uh=le(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",H1?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ll=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,hh=le(Ll,"u").replace(/punct/g,Wt).getRegex(),dh=le(Ll,"u").replace(/punct/g,Nl).getRegex(),ph=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,mh=le(ph,"u").replace(/openQuote/g,oh).replace(/punct/g,Wt).getRegex(),Pl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",fh=le(Pl,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,o0).replace(/punct/g,Wt).getRegex(),gh=le(Pl,"gu").replace(/notPunctSpace/g,ch).replace(/punctSpace/g,lh).replace(/punct/g,Nl).getRegex(),vh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",bh=le(vh,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,o0).replace(/punct/g,Wt).getRegex(),yh=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,o0).replace(/punct/g,Wt).getRegex(),wh="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",kh=le(wh,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,o0).replace(/punct/g,Wt).getRegex(),xh=le(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Wt).getRegex(),Sh="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ah=le(Sh,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,o0).replace(/punct/g,Wt).getRegex(),Th=le(/\\(punct)/,"gu").replace(/punct/g,Wt).getRegex(),Eh=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Mh=le(yi).replace("(?:-->|$)","-->").getRegex(),Ch=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Mh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ih=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Cn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ol=le(/^!?\[(label)\]\[(ref)\]/).replace("label",Cn).replace("ref",bi).getRegex(),_l=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",bi).getRegex(),zh=le("reflink|nolink(?!\\()","g").replace("reflink",Ol).replace("nolink",_l).getRegex(),Es=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ki={_backpedal:Er,anyPunctuation:Th,autolink:Eh,blockSkip:uh,br:Dl,code:ah,del:Er,delLDelim:Er,delRDelim:Er,emStrongLDelim:hh,emStrongRDelimAst:fh,emStrongRDelimUnd:yh,escape:nh,link:Ih,nolink:_l,punctuation:sh,reflink:Ol,reflinkSearch:zh,tag:Ch,text:ih,url:Er},Rh={...ki,emStrongLDelim:mh,emStrongRDelimAst:bh,emStrongRDelimUnd:kh,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",Cn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cn).getRegex()},_a={...ki,emStrongRDelimAst:gh,emStrongLDelim:dh,delLDelim:xh,delRDelim:Ah,url:le(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Es).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:le(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Es).getRegex()},Dh={..._a,br:le(Dl).replace("{2,}","*").getRegex(),text:le(_a.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},mn={normal:wi,gfm:th,pedantic:rh},v0={normal:ki,gfm:_a,breaks:Dh,pedantic:Rh},Nh={"&":"&","<":"<",">":">",'"':""","'":"'"},Ms=t=>Nh[t];function It(t,e){if(e){if(Ve.escapeTest.test(t))return t.replace(Ve.escapeReplace,Ms)}else if(Ve.escapeTestNoEncode.test(t))return t.replace(Ve.escapeReplaceNoEncode,Ms);return t}function Cs(t){try{t=encodeURI(t).replace(Ve.percentDecode,"%")}catch{return null}return t}function Is(t,e){let r=t.replace(Ve.findPipe,(i,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ve.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ve.slashPipe,"|");return n}function Jt(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function zs(t){let e=t.split(`
|
|
4
4
|
`),r=e.length-1;for(;r>=0&&Ve.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/e3l8byhA.js","/app/immutable/chunks/C95Ch7tj.js","/app/immutable/chunks/rfbsWJY8.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/Z4aRP2F9.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/_hjrl4Qq.js","/app/immutable/chunks/DYvAONpX.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/DcUVqsa0.js","/app/immutable/chunks/D5WwA0O_.js","/app/immutable/chunks/_X_zaIBj.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DVqY3xlL.js","/app/immutable/chunks/DtY788JX.js","/app/immutable/chunks/CM_x_DK5.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/DPDCKuA3.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/9hA4gnqW.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/Cw4izdIx.js","/app/immutable/chunks/L8URHs0O.js","/app/immutable/chunks/CXgisfCc.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/CkCUFgWs.js","/app/immutable/chunks/DypB-Dwi.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{z as ne,N as se,x as re,dA as D,cD as v,dk as oe,ak as ae,a$ as V,y as ie,dL as ue}from"./BtwWpYbv.js";import{_ as T,bo as S}from"./rfbsWJY8.js";import{uQ as ce,Ax as F,n4 as f,uS as le,BK as W,Hi as c,cz as de,cA as fe,n5 as q,mT as me,c as k,fC as pe,g as ge,lj as he,cH as Se}from"./CM_x_DK5.js";import{bU as ye}from"./
|
|
2
|
+
import{z as ne,N as se,x as re,dA as D,cD as v,dk as oe,ak as ae,a$ as V,y as ie,dL as ue}from"./BtwWpYbv.js";import{_ as T,bo as S}from"./rfbsWJY8.js";import{uQ as ce,Ax as F,n4 as f,uS as le,BK as W,Hi as c,cz as de,cA as fe,n5 as q,mT as me,c as k,fC as pe,g as ge,lj as he,cH as Se}from"./CM_x_DK5.js";import{bU as ye}from"./27ieI8Q7.js";import{x as Ae,J as be,ag as we,ao as Me}from"./D9xXuqJT.js";import{a as O}from"./DypB-Dwi.js";import{s as Ie}from"./hnekB-ms.js";import{by as _e}from"./_hjrl4Qq.js";import{C as Ce}from"./CXgisfCc.js";import{q as ve,v as Te}from"./DVqY3xlL.js";import{a as Re}from"./CnsJaE4q.js";function $e(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function wt(e,t){return e.targetAgentId===t}function Mt(e){const t=e.element,n=e.viewport,s=$e(e),r=t?`<${t.tagName.toLowerCase()}> · ${s}`:e.title||s,o=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
|
|
3
3
|
`);return[{id:`${e.id}-image`,type:"file",label:r,imageData:e.image.data,imageMimeType:e.image.mimeType},{id:`${e.id}-context`,type:"selection",label:r,content:o}]}function ke(e,t){const n=t.filter(s=>s.type==="selection").flatMap(s=>s.content?.trim()?[s.content.trim()]:[]);return[e.trim(),...n].filter(Boolean).join(`
|
|
4
4
|
`)}function Ee(e){const t=e.filter(s=>(s.imageData||s.attachmentId)&&s.imageMimeType).map(s=>s.attachmentId?{type:"image",attachmentId:s.attachmentId,...s.imageMimeType.includes("/")?{mimeType:s.imageMimeType}:{}}:{type:"image",data:s.imageData,mimeType:s.imageMimeType,...s.placementFileName?{placementFileName:s.placementFileName}:{}}),n=e.filter(s=>s.attachmentId&&!s.imageMimeType).map(s=>({type:"file",attachmentId:s.attachmentId,fileName:s.label,...s.attachmentMimeType?{mimeType:s.attachmentMimeType}:{},...s.attachmentSize!==void 0?{size:s.attachmentSize}:{}}));return{imageBlocks:t,fileBlocks:n}}function Le(e=[],t=[],n=[]){const s=[];for(const r of t)r.type==="file"&&r.filePath?s.push(`[Currently viewing file: ${r.filePath}]`):r.type==="diff"&&r.filePath?s.push(`[Currently viewing diff for: ${r.filePath}]`):r.type==="note"&&r.noteId?s.push(`[Currently viewing note: "${r.label}" (ID: ${r.noteId}). Read it with ws.note.read("${r.noteId}").]`):r.type==="spec"?s.push("[Currently viewing: Spec]"):r.type==="browser"&&r.browserUrl&&s.push(`[Currently viewing browser: ${r.browserUrl}]`);for(const r of n){const o=r.text.trim(),a=o.length>500?o.substring(0,500)+"...":o,i=r.sourceLabel?` from ${r.sourceLabel}`:"";s.push(`[Selected text${i}:
|
|
5
5
|
\`\`\`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./
|
|
1
|
+
import{p as B}from"./BsYKjXz_.js";import{f as b,$ as m,c4 as C,a6 as S,bC as w,c7 as D,aL as P,c9 as T,aP as z,aK as E,c6 as F,aN as A,ax as W,a0 as _}from"./BC_OV_w3.js";import{p as N}from"./B96tyeqv.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=P,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=F}getConfig(){const t=m({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{B(e,t);let r=-1,s=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);s.length<=l+1&&t.getPacket().length<M;){const[p,o]=I({start:a,end:i,bits:d,label:c},n,l);if(s.push(p),p.end+1===n*l&&(t.pushWord(s),s=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(s)},"populate"),I=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,n=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},K=b((e,t,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(s+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),j={draw:K},G={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=b(({packet:e}={})=>{const t=m(G,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Oe,bq as X,a_ as U,bo as W,by as Ne,b as qe,bu as He,bs as rt,bt as xt}from"./rfbsWJY8.js";import{bs as je,bj as bt,a5 as u,bA as c,b_ as x,W as a,bn as Ge,aA as J,ay as D,bS as n,aD as e,aB as m,c9 as $,c5 as Ce,ca as yt,bk as st,bH as Pe,bV as Fe,a7 as fe,be as $e,b$ as ke,bO as F,bl as Ae}from"./B8o4lNgr.js";import{D as ot}from"./D5WwA0O_.js";import{s as ze,k as Je,d as Qe,h as Re,c as Ye}from"./Z4aRP2F9.js";import{c as P}from"./DcUVqsa0.js";import{P as Se,e as We,f as Ee,d as Me}from"./C95Ch7tj.js";import{N as At,w as T,E as Ze,g as Pt}from"./D0KbJAaw.js";import{f as Be}from"./_hjrl4Qq.js";import{C as Tt}from"./CnXUfSkf.js";import"./CQV_d_bF.js";import{Hi as xe,ff as Dt,Dq as nt,BT as it,o$ as Rt}from"./CM_x_DK5.js";import{aN as lt,aK as Ht,aL as It,dm as Lt}from"./BtwWpYbv.js";import{d as zt,r as St}from"./QsqAizRM.js";import{M as Wt}from"./8L6UQh4N.js";import{k as Et}from"./Dcd7scoM.js";import{e as et}from"./DdAufyF9.js";import{F as Mt,e as Bt}from"./BP5uTKE_.js";import{o as Ct}from"./Mw-Gpasz.js";import{S as Ie}from"./D1yEb1Sd.js";import{F as Le,a1 as Ft,cV as Ot,at as Nt,bi as qt}from"./DPDCKuA3.js";var jt=m('<div class="space-y-3"><!> <!></div>'),Gt=m('<div class="space-y-3"><!> <!></div> <!>',1),Vt=m('<div class="space-y-3 rounded-xl border border-border p-4 shadow-xs"><div class="flex items-center gap-3"><!><!></div> <!> <div class="flex items-center justify-between pt-1"><!><!></div></div>'),Kt=m('<div class="min-w-0 space-y-3"><div class="flex h-10 items-center px-2"><!></div> <!></div>'),Ut=m('<div class="grid grid-cols-[repeat(auto-fit,minmax(min(100%,10rem),1fr))] gap-3 px-1"></div>'),Xt=m('<div class="flex h-10 items-center px-3"><!></div>'),Jt=m("<div><!> <!> <!> <!></div>"),Qt=m("<!> <!>",1),Yt=m('<div role="status" class="min-h-0 min-w-0 flex-1 overflow-hidden svelte-kmeefs" data-home-loading=""><div aria-hidden="true"><!></div></div>');function dt(b,l){if(new.target)return Oe({component:dt,...b});je(l,!0);const Q=At();bt(Q.cleanup);let I=X(l,"detail",7,!1),O=X(l,"count",7,5),Y=X(l,"view",7,"list"),Z=X(l,"grouped",7,!1),s=X(l,"rows",7,"workspace");var L={get detail(){return I()},set detail(i=!1){I(i),J()},get count(){return O()},set count(i=5){O(i),J()},get view(){return Y()},set view(i="list"){Y(i),J()},get grouped(){return Z()},set grouped(i=!1){Z(i),J()},get rows(){return s()},set rows(i="workspace"){s(i),J()},$set:Ne,$on:(i,R)=>qe(l,i,R)},y=Yt(),ie=u(y),be=u(ie);{var le=i=>{var R=Gt(),g=D(R),ee=u(g);T(ee,{class:"h-6 w-4/5"});var E=n(ee,2);T(E,{class:"h-4 w-1/2"}),c(g);var d=n(g,2);Re(d,16,()=>[0,1],h=>h,(h,A)=>{var k=jt(),te=u(k);T(te,{class:"h-3 w-full"});var N=n(te,2);T(N,{class:"h-3 w-5/6"}),c(k),a(h,k)}),a(i,R)},Te=i=>{var R=Ut();Re(R,20,()=>[0,1,2],g=>g,(g,ee)=>{var E=Kt(),d=u(E),h=u(d);T(h,{class:"h-3 w-20"}),c(d);var A=n(d,2);Re(A,16,()=>[0,1,2],k=>k,(k,te)=>{var N=Vt(),de=u(N),ae=u(de);T(ae,{class:"h-4 flex-1"});var ce=n(ae);T(ce,{class:"size-3 rounded-full"}),c(de);var t=n(de,2);T(t,{class:"h-3 w-full"});var o=n(t,2),w=u(o);T(w,{class:"size-4 rounded-sm"});var q=n(w);T(q,{class:"h-3 w-6"}),c(o),c(N),a(k,N)}),c(E),a(g,E)}),c(R),a(i,R)},_e=i=>{var R=Qt(),g=D(R);{var ee=d=>{var h=Xt(),A=u(h);T(A,{class:"h-3 w-20"}),c(h),a(d,h)};U(g,d=>{Z()&&d(ee)})}var E=n(g,2);Re(E,16,()=>Array.from({length:O()},(d,h)=>h),d=>d,(d,h)=>{var A=Jt(),k=u(A);T(k,{class:"size-4 shrink-0 rounded-sm"});var te=n(k,2);T(te,{class:"h-4 min-w-0 flex-1"});var N=n(te,2);{var de=o=>{T(o,{class:"size-3 shrink-0 rounded-full"})},ae=o=>{T(o,{class:"size-5 shrink-0 rounded-full"})};U(N,o=>{s()==="workspace"?o(de):s()==="integration"&&o(ae,1)})}var ce=n(N,2);{var t=o=>{{let w=$(()=>s()==="workspace"?"h-3 w-8 shrink-0":"h-3 w-6 shrink-0");T(o,{get class(){return e(w)}})}};U(ce,o=>{s()!=="compact"&&o(t)})}c(A),x(()=>Je(A,1,Qe(s()==="compact"?"flex min-h-6 items-center gap-2 py-1":`flex h-12 items-center gap-3 border-b border-border ${s()==="integration"?"px-2":"px-3"}`))),a(d,A)}),a(i,R)};U(be,i=>{I()?i(le):Y()==="board"?i(Te,1):i(_e,-1)})}return c(ie),c(y),x(i=>{ze(y,"aria-label",i),ze(y,"data-reduced",Q.current),Je(ie,1,Qe(I()?"space-y-6 py-3":s()==="compact"?"":"px-5 pb-4"))},[()=>W.home_integrations_loading()]),a(b,y),Ge(L)}function ct(b){return b.filter(zt)}function Zt(){let b=null;return(l,Q)=>{const I=b?l.find(Y=>Y.id===b):void 0;if(I)return I;const O=St(l);return b=Q&&O?String(O.id):null,O}}function ea(b,l,Q){return l&&b.find(I=>I.id===l)||Q}var ta=m('<div class="p-4"><!></div>'),aa=m('<div class="flex h-full min-h-0 min-w-0 flex-col" data-home-workspace-chat=""><!></div>');function vt(b,l){if(new.target)return Oe({component:vt,...b});je(l,!0);const Q=()=>He(ie,"$agents$",O),I=()=>He(be,"$loaded$",O),[O,Y]=rt();let Z=X(l,"workspace",7),s=X(l,"preview",7,!1),L=X(l,"agent",7);const y=Ce(()=>Z().id),ie=lt(y),be=Ht(y),le=$(()=>ct(Q())),Te=$(()=>s()?void 0:L()?.id);yt(()=>{const t=e(Te);if(!t)return;const o=Date.now();return()=>{Date.now()-o<Wt||setTimeout(()=>xe.dispatch(Dt(t)),0)}});let _e=Fe(void 0),i=0;function R(t,o){s()||!e(le).some(w=>w.id===t)||(Pe(_e,{agentId:t,questionMessageId:o,requestId:++i},!0),xe.dispatch(nt(y,t)),xe.dispatch(it(y,t)))}let g=Fe(!1),ee;function E(){s()||(Pe(g,!1),clearTimeout(ee),xe.dispatch(Rt(y)),ee=setTimeout(()=>{Pe(g,!0)},15e3))}st(()=>(s()||E(),()=>clearTimeout(ee)));var d={focusAttention:R,get workspace(){return Z()},set workspace(t){Z(t),J()},get preview(){return s()},set preview(t=!1){s(t),J()},get agent(){return L()},set agent(t){L(t),J()},$set:Ne,$on:(t,o)=>qe(l,t,o)},h=aa(),A=u(h);{var k=t=>{Ze(t,{density:"compact",title:w=>{$e();var q=ke();x(re=>F(q,re),[()=>W.agentOverview_hierarchyGraph_noAgents_title()]),a(w,q)},$$slots:{title:!0}})},te=t=>{var o=fe(),w=D(o);ot(w,()=>L().id,q=>{{let re=$(()=>e(_e)?.agentId===L().id?e(_e):void 0);Tt(q,{get workspace(){return Z()},get agentId(){return L().id},get agentName(){return L().name},autoFocus:!1,get attentionFocusRequest(){return e(re)},isInitialWorkspaceAgent:!1})}}),a(t,o)},N=t=>{var o=ta(),w=u(o);dt(w,{detail:!0}),c(o),a(t,o)},de=t=>{{const o=q=>{$e();var re=ke();x(ye=>F(re,ye),[()=>W.home_detail_unavailable()]),a(q,re)};let w=$(()=>W.home_retry());Pt(t,{density:"compact",get retryLabel(){return e(w)},onRetry:E,message:o,$$slots:{message:!0}})}},ae=t=>{{const o=q=>{$e();var re=ke();x(ye=>F(re,ye),[()=>W.agentOverview_hierarchyGraph_noAgents_title()]),a(q,re)};let w=$(()=>W.home_retry());Ze(t,{density:"compact",get actionLabel(){return e(w)},onAction:E,title:o,$$slots:{title:!0}})}};U(A,t=>{s()?t(k):L()?t(te,1):!I()&&!e(g)?t(N,2):I()?t(ae,-1):t(de,3)})}c(h),x(()=>ze(h,"data-workspace-link-target",Z().id)),a(b,h);var ce=Ge(d);return Y(),ce}var ra=m('<span class="min-w-0 line-clamp-2 [overflow-wrap:anywhere]"> </span> <!>',1),tt=m("<!> <!>",1),sa=m('<div class="shrink-0"><!></div>'),oa=m('<div><!> <span class="home-detail-repository-name truncate"> </span></div>'),at=m("<!><!>",1),na=m("<p> </p>"),ia=m('<!> <span class="min-w-0 truncate text-left"> </span> <!>',1),la=m('<span class="flex min-w-0 items-center gap-2"><!> <span class="truncate"> </span></span>'),da=m('<div class="shrink-0 min-w-0 px-1 py-2" data-home-agent-switcher=""><!></div>'),ca=m('<div class="flex items-center gap-2 px-4 py-2 type-caption text-muted-foreground" role="status"><p> </p> <!></div>'),va=m('<section class="flex h-full min-h-0 min-w-0 flex-col" data-home-detail=""><header class="shrink-0 border-b border-border px-4 py-2"><div class="flex min-w-0 items-center gap-3"><h2 class="-ml-2 min-w-0 flex-1"><!></h2> <!></div> <!> <!></header> <!> <!> <div class="min-h-0 min-w-0 flex-1"><!></div></section>');function ua(b,l){if(new.target)return Oe({component:ua,...b});je(l,!0);const Q=()=>He(_e,"$readRevision$",Y),I=()=>He(Te,"$agents$",Y),O=()=>He(R,"$pickedId$",Y),[Y,Z]=rt();let s=X(l,"workspace",7),L=X(l,"onclose",7),y=X(l,"preview",7,!1),ie=X(l,"showBackToList",7,!0);const be=$(()=>s().title.trim()?s().title:W.workspace_links_untitled_label()),le=Ce(()=>s().id),Te=lt(le),_e=It(le),i=Ce(()=>Q()),R=Mt(le),g=$(()=>ct(I())),ee=Zt(),E=$(()=>ee(e(g),Q()>i)),d=$(()=>ea(e(g),O(),e(E)));function h(r){xe.dispatch(nt(le,r)),xe.dispatch(it(le,r))}const A=$(()=>[s().repositoryOwner,s().repositoryName].filter(Boolean).join("/")||s().repositoryPath);let k=Fe(!1);async function te(){Pe(k,!1);try{await Bt(s().id),Pe(k,!Lt.select(xe.state,s().id))}catch{Pe(k,!0)}}st(()=>{y()||te()});function N(){Ct(s().id)}var de={get workspace(){return s()},set workspace(r){s(r),J()},get onclose(){return L()},set onclose(r){L(r),J()},get preview(){return y()},set preview(r=!1){y(r),J()},get showBackToList(){return ie()},set showBackToList(r=!0){ie(r),J()},$set:Ne,$on:(r,f)=>qe(l,r,f)},ae=va(),ce=u(ae),t=u(ce),o=u(t),w=u(o);P(w,()=>Se,(r,f)=>{f(r,{children:(j,oe)=>{var G=fe(),M=D(G);P(M,()=>We,(ve,z)=>{z(ve,{children:(V,ge)=>{var me=tt(),ne=D(me);{const B=(S,C)=>{let H=()=>(C?.()).props;{let v=$(()=>W.home_open_workspace());Be(S,xt(H,{variant:"ghost",class:"type-title h-auto min-w-0 max-w-full shrink gap-2 justify-start whitespace-normal px-2 py-1 text-left font-medium leading-snug",wrapContent:!1,get"aria-label"(){return e(v)},onclick:N,children:(p,K)=>{var _=ra(),se=D(_),ue=Ae(se,!0),we=n(se,2);Le(we,{get icon(){return Ft},class:"shrink-0 text-muted-foreground",size:"sm"}),x(()=>F(ue,e(be))),a(p,_)},$$slots:{default:!0}}))}};P(ne,()=>Ee,(S,C)=>{C(S,{child:B,$$slots:{child:!0}})})}var he=n(ne,2);P(he,()=>Me,(B,S)=>{S(B,{children:(C,H)=>{$e();var v=ke();x(()=>F(v,e(be))),a(C,v)},$$slots:{default:!0}})}),a(V,me)},$$slots:{default:!0}})}),a(j,G)},$$slots:{default:!0}})}),c(o);var q=n(o,2);{var re=r=>{var f=sa(),j=u(f);{let oe=$(()=>W.home_close_preview()),G=$(()=>W.home_close_preview());Be(j,{variant:"ghost",size:"icon-sm",get"aria-label"(){return e(oe)},get tooltip(){return e(G)},get onclick(){return L()},children:(M,ve)=>{Le(M,{get icon(){return Ot}})},$$slots:{default:!0}})}c(f),a(r,f)};U(q,r=>{ie()&&r(re)})}c(t);var ye=n(t,2);{var ut=r=>{var f=fe(),j=D(f);P(j,()=>Se,(oe,G)=>{G(oe,{children:(M,ve)=>{var z=fe(),V=D(z);P(V,()=>We,(ge,me)=>{me(ge,{children:(ne,he)=>{var B=at(),S=D(B);{const H=(v,p)=>{let K=()=>(p?.()).props;var _=oa();Ye(_,()=>({...K(),class:"mb-1 flex min-w-0 max-w-[min(100%,16rem)] items-center gap-1.5 type-caption text-muted-foreground","data-home-detail-repository":!0,"aria-label":e(A)}));var se=u(_);{var ue=pe=>{Et(pe,{get identity(){return s().repositoryOwner},size:16,class:"shrink-0 rounded-sm"})},we=pe=>{Le(pe,{get icon(){return qt}})};U(se,pe=>{s().repositoryOwner?pe(ue):pe(we,-1)})}var Xe=n(se,2),De=Ae(Xe,!0);c(_),x(()=>F(De,e(A))),a(v,_)};P(S,()=>Ee,(v,p)=>{p(v,{child:H,$$slots:{child:!0}})})}var C=n(S);P(C,()=>Me,(H,v)=>{v(H,{children:(p,K)=>{$e();var _=ke();x(()=>F(_,e(A))),a(p,_)},$$slots:{default:!0}})}),a(ne,B)},$$slots:{default:!0}})}),a(M,z)},$$slots:{default:!0}})}),a(r,f)};U(ye,r=>{e(A)&&r(ut)})}var pt=n(ye,2);{var mt=r=>{var f=fe(),j=D(f);P(j,()=>Se,(oe,G)=>{G(oe,{children:(M,ve)=>{var z=fe(),V=D(z);P(V,()=>We,(ge,me)=>{me(ge,{children:(ne,he)=>{var B=at(),S=D(B);{const H=(v,p)=>{let K=()=>(p?.()).props;var _=na();Ye(_,()=>({...K(),class:"type-caption line-clamp-2 break-words leading-snug text-muted-foreground"}));var se=Ae(_,!0);x(()=>F(se,s().statusMessage)),a(v,_)};P(S,()=>Ee,(v,p)=>{p(v,{child:H,$$slots:{child:!0}})})}var C=n(S);P(C,()=>Me,(H,v)=>{v(H,{children:(p,K)=>{$e();var _=ke();x(()=>F(_,s().statusMessage)),a(p,_)},$$slots:{default:!0}})}),a(ne,B)},$$slots:{default:!0}})}),a(M,z)},$$slots:{default:!0}})}),a(r,f)};U(pt,r=>{s().statusMessage&&r(mt)})}c(ce);var Ve=n(ce,2);{var ft=r=>{var f=da(),j=u(f);{let oe=$(()=>e(d)?.id??"");P(j,()=>Ie.Root,(G,M)=>{M(G,{get value(){return e(oe)},onchange:ve=>{const z=e(g).find(V=>V.id===ve);z&&h(z.id)},children:(ve,z)=>{var V=tt(),ge=D(V);{let ne=$(()=>W.home_agents());P(ge,()=>Ie.Trigger,(he,B)=>{B(he,{variant:"ghost",class:"h-8 w-fit max-w-full justify-start",get"aria-label"(){return e(ne)},children:(S,C)=>{var H=ia(),v=D(H);{var p=ue=>{{let we=$(()=>e(d).metadata?.specialist??e(d).agentMetadata?.specialist);et(ue,{get agentId(){return e(d).id},get specialist(){return e(we)},variant:"emphasized"})}};U(v,ue=>{e(d)&&ue(p)})}var K=n(v,2),_=Ae(K,!0),se=n(K,2);Le(se,{get icon(){return Nt},class:"shrink-0 text-muted-foreground"}),x(()=>F(_,e(d)?.name)),a(S,H)},$$slots:{default:!0}})})}var me=n(ge,2);P(me,()=>Ie.Content,(ne,he)=>{he(ne,{portal:!0,children:(B,S)=>{var C=fe(),H=D(C);Re(H,17,()=>e(g),v=>v.id,(v,p)=>{var K=fe(),_=D(K);P(_,()=>Ie.Item,(se,ue)=>{ue(se,{get value(){return e(p).id},get label(){return e(p).name},children:(we,Xe)=>{var De=la(),pe=u(De);{let kt=$(()=>e(p).metadata?.specialist??e(p).agentMetadata?.specialist);et(pe,{get agentId(){return e(p).id},get specialist(){return e(kt)},variant:"emphasized"})}var wt=n(pe,2),$t=Ae(wt,!0);c(De),x(()=>F($t,e(p).name)),a(we,De)},$$slots:{default:!0}})}),a(v,K)}),a(B,C)},$$slots:{default:!0}})}),a(ve,V)},$$slots:{default:!0}})})}c(f),a(r,f)};U(Ve,r=>{e(g).length&&r(ft)})}var Ke=n(Ve,2);{var _t=r=>{var f=ca(),j=u(f),oe=Ae(j,!0),G=n(j,2);Be(G,{variant:"outline",size:"sm",onclick:te,children:(M,ve)=>{$e();var z=ke();x(V=>F(z,V),[()=>W.home_retry()]),a(M,z)},$$slots:{default:!0}}),c(f),x(M=>F(oe,M),[()=>W.home_detail_unavailable()]),a(r,f)};U(Ke,r=>{e(k)&&r(_t)})}var Ue=n(Ke,2),gt=u(Ue);ot(gt,()=>s().id,r=>{vt(r,{get workspace(){return s()},get preview(){return y()},get agent(){return e(d)}})}),c(Ue),c(ae),x(r=>ze(ae,"aria-label",r),[()=>W.home_workspace_details()]),a(b,ae);var ht=Ge(de);return Z(),ht}export{dt as H,ua as a};
|
|
1
|
+
import{t as Oe,bq as X,a_ as U,bo as W,by as Ne,b as qe,bu as He,bs as rt,bt as xt}from"./rfbsWJY8.js";import{bs as je,bj as bt,a5 as u,bA as c,b_ as x,W as a,bn as Ge,aA as J,ay as D,bS as n,aD as e,aB as m,c9 as $,c5 as Ce,ca as yt,bk as st,bH as Pe,bV as Fe,a7 as fe,be as $e,b$ as ke,bO as F,bl as Ae}from"./B8o4lNgr.js";import{D as ot}from"./D5WwA0O_.js";import{s as ze,k as Je,d as Qe,h as Re,c as Ye}from"./Z4aRP2F9.js";import{c as P}from"./DcUVqsa0.js";import{P as Se,e as We,f as Ee,d as Me}from"./C95Ch7tj.js";import{N as At,w as T,E as Ze,g as Pt}from"./D0KbJAaw.js";import{f as Be}from"./_hjrl4Qq.js";import{C as Tt}from"./D-P-dlJm.js";import"./CQV_d_bF.js";import{Hi as xe,ff as Dt,Dq as nt,BT as it,o$ as Rt}from"./CM_x_DK5.js";import{aN as lt,aK as Ht,aL as It,dm as Lt}from"./BtwWpYbv.js";import{d as zt,r as St}from"./QsqAizRM.js";import{M as Wt}from"./4NAJ4wU0.js";import{k as Et}from"./DKYgLLV7.js";import{e as et}from"./Bu9lZqPK.js";import{F as Mt,e as Bt}from"./DYUcU12p.js";import{o as Ct}from"./Dh58itL6.js";import{S as Ie}from"./D1yEb1Sd.js";import{F as Le,a1 as Ft,cV as Ot,at as Nt,bi as qt}from"./DPDCKuA3.js";var jt=m('<div class="space-y-3"><!> <!></div>'),Gt=m('<div class="space-y-3"><!> <!></div> <!>',1),Vt=m('<div class="space-y-3 rounded-xl border border-border p-4 shadow-xs"><div class="flex items-center gap-3"><!><!></div> <!> <div class="flex items-center justify-between pt-1"><!><!></div></div>'),Kt=m('<div class="min-w-0 space-y-3"><div class="flex h-10 items-center px-2"><!></div> <!></div>'),Ut=m('<div class="grid grid-cols-[repeat(auto-fit,minmax(min(100%,10rem),1fr))] gap-3 px-1"></div>'),Xt=m('<div class="flex h-10 items-center px-3"><!></div>'),Jt=m("<div><!> <!> <!> <!></div>"),Qt=m("<!> <!>",1),Yt=m('<div role="status" class="min-h-0 min-w-0 flex-1 overflow-hidden svelte-kmeefs" data-home-loading=""><div aria-hidden="true"><!></div></div>');function dt(b,l){if(new.target)return Oe({component:dt,...b});je(l,!0);const Q=At();bt(Q.cleanup);let I=X(l,"detail",7,!1),O=X(l,"count",7,5),Y=X(l,"view",7,"list"),Z=X(l,"grouped",7,!1),s=X(l,"rows",7,"workspace");var L={get detail(){return I()},set detail(i=!1){I(i),J()},get count(){return O()},set count(i=5){O(i),J()},get view(){return Y()},set view(i="list"){Y(i),J()},get grouped(){return Z()},set grouped(i=!1){Z(i),J()},get rows(){return s()},set rows(i="workspace"){s(i),J()},$set:Ne,$on:(i,R)=>qe(l,i,R)},y=Yt(),ie=u(y),be=u(ie);{var le=i=>{var R=Gt(),g=D(R),ee=u(g);T(ee,{class:"h-6 w-4/5"});var E=n(ee,2);T(E,{class:"h-4 w-1/2"}),c(g);var d=n(g,2);Re(d,16,()=>[0,1],h=>h,(h,A)=>{var k=jt(),te=u(k);T(te,{class:"h-3 w-full"});var N=n(te,2);T(N,{class:"h-3 w-5/6"}),c(k),a(h,k)}),a(i,R)},Te=i=>{var R=Ut();Re(R,20,()=>[0,1,2],g=>g,(g,ee)=>{var E=Kt(),d=u(E),h=u(d);T(h,{class:"h-3 w-20"}),c(d);var A=n(d,2);Re(A,16,()=>[0,1,2],k=>k,(k,te)=>{var N=Vt(),de=u(N),ae=u(de);T(ae,{class:"h-4 flex-1"});var ce=n(ae);T(ce,{class:"size-3 rounded-full"}),c(de);var t=n(de,2);T(t,{class:"h-3 w-full"});var o=n(t,2),w=u(o);T(w,{class:"size-4 rounded-sm"});var q=n(w);T(q,{class:"h-3 w-6"}),c(o),c(N),a(k,N)}),c(E),a(g,E)}),c(R),a(i,R)},_e=i=>{var R=Qt(),g=D(R);{var ee=d=>{var h=Xt(),A=u(h);T(A,{class:"h-3 w-20"}),c(h),a(d,h)};U(g,d=>{Z()&&d(ee)})}var E=n(g,2);Re(E,16,()=>Array.from({length:O()},(d,h)=>h),d=>d,(d,h)=>{var A=Jt(),k=u(A);T(k,{class:"size-4 shrink-0 rounded-sm"});var te=n(k,2);T(te,{class:"h-4 min-w-0 flex-1"});var N=n(te,2);{var de=o=>{T(o,{class:"size-3 shrink-0 rounded-full"})},ae=o=>{T(o,{class:"size-5 shrink-0 rounded-full"})};U(N,o=>{s()==="workspace"?o(de):s()==="integration"&&o(ae,1)})}var ce=n(N,2);{var t=o=>{{let w=$(()=>s()==="workspace"?"h-3 w-8 shrink-0":"h-3 w-6 shrink-0");T(o,{get class(){return e(w)}})}};U(ce,o=>{s()!=="compact"&&o(t)})}c(A),x(()=>Je(A,1,Qe(s()==="compact"?"flex min-h-6 items-center gap-2 py-1":`flex h-12 items-center gap-3 border-b border-border ${s()==="integration"?"px-2":"px-3"}`))),a(d,A)}),a(i,R)};U(be,i=>{I()?i(le):Y()==="board"?i(Te,1):i(_e,-1)})}return c(ie),c(y),x(i=>{ze(y,"aria-label",i),ze(y,"data-reduced",Q.current),Je(ie,1,Qe(I()?"space-y-6 py-3":s()==="compact"?"":"px-5 pb-4"))},[()=>W.home_integrations_loading()]),a(b,y),Ge(L)}function ct(b){return b.filter(zt)}function Zt(){let b=null;return(l,Q)=>{const I=b?l.find(Y=>Y.id===b):void 0;if(I)return I;const O=St(l);return b=Q&&O?String(O.id):null,O}}function ea(b,l,Q){return l&&b.find(I=>I.id===l)||Q}var ta=m('<div class="p-4"><!></div>'),aa=m('<div class="flex h-full min-h-0 min-w-0 flex-col" data-home-workspace-chat=""><!></div>');function vt(b,l){if(new.target)return Oe({component:vt,...b});je(l,!0);const Q=()=>He(ie,"$agents$",O),I=()=>He(be,"$loaded$",O),[O,Y]=rt();let Z=X(l,"workspace",7),s=X(l,"preview",7,!1),L=X(l,"agent",7);const y=Ce(()=>Z().id),ie=lt(y),be=Ht(y),le=$(()=>ct(Q())),Te=$(()=>s()?void 0:L()?.id);yt(()=>{const t=e(Te);if(!t)return;const o=Date.now();return()=>{Date.now()-o<Wt||setTimeout(()=>xe.dispatch(Dt(t)),0)}});let _e=Fe(void 0),i=0;function R(t,o){s()||!e(le).some(w=>w.id===t)||(Pe(_e,{agentId:t,questionMessageId:o,requestId:++i},!0),xe.dispatch(nt(y,t)),xe.dispatch(it(y,t)))}let g=Fe(!1),ee;function E(){s()||(Pe(g,!1),clearTimeout(ee),xe.dispatch(Rt(y)),ee=setTimeout(()=>{Pe(g,!0)},15e3))}st(()=>(s()||E(),()=>clearTimeout(ee)));var d={focusAttention:R,get workspace(){return Z()},set workspace(t){Z(t),J()},get preview(){return s()},set preview(t=!1){s(t),J()},get agent(){return L()},set agent(t){L(t),J()},$set:Ne,$on:(t,o)=>qe(l,t,o)},h=aa(),A=u(h);{var k=t=>{Ze(t,{density:"compact",title:w=>{$e();var q=ke();x(re=>F(q,re),[()=>W.agentOverview_hierarchyGraph_noAgents_title()]),a(w,q)},$$slots:{title:!0}})},te=t=>{var o=fe(),w=D(o);ot(w,()=>L().id,q=>{{let re=$(()=>e(_e)?.agentId===L().id?e(_e):void 0);Tt(q,{get workspace(){return Z()},get agentId(){return L().id},get agentName(){return L().name},autoFocus:!1,get attentionFocusRequest(){return e(re)},isInitialWorkspaceAgent:!1})}}),a(t,o)},N=t=>{var o=ta(),w=u(o);dt(w,{detail:!0}),c(o),a(t,o)},de=t=>{{const o=q=>{$e();var re=ke();x(ye=>F(re,ye),[()=>W.home_detail_unavailable()]),a(q,re)};let w=$(()=>W.home_retry());Pt(t,{density:"compact",get retryLabel(){return e(w)},onRetry:E,message:o,$$slots:{message:!0}})}},ae=t=>{{const o=q=>{$e();var re=ke();x(ye=>F(re,ye),[()=>W.agentOverview_hierarchyGraph_noAgents_title()]),a(q,re)};let w=$(()=>W.home_retry());Ze(t,{density:"compact",get actionLabel(){return e(w)},onAction:E,title:o,$$slots:{title:!0}})}};U(A,t=>{s()?t(k):L()?t(te,1):!I()&&!e(g)?t(N,2):I()?t(ae,-1):t(de,3)})}c(h),x(()=>ze(h,"data-workspace-link-target",Z().id)),a(b,h);var ce=Ge(d);return Y(),ce}var ra=m('<span class="min-w-0 line-clamp-2 [overflow-wrap:anywhere]"> </span> <!>',1),tt=m("<!> <!>",1),sa=m('<div class="shrink-0"><!></div>'),oa=m('<div><!> <span class="home-detail-repository-name truncate"> </span></div>'),at=m("<!><!>",1),na=m("<p> </p>"),ia=m('<!> <span class="min-w-0 truncate text-left"> </span> <!>',1),la=m('<span class="flex min-w-0 items-center gap-2"><!> <span class="truncate"> </span></span>'),da=m('<div class="shrink-0 min-w-0 px-1 py-2" data-home-agent-switcher=""><!></div>'),ca=m('<div class="flex items-center gap-2 px-4 py-2 type-caption text-muted-foreground" role="status"><p> </p> <!></div>'),va=m('<section class="flex h-full min-h-0 min-w-0 flex-col" data-home-detail=""><header class="shrink-0 border-b border-border px-4 py-2"><div class="flex min-w-0 items-center gap-3"><h2 class="-ml-2 min-w-0 flex-1"><!></h2> <!></div> <!> <!></header> <!> <!> <div class="min-h-0 min-w-0 flex-1"><!></div></section>');function ua(b,l){if(new.target)return Oe({component:ua,...b});je(l,!0);const Q=()=>He(_e,"$readRevision$",Y),I=()=>He(Te,"$agents$",Y),O=()=>He(R,"$pickedId$",Y),[Y,Z]=rt();let s=X(l,"workspace",7),L=X(l,"onclose",7),y=X(l,"preview",7,!1),ie=X(l,"showBackToList",7,!0);const be=$(()=>s().title.trim()?s().title:W.workspace_links_untitled_label()),le=Ce(()=>s().id),Te=lt(le),_e=It(le),i=Ce(()=>Q()),R=Mt(le),g=$(()=>ct(I())),ee=Zt(),E=$(()=>ee(e(g),Q()>i)),d=$(()=>ea(e(g),O(),e(E)));function h(r){xe.dispatch(nt(le,r)),xe.dispatch(it(le,r))}const A=$(()=>[s().repositoryOwner,s().repositoryName].filter(Boolean).join("/")||s().repositoryPath);let k=Fe(!1);async function te(){Pe(k,!1);try{await Bt(s().id),Pe(k,!Lt.select(xe.state,s().id))}catch{Pe(k,!0)}}st(()=>{y()||te()});function N(){Ct(s().id)}var de={get workspace(){return s()},set workspace(r){s(r),J()},get onclose(){return L()},set onclose(r){L(r),J()},get preview(){return y()},set preview(r=!1){y(r),J()},get showBackToList(){return ie()},set showBackToList(r=!0){ie(r),J()},$set:Ne,$on:(r,f)=>qe(l,r,f)},ae=va(),ce=u(ae),t=u(ce),o=u(t),w=u(o);P(w,()=>Se,(r,f)=>{f(r,{children:(j,oe)=>{var G=fe(),M=D(G);P(M,()=>We,(ve,z)=>{z(ve,{children:(V,ge)=>{var me=tt(),ne=D(me);{const B=(S,C)=>{let H=()=>(C?.()).props;{let v=$(()=>W.home_open_workspace());Be(S,xt(H,{variant:"ghost",class:"type-title h-auto min-w-0 max-w-full shrink gap-2 justify-start whitespace-normal px-2 py-1 text-left font-medium leading-snug",wrapContent:!1,get"aria-label"(){return e(v)},onclick:N,children:(p,K)=>{var _=ra(),se=D(_),ue=Ae(se,!0),we=n(se,2);Le(we,{get icon(){return Ft},class:"shrink-0 text-muted-foreground",size:"sm"}),x(()=>F(ue,e(be))),a(p,_)},$$slots:{default:!0}}))}};P(ne,()=>Ee,(S,C)=>{C(S,{child:B,$$slots:{child:!0}})})}var he=n(ne,2);P(he,()=>Me,(B,S)=>{S(B,{children:(C,H)=>{$e();var v=ke();x(()=>F(v,e(be))),a(C,v)},$$slots:{default:!0}})}),a(V,me)},$$slots:{default:!0}})}),a(j,G)},$$slots:{default:!0}})}),c(o);var q=n(o,2);{var re=r=>{var f=sa(),j=u(f);{let oe=$(()=>W.home_close_preview()),G=$(()=>W.home_close_preview());Be(j,{variant:"ghost",size:"icon-sm",get"aria-label"(){return e(oe)},get tooltip(){return e(G)},get onclick(){return L()},children:(M,ve)=>{Le(M,{get icon(){return Ot}})},$$slots:{default:!0}})}c(f),a(r,f)};U(q,r=>{ie()&&r(re)})}c(t);var ye=n(t,2);{var ut=r=>{var f=fe(),j=D(f);P(j,()=>Se,(oe,G)=>{G(oe,{children:(M,ve)=>{var z=fe(),V=D(z);P(V,()=>We,(ge,me)=>{me(ge,{children:(ne,he)=>{var B=at(),S=D(B);{const H=(v,p)=>{let K=()=>(p?.()).props;var _=oa();Ye(_,()=>({...K(),class:"mb-1 flex min-w-0 max-w-[min(100%,16rem)] items-center gap-1.5 type-caption text-muted-foreground","data-home-detail-repository":!0,"aria-label":e(A)}));var se=u(_);{var ue=pe=>{Et(pe,{get identity(){return s().repositoryOwner},size:16,class:"shrink-0 rounded-sm"})},we=pe=>{Le(pe,{get icon(){return qt}})};U(se,pe=>{s().repositoryOwner?pe(ue):pe(we,-1)})}var Xe=n(se,2),De=Ae(Xe,!0);c(_),x(()=>F(De,e(A))),a(v,_)};P(S,()=>Ee,(v,p)=>{p(v,{child:H,$$slots:{child:!0}})})}var C=n(S);P(C,()=>Me,(H,v)=>{v(H,{children:(p,K)=>{$e();var _=ke();x(()=>F(_,e(A))),a(p,_)},$$slots:{default:!0}})}),a(ne,B)},$$slots:{default:!0}})}),a(M,z)},$$slots:{default:!0}})}),a(r,f)};U(ye,r=>{e(A)&&r(ut)})}var pt=n(ye,2);{var mt=r=>{var f=fe(),j=D(f);P(j,()=>Se,(oe,G)=>{G(oe,{children:(M,ve)=>{var z=fe(),V=D(z);P(V,()=>We,(ge,me)=>{me(ge,{children:(ne,he)=>{var B=at(),S=D(B);{const H=(v,p)=>{let K=()=>(p?.()).props;var _=na();Ye(_,()=>({...K(),class:"type-caption line-clamp-2 break-words leading-snug text-muted-foreground"}));var se=Ae(_,!0);x(()=>F(se,s().statusMessage)),a(v,_)};P(S,()=>Ee,(v,p)=>{p(v,{child:H,$$slots:{child:!0}})})}var C=n(S);P(C,()=>Me,(H,v)=>{v(H,{children:(p,K)=>{$e();var _=ke();x(()=>F(_,s().statusMessage)),a(p,_)},$$slots:{default:!0}})}),a(ne,B)},$$slots:{default:!0}})}),a(M,z)},$$slots:{default:!0}})}),a(r,f)};U(pt,r=>{s().statusMessage&&r(mt)})}c(ce);var Ve=n(ce,2);{var ft=r=>{var f=da(),j=u(f);{let oe=$(()=>e(d)?.id??"");P(j,()=>Ie.Root,(G,M)=>{M(G,{get value(){return e(oe)},onchange:ve=>{const z=e(g).find(V=>V.id===ve);z&&h(z.id)},children:(ve,z)=>{var V=tt(),ge=D(V);{let ne=$(()=>W.home_agents());P(ge,()=>Ie.Trigger,(he,B)=>{B(he,{variant:"ghost",class:"h-8 w-fit max-w-full justify-start",get"aria-label"(){return e(ne)},children:(S,C)=>{var H=ia(),v=D(H);{var p=ue=>{{let we=$(()=>e(d).metadata?.specialist??e(d).agentMetadata?.specialist);et(ue,{get agentId(){return e(d).id},get specialist(){return e(we)},variant:"emphasized"})}};U(v,ue=>{e(d)&&ue(p)})}var K=n(v,2),_=Ae(K,!0),se=n(K,2);Le(se,{get icon(){return Nt},class:"shrink-0 text-muted-foreground"}),x(()=>F(_,e(d)?.name)),a(S,H)},$$slots:{default:!0}})})}var me=n(ge,2);P(me,()=>Ie.Content,(ne,he)=>{he(ne,{portal:!0,children:(B,S)=>{var C=fe(),H=D(C);Re(H,17,()=>e(g),v=>v.id,(v,p)=>{var K=fe(),_=D(K);P(_,()=>Ie.Item,(se,ue)=>{ue(se,{get value(){return e(p).id},get label(){return e(p).name},children:(we,Xe)=>{var De=la(),pe=u(De);{let kt=$(()=>e(p).metadata?.specialist??e(p).agentMetadata?.specialist);et(pe,{get agentId(){return e(p).id},get specialist(){return e(kt)},variant:"emphasized"})}var wt=n(pe,2),$t=Ae(wt,!0);c(De),x(()=>F($t,e(p).name)),a(we,De)},$$slots:{default:!0}})}),a(v,K)}),a(B,C)},$$slots:{default:!0}})}),a(ve,V)},$$slots:{default:!0}})})}c(f),a(r,f)};U(Ve,r=>{e(g).length&&r(ft)})}var Ke=n(Ve,2);{var _t=r=>{var f=ca(),j=u(f),oe=Ae(j,!0),G=n(j,2);Be(G,{variant:"outline",size:"sm",onclick:te,children:(M,ve)=>{$e();var z=ke();x(V=>F(z,V),[()=>W.home_retry()]),a(M,z)},$$slots:{default:!0}}),c(f),x(M=>F(oe,M),[()=>W.home_detail_unavailable()]),a(r,f)};U(Ke,r=>{e(k)&&r(_t)})}var Ue=n(Ke,2),gt=u(Ue);ot(gt,()=>s().id,r=>{vt(r,{get workspace(){return s()},get preview(){return y()},get agent(){return e(d)}})}),c(Ue),c(ae),x(r=>ze(ae,"aria-label",r),[()=>W.home_workspace_details()]),a(b,ae);var ht=Ge(de);return Z(),ht}export{dt as H,ua as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a8 as j,bc as p,a2 as w,bd as k,be as q}from"./
|
|
1
|
+
import{a8 as j,bc as p,a2 as w,bd as k,be as q}from"./BC_OV_w3.js";import{i as D}from"./Gi6I4Gst.js";import{e as g,b as F,a as z,f as B}from"./CrowFXzY.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as p,ad as C,aE as q,M as W,k as G,U,r as j,aD as K,N as J}from"./
|
|
1
|
+
import{a as p,ad as C,aE as q,M as W,k as G,U,r as j,aD as K,N as J}from"./C5VEh5uc.js";import{g as Y}from"./BC_OV_w3.js";var M="",A="",O="",D=[],b=new Map,v=p(e=>K(e,J()),"sanitizeText"),$=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map($)};case"choice":return{...e,alternatives:e.alternatives.map($)};case"optional":return{...e,element:$(e.element)};case"repetition":return{...e,element:$(e.element),separator:e.separator?$(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),Q=p(()=>{M="",A="",O="",D.length=0,b.clear(),G(),C.debug("[Railroad] Database cleared")},"clear"),P=p(e=>{M=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),L=p(()=>M,"getTitle"),Z=p(e=>{const i={...e,name:v(e.name),definition:$(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),V=p(()=>D,"getRules"),ee=p(e=>b.get(e),"getRule"),te=p(e=>{A=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),re=p(()=>A,"getAccTitle"),ie=p(e=>{O=v(e).replace(/\n\s+/g,`
|
|
2
2
|
`),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ae=p(()=>O,"getAccDescription"),ne=P,oe=L,le={clear:Q,setTitle:P,getTitle:L,addRule:Z,getRules:V,getRule:ee,setAccTitle:te,getAccTitle:re,setAccDescription:ie,getAccDescription:ae,setDiagramTitle:ne,getDiagramTitle:oe},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},se=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,de=/^[\w "',.-]+$/,ce=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),I=p(e=>e?Object.keys(e).every(i=>i==="railroad"||ce.has(i)):!1,"isRailroadStyleOptions"),me=p(e=>e?"railroad"in e&&e.railroad?e.railroad:I(e)?e:{}:{},"extractRailroadOverrides"),he=p(e=>{if(!e||I(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return de.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),pe=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ue=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=pe(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=W(),n={...U(),...i.themeVariables??{},...he(e)},a=ue(n),t={...i.railroad??{},...me(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),we=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${i};
|