@intent-hq/web 2.284.0 → 2.285.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{BLEfessf.js → -KtznSS-.js} +1 -1
- package/web/app/immutable/chunks/{BfCf1CX7.js → 1lVCCXL6.js} +1 -1
- package/web/app/immutable/chunks/{rL78ODLZ.js → 2eBUyHOS.js} +1 -1
- package/web/app/immutable/chunks/{D-aPtTCv.js → 6ASkEKEx.js} +1 -1
- package/web/app/immutable/chunks/{C6Lk-C_n.js → 70g8kmTR.js} +1 -1
- package/web/app/immutable/chunks/{CclADFoZ.js → 9s6R6NFl.js} +1 -1
- package/web/app/immutable/chunks/{BghJZEqX.js → ASxUuKIZ.js} +1 -1
- package/web/app/immutable/chunks/{BYvXj8cv.js → B0UymEvm.js} +1 -1
- package/web/app/immutable/chunks/{BoffG-0C.js → B0a31Ljt.js} +1 -1
- package/web/app/immutable/chunks/{gNzz3jGE.js → B4GCMjY3.js} +1 -1
- package/web/app/immutable/chunks/B4kKZm1B.js +1 -0
- package/web/app/immutable/chunks/{Dkj8SIBR.js → B91hcydD.js} +1 -1
- package/web/app/immutable/chunks/{Bj2uvmt-.js → B9DD1rvd.js} +1 -1
- package/web/app/immutable/chunks/{B1s7HAuZ.js → BA2m5W5p.js} +1 -1
- package/web/app/immutable/chunks/{CajYOO74.js → BB-v27nE.js} +1 -1
- package/web/app/immutable/chunks/{CeMTgCB3.js → BDnf9UFd.js} +1 -1
- package/web/app/immutable/chunks/{DyQA18KQ.js → BEu9jjb7.js} +1 -1
- package/web/app/immutable/chunks/{Byp8PswU.js → BFDtkLj3.js} +1 -1
- package/web/app/immutable/chunks/{C-AxUu93.js → BFlCxloC.js} +1 -1
- package/web/app/immutable/chunks/{DR4RT4VO.js → BLT4lwJH.js} +1 -1
- package/web/app/immutable/chunks/{CyO8AnLs.js → BMCIczJY.js} +1 -1
- package/web/app/immutable/chunks/{BcemBG1g.js → BMqkZHSQ.js} +4 -4
- package/web/app/immutable/chunks/{DcoQTetB.js → BOxsG-23.js} +1 -1
- package/web/app/immutable/chunks/{D2hiI0dA.js → BRaDvZhu.js} +1 -1
- package/web/app/immutable/chunks/{BUtQhKox.js → BRiWAWWR.js} +1 -1
- package/web/app/immutable/chunks/{vICHfDZm.js → BRrnGZdq.js} +1 -1
- package/web/app/immutable/chunks/{8n4ougjP.js → BRsvqYQJ.js} +1 -1
- package/web/app/immutable/chunks/{Bj6-QOR3.js → BW5WMYMF.js} +1 -1
- package/web/app/immutable/chunks/{DZ-8K7hK.js → BYD9CrbJ.js} +1 -1
- package/web/app/immutable/chunks/{CEkEURUB.js → BerKnKvV.js} +1 -1
- package/web/app/immutable/chunks/{J2ZKQ-lu.js → BfCM8g6D.js} +1 -1
- package/web/app/immutable/chunks/{BFDD1pyQ.js → Bi5G5jdW.js} +1 -1
- package/web/app/immutable/chunks/{BSLrzoVf.js → BijxVENA.js} +1 -1
- package/web/app/immutable/chunks/{JqZ92YB_.js → BioKfdhs.js} +1 -1
- package/web/app/immutable/chunks/{5ZpW5rVB.js → Bj2REgAl.js} +1 -1
- package/web/app/immutable/chunks/{5BmKVYc1.js → Bj2YjLqH.js} +4 -4
- package/web/app/immutable/chunks/{B8xgoeqo.js → BkTES_s_.js} +1 -1
- package/web/app/immutable/chunks/{oPjZ8e3L.js → BlGCnZqu.js} +1 -1
- package/web/app/immutable/chunks/{CBF5TBJQ.js → BoAgG62K.js} +1 -1
- package/web/app/immutable/chunks/{cesw6DqW.js → Bpei5bK8.js} +1 -1
- package/web/app/immutable/chunks/{CqyYuyXE.js → BqEq2gS8.js} +1 -1
- package/web/app/immutable/chunks/{Bir-_mB8.js → BrPrpju0.js} +1 -1
- package/web/app/immutable/chunks/{DbdgMxO8.js → Btdv9Hrh.js} +1 -1
- package/web/app/immutable/chunks/{C1FIrZNw.js → BuKPgt_Y.js} +1 -1
- package/web/app/immutable/chunks/{CLDGr3DL.js → BuRX-tbO.js} +1 -1
- package/web/app/immutable/chunks/{BQqtq_EY.js → Butq4Y1l.js} +4 -4
- package/web/app/immutable/chunks/{CoEKpjkL.js → BwcCzTcz.js} +1 -1
- package/web/app/immutable/chunks/{DxyRwm0L.js → C-PJ15bY.js} +1 -1
- package/web/app/immutable/chunks/{D0GCGQZA.js → C4eeWJf-.js} +1 -1
- package/web/app/immutable/chunks/{lKWYFdqV.js → C4mRaa7L.js} +1 -1
- package/web/app/immutable/chunks/{BOV2-YtX.js → C5vTcsb2.js} +1 -1
- package/web/app/immutable/chunks/{Dwola7mR.js → C64d2sYd.js} +1 -1
- package/web/app/immutable/chunks/{D9ZfYqMq.js → C7A26Vlu.js} +1 -1
- package/web/app/immutable/chunks/{kjKGIJZ6.js → C8BEXIPc.js} +1 -1
- package/web/app/immutable/chunks/{DWW4w6Jk.js → C8xd2WWY.js} +1 -1
- package/web/app/immutable/chunks/{CWMWrTe0.js → C9o24MoC.js} +1 -1
- package/web/app/immutable/chunks/{7IZupueL.js → CAkMXI-6.js} +3 -3
- package/web/app/immutable/chunks/{LoyMyTg_.js → CDnN0LSW.js} +1 -1
- package/web/app/immutable/chunks/{Ri_Gwy-5.js → CEQqb3fD.js} +1 -1
- package/web/app/immutable/chunks/{DPd_IJJ7.js → CFzJYgT5.js} +1 -1
- package/web/app/immutable/chunks/{DSJT83nX.js → CHXt_ftw.js} +1 -1
- package/web/app/immutable/chunks/{RAzXpC6i.js → CHaUiotE.js} +1 -1
- package/web/app/immutable/chunks/{BIkNHTNp.js → CHjSilfW.js} +1 -1
- package/web/app/immutable/chunks/{CLCaT9pi.js → CJQrM64N.js} +3 -3
- package/web/app/immutable/chunks/{U9YbfUz9.js → CMO5zsjQ.js} +1 -1
- package/web/app/immutable/chunks/{BCkgwkHF.js → CMt5MqSJ.js} +1 -1
- package/web/app/immutable/chunks/{580ALcE7.js → COL0pyet.js} +1 -1
- package/web/app/immutable/chunks/{D_mcoMIN.js → CQ7Jnj9E.js} +1 -1
- package/web/app/immutable/chunks/{DoBcYmem.js → CRhgbDg2.js} +5 -5
- package/web/app/immutable/chunks/{DDi4fKeR.js → CTozw_6a.js} +1 -1
- package/web/app/immutable/chunks/{--3ZEJ9J.js → CTwzQE4y.js} +1 -1
- package/web/app/immutable/chunks/{Dk3JYfn4.js → CULilvBT.js} +1 -1
- package/web/app/immutable/chunks/{BnZq-I73.js → CV2PaujE.js} +2 -2
- package/web/app/immutable/chunks/{bin8Us0N.js → CVUNrf_6.js} +1 -1
- package/web/app/immutable/chunks/{GJVVHDkb.js → CWgAcLvx.js} +1 -1
- package/web/app/immutable/chunks/{CTthB0JK.js → CYElNz1m.js} +1 -1
- package/web/app/immutable/chunks/{CoQLGQdj.js → CZUDc12W.js} +1 -1
- package/web/app/immutable/chunks/{Bmnp4Cni.js → CdT170lG.js} +6 -6
- package/web/app/immutable/chunks/{B96HYSUr.js → Ceyasj46.js} +1 -1
- package/web/app/immutable/chunks/{IrWlayTZ.js → CfAqizJ3.js} +1 -1
- package/web/app/immutable/chunks/{D8GxmJaV.js → CfYh5raT.js} +1 -1
- package/web/app/immutable/chunks/{DkJafW99.js → CgWJ7tKh.js} +1 -1
- package/web/app/immutable/chunks/{CwYn_cZy.js → ChDcu7sM.js} +1 -1
- package/web/app/immutable/chunks/{C-tRLOED.js → ChmO5DTP.js} +1 -1
- package/web/app/immutable/chunks/{CXruy7R4.js → Cj_Tm5wU.js} +1 -1
- package/web/app/immutable/chunks/{BXwgWEmz.js → CkNc-1DL.js} +1 -1
- package/web/app/immutable/chunks/{DpiQDkOO.js → CkqPtSf5.js} +1 -1
- package/web/app/immutable/chunks/{Cci8BWX_.js → ClNs6jou.js} +1 -1
- package/web/app/immutable/chunks/{qb0bPcr5.js → CotgBJSP.js} +1 -1
- package/web/app/immutable/chunks/{CHK5bSfe.js → CoyHhRwd.js} +1 -1
- package/web/app/immutable/chunks/{Dd_avILP.js → CozIiFS7.js} +1 -1
- package/web/app/immutable/chunks/{B5HPrVzu.js → Cp09JH6d.js} +1 -1
- package/web/app/immutable/chunks/{BYhzE2Id.js → CpPsvdhC.js} +1 -1
- package/web/app/immutable/chunks/{v3KbAU5c.js → CrXlvCkv.js} +1 -1
- package/web/app/immutable/chunks/{DKwy0FDy.js → Crq4Js3_.js} +1 -1
- package/web/app/immutable/chunks/{BZjntufp.js → CvZhT_UL.js} +1 -1
- package/web/app/immutable/chunks/{Ds-TYeKV.js → Cve5pOPi.js} +2 -2
- package/web/app/immutable/chunks/{CQMmROUx.js → CwK4Fl7A.js} +2 -2
- package/web/app/immutable/chunks/{Bhov0MTz.js → Cwxvd99b.js} +1 -1
- package/web/app/immutable/chunks/{CbNazQqj.js → Cz9_gz0r.js} +1 -1
- package/web/app/immutable/chunks/{CXu6aWOL.js → Czc4IAh9.js} +1 -1
- package/web/app/immutable/chunks/{BmY5L1Op.js → Czzw_Pvc.js} +1 -1
- package/web/app/immutable/chunks/{BCHni7By.js → D0csyvlS.js} +1 -1
- package/web/app/immutable/chunks/{pl6-mRrC.js → D1dPbxoX.js} +1 -1
- package/web/app/immutable/chunks/{CNzOZ9MW.js → D2Fdja4t.js} +1 -1
- package/web/app/immutable/chunks/{DPfdnkfB.js → D38kCxZ9.js} +1 -1
- package/web/app/immutable/chunks/{DZpe54cf.js → D4K0RFHm.js} +1 -1
- package/web/app/immutable/chunks/{BLjf4WQt.js → D4RvTAYA.js} +1 -1
- package/web/app/immutable/chunks/{DG8rkBW-.js → D6XYE7JV.js} +1 -1
- package/web/app/immutable/chunks/{k5qVf45I.js → D6dtEt_1.js} +1 -1
- package/web/app/immutable/chunks/{DOdMtNpo.js → D72pFxfr.js} +1 -1
- package/web/app/immutable/chunks/{D6K58w6v.js → D7P2CXpO.js} +3 -3
- package/web/app/immutable/chunks/{BE5jLkkZ.js → D82TCSK5.js} +1 -1
- package/web/app/immutable/chunks/{CJuSN2hh.js → D8HMZQ9R.js} +1 -1
- package/web/app/immutable/chunks/{syg_Gxp6.js → D8U0PEIU.js} +1 -1
- package/web/app/immutable/chunks/{CrPyrftw.js → DB6_aOnf.js} +1 -1
- package/web/app/immutable/chunks/{4kHCfKWR.js → DB_2g4tK.js} +1 -1
- package/web/app/immutable/chunks/{1wcS2GHA.js → DBicYI5c.js} +1 -1
- package/web/app/immutable/chunks/{BQu3cSOx.js → DFXw4s8S.js} +1 -1
- package/web/app/immutable/chunks/{CCzzpn5X.js → DFvnP41F.js} +1 -1
- package/web/app/immutable/chunks/{BmeKmSN1.js → DG5KvEVf.js} +1 -1
- package/web/app/immutable/chunks/{oU2ii1bq.js → DKF2EjTY.js} +1 -1
- package/web/app/immutable/chunks/{BSIOWZWq.js → DOPcy6T2.js} +1 -1
- package/web/app/immutable/chunks/{Dzk1FZ-5.js → DPY72hn4.js} +1 -1
- package/web/app/immutable/chunks/{CAS7It7T.js → DQafeec3.js} +1 -1
- package/web/app/immutable/chunks/{D6CS23-9.js → DRdRLmUz.js} +1 -1
- package/web/app/immutable/chunks/{D5bYJMaB.js → DWzbf_aU.js} +1 -1
- package/web/app/immutable/chunks/{BAyTpaq3.js → DX0AlGFV.js} +1 -1
- package/web/app/immutable/chunks/{DI5O_gLl.js → DX0hE1oC.js} +1 -1
- package/web/app/immutable/chunks/{BxFP5cPu.js → DX3MlPN0.js} +1 -1
- package/web/app/immutable/chunks/{Tpzyol5T.js → DXJ3D6-0.js} +2 -2
- package/web/app/immutable/chunks/{wXtCM_sb.js → DYX4kEq9.js} +1 -1
- package/web/app/immutable/chunks/{BuSZooEw.js → DZRaa7LH.js} +1 -1
- package/web/app/immutable/chunks/{BMBobKUo.js → Dbuv3b_7.js} +2 -2
- package/web/app/immutable/chunks/{CEZnJlwn.js → DhQAmnDS.js} +1 -1
- package/web/app/immutable/chunks/{BrvhC6GL.js → DhkOw60r.js} +1 -1
- package/web/app/immutable/chunks/{D805RV1I.js → Dijv8faG.js} +1 -1
- package/web/app/immutable/chunks/{Djthn66V.js → DlYL66WK.js} +2 -2
- package/web/app/immutable/chunks/{BS6Z2wWv.js → DlYrPe_w.js} +1 -1
- package/web/app/immutable/chunks/{cfTDb37Y.js → Dlu0_GVa.js} +1 -1
- package/web/app/immutable/chunks/{BNfbL3_i.js → DpXfO8nM.js} +1 -1
- package/web/app/immutable/chunks/{BE6av5p4.js → DuKFlC9j.js} +1 -1
- package/web/app/immutable/chunks/{DqUTyEPN.js → DwW5MiN3.js} +1 -1
- package/web/app/immutable/chunks/{BRk6sSrF.js → DxJXJeWp.js} +1 -1
- package/web/app/immutable/chunks/{03ESLWB1.js → DxlpLNnB.js} +1 -1
- package/web/app/immutable/chunks/{BYB7SynS.js → F42L1irN.js} +1 -1
- package/web/app/immutable/chunks/{FcnPtqUv.js → I1eQnBry.js} +1 -1
- package/web/app/immutable/chunks/{B5KLQb3J.js → J5Q3706J.js} +1 -1
- package/web/app/immutable/chunks/{mf6N49ed.js → JUqct0gC.js} +1 -1
- package/web/app/immutable/chunks/{BxUDfZfX.js → KxpMwUsB.js} +1 -1
- package/web/app/immutable/chunks/{BKAQdyqG.js → LiYeJQ_y.js} +1 -1
- package/web/app/immutable/chunks/{CZ1Jg-sG.js → Qyi-W7KZ.js} +1 -1
- package/web/app/immutable/chunks/{CyBNkEuV.js → RDcDz1X1.js} +1 -1
- package/web/app/immutable/chunks/{Blhl4Kzo.js → SlH326tK.js} +1 -1
- package/web/app/immutable/chunks/{lLF0vfI3.js → UMObs5wi.js} +1 -1
- package/web/app/immutable/chunks/{BEQXbC7q.js → Uv0U-1kP.js} +1 -1
- package/web/app/immutable/chunks/{DIvWSFnj.js → WPmFGY7m.js} +1 -1
- package/web/app/immutable/chunks/{DRYCjR4c.js → Xb_csWgU.js} +1 -1
- package/web/app/immutable/chunks/{aVNMqNTp.js → Y3UAS5wV.js} +1 -1
- package/web/app/immutable/chunks/{CZFoI5QY.js → YpQeV5ep.js} +6 -6
- package/web/app/immutable/chunks/{DO0tFr72.js → _Y7Nvr11.js} +1 -1
- package/web/app/immutable/chunks/{lflImyZ6.js → _bgnudZi.js} +2 -2
- package/web/app/immutable/chunks/{CRQOCmwo.js → _eQjP0_7.js} +7 -7
- package/web/app/immutable/chunks/{C6NP7Wkf.js → c0MObYhr.js} +1 -1
- package/web/app/immutable/chunks/{CYvdhBss.js → hAyFyjes.js} +1 -1
- package/web/app/immutable/chunks/{BLjxHwvZ.js → iPSaMdjW.js} +1 -1
- package/web/app/immutable/chunks/{Jyr4akMd.js → ingscYYg.js} +1 -1
- package/web/app/immutable/chunks/{goXBWNik.js → lrd8vBcb.js} +1 -1
- package/web/app/immutable/chunks/{BlhXsK8K.js → nvBTDqJi.js} +1 -1
- package/web/app/immutable/chunks/{CzfXsXYz.js → oDL-pLcj.js} +1 -1
- package/web/app/immutable/chunks/{C83cffhG.js → s4JAFzR2.js} +1 -1
- package/web/app/immutable/chunks/{DyaiTi8A.js → sgXcAFR7.js} +1 -1
- package/web/app/immutable/chunks/{DQ_zmHT9.js → t61BPD62.js} +1 -1
- package/web/app/immutable/chunks/{CRqiQDbX.js → t7uelISx.js} +1 -1
- package/web/app/immutable/chunks/{CzTIJ9gY.js → tWOclZbM.js} +1 -1
- package/web/app/immutable/chunks/{i_sqIi_B.js → u9Jr5xJ2.js} +1 -1
- package/web/app/immutable/chunks/{CtwCGSFA.js → uKt9v9GZ.js} +1 -1
- package/web/app/immutable/chunks/{CsP-2ecL.js → xS44oH53.js} +1 -1
- package/web/app/immutable/chunks/{CX89Aogf.js → yQykulND.js} +1 -1
- package/web/app/immutable/chunks/{NfelpfPi.js → z5aynuor.js} +1 -1
- package/web/app/immutable/chunks/{B1P0TORE.js → zOdhHtWD.js} +1 -1
- package/web/app/immutable/chunks/{C1GRqLCq.js → zuhzlizP.js} +1 -1
- package/web/app/immutable/entry/{app.Cn1_ubOc.js → app.ZJRI8LL8.js} +2 -2
- package/web/app/immutable/entry/start.B_ChBWnN.js +1 -0
- package/web/app/immutable/nodes/{0.wKUTDWdz.js → 0.B_5IeAcY.js} +1 -1
- package/web/app/immutable/nodes/{1.DxJUaPzW.js → 1.D2RcMrk8.js} +1 -1
- package/web/app/immutable/nodes/{10.eeMW9oGM.js → 10.a-yBB_mg.js} +1 -1
- package/web/app/immutable/nodes/{14.DMbmYykJ.js → 14.BRMrhd95.js} +1 -1
- package/web/app/immutable/nodes/{16.D7z1ouJw.js → 16.DsObfcQu.js} +2 -2
- package/web/app/immutable/nodes/{2.BHOa4yl6.js → 2.BX2UV9md.js} +3 -3
- package/web/app/immutable/nodes/{3.DLeJMfu1.js → 3.BAb5j4vs.js} +1 -1
- package/web/app/immutable/nodes/{4.BEPpJpXB.js → 4.i3m7hv4J.js} +1 -1
- package/web/app/immutable/nodes/{5.Cb4CR-KH.js → 5.kQ7xzuNs.js} +1 -1
- package/web/app/immutable/nodes/{6.Bko4vkVy.js → 6.De5Z6N1w.js} +1 -1
- package/web/app/immutable/nodes/{7.z66lh95v.js → 7.Dqm5QJxM.js} +1 -1
- package/web/app/immutable/nodes/{8.Cykwxl0x.js → 8.BT-G_bE5.js} +2 -2
- package/web/app/immutable/nodes/{9.Bm3FCmVg.js → 9.DIcsOChV.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/DsYKN9zh.js +0 -1
- package/web/app/immutable/entry/start.7mFy7hlx.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as le}from"./BIkNHTNp.js";import{p as he}from"./lLF0vfI3.js";import{aP as $e,c9 as fe,c6 as ge,aK as ue,aL as ye,c7 as xe,f as h,aN as J,bC as w,c3 as me,aO as q,cx as pe,ce as be,a0 as we,a4 as B,$ as ke,ax as ve,bV as Ce}from"./Bmnp4Cni.js";import{p as Ee}from"./H_dyzYix.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ke(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ue(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=h(e=>e.branch,"parseCheckout"),Ue=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as le}from"./CHjSilfW.js";import{p as he}from"./UMObs5wi.js";import{aP as $e,c9 as fe,c6 as ge,aK as ue,aL as ye,c7 as xe,f as h,aN as J,bC as w,c3 as me,aO as q,cx as pe,ce as be,a0 as we,a4 as B,$ as ke,ax as ve,bV as Ce}from"./CdT170lG.js";import{p as Ee}from"./H_dyzYix.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ke(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ue(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=h(e=>e.branch,"parseCheckout"),Ue=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${s-i/2-L/2},${x+R}
|
|
3
3
|
${s-i/2-L/2},${x-R}
|
|
4
4
|
${t.posWithOffset-i/2-L},${x-c-R}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as R,s as W,S as N}from"./CyO8AnLs.js";import{f,aO as t,c3 as H,bC as S,a6 as P,G as C,a4 as z,bz as U,ae as _,aY as F,cx as O}from"./Bmnp4Cni.js";import{l as J}from"./LoyMyTg_.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),Y=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),D=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,b,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(b);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const B=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return B.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const b=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-b.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",b.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",b.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const B of a){const x=B.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&Y(n),i.type==="default"&&i.descriptions.length===0&&D(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(_),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:B,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const b=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",B).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,B,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),b.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;b.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",B-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),m,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){m=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const B=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(B,x,void 0,!1,p,a,c);const g=m.padding,o=s.node().getBBox(),b=o.width+g*2,y=o.height+g*2,v=b*1.75;P(s,y,v,m.useMaxWidth),s.attr("viewBox",`${o.x-m.padding} ${o.y-m.padding} `+b+" "+y)},"draw"),at=f(e=>e?e.length*m.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new C({compound:!0,multigraph:!0});let s,B=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){B=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:B?1:m.edgeLengthFactor,nodeSep:B?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:B?1:m.edgeLengthFactor,nodeSep:B?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+m.padding/2,T[u.id]={y:m.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let b=0;g.forEach(function(r){b++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:m.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+b)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*m.padding,k.height=v.height+2*m.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},dt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{dt as diagram};
|
|
1
|
+
import{b as R,s as W,S as N}from"./BMCIczJY.js";import{f,aO as t,c3 as H,bC as S,a6 as P,G as C,a4 as z,bz as U,ae as _,aY as F,cx as O}from"./CdT170lG.js";import{l as J}from"./CDnN0LSW.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),Y=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),D=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,b,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(b);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const B=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return B.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const b=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-b.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",b.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",b.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const B of a){const x=B.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&Y(n),i.type==="default"&&i.descriptions.length===0&&D(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(_),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:B,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const b=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",B).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,B,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),b.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;b.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",B-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),m,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){m=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const B=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(B,x,void 0,!1,p,a,c);const g=m.padding,o=s.node().getBBox(),b=o.width+g*2,y=o.height+g*2,v=b*1.75;P(s,y,v,m.useMaxWidth),s.attr("viewBox",`${o.x-m.padding} ${o.y-m.padding} `+b+" "+y)},"draw"),at=f(e=>e?e.length*m.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new C({compound:!0,multigraph:!0});let s,B=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){B=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:B?1:m.edgeLengthFactor,nodeSep:B?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:B?1:m.edgeLengthFactor,nodeSep:B?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+m.padding/2,T[u.id]={y:m.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let b=0;g.forEach(function(r){b++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:m.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+b)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*m.padding,k.height=v.height+2*m.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},dt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{dt as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as pt,bq as S,a_ as q,by as bt,bs as Pt,b as Ct,bo as vt,bu as h}from"./D4MoKNoK.js";import{bs as $t,ca as E,aD as n,c9 as i,a7 as L,ay as _,W as w,bn as kt,bS as yt,aA as B,aB as St}from"./B8o4lNgr.js";import{B as _t}from"./HfuFYz2u.js";import{c as wt}from"./BPQohPc9.js";import{aU as Bt}from"./
|
|
1
|
+
import{t as pt,bq as S,a_ as q,by as bt,bs as Pt,b as Ct,bo as vt,bu as h}from"./D4MoKNoK.js";import{bs as $t,ca as E,aD as n,c9 as i,a7 as L,ay as _,W as w,bn as kt,bS as yt,aA as B,aB as St}from"./B8o4lNgr.js";import{B as _t}from"./HfuFYz2u.js";import{c as wt}from"./BPQohPc9.js";import{aU as Bt}from"./Bj2YjLqH.js";import{G2 as u,ei as It,ej as Ut,Gz as Wt,GN as Rt,GE as Tt,t3 as Dt,mZ as V}from"./C51KzdSG.js";import{g as At}from"./CoSk1zgY.js";import{bx as Ft,bz as Ht,dj as xt}from"./dimBDqRX.js";import{C as f}from"./DypB-Dwi.js";import"./CpPsvdhC.js";import"./WVYGrHqE.js";import"./WZHg24tN.js";import{bb as Mt}from"./CG5J-qd_.js";import"./DgFojmqv.js";import"./Dbuv3b_7.js";import{T as Nt}from"./B0UymEvm.js";import"./Ds7can9q.js";import{M as Gt}from"./D8_OuTD3.js";import{V as qt}from"./BqSjWCdR.js";import{O as Et}from"./DB_2g4tK.js";import{bC as Lt,bA as Vt,aX as jt}from"./t61BPD62.js";import{i as zt}from"./H2jLkRRS.js";var Kt=St("<!> <!>",1);function Ot(I,p){if(new.target)return pt({component:Ot,...I});$t(p,!0);const U=()=>h(et,"$workspace",l),P=()=>h(Q,"$ftChanges$",l),j=()=>h(Y,"$ftCommits$",l),W=()=>h(Z,"$foldUnchanged",l),R=()=>h(X,"$lineWrapping",l),T=()=>h(J,"$diffSideBySide",l),[l,z]=Pt(),K=t=>{qt(t,{embedded:!0,get foldEnabled(){return W()},onToggleFold:()=>u.dispatch(Tt()),get wrapEnabled(){return R()},onToggleWrap:()=>u.dispatch(Rt()),get splitEnabled(){return T()},onToggleSplit:()=>u.dispatch(Wt())})},O=t=>{var e=Kt(),r=_(e);{let m=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>Gt,(y,ht)=>{ht(y,{get icon(){return Mt},get label(){return n(m)},onclick:Xt=>ft()})})}var s=yt(r,2);{var d=m=>{Et(m,{get filePath(){return n($)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};q(s,m=>{n($)&&m(d)})}w(t,e)},X=Lt(),Z=Vt(),J=jt();let a=S(p,"tab",7),o=S(p,"workspaceId",7),b=S(p,"isActive",7);const C=Bt(()=>o()),Q=Ft(C),Y=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=xt(C),nt=i(()=>U()?.worktreePath||U()?.repositoryPath||void 0);E(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Ut(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),$=i(()=>a().diffPath&&n(v)?zt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of j())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const x=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),M=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(M)||n(N))),k=i(()=>{if(n(g)?.commitHash)return n(g);if(n(x))return n(x);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n($)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}E(()=>{!D||!b()||D.registerActions({display:K,actions:O})});function dt(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},G=L(),mt=_(G);{var lt=t=>{var e=L(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>T()?"split":"unified"),m=i(()=>!n(c)&&n(k).stage===f.Unstaged?dt:void 0),y=i(()=>!n(c)&&n(k).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n(k)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return W()},get lineWrapping(){return R()},get refreshKey(){return n(st)},get branchBaseRef(){return n(M)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(m)},get onUnstageHunk(){return n(y)}})}}),w(t,e)};q(mt,t=>{a().diffPath&&t(lt)})}w(I,G);var gt=kt(ct);return z(),gt}export{Ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,a as s,c as e,C as t}from"./
|
|
1
|
+
import{s as r,a as s,c as e,C as t}from"./Qyi-W7KZ.js";import{a as i}from"./_eQjP0_7.js";import"./CdT170lG.js";import"./BEu9jjb7.js";var u={parser:e,get db(){return new t},renderer:s,styles:r,init:i(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,W as Qt,aH as zt,ad as ee,N as me,R as Jt,ax as Zt,aV as nt,aG as $t,aF as e1,aI as t1,L as s1,K as i1,O as r1,p as a1,ac as n1,J as u1,a7 as o1,P as rt,as as l1,k as c1,x as h1,aC as d1,i as p1}from"./
|
|
1
|
+
import{a as k,W as Qt,aH as zt,ad as ee,N as me,R as Jt,ax as Zt,aV as nt,aG as $t,aF as e1,aI as t1,L as s1,K as i1,O as r1,p as a1,ac as n1,J as u1,a7 as o1,P as rt,as as l1,k as c1,x as h1,aC as d1,i as p1}from"./_eQjP0_7.js";import{g as f1}from"./DPY72hn4.js";import{g as g1}from"./BRsvqYQJ.js";import{s as b1}from"./BRaDvZhu.js";import{c as A1}from"./BEu9jjb7.js";import{g as j,c3 as at}from"./CdT170lG.js";var k1="flowchart-",Te,m1=(Te=class{constructor(){this.vertexCounter=0,this.config=me(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=$t,this.setAccDescription=e1,this.setDiagramTitle=t1,this.getAccTitle=s1,this.getAccDescription=i1,this.getDiagramTitle=r1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return a1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,c,g,l={},m){if(!i||i.trim().length===0)return;let p;if(m!==void 0){let u;m.includes(`
|
|
2
2
|
`)?u=m+`
|
|
3
3
|
`:u=`{
|
|
4
4
|
`+m+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as qe,bq as _,bo as u,a_ as he,by as He,b as je,bt as Rr,bu as ht,bs as Fr}from"./D4MoKNoK.js";import{bs as Ze,ay as K,be as dt,b$ as tt,b_ as M,bO as q,W as C,bS as p,aD as e,a7 as vt,bl as Ce,bn as Xe,c9 as w,aA as h,aB as ee,ca as Pe,c0 as yt,bH as i,a5 as re,bA as oe,bV as A,br as xt,bk as Tr,bj as Sr,bf as _o,c5 as Ct,aw as Xt,bz as ho,cd as Kt}from"./B8o4lNgr.js";import{c as X}from"./BPQohPc9.js";import{h as wr,i as yo,k as Et,s as Ke,l as xo,I as Co,a as kt}from"./WVYGrHqE.js";import{b as pt}from"./D2g8BuR1.js";import{d as br}from"./BcemBG1g.js";import{D as ko,B as Io,I as Eo}from"./HfuFYz2u.js";import{c as rr}from"./ChTqQfQN.js";import{b as Po}from"./CQTIadOp.js";import{f as Te,bb as Lo}from"./DgFojmqv.js";import{n as at}from"./BjO6mATN.js";import{s as Ro}from"./WZHg24tN.js";import{cf as $r,F as we,a6 as Fo,aU as To,ao as So,cz as $o,aI as Uo,aV as Yt,$ as or,a1 as nr,aY as Bo,at as Ao,c9 as Ur,bL as Br,b5 as No,cH as Oo,cd as Do}from"./CG5J-qd_.js";import"./De4WWpS0.js";import{G2 as Ee,fz as Mo,bm as Vo,xb as Wo,wy as zo,HW as mr,dD as Go,bF as Ko,HV as qo,sA as Ho,HT as _r,gf as jo,s0 as Zo,HU as Xo,HA as hr,HS as yr}from"./C51KzdSG.js";import{a as Ar,B as It}from"./CVBBsS8i.js";import{bU as Yo}from"./BfCf1CX7.js";import{Z as Jo}from"./CclADFoZ.js";import{w as Qo,J as en}from"./Di6XfBOT.js";import{I as $t}from"./CS1d84Cn.js";import{d as tn}from"./OX_6myWb.js";import{a7 as rn}from"./5BmKVYc1.js";import{i as Jt}from"./DDhakcOb.js";import{i as on,a as nn}from"./B7R5ywXv.js";import{R as an,n as qt,o as lt,m as sn,l as ze,s as Nr,k as Or,K as ln,p as dn,r as un,q as cn,M as Dr}from"./BQ-Vdhjp.js";import{k as fn,B as gn}from"./BMBobKUo.js";import"./Ds7can9q.js";import{t as Ae}from"./C8yAGnZY.js";import{M as Mr}from"./D8_OuTD3.js";import"./S9ot6IO_.js";import"./C_fEvnNK.js";import"./BrXpFLv_.js";import{o as xr,s as it,n as Tt}from"./CpHIRYx9.js";import{g as vn}from"./CoSk1zgY.js";import{f as pn}from"./BLjxHwvZ.js";import{aA as wn,a2 as bn,O as mn}from"./CLCaT9pi.js";import{aM as _n}from"./dimBDqRX.js";function hn(o,r){return o.loadURL(r)}function yn(o){return{previousUrlProp:o||null}}function Cr(o,r){o.previousUrlProp=r}function xn(o,r,a){const m=a||r;return o.previousUrlProp===m?null:(o.previousUrlProp=m,m)}function Cn(o,r,a){return r?o.previousUrlProp===null?(o.previousUrlProp=r,{shouldLoad:!1,targetUrl:null}):r===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:a.webviewReady?(o.previousUrlProp=r,a.isValidBrowserUrl(r)?{shouldLoad:!0,targetUrl:r}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const Vr=rr("TabBoundsReporter"),kn=150;function Ht(o,r,a){!(r>0)||!(a>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:r,height:a}).catch(m=>{Vr.debug("Failed to report tab bounds",{tabId:o,error:m})})}function kr(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(r=>{Vr.debug("Failed to clear tab bounds",{tabId:o,error:r})})}function In(o,r){let a=r,m;const L=typeof ResizeObserver>"u"?void 0:new ResizeObserver(R=>{if(!a)return;const E=R[R.length-1]?.contentRect;if(!E)return;const v=a;clearTimeout(m),m=setTimeout(()=>{Ht(v,E.width,E.height)},kn)});if(L?.observe(o),a){const R=o.getBoundingClientRect();Ht(a,R.width,R.height)}return{update(R){if(R!==a&&(clearTimeout(m),a&&kr(a),a=R,a)){const E=o.getBoundingClientRect();Ht(a,E.width,E.height)}},destroy(){clearTimeout(m),L?.disconnect(),a&&kr(a)}}}function Wr(o){let r=o.trim();if(!r)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(r)||(r=(r.includes("localhost")||r.includes("127.0.0.1")||r.includes("0.0.0.0")?"http://":"https://")+r);try{return new URL(r),r}catch{return null}}function st(o,r=typeof window<"u"?window.location.origin:""){if(o==="about:blank")return!0;if(!o)return!1;try{const a=new URL(o);return Ar.NAVIGATION_ALLOWED.includes(a.protocol)&&a.origin!==r}catch{return!1}}const Ut=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function En(o){return{...o,width:o.height,height:o.width}}var Pn=ee('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),jt=ee("<!> <!> <!>",1),Ln=ee('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),Zt=ee("<!> <!>",1);function ar(o,r){if(new.target)return qe({component:ar,...o});Ze(r,!0);let a=_(r,"viewport",7),m=_(r,"onViewportChange",7),L=_(r,"onCustom",7);const R=["phone","tablet","desktop"],E=w(()=>a().mode==="fit"?"fit":a().mode==="preset"?a().presetId:"custom");function v(I){if(I==="fit")return m()({mode:"fit"});const x=Ut.find(Z=>Z.id===I);x&&m()({mode:"preset",presetId:x.id,width:x.width,height:x.height})}var O={get viewport(){return a()},set viewport(I){a(I),h()},get onViewportChange(){return m()},set onViewportChange(I){m(I),h()},get onCustom(){return L()},set onCustom(I){L(I),h()},$set:He,$on:(I,x)=>je(r,I,x)},f=jt(),F=K(f);X(F,()=>an,(I,x)=>{x(I,{get value(){return e(E)},onValueChange:v,children:(Z,J)=>{var G=jt(),T=K(G);X(T,()=>qt,(D,s)=>{s(D,{value:"fit",children:(U,ne)=>{dt();var Y=tt();M(Q=>q(Y,Q),[()=>u.browser_viewport_fitPanel_label()]),C(U,Y)},$$slots:{default:!0}})});var j=p(T,2);wr(j,17,()=>R,yo,(D,s)=>{var U=jt(),ne=K(U);X(ne,()=>lt,(B,c)=>{c(B,{})});var Y=p(ne,2);X(Y,()=>sn,(B,c)=>{c(B,{children:(l,N)=>{dt();var ae=tt();M(Ie=>q(ae,Ie),[()=>e(s)==="phone"?u.browser_viewport_phoneGroup_label():e(s)==="tablet"?u.browser_viewport_tabletGroup_label():u.browser_viewport_desktopGroup_label()]),C(l,ae)},$$slots:{default:!0}})});var Q=p(Y,2);wr(Q,17,()=>Ut.filter(B=>B.category===e(s)),B=>B.id,(B,c)=>{var l=vt(),N=K(l);X(N,()=>qt,(ae,Ie)=>{Ie(ae,{get value(){return e(c).id},children:(d,b)=>{var y=Pn(),k=K(y),W=Ce(k,!0),H=p(k,2),ie=Ce(H,!0);M(ye=>{q(W,e(c).name),q(ie,ye)},[()=>u.browser_viewport_dimensions_label({width:Ae(e(c).width),height:Ae(e(c).height)})]),C(d,y)},$$slots:{default:!0}})}),C(B,l)}),C(D,U)});var le=p(j,2);{var ge=D=>{var s=Zt(),U=K(s);X(U,()=>lt,(Y,Q)=>{Q(Y,{})});var ne=p(U,2);X(ne,()=>qt,(Y,Q)=>{Q(Y,{value:"custom",get onSelect(){return L()},children:(B,c)=>{var l=Ln(),N=K(l),ae=Ce(N,!0),Ie=p(N,2),d=Ce(Ie,!0);M((b,y)=>{q(ae,b),q(d,y)},[()=>u.browser_viewport_custom_label(),()=>u.browser_viewport_dimensions_label({width:Ae(a().width),height:Ae(a().height)})]),C(B,l)},$$slots:{default:!0}})}),C(D,s)};he(le,D=>{a().mode==="custom"&&D(ge)})}C(Z,G)},$$slots:{default:!0}})});var z=p(F,2);{var P=I=>{var x=Zt(),Z=K(x);X(Z,()=>lt,(G,T)=>{T(G,{})});var J=p(Z,2);X(J,()=>ze,(G,T)=>{T(G,{get onSelect(){return L()},children:(j,le)=>{dt();var ge=tt();M(D=>q(ge,D),[()=>u.browser_viewport_custom_label()]),C(j,ge)},$$slots:{default:!0}})}),C(I,x)};he(z,I=>{a().mode!=="custom"&&I(P)})}var $=p(z,2);{var V=I=>{var x=Zt(),Z=K(x);X(Z,()=>lt,(G,T)=>{T(G,{})});var J=p(Z,2);{let G=w(()=>u.browser_viewport_rotate_label());X(J,()=>Mr,(T,j)=>{j(T,{get icon(){return $r},get label(){return e(G)},onSelect:()=>m()(En(a()))})})}C(I,x)};he($,I=>{a().mode!=="fit"&&I(V)})}return C(o,f),Xe(O)}var Rn=ee('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function ir(o,r){if(new.target)return qe({component:ir,...o});Ze(r,!0);let a=_(r,"open",15,!1),m=_(r,"viewport",7),L=_(r,"onViewportChange",7),R=_(r,"returnFocus",7);const E=320,v=3840;let O=A(1280),f=A(800),F=A(null);function z(I){return typeof I=="number"&&Number.isInteger(I)&&I>=E&&I<=v}const P=w(()=>z(e(O))&&z(e(f)));Pe(()=>{if(a())return()=>{yt().then(()=>{R()?.isConnected&&R().focus()})}}),Pe(()=>{a()||(i(O,m().mode==="fit"?1280:m().width,!0),i(f,m().mode==="fit"?800:m().height,!0))});function $(){!e(P)||e(O)===null||e(f)===null||(L()({mode:"custom",width:e(O),height:e(f)}),a(!1))}var V={get open(){return a()},set open(I=!1){a(I),h()},get viewport(){return m()},set viewport(I){m(I),h()},get onViewportChange(){return L()},set onViewportChange(I){L(I),h()},get returnFocus(){return R()},set returnFocus(I){R(I),h()},$set:He,$on:(I,x)=>je(r,I,x)};{let I=w(()=>u.browser_viewport_custom_label()),x=w(()=>u.browser_viewport_sizeRange_description({min:Ae(E),max:Ae(v)})),Z=w(()=>u.browser_viewport_apply_label());fn(o,{get title(){return e(I)},get description(){return e(x)},get submitLabel(){return e(Z)},get canSubmit(){return e(P)},onSubmit:$,get initialFocus(){return e(F)},get open(){return a()},set open(J){a(J)},children:(J,G)=>{var T=Rn(),j=re(T),le=re(j),ge=Ce(le,!0),D=p(le,2);{let Q=w(()=>!z(e(O)));$t(D,{type:"number",min:E,max:v,step:"1",get"aria-invalid"(){return e(Q)},get value(){return e(O)},set value(B){i(O,B,!0)},get ref(){return e(F)},set ref(B){i(F,B,!0)}})}oe(j);var s=p(j,2),U=re(s),ne=Ce(U,!0),Y=p(U,2);{let Q=w(()=>!z(e(f)));$t(Y,{type:"number",min:E,max:v,step:"1",get"aria-invalid"(){return e(Q)},get value(){return e(f)},set value(B){i(f,B,!0)}})}oe(s),oe(T),M((Q,B)=>{q(ge,Q),q(ne,B)},[()=>u.browser_viewport_width_label(),()=>u.browser_viewport_height_label()]),C(J,T)},$$slots:{default:!0}})}return Xe(V)}var St=ee("<!> <!>",1),et=ee("<!> ",1),Fn=ee('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),Tn=ee("<!> <!> <!> <!> <!>",1),Sn=ee('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),$n=ee("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function zr(o,r){if(new.target)return qe({component:zr,...o});Ze(r,!0);let a=_(r,"errorCount",7,0),m=_(r,"disabled",7,!1),L=_(r,"collapsed",7,!1),R=_(r,"canGoBack",7,!1),E=_(r,"canGoForward",7,!1),v=_(r,"canSelectElement",7,!1),O=_(r,"selectingElement",7,!1),f=_(r,"viewport",23,()=>({mode:"fit"})),F=_(r,"onGoBack",7),z=_(r,"onGoForward",7),P=_(r,"onToggleElementPicker",7),$=_(r,"onViewportChange",7),V=_(r,"onOpenExternal",7),I=_(r,"onCopyUrl",7),x=_(r,"onScreenshot",7),Z=_(r,"onOpenConsole",7),J=_(r,"onOpenSource",7),G=_(r,"onOpenInspector",7),T=_(r,"onReloadWithoutCache",7);const j=w(()=>a()>0?u.browser_overflow_triggerWithErrors_ariaLabel({count:Ae(a())}):u.browser_overflow_trigger_ariaLabel()),le=w(()=>f().mode==="preset"?Ut.find(l=>l.id===f().presetId):void 0),ge=w(()=>f().mode==="fit"?u.browser_viewport_fitPanel_label():e(le)?.name??u.browser_viewport_dimensions_label({width:Ae(f().width),height:Ae(f().height)}));let D=A(!1),s=A(null),U=A(!1);async function ne(){i(U,!1),await yt(),i(D,!0)}var Y={get errorCount(){return a()},set errorCount(l=0){a(l),h()},get disabled(){return m()},set disabled(l=!1){m(l),h()},get collapsed(){return L()},set collapsed(l=!1){L(l),h()},get canGoBack(){return R()},set canGoBack(l=!1){R(l),h()},get canGoForward(){return E()},set canGoForward(l=!1){E(l),h()},get canSelectElement(){return v()},set canSelectElement(l=!1){v(l),h()},get selectingElement(){return O()},set selectingElement(l=!1){O(l),h()},get viewport(){return f()},set viewport(l={mode:"fit"}){f(l),h()},get onGoBack(){return F()},set onGoBack(l){F(l),h()},get onGoForward(){return z()},set onGoForward(l){z(l),h()},get onToggleElementPicker(){return P()},set onToggleElementPicker(l){P(l),h()},get onViewportChange(){return $()},set onViewportChange(l){$(l),h()},get onOpenExternal(){return V()},set onOpenExternal(l){V(l),h()},get onCopyUrl(){return I()},set onCopyUrl(l){I(l),h()},get onScreenshot(){return x()},set onScreenshot(l){x(l),h()},get onOpenConsole(){return Z()},set onOpenConsole(l){Z(l),h()},get onOpenSource(){return J()},set onOpenSource(l){J(l),h()},get onOpenInspector(){return G()},set onOpenInspector(l){G(l),h()},get onReloadWithoutCache(){return T()},set onReloadWithoutCache(l){T(l),h()},$set:He,$on:(l,N)=>je(r,l,N)},Q=St(),B=K(Q);X(B,()=>Dr,(l,N)=>{N(l,{get open(){return e(U)},set open(ae){i(U,ae,!0)},children:(ae,Ie)=>{var d=St(),b=K(d);{const k=(W,H)=>{let ie=()=>(H?.()).props;{let ye=w(()=>u.browser_overflow_trigger_tooltip());Te(W,Rr(ie,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return m()},get tooltip(){return e(ye)},tooltipSide:"bottom",get"aria-label"(){return e(j)},"data-testid":"browser-overflow-trigger",get ref(){return e(s)},set ref(ve){i(s,ve,!0)},children:(ve,De)=>{var Ve=St(),Le=K(Ve);ln(Le,{class:"size-3.5"});var Re=p(Le,2);{var _e=Se=>{gn(Se,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(ut,rt)=>{dt();var ct=tt();M(Ye=>q(ct,Ye),[()=>a()>9?"9+":Ae(a())]),C(ut,ct)},$$slots:{default:!0}})};he(Re,Se=>{a()>0&&Se(_e)})}C(ve,Ve)},$$slots:{default:!0}}))}};X(b,()=>Nr,(W,H)=>{H(W,{child:k,$$slots:{child:!0}})})}var y=p(b,2);X(y,()=>Or,(k,W)=>{W(k,{align:"end",class:"w-56",onCloseAutoFocus:H=>e(D)&&H.preventDefault(),children:(H,ie)=>{var ye=$n(),ve=K(ye);{var De=ue=>{var pe=Tn(),be=K(pe);{let se=w(()=>!R());X(be,()=>ze,(me,Je)=>{Je(me,{get disabled(){return e(se)},get onSelect(){return F()},children:(ot,Ge)=>{var $e=et(),Ne=K($e);we(Ne,{get icon(){return or},size:"xs",class:"w-4 text-muted-foreground"});var Ue=p(Ne);M(Oe=>q(Ue,` ${Oe??""}`),[()=>u.browser_embedded_goBack_ariaLabel()]),C(ot,$e)},$$slots:{default:!0}})})}var Fe=p(be,2);{let se=w(()=>!E());X(Fe,()=>ze,(me,Je)=>{Je(me,{get disabled(){return e(se)},get onSelect(){return z()},children:(ot,Ge)=>{var $e=et(),Ne=K($e);we(Ne,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var Ue=p(Ne);M(Oe=>q(Ue,` ${Oe??""}`),[()=>u.browser_embedded_goForward_ariaLabel()]),C(ot,$e)},$$slots:{default:!0}})})}var ce=p(Fe,2);{let se=w(()=>!v());X(ce,()=>ze,(me,Je)=>{Je(me,{get disabled(){return e(se)},onSelect:()=>void P()?.(),children:(ot,Ge)=>{var $e=et(),Ne=K($e);we(Ne,{get icon(){return Yt},size:"xs",class:"w-4 text-muted-foreground"});var Ue=p(Ne);M(Oe=>q(Ue,` ${Oe??""}`),[()=>O()?u.browser_embedded_cancelElementSelection_ariaLabel():u.browser_embedded_selectElement_ariaLabel()]),C(ot,$e)},$$slots:{default:!0}})})}var de=p(ce,2);X(de,()=>dn,(se,me)=>{me(se,{children:(Je,ot)=>{var Ge=St(),$e=K(Ge);{let Ue=w(()=>!$());X($e,()=>un,(Oe,ft)=>{ft(Oe,{get disabled(){return e(Ue)},children:(bt,mt)=>{var _t=Fn(),Pt=K(_t);we(Pt,{get icon(){return Bo},size:"xs",class:"w-4 text-muted-foreground"});var Lt=p(Pt,2),Rt=Ce(Lt,!0);M(Bt=>q(Rt,Bt),[()=>u.browser_viewport_trigger_ariaLabel({mode:e(ge)})]),C(bt,_t)},$$slots:{default:!0}})})}var Ne=p($e,2);X(Ne,()=>cn,(Ue,Oe)=>{Oe(Ue,{class:"w-64",children:(ft,bt)=>{ar(ft,{get viewport(){return f()},onViewportChange:mt=>$()?.(mt),onCustom:ne})},$$slots:{default:!0}})}),C(Je,Ge)},$$slots:{default:!0}})});var xe=p(de,2);X(xe,()=>lt,(se,me)=>{me(se,{})}),C(ue,pe)};he(ve,ue=>{L()&&ue(De)})}var Ve=p(ve,2);X(Ve,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void V()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return Fo},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_openExternal_label()]),C(be,ce)},$$slots:{default:!0}})});var Le=p(Ve,2);X(Le,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void I()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return To},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_copyUrl_label()]),C(be,ce)},$$slots:{default:!0}})});var Re=p(Le,2);X(Re,()=>lt,(ue,pe)=>{pe(ue,{})});var _e=p(Re,2);X(_e,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void x()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return So},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_screenshot_label()]),C(be,ce)},$$slots:{default:!0}})});var Se=p(_e,2);X(Se,()=>lt,(ue,pe)=>{pe(ue,{})});var ut=p(Se,2);X(ut,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void Z()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return $o},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_console_label()]),C(be,ce)},$$slots:{default:!0}})});var rt=p(ut,2);X(rt,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void J()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return Uo},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_source_label()]),C(be,ce)},$$slots:{default:!0}})});var ct=p(rt,2);X(ct,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void G()(),children:(be,Fe)=>{var ce=Sn(),de=K(ce);we(de,{get icon(){return Yt},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de,2),se=Ce(xe,!0);dt(2),M(me=>q(se,me),[()=>u.browser_overflow_inspector_label()]),C(be,ce)},$$slots:{default:!0}})});var Ye=p(ct,2);X(Ye,()=>lt,(ue,pe)=>{pe(ue,{})});var wt=p(Ye,2);X(wt,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void T()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return $r},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_reloadWithoutCache_label()]),C(be,ce)},$$slots:{default:!0}})}),C(H,ye)},$$slots:{default:!0}})}),C(ae,d)},$$slots:{default:!0}})});var c=p(B,2);return ir(c,{get viewport(){return f()},onViewportChange:l=>$()?.(l),get returnFocus(){return e(s)},get open(){return e(D)},set open(l){i(D,l,!0)}}),C(o,Q),Xe(Y)}var Un=ee('<span class="truncate"> </span> <!>',1),Ir=ee("<!> <!>",1);function Gr(o,r){if(new.target)return qe({component:Gr,...o});Ze(r,!0);let a=_(r,"viewport",7),m=_(r,"onViewportChange",7),L=A(!1),R=A(!1),E=A(null);const v=w(()=>a().mode==="preset"?Ut.find(x=>x.id===a().presetId):void 0),O=w(()=>a().mode==="fit"?"":u.browser_viewport_dimensions_label({width:Ae(a().width),height:Ae(a().height)})),f=w(()=>a().mode==="fit"?u.browser_viewport_fit_short_label():a().mode==="preset"&&e(v)?e(v).name:e(O)),F=w(()=>a().mode==="fit"?u.browser_viewport_fitPanel_label():e(f));async function z(){i(L,!1),await yt(),i(R,!0)}var P={get viewport(){return a()},set viewport(x){a(x),h()},get onViewportChange(){return m()},set onViewportChange(x){m(x),h()},$set:He,$on:(x,Z)=>je(r,x,Z)},$=Ir(),V=K($);X(V,()=>Dr,(x,Z)=>{Z(x,{get open(){return e(L)},set open(J){i(L,J,!0)},children:(J,G)=>{var T=Ir(),j=K(T);{const ge=(D,s)=>{let U=()=>(s?.()).props;{let ne=w(()=>u.browser_viewport_trigger_ariaLabel({mode:e(F)}));Te(D,Rr(U,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(ne)},"data-testid":"browser-viewport-trigger",get ref(){return e(E)},set ref(Y){i(E,Y,!0)},children:(Y,Q)=>{var B=Un(),c=K(B),l=Ce(c,!0),N=p(c,2);we(N,{get icon(){return Ao},size:"xs",class:"shrink-0"}),M(()=>q(l,e(f))),C(Y,B)},$$slots:{default:!0}}))}};X(j,()=>Nr,(D,s)=>{s(D,{child:ge,$$slots:{child:!0}})})}var le=p(j,2);X(le,()=>Or,(ge,D)=>{D(ge,{align:"end",class:"w-64",onCloseAutoFocus:s=>e(R)&&s.preventDefault(),children:(s,U)=>{ar(s,{get viewport(){return a()},get onViewportChange(){return m()},onCustom:z})},$$slots:{default:!0}})}),C(J,T)},$$slots:{default:!0}})});var I=p(V,2);return ir(I,{get viewport(){return a()},get onViewportChange(){return m()},get returnFocus(){return e(E)},get open(){return e(R)},set open(x){i(R,x,!0)}}),C(o,$),Xe(P)}var Bn=ee('<span class="pointer-events-none absolute bottom-1 left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur" data-browser-viewport-readout=""> </span> <!>',1),An=ee('<div data-browser-device-frame-container=""><div><!> <!></div></div>');function Kr(o,r){if(new.target)return qe({component:Kr,...o});Ze(r,!0);const a=320,m=3840,L=150;let R=_(r,"viewport",7),E=_(r,"onViewportChange",7),v=_(r,"children",7),O=A(xt(R().mode==="fit"?a:R().width)),f=A(xt(R().mode==="fit"?a:R().height)),F,z=A(0),P=A(0),$=A(!1),V=null,I=0,x=0,Z=0,J=0,G;const T=w(()=>R().mode==="fit"),j=w(()=>u.browser_viewport_dimensions_label({width:Ae(e(O)),height:Ae(e(f))})),le=w(()=>!e(T)&&e(z)>0&&e(P)>0?Math.min(1,e(z)/e(O),e(P)/e(f)):1),ge=w(()=>e(O)*e(le)),D=w(()=>e(f)*e(le));Pe(()=>{e($)||R().mode==="fit"||(i(O,R().width,!0),i(f,R().height,!0))});function s(y){return Math.min(m,Math.max(a,Math.round(y)))}function U(){E()({mode:"custom",width:e(O),height:e(f)})}function ne(){clearTimeout(G),G=setTimeout(U,L)}function Y(y){e(T)||y.button!==0||(y.preventDefault(),i($,!0),V=y.pointerId,I=y.clientX,x=y.clientY,Z=e(O),J=e(f),y.currentTarget instanceof HTMLElement&&y.currentTarget.setPointerCapture?.(y.pointerId))}function Q(y){!e($)||y.pointerId!==V||(i(O,s(Z+y.clientX-I),!0),i(f,s(J+y.clientY-x),!0),ne())}function B(y){if(!e($)||y.pointerId!==V)return;clearTimeout(G),i($,!1),V=null;const k=y.currentTarget;k instanceof HTMLElement&&k.hasPointerCapture?.(y.pointerId)&&k.releasePointerCapture&&k.releasePointerCapture(y.pointerId),U()}Tr(()=>{const y=(W,H)=>{i(z,W,!0),i(P,H,!0)};y(F.clientWidth,F.clientHeight);const k=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([W])=>{y(W?.contentRect.width??F.clientWidth,W?.contentRect.height??F.clientHeight)});return k?.observe(F),()=>k?.disconnect()}),Sr(()=>clearTimeout(G));var c={get viewport(){return R()},set viewport(y){R(y),h()},get onViewportChange(){return E()},set onViewportChange(y){E(y),h()},get children(){return v()},set children(y){v(y),h()},$set:He,$on:(y,k)=>je(r,y,k)},l=An(),N=re(l);let ae;var Ie=re(N);Ro(Ie,()=>v()??_o);var d=p(Ie,2);{var b=y=>{var k=Bn(),W=K(k),H=Ce(W,!0),ie=p(W,2);{let ye=w(()=>u.browser_viewport_resizeHandle_ariaLabel());Te(ie,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,class:"absolute bottom-0 right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground",get"aria-label"(){return e(ye)},"data-testid":"browser-device-resize-handle",onpointerdown:Y,onpointermove:Q,onpointerup:B,onpointercancel:B})}M(()=>q(H,e(j))),C(y,k)};he(d,y=>{e(T)||y(b)})}return oe(N),oe(l),pt(l,y=>F=y,()=>F),M(()=>{Et(l,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(T)?"bg-background":"bg-muted/40"}`),Et(N,1,`relative overflow-hidden bg-background ${e(T)?"h-full w-full":e($)?"ring-2 ring-primary/30":""}`),Ke(N,"data-browser-device-frame",e(T)?void 0:""),Ke(N,"data-width",e(T)?void 0:e(O)),Ke(N,"data-height",e(T)?void 0:e(f)),ae=xo(N,"",ae,{width:e(T)?void 0:`${e(ge)}px`,height:e(T)?void 0:`${e(D)}px`})}),C(o,l),Xe(c)}function qr(o,r){if(new.target)return qe({component:qr,...o});Ze(r,!0);let a=_(r,"active",7),m=_(r,"disabled",7),L=_(r,"onToggle",7);var R={get active(){return a()},set active(E){a(E),h()},get disabled(){return m()},set disabled(E){m(E),h()},get onToggle(){return L()},set onToggle(E){L(E),h()},$set:He,$on:(E,v)=>je(r,E,v)};{let E=w(()=>a()?"bg-muted text-foreground":""),v=w(()=>a()?u.browser_embedded_cancelElementSelection_tooltip():u.browser_embedded_selectElement_tooltip()),O=w(()=>a()?u.browser_embedded_cancelElementSelection_ariaLabel():u.browser_embedded_selectElement_ariaLabel());Te(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(E)},get onclick(){return L()},get disabled(){return m()},get tooltip(){return e(v)},tooltipSide:"bottom",get"aria-label"(){return e(O)},get"aria-pressed"(){return a()},"data-testid":"browser-select-element",children:(f,F)=>{we(f,{get icon(){return Yt},size:"xs"})},$$slots:{default:!0}})}return Xe(R)}function Nn(o,r,a){const m=a.width>0?r.width/a.width:1,L=a.height>0?r.height/a.height:1,R=Math.max(0,Math.floor(o.x*m)),E=Math.max(0,Math.floor(o.y*L)),v=Math.min(r.width,Math.ceil((o.x+o.width)*m)),O=Math.min(r.height,Math.ceil((o.y+o.height)*L));return{x:R,y:E,width:Math.max(0,v-R),height:Math.max(0,O-E)}}const On=xr({selector:it().min(1),domPath:it().min(1),tagName:it().min(1),id:it(),className:it(),textSnippet:it().max(120),rect:xr({x:Tt().finite(),y:Tt().finite(),width:Tt().finite().nonnegative(),height:Tt().finite().nonnegative()}).strict(),pageUrl:it().min(1),sourceRef:it().min(1).optional()}).strict(),Er="__INTENT_ELEMENT_PICKED__:";function Dn(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Er))return null;let r;try{r=JSON.parse(o.slice(Er.length))}catch{r=null}const a=On.safeParse(r);return a.success?{type:"picked",element:a.data}:{type:"malformed",issues:a.error.issues}}const Mn=String.raw`
|
|
1
|
+
import{t as qe,bq as _,bo as u,a_ as he,by as He,b as je,bt as Rr,bu as ht,bs as Fr}from"./D4MoKNoK.js";import{bs as Ze,ay as K,be as dt,b$ as tt,b_ as M,bO as q,W as C,bS as p,aD as e,a7 as vt,bl as Ce,bn as Xe,c9 as w,aA as h,aB as ee,ca as Pe,c0 as yt,bH as i,a5 as re,bA as oe,bV as A,br as xt,bk as Tr,bj as Sr,bf as _o,c5 as Ct,aw as Xt,bz as ho,cd as Kt}from"./B8o4lNgr.js";import{c as X}from"./BPQohPc9.js";import{h as wr,i as yo,k as Et,s as Ke,l as xo,I as Co,a as kt}from"./WVYGrHqE.js";import{b as pt}from"./D2g8BuR1.js";import{d as br}from"./BMqkZHSQ.js";import{D as ko,B as Io,I as Eo}from"./HfuFYz2u.js";import{c as rr}from"./ChTqQfQN.js";import{b as Po}from"./CQTIadOp.js";import{f as Te,bb as Lo}from"./DgFojmqv.js";import{n as at}from"./BjO6mATN.js";import{s as Ro}from"./WZHg24tN.js";import{cf as $r,F as we,a6 as Fo,aU as To,ao as So,cz as $o,aI as Uo,aV as Yt,$ as or,a1 as nr,aY as Bo,at as Ao,c9 as Ur,bL as Br,b5 as No,cH as Oo,cd as Do}from"./CG5J-qd_.js";import"./De4WWpS0.js";import{G2 as Ee,fz as Mo,bm as Vo,xb as Wo,wy as zo,HW as mr,dD as Go,bF as Ko,HV as qo,sA as Ho,HT as _r,gf as jo,s0 as Zo,HU as Xo,HA as hr,HS as yr}from"./C51KzdSG.js";import{a as Ar,B as It}from"./CVBBsS8i.js";import{bU as Yo}from"./1lVCCXL6.js";import{Z as Jo}from"./9s6R6NFl.js";import{w as Qo,J as en}from"./Di6XfBOT.js";import{I as $t}from"./CS1d84Cn.js";import{d as tn}from"./OX_6myWb.js";import{a7 as rn}from"./Bj2YjLqH.js";import{i as Jt}from"./DDhakcOb.js";import{i as on,a as nn}from"./B7R5ywXv.js";import{R as an,n as qt,o as lt,m as sn,l as ze,s as Nr,k as Or,K as ln,p as dn,r as un,q as cn,M as Dr}from"./BQ-Vdhjp.js";import{k as fn,B as gn}from"./Dbuv3b_7.js";import"./Ds7can9q.js";import{t as Ae}from"./C8yAGnZY.js";import{M as Mr}from"./D8_OuTD3.js";import"./S9ot6IO_.js";import"./C_fEvnNK.js";import"./BrXpFLv_.js";import{o as xr,s as it,n as Tt}from"./CpHIRYx9.js";import{g as vn}from"./CoSk1zgY.js";import{f as pn}from"./iPSaMdjW.js";import{aA as wn,a2 as bn,O as mn}from"./CJQrM64N.js";import{aM as _n}from"./dimBDqRX.js";function hn(o,r){return o.loadURL(r)}function yn(o){return{previousUrlProp:o||null}}function Cr(o,r){o.previousUrlProp=r}function xn(o,r,a){const m=a||r;return o.previousUrlProp===m?null:(o.previousUrlProp=m,m)}function Cn(o,r,a){return r?o.previousUrlProp===null?(o.previousUrlProp=r,{shouldLoad:!1,targetUrl:null}):r===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:a.webviewReady?(o.previousUrlProp=r,a.isValidBrowserUrl(r)?{shouldLoad:!0,targetUrl:r}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const Vr=rr("TabBoundsReporter"),kn=150;function Ht(o,r,a){!(r>0)||!(a>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:r,height:a}).catch(m=>{Vr.debug("Failed to report tab bounds",{tabId:o,error:m})})}function kr(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(r=>{Vr.debug("Failed to clear tab bounds",{tabId:o,error:r})})}function In(o,r){let a=r,m;const L=typeof ResizeObserver>"u"?void 0:new ResizeObserver(R=>{if(!a)return;const E=R[R.length-1]?.contentRect;if(!E)return;const v=a;clearTimeout(m),m=setTimeout(()=>{Ht(v,E.width,E.height)},kn)});if(L?.observe(o),a){const R=o.getBoundingClientRect();Ht(a,R.width,R.height)}return{update(R){if(R!==a&&(clearTimeout(m),a&&kr(a),a=R,a)){const E=o.getBoundingClientRect();Ht(a,E.width,E.height)}},destroy(){clearTimeout(m),L?.disconnect(),a&&kr(a)}}}function Wr(o){let r=o.trim();if(!r)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(r)||(r=(r.includes("localhost")||r.includes("127.0.0.1")||r.includes("0.0.0.0")?"http://":"https://")+r);try{return new URL(r),r}catch{return null}}function st(o,r=typeof window<"u"?window.location.origin:""){if(o==="about:blank")return!0;if(!o)return!1;try{const a=new URL(o);return Ar.NAVIGATION_ALLOWED.includes(a.protocol)&&a.origin!==r}catch{return!1}}const Ut=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function En(o){return{...o,width:o.height,height:o.width}}var Pn=ee('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),jt=ee("<!> <!> <!>",1),Ln=ee('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),Zt=ee("<!> <!>",1);function ar(o,r){if(new.target)return qe({component:ar,...o});Ze(r,!0);let a=_(r,"viewport",7),m=_(r,"onViewportChange",7),L=_(r,"onCustom",7);const R=["phone","tablet","desktop"],E=w(()=>a().mode==="fit"?"fit":a().mode==="preset"?a().presetId:"custom");function v(I){if(I==="fit")return m()({mode:"fit"});const x=Ut.find(Z=>Z.id===I);x&&m()({mode:"preset",presetId:x.id,width:x.width,height:x.height})}var O={get viewport(){return a()},set viewport(I){a(I),h()},get onViewportChange(){return m()},set onViewportChange(I){m(I),h()},get onCustom(){return L()},set onCustom(I){L(I),h()},$set:He,$on:(I,x)=>je(r,I,x)},f=jt(),F=K(f);X(F,()=>an,(I,x)=>{x(I,{get value(){return e(E)},onValueChange:v,children:(Z,J)=>{var G=jt(),T=K(G);X(T,()=>qt,(D,s)=>{s(D,{value:"fit",children:(U,ne)=>{dt();var Y=tt();M(Q=>q(Y,Q),[()=>u.browser_viewport_fitPanel_label()]),C(U,Y)},$$slots:{default:!0}})});var j=p(T,2);wr(j,17,()=>R,yo,(D,s)=>{var U=jt(),ne=K(U);X(ne,()=>lt,(B,c)=>{c(B,{})});var Y=p(ne,2);X(Y,()=>sn,(B,c)=>{c(B,{children:(l,N)=>{dt();var ae=tt();M(Ie=>q(ae,Ie),[()=>e(s)==="phone"?u.browser_viewport_phoneGroup_label():e(s)==="tablet"?u.browser_viewport_tabletGroup_label():u.browser_viewport_desktopGroup_label()]),C(l,ae)},$$slots:{default:!0}})});var Q=p(Y,2);wr(Q,17,()=>Ut.filter(B=>B.category===e(s)),B=>B.id,(B,c)=>{var l=vt(),N=K(l);X(N,()=>qt,(ae,Ie)=>{Ie(ae,{get value(){return e(c).id},children:(d,b)=>{var y=Pn(),k=K(y),W=Ce(k,!0),H=p(k,2),ie=Ce(H,!0);M(ye=>{q(W,e(c).name),q(ie,ye)},[()=>u.browser_viewport_dimensions_label({width:Ae(e(c).width),height:Ae(e(c).height)})]),C(d,y)},$$slots:{default:!0}})}),C(B,l)}),C(D,U)});var le=p(j,2);{var ge=D=>{var s=Zt(),U=K(s);X(U,()=>lt,(Y,Q)=>{Q(Y,{})});var ne=p(U,2);X(ne,()=>qt,(Y,Q)=>{Q(Y,{value:"custom",get onSelect(){return L()},children:(B,c)=>{var l=Ln(),N=K(l),ae=Ce(N,!0),Ie=p(N,2),d=Ce(Ie,!0);M((b,y)=>{q(ae,b),q(d,y)},[()=>u.browser_viewport_custom_label(),()=>u.browser_viewport_dimensions_label({width:Ae(a().width),height:Ae(a().height)})]),C(B,l)},$$slots:{default:!0}})}),C(D,s)};he(le,D=>{a().mode==="custom"&&D(ge)})}C(Z,G)},$$slots:{default:!0}})});var z=p(F,2);{var P=I=>{var x=Zt(),Z=K(x);X(Z,()=>lt,(G,T)=>{T(G,{})});var J=p(Z,2);X(J,()=>ze,(G,T)=>{T(G,{get onSelect(){return L()},children:(j,le)=>{dt();var ge=tt();M(D=>q(ge,D),[()=>u.browser_viewport_custom_label()]),C(j,ge)},$$slots:{default:!0}})}),C(I,x)};he(z,I=>{a().mode!=="custom"&&I(P)})}var $=p(z,2);{var V=I=>{var x=Zt(),Z=K(x);X(Z,()=>lt,(G,T)=>{T(G,{})});var J=p(Z,2);{let G=w(()=>u.browser_viewport_rotate_label());X(J,()=>Mr,(T,j)=>{j(T,{get icon(){return $r},get label(){return e(G)},onSelect:()=>m()(En(a()))})})}C(I,x)};he($,I=>{a().mode!=="fit"&&I(V)})}return C(o,f),Xe(O)}var Rn=ee('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function ir(o,r){if(new.target)return qe({component:ir,...o});Ze(r,!0);let a=_(r,"open",15,!1),m=_(r,"viewport",7),L=_(r,"onViewportChange",7),R=_(r,"returnFocus",7);const E=320,v=3840;let O=A(1280),f=A(800),F=A(null);function z(I){return typeof I=="number"&&Number.isInteger(I)&&I>=E&&I<=v}const P=w(()=>z(e(O))&&z(e(f)));Pe(()=>{if(a())return()=>{yt().then(()=>{R()?.isConnected&&R().focus()})}}),Pe(()=>{a()||(i(O,m().mode==="fit"?1280:m().width,!0),i(f,m().mode==="fit"?800:m().height,!0))});function $(){!e(P)||e(O)===null||e(f)===null||(L()({mode:"custom",width:e(O),height:e(f)}),a(!1))}var V={get open(){return a()},set open(I=!1){a(I),h()},get viewport(){return m()},set viewport(I){m(I),h()},get onViewportChange(){return L()},set onViewportChange(I){L(I),h()},get returnFocus(){return R()},set returnFocus(I){R(I),h()},$set:He,$on:(I,x)=>je(r,I,x)};{let I=w(()=>u.browser_viewport_custom_label()),x=w(()=>u.browser_viewport_sizeRange_description({min:Ae(E),max:Ae(v)})),Z=w(()=>u.browser_viewport_apply_label());fn(o,{get title(){return e(I)},get description(){return e(x)},get submitLabel(){return e(Z)},get canSubmit(){return e(P)},onSubmit:$,get initialFocus(){return e(F)},get open(){return a()},set open(J){a(J)},children:(J,G)=>{var T=Rn(),j=re(T),le=re(j),ge=Ce(le,!0),D=p(le,2);{let Q=w(()=>!z(e(O)));$t(D,{type:"number",min:E,max:v,step:"1",get"aria-invalid"(){return e(Q)},get value(){return e(O)},set value(B){i(O,B,!0)},get ref(){return e(F)},set ref(B){i(F,B,!0)}})}oe(j);var s=p(j,2),U=re(s),ne=Ce(U,!0),Y=p(U,2);{let Q=w(()=>!z(e(f)));$t(Y,{type:"number",min:E,max:v,step:"1",get"aria-invalid"(){return e(Q)},get value(){return e(f)},set value(B){i(f,B,!0)}})}oe(s),oe(T),M((Q,B)=>{q(ge,Q),q(ne,B)},[()=>u.browser_viewport_width_label(),()=>u.browser_viewport_height_label()]),C(J,T)},$$slots:{default:!0}})}return Xe(V)}var St=ee("<!> <!>",1),et=ee("<!> ",1),Fn=ee('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),Tn=ee("<!> <!> <!> <!> <!>",1),Sn=ee('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),$n=ee("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function zr(o,r){if(new.target)return qe({component:zr,...o});Ze(r,!0);let a=_(r,"errorCount",7,0),m=_(r,"disabled",7,!1),L=_(r,"collapsed",7,!1),R=_(r,"canGoBack",7,!1),E=_(r,"canGoForward",7,!1),v=_(r,"canSelectElement",7,!1),O=_(r,"selectingElement",7,!1),f=_(r,"viewport",23,()=>({mode:"fit"})),F=_(r,"onGoBack",7),z=_(r,"onGoForward",7),P=_(r,"onToggleElementPicker",7),$=_(r,"onViewportChange",7),V=_(r,"onOpenExternal",7),I=_(r,"onCopyUrl",7),x=_(r,"onScreenshot",7),Z=_(r,"onOpenConsole",7),J=_(r,"onOpenSource",7),G=_(r,"onOpenInspector",7),T=_(r,"onReloadWithoutCache",7);const j=w(()=>a()>0?u.browser_overflow_triggerWithErrors_ariaLabel({count:Ae(a())}):u.browser_overflow_trigger_ariaLabel()),le=w(()=>f().mode==="preset"?Ut.find(l=>l.id===f().presetId):void 0),ge=w(()=>f().mode==="fit"?u.browser_viewport_fitPanel_label():e(le)?.name??u.browser_viewport_dimensions_label({width:Ae(f().width),height:Ae(f().height)}));let D=A(!1),s=A(null),U=A(!1);async function ne(){i(U,!1),await yt(),i(D,!0)}var Y={get errorCount(){return a()},set errorCount(l=0){a(l),h()},get disabled(){return m()},set disabled(l=!1){m(l),h()},get collapsed(){return L()},set collapsed(l=!1){L(l),h()},get canGoBack(){return R()},set canGoBack(l=!1){R(l),h()},get canGoForward(){return E()},set canGoForward(l=!1){E(l),h()},get canSelectElement(){return v()},set canSelectElement(l=!1){v(l),h()},get selectingElement(){return O()},set selectingElement(l=!1){O(l),h()},get viewport(){return f()},set viewport(l={mode:"fit"}){f(l),h()},get onGoBack(){return F()},set onGoBack(l){F(l),h()},get onGoForward(){return z()},set onGoForward(l){z(l),h()},get onToggleElementPicker(){return P()},set onToggleElementPicker(l){P(l),h()},get onViewportChange(){return $()},set onViewportChange(l){$(l),h()},get onOpenExternal(){return V()},set onOpenExternal(l){V(l),h()},get onCopyUrl(){return I()},set onCopyUrl(l){I(l),h()},get onScreenshot(){return x()},set onScreenshot(l){x(l),h()},get onOpenConsole(){return Z()},set onOpenConsole(l){Z(l),h()},get onOpenSource(){return J()},set onOpenSource(l){J(l),h()},get onOpenInspector(){return G()},set onOpenInspector(l){G(l),h()},get onReloadWithoutCache(){return T()},set onReloadWithoutCache(l){T(l),h()},$set:He,$on:(l,N)=>je(r,l,N)},Q=St(),B=K(Q);X(B,()=>Dr,(l,N)=>{N(l,{get open(){return e(U)},set open(ae){i(U,ae,!0)},children:(ae,Ie)=>{var d=St(),b=K(d);{const k=(W,H)=>{let ie=()=>(H?.()).props;{let ye=w(()=>u.browser_overflow_trigger_tooltip());Te(W,Rr(ie,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return m()},get tooltip(){return e(ye)},tooltipSide:"bottom",get"aria-label"(){return e(j)},"data-testid":"browser-overflow-trigger",get ref(){return e(s)},set ref(ve){i(s,ve,!0)},children:(ve,De)=>{var Ve=St(),Le=K(Ve);ln(Le,{class:"size-3.5"});var Re=p(Le,2);{var _e=Se=>{gn(Se,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(ut,rt)=>{dt();var ct=tt();M(Ye=>q(ct,Ye),[()=>a()>9?"9+":Ae(a())]),C(ut,ct)},$$slots:{default:!0}})};he(Re,Se=>{a()>0&&Se(_e)})}C(ve,Ve)},$$slots:{default:!0}}))}};X(b,()=>Nr,(W,H)=>{H(W,{child:k,$$slots:{child:!0}})})}var y=p(b,2);X(y,()=>Or,(k,W)=>{W(k,{align:"end",class:"w-56",onCloseAutoFocus:H=>e(D)&&H.preventDefault(),children:(H,ie)=>{var ye=$n(),ve=K(ye);{var De=ue=>{var pe=Tn(),be=K(pe);{let se=w(()=>!R());X(be,()=>ze,(me,Je)=>{Je(me,{get disabled(){return e(se)},get onSelect(){return F()},children:(ot,Ge)=>{var $e=et(),Ne=K($e);we(Ne,{get icon(){return or},size:"xs",class:"w-4 text-muted-foreground"});var Ue=p(Ne);M(Oe=>q(Ue,` ${Oe??""}`),[()=>u.browser_embedded_goBack_ariaLabel()]),C(ot,$e)},$$slots:{default:!0}})})}var Fe=p(be,2);{let se=w(()=>!E());X(Fe,()=>ze,(me,Je)=>{Je(me,{get disabled(){return e(se)},get onSelect(){return z()},children:(ot,Ge)=>{var $e=et(),Ne=K($e);we(Ne,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var Ue=p(Ne);M(Oe=>q(Ue,` ${Oe??""}`),[()=>u.browser_embedded_goForward_ariaLabel()]),C(ot,$e)},$$slots:{default:!0}})})}var ce=p(Fe,2);{let se=w(()=>!v());X(ce,()=>ze,(me,Je)=>{Je(me,{get disabled(){return e(se)},onSelect:()=>void P()?.(),children:(ot,Ge)=>{var $e=et(),Ne=K($e);we(Ne,{get icon(){return Yt},size:"xs",class:"w-4 text-muted-foreground"});var Ue=p(Ne);M(Oe=>q(Ue,` ${Oe??""}`),[()=>O()?u.browser_embedded_cancelElementSelection_ariaLabel():u.browser_embedded_selectElement_ariaLabel()]),C(ot,$e)},$$slots:{default:!0}})})}var de=p(ce,2);X(de,()=>dn,(se,me)=>{me(se,{children:(Je,ot)=>{var Ge=St(),$e=K(Ge);{let Ue=w(()=>!$());X($e,()=>un,(Oe,ft)=>{ft(Oe,{get disabled(){return e(Ue)},children:(bt,mt)=>{var _t=Fn(),Pt=K(_t);we(Pt,{get icon(){return Bo},size:"xs",class:"w-4 text-muted-foreground"});var Lt=p(Pt,2),Rt=Ce(Lt,!0);M(Bt=>q(Rt,Bt),[()=>u.browser_viewport_trigger_ariaLabel({mode:e(ge)})]),C(bt,_t)},$$slots:{default:!0}})})}var Ne=p($e,2);X(Ne,()=>cn,(Ue,Oe)=>{Oe(Ue,{class:"w-64",children:(ft,bt)=>{ar(ft,{get viewport(){return f()},onViewportChange:mt=>$()?.(mt),onCustom:ne})},$$slots:{default:!0}})}),C(Je,Ge)},$$slots:{default:!0}})});var xe=p(de,2);X(xe,()=>lt,(se,me)=>{me(se,{})}),C(ue,pe)};he(ve,ue=>{L()&&ue(De)})}var Ve=p(ve,2);X(Ve,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void V()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return Fo},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_openExternal_label()]),C(be,ce)},$$slots:{default:!0}})});var Le=p(Ve,2);X(Le,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void I()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return To},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_copyUrl_label()]),C(be,ce)},$$slots:{default:!0}})});var Re=p(Le,2);X(Re,()=>lt,(ue,pe)=>{pe(ue,{})});var _e=p(Re,2);X(_e,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void x()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return So},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_screenshot_label()]),C(be,ce)},$$slots:{default:!0}})});var Se=p(_e,2);X(Se,()=>lt,(ue,pe)=>{pe(ue,{})});var ut=p(Se,2);X(ut,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void Z()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return $o},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_console_label()]),C(be,ce)},$$slots:{default:!0}})});var rt=p(ut,2);X(rt,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void J()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return Uo},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_source_label()]),C(be,ce)},$$slots:{default:!0}})});var ct=p(rt,2);X(ct,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void G()(),children:(be,Fe)=>{var ce=Sn(),de=K(ce);we(de,{get icon(){return Yt},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de,2),se=Ce(xe,!0);dt(2),M(me=>q(se,me),[()=>u.browser_overflow_inspector_label()]),C(be,ce)},$$slots:{default:!0}})});var Ye=p(ct,2);X(Ye,()=>lt,(ue,pe)=>{pe(ue,{})});var wt=p(Ye,2);X(wt,()=>ze,(ue,pe)=>{pe(ue,{onSelect:()=>void T()(),children:(be,Fe)=>{var ce=et(),de=K(ce);we(de,{get icon(){return $r},size:"xs",class:"w-4 text-muted-foreground"});var xe=p(de);M(se=>q(xe,` ${se??""}`),[()=>u.browser_overflow_reloadWithoutCache_label()]),C(be,ce)},$$slots:{default:!0}})}),C(H,ye)},$$slots:{default:!0}})}),C(ae,d)},$$slots:{default:!0}})});var c=p(B,2);return ir(c,{get viewport(){return f()},onViewportChange:l=>$()?.(l),get returnFocus(){return e(s)},get open(){return e(D)},set open(l){i(D,l,!0)}}),C(o,Q),Xe(Y)}var Un=ee('<span class="truncate"> </span> <!>',1),Ir=ee("<!> <!>",1);function Gr(o,r){if(new.target)return qe({component:Gr,...o});Ze(r,!0);let a=_(r,"viewport",7),m=_(r,"onViewportChange",7),L=A(!1),R=A(!1),E=A(null);const v=w(()=>a().mode==="preset"?Ut.find(x=>x.id===a().presetId):void 0),O=w(()=>a().mode==="fit"?"":u.browser_viewport_dimensions_label({width:Ae(a().width),height:Ae(a().height)})),f=w(()=>a().mode==="fit"?u.browser_viewport_fit_short_label():a().mode==="preset"&&e(v)?e(v).name:e(O)),F=w(()=>a().mode==="fit"?u.browser_viewport_fitPanel_label():e(f));async function z(){i(L,!1),await yt(),i(R,!0)}var P={get viewport(){return a()},set viewport(x){a(x),h()},get onViewportChange(){return m()},set onViewportChange(x){m(x),h()},$set:He,$on:(x,Z)=>je(r,x,Z)},$=Ir(),V=K($);X(V,()=>Dr,(x,Z)=>{Z(x,{get open(){return e(L)},set open(J){i(L,J,!0)},children:(J,G)=>{var T=Ir(),j=K(T);{const ge=(D,s)=>{let U=()=>(s?.()).props;{let ne=w(()=>u.browser_viewport_trigger_ariaLabel({mode:e(F)}));Te(D,Rr(U,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(ne)},"data-testid":"browser-viewport-trigger",get ref(){return e(E)},set ref(Y){i(E,Y,!0)},children:(Y,Q)=>{var B=Un(),c=K(B),l=Ce(c,!0),N=p(c,2);we(N,{get icon(){return Ao},size:"xs",class:"shrink-0"}),M(()=>q(l,e(f))),C(Y,B)},$$slots:{default:!0}}))}};X(j,()=>Nr,(D,s)=>{s(D,{child:ge,$$slots:{child:!0}})})}var le=p(j,2);X(le,()=>Or,(ge,D)=>{D(ge,{align:"end",class:"w-64",onCloseAutoFocus:s=>e(R)&&s.preventDefault(),children:(s,U)=>{ar(s,{get viewport(){return a()},get onViewportChange(){return m()},onCustom:z})},$$slots:{default:!0}})}),C(J,T)},$$slots:{default:!0}})});var I=p(V,2);return ir(I,{get viewport(){return a()},get onViewportChange(){return m()},get returnFocus(){return e(E)},get open(){return e(R)},set open(x){i(R,x,!0)}}),C(o,$),Xe(P)}var Bn=ee('<span class="pointer-events-none absolute bottom-1 left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur" data-browser-viewport-readout=""> </span> <!>',1),An=ee('<div data-browser-device-frame-container=""><div><!> <!></div></div>');function Kr(o,r){if(new.target)return qe({component:Kr,...o});Ze(r,!0);const a=320,m=3840,L=150;let R=_(r,"viewport",7),E=_(r,"onViewportChange",7),v=_(r,"children",7),O=A(xt(R().mode==="fit"?a:R().width)),f=A(xt(R().mode==="fit"?a:R().height)),F,z=A(0),P=A(0),$=A(!1),V=null,I=0,x=0,Z=0,J=0,G;const T=w(()=>R().mode==="fit"),j=w(()=>u.browser_viewport_dimensions_label({width:Ae(e(O)),height:Ae(e(f))})),le=w(()=>!e(T)&&e(z)>0&&e(P)>0?Math.min(1,e(z)/e(O),e(P)/e(f)):1),ge=w(()=>e(O)*e(le)),D=w(()=>e(f)*e(le));Pe(()=>{e($)||R().mode==="fit"||(i(O,R().width,!0),i(f,R().height,!0))});function s(y){return Math.min(m,Math.max(a,Math.round(y)))}function U(){E()({mode:"custom",width:e(O),height:e(f)})}function ne(){clearTimeout(G),G=setTimeout(U,L)}function Y(y){e(T)||y.button!==0||(y.preventDefault(),i($,!0),V=y.pointerId,I=y.clientX,x=y.clientY,Z=e(O),J=e(f),y.currentTarget instanceof HTMLElement&&y.currentTarget.setPointerCapture?.(y.pointerId))}function Q(y){!e($)||y.pointerId!==V||(i(O,s(Z+y.clientX-I),!0),i(f,s(J+y.clientY-x),!0),ne())}function B(y){if(!e($)||y.pointerId!==V)return;clearTimeout(G),i($,!1),V=null;const k=y.currentTarget;k instanceof HTMLElement&&k.hasPointerCapture?.(y.pointerId)&&k.releasePointerCapture&&k.releasePointerCapture(y.pointerId),U()}Tr(()=>{const y=(W,H)=>{i(z,W,!0),i(P,H,!0)};y(F.clientWidth,F.clientHeight);const k=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([W])=>{y(W?.contentRect.width??F.clientWidth,W?.contentRect.height??F.clientHeight)});return k?.observe(F),()=>k?.disconnect()}),Sr(()=>clearTimeout(G));var c={get viewport(){return R()},set viewport(y){R(y),h()},get onViewportChange(){return E()},set onViewportChange(y){E(y),h()},get children(){return v()},set children(y){v(y),h()},$set:He,$on:(y,k)=>je(r,y,k)},l=An(),N=re(l);let ae;var Ie=re(N);Ro(Ie,()=>v()??_o);var d=p(Ie,2);{var b=y=>{var k=Bn(),W=K(k),H=Ce(W,!0),ie=p(W,2);{let ye=w(()=>u.browser_viewport_resizeHandle_ariaLabel());Te(ie,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,class:"absolute bottom-0 right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground",get"aria-label"(){return e(ye)},"data-testid":"browser-device-resize-handle",onpointerdown:Y,onpointermove:Q,onpointerup:B,onpointercancel:B})}M(()=>q(H,e(j))),C(y,k)};he(d,y=>{e(T)||y(b)})}return oe(N),oe(l),pt(l,y=>F=y,()=>F),M(()=>{Et(l,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(T)?"bg-background":"bg-muted/40"}`),Et(N,1,`relative overflow-hidden bg-background ${e(T)?"h-full w-full":e($)?"ring-2 ring-primary/30":""}`),Ke(N,"data-browser-device-frame",e(T)?void 0:""),Ke(N,"data-width",e(T)?void 0:e(O)),Ke(N,"data-height",e(T)?void 0:e(f)),ae=xo(N,"",ae,{width:e(T)?void 0:`${e(ge)}px`,height:e(T)?void 0:`${e(D)}px`})}),C(o,l),Xe(c)}function qr(o,r){if(new.target)return qe({component:qr,...o});Ze(r,!0);let a=_(r,"active",7),m=_(r,"disabled",7),L=_(r,"onToggle",7);var R={get active(){return a()},set active(E){a(E),h()},get disabled(){return m()},set disabled(E){m(E),h()},get onToggle(){return L()},set onToggle(E){L(E),h()},$set:He,$on:(E,v)=>je(r,E,v)};{let E=w(()=>a()?"bg-muted text-foreground":""),v=w(()=>a()?u.browser_embedded_cancelElementSelection_tooltip():u.browser_embedded_selectElement_tooltip()),O=w(()=>a()?u.browser_embedded_cancelElementSelection_ariaLabel():u.browser_embedded_selectElement_ariaLabel());Te(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(E)},get onclick(){return L()},get disabled(){return m()},get tooltip(){return e(v)},tooltipSide:"bottom",get"aria-label"(){return e(O)},get"aria-pressed"(){return a()},"data-testid":"browser-select-element",children:(f,F)=>{we(f,{get icon(){return Yt},size:"xs"})},$$slots:{default:!0}})}return Xe(R)}function Nn(o,r,a){const m=a.width>0?r.width/a.width:1,L=a.height>0?r.height/a.height:1,R=Math.max(0,Math.floor(o.x*m)),E=Math.max(0,Math.floor(o.y*L)),v=Math.min(r.width,Math.ceil((o.x+o.width)*m)),O=Math.min(r.height,Math.ceil((o.y+o.height)*L));return{x:R,y:E,width:Math.max(0,v-R),height:Math.max(0,O-E)}}const On=xr({selector:it().min(1),domPath:it().min(1),tagName:it().min(1),id:it(),className:it(),textSnippet:it().max(120),rect:xr({x:Tt().finite(),y:Tt().finite(),width:Tt().finite().nonnegative(),height:Tt().finite().nonnegative()}).strict(),pageUrl:it().min(1),sourceRef:it().min(1).optional()}).strict(),Er="__INTENT_ELEMENT_PICKED__:";function Dn(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Er))return null;let r;try{r=JSON.parse(o.slice(Er.length))}catch{r=null}const a=On.safeParse(r);return a.success?{type:"picked",element:a.data}:{type:"malformed",issues:a.error.issues}}const Mn=String.raw`
|
|
2
2
|
(function() {
|
|
3
3
|
var PICKED_PREFIX = '__INTENT_ELEMENT_PICKED__:';
|
|
4
4
|
var CANCELLED = '__INTENT_ELEMENT_PICK_CANCELLED__';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as n}from"./
|
|
1
|
+
import{g as l,r as m,d as n}from"./C4eeWJf-.js";import{p}from"./B0a31Ljt.js";import{M as u,a as f}from"./u9Jr5xJ2.js";import{a as t,ad as o}from"./_eQjP0_7.js";import"./CdT170lG.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},R={parser:g,db:n,renderer:m,styles:l};export{R as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,a,s as r,S as s}from"./
|
|
1
|
+
import{b as t,a,s as r,S as s}from"./DG5KvEVf.js";import{a as i}from"./_eQjP0_7.js";import"./CdT170lG.js";import"./BEu9jjb7.js";var u={parser:r,get db(){return new s(2)},renderer:a,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as I}from"./
|
|
1
|
+
import{p as I}from"./UMObs5wi.js";import{c6 as _,aK as E,aP as F,c9 as D,aL as P,c7 as z,f as c,c4 as G,a0 as B,$ as C,aN as w,ax as W,bC as b,aX as V,a6 as H}from"./CdT170lG.js";import{p as X}from"./H_dyzYix.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:m},x=structuredClone(A),j=W.radar,K=c(()=>C({...j,...w().radar}),"getConfig"),M=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),Y=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule},x.options.ticks>y&&(b.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),x.options.ticks=y)},"setOptions"),Q=c(()=>{B(),x=structuredClone(A)},"clear"),$={getAxes:M,getCurves:N,getOptions:U,setAxes:Y,setCurves:Z,setOptions:J,getConfig:K,clear:Q,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${s};
|
|
4
4
|
fill: ${s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as Na,s as ia}from"./
|
|
1
|
+
import{k as Na,s as ia}from"./BlGCnZqu.js";import{j as la,h as an,s as G,k as de,l as rn,I as Da,c as Ma,a as On}from"./WVYGrHqE.js";import{Z as za,cz as Fa,z as Ha,aR as bn,bH as ja,u as Ba}from"./t61BPD62.js";import{G2 as M,l8 as Ua,c6 as Dn,c4 as da,c7 as hn,pB as qa,AP as Wa,fr as ca,AT as Ka,bn as Ga,xd as Qa,lp as Yn,s3 as Ya,ca as Va,sA as Vn,mh as Xa,AA as Za,AS as Ja,bU as er}from"./C51KzdSG.js";import{bo as u,t as xt,bq as v,by as At,b as $t,bs as zn,a_ as E,bu as ge,bt as tr}from"./D4MoKNoK.js";import{bs as St,a5 as D,bl as be,bS as T,aD as e,W as g,bA as O,b_ as S,bO as U,be as Mt,b$ as wt,bn as It,c9 as i,aA as h,aB as b,ca as Ce,cd as kt,a7 as He,ay as K,bV as V,br as ua,bH as f,bo as nr,c5 as ar,bi as Ln,bj as rr,bf as mn,am as Xn,ax as Zn,ai as sr,aj as or,c0 as ir}from"./B8o4lNgr.js";import{s as ga}from"./WZHg24tN.js";import{f as lr}from"./DOE_TCNp.js";import{a as dr,H as pa,t as Gt}from"./C8yAGnZY.js";import{r as cr,o as ur,A as Jn,L as gr}from"./DXJ3D6-0.js";import{S as vn,t as En}from"./Ds7can9q.js";import{R as ea}from"./BjO6mATN.js";import{I as fa}from"./CS1d84Cn.js";import"./S9ot6IO_.js";import{aA as _n,cv as pr,ak as fr,ay as mr,cp as vr,cq as hr,ag as _r,ai as br,ap as wr,au as kr,k as yr,F as xr,dK as Ar,L as $r,cg as Sr,bP as Ir}from"./dimBDqRX.js";import{z as Cr,A as Pr,ak as Tr,af as Rr,L as Or}from"./Bj2YjLqH.js";import{k as Lr}from"./DBmzovBA.js";import{f as ta}from"./iPSaMdjW.js";import{h as Er,g as Nr}from"./fJdmRaXe.js";import"./C_fEvnNK.js";import{ap as Dr,f as Nn,a5 as Mr,bb as na}from"./DgFojmqv.js";import"./BrXpFLv_.js";import{c as zr,r as Fr,q as Hr,p as jr,E as Br}from"./BQ-Vdhjp.js";import{n as Ur,D as qr,k as Wr,c as Kr,d as Gr,b as Qr,A as Yr,p as Vr,P as Xr}from"./Dbuv3b_7.js";import{F as Zr,e as Jr,b7 as es,d as ts,bj as ns}from"./1lVCCXL6.js";import{c as ze}from"./BPQohPc9.js";import{T as as}from"./DmVYXUKU.js";import{cc as ma,cD as rs,cC as ss,bK as os,x as is,F as wn,b0 as ls,ar as ds,aG as cs,aC as us,cH as gs,b9 as ps,ax as fs,X as ms,aY as vs,ae as aa,a6 as hs,bZ as _s,ad as bs,cu as ws,ak as ks,cG as ys,aA as xs}from"./CG5J-qd_.js";import{b as As}from"./D2g8BuR1.js";import"./bjlKIwQF.js";import{f as $s}from"./BJ5sH6i3.js";const Ss=80,Is=10,Cs=new za(Fa,{renderer:{html({text:a}){return Ha(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Fn(a){const n=document.createElement("template");n.innerHTML=Cs.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function yt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Mn(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function kn(a,n){return!n||n.length>Ss||n.split(/\s+/).length>Is||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function ci(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const l=yt(o[1]);return kn(o[0],l)?l:null}function Hn(a,n=!1,o=!0){const l=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",s=a.slice(l.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!s)return null;if(n){const w=s[1],y=w.match(/\\+$/)?.[0].length??0;if(w!==w.trim()||w.includes("**")||w.startsWith("*")||w.endsWith("*")||y%2!==0)return null}const c=yt(s[1]);return kn(s[0],c)?{title:n&&o?Fn(s[1]):c,body:Mn(a,l.length+s[0].length)}:null}function ra(a){const n=[];let o=a;for(;o.trim();){const l=jn(o,!0),d=l.heading?{body:l.body}:Hn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function ui(a){const n=[];let o=a;for(;o.trim();){const l=jn(o,!0,Fn),d=l.heading?{title:l.heading,body:l.body}:Hn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function gi(a){const n=Ts(a),o=[];let l=a;for(n.heading&&(o.push({title:n.heading,body:""}),l=n.body);l;){const d=Hn(l);if(!d||d.body.length>=l.length)break;o.push({title:d.title,body:""}),l=d.body}if(o.length===0){const d=a.trim(),s=yt(d);return!d.includes(`
|
|
2
2
|
`)&&kn(d,s)?[{title:s,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=l.trim(),o}function Ps(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function jn(a,n=!1,o=yt){const l=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(l.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const s=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(s&&yt(s[1]))return{heading:o(s[1]),body:Mn(a,l.length+s[0].length)};const c=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return c&&(!n||Ps(c[1])&&!c[2].includes(" "))&&yt(c[1])?{heading:o(c[1]),body:Mn(a,l.length+c[0].length)}:{heading:null,body:a}}function Ts(a,{preserveInlineText:n=!1}={}){const o=n?Fn:yt,l=jn(a,!1,o);if(l.heading)return l;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",c=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(c){const w=yt(c[1]),y=a.slice(d.length+c[0].length);if(y.trim()&&kn(c[1],w))return{heading:o(c[1]),body:y}}return{heading:null,body:a}}const zt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",pi="type-body font-family-child font-normal text-muted-foreground",fi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,mi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,vi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,hi=`${zt} relative min-w-0 max-w-full`,_i=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,bi=`${zt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,wi="pt-6",ki="text-muted-foreground",yi="text-muted-foreground",va="font-normal text-muted-foreground",xi="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",Ai="h-[16px]! w-[16px]! shrink-0",$i=`${zt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,Si=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${va}`,Ii=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${va}`,Ci="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",Pi="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function Ti(a){return Na(a,{axis:"y",duration:la()?0:150})}function sn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function Ri(a){const n=a?.[0];return!n||sn(n)?"":"pt-4"}function Oi(a,n,o=()=>!0){const l=a[n];if(!l||!o(l)||!sn(l))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&sn(a[d])}function Li(a,n,o=()=>!0,l=!1){const d=a[n];if(!d||!o(d))return"";let s=n-1;for(;s>=0&&!o(a[s]);)s-=1;if(s<0)return"";const c=a[s];if(c.type==="thinking"&&d.type==="thinking")return l||ra(c.text??c.content??"")!==null&&ra(d.text??d.content??"")!==null?"":"pt-14";const w=sn(c),y=sn(d);return w&&y?"":c.type==="thinking"&&!y?"pt-6":w||y?"pt-4":"pt-1"}const Ei="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground",Bn=M.createSelector((a,n)=>a.skills.byWorkspaceId[n]??Ua),Ni=M.createSelector((a,n)=>Bn.select(a,n).skills),Di=M.createSelector((a,n)=>Bn.select(a,n).loading),Mi=M.createSelector((a,n)=>Bn.select(a,n).error);function Rs(a){if(a?.status==="halted")return u.agent_node_halted_label();if(a?.status==="resuming")return u.agent_node_resuming_label();if(a?.placement?.target==="remote"){if(a.placementError)return u.remoteAgent_status_failed();if(a.effectiveIsolation==="pending")return u.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return u.agent_node_provisioning_label()}const sa=Zr.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function Os(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function Ls(a){const n=a??{},o=sa.map(s=>({key:s.key,label:s.label(),description:s.description(),enabled:n[s.key]===!0,known:!0})),l=new Set(sa.map(s=>s.key)),d=[];for(const[s,c]of Object.entries(n))l.has(s)||d.push({key:s,label:Os(s),description:null,enabled:c===!0,known:!1});return d.sort((s,c)=>s.label.localeCompare(c.label)),o.concat(d)}var Es=b('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),Ns=b('<section class="min-w-0"><h3 class="text-sm font-medium mb-3"> </h3> <div role="list" class="space-y-4"></div></section>'),Ds=b('<div class="@container"><div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></div>');function ha(a,n){if(new.target)return xt({component:ha,...a});St(n,!0);let o=v(n,"open",15,!1),l=v(n,"static",7,!1),d=v(n,"version",7),s=v(n,"features",7,null);const c=i(()=>Ls(s())),w=i(()=>[{enabled:!0,label:u.chat_shared_valueOn_label(),rows:e(c).filter(x=>x.enabled)},{enabled:!1,label:u.chat_shared_valueOff_label(),rows:e(c).filter(x=>!x.enabled)}]);var y={get open(){return o()},set open(x=!1){o(x),h()},get static(){return l()},set static(x=!1){l(x),h()},get version(){return d()},set version(x){d(x),h()},get features(){return s()},set features(x=null){s(x),h()},$set:At,$on:(x,A)=>$t(n,x,A)};{let x=i(()=>u.chat_harnessFeaturesModal_title({version:d()})),A=i(()=>u.chat_harnessFeaturesModal_description());zr(a,{get static(){return l()},get title(){return e(x)},get description(){return e(A)},size:"wide",get open(){return o()},set open(m){o(m)},children:(m,j)=>{var I=Ds(),pe=D(I);an(pe,21,()=>e(w),Pe=>Pe.enabled,(Pe,L)=>{var Q=Ns(),p=D(Q),Te=be(p,!0),te=T(p,2);an(te,21,()=>e(L).rows,$=>$.key,($,Z)=>{Ur($,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(Z).key},get"data-enabled"(){return e(Z).enabled},title:ve=>{Mt();var ae=wt();S(()=>U(ae,e(Z).label)),g(ve,ae)},description:ve=>{Mt();var ae=wt();S(()=>U(ae,e(Z).description)),g(ve,ae)},$$slots:{title:!0,description:!0}})},$=>{var Z=Es();g($,Z)}),O(te),O(Q),S(()=>{G(Q,"aria-label",e(L).label),U(Te,e(L).label)}),g(Pe,Q)}),O(pe),O(I),g(m,I)},$$slots:{default:!0}})}return It(y)}var Ms=b('<p role="alert" class="type-body text-danger"> </p>');function _a(a,n){if(new.target)return xt({component:_a,...a});St(n,!0);const o=()=>ge(m,"$outcome$",l),[l,d]=zn();let s=v(n,"open",15,!1),c=v(n,"agentName",7),w=v(n,"workspaceId",7),y=v(n,"agentId",7);const x=crypto.randomUUID(),A=kt(""),m=bn(A,x),j=i(()=>o()?.workspaceId===w()&&o().agentId===y()?o():void 0),I=i(()=>e(j)?.status==="pending"),pe=i(()=>e(j)?.status==="failed"?e(j).error:"");Ce(()=>{const p=w();return y(),A.set(p),()=>M.dispatch(Dn(p,x))}),Ce(()=>{e(j)?.status==="succeeded"&&(s(!1),M.dispatch(da(w(),x,e(j).requestId)))});function Pe(){const p=bn.select(M.state,w(),x);p?.agentId===y()&&p.status==="pending"||M.dispatch(hn(w(),x,crypto.randomUUID(),y(),{kind:"retire"}))}var L={get open(){return s()},set open(p=!1){s(p),h()},get agentName(){return c()},set agentName(p){c(p),h()},get workspaceId(){return w()},set workspaceId(p){w(p),h()},get agentId(){return y()},set agentId(p){y(p),h()},$set:At,$on:(p,Te)=>$t(n,p,Te)};{const p=ne=>{var we=He(),ve=K(we);{var ae=ke=>{var qe=Ms(),We=be(qe,!0);S(()=>U(We,e(pe))),g(ke,qe)};E(ve,ke=>{e(pe)&&ke(ae)})}g(ne,we)};let Te=i(()=>u.modals_retireAgent_title()),te=i(()=>u.modals_retireAgent_description({name:c()})),$=i(()=>u.modals_retireAgent_confirm_label()),Z=i(()=>u.modals_bulkActionConfirm_cancel_label());qr(a,{get title(){return e(Te)},get description(){return e(te)},get confirmLabel(){return e($)},get cancelLabel(){return e(Z)},focusSubmit:!1,focusCancel:!0,get busy(){return e(I)},onConfirm:Pe,get open(){return s()},set open(ne){s(ne)},details:p,$$slots:{details:!0}})}var Q=It(L);return d(),Q}function zs({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",l=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
|
|
3
3
|
|
|
4
4
|
1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${l}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as mt}from"./
|
|
1
|
+
import{g as mt}from"./DPY72hn4.js";import{d as xt,g as ht,f as kt,e as _t}from"./BEu9jjb7.js";import{c3 as U,g as k}from"./CdT170lG.js";import{K as vt,aF as bt,L as wt,aG as Tt,O as St,aI as $t,a as s,N as L,r as Mt,k as Et}from"./_eQjP0_7.js";import{d as st}from"./JUqct0gC.js";var Z=(function(){var t=s(function(h,i,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=i);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],p=[1,10],r=[1,11],u=[1,12],f=[1,13],o=[1,14],g={trace:s(k(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(k(function(i,n,l,y,d,c,b){var _=c.length-1;switch(d){case 1:return c[_-1];case 2:this.$=[];break;case 3:c[_-1].push(c[_]),this.$=c[_-1];break;case 4:case 5:this.$=c[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[_].substr(6)),this.$=c[_].substr(6);break;case 9:this.$=c[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[_].substr(8)),this.$=c[_].substr(8);break;case 13:y.addTask(c[_-1],c[_]),this.$="task";break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(k(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),"parseError"),parse:s(k(function(i){var n=this,l=[0],y=[],d=[null],c=[],b=this.table,_="",P=0,et=0,pt=2,rt=1,ft=c.slice.call(arguments,1),v=Object.create(this.lexer),A={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(A.yy[Y]=this.yy[Y]);v.setInput(i,A.yy),A.yy.lexer=v,A.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var q=v.yylloc;c.push(q);var gt=v.options&&v.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function it(T){l.length=l.length-2*T,d.length=d.length-T,c.length=c.length-T}k(it,"popStack"),s(it,"popStack");function G(){var T;return T=y.pop()||v.lex()||rt,typeof T!="number"&&(T instanceof Array&&(y=T,T=y.pop()),T=n.symbols_[T]||T),T}k(G,"lex"),s(G,"lex");for(var w,F,S,H,R={},z,E,nt,W;;){if(F=l[l.length-1],this.defaultActions[F]?S=this.defaultActions[F]:((w===null||typeof w>"u")&&(w=G()),S=b[F]&&b[F][w]),typeof S>"u"||!S.length||!S[0]){var X="";W=[];for(z in b[F])this.terminals_[z]&&z>pt&&W.push("'"+this.terminals_[z]+"'");v.showPosition?X="Parse error on line "+(P+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
3
|
Expecting `+W.join(", ")+", got '"+(this.terminals_[w]||w)+"'":X="Parse error on line "+(P+1)+": Unexpected "+(w==rt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(X,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:q,expected:W})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+w);switch(S[0]){case 1:l.push(w),d.push(v.yytext),c.push(v.yylloc),l.push(S[1]),w=null,et=v.yyleng,_=v.yytext,P=v.yylineno,q=v.yylloc;break;case 2:if(E=this.productions_[S[1]][1],R.$=d[d.length-E],R._$={first_line:c[c.length-(E||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(E||1)].first_column,last_column:c[c.length-1].last_column},gt&&(R._$.range=[c[c.length-(E||1)].range[0],c[c.length-1].range[1]]),H=this.performAction.apply(R,[_,et,P,A.yy,S[1],d,c].concat(ft)),typeof H<"u")return H;E&&(l=l.slice(0,-1*E*2),d=d.slice(0,-1*E),c=c.slice(0,-1*E)),l.push(this.productions_[S[1]][0]),d.push(R.$),c.push(R._$),nt=b[l[l.length-2]][l[l.length-1]],l.push(nt);break;case 3:return!0}}return!0},"parse"),"parse")},m=(function(){var h={EOF:1,parseError:s(k(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),"parseError"),setInput:s(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as lt,bq as $,a_ as x,by as pt,bs as dt,b as mt,bu as S,bo as T}from"./D4MoKNoK.js";import{bs as ut,ca as A,aD as e,bj as ft,a7 as f,ay as l,W as p,bn as _t,c9 as _,cd as q,aA as k,bS as gt,aB as vt}from"./B8o4lNgr.js";import{B as H}from"./HfuFYz2u.js";import{c as P}from"./BPQohPc9.js";import{at as bt,cG as It}from"./CG5J-qd_.js";import{df as $t,dD as St}from"./dimBDqRX.js";import{S as kt,c as yt}from"./
|
|
1
|
+
import{t as lt,bq as $,a_ as x,by as pt,bs as dt,b as mt,bu as S,bo as T}from"./D4MoKNoK.js";import{bs as ut,ca as A,aD as e,bj as ft,a7 as f,ay as l,W as p,bn as _t,c9 as _,cd as q,aA as k,bS as gt,aB as vt}from"./B8o4lNgr.js";import{B as H}from"./HfuFYz2u.js";import{c as P}from"./BPQohPc9.js";import{at as bt,cG as It}from"./CG5J-qd_.js";import{df as $t,dD as St}from"./dimBDqRX.js";import{S as kt,c as yt}from"./F42L1irN.js";import{selectScriptById as Ct,selectCanDeleteScript as ht}from"./D8HMZQ9R.js";import"./WVYGrHqE.js";import"./WZHg24tN.js";import"./DgFojmqv.js";import"./Ds7can9q.js";import{M as R}from"./D8_OuTD3.js";import{g as wt}from"./CoSk1zgY.js";import{T as xt}from"./BMqkZHSQ.js";import{G2 as D,As as Tt,t4 as At,gx as Dt}from"./C51KzdSG.js";var Bt=vt("<!> <!>",1);function Wt(B,c){if(new.target)return lt({component:Wt,...B});ut(c,!0);const g=()=>S(K,"$fullContext$",v),V=()=>S(Q,"$canDeleteScript$",v),z=()=>S(L,"$scriptContext$",v),E=()=>S(N,"$script$",v),[v,F]=dt(),J=t=>{var r=f(),n=l(r);{var m=h=>{var O=Bt(),j=l(O);{let u=_(()=>T.workspace_shell_showInBottomBar_tooltip());P(j,()=>R,(I,w)=>{w(I,{get icon(){return bt},get label(){return e(u)},onclick:X,"data-move-to-bottom-bar":!0})})}var at=gt(j,2);{var st=u=>{var I=f(),w=l(I);{let ot=_(()=>T.scripts_delete_label()),nt=_(()=>V()?void 0:T.scripts_delete_disabled_description());P(w,()=>R,(ct,it)=>{it(ct,{get icon(){return It},get label(){return e(ot)},destructive:!0,get disabledReason(){return e(nt)},onclick:U})})}p(u,I)};x(at,u=>{e(s)&&u(st)})}p(h,O)};x(n,h=>{g()&&h(m)})}p(t,r)};let o=$(c,"tab",7),a=$(c,"workspaceId",7),y=$(c,"layoutId",7),i=$(c,"isActive",7);const b=_(()=>o().terminalId),s=_(()=>o().scriptId),W=wt(),d=q(""),C=q("");A(()=>d.set(a())),A(()=>C.set(e(s)??""));const K=$t(d),L=St(d),N=Ct(d,C),Q=ht(d,C);let G=!0;ft(()=>{G=!1});function U(){if(!e(s))return;const t=a(),r=e(s),n=o().id;return yt(t,r,()=>G&&i()&&a()===t&&e(s)===r&&o().id===n)}function X(){g()&&(e(s)&&D.dispatch(Tt(a(),e(s))),D.dispatch(At(a(),e(b))),D.dispatch(Dt(y()??a(),o().id)))}A(()=>{if(!(!W||!i()))return W.registerActions({actions:J})});var Y={get tab(){return o()},set tab(t){o(t),k()},get workspaceId(){return a()},set workspaceId(t){a(t),k()},get layoutId(){return y()},set layoutId(t){y(t),k()},get isActive(){return i()},set isActive(t){i(t),k()},$set:pt,$on:(t,r)=>mt(c,t,r)},M=f(),Z=l(M);{var tt=t=>{var r=f(),n=l(r);H(n,()=>e(s),m=>{kt(m,{get scriptId(){return e(s)},get workspaceId(){return a()},class:"h-full"})}),p(t,r)},et=t=>{var r=f(),n=l(r);H(n,()=>e(b),m=>{xt(m,{get terminalId(){return e(b)},get workspaceId(){return a()},class:"h-full"})}),p(t,r)};x(Z,t=>{e(s)&&i()&&z()&&(g()||E())?t(tt):e(b)&&i()&&g()&&t(et,1)})}p(B,M);var rt=_t(Y);return F(),rt}export{Wt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as bt,bq as x,by as wt,bs as Rt,b as It,bu as g}from"./D4MoKNoK.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as V,bV as M,aA as F}from"./B8o4lNgr.js";import{b as vt}from"./D2g8BuR1.js";import{G2 as l,ei as Ut,ej as At,q$ as Bt,mU as xt,mV as Ft,Gz as Gt,GN as Tt,GE as Wt,mZ as G}from"./C51KzdSG.js";import{aU as _t}from"./
|
|
1
|
+
import{t as bt,bq as x,by as wt,bs as Rt,b as It,bu as g}from"./D4MoKNoK.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as V,bV as M,aA as F}from"./B8o4lNgr.js";import{b as vt}from"./D2g8BuR1.js";import{G2 as l,ei as Ut,ej as At,q$ as Bt,mU as xt,mV as Ft,Gz as Gt,GN as Tt,GE as Wt,mZ as G}from"./C51KzdSG.js";import{aU as _t}from"./Bj2YjLqH.js";import{g as Dt}from"./CoSk1zgY.js";import{dj as Lt,bx as Et,bz as Vt,bw as Mt,bB as Nt,cW as zt,e as Ht}from"./dimBDqRX.js";import{C as qt}from"./BioKfdhs.js";import{V as jt}from"./BqSjWCdR.js";import{bC as Xt,bA as Zt,aX as Jt}from"./t61BPD62.js";import{i as T,n as N}from"./H2jLkRRS.js";import{ai as Kt}from"./CJQrM64N.js";function Ot(W,$){if(new.target)return bt({component:Ot,...W});Pt($,!0);const z=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),H=()=>g(nt,"$ftCommits$",c),q=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),j=()=>g(tt,"$foldUnchanged",c),X=()=>g(Y,"$lineWrapping",c),Z=()=>g(et,"$diffSideBySide",c),J=()=>g(rt,"$ftLoading$",c),K=()=>g(it,"$ftBoundarySha$",c),[c,O]=Rt(),Q=o=>{jt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{V(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return j()},onToggleFold:()=>l.dispatch(Wt()),get wrapEnabled(){return X()},onToggleWrap:()=>l.dispatch(Tt()),get splitEnabled(){return Z()},onToggleSplit:()=>l.dispatch(Gt())})},Y=Xt(),tt=Zt(),et=Jt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const _=Dt(),p=_t(()=>m()),ot=Lt(p);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=Kt(p),b=s(()=>z().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Et(p),nt=Vt(p),it=Mt(p),rt=Nt(p),dt=s(()=>H()||[]),lt=zt(p),f=s(()=>q()[t(n)]??Ht),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&T(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&T(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&T(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=N(o),e=N(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function D(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function L(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(G(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!_||!C()||_.registerActions({display:Q})});const E=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,E)),()=>l.dispatch(Ft(o,E))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):J()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:K()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void D([d])),B=s(()=>t(n)?void 0:d=>void L([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");D(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");L(d.map(u=>u.relativePath||u.file))});vt(qt(W,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>V(R,d,!0),()=>t(R))}var $t=kt(ft);return O(),$t}export{Ot as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as X}from"./
|
|
1
|
+
import{I as X}from"./CEQqb3fD.js";import{p as z}from"./B0a31Ljt.js";import{p as G}from"./u9Jr5xJ2.js";import{aI as F,aG as Y,aF as P,O as q,K as Z,L as j,a as g,j as M,ad as S,aE as U,r as K,M as R,k as Q,aD as J,Q as ee,y as te,aw as ne}from"./_eQjP0_7.js";import{g as v}from"./CdT170lG.js";var H=/[─━│┃└┗├┣]/,W=/[└┗├┣]/,re=/[─━]/,A=/^[\s│┃]+$/,D=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,L=/^\s*%%/,ie=" ";function N(n){return n.some(t=>H.test(t))}v(N,"isBoxDrawingFormat");g(N,"isBoxDrawingFormat");function T(n){for(const t of n){const e=W.exec(t);if(e?.index&&e.index>0)return e.index}return 4}v(T,"inferSegmentWidth");g(T,"inferSegmentWidth");function V(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}v(V,"remapErrorLines");g(V,"remapErrorLines");function $(n){const t=n.split(`
|
|
2
2
|
`),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||L.test(c)||D.test(c)||A.test(c)||s.push(c.replace(/\t/g," "))}if(!N(s))return{text:n,lineMap:e};const i=T(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if(L.test(c)){o.push(c),a++,e.set(a,h);continue}if(D.test(c)){o.push(c),a++,e.set(a,h);continue}if(A.test(c))continue;const l=c.replace(/\t/g," "),m=W.exec(l);if(m?.index!==void 0){const f=m.index,w=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&re.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const b=l.slice(u).trimEnd();if(!b)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const O=ie.repeat(w);o.push(O+b),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(H.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
|
|
3
3
|
`),lineMap:e}}v($,"preprocessBoxDrawing");g($,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=g(()=>{x.reset(),Q()},"clear"),se=g(()=>x.records.stack[0],"getRoot"),ae=g(()=>x.records.cnt,"getCount"),ce=te.treeView,le=g(()=>M(ce,R().treeView),"getConfig"),de=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:j,getAccDescription:Z,getDiagramTitle:q,setAccDescription:P,setAccTitle:Y,setDiagramTitle:F},B=he,pe=g(n=>{z(n,B);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,R()):void 0;B.addNode(e,r,i,o,p,d)}},"populate"),ge={parse:g(async n=>{const{text:t,lineMap:e}=$(n);try{const r=await G("treeView",t);S.debug(r),pe(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=V(r.message,e)),r}},"parse")},I={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function E(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}v(E,"detectIcon");g(E,"detectIcon");function C(n,t){return n.includes(":")?n:n in I.icons||!t?`${I.prefix}:${n}`:`${t}:${n}`}v(C,"qualifyIcon");g(C,"qualifyIcon");function y(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=E(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${I.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}v(y,"getNodeIcon");g(y,"getNodeIcon");ne([{name:I.prefix,icons:I}]);var k=14,fe=4,ue=16,me=g(async(n,t)=>{const e=[],r=g(i=>{const o=y(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await ee(i,{height:k,width:k})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=k+fe,c=y(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:m}=h.node().getBBox(),f=l+s.paddingY*2,w=n+s.paddingX+(d?p:0);h.attr("x",w),h.attr("y",t+f/2);const u=w+m,b=m+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:b,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),_=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),xe=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,m)=>{const f=m*(l.rowIndent+l.paddingX),w=we(f,s,h,d,l,r);o.push(w);const{height:u,width:b}=h.BBox;_(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+b),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(w=>{p(w,h+1)});const{x:l,y:m,height:f}=d.BBox;if(d.children.length){const{y:w,height:u}=d.children[d.children.length-1].BBox;_(n,l+e.paddingX,m+f,l+e.paddingX,w+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+ue;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),ve=g(async(n,t,e,r)=>{S.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=U(t),p=a.append("g");p.attr("class","tree-view");const c=await me(i,o),{totalHeight:d,totalWidth:h}=xe(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),K(a,d,h,o.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=M(Ce,n);return`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var vo=Object.defineProperty;var bo=(e,t,i)=>t in e?vo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var v=(e,t,i)=>bo(e,typeof t!="symbol"?t+"":t,i);import{t as ir,bq as M,a_ as we,by as nr,b as rr,bu as dn,bs as So,bo as je}from"./D4MoKNoK.js";import{bs as or,a5 as De,ay as hn,bS as Xe,aD as C,bA as ke,b_ as Me,bO as rt,W as le,bl as Xt,be as Hi,bn as sr,c9 as ne,aA as I,b$ as ar,aB as ge,ai as yo,bV as Te,br as Co,ca as $e,bH as Y,c5 as dt,bk as xo,bj as Lo,aj as wo,c0 as fn}from"./B8o4lNgr.js";import{h as ko,i as Eo,k as un,l as pi,s as cn}from"./WVYGrHqE.js";import{b as Ro}from"./C3hWtekV.js";import{b as pn}from"./D2g8BuR1.js";import{h as Ao,c as Ye,w as lr,N as O,O as Jt,aX as Qe,a as dr,j as hr,P as Je,H as fr,i as ur,a9 as cr,U as Ho,f as To,e as pr,T as Do,g as Mo,S as Io,a3 as Ze,a2 as Ve,C as Fo,G as gr,F as No,I as Po,A as At,af as zo,_ as Ht,ab as Tt,v as St,a0 as Ti,s as J,r as Ue,al as wt,D as Uo,d as _o,a8 as mr,b as gn,u as mn,aC as Oo,am as ct,aa as Bo,K as Le,M as Ut,L as Vo,$ as Dt,E as Wo,aj as vr,a5 as Go,a1 as vn,t as br,ad as ft,a4 as kt,ac as ot,ae as Sr,B as gi,a7 as mi,k as jo,aB as bn}from"./
|
|
1
|
+
var vo=Object.defineProperty;var bo=(e,t,i)=>t in e?vo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var v=(e,t,i)=>bo(e,typeof t!="symbol"?t+"":t,i);import{t as ir,bq as M,a_ as we,by as nr,b as rr,bu as dn,bs as So,bo as je}from"./D4MoKNoK.js";import{bs as or,a5 as De,ay as hn,bS as Xe,aD as C,bA as ke,b_ as Me,bO as rt,W as le,bl as Xt,be as Hi,bn as sr,c9 as ne,aA as I,b$ as ar,aB as ge,ai as yo,bV as Te,br as Co,ca as $e,bH as Y,c5 as dt,bk as xo,bj as Lo,aj as wo,c0 as fn}from"./B8o4lNgr.js";import{h as ko,i as Eo,k as un,l as pi,s as cn}from"./WVYGrHqE.js";import{b as Ro}from"./C3hWtekV.js";import{b as pn}from"./D2g8BuR1.js";import{h as Ao,c as Ye,w as lr,N as O,O as Jt,aX as Qe,a as dr,j as hr,P as Je,H as fr,i as ur,a9 as cr,U as Ho,f as To,e as pr,T as Do,g as Mo,S as Io,a3 as Ze,a2 as Ve,C as Fo,G as gr,F as No,I as Po,A as At,af as zo,_ as Ht,ab as Tt,v as St,a0 as Ti,s as J,r as Ue,al as wt,D as Uo,d as _o,a8 as mr,b as gn,u as mn,aC as Oo,am as ct,aa as Bo,K as Le,M as Ut,L as Vo,$ as Dt,E as Wo,aj as vr,a5 as Go,a1 as vn,t as br,ad as ft,a4 as kt,ac as ot,ae as Sr,B as gi,a7 as mi,k as jo,aB as bn}from"./D7P2CXpO.js";import{F as vi,c0 as $o,bd as qo,au as Ko,at as Xo}from"./CG5J-qd_.js";import{f as Di}from"./DgFojmqv.js";import{f as Yo}from"./B9YdV5Lr.js";import{d as Qo}from"./De4WWpS0.js";import{P as Jo}from"./Bj2YjLqH.js";import{t as Sn}from"./C8yAGnZY.js";class Zo extends Ao{constructor(){super(...arguments),this.tokenize=ts}equals(t,i,n){return n.ignoreWhitespace?((!n.newlineIsToken||!t.includes(`
|
|
2
2
|
`))&&(t=t.trim()),(!n.newlineIsToken||!i.includes(`
|
|
3
3
|
`))&&(i=i.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(t.endsWith(`
|
|
4
4
|
`)&&(t=t.slice(0,-1)),i.endsWith(`
|