nc-lib-gui-daily 0.251.3-pr-9140-20240807-1322 → 0.251.3-pr-9140-20240807-1349
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/lib/dist/200.html +78 -78
- package/lib/dist/404.html +78 -78
- package/lib/dist/_nuxt/{BECNAICj.js → -4t4xnv8.js} +1 -1
- package/lib/dist/_nuxt/{B9wWUMeH.js → 0i0s40zL.js} +1 -1
- package/lib/dist/_nuxt/{ClrSNVKi.js → 2DrjKvbb.js} +1 -1
- package/lib/dist/_nuxt/{BWYKlc03.js → 3joeZ-MH.js} +1 -1
- package/lib/dist/_nuxt/{BjOAkC1I.js → 3v3fVjjF.js} +2 -2
- package/lib/dist/_nuxt/{C0Gqhynn.js → 4TzZ_5zC.js} +1 -1
- package/lib/dist/_nuxt/{CQPSFno8.js → 4XAL69Ip.js} +1 -1
- package/lib/dist/_nuxt/{Bu5HFIT4.js → 5d2JKIpI.js} +2 -2
- package/lib/dist/_nuxt/{CaoTQXu2.js → 5nCkSrke.js} +1 -1
- package/lib/dist/_nuxt/{Ek7a6tav.js → 5wn80Wdx.js} +1 -1
- package/lib/dist/_nuxt/6U1p19-U.js +1 -0
- package/lib/dist/_nuxt/{Bu9W_1Kn.js → 75R1pBVU.js} +2 -2
- package/lib/dist/_nuxt/{WDDKUx4k.js → 7_p21RjN.js} +1 -1
- package/lib/dist/_nuxt/{CZztu25l.js → 8K2eSNBm.js} +3 -3
- package/lib/dist/_nuxt/8YSh_QYU.js +1 -0
- package/lib/dist/_nuxt/{CLa-GND5.js → 9ZzieOOa.js} +1 -1
- package/lib/dist/_nuxt/{DGmT4XJW.js → 9j5A48K7.js} +1 -1
- package/lib/dist/_nuxt/{Cf37dmb0.js → A1VS529Y.js} +2 -2
- package/lib/dist/_nuxt/{CnUzkPPI.js → AoMdM-MP.js} +1 -1
- package/lib/dist/_nuxt/{5dTVPtqf.js → B-MIOvj6.js} +1 -1
- package/lib/dist/_nuxt/{Xvj7w1oq.js → B0gfXKmM.js} +1 -1
- package/lib/dist/_nuxt/{DBfDNbQe.js → B0y7Q991.js} +2 -2
- package/lib/dist/_nuxt/{COSuR5gX.js → B12ilfKh.js} +1 -1
- package/lib/dist/_nuxt/{DLcCozgP.js → B1R2-rCU.js} +2 -2
- package/lib/dist/_nuxt/{CMITlXbV.js → B1h49W-1.js} +2 -2
- package/lib/dist/_nuxt/{CkCKzP-b.js → B2NO182c.js} +1 -1
- package/lib/dist/_nuxt/{DKgzeeDD.js → B33qDdnq.js} +1 -1
- package/lib/dist/_nuxt/{Dr_t1CQX.js → B3AUipTz.js} +1 -1
- package/lib/dist/_nuxt/{CVmH__0I.js → B3JDEiCa.js} +2 -2
- package/lib/dist/_nuxt/{BUd0o8q2.js → B3TBCQg9.js} +1 -1
- package/lib/dist/_nuxt/{CHRxsLpF.js → B4rH_4ZN.js} +1 -1
- package/lib/dist/_nuxt/{M4L2Leg7.js → B4rimoYw.js} +1 -1
- package/lib/dist/_nuxt/{BnbA25UM.js → B5FLXBR1.js} +1 -1
- package/lib/dist/_nuxt/{CqcwF_4v.js → B5NtOENv.js} +1 -1
- package/lib/dist/_nuxt/{BaaPy9e4.js → B74kAxrX.js} +2 -2
- package/lib/dist/_nuxt/{Cf4R9mtz.js → B78zylNk.js} +1 -1
- package/lib/dist/_nuxt/{CqFm4PeH.js → B8Ch0bfd.js} +2 -2
- package/lib/dist/_nuxt/{BbFx5cgg.js → B9aNdXy_.js} +2 -2
- package/lib/dist/_nuxt/{DEWywo6s.js → B9dOhF-2.js} +1 -1
- package/lib/dist/_nuxt/{BOYXVEfo.js → BBA0nfaW.js} +1 -1
- package/lib/dist/_nuxt/{C9TR8pMm.js → BBW1h0ks.js} +1 -1
- package/lib/dist/_nuxt/{EohHWhQi.js → BC6xG-3q.js} +1 -1
- package/lib/dist/_nuxt/{D-3pY83G.js → BDlHzTvk.js} +1 -1
- package/lib/dist/_nuxt/{DglPsyiE.js → BE4MlnZf.js} +1 -1
- package/lib/dist/_nuxt/{DQRX9Xt5.js → BEZkcRcL.js} +1 -1
- package/lib/dist/_nuxt/{CDbcx2MC.js → BGugcrMS.js} +1 -1
- package/lib/dist/_nuxt/{DkSSi9ve.js → BHNEB9HJ.js} +1 -1
- package/lib/dist/_nuxt/{_fB9sOmQ.js → BHXU4B_2.js} +2 -2
- package/lib/dist/_nuxt/{BaXP97h1.js → BIHLSlqp.js} +1 -1
- package/lib/dist/_nuxt/BIo3okPc.js +1 -0
- package/lib/dist/_nuxt/{CokApUov.js → BLBtvxjT.js} +1 -1
- package/lib/dist/_nuxt/{CaoUireh.js → BLJJDzIX.js} +3 -3
- package/lib/dist/_nuxt/{wogaDWws.js → BLNSv8WU.js} +1 -1
- package/lib/dist/_nuxt/{BSnfz81Y.js → BMpULef7.js} +2 -2
- package/lib/dist/_nuxt/{CYG3uB4k.js → BNhTB5D3.js} +1 -1
- package/lib/dist/_nuxt/{D5LCiDa8.js → BNv598XD.js} +1 -1
- package/lib/dist/_nuxt/{CaKL5hX5.js → BPBo3uNz.js} +1 -1
- package/lib/dist/_nuxt/{tuC3W76x.js → BPS1H-Sz.js} +1 -1
- package/lib/dist/_nuxt/{DRPzkOuH.js → BPXkp7pR.js} +1 -1
- package/lib/dist/_nuxt/{CEaqjIiA.js → BPaH70bH.js} +1 -1
- package/lib/dist/_nuxt/{DQvo0yED.js → BPfa9v3p.js} +1 -1
- package/lib/dist/_nuxt/{DpJilvje.js → BPxXddiW.js} +1 -1
- package/lib/dist/_nuxt/{K69OaLqe.js → BQTbXctc.js} +1 -1
- package/lib/dist/_nuxt/{DQrwfJfV.js → BT6OdjOC.js} +1 -1
- package/lib/dist/_nuxt/{BtbkYOXM.js → BTPzUNVG.js} +1 -1
- package/lib/dist/_nuxt/{CZqfRZSO.js → BTX_9KaN.js} +2 -2
- package/lib/dist/_nuxt/{BF-z5sdC.js → BUWWmS1v.js} +1 -1
- package/lib/dist/_nuxt/{DSt1bB14.js → BUa3Jukl.js} +1 -1
- package/lib/dist/_nuxt/{Dpt9sRgQ.js → BUjHox0o.js} +2 -2
- package/lib/dist/_nuxt/{DEqhUnZ-.js → BV-KNIgj.js} +1 -1
- package/lib/dist/_nuxt/BV0H6cZy.js +2 -0
- package/lib/dist/_nuxt/{DFA4S6bS.js → BV5fkeNl.js} +1 -1
- package/lib/dist/_nuxt/{CgIyTi2b.js → BW3iYn6v.js} +1 -1
- package/lib/dist/_nuxt/{DvN7jpPi.js → BWALYZJv.js} +1 -1
- package/lib/dist/_nuxt/{D3V1uXBy.js → BWgRi_b3.js} +1 -1
- package/lib/dist/_nuxt/{D5LgkGGj.js → BWn3cSKa.js} +1 -1
- package/lib/dist/_nuxt/{Csj74Kwp.js → BWsrBkPc.js} +2 -2
- package/lib/dist/_nuxt/{CHMw6lkg.js → BXoKLvWd.js} +2 -2
- package/lib/dist/_nuxt/{CDnEKjsz.js → BXzZkUYy.js} +1 -1
- package/lib/dist/_nuxt/{DmDx5TyZ.js → BZdJF2g5.js} +1 -1
- package/lib/dist/_nuxt/{BipOdpcd.js → BZfcRRAG.js} +1 -1
- package/lib/dist/_nuxt/{D3pPrsLQ.js → B_FyKctL.js} +1 -1
- package/lib/dist/_nuxt/B_LFFdI9.js +1 -0
- package/lib/dist/_nuxt/{DPUW3H0R.js → BadBS-yn.js} +2 -2
- package/lib/dist/_nuxt/{BmApFhTv.js → BbCrTQHD.js} +1 -1
- package/lib/dist/_nuxt/{DCn9KvFr.js → BcquqdOq.js} +1 -1
- package/lib/dist/_nuxt/{Cadw426x.js → Bdxi8XdN.js} +2 -2
- package/lib/dist/_nuxt/{BTEJrFxq.js → Be6wJwW7.js} +1 -1
- package/lib/dist/_nuxt/{Dgf6zkFW.js → Bey_B0Pg.js} +1 -1
- package/lib/dist/_nuxt/{ov8xLaHe.js → Bf-Jn9fN.js} +1 -1
- package/lib/dist/_nuxt/{DPPtI03V.js → Bf_oJAxP.js} +1 -1
- package/lib/dist/_nuxt/{uUj38y4-.js → BgtuIwr8.js} +1 -1
- package/lib/dist/_nuxt/{CiBbHMre.js → Bh7NKnnJ.js} +1 -1
- package/lib/dist/_nuxt/{D1_wgH1i.js → Bh8L_8vr.js} +1 -1
- package/lib/dist/_nuxt/{CGTkNfNg.js → BhE3_y96.js} +1 -1
- package/lib/dist/_nuxt/{DMRRjwxM.js → BhLSFmBI.js} +2 -2
- package/lib/dist/_nuxt/BhZrVUuE.js +1 -0
- package/lib/dist/_nuxt/{3jIF1AyF.js → Bi74c53l.js} +2 -2
- package/lib/dist/_nuxt/{Wfb3YMK3.js → BjIWxehG.js} +1 -1
- package/lib/dist/_nuxt/{BKIlBt-6.js → Bjh8Jc00.js} +2 -2
- package/lib/dist/_nuxt/{CYDrr8e0.js → BkA6Hv4O.js} +1 -1
- package/lib/dist/_nuxt/{tEU5SOvF.js → Bn3JgSEE.js} +1 -1
- package/lib/dist/_nuxt/{BhRzGy_7.js → BnhkHttA.js} +1 -1
- package/lib/dist/_nuxt/{yUmIs97a.js → BnjAp9hj.js} +1 -1
- package/lib/dist/_nuxt/{DdiY6i5M.js → Bp5oHXSc.js} +1 -1
- package/lib/dist/_nuxt/{CZPLvSl2.js → BpLvq4Ij.js} +2 -2
- package/lib/dist/_nuxt/{B0oPZzHj.js → Bpjzp6Vo.js} +1 -1
- package/lib/dist/_nuxt/{Bj3GBQrH.js → BqKbedJW.js} +1 -1
- package/lib/dist/_nuxt/{CP29yz9Z.js → BqjTSgjN.js} +1 -1
- package/lib/dist/_nuxt/{CXqu_veX.js → Bqoh1mnx.js} +1 -1
- package/lib/dist/_nuxt/{Ccy4fxMp.js → Br4sW-aN.js} +2 -2
- package/lib/dist/_nuxt/{DsK9Oi2B.js → BsNs6tYV.js} +1 -1
- package/lib/dist/_nuxt/{CjnsQ0f3.js → BsdyC_c2.js} +1 -1
- package/lib/dist/_nuxt/{izr94Pxw.js → BsepGfVv.js} +2 -2
- package/lib/dist/_nuxt/{BSOsTxoF.js → BtRkeQ7z.js} +1 -1
- package/lib/dist/_nuxt/{45BtyJEq.js → BtYrspp1.js} +1 -1
- package/lib/dist/_nuxt/{DqQodY25.js → BtzsCl9b.js} +1 -1
- package/lib/dist/_nuxt/{BLd8XNte.js → BuNVIA4o.js} +1 -1
- package/lib/dist/_nuxt/{BIs2Ub4q.js → BuvUqaUR.js} +1 -1
- package/lib/dist/_nuxt/{BmZeKA3g.js → BvJHFs9-.js} +1 -1
- package/lib/dist/_nuxt/{SUjsexOK.js → BvdnmSRl.js} +1 -1
- package/lib/dist/_nuxt/{DU4YOMw-.js → BxlEsFh4.js} +2 -2
- package/lib/dist/_nuxt/{C10-KGd5.js → ByJ4I0p_.js} +1 -1
- package/lib/dist/_nuxt/{CxCKV_Px.js → BycyOgkZ.js} +1 -1
- package/lib/dist/_nuxt/{BVTg5uiQ.js → C-_nHsP3.js} +2 -2
- package/lib/dist/_nuxt/{DoClxtqO.js → C0Cjsdmx.js} +1 -1
- package/lib/dist/_nuxt/{BFdtwV5O.js → C0aGyUZt.js} +1 -1
- package/lib/dist/_nuxt/{BTBhJ3yz.js → C0cVOb1Y.js} +1 -1
- package/lib/dist/_nuxt/{DzBWyRMo.js → C0mEOfI4.js} +1 -1
- package/lib/dist/_nuxt/{BwxlFrx3.js → C0o-ksvC.js} +1 -1
- package/lib/dist/_nuxt/{CXPckVUD.js → C0vKFrOr.js} +1 -1
- package/lib/dist/_nuxt/{CQ3cJtsQ.js → C0x2Mtrn.js} +2 -2
- package/lib/dist/_nuxt/{DSo-2nFJ.js → C17-0Owd.js} +1 -1
- package/lib/dist/_nuxt/{C77-d5Nm.js → C24V68J3.js} +1 -1
- package/lib/dist/_nuxt/{UJDZNh8e.js → C2y2A27G.js} +1 -1
- package/lib/dist/_nuxt/{BPWyQanZ.js → C4FX_vFj.js} +1 -1
- package/lib/dist/_nuxt/{DVJ1H8-2.js → C4NvFsmx.js} +1 -1
- package/lib/dist/_nuxt/{Dj7AODgl.js → C5Fh5dLw.js} +1 -1
- package/lib/dist/_nuxt/{DGN1FUOe.js → C5LZc7bi.js} +1 -1
- package/lib/dist/_nuxt/{TGNXCWG6.js → C5YDuKgZ.js} +1 -1
- package/lib/dist/_nuxt/{DHL8lIZa.js → C6c9Dspn.js} +1 -1
- package/lib/dist/_nuxt/{Bj1Tr8na.js → C8Qc_SsI.js} +1 -1
- package/lib/dist/_nuxt/{C5QeThbn.js → C8UZPp3_.js} +1 -1
- package/lib/dist/_nuxt/{DcjeHTDt.js → C8_ndKXt.js} +2 -2
- package/lib/dist/_nuxt/{D31WRIha.js → C9Uj1v8v.js} +1 -1
- package/lib/dist/_nuxt/{BUCNUONm.js → CB02C89T.js} +1 -1
- package/lib/dist/_nuxt/{C7hcWPKb.js → CB3a7P0t.js} +2 -2
- package/lib/dist/_nuxt/{Dy33QHkd.js → CCIDjjGj.js} +3 -3
- package/lib/dist/_nuxt/CCSHPfQT.js +1 -0
- package/lib/dist/_nuxt/{DXGgVe0f.js → CDptPd_U.js} +3 -3
- package/lib/dist/_nuxt/{B82t3bcZ.js → CEZpXdoB.js} +1 -1
- package/lib/dist/_nuxt/{Cv1taij4.js → CFW-eKdT.js} +2 -2
- package/lib/dist/_nuxt/{DHbZD8lm.js → CGJkgYAS.js} +1 -1
- package/lib/dist/_nuxt/{C1P8Zhm3.js → CHf2540r.js} +1 -1
- package/lib/dist/_nuxt/{BJTGqbe7.js → CI_vGZBR.js} +1 -1
- package/lib/dist/_nuxt/{bCkRhWD-.js → CJFAfeQm.js} +1 -1
- package/lib/dist/_nuxt/{DourgGBB.js → CJnTHSo6.js} +1 -1
- package/lib/dist/_nuxt/{eM235LmA.js → CKjn3He-.js} +1 -1
- package/lib/dist/_nuxt/{BswdcBt-.js → CM94AsjQ.js} +1 -1
- package/lib/dist/_nuxt/{CrYOZ6xG.js → CMLvVVCa.js} +2 -2
- package/lib/dist/_nuxt/{scxxAgRq.js → CNurVxTA.js} +1 -1
- package/lib/dist/_nuxt/{BeT-kB3R.js → COR1mRIv.js} +1 -1
- package/lib/dist/_nuxt/{B0Sm2Utn.js → CPghe2bF.js} +2 -2
- package/lib/dist/_nuxt/{_dwjyJHh.js → CPmrHRfD.js} +1 -1
- package/lib/dist/_nuxt/{Cwun9h-Y.js → CPq1MIkE.js} +2 -2
- package/lib/dist/_nuxt/{DjcxKpIM.js → CQaV3CAE.js} +1 -1
- package/lib/dist/_nuxt/{CD37t5Sv.js → CS3cYx35.js} +2 -2
- package/lib/dist/_nuxt/{BbQblmCC.js → CTrYGv0V.js} +1 -1
- package/lib/dist/_nuxt/{CAp-kO3G.js → CU2qgEB0.js} +2 -2
- package/lib/dist/_nuxt/{Cnd_RIW1.js → CVNIqWCz.js} +2 -2
- package/lib/dist/_nuxt/{BwNtMX7v.js → CVziAYYM.js} +1 -1
- package/lib/dist/_nuxt/{xVsvxyFN.js → CXV9y0ij.js} +1 -1
- package/lib/dist/_nuxt/{Bmo45vb1.js → CXjFiOva.js} +1 -1
- package/lib/dist/_nuxt/{COzZ75BE.js → CYRe9VEh.js} +1 -1
- package/lib/dist/_nuxt/{Dy7Fxfea.js → CZfW7u7e.js} +1 -1
- package/lib/dist/_nuxt/C_0MCAHg.js +2 -0
- package/lib/dist/_nuxt/{DHhzMvUY.js → C_KncATK.js} +1 -1
- package/lib/dist/_nuxt/{BHvFET_1.js → C_r_z2w4.js} +1 -1
- package/lib/dist/_nuxt/{DuTGHMTZ.js → Ca68hr9N.js} +1 -1
- package/lib/dist/_nuxt/{B5XOKBjI.js → CaQmYARh.js} +1 -1
- package/lib/dist/_nuxt/{B4w8tHEf.js → Caap6ad5.js} +1 -1
- package/lib/dist/_nuxt/Can5iqu7.js +1 -0
- package/lib/dist/_nuxt/{CumiqXf7.js → CbXnLsg7.js} +1 -1
- package/lib/dist/_nuxt/{BkVBsUs7.js → Cc8KviHt.js} +2 -2
- package/lib/dist/_nuxt/{C2LFvZUN.js → CcKY7-rX.js} +2 -2
- package/lib/dist/_nuxt/{BqrLXvNe.js → Ccf8GJao.js} +1 -1
- package/lib/dist/_nuxt/{CLuKe_fT.js → Cd87RhmG.js} +1 -1
- package/lib/dist/_nuxt/{CGoFBv-S.js → CdAW-Pmn.js} +1 -1
- package/lib/dist/_nuxt/{CoJTDitE.js → CeOTGq8S.js} +2 -2
- package/lib/dist/_nuxt/{CpYnnah9.js → CeUvd5CG.js} +1 -1
- package/lib/dist/_nuxt/{CYpSrlPh.js → Ch8L35kx.js} +1 -1
- package/lib/dist/_nuxt/{DeiJLuN8.js → ChOVvzZi.js} +1 -1
- package/lib/dist/_nuxt/{DS9TSCsw.js → ChvF81cy.js} +1 -1
- package/lib/dist/_nuxt/{Bnayetoi.js → CjJR9ku8.js} +1 -1
- package/lib/dist/_nuxt/{qcgVJISv.js → CjLxSPxU.js} +1 -1
- package/lib/dist/_nuxt/{CUiPrnOA.js → CjiyXwOk.js} +1 -1
- package/lib/dist/_nuxt/{4p5F9hBn.js → Ck8SavWn.js} +1 -1
- package/lib/dist/_nuxt/{CY-umpv2.js → Ckrtr2Si.js} +1 -1
- package/lib/dist/_nuxt/{BvZfIYOw.js → ClgX2jSX.js} +1 -1
- package/lib/dist/_nuxt/{DxP-nfEC.js → CmHIFce4.js} +1 -1
- package/lib/dist/_nuxt/{BiyCj6F9.js → Cmi92uvW.js} +4 -4
- package/lib/dist/_nuxt/{Tog_yjwe.js → Cno1xGGH.js} +1 -1
- package/lib/dist/_nuxt/{DTIgeuov.js → CoIVRkRs.js} +2 -2
- package/lib/dist/_nuxt/{Dp03Bz--.js → CpVxdhe3.js} +1 -1
- package/lib/dist/_nuxt/{3fdRvCCy.js → CpWeSecD.js} +1 -1
- package/lib/dist/_nuxt/CpydMTRh.js +2 -0
- package/lib/dist/_nuxt/{BDWmjfg6.js → CqocAHnv.js} +1 -1
- package/lib/dist/_nuxt/CrsolQNu.js +2 -0
- package/lib/dist/_nuxt/{DID7jAGh.js → CsMB6UJB.js} +1 -1
- package/lib/dist/_nuxt/{CjWKi8WI.js → CtiXmthf.js} +1 -1
- package/lib/dist/_nuxt/{BiKFdSE2.js → CtrRzeqn.js} +2 -2
- package/lib/dist/_nuxt/{DYOpadwh.js → CvJ6cBZg.js} +1 -1
- package/lib/dist/_nuxt/{BLZezBti.js → CvJQycOH.js} +1 -1
- package/lib/dist/_nuxt/{RgrGrVar.js → CveN6MY0.js} +1 -1
- package/lib/dist/_nuxt/{BdAcoDOD.js → Cvf4IlAF.js} +1 -1
- package/lib/dist/_nuxt/{COkSW75E.js → CwXGZkgw.js} +1 -1
- package/lib/dist/_nuxt/{BfcNiwJm.js → Cwg1qVG3.js} +2 -2
- package/lib/dist/_nuxt/{lA0REAhs.js → CwglIeux.js} +1 -1
- package/lib/dist/_nuxt/{CnxZEFWN.js → CwzcEVHI.js} +1 -1
- package/lib/dist/_nuxt/{cjY5Hf50.js → Cx74SJIJ.js} +2 -2
- package/lib/dist/_nuxt/{DxIWAeh5.js → CyEUDpIZ.js} +1 -1
- package/lib/dist/_nuxt/{yluqkvFW.js → CzuZWkKi.js} +2 -2
- package/lib/dist/_nuxt/{BsCG6_t5.js → D-ULZAvr.js} +1 -1
- package/lib/dist/_nuxt/{Bg5wwbYB.js → D0MWYD9u.js} +2 -2
- package/lib/dist/_nuxt/{B_u_YqcL.js → D0MdXf-I.js} +1 -1
- package/lib/dist/_nuxt/{Vezsq5pc.js → D0lTgCiL.js} +1 -1
- package/lib/dist/_nuxt/D13Jpe71.js +1 -0
- package/lib/dist/_nuxt/{DAjBmuY8.js → D1WSfdBz.js} +2 -2
- package/lib/dist/_nuxt/{BzA-S3rc.js → D2hUzAIJ.js} +1 -1
- package/lib/dist/_nuxt/{DfZdmYLx.js → D2v4gSXy.js} +3 -3
- package/lib/dist/_nuxt/{C9siHYBR.js → D3yE50jn.js} +2 -2
- package/lib/dist/_nuxt/{BMcEsnd8.js → D4XRaUrE.js} +1 -1
- package/lib/dist/_nuxt/{BLXy3y_A.js → D58OV0x2.js} +1 -1
- package/lib/dist/_nuxt/{BuhJ4rY4.js → D7raIqCw.js} +1 -1
- package/lib/dist/_nuxt/{CRMJPIbJ.js → D86M42wR.js} +2 -2
- package/lib/dist/_nuxt/{B8QKymay.js → D87Esdzw.js} +1 -1
- package/lib/dist/_nuxt/{OslaI-1o.js → D8KkEwuG.js} +2 -2
- package/lib/dist/_nuxt/{BDxJYdK6.js → D8mGg8p3.js} +2 -2
- package/lib/dist/_nuxt/D8y_QymV.js +1 -0
- package/lib/dist/_nuxt/{D9eajlYc.js → DAE0H6cn.js} +2 -2
- package/lib/dist/_nuxt/DANQtblt.js +2 -0
- package/lib/dist/_nuxt/{BP0PseId.js → DAYX7_s6.js} +1 -1
- package/lib/dist/_nuxt/{DJ1Y7z-I.js → DBEHU1i8.js} +1 -1
- package/lib/dist/_nuxt/{BcwBv9GB.js → DDUq96bI.js} +1 -1
- package/lib/dist/_nuxt/{o2Vywl-H.js → DDncg9QB.js} +1 -1
- package/lib/dist/_nuxt/{DsJrb1nI.js → DEDBCwhz.js} +1 -1
- package/lib/dist/_nuxt/{CjEhR2ws.js → DEpLw3WP.js} +2 -2
- package/lib/dist/_nuxt/DEwjid9p.js +1 -0
- package/lib/dist/_nuxt/{Cr8Q8tPu.js → DFLo1Tyf.js} +1 -1
- package/lib/dist/_nuxt/{Dt1XZ-dT.js → DHne9z0s.js} +1 -1
- package/lib/dist/_nuxt/{B-IoKwno.js → DHwwmVq4.js} +1 -1
- package/lib/dist/_nuxt/{DeLYsJ35.js → DIwUs3Ba.js} +1 -1
- package/lib/dist/_nuxt/{D9V7WJRV.js → DIxWEKmp.js} +2 -2
- package/lib/dist/_nuxt/{BOjB8Iur.js → DKZtAEbi.js} +1 -1
- package/lib/dist/_nuxt/{N5zD6OYu.js → DK_LjI_d.js} +2 -2
- package/lib/dist/_nuxt/{DCyCGspM.js → DLgZMh7k.js} +2 -2
- package/lib/dist/_nuxt/{DNyOCYge.js → DNVg-DAK.js} +2 -2
- package/lib/dist/_nuxt/DOhAGoXx.js +1 -0
- package/lib/dist/_nuxt/{wE2b238O.js → DOhTCpLP.js} +1 -1
- package/lib/dist/_nuxt/DPIrVNpu.js +2 -0
- package/lib/dist/_nuxt/{BFGeur5y.js → DPiZHWmv.js} +1 -1
- package/lib/dist/_nuxt/{DhCfdE-S.js → DPvwYIe4.js} +2 -2
- package/lib/dist/_nuxt/{DQYlfQhI.js → DR3-ZZ6f.js} +2 -2
- package/lib/dist/_nuxt/DRw_Dh4U.js +1 -0
- package/lib/dist/_nuxt/{yd4iXUAH.js → DShHkyiK.js} +1 -1
- package/lib/dist/_nuxt/{CgemNdgi.js → DTBGgeX5.js} +1 -1
- package/lib/dist/_nuxt/{DgWM9QND.js → DTWPCMsX.js} +1 -1
- package/lib/dist/_nuxt/{BYeAlzmH.js → DThQY4jW.js} +2 -2
- package/lib/dist/_nuxt/{kHdMm7Ia.js → DV4c1hol.js} +1 -1
- package/lib/dist/_nuxt/{DhjCIkTM.js → DVo2fInm.js} +1 -1
- package/lib/dist/_nuxt/{Cf9rATwN.js → DW2SxN4U.js} +1 -1
- package/lib/dist/_nuxt/{Cyv2J_Eh.js → DW4mS2-E.js} +1 -1
- package/lib/dist/_nuxt/{Dm22wCnj.js → DWgfP12k.js} +2 -2
- package/lib/dist/_nuxt/{BWiEf5Q8.js → DWhMxXig.js} +1 -1
- package/lib/dist/_nuxt/{BcAgrix2.js → DYHT9W45.js} +2 -2
- package/lib/dist/_nuxt/{8nelJp1H.js → DYk50ONW.js} +1 -1
- package/lib/dist/_nuxt/{CW0qxcUd.js → DZ3fQXBC.js} +2 -2
- package/lib/dist/_nuxt/{DK5KFoxg.js → DZg_OLF6.js} +1 -1
- package/lib/dist/_nuxt/{ClM36jHa.js → D_bFc41P.js} +2 -2
- package/lib/dist/_nuxt/{D_qsPe1a.js → DaSR3TNr.js} +2 -2
- package/lib/dist/_nuxt/{DEtZQrqc.js → DaZBDg2f.js} +1 -1
- package/lib/dist/_nuxt/{B5Tmc1nh.js → DauyJKz3.js} +1 -1
- package/lib/dist/_nuxt/{DrHVm0_b.js → DbCVM54P.js} +3 -3
- package/lib/dist/_nuxt/{DLdhkiR1.js → DbGbCtZA.js} +1 -1
- package/lib/dist/_nuxt/{CjhAMb0e.js → DbQ8PEQZ.js} +1 -1
- package/lib/dist/_nuxt/{Doul1WC1.js → DePuxtA_.js} +1 -1
- package/lib/dist/_nuxt/{D0Ixu-2d.js → De_R8rrE.js} +1 -1
- package/lib/dist/_nuxt/{CdEISqkr.js → De_RKAA3.js} +2 -2
- package/lib/dist/_nuxt/{Du4GQqsD.js → DgD9_KW9.js} +2 -2
- package/lib/dist/_nuxt/{DmMnX8Ap.js → DgkuvGlL.js} +2 -2
- package/lib/dist/_nuxt/{Dl7beGcU.js → Diky6b8B.js} +1 -1
- package/lib/dist/_nuxt/{CR_iTixR.js → DjFxLMdW.js} +1 -1
- package/lib/dist/_nuxt/{C8D7ZQoo.js → DkhnRb2B.js} +1 -1
- package/lib/dist/_nuxt/{BzcRdSjL.js → Dl_k7PcY.js} +1 -1
- package/lib/dist/_nuxt/{Cyvv3q_1.js → Dl_zFQLa.js} +1 -1
- package/lib/dist/_nuxt/{CmrZvHjC.js → Dm1YWlhs.js} +1 -1
- package/lib/dist/_nuxt/{BEWPFIwa.js → Dm6wi6No.js} +1 -1
- package/lib/dist/_nuxt/{BE7ip4Qt.js → Dme6Ir5a.js} +2 -2
- package/lib/dist/_nuxt/{BmoKdN2h.js → DnFxlRi4.js} +1 -1
- package/lib/dist/_nuxt/{MmcLEC5o.js → DqHVb7w6.js} +1 -1
- package/lib/dist/_nuxt/{BLJLyCJW.js → Dqd3UFGy.js} +1 -1
- package/lib/dist/_nuxt/{D7y3R7Ve.js → DqyL5Uhs.js} +1 -1
- package/lib/dist/_nuxt/{DrKBqNbB.js → DsHvRxpH.js} +1 -1
- package/lib/dist/_nuxt/{BBl0m-42.js → DsURLYvZ.js} +2 -2
- package/lib/dist/_nuxt/{C4JQ9OHi.js → DtawBFI-.js} +2 -2
- package/lib/dist/_nuxt/{CxsGCxm3.js → DvgZT7js.js} +1 -1
- package/lib/dist/_nuxt/{nK1_ybEV.js → DvnUxboW.js} +1 -1
- package/lib/dist/_nuxt/{zErPCtcB.js → DxRO0DFU.js} +1 -1
- package/lib/dist/_nuxt/{Buq-jeAD.js → Dy4meA85.js} +1 -1
- package/lib/dist/_nuxt/{280IOBLC.js → DyjEoH9B.js} +2 -2
- package/lib/dist/_nuxt/{Dovr4y_N.js → Dz5Y7G3v.js} +1 -1
- package/lib/dist/_nuxt/{CfSPTPvX.js → EsjoHwle.js} +1 -1
- package/lib/dist/_nuxt/{Dw6QZof-.js → FJzXgD1q.js} +1 -1
- package/lib/dist/_nuxt/HgF9ENQO.js +1 -0
- package/lib/dist/_nuxt/{O2LGllLZ.js → INibGBS3.js} +1 -1
- package/lib/dist/_nuxt/{C-Bnpd2e.js → IyW17NS0.js} +1 -1
- package/lib/dist/_nuxt/{u2QnTgop.js → J2s5CnRS.js} +1 -1
- package/lib/dist/_nuxt/{CP1s9025.js → KY60TpFQ.js} +1 -1
- package/lib/dist/_nuxt/{Bg-tZGz_.js → L9TIwNpK.js} +1 -1
- package/lib/dist/_nuxt/{BPu-in_i.js → LAEswO5v.js} +1 -1
- package/lib/dist/_nuxt/{QpmejnYJ.js → LAiD9eOm.js} +1 -1
- package/lib/dist/_nuxt/{BWKx5AMV.js → LK2GcfhS.js} +3 -3
- package/lib/dist/_nuxt/{CKkNNjlN.js → LLghMu9r.js} +1 -1
- package/lib/dist/_nuxt/{_xiY6FSW.js → LMDDbn5I.js} +1 -1
- package/lib/dist/_nuxt/{VwKRn_Ub.js → LMIBhNmZ.js} +2 -2
- package/lib/dist/_nuxt/{CJL5s59L.js → LrQ3PXSl.js} +1 -1
- package/lib/dist/_nuxt/{Dty0Z0z-.js → Lu06hHio.js} +1 -1
- package/lib/dist/_nuxt/{CE_eotpK.js → Lv_gHbcP.js} +2 -2
- package/lib/dist/_nuxt/{M_38KAtu.js → MWyA65x_.js} +1 -1
- package/lib/dist/_nuxt/{D0skW1jq.js → NHZFd8bQ.js} +6 -6
- package/lib/dist/_nuxt/{CieNK_Hy.js → NuKLqi_C.js} +1 -1
- package/lib/dist/_nuxt/{B9joLcm_.js → P0QkPGdf.js} +2 -2
- package/lib/dist/_nuxt/{CSqy6vht.js → P1U7Y6XL.js} +1 -1
- package/lib/dist/_nuxt/{C4ETrJi7.js → QWjz_-lm.js} +1 -1
- package/lib/dist/_nuxt/QujOlhZj.js +2 -0
- package/lib/dist/_nuxt/{BSzJ4FxO.js → RCSYvIJN.js} +1 -1
- package/lib/dist/_nuxt/{Bx6zLbPy.js → ReAu2ibT.js} +1 -1
- package/lib/dist/_nuxt/{BTW1NQFl.js → TlYMG5Lb.js} +7 -7
- package/lib/dist/_nuxt/U6Yv1qW2.js +2 -0
- package/lib/dist/_nuxt/{BmU5H8v_.js → X3VQ5PkD.js} +2 -2
- package/lib/dist/_nuxt/{ugJET5xs.js → XZK4lLIj.js} +1 -1
- package/lib/dist/_nuxt/{DOx4axN9.js → Y45Pvb6W.js} +1 -1
- package/lib/dist/_nuxt/{BIgDKQss.js → ZJoY4cv8.js} +1 -1
- package/lib/dist/_nuxt/{CZK_s1tg.js → Zbz8jq1G.js} +1 -1
- package/lib/dist/_nuxt/aCruzJXG.js +1 -0
- package/lib/dist/_nuxt/{Bw11haZJ.js → aJ7vL21_.js} +1 -1
- package/lib/dist/_nuxt/{DOtEMrYm.js → bQDfPeIU.js} +1 -1
- package/lib/dist/_nuxt/builds/latest.json +1 -1
- package/lib/dist/_nuxt/builds/meta/4d3455d9-8566-4611-8871-432defb7e328.json +1 -0
- package/lib/dist/_nuxt/{C2Y5XRar.js → cBorlqEK.js} +2 -2
- package/lib/dist/_nuxt/{D48FTZfZ.js → cI3AFhs3.js} +1 -1
- package/lib/dist/_nuxt/{aDq49son.js → d-tLNYlP.js} +1 -1
- package/lib/dist/_nuxt/{CDSEzxpf.js → dHKlbiDl.js} +1 -1
- package/lib/dist/_nuxt/{C8vzQM9F.js → eKjPor-g.js} +2 -2
- package/lib/dist/_nuxt/{43F7ME7I.js → eskGEf7B.js} +1 -1
- package/lib/dist/_nuxt/{CxqNjWIa.js → euJqEUdj.js} +1 -1
- package/lib/dist/_nuxt/{CZ1dfjxk.js → gfY1oWFn.js} +1 -1
- package/lib/dist/_nuxt/{jdd8DREa.js → gkkS3OdB.js} +1 -1
- package/lib/dist/_nuxt/{BIaf71U6.js → hK_vol2i.js} +1 -1
- package/lib/dist/_nuxt/{Dyq8wlm2.js → iP1ZjiJa.js} +2 -2
- package/lib/dist/_nuxt/{BVg_3UXa.js → iSAFOGha.js} +2 -2
- package/lib/dist/_nuxt/{xZsSy3RW.js → ijWpAKHL.js} +1 -1
- package/lib/dist/_nuxt/{D5ELxc-k.js → jxmEYLWk.js} +1 -1
- package/lib/dist/_nuxt/{DUyMuvWw.js → kMYqkelq.js} +1 -1
- package/lib/dist/_nuxt/kgA_spNm.js +1 -0
- package/lib/dist/_nuxt/{Dyb0u-HW.js → kv4-NDtx.js} +3 -3
- package/lib/dist/_nuxt/{clwBgde6.js → l2p4hKoB.js} +1 -1
- package/lib/dist/_nuxt/{ClX7IuYy.js → lt6VDLdz.js} +1 -1
- package/lib/dist/_nuxt/{BkeBYOsG.js → m-_0Ui4u.js} +1 -1
- package/lib/dist/_nuxt/{EPaHYVRO.js → m9SI53XN.js} +1 -1
- package/lib/dist/_nuxt/{LWWX4jJK.js → mFTJNPpO.js} +2 -2
- package/lib/dist/_nuxt/{ebEXfNSo.js → natIdR_4.js} +1 -1
- package/lib/dist/_nuxt/{COU5RsPn.js → nhJGrFyW.js} +1 -1
- package/lib/dist/_nuxt/{tryzmhi-.js → oU1_jzX3.js} +2 -2
- package/lib/dist/_nuxt/{l5kmItbI.js → qMnjxg1z.js} +2 -2
- package/lib/dist/_nuxt/{D3xcU-9s.js → qUZV8ckr.js} +1 -1
- package/lib/dist/_nuxt/{BGeyVyh0.js → qq4q0aR6.js} +1 -1
- package/lib/dist/_nuxt/{Czkqqtnx.js → rLJJko6s.js} +2 -2
- package/lib/dist/_nuxt/{mMZq6K4Q.js → rNQe47vo.js} +1 -1
- package/lib/dist/_nuxt/{Ct1oIb_4.js → s-MsS4iB.js} +1 -1
- package/lib/dist/_nuxt/{DXFidnjK.js → s0RDr8Yh.js} +1 -1
- package/lib/dist/_nuxt/{BlXcT63I.js → tIh8AlSR.js} +1 -1
- package/lib/dist/_nuxt/{CWxOTqy6.js → uzC90Djt.js} +1 -1
- package/lib/dist/_nuxt/{Cupjn1oo.js → vLzSHf6u.js} +1 -1
- package/lib/dist/_nuxt/{CdLRqnlg.js → vMzl2isH.js} +2 -2
- package/lib/dist/_nuxt/{CA9orR1m.js → w_XtQjYV.js} +1 -1
- package/lib/dist/_nuxt/{spkU7cBe.js → wlN_Lind.js} +1 -1
- package/lib/dist/_nuxt/{DQ_P5qhG.js → xrjPLgbZ.js} +2 -2
- package/lib/dist/_nuxt/{BBNdAyDm.js → yYBIpa2d.js} +2 -2
- package/lib/dist/_nuxt/{CGnFnNNP.js → yvNBUCYV.js} +2 -2
- package/lib/dist/index.html +78 -78
- package/package.json +1 -1
- package/lib/dist/_nuxt/5k15r58b.js +0 -2
- package/lib/dist/_nuxt/6hwpPwDU.js +0 -1
- package/lib/dist/_nuxt/BOcIFZYZ.js +0 -1
- package/lib/dist/_nuxt/BRDmg5de.js +0 -1
- package/lib/dist/_nuxt/BWn7t3Vo.js +0 -1
- package/lib/dist/_nuxt/BieqjKAc.js +0 -1
- package/lib/dist/_nuxt/BkmIs3tY.js +0 -1
- package/lib/dist/_nuxt/C-eSTurT.js +0 -1
- package/lib/dist/_nuxt/CCLf8Ov5.js +0 -1
- package/lib/dist/_nuxt/CJLrQ8Hb.js +0 -2
- package/lib/dist/_nuxt/CPE_7hUe.js +0 -1
- package/lib/dist/_nuxt/CZhg4TfM.js +0 -2
- package/lib/dist/_nuxt/Cde3ly4N.js +0 -1
- package/lib/dist/_nuxt/Cng_fVI_.js +0 -1
- package/lib/dist/_nuxt/D64AfRxx.js +0 -1
- package/lib/dist/_nuxt/D7AJ3OTd.js +0 -1
- package/lib/dist/_nuxt/DG6rkk6h.js +0 -2
- package/lib/dist/_nuxt/DaW8Mwua.js +0 -1
- package/lib/dist/_nuxt/KYUg3rcO.js +0 -1
- package/lib/dist/_nuxt/VaTSRx_Q.js +0 -2
- package/lib/dist/_nuxt/builds/meta/78ffa04d-dc42-4d55-af86-caabed101676.json +0 -1
- package/lib/dist/_nuxt/mkTWPTBO.js +0 -2
- package/lib/dist/_nuxt/nQ8h8-3-.js +0 -2
- package/lib/dist/_nuxt/pBpIB2qI.js +0 -2
@@ -1,5 +1,5 @@
|
|
1
|
-
const __vite__fileDeps=["./
|
2
|
-
import{e as he,db as wr,r as fe,f as se,a1 as br,k as G,a8 as oe,n as ye,p as C,aU as je,S as zt,et as xr,b as ge,R as $t,l as be,cJ as is,cs as rs,z as xe,m as Ie,fx as Er,fT as bn,t as Ne,ec as Sr,fm as Nr,aZ as Ye,b6 as as,$ as wt,a9 as de,aT as Ge,b1 as we,ay as at,bA as Yo,cq as ze,o as Xo,g as Uo,bJ as Mr,cg as kr,b_ as Yn,aM as Cr,am as pe,fL as St,gd as ss,aB as rt,aS as ls,cp as us,af as cs,u as ds,aR as fs,F as Bt,aQ as hs,aC as fi,aF as lo,be as gs,aG as ps,ag as vs,bd as ms,aK as ys,cP as _s,aD as ws,aA as bs}from"./D0skW1jq.js";import{_ as xs}from"./BDWmjfg6.js";import{C as Es}from"./Bg-tZGz_.js";function Xn(e){return Er()?(bn(e),!0):!1}function ae(e){return typeof e=="function"?e():C(e)}const Ss=typeof window<"u"&&typeof document<"u",Ns=e=>typeof e<"u",Ms=Object.prototype.toString,ks=e=>Ms.call(e)==="[object Object]",$r=()=>{};function Cs(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const Ar=e=>e();function $s(e=Ar){const t=fe(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:Sr(t),pause:n,resume:o,eventFilter:i}}function hi(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function $e(...e){if(e.length!==1)return Ne(...e);const t=e[0];return typeof t=="function"?Sr(Nr(()=>({get:t,set:$r}))):fe(t)}function As(e,t,n={}){const{eventFilter:o=Ar,...i}=n;return ge(e,Cs(o,t),i)}function bt(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:a,resume:s,isActive:l}=$s(o);return{stop:As(e,t,{...i,eventFilter:r}),pause:a,resume:s,isActive:l}}function Ts(e,t={}){if(!Yn(e))return Cr(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Nr(()=>({get(){return e.value[o]},set(i){var r;if((r=ae(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const s=[...e.value];s[o]=i,e.value=s}else{const s={...e.value,[o]:i};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[o]=i}}));return n}function xo(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:E,throwOnTimeout:g}={}){let v=null;const y=[new Promise(S=>{v=ge(e,x=>{d(x)!==t&&(v==null||v(),S(x))},{flush:f,deep:h,immediate:!0})})];return E!=null&&y.push(hi(E,g).then(()=>ae(e)).finally(()=>v==null?void 0:v())),Promise.race(y)}function o(d,f){if(!Yn(d))return n(x=>x===d,f);const{flush:h="sync",deep:E=!1,timeout:g,throwOnTimeout:v}=f??{};let b=null;const S=[new Promise(x=>{b=ge([e,d],([M,z])=>{t!==(M===z)&&(b==null||b(),x(M))},{flush:h,deep:E,immediate:!0})})];return g!=null&&S.push(hi(g,v).then(()=>ae(e)).finally(()=>(b==null||b(),ae(e)))),Promise.race(S)}function i(d){return n(f=>!!f,d)}function r(d){return o(null,d)}function a(d){return o(void 0,d)}function s(d){return n(Number.isNaN,d)}function l(d,f){return n(h=>{const E=Array.from(h);return E.includes(d)||E.includes(ae(d))},f)}function u(d){return c(1,d)}function c(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(ae(e))?{toMatch:n,toContains:l,changed:u,changedTimes:c,get not(){return xo(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:s,toBeUndefined:a,changed:u,changedTimes:c,get not(){return xo(e,!t)}}}function $n(e){return xo(e)}function Is(e,t,n){return ge(e,(o,i,r)=>{o&&t(o,i,r)},n)}function Ps(e){var t;const n=ae(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Tr=Ss?window:void 0;function Ir(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=Tr):[t,n,o,i]=e,!t)return $r;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],a=()=>{r.forEach(c=>c()),r.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=ge(()=>[Ps(t),ae(i)],([c,d])=>{if(a(),!c)return;const f=ks(d)?{...d}:d;r.push(...n.flatMap(h=>o.map(E=>s(c,h,E,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Xn(u),u}function Ds(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function gi(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=Tr,eventName:r="keydown",passive:a=!1,dedupe:s=!1}=o,l=Ds(t);return Ir(i,r,c=>{c.repeat&&ae(s)||l(c)&&n(c)},a)}function zs(e){return JSON.parse(JSON.stringify(e))}function Ut(e,t,n,o={}){var i,r,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:f}=o,h=Uo(),E=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((a=(r=h==null?void 0:h.proxy)==null?void 0:r.$emit)==null?void 0:a.bind(h==null?void 0:h.proxy));let g=u;t||(t="modelValue"),g=g||`update:${t.toString()}`;const v=S=>s?typeof s=="function"?s(S):zs(S):S,b=()=>Ns(e[t])?v(e[t]):d,y=S=>{f?f(S)&&E(g,S):E(g,S)};if(l){const S=b(),x=fe(S);let M=!1;return ge(()=>e[t],z=>{M||(M=!0,x.value=v(z),Ye(()=>M=!1))}),ge(x,z=>{!M&&(z!==e[t]||c)&&y(z)},{deep:c}),x}else return se({get(){return b()},set(S){y(S)}})}var Os={value:()=>{}};function Un(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new xn(n)}function xn(e){this._=e}function Bs(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}xn.prototype=Un.prototype={constructor:xn,on:function(e,t){var n=this._,o=Bs(e+"",n),i,r=-1,a=o.length;if(arguments.length<2){for(;++r<a;)if((i=(e=o[r]).type)&&(i=Vs(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(i=(e=o[r]).type)n[i]=pi(n[i],e.name,t);else if(t==null)for(i in n)n[i]=pi(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function Vs(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function pi(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Os,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Eo="http://www.w3.org/1999/xhtml";const vi={svg:"http://www.w3.org/2000/svg",xhtml:Eo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vi.hasOwnProperty(t)?{space:vi[t],local:e}:e}function Rs(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Eo&&t.documentElement.namespaceURI===Eo?t.createElement(e):t.createElementNS(n,e)}}function Hs(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pr(e){var t=Zn(e);return(t.local?Hs:Rs)(t)}function Fs(){}function Zo(e){return e==null?Fs:function(){return this.querySelector(e)}}function Ls(e){typeof e!="function"&&(e=Zo(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=new Array(a),l,u,c=0;c<a;++c)(l=r[c])&&(u=e.call(l,l.__data__,c,r))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Pe(o,this._parents)}function Gs(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ys(){return[]}function Dr(e){return e==null?Ys:function(){return this.querySelectorAll(e)}}function Xs(e){return function(){return Gs(e.apply(this,arguments))}}function Us(e){typeof e=="function"?e=Xs(e):e=Dr(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a=t[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(o.push(e.call(l,l.__data__,u,a)),i.push(l));return new Pe(o,i)}function zr(e){return function(){return this.matches(e)}}function Or(e){return function(t){return t.matches(e)}}var Zs=Array.prototype.find;function qs(e){return function(){return Zs.call(this.children,e)}}function Ws(){return this.firstElementChild}function Ks(e){return this.select(e==null?Ws:qs(typeof e=="function"?e:Or(e)))}var Js=Array.prototype.filter;function Qs(){return Array.from(this.children)}function js(e){return function(){return Js.call(this.children,e)}}function el(e){return this.selectAll(e==null?Qs:js(typeof e=="function"?e:Or(e)))}function tl(e){typeof e!="function"&&(e=zr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new Pe(o,this._parents)}function Br(e){return new Array(e.length)}function nl(){return new Pe(this._enter||this._groups.map(Br),this._parents)}function An(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}An.prototype={constructor:An,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ol(e){return function(){return e}}function il(e,t,n,o,i,r){for(var a=0,s,l=t.length,u=r.length;a<u;++a)(s=t[a])?(s.__data__=r[a],o[a]=s):n[a]=new An(e,r[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function rl(e,t,n,o,i,r,a){var s,l,u=new Map,c=t.length,d=r.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=a.call(l,l.__data__,s,t)+"",u.has(h)?i[s]=l:u.set(h,l));for(s=0;s<d;++s)h=a.call(e,r[s],s,r)+"",(l=u.get(h))?(o[s]=l,l.__data__=r[s],u.delete(h)):n[s]=new An(e,r[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function al(e){return e.__data__}function sl(e,t){if(!arguments.length)return Array.from(this,al);var n=t?rl:il,o=this._parents,i=this._groups;typeof e!="function"&&(e=ol(e));for(var r=i.length,a=new Array(r),s=new Array(r),l=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],f=d.length,h=ll(e.call(c,c&&c.__data__,u,o)),E=h.length,g=s[u]=new Array(E),v=a[u]=new Array(E),b=l[u]=new Array(f);n(c,d,g,v,b,h,t);for(var y=0,S=0,x,M;y<E;++y)if(x=g[y]){for(y>=S&&(S=y+1);!(M=v[S])&&++S<E;);x._next=M||null}}return a=new Pe(a,o),a._enter=s,a._exit=l,a}function ll(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ul(){return new Pe(this._exit||this._groups.map(Br),this._parents)}function cl(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function dl(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=o[l],d=u.length,f=s[l]=new Array(d),h,E=0;E<d;++E)(h=u[E]||c[E])&&(f[E]=h);for(;l<i;++l)s[l]=n[l];return new Pe(s,this._parents)}function fl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],a;--i>=0;)(a=o[i])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function hl(e){e||(e=gl);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a=n[r],s=a.length,l=i[r]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Pe(i,this._parents).order()}function gl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function pl(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vl(){return Array.from(this)}function ml(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null}function yl(){let e=0;for(const t of this)++e;return e}function _l(){return!this.node()}function wl(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,a=i.length,s;r<a;++r)(s=i[r])&&e.call(s,s.__data__,r,i);return this}function bl(e){return function(){this.removeAttribute(e)}}function xl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function El(e,t){return function(){this.setAttribute(e,t)}}function Sl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Nl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ml(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function kl(e,t){var n=Zn(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?xl:bl:typeof t=="function"?n.local?Ml:Nl:n.local?Sl:El)(n,t))}function Vr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Cl(e){return function(){this.style.removeProperty(e)}}function $l(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Al(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Tl(e,t,n){return arguments.length>1?this.each((t==null?Cl:typeof t=="function"?Al:$l)(e,t,n??"")):At(this.node(),e)}function At(e,t){return e.style.getPropertyValue(t)||Vr(e).getComputedStyle(e,null).getPropertyValue(t)}function Il(e){return function(){delete this[e]}}function Pl(e,t){return function(){this[e]=t}}function Dl(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zl(e,t){return arguments.length>1?this.each((t==null?Il:typeof t=="function"?Dl:Pl)(e,t)):this.node()[e]}function Rr(e){return e.trim().split(/^|\s+/)}function qo(e){return e.classList||new Hr(e)}function Hr(e){this._node=e,this._names=Rr(e.getAttribute("class")||"")}Hr.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Fr(e,t){for(var n=qo(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Lr(e,t){for(var n=qo(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Ol(e){return function(){Fr(this,e)}}function Bl(e){return function(){Lr(this,e)}}function Vl(e,t){return function(){(t.apply(this,arguments)?Fr:Lr)(this,e)}}function Rl(e,t){var n=Rr(e+"");if(arguments.length<2){for(var o=qo(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Vl:t?Ol:Bl)(n,t))}function Hl(){this.textContent=""}function Fl(e){return function(){this.textContent=e}}function Ll(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Gl(e){return arguments.length?this.each(e==null?Hl:(typeof e=="function"?Ll:Fl)(e)):this.node().textContent}function Yl(){this.innerHTML=""}function Xl(e){return function(){this.innerHTML=e}}function Ul(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Zl(e){return arguments.length?this.each(e==null?Yl:(typeof e=="function"?Ul:Xl)(e)):this.node().innerHTML}function ql(){this.nextSibling&&this.parentNode.appendChild(this)}function Wl(){return this.each(ql)}function Kl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jl(){return this.each(Kl)}function Ql(e){var t=typeof e=="function"?e:Pr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function jl(){return null}function eu(e,t){var n=typeof e=="function"?e:Pr(e),o=t==null?jl:typeof t=="function"?t:Zo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function tu(){var e=this.parentNode;e&&e.removeChild(this)}function nu(){return this.each(tu)}function ou(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ru(e){return this.select(e?iu:ou)}function au(e){return arguments.length?this.property("__data__",e):this.node().__data__}function su(e){return function(t){e.call(this,t,this.__data__)}}function lu(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function uu(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function cu(e,t,n){return function(){var o=this.__on,i,r=su(t);if(o){for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function du(e,t,n){var o=lu(e+""),i,r=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<r;++i)if((a=o[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?cu:uu,i=0;i<r;++i)this.each(s(o[i],t,n));return this}function Gr(e,t,n){var o=Vr(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function fu(e,t){return function(){return Gr(this,e,t)}}function hu(e,t){return function(){return Gr(this,e,t.apply(this,arguments))}}function gu(e,t){return this.each((typeof t=="function"?hu:fu)(e,t))}function*pu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,a;i<r;++i)(a=o[i])&&(yield a)}var Yr=[null];function Pe(e,t){this._groups=e,this._parents=t}function rn(){return new Pe([[document.documentElement]],Yr)}function vu(){return this}Pe.prototype=rn.prototype={constructor:Pe,select:Ls,selectAll:Us,selectChild:Ks,selectChildren:el,filter:tl,data:sl,enter:nl,exit:ul,join:cl,merge:dl,selection:vu,order:fl,sort:hl,call:pl,nodes:vl,node:ml,size:yl,empty:_l,each:wl,attr:kl,style:Tl,property:zl,classed:Rl,text:Gl,html:Zl,raise:Wl,lower:Jl,append:Ql,insert:eu,remove:nu,clone:ru,datum:au,on:du,dispatch:gu,[Symbol.iterator]:pu};function Oe(e){return typeof e=="string"?new Pe([[document.querySelector(e)]],[document.documentElement]):new Pe([[e]],Yr)}function mu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Le(e,t){if(e=mu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const yu={passive:!1},Wt={capture:!0,passive:!1};function uo(e){e.stopImmediatePropagation()}function Nt(e){e.preventDefault(),e.stopImmediatePropagation()}function Xr(e){var t=e.document.documentElement,n=Oe(e).on("dragstart.drag",Nt,Wt);"onselectstart"in t?n.on("selectstart.drag",Nt,Wt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ur(e,t){var n=e.document.documentElement,o=Oe(e).on("dragstart.drag",null);t&&(o.on("click.drag",Nt,Wt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const un=e=>()=>e;function So(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}So.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function _u(e){return!e.ctrlKey&&!e.button}function wu(){return this.parentNode}function bu(e,t){return t??{x:e.x,y:e.y}}function xu(){return navigator.maxTouchPoints||"ontouchstart"in this}function Eu(){var e=_u,t=wu,n=bu,o=xu,i={},r=Un("start","drag","end"),a=0,s,l,u,c,d=0;function f(x){x.on("mousedown.drag",h).filter(o).on("touchstart.drag",v).on("touchmove.drag",b,yu).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,M){if(!(c||!e.call(this,x,M))){var z=S(this,t.call(this,x,M),x,M,"mouse");z&&(Oe(x.view).on("mousemove.drag",E,Wt).on("mouseup.drag",g,Wt),Xr(x.view),uo(x),u=!1,s=x.clientX,l=x.clientY,z("start",x))}}function E(x){if(Nt(x),!u){var M=x.clientX-s,z=x.clientY-l;u=M*M+z*z>d}i.mouse("drag",x)}function g(x){Oe(x.view).on("mousemove.drag mouseup.drag",null),Ur(x.view,u),Nt(x),i.mouse("end",x)}function v(x,M){if(e.call(this,x,M)){var z=x.changedTouches,w=t.call(this,x,M),H=z.length,R,X;for(R=0;R<H;++R)(X=S(this,w,x,M,z[R].identifier,z[R]))&&(uo(x),X("start",x,z[R]))}}function b(x){var M=x.changedTouches,z=M.length,w,H;for(w=0;w<z;++w)(H=i[M[w].identifier])&&(Nt(x),H("drag",x,M[w]))}function y(x){var M=x.changedTouches,z=M.length,w,H;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),w=0;w<z;++w)(H=i[M[w].identifier])&&(uo(x),H("end",x,M[w]))}function S(x,M,z,w,H,R){var X=r.copy(),O=Le(R||z,M),j,U,m;if((m=n.call(x,new So("beforestart",{sourceEvent:z,target:f,identifier:H,active:a,x:O[0],y:O[1],dx:0,dy:0,dispatch:X}),w))!=null)return j=m.x-O[0]||0,U=m.y-O[1]||0,function T(N,I,B){var k=O,A;switch(N){case"start":i[H]=T,A=a++;break;case"end":delete i[H],--a;case"drag":O=Le(B||I,M),A=a;break}X.call(N,x,new So(N,{sourceEvent:I,subject:m,target:f,identifier:H,active:A,x:O[0]+j,y:O[1]+U,dx:O[0]-k[0],dy:O[1]-k[1],dispatch:X}),w)}}return f.filter=function(x){return arguments.length?(e=typeof x=="function"?x:un(!!x),f):e},f.container=function(x){return arguments.length?(t=typeof x=="function"?x:un(x),f):t},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:un(x),f):n},f.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:un(!!x),f):o},f.on=function(){var x=r.on.apply(r,arguments);return x===r?f:x},f.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,f):Math.sqrt(d)},f}function Wo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zr(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function an(){}var Kt=.7,Tn=1/Kt,Mt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Su=/^#([0-9a-f]{3,8})$/,Nu=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),Mu=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),ku=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Jt}\\)$`),Cu=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${Jt}\\)$`),$u=new RegExp(`^hsl\\(${Jt},${Xe},${Xe}\\)$`),Au=new RegExp(`^hsla\\(${Jt},${Xe},${Xe},${Jt}\\)$`),mi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Wo(an,Qt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yi,formatHex:yi,formatHex8:Tu,formatHsl:Iu,formatRgb:_i,toString:_i});function yi(){return this.rgb().formatHex()}function Tu(){return this.rgb().formatHex8()}function Iu(){return qr(this).formatHsl()}function _i(){return this.rgb().formatRgb()}function Qt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Su.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wi(t):n===3?new Ae(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Nu.exec(e))?new Ae(t[1],t[2],t[3],1):(t=Mu.exec(e))?new Ae(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ku.exec(e))?cn(t[1],t[2],t[3],t[4]):(t=Cu.exec(e))?cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$u.exec(e))?Ei(t[1],t[2]/100,t[3]/100,1):(t=Au.exec(e))?Ei(t[1],t[2]/100,t[3]/100,t[4]):mi.hasOwnProperty(e)?wi(mi[e]):e==="transparent"?new Ae(NaN,NaN,NaN,0):null}function wi(e){return new Ae(e>>16&255,e>>8&255,e&255,1)}function cn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Ae(e,t,n,o)}function Pu(e){return e instanceof an||(e=Qt(e)),e?(e=e.rgb(),new Ae(e.r,e.g,e.b,e.opacity)):new Ae}function No(e,t,n,o){return arguments.length===1?Pu(e):new Ae(e,t,n,o??1)}function Ae(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Wo(Ae,No,Zr(an,{brighter(e){return e=e==null?Tn:Math.pow(Tn,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kt:Math.pow(Kt,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ae(dt(this.r),dt(this.g),dt(this.b),In(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bi,formatHex:bi,formatHex8:Du,formatRgb:xi,toString:xi}));function bi(){return`#${lt(this.r)}${lt(this.g)}${lt(this.b)}`}function Du(){return`#${lt(this.r)}${lt(this.g)}${lt(this.b)}${lt((isNaN(this.opacity)?1:this.opacity)*255)}`}function xi(){const e=In(this.opacity);return`${e===1?"rgb(":"rgba("}${dt(this.r)}, ${dt(this.g)}, ${dt(this.b)}${e===1?")":`, ${e})`}`}function In(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lt(e){return e=dt(e),(e<16?"0":"")+e.toString(16)}function Ei(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Be(e,t,n,o)}function qr(e){if(e instanceof Be)return new Be(e.h,e.s,e.l,e.opacity);if(e instanceof an||(e=Qt(e)),!e)return new Be;if(e instanceof Be)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,s=r-i,l=(r+i)/2;return s?(t===r?a=(n-o)/s+(n<o)*6:n===r?a=(o-t)/s+2:a=(t-n)/s+4,s/=l<.5?r+i:2-r-i,a*=60):s=l>0&&l<1?0:a,new Be(a,s,l,e.opacity)}function zu(e,t,n,o){return arguments.length===1?qr(e):new Be(e,t,n,o??1)}function Be(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Wo(Be,zu,Zr(an,{brighter(e){return e=e==null?Tn:Math.pow(Tn,e),new Be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kt:Math.pow(Kt,e),new Be(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Ae(co(e>=240?e-240:e+120,i,o),co(e,i,o),co(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Be(Si(this.h),dn(this.s),dn(this.l),In(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=In(this.opacity);return`${e===1?"hsl(":"hsla("}${Si(this.h)}, ${dn(this.s)*100}%, ${dn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Si(e){return e=(e||0)%360,e<0?e+360:e}function dn(e){return Math.max(0,Math.min(1,e||0))}function co(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Wr=e=>()=>e;function Ou(e,t){return function(n){return e+n*t}}function Bu(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Vu(e){return(e=+e)==1?Kr:function(t,n){return n-t?Bu(t,n,e):Wr(isNaN(t)?n:t)}}function Kr(e,t){var n=t-e;return n?Ou(e,n):Wr(isNaN(e)?t:e)}const Ni=function e(t){var n=Vu(t);function o(i,r){var a=n((i=No(i)).r,(r=No(r)).r),s=n(i.g,r.g),l=n(i.b,r.b),u=Kr(i.opacity,r.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return o.gamma=e,o}(1);function ot(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Mo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fo=new RegExp(Mo.source,"g");function Ru(e){return function(){return e}}function Hu(e){return function(t){return e(t)+""}}function Fu(e,t){var n=Mo.lastIndex=fo.lastIndex=0,o,i,r,a=-1,s=[],l=[];for(e=e+"",t=t+"";(o=Mo.exec(e))&&(i=fo.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(o=o[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:ot(o,i)})),n=fo.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?Hu(l[0].x):Ru(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}var Mi=180/Math.PI,ko={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jr(e,t,n,o,i,r){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,l/=s),e*o<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Mi,skewX:Math.atan(l)*Mi,scaleX:a,scaleY:s}}var fn;function Lu(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ko:Jr(t.a,t.b,t.c,t.d,t.e,t.f)}function Gu(e){return e==null||(fn||(fn=document.createElementNS("http://www.w3.org/2000/svg","g")),fn.setAttribute("transform",e),!(e=fn.transform.baseVal.consolidate()))?ko:(e=e.matrix,Jr(e.a,e.b,e.c,e.d,e.e,e.f))}function Qr(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);E.push({i:g-4,x:ot(u,d)},{i:g-2,x:ot(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:ot(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:ot(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function l(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");E.push({i:g-4,x:ot(u,d)},{i:g-2,x:ot(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var E=-1,g=f.length,v;++E<g;)d[(v=f[E]).i]=v.x(h);return d.join("")}}}var Yu=Qr(Lu,"px, ","px)","deg)"),Xu=Qr(Gu,", ",")",")"),Uu=1e-12;function ki(e){return((e=Math.exp(e))+1/e)/2}function Zu(e){return((e=Math.exp(e))-1/e)/2}function qu(e){return((e=Math.exp(2*e))-1)/(e+1)}const Wu=function e(t,n,o){function i(r,a){var s=r[0],l=r[1],u=r[2],c=a[0],d=a[1],f=a[2],h=c-s,E=d-l,g=h*h+E*E,v,b;if(g<Uu)b=Math.log(f/u)/t,v=function(w){return[s+w*h,l+w*E,u*Math.exp(t*w*b)]};else{var y=Math.sqrt(g),S=(f*f-u*u+o*g)/(2*u*n*y),x=(f*f-u*u-o*g)/(2*f*n*y),M=Math.log(Math.sqrt(S*S+1)-S),z=Math.log(Math.sqrt(x*x+1)-x);b=(z-M)/t,v=function(w){var H=w*b,R=ki(M),X=u/(n*y)*(R*qu(t*H+M)-Zu(M));return[s+X*h,l+X*E,u*R/ki(t*H+M)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return i.rho=function(r){var a=Math.max(.001,+r),s=a*a,l=s*s;return e(a,s,l)},i}(Math.SQRT2,2,4);var Tt=0,Ft=0,Vt=0,jr=1e3,Pn,Lt,Dn=0,pt=0,qn=0,jt=typeof performance=="object"&&performance.now?performance:Date,ea=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ko(){return pt||(ea(Ku),pt=jt.now()+qn)}function Ku(){pt=0}function zn(){this._call=this._time=this._next=null}zn.prototype=ta.prototype={constructor:zn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ko():+n)+(t==null?0:+t),!this._next&&Lt!==this&&(Lt?Lt._next=this:Pn=this,Lt=this),this._call=e,this._time=n,Co()},stop:function(){this._call&&(this._call=null,this._time=1/0,Co())}};function ta(e,t,n){var o=new zn;return o.restart(e,t,n),o}function Ju(){Ko(),++Tt;for(var e=Pn,t;e;)(t=pt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Tt}function Ci(){pt=(Dn=jt.now())+qn,Tt=Ft=0;try{Ju()}finally{Tt=0,ju(),pt=0}}function Qu(){var e=jt.now(),t=e-Dn;t>jr&&(qn-=t,Dn=e)}function ju(){for(var e,t=Pn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Pn=n);Lt=e,Co(o)}function Co(e){if(!Tt){Ft&&(Ft=clearTimeout(Ft));var t=e-pt;t>24?(e<1/0&&(Ft=setTimeout(Ci,e-jt.now()-qn)),Vt&&(Vt=clearInterval(Vt))):(Vt||(Dn=jt.now(),Vt=setInterval(Qu,jr)),Tt=1,ea(Ci))}}function $i(e,t,n){var o=new zn;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var ec=Un("start","end","cancel","interrupt"),tc=[],na=0,Ai=1,$o=2,En=3,Ti=4,Ao=5,Sn=6;function Wn(e,t,n,o,i,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;nc(e,n,{name:t,index:o,group:i,on:ec,tween:tc,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:na})}function Jo(e,t){var n=He(e,t);if(n.state>na)throw new Error("too late; already scheduled");return n}function Ze(e,t){var n=He(e,t);if(n.state>En)throw new Error("too late; already running");return n}function He(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function nc(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=ta(r,0,n.time);function r(u){n.state=Ai,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==Ai)return l();for(c in o)if(h=o[c],h.name===n.name){if(h.state===En)return $i(a);h.state===Ti?(h.state=Sn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Sn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if($i(function(){n.state===En&&(n.state=Ti,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=$o,n.on.call("start",e,e.__data__,n.index,n.group),n.state===$o){for(n.state=En,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Ao,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Ao&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Sn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Nn(e,t){var n=e.__transition,o,i,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){r=!1;continue}i=o.state>$o&&o.state<Ao,o.state=Sn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}r&&delete e.__transition}}function oc(e){return this.each(function(){Nn(this,e)})}function ic(e,t){var n,o;return function(){var i=Ze(this,e),r=i.tween;if(r!==n){o=n=r;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function rc(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Ze(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}r.tween=i}}function ac(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=He(this.node(),n).tween,i=0,r=o.length,a;i<r;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((t==null?ic:rc)(n,e,t))}function Qo(e,t,n){var o=e._id;return e.each(function(){var i=Ze(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return He(i,o).value[t]}}function oa(e,t){var n;return(typeof t=="number"?ot:t instanceof Qt?Ni:(n=Qt(t))?(t=n,Ni):Fu)(e,t)}function sc(e){return function(){this.removeAttribute(e)}}function lc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function uc(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttribute(e);return a===i?null:a===o?r:r=t(o=a,n)}}function cc(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?r:r=t(o=a,n)}}function dc(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function fc(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function hc(e,t){var n=Zn(e),o=n==="transform"?Xu:oa;return this.attrTween(e,typeof t=="function"?(n.local?fc:dc)(n,o,Qo(this,"attr."+e,t)):t==null?(n.local?lc:sc)(n):(n.local?cc:uc)(n,o,t))}function gc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function pc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function vc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&pc(e,r)),n}return i._value=t,i}function mc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&gc(e,r)),n}return i._value=t,i}function yc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Zn(e);return this.tween(n,(o.local?vc:mc)(o,t))}function _c(e,t){return function(){Jo(this,e).delay=+t.apply(this,arguments)}}function wc(e,t){return t=+t,function(){Jo(this,e).delay=t}}function bc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_c:wc)(t,e)):He(this.node(),t).delay}function xc(e,t){return function(){Ze(this,e).duration=+t.apply(this,arguments)}}function Ec(e,t){return t=+t,function(){Ze(this,e).duration=t}}function Sc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xc:Ec)(t,e)):He(this.node(),t).duration}function Nc(e,t){if(typeof t!="function")throw new Error;return function(){Ze(this,e).ease=t}}function Mc(e){var t=this._id;return arguments.length?this.each(Nc(t,e)):He(this.node(),t).ease}function kc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ze(this,e).ease=n}}function Cc(e){if(typeof e!="function")throw new Error;return this.each(kc(this._id,e))}function $c(e){typeof e!="function"&&(e=zr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new et(o,this._parents,this._name,this._id)}function Ac(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),s=0;s<r;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<o;++s)a[s]=t[s];return new et(a,this._parents,this._name,this._id)}function Tc(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Ic(e,t,n){var o,i,r=Tc(t)?Jo:Ze;return function(){var a=r(this,e),s=a.on;s!==o&&(i=(o=s).copy()).on(t,n),a.on=i}}function Pc(e,t){var n=this._id;return arguments.length<2?He(this.node(),n).on.on(e):this.each(Ic(n,e,t))}function Dc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function zc(){return this.on("end.remove",Dc(this._id))}function Oc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zo(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var s=o[a],l=s.length,u=r[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Wn(u[f],t,n,f,u,He(c,n)));return new et(r,this._parents,t,n)}function Bc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dr(e));for(var o=this._groups,i=o.length,r=[],a=[],s=0;s<i;++s)for(var l=o[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,E=He(c,n),g=0,v=f.length;g<v;++g)(h=f[g])&&Wn(h,t,n,g,f,E);r.push(f),a.push(c)}return new et(r,a,t,n)}var Vc=rn.prototype.constructor;function Rc(){return new Vc(this._groups,this._parents)}function Hc(e,t){var n,o,i;return function(){var r=At(this,e),a=(this.style.removeProperty(e),At(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}function ia(e){return function(){this.style.removeProperty(e)}}function Fc(e,t,n){var o,i=n+"",r;return function(){var a=At(this,e);return a===i?null:a===o?r:r=t(o=a,n)}}function Lc(e,t,n){var o,i,r;return function(){var a=At(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),At(this,e))),a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s))}}function Gc(e,t){var n,o,i,r="style."+t,a="end."+r,s;return function(){var l=Ze(this,e),u=l.on,c=l.value[r]==null?s||(s=ia(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(a,i=c),l.on=o}}function Yc(e,t,n){var o=(e+="")=="transform"?Yu:oa;return t==null?this.styleTween(e,Hc(e,o)).on("end.style."+e,ia(e)):typeof t=="function"?this.styleTween(e,Lc(e,o,Qo(this,"style."+e,t))).each(Gc(this._id,e)):this.styleTween(e,Fc(e,o,t),n).on("end.style."+e,null)}function Xc(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Uc(e,t,n){var o,i;function r(){var a=t.apply(this,arguments);return a!==i&&(o=(i=a)&&Xc(e,a,n)),o}return r._value=t,r}function Zc(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,Uc(e,t,n??""))}function qc(e){return function(){this.textContent=e}}function Wc(e){return function(){var t=e(this);this.textContent=t??""}}function Kc(e){return this.tween("text",typeof e=="function"?Wc(Qo(this,"text",e)):qc(e==null?"":e+""))}function Jc(e){return function(t){this.textContent=e.call(this,t)}}function Qc(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Jc(i)),t}return o._value=e,o}function jc(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Qc(e))}function ed(){for(var e=this._name,t=this._id,n=ra(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=He(l,t);Wn(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new et(o,this._parents,e,n)}function td(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--i===0&&r()}};n.each(function(){var u=Ze(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&r()})}var nd=0;function et(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function ra(){return++nd}var We=rn.prototype;et.prototype={constructor:et,select:Oc,selectAll:Bc,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:$c,merge:Ac,selection:Rc,transition:ed,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:Pc,attr:hc,attrTween:yc,style:Yc,styleTween:Zc,text:Kc,textTween:jc,remove:zc,tween:ac,delay:bc,duration:Sc,ease:Mc,easeVarying:Cc,end:td,[Symbol.iterator]:We[Symbol.iterator]};function od(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var id={time:null,delay:0,duration:250,ease:od};function rd(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function ad(e){var t,n;e instanceof et?(t=e._id,e=e._name):(t=ra(),(n=id).time=Ko(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Wn(l,e,t,u,a,n||rd(l,t));return new et(o,this._parents,e,t)}rn.prototype.interrupt=oc;rn.prototype.transition=ad;const hn=e=>()=>e;function sd(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Qe(e,t,n){this.k=e,this.x=t,this.y=n}Qe.prototype={constructor:Qe,scale:function(e){return e===1?this:new Qe(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qe(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var It=new Qe(1,0,0);Qe.prototype;function ho(e){e.stopImmediatePropagation()}function Rt(e){e.preventDefault(),e.stopImmediatePropagation()}function ld(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function ud(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ii(){return this.__zoom||It}function cd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function dd(){return navigator.maxTouchPoints||"ontouchstart"in this}function fd(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function hd(){var e=ld,t=ud,n=fd,o=cd,i=dd,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Wu,u=Un("start","zoom","end"),c,d,f,h=500,E=150,g=0,v=10;function b(m){m.property("__zoom",Ii).on("wheel.zoom",H,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",X).filter(i).on("touchstart.zoom",O).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(m,T,N,I){var B=m.selection?m.selection():m;B.property("__zoom",Ii),m!==B?M(m,T,N,I):B.interrupt().each(function(){z(this,arguments).event(I).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},b.scaleBy=function(m,T,N,I){b.scaleTo(m,function(){var B=this.__zoom.k,k=typeof T=="function"?T.apply(this,arguments):T;return B*k},N,I)},b.scaleTo=function(m,T,N,I){b.transform(m,function(){var B=t.apply(this,arguments),k=this.__zoom,A=N==null?x(B):typeof N=="function"?N.apply(this,arguments):N,W=k.invert(A),ee=typeof T=="function"?T.apply(this,arguments):T;return n(S(y(k,ee),A,W),B,a)},N,I)},b.translateBy=function(m,T,N,I){b.transform(m,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof N=="function"?N.apply(this,arguments):N),t.apply(this,arguments),a)},null,I)},b.translateTo=function(m,T,N,I,B){b.transform(m,function(){var k=t.apply(this,arguments),A=this.__zoom,W=I==null?x(k):typeof I=="function"?I.apply(this,arguments):I;return n(It.translate(W[0],W[1]).scale(A.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof N=="function"?-N.apply(this,arguments):-N),k,a)},I,B)};function y(m,T){return T=Math.max(r[0],Math.min(r[1],T)),T===m.k?m:new Qe(T,m.x,m.y)}function S(m,T,N){var I=T[0]-N[0]*m.k,B=T[1]-N[1]*m.k;return I===m.x&&B===m.y?m:new Qe(m.k,I,B)}function x(m){return[(+m[0][0]+ +m[1][0])/2,(+m[0][1]+ +m[1][1])/2]}function M(m,T,N,I){m.on("start.zoom",function(){z(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(I).end()}).tween("zoom",function(){var B=this,k=arguments,A=z(B,k).event(I),W=t.apply(B,k),ee=N==null?x(W):typeof N=="function"?N.apply(B,k):N,L=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),J=B.__zoom,ue=typeof T=="function"?T.apply(B,k):T,D=l(J.invert(ee).concat(L/J.k),ue.invert(ee).concat(L/ue.k));return function(ie){if(ie===1)ie=ue;else{var K=D(ie),Z=L/K[2];ie=new Qe(Z,ee[0]-K[0]*Z,ee[1]-K[1]*Z)}A.zoom(null,ie)}})}function z(m,T,N){return!N&&m.__zooming||new w(m,T)}function w(m,T){this.that=m,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(m,T),this.taps=0}w.prototype={event:function(m){return m&&(this.sourceEvent=m),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(m,T){return this.mouse&&m!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&m!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&m!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(m){var T=Oe(this.that).datum();u.call(m,this.that,new sd(m,{sourceEvent:this.sourceEvent,target:b,type:m,transform:this.that.__zoom,dispatch:u}),T)}};function H(m,...T){if(!e.apply(this,arguments))return;var N=z(this,T).event(m),I=this.__zoom,B=Math.max(r[0],Math.min(r[1],I.k*Math.pow(2,o.apply(this,arguments)))),k=Le(m);if(N.wheel)(N.mouse[0][0]!==k[0]||N.mouse[0][1]!==k[1])&&(N.mouse[1]=I.invert(N.mouse[0]=k)),clearTimeout(N.wheel);else{if(I.k===B)return;N.mouse=[k,I.invert(k)],Nn(this),N.start()}Rt(m),N.wheel=setTimeout(A,E),N.zoom("mouse",n(S(y(I,B),N.mouse[0],N.mouse[1]),N.extent,a));function A(){N.wheel=null,N.end()}}function R(m,...T){if(f||!e.apply(this,arguments))return;var N=m.currentTarget,I=z(this,T,!0).event(m),B=Oe(m.view).on("mousemove.zoom",ee,!0).on("mouseup.zoom",L,!0),k=Le(m,N),A=m.clientX,W=m.clientY;Xr(m.view),ho(m),I.mouse=[k,this.__zoom.invert(k)],Nn(this),I.start();function ee(J){if(Rt(J),!I.moved){var ue=J.clientX-A,D=J.clientY-W;I.moved=ue*ue+D*D>g}I.event(J).zoom("mouse",n(S(I.that.__zoom,I.mouse[0]=Le(J,N),I.mouse[1]),I.extent,a))}function L(J){B.on("mousemove.zoom mouseup.zoom",null),Ur(J.view,I.moved),Rt(J),I.event(J).end()}}function X(m,...T){if(e.apply(this,arguments)){var N=this.__zoom,I=Le(m.changedTouches?m.changedTouches[0]:m,this),B=N.invert(I),k=N.k*(m.shiftKey?.5:2),A=n(S(y(N,k),I,B),t.apply(this,T),a);Rt(m),s>0?Oe(this).transition().duration(s).call(M,A,I,m):Oe(this).call(b.transform,A,I,m)}}function O(m,...T){if(e.apply(this,arguments)){var N=m.touches,I=N.length,B=z(this,T,m.changedTouches.length===I).event(m),k,A,W,ee;for(ho(m),A=0;A<I;++A)W=N[A],ee=Le(W,this),ee=[ee,this.__zoom.invert(ee),W.identifier],B.touch0?!B.touch1&&B.touch0[2]!==ee[2]&&(B.touch1=ee,B.taps=0):(B.touch0=ee,k=!0,B.taps=1+!!c);c&&(c=clearTimeout(c)),k&&(B.taps<2&&(d=ee[0],c=setTimeout(function(){c=null},h)),Nn(this),B.start())}}function j(m,...T){if(this.__zooming){var N=z(this,T).event(m),I=m.changedTouches,B=I.length,k,A,W,ee;for(Rt(m),k=0;k<B;++k)A=I[k],W=Le(A,this),N.touch0&&N.touch0[2]===A.identifier?N.touch0[0]=W:N.touch1&&N.touch1[2]===A.identifier&&(N.touch1[0]=W);if(A=N.that.__zoom,N.touch1){var L=N.touch0[0],J=N.touch0[1],ue=N.touch1[0],D=N.touch1[1],ie=(ie=ue[0]-L[0])*ie+(ie=ue[1]-L[1])*ie,K=(K=D[0]-J[0])*K+(K=D[1]-J[1])*K;A=y(A,Math.sqrt(ie/K)),W=[(L[0]+ue[0])/2,(L[1]+ue[1])/2],ee=[(J[0]+D[0])/2,(J[1]+D[1])/2]}else if(N.touch0)W=N.touch0[0],ee=N.touch0[1];else return;N.zoom("touch",n(S(A,W,ee),N.extent,a))}}function U(m,...T){if(this.__zooming){var N=z(this,T).event(m),I=m.changedTouches,B=I.length,k,A;for(ho(m),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),k=0;k<B;++k)A=I[k],N.touch0&&N.touch0[2]===A.identifier?delete N.touch0:N.touch1&&N.touch1[2]===A.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(A=Le(A,this),Math.hypot(d[0]-A[0],d[1]-A[1])<v)){var W=Oe(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return b.wheelDelta=function(m){return arguments.length?(o=typeof m=="function"?m:hn(+m),b):o},b.filter=function(m){return arguments.length?(e=typeof m=="function"?m:hn(!!m),b):e},b.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:hn(!!m),b):i},b.extent=function(m){return arguments.length?(t=typeof m=="function"?m:hn([[+m[0][0],+m[0][1]],[+m[1][0],+m[1][1]]]),b):t},b.scaleExtent=function(m){return arguments.length?(r[0]=+m[0],r[1]=+m[1],b):[r[0],r[1]]},b.translateExtent=function(m){return arguments.length?(a[0][0]=+m[0][0],a[1][0]=+m[1][0],a[0][1]=+m[0][1],a[1][1]=+m[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(m){return arguments.length?(n=m,b):n},b.duration=function(m){return arguments.length?(s=+m,b):s},b.interpolate=function(m){return arguments.length?(l=m,b):l},b.on=function(){var m=u.on.apply(u,arguments);return m===u?b:m},b.clickDistance=function(m){return arguments.length?(g=(m=+m)*m,b):Math.sqrt(g)},b.tapDistance=function(m){return arguments.length?(v=+m,b):v},b}var Q=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(Q||{}),jo=(e=>(e.Partial="partial",e.Full="full",e))(jo||{}),st=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(st||{}),vt=(e=>(e.Strict="strict",e.Loose="loose",e))(vt||{}),To=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(To||{}),Zt=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Zt||{});function ei(){return typeof window<"u"?window:{chrome:!1,addEventListener(...e){}}}function Io(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof(o==null?void 0:o.hasAttribute)=="function"?o.hasAttribute("contenteditable"):!1,r=typeof(o==null?void 0:o.closest)=="function"?o.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(o==null?void 0:o.nodeName)||i||!!r}function gd(e){return e.ctrlKey||e.metaKey||e.shiftKey}function Pi(e,t,n,o){const i=t.split("+").map(r=>r.trim().toLowerCase());return i.length===1?e.toLowerCase()===t.toLowerCase():(o?n.delete(e.toLowerCase()):n.add(e.toLowerCase()),i.every((r,a)=>n.has(r)&&Array.from(n.values())[a]===i[a]))}function pd(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=vd(n.code,e);return Array.isArray(e)?e.some(i=>Pi(n[o],i,t,n.type==="keyup")):Pi(n[o],e,t,n.type==="keyup")}}function vd(e,t){return typeof t=="string"?e===t?"code":"key":t.includes(e)?"code":"key"}function qt(e,t){const n=ei(),o=fe(ae(e)===!0);let i=!1;const r=new Set;let a=l(ae(e));return ge(o,(u,c)=>{u!==c&&(t==null||t(u))}),ge(()=>ae(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&s(),a=l(u)},{immediate:!0}),Ir(n,"blur",()=>{ae(e)!==!0&&(o.value=!1)}),gi((...u)=>a(...u),u=>{i=gd(u),!(!i&&Io(u))&&(u.preventDefault(),o.value=!0)},{eventName:"keydown"}),gi((...u)=>a(...u),u=>{if(o.value){if(!i&&Io(u))return;s()}},{eventName:"keyup"}),o;function s(){i=!1,r.clear(),o.value=!1}function l(u){return u===null?(s(),()=>!1):typeof u=="boolean"?(s(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?pd(u,r):u}}const aa="vue-flow__node-desc",sa="vue-flow__edge-desc",md="vue-flow__aria-live",la=["Enter"," ","Escape"],kt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function ua(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodes:r,nodeExtent:a,nodeDragThreshold:s,viewport:l,autoPanOnNodeDrag:u,nodesDraggable:c,panBy:d,findNode:f,multiSelectionActive:h,nodesSelectionActive:E,selectNodesOnDrag:g,removeSelectedElements:v,addSelectedNodes:b,updateNodePositions:y,emits:S}=_e(),{onStart:x,onDrag:M,onStop:z,el:w,disabled:H,id:R,selectable:X,dragHandle:O}=e,j=fe(!1);let U=[],m,T=null,N={x:void 0,y:void 0},I={x:0,y:0},B=null,k=!1,A=0,W=!1;const ee=xd(),L=({x:Z,y:te})=>{N={x:Z,y:te};let ne=!1;if(U=U.map(le=>{const me={x:Z-le.distance.x,y:te-le.distance.y};n.value&&(me.x=o.value[0]*Math.round(me.x/o.value[0]),me.y=o.value[1]*Math.round(me.y/o.value[1]));const{computedPosition:ve}=ni(le,me,S.error,a.value,le.parentNode?f(le.parentNode):void 0);return ne=ne||le.position.x!==ve.x||le.position.y!==ve.y,le.position=ve,le}),!!ne&&(y(U,!0,!0),j.value=!0,B)){const[le,me]=yo({id:R,dragItems:U,findNode:f});M({event:B,node:le,nodes:me})}},J=()=>{if(!T)return;const[Z,te]=Ea(I,T);if(Z!==0||te!==0){const ne={x:(N.x??0)-Z/l.value.zoom,y:(N.y??0)-te/l.value.zoom};d({x:Z,y:te})&&L(ne)}A=requestAnimationFrame(J)},ue=(Z,te)=>{k=!0;const ne=f(R);!g.value&&!h.value&&ne&&(ne.selected||v()),ne&&ae(X)&&g.value&&Oo(ne,h.value,b,v,E,!1,te);const le=ee(Z);if(N=le,U=Vd(r.value,c.value,le,f,R),U.length){const[me,ve]=yo({id:R,dragItems:U,findNode:f});x({event:Z.sourceEvent,node:me,nodes:ve})}},D=(Z,te)=>{var ne;s.value===0&&ue(Z,te),N=ee(Z),T=((ne=t.value)==null?void 0:ne.getBoundingClientRect())||null,I=ht(Z.sourceEvent,T)},ie=(Z,te)=>{const ne=ee(Z);if(!W&&k&&u.value&&(W=!0,J()),!k){const le=ne.xSnapped-(N.x??0),me=ne.ySnapped-(N.y??0);Math.sqrt(le*le+me*me)>s.value&&ue(Z,te)}(N.x!==ne.xSnapped||N.y!==ne.ySnapped)&&U.length&&k&&(B=Z.sourceEvent,I=ht(Z.sourceEvent,T),L(ne))},K=Z=>{if(k&&(j.value=!1,W=!1,k=!1,cancelAnimationFrame(A),U.length)){y(U,!1,!1);const[te,ne]=yo({id:R,dragItems:U,findNode:f});z({event:Z.sourceEvent,node:te,nodes:ne})}};return ge([()=>ae(H),w],([Z,te],ne,le)=>{if(te){const me=Oe(te);Z||(m=Eu().on("start",ve=>D(ve,te)).on("drag",ve=>ie(ve,te)).on("end",ve=>K(ve)).filter(ve=>{const _=ve.target,p=ae(O);return!ve.button&&(!i.value||!Gi(_,`.${i.value}`,te)&&(!p||Gi(_,p,te)))}),me.call(m)),le(()=>{me.on(".drag",null),m&&(m.on("start",null),m.on("drag",null),m.on("end",null))})}}),j}const Di=Symbol("vueFlow"),ca=Symbol("nodeId"),da=Symbol("nodeRef"),yd=Symbol("edgeId"),_d=Symbol("edgeRef"),Kn=Symbol("slots");function wd(){return{doubleClick:F(),click:F(),mouseEnter:F(),mouseMove:F(),mouseLeave:F(),contextMenu:F(),updateStart:F(),update:F(),updateEnd:F()}}function bd(e,t){const n=wd();return n.doubleClick.on(o=>{var i,r;t.edgeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.edgeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.edgeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.edgeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.edgeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.edgeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.updateStart.on(o=>{var i,r;t.edgeUpdateStart(o),(r=(i=e.events)==null?void 0:i.updateStart)==null||r.call(i,o)}),n.update.on(o=>{var i,r;t.edgeUpdate(o),(r=(i=e.events)==null?void 0:i.update)==null||r.call(i,o)}),n.updateEnd.on(o=>{var i,r;t.edgeUpdateEnd(o),(r=(i=e.events)==null?void 0:i.updateEnd)==null||r.call(i,o)}),Object.entries(n).reduce((o,[i,r])=>(o.emit[i]=r.trigger,o.on[i]=r.on,o),{emit:{},on:{}})}function xd(){const{viewport:e,snapGrid:t,snapToGrid:n}=_e();return({sourceEvent:o})=>{const i=o.touches?o.touches[0].clientX:o.clientX,r=o.touches?o.touches[0].clientY:o.clientY,a={x:(i-e.value.x)/e.value.zoom,y:(r-e.value.y)/e.value.zoom};return{xSnapped:n.value?t.value[0]*Math.round(a.x/t.value[0]):a.x,ySnapped:n.value?t.value[1]*Math.round(a.y/t.value[1]):a.y,...a}}}function gn(){return!0}function fa({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:r,onEdgeUpdateEnd:a}){const{vueFlowRef:s,connectionMode:l,connectionRadius:u,connectOnClick:c,connectionClickStartHandle:d,nodesConnectable:f,autoPanOnConnect:h,findNode:E,panBy:g,getNodes:v,startConnection:b,updateConnection:y,endConnection:S,emits:x,viewport:M,edges:z,nodes:w,isValidConnection:H}=_e();let R=null,X=!1,O=null;function j(m){var T;const N=ae(n)==="target",I=oi(m),B=Oi(m.target);if(I&&m.button===0||!I){let k=function(_){ne=ht(_,Z);const{handle:p,validHandleResult:P}=Xd(_,B,Do(ne,M.value,!1,[1,1]),u.value,me,$=>Zi(_,$,l.value,ae(t),ae(e),N?"target":"source",ee,B,z.value,w.value,E));if(L=p,le||(ve(),le=!0),R=P.connection,X=P.isValid,O=P.handleDomNode,y(L&&X?ya({x:L.x,y:L.y},M.value):ne,P.endHandle,Zd(!!L,X)),!L&&!X&&!O)return _o(te);R&&R.source!==R.target&&O&&(_o(te),te=O,O.classList.add("connecting","vue-flow__handle-connecting"),O.classList.toggle("valid",X),O.classList.toggle("vue-flow__handle-valid",X))},A=function(_){(L||O)&&R&&X&&(r?r(_,R):x.connect(R)),x.connectEnd(_),i&&(a==null||a(_)),_o(te),cancelAnimationFrame(J),S(_),le=!1,X=!1,R=null,O=null,B.removeEventListener("mousemove",k),B.removeEventListener("mouseup",A),B.removeEventListener("touchmove",k),B.removeEventListener("touchend",A)};const W=E(ae(t));let ee=ae(o)||H.value||gn;!ee&&W&&(ee=(N?W.isValidSourcePos:W.isValidTargetPos)||gn);let L,J=0;const{x:ue,y:D}=ht(m),ie=B==null?void 0:B.elementFromPoint(ue,D),K=ii(ae(i),ie),Z=(T=s.value)==null?void 0:T.getBoundingClientRect();if(!Z||!K)return;let te,ne=ht(m,Z),le=!1;const me=Ud({nodes:v.value,nodeId:ae(t),handleId:ae(e),handleType:K}),ve=()=>{if(!h)return;const[_,p]=Ea(ne,Z);g({x:_,y:p}),J=requestAnimationFrame(ve)};b({nodeId:ae(t),handleId:ae(e),type:K},{x:ue-Z.left,y:D-Z.top},m),x.connectStart({event:m,nodeId:ae(t),handleId:ae(e),handleType:K}),B.addEventListener("mousemove",k),B.addEventListener("mouseup",A),B.addEventListener("touchmove",k),B.addEventListener("touchend",A)}}function U(m){if(!c.value)return;const T=ae(n)==="target";if(!d.value)x.clickConnectStart({event:m,nodeId:ae(t),handleId:ae(e)}),b({nodeId:ae(t),type:ae(n),handleId:ae(e)},void 0,m,!0);else{let N=ae(o)||H.value||gn;const I=E(ae(t));if(!N&&I&&(N=(T?I.isValidSourcePos:I.isValidTargetPos)||gn),I&&(typeof I.connectable>"u"?f.value:I.connectable)===!1)return;const B=Oi(m.target),{connection:k,isValid:A}=Zi(m,{nodeId:ae(t),id:ae(e),type:ae(n)},l.value,d.value.nodeId,d.value.handleId||null,d.value.type,N,B,z.value,w.value,E),W=k.source===k.target;A&&!W&&x.connect(k),x.clickConnectEnd(m),S(m,!0)}}return{handlePointerDown:j,handleClick:U}}function Ed(){return zt(ca,"")}function Sd(e){const t=Ed()??"",n=zt(da,fe(null)),{findNode:o,edges:i,emits:r}=_e(),a=o(t);return a||r.error(new Ce(Me.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:a,parentNode:se(()=>o(a.parentNode)),connectedEdges:se(()=>ti([a],i.value))}}function Nd(){return{doubleClick:F(),click:F(),mouseEnter:F(),mouseMove:F(),mouseLeave:F(),contextMenu:F(),dragStart:F(),drag:F(),dragStop:F()}}function Md(e,t){const n=Nd();return n.doubleClick.on(o=>{var i,r;t.nodeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.nodeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.nodeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.nodeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.nodeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.nodeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.dragStart.on(o=>{var i,r;t.nodeDragStart(o),(r=(i=e.events)==null?void 0:i.dragStart)==null||r.call(i,o)}),n.drag.on(o=>{var i,r;t.nodeDrag(o),(r=(i=e.events)==null?void 0:i.drag)==null||r.call(i,o)}),n.dragStop.on(o=>{var i,r;t.nodeDragStop(o),(r=(i=e.events)==null?void 0:i.dragStop)==null||r.call(i,o)}),Object.entries(n).reduce((o,[i,r])=>(o.emit[i]=r.trigger,o.on[i]=r.on,o),{emit:{},on:{}})}function ha(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:r,nodesDraggable:a,emits:s}=_e();return(l,u=!1)=>{const c=r.value?i.value[0]:5,d=r.value?i.value[1]:5,f=u?4:1,h=l.x*c*f,E=l.y*d*f,g=e.value.filter(v=>v.draggable||a&&typeof v.draggable>"u").map(v=>{const b={x:v.computedPosition.x+h,y:v.computedPosition.y+E},{computedPosition:y}=ni(v,b,s.error,t.value,v.parentNode?o(v.parentNode):void 0);return{id:v.id,position:y,from:v.position,distance:{x:l.x,y:l.y},dimensions:v.dimensions}});n(g,!0,!1)}}const go=.1;function nt(){return Qn("Viewport not initialized yet."),Promise.resolve(!1)}const kd={zoomIn:nt,zoomOut:nt,zoomTo:nt,fitView:nt,setCenter:nt,fitBounds:nt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:nt,setTransform:nt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function Cd(e,t){const{getNodes:n}=t;function o(r,a){return new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleBy(po(e.d3Selection,a,()=>{s(!0)}),r):s(!1)})}function i(r,a,s,l){return new Promise(u=>{const{x:c,y:d}=ga({x:-r,y:-a},e.translateExtent),f=It.translate(-c,-d).scale(s);e.d3Selection&&e.d3Zoom?e.d3Zoom.transform(po(e.d3Selection,l,()=>{u(!0)}),f):u(!1)})}return se(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:a=>o(1.2,a==null?void 0:a.duration),zoomOut:a=>o(1/1.2,a==null?void 0:a.duration),zoomTo:(a,s)=>new Promise(l=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleTo(po(e.d3Selection,s==null?void 0:s.duration,()=>{l(!0)}),a):l(!1)}),setViewport:(a,s)=>i(a.x,a.y,a.zoom,s==null?void 0:s.duration),setTransform:(a,s)=>i(a.x,a.y,a.zoom,s==null?void 0:s.duration),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(a={padding:go,includeHiddenNodes:!1,duration:0})=>{const s=(a.includeHiddenNodes?e.nodes:n.value).filter(f=>{var h;const E=f.dimensions.width&&f.dimensions.height;let g=!0;return(h=a.nodes)!=null&&h.length&&(g=a.nodes.includes(f.id)),E&&g});if(!s.length)return Promise.resolve(!1);const l=wa(s),{x:u,y:c,zoom:d}=Bi(l,e.dimensions.width,e.dimensions.height,a.minZoom??e.minZoom,a.maxZoom??e.maxZoom,a.padding??go,a.offset);return i(u,c,d,a==null?void 0:a.duration)},setCenter:(a,s,l)=>{const u=typeof(l==null?void 0:l.zoom)<"u"?l.zoom:e.maxZoom,c=e.dimensions.width/2-a*u,d=e.dimensions.height/2-s*u;return i(c,d,u,l==null?void 0:l.duration)},fitBounds:(a,s={padding:go})=>{const{x:l,y:u,zoom:c}=Bi(a,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,s.padding);return i(l,u,c,s==null?void 0:s.duration)},project:a=>Do(a,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:a=>{if(e.vueFlowRef){const{x:s,y:l}=e.vueFlowRef.getBoundingClientRect(),u={x:a.x-s,y:a.y-l};return Do(u,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:a=>{if(e.vueFlowRef){const{x:s,y:l}=e.vueFlowRef.getBoundingClientRect(),u={x:a.x+s,y:a.y+l};return ya(u,e.viewport)}return{x:0,y:0}}}:kd)}function po(e,t=0,n){return e.transition().duration(t).on("end",n)}function $d(e,t,n){const o=xr(!0);return o.run(()=>{const i=()=>{o.run(()=>{let g,v,b=!!(n.nodes.value.length||n.edges.value.length);g=bt([e.modelValue,()=>{var y,S;return(S=(y=e.modelValue)==null?void 0:y.value)==null?void 0:S.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setElements(y),!v&&!b&&y.length?b=!0:v==null||v.resume())}),v=bt([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([y,S])=>{var x;(x=e.modelValue)!=null&&x.value&&Array.isArray(e.modelValue.value)&&(g==null||g.pause(),e.modelValue.value=[...y,...S],Ye(()=>{g==null||g.resume()}))},{immediate:b}),bn(()=>{g==null||g.stop(),v==null||v.stop()})})},r=()=>{o.run(()=>{let g,v,b=!!n.nodes.value.length;g=bt([e.nodes,()=>{var y,S;return(S=(y=e.nodes)==null?void 0:y.value)==null?void 0:S.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setNodes(y),!v&&!b&&y.length?b=!0:v==null||v.resume())}),v=bt([n.nodes,()=>n.nodes.value.length],([y])=>{var S;(S=e.nodes)!=null&&S.value&&Array.isArray(e.nodes.value)&&(g==null||g.pause(),e.nodes.value=[...y],Ye(()=>{g==null||g.resume()}))},{immediate:b}),bn(()=>{g==null||g.stop(),v==null||v.stop()})})},a=()=>{o.run(()=>{let g,v,b=!!n.edges.value.length;g=bt([e.edges,()=>{var y,S;return(S=(y=e.edges)==null?void 0:y.value)==null?void 0:S.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setEdges(y),!v&&!b&&y.length?b=!0:v==null||v.resume())}),v=bt([n.edges,()=>n.edges.value.length],([y])=>{var S;(S=e.edges)!=null&&S.value&&Array.isArray(e.edges.value)&&(g==null||g.pause(),e.edges.value=[...y],Ye(()=>{g==null||g.resume()}))},{immediate:b}),bn(()=>{g==null||g.stop(),v==null||v.stop()})})},s=()=>{o.run(()=>{ge(()=>t.maxZoom,()=>{t.maxZoom&&Ee(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{o.run(()=>{ge(()=>t.minZoom,()=>{t.minZoom&&Ee(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{ge(()=>t.translateExtent,()=>{t.translateExtent&&Ee(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{ge(()=>t.nodeExtent,()=>{t.nodeExtent&&Ee(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{ge(()=>t.applyDefault,()=>{Ee(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{o.run(()=>{const g=async v=>{let b=v;typeof t.autoConnect=="function"&&(b=await t.autoConnect(v)),b!==!1&&n.addEdges([b])};ge(()=>t.autoConnect,()=>{Ee(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),ge(n.autoConnect,(v,b,y)=>{v?n.onConnect(g):n.hooks.value.connect.off(g),y(()=>{n.hooks.value.connect.off(g)})},{immediate:!0})})},h=()=>{const g=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const v of Object.keys(t)){const b=v;if(!g.includes(b)){const y=$e(()=>t[b]),S=n[b];Yn(S)&&o.run(()=>{ge(y,x=>{Ee(x)&&(S.value=x)},{immediate:!0,flush:"pre"})})}}};(()=>{i(),r(),a(),l(),s(),u(),c(),d(),f(),h()})()}),()=>o.stop()}function zi(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Po(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Jn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function mt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function ga(e,t){return{x:mt(e.x,t[0][0],t[1][0]),y:mt(e.y,t[0][1],t[1][1])}}function Oi(e){const t=e.getRootNode();return"elementFromPoint"in t?t:ei().document}function yt(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function ft(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!yt(e)}function xt(e){return ft(e)&&"computedPosition"in e}function pn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Ad(e){return pn(e.width)&&pn(e.height)&&pn(e.x)&&pn(e.y)}function Td(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:St({width:0,height:0}),handleBounds:{source:[],target:[]},computedPosition:St({z:0,...e.position}),draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ee(e.data)?e.data:{},events:St(Ee(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function pa(e,t,n){var o,i;const r={id:e.id.toString(),type:e.type??(t==null?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??(n==null?void 0:n.updatable),selectable:e.selectable??(n==null?void 0:n.selectable),focusable:e.focusable??(n==null?void 0:n.focusable),data:Ee(e.data)?e.data:{},events:St(Ee(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(n==null?void 0:n.interactionWidth),...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function va(e,t,n,o){const i=typeof e=="string"?e:e.id,r=new Set,a=o==="source"?"target":"source";for(const s of n)s[a]===i&&r.add(s[o]);return t.filter(s=>r.has(s.id))}function Id(...e){if(e.length===3){const[r,a,s]=e;return va(r,a,s,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>yt(r)&&r.source===o).map(r=>n.find(a=>ft(a)&&a.id===r.target))}function Pd(...e){if(e.length===3){const[r,a,s]=e;return va(r,a,s,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>yt(r)&&r.target===o).map(r=>n.find(a=>ft(a)&&a.id===r.source))}function ma({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Dd(e,t){return t.some(n=>yt(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function ya({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function Do({x:e,y:t},{x:n,y:o,zoom:i},r,[a,s]){const l={x:(e-n)/i,y:(t-o)/i};return r?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l}function zd(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function _a({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Od({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function wa(e){const t=e.reduce((n,{computedPosition:o={x:0,y:0},dimensions:i={width:0,height:0}}={})=>zd(n,_a({...o,...i})),{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY});return Od(t)}function ba(e,t,{x:n,y:o,zoom:i}={x:0,y:0,zoom:1},r=!1,a=!1){const s={x:(t.x-n)/i,y:(t.y-o)/i,width:t.width/i,height:t.height/i};return e.filter(l=>{const{computedPosition:u={x:0,y:0},dimensions:c={width:0,height:0},selectable:d}=l;if(a&&!d)return!1;const f={...u,width:c.width||0,height:c.height||0},h=Po(s,f),E=typeof c.width>"u"||typeof c.height>"u"||c.width===0||c.height===0,g=r&&h>0,v=c.width*c.height;return E||g||h>=v})}function ti(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function Bi(e,t,n,o,i,r=.1,a={x:0,y:0}){const s=t/(e.width*(1+r)),l=n/(e.height*(1+r)),u=Math.min(s,l),c=mt(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c+(a.x??0),E=n/2-f*c+(a.y??0);return{x:h,y:E,zoom:c}}function Bd(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function xa(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:xa(n,t):!1}function ut(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function Vi(e,t,n){return e<t?mt(Math.abs(e-t),1,50)/50:e>n?-mt(Math.abs(e-n),1,50)/50:0}function Ea(e,t){const n=Vi(e.x,35,t.width-35)*20,o=Vi(e.y,35,t.height-35)*20;return[n,o]}function vo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if(typeof t.style=="function"?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if(typeof i.width=="string"){const r=Number(i.width.replace("px",""));i.width=`${r+n}px`}else i.width+=n;if(o>0)if(typeof i.height=="string"){const r=Number(i.height.replace("px",""));i.height=`${r+o}px`}else i.height+=o;if(e.position.x<0){const r=Math.abs(e.position.x);if(t.position.x=t.position.x-r,typeof i.width=="string"){const a=Number(i.width.replace("px",""));i.width=`${a+r}px`}else i.width+=r;e.position.x=0}if(e.position.y<0){const r=Math.abs(e.position.y);if(t.position.y=t.position.y-r,typeof i.height=="string"){const a=Number(i.height.replace("px",""));i.height=`${a+r}px`}else i.height+=r;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),typeof t.style=="function"?t.style=r=>{const a=t.style;return{...a(r),...i}}:t.style={...t.style,...i}}}}function Ri(e,t){var n,o;const i=e.filter(a=>a.type==="add"||a.type==="remove");for(const a of i)if(a.type==="add")t.findIndex(l=>l.id===a.item.id)===-1&&t.push(a.item);else if(a.type==="remove"){const s=t.findIndex(l=>l.id===a.id);s!==-1&&t.splice(s,1)}const r=t.map(a=>a.id);for(const a of t){const s=e.filter(l=>l.id===a.id);for(const l of s)switch(l.type){case"select":a.selected=l.selected;break;case"position":if(xt(a)&&(typeof l.position<"u"&&(a.position=l.position),typeof l.dragging<"u"&&(a.dragging=l.dragging),a.expandParent&&a.parentNode)){const u=t[r.indexOf(a.parentNode)];u&&xt(u)&&vo(a,u)}break;case"dimensions":if(xt(a)){if(typeof l.dimensions<"u"&&(a.dimensions=l.dimensions),typeof l.updateStyle<"u"&&(a.style={...a.style||{},width:`${(n=l.dimensions)==null?void 0:n.width}px`,height:`${(o=l.dimensions)==null?void 0:o.height}px`}),typeof l.resizing<"u"&&(a.resizing=l.resizing),a.expandParent&&a.parentNode){const u=t[r.indexOf(a.parentNode)];u&&xt(u)&&(u.initialized?vo(a,u):Ye(()=>{vo(a,u)}))}a.initialized||(a.initialized=!0)}break}}return t}function Je(e,t){return{id:e,type:"select",selected:t}}function Hi(e){return{item:e,type:"add"}}function Fi(e){return{id:e,type:"remove"}}function Li(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function mo(e,t){return e.reduce((n,o)=>{let i=t.includes(o.id);Ee(o.selectable)&&!o.selectable&&(i=!1);const r=xt(o)?"changedNodes":"changedEdges";return!o.selected&&i?n[r].push(Je(o.id,!0)):o.selected&&!i&&n[r].push(Je(o.id,!1)),n},{changedNodes:[],changedEdges:[]})}function F(e){const t=new Set;let n=!1;const o=()=>t.size>0;e&&(n=!0,t.add(e));const i=s=>{t.delete(s)};return{on:s=>{e&&n&&t.delete(e),t.add(s);const l=()=>{i(s),e&&n&&t.add(e)};return Xn(l),{off:l}},off:i,trigger:s=>Promise.all(Array.from(t).map(l=>l(s))),hasListeners:o,fns:t}}function Gi(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Vd(e,t,n,o,i){return e.filter(r=>(r.selected||r.id===i)&&(!r.parentNode||!xa(r,o))&&(r.draggable||t&&typeof r.draggable>"u")).map(r=>{var a,s;return St({id:r.id,position:r.position||{x:0,y:0},distance:{x:n.x-((a=r.computedPosition)==null?void 0:a.x)||0,y:n.y-((s=r.computedPosition)==null?void 0:s.y)||0},from:r.computedPosition,extent:r.extent,parentNode:r.parentNode,dimensions:r.dimensions,expandParent:r.expandParent})})}function yo({id:e,dragItems:t,findNode:n}){const o=t.reduce((i,r)=>{const a=n(r.id);return a&&i.push(a),i},[]);return[e?o.find(i=>i.id===e):o[0],o]}function Sa(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function Rd(e,t,n){const[o,i,r,a]=typeof e!="string"?Sa(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-r]]:!1}function Hd(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&(i==null?void 0:i.range)==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=Rd(i,e,o);r&&(i=r)}else t(new Ce(Me.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=(o==null?void 0:o.computedPosition.x)||0,a=(o==null?void 0:o.computedPosition.y)||0;i=[[i[0][0]+r,i[0][1]+a],[i[1][0]+r,i[1][1]+a]]}else if(i!=="parent"&&(i!=null&&i.range)&&Array.isArray(i.range)){const[r,a,s,l]=Sa(i.padding),u=(o==null?void 0:o.computedPosition.x)||0,c=(o==null?void 0:o.computedPosition.y)||0;i=[[i.range[0][0]+u+l,i.range[0][1]+c+r],[i.range[1][0]+u-a,i.range[1][1]+c-s]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Fd({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function ni(e,t,n,o,i){const r=Fd(e.dimensions,Hd(e,n,o,i)),a=ga(t,r);return{position:{x:a.x-((i==null?void 0:i.computedPosition.x)||0),y:a.y-((i==null?void 0:i.computedPosition.y)||0)},computedPosition:a}}function zo(e,t,n){const o=((n==null?void 0:n.x)??0)+t.x,i=((n==null?void 0:n.y)??0)+t.y,r=(n==null?void 0:n.width)??t.width,a=(n==null?void 0:n.height)??t.height;switch(e){case Q.Top:return{x:o+r/2,y:i};case Q.Right:return{x:o+r,y:i+a/2};case Q.Bottom:return{x:o+r/2,y:i+a};case Q.Left:return{x:o,y:i+a/2}}}function Yi(e=[],t){return e.length&&(t?e.find(n=>n.id===t):e[0])||null}function Ld(e,t,n,o,i,r){const a=zo(n,{...e.dimensions,...e.computedPosition},t),s=zo(r,{...o.dimensions,...o.computedPosition},i);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}}function Gd({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:a,height:s,viewport:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+r)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=_a({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:a/l.zoom,height:s/l.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function Yd(e,t,n=!1){const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const r=t(e.source),a=t(e.target);return!r||!a?0:(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,a.computedPosition.z||0)),i)}var Me=(e=>(e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e))(Me||{});const Xi={MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
1
|
+
const __vite__fileDeps=["./DaSR3TNr.js","./NHZFd8bQ.js","./entry.6uu-XYG8.css","./BMpULef7.js","./CqocAHnv.js","./Overlay.SAT9fImX.css","./L9TIwNpK.js","./BPS1H-Sz.js","./BZfcRRAG.js","./Flow.BOMwddXa.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
2
|
+
import{e as he,db as wr,r as fe,f as se,a1 as br,k as G,a8 as oe,n as ye,p as C,aU as je,S as zt,et as xr,b as ge,R as $t,l as be,cJ as is,cs as rs,z as xe,m as Ie,fx as Er,fT as bn,t as Ne,ec as Sr,fm as Nr,aZ as Ye,b6 as as,$ as wt,a9 as de,aT as Ge,b1 as we,ay as at,bA as Yo,cq as ze,o as Xo,g as Uo,bJ as Mr,cg as kr,b_ as Yn,aM as Cr,am as pe,fL as St,gd as ss,aB as rt,aS as ls,cp as us,af as cs,u as ds,aR as fs,F as Bt,aQ as hs,aC as fi,aF as lo,be as gs,aG as ps,ag as vs,bd as ms,aK as ys,cP as _s,aD as ws,aA as bs}from"./NHZFd8bQ.js";import{_ as xs}from"./CqocAHnv.js";import{C as Es}from"./L9TIwNpK.js";function Xn(e){return Er()?(bn(e),!0):!1}function ae(e){return typeof e=="function"?e():C(e)}const Ss=typeof window<"u"&&typeof document<"u",Ns=e=>typeof e<"u",Ms=Object.prototype.toString,ks=e=>Ms.call(e)==="[object Object]",$r=()=>{};function Cs(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const Ar=e=>e();function $s(e=Ar){const t=fe(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:Sr(t),pause:n,resume:o,eventFilter:i}}function hi(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function $e(...e){if(e.length!==1)return Ne(...e);const t=e[0];return typeof t=="function"?Sr(Nr(()=>({get:t,set:$r}))):fe(t)}function As(e,t,n={}){const{eventFilter:o=Ar,...i}=n;return ge(e,Cs(o,t),i)}function bt(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:a,resume:s,isActive:l}=$s(o);return{stop:As(e,t,{...i,eventFilter:r}),pause:a,resume:s,isActive:l}}function Ts(e,t={}){if(!Yn(e))return Cr(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Nr(()=>({get(){return e.value[o]},set(i){var r;if((r=ae(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const s=[...e.value];s[o]=i,e.value=s}else{const s={...e.value,[o]:i};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[o]=i}}));return n}function xo(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:E,throwOnTimeout:g}={}){let v=null;const y=[new Promise(S=>{v=ge(e,x=>{d(x)!==t&&(v==null||v(),S(x))},{flush:f,deep:h,immediate:!0})})];return E!=null&&y.push(hi(E,g).then(()=>ae(e)).finally(()=>v==null?void 0:v())),Promise.race(y)}function o(d,f){if(!Yn(d))return n(x=>x===d,f);const{flush:h="sync",deep:E=!1,timeout:g,throwOnTimeout:v}=f??{};let b=null;const S=[new Promise(x=>{b=ge([e,d],([M,z])=>{t!==(M===z)&&(b==null||b(),x(M))},{flush:h,deep:E,immediate:!0})})];return g!=null&&S.push(hi(g,v).then(()=>ae(e)).finally(()=>(b==null||b(),ae(e)))),Promise.race(S)}function i(d){return n(f=>!!f,d)}function r(d){return o(null,d)}function a(d){return o(void 0,d)}function s(d){return n(Number.isNaN,d)}function l(d,f){return n(h=>{const E=Array.from(h);return E.includes(d)||E.includes(ae(d))},f)}function u(d){return c(1,d)}function c(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(ae(e))?{toMatch:n,toContains:l,changed:u,changedTimes:c,get not(){return xo(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:s,toBeUndefined:a,changed:u,changedTimes:c,get not(){return xo(e,!t)}}}function $n(e){return xo(e)}function Is(e,t,n){return ge(e,(o,i,r)=>{o&&t(o,i,r)},n)}function Ps(e){var t;const n=ae(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Tr=Ss?window:void 0;function Ir(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=Tr):[t,n,o,i]=e,!t)return $r;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],a=()=>{r.forEach(c=>c()),r.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=ge(()=>[Ps(t),ae(i)],([c,d])=>{if(a(),!c)return;const f=ks(d)?{...d}:d;r.push(...n.flatMap(h=>o.map(E=>s(c,h,E,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Xn(u),u}function Ds(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function gi(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=Tr,eventName:r="keydown",passive:a=!1,dedupe:s=!1}=o,l=Ds(t);return Ir(i,r,c=>{c.repeat&&ae(s)||l(c)&&n(c)},a)}function zs(e){return JSON.parse(JSON.stringify(e))}function Ut(e,t,n,o={}){var i,r,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:f}=o,h=Uo(),E=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((a=(r=h==null?void 0:h.proxy)==null?void 0:r.$emit)==null?void 0:a.bind(h==null?void 0:h.proxy));let g=u;t||(t="modelValue"),g=g||`update:${t.toString()}`;const v=S=>s?typeof s=="function"?s(S):zs(S):S,b=()=>Ns(e[t])?v(e[t]):d,y=S=>{f?f(S)&&E(g,S):E(g,S)};if(l){const S=b(),x=fe(S);let M=!1;return ge(()=>e[t],z=>{M||(M=!0,x.value=v(z),Ye(()=>M=!1))}),ge(x,z=>{!M&&(z!==e[t]||c)&&y(z)},{deep:c}),x}else return se({get(){return b()},set(S){y(S)}})}var Os={value:()=>{}};function Un(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new xn(n)}function xn(e){this._=e}function Bs(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}xn.prototype=Un.prototype={constructor:xn,on:function(e,t){var n=this._,o=Bs(e+"",n),i,r=-1,a=o.length;if(arguments.length<2){for(;++r<a;)if((i=(e=o[r]).type)&&(i=Vs(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(i=(e=o[r]).type)n[i]=pi(n[i],e.name,t);else if(t==null)for(i in n)n[i]=pi(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function Vs(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function pi(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Os,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Eo="http://www.w3.org/1999/xhtml";const vi={svg:"http://www.w3.org/2000/svg",xhtml:Eo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vi.hasOwnProperty(t)?{space:vi[t],local:e}:e}function Rs(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Eo&&t.documentElement.namespaceURI===Eo?t.createElement(e):t.createElementNS(n,e)}}function Hs(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pr(e){var t=Zn(e);return(t.local?Hs:Rs)(t)}function Fs(){}function Zo(e){return e==null?Fs:function(){return this.querySelector(e)}}function Ls(e){typeof e!="function"&&(e=Zo(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=new Array(a),l,u,c=0;c<a;++c)(l=r[c])&&(u=e.call(l,l.__data__,c,r))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Pe(o,this._parents)}function Gs(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ys(){return[]}function Dr(e){return e==null?Ys:function(){return this.querySelectorAll(e)}}function Xs(e){return function(){return Gs(e.apply(this,arguments))}}function Us(e){typeof e=="function"?e=Xs(e):e=Dr(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a=t[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(o.push(e.call(l,l.__data__,u,a)),i.push(l));return new Pe(o,i)}function zr(e){return function(){return this.matches(e)}}function Or(e){return function(t){return t.matches(e)}}var Zs=Array.prototype.find;function qs(e){return function(){return Zs.call(this.children,e)}}function Ws(){return this.firstElementChild}function Ks(e){return this.select(e==null?Ws:qs(typeof e=="function"?e:Or(e)))}var Js=Array.prototype.filter;function Qs(){return Array.from(this.children)}function js(e){return function(){return Js.call(this.children,e)}}function el(e){return this.selectAll(e==null?Qs:js(typeof e=="function"?e:Or(e)))}function tl(e){typeof e!="function"&&(e=zr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new Pe(o,this._parents)}function Br(e){return new Array(e.length)}function nl(){return new Pe(this._enter||this._groups.map(Br),this._parents)}function An(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}An.prototype={constructor:An,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ol(e){return function(){return e}}function il(e,t,n,o,i,r){for(var a=0,s,l=t.length,u=r.length;a<u;++a)(s=t[a])?(s.__data__=r[a],o[a]=s):n[a]=new An(e,r[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function rl(e,t,n,o,i,r,a){var s,l,u=new Map,c=t.length,d=r.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=a.call(l,l.__data__,s,t)+"",u.has(h)?i[s]=l:u.set(h,l));for(s=0;s<d;++s)h=a.call(e,r[s],s,r)+"",(l=u.get(h))?(o[s]=l,l.__data__=r[s],u.delete(h)):n[s]=new An(e,r[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function al(e){return e.__data__}function sl(e,t){if(!arguments.length)return Array.from(this,al);var n=t?rl:il,o=this._parents,i=this._groups;typeof e!="function"&&(e=ol(e));for(var r=i.length,a=new Array(r),s=new Array(r),l=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],f=d.length,h=ll(e.call(c,c&&c.__data__,u,o)),E=h.length,g=s[u]=new Array(E),v=a[u]=new Array(E),b=l[u]=new Array(f);n(c,d,g,v,b,h,t);for(var y=0,S=0,x,M;y<E;++y)if(x=g[y]){for(y>=S&&(S=y+1);!(M=v[S])&&++S<E;);x._next=M||null}}return a=new Pe(a,o),a._enter=s,a._exit=l,a}function ll(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ul(){return new Pe(this._exit||this._groups.map(Br),this._parents)}function cl(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function dl(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=o[l],d=u.length,f=s[l]=new Array(d),h,E=0;E<d;++E)(h=u[E]||c[E])&&(f[E]=h);for(;l<i;++l)s[l]=n[l];return new Pe(s,this._parents)}function fl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],a;--i>=0;)(a=o[i])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function hl(e){e||(e=gl);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a=n[r],s=a.length,l=i[r]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Pe(i,this._parents).order()}function gl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function pl(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vl(){return Array.from(this)}function ml(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null}function yl(){let e=0;for(const t of this)++e;return e}function _l(){return!this.node()}function wl(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,a=i.length,s;r<a;++r)(s=i[r])&&e.call(s,s.__data__,r,i);return this}function bl(e){return function(){this.removeAttribute(e)}}function xl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function El(e,t){return function(){this.setAttribute(e,t)}}function Sl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Nl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ml(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function kl(e,t){var n=Zn(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?xl:bl:typeof t=="function"?n.local?Ml:Nl:n.local?Sl:El)(n,t))}function Vr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Cl(e){return function(){this.style.removeProperty(e)}}function $l(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Al(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Tl(e,t,n){return arguments.length>1?this.each((t==null?Cl:typeof t=="function"?Al:$l)(e,t,n??"")):At(this.node(),e)}function At(e,t){return e.style.getPropertyValue(t)||Vr(e).getComputedStyle(e,null).getPropertyValue(t)}function Il(e){return function(){delete this[e]}}function Pl(e,t){return function(){this[e]=t}}function Dl(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zl(e,t){return arguments.length>1?this.each((t==null?Il:typeof t=="function"?Dl:Pl)(e,t)):this.node()[e]}function Rr(e){return e.trim().split(/^|\s+/)}function qo(e){return e.classList||new Hr(e)}function Hr(e){this._node=e,this._names=Rr(e.getAttribute("class")||"")}Hr.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Fr(e,t){for(var n=qo(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Lr(e,t){for(var n=qo(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Ol(e){return function(){Fr(this,e)}}function Bl(e){return function(){Lr(this,e)}}function Vl(e,t){return function(){(t.apply(this,arguments)?Fr:Lr)(this,e)}}function Rl(e,t){var n=Rr(e+"");if(arguments.length<2){for(var o=qo(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Vl:t?Ol:Bl)(n,t))}function Hl(){this.textContent=""}function Fl(e){return function(){this.textContent=e}}function Ll(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Gl(e){return arguments.length?this.each(e==null?Hl:(typeof e=="function"?Ll:Fl)(e)):this.node().textContent}function Yl(){this.innerHTML=""}function Xl(e){return function(){this.innerHTML=e}}function Ul(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Zl(e){return arguments.length?this.each(e==null?Yl:(typeof e=="function"?Ul:Xl)(e)):this.node().innerHTML}function ql(){this.nextSibling&&this.parentNode.appendChild(this)}function Wl(){return this.each(ql)}function Kl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jl(){return this.each(Kl)}function Ql(e){var t=typeof e=="function"?e:Pr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function jl(){return null}function eu(e,t){var n=typeof e=="function"?e:Pr(e),o=t==null?jl:typeof t=="function"?t:Zo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function tu(){var e=this.parentNode;e&&e.removeChild(this)}function nu(){return this.each(tu)}function ou(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ru(e){return this.select(e?iu:ou)}function au(e){return arguments.length?this.property("__data__",e):this.node().__data__}function su(e){return function(t){e.call(this,t,this.__data__)}}function lu(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function uu(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function cu(e,t,n){return function(){var o=this.__on,i,r=su(t);if(o){for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function du(e,t,n){var o=lu(e+""),i,r=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<r;++i)if((a=o[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?cu:uu,i=0;i<r;++i)this.each(s(o[i],t,n));return this}function Gr(e,t,n){var o=Vr(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function fu(e,t){return function(){return Gr(this,e,t)}}function hu(e,t){return function(){return Gr(this,e,t.apply(this,arguments))}}function gu(e,t){return this.each((typeof t=="function"?hu:fu)(e,t))}function*pu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,a;i<r;++i)(a=o[i])&&(yield a)}var Yr=[null];function Pe(e,t){this._groups=e,this._parents=t}function rn(){return new Pe([[document.documentElement]],Yr)}function vu(){return this}Pe.prototype=rn.prototype={constructor:Pe,select:Ls,selectAll:Us,selectChild:Ks,selectChildren:el,filter:tl,data:sl,enter:nl,exit:ul,join:cl,merge:dl,selection:vu,order:fl,sort:hl,call:pl,nodes:vl,node:ml,size:yl,empty:_l,each:wl,attr:kl,style:Tl,property:zl,classed:Rl,text:Gl,html:Zl,raise:Wl,lower:Jl,append:Ql,insert:eu,remove:nu,clone:ru,datum:au,on:du,dispatch:gu,[Symbol.iterator]:pu};function Oe(e){return typeof e=="string"?new Pe([[document.querySelector(e)]],[document.documentElement]):new Pe([[e]],Yr)}function mu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Le(e,t){if(e=mu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const yu={passive:!1},Wt={capture:!0,passive:!1};function uo(e){e.stopImmediatePropagation()}function Nt(e){e.preventDefault(),e.stopImmediatePropagation()}function Xr(e){var t=e.document.documentElement,n=Oe(e).on("dragstart.drag",Nt,Wt);"onselectstart"in t?n.on("selectstart.drag",Nt,Wt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ur(e,t){var n=e.document.documentElement,o=Oe(e).on("dragstart.drag",null);t&&(o.on("click.drag",Nt,Wt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const un=e=>()=>e;function So(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}So.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function _u(e){return!e.ctrlKey&&!e.button}function wu(){return this.parentNode}function bu(e,t){return t??{x:e.x,y:e.y}}function xu(){return navigator.maxTouchPoints||"ontouchstart"in this}function Eu(){var e=_u,t=wu,n=bu,o=xu,i={},r=Un("start","drag","end"),a=0,s,l,u,c,d=0;function f(x){x.on("mousedown.drag",h).filter(o).on("touchstart.drag",v).on("touchmove.drag",b,yu).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,M){if(!(c||!e.call(this,x,M))){var z=S(this,t.call(this,x,M),x,M,"mouse");z&&(Oe(x.view).on("mousemove.drag",E,Wt).on("mouseup.drag",g,Wt),Xr(x.view),uo(x),u=!1,s=x.clientX,l=x.clientY,z("start",x))}}function E(x){if(Nt(x),!u){var M=x.clientX-s,z=x.clientY-l;u=M*M+z*z>d}i.mouse("drag",x)}function g(x){Oe(x.view).on("mousemove.drag mouseup.drag",null),Ur(x.view,u),Nt(x),i.mouse("end",x)}function v(x,M){if(e.call(this,x,M)){var z=x.changedTouches,w=t.call(this,x,M),H=z.length,R,X;for(R=0;R<H;++R)(X=S(this,w,x,M,z[R].identifier,z[R]))&&(uo(x),X("start",x,z[R]))}}function b(x){var M=x.changedTouches,z=M.length,w,H;for(w=0;w<z;++w)(H=i[M[w].identifier])&&(Nt(x),H("drag",x,M[w]))}function y(x){var M=x.changedTouches,z=M.length,w,H;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),w=0;w<z;++w)(H=i[M[w].identifier])&&(uo(x),H("end",x,M[w]))}function S(x,M,z,w,H,R){var X=r.copy(),O=Le(R||z,M),j,U,m;if((m=n.call(x,new So("beforestart",{sourceEvent:z,target:f,identifier:H,active:a,x:O[0],y:O[1],dx:0,dy:0,dispatch:X}),w))!=null)return j=m.x-O[0]||0,U=m.y-O[1]||0,function T(N,I,B){var k=O,A;switch(N){case"start":i[H]=T,A=a++;break;case"end":delete i[H],--a;case"drag":O=Le(B||I,M),A=a;break}X.call(N,x,new So(N,{sourceEvent:I,subject:m,target:f,identifier:H,active:A,x:O[0]+j,y:O[1]+U,dx:O[0]-k[0],dy:O[1]-k[1],dispatch:X}),w)}}return f.filter=function(x){return arguments.length?(e=typeof x=="function"?x:un(!!x),f):e},f.container=function(x){return arguments.length?(t=typeof x=="function"?x:un(x),f):t},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:un(x),f):n},f.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:un(!!x),f):o},f.on=function(){var x=r.on.apply(r,arguments);return x===r?f:x},f.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,f):Math.sqrt(d)},f}function Wo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zr(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function an(){}var Kt=.7,Tn=1/Kt,Mt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Su=/^#([0-9a-f]{3,8})$/,Nu=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),Mu=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),ku=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Jt}\\)$`),Cu=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${Jt}\\)$`),$u=new RegExp(`^hsl\\(${Jt},${Xe},${Xe}\\)$`),Au=new RegExp(`^hsla\\(${Jt},${Xe},${Xe},${Jt}\\)$`),mi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Wo(an,Qt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yi,formatHex:yi,formatHex8:Tu,formatHsl:Iu,formatRgb:_i,toString:_i});function yi(){return this.rgb().formatHex()}function Tu(){return this.rgb().formatHex8()}function Iu(){return qr(this).formatHsl()}function _i(){return this.rgb().formatRgb()}function Qt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Su.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wi(t):n===3?new Ae(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Nu.exec(e))?new Ae(t[1],t[2],t[3],1):(t=Mu.exec(e))?new Ae(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ku.exec(e))?cn(t[1],t[2],t[3],t[4]):(t=Cu.exec(e))?cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$u.exec(e))?Ei(t[1],t[2]/100,t[3]/100,1):(t=Au.exec(e))?Ei(t[1],t[2]/100,t[3]/100,t[4]):mi.hasOwnProperty(e)?wi(mi[e]):e==="transparent"?new Ae(NaN,NaN,NaN,0):null}function wi(e){return new Ae(e>>16&255,e>>8&255,e&255,1)}function cn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Ae(e,t,n,o)}function Pu(e){return e instanceof an||(e=Qt(e)),e?(e=e.rgb(),new Ae(e.r,e.g,e.b,e.opacity)):new Ae}function No(e,t,n,o){return arguments.length===1?Pu(e):new Ae(e,t,n,o??1)}function Ae(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Wo(Ae,No,Zr(an,{brighter(e){return e=e==null?Tn:Math.pow(Tn,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kt:Math.pow(Kt,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ae(dt(this.r),dt(this.g),dt(this.b),In(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bi,formatHex:bi,formatHex8:Du,formatRgb:xi,toString:xi}));function bi(){return`#${lt(this.r)}${lt(this.g)}${lt(this.b)}`}function Du(){return`#${lt(this.r)}${lt(this.g)}${lt(this.b)}${lt((isNaN(this.opacity)?1:this.opacity)*255)}`}function xi(){const e=In(this.opacity);return`${e===1?"rgb(":"rgba("}${dt(this.r)}, ${dt(this.g)}, ${dt(this.b)}${e===1?")":`, ${e})`}`}function In(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lt(e){return e=dt(e),(e<16?"0":"")+e.toString(16)}function Ei(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Be(e,t,n,o)}function qr(e){if(e instanceof Be)return new Be(e.h,e.s,e.l,e.opacity);if(e instanceof an||(e=Qt(e)),!e)return new Be;if(e instanceof Be)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,s=r-i,l=(r+i)/2;return s?(t===r?a=(n-o)/s+(n<o)*6:n===r?a=(o-t)/s+2:a=(t-n)/s+4,s/=l<.5?r+i:2-r-i,a*=60):s=l>0&&l<1?0:a,new Be(a,s,l,e.opacity)}function zu(e,t,n,o){return arguments.length===1?qr(e):new Be(e,t,n,o??1)}function Be(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Wo(Be,zu,Zr(an,{brighter(e){return e=e==null?Tn:Math.pow(Tn,e),new Be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kt:Math.pow(Kt,e),new Be(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Ae(co(e>=240?e-240:e+120,i,o),co(e,i,o),co(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Be(Si(this.h),dn(this.s),dn(this.l),In(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=In(this.opacity);return`${e===1?"hsl(":"hsla("}${Si(this.h)}, ${dn(this.s)*100}%, ${dn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Si(e){return e=(e||0)%360,e<0?e+360:e}function dn(e){return Math.max(0,Math.min(1,e||0))}function co(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Wr=e=>()=>e;function Ou(e,t){return function(n){return e+n*t}}function Bu(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Vu(e){return(e=+e)==1?Kr:function(t,n){return n-t?Bu(t,n,e):Wr(isNaN(t)?n:t)}}function Kr(e,t){var n=t-e;return n?Ou(e,n):Wr(isNaN(e)?t:e)}const Ni=function e(t){var n=Vu(t);function o(i,r){var a=n((i=No(i)).r,(r=No(r)).r),s=n(i.g,r.g),l=n(i.b,r.b),u=Kr(i.opacity,r.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return o.gamma=e,o}(1);function ot(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Mo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fo=new RegExp(Mo.source,"g");function Ru(e){return function(){return e}}function Hu(e){return function(t){return e(t)+""}}function Fu(e,t){var n=Mo.lastIndex=fo.lastIndex=0,o,i,r,a=-1,s=[],l=[];for(e=e+"",t=t+"";(o=Mo.exec(e))&&(i=fo.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(o=o[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:ot(o,i)})),n=fo.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?Hu(l[0].x):Ru(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}var Mi=180/Math.PI,ko={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jr(e,t,n,o,i,r){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,l/=s),e*o<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Mi,skewX:Math.atan(l)*Mi,scaleX:a,scaleY:s}}var fn;function Lu(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ko:Jr(t.a,t.b,t.c,t.d,t.e,t.f)}function Gu(e){return e==null||(fn||(fn=document.createElementNS("http://www.w3.org/2000/svg","g")),fn.setAttribute("transform",e),!(e=fn.transform.baseVal.consolidate()))?ko:(e=e.matrix,Jr(e.a,e.b,e.c,e.d,e.e,e.f))}function Qr(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);E.push({i:g-4,x:ot(u,d)},{i:g-2,x:ot(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:ot(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:ot(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function l(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");E.push({i:g-4,x:ot(u,d)},{i:g-2,x:ot(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var E=-1,g=f.length,v;++E<g;)d[(v=f[E]).i]=v.x(h);return d.join("")}}}var Yu=Qr(Lu,"px, ","px)","deg)"),Xu=Qr(Gu,", ",")",")"),Uu=1e-12;function ki(e){return((e=Math.exp(e))+1/e)/2}function Zu(e){return((e=Math.exp(e))-1/e)/2}function qu(e){return((e=Math.exp(2*e))-1)/(e+1)}const Wu=function e(t,n,o){function i(r,a){var s=r[0],l=r[1],u=r[2],c=a[0],d=a[1],f=a[2],h=c-s,E=d-l,g=h*h+E*E,v,b;if(g<Uu)b=Math.log(f/u)/t,v=function(w){return[s+w*h,l+w*E,u*Math.exp(t*w*b)]};else{var y=Math.sqrt(g),S=(f*f-u*u+o*g)/(2*u*n*y),x=(f*f-u*u-o*g)/(2*f*n*y),M=Math.log(Math.sqrt(S*S+1)-S),z=Math.log(Math.sqrt(x*x+1)-x);b=(z-M)/t,v=function(w){var H=w*b,R=ki(M),X=u/(n*y)*(R*qu(t*H+M)-Zu(M));return[s+X*h,l+X*E,u*R/ki(t*H+M)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return i.rho=function(r){var a=Math.max(.001,+r),s=a*a,l=s*s;return e(a,s,l)},i}(Math.SQRT2,2,4);var Tt=0,Ft=0,Vt=0,jr=1e3,Pn,Lt,Dn=0,pt=0,qn=0,jt=typeof performance=="object"&&performance.now?performance:Date,ea=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ko(){return pt||(ea(Ku),pt=jt.now()+qn)}function Ku(){pt=0}function zn(){this._call=this._time=this._next=null}zn.prototype=ta.prototype={constructor:zn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ko():+n)+(t==null?0:+t),!this._next&&Lt!==this&&(Lt?Lt._next=this:Pn=this,Lt=this),this._call=e,this._time=n,Co()},stop:function(){this._call&&(this._call=null,this._time=1/0,Co())}};function ta(e,t,n){var o=new zn;return o.restart(e,t,n),o}function Ju(){Ko(),++Tt;for(var e=Pn,t;e;)(t=pt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Tt}function Ci(){pt=(Dn=jt.now())+qn,Tt=Ft=0;try{Ju()}finally{Tt=0,ju(),pt=0}}function Qu(){var e=jt.now(),t=e-Dn;t>jr&&(qn-=t,Dn=e)}function ju(){for(var e,t=Pn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Pn=n);Lt=e,Co(o)}function Co(e){if(!Tt){Ft&&(Ft=clearTimeout(Ft));var t=e-pt;t>24?(e<1/0&&(Ft=setTimeout(Ci,e-jt.now()-qn)),Vt&&(Vt=clearInterval(Vt))):(Vt||(Dn=jt.now(),Vt=setInterval(Qu,jr)),Tt=1,ea(Ci))}}function $i(e,t,n){var o=new zn;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var ec=Un("start","end","cancel","interrupt"),tc=[],na=0,Ai=1,$o=2,En=3,Ti=4,Ao=5,Sn=6;function Wn(e,t,n,o,i,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;nc(e,n,{name:t,index:o,group:i,on:ec,tween:tc,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:na})}function Jo(e,t){var n=He(e,t);if(n.state>na)throw new Error("too late; already scheduled");return n}function Ze(e,t){var n=He(e,t);if(n.state>En)throw new Error("too late; already running");return n}function He(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function nc(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=ta(r,0,n.time);function r(u){n.state=Ai,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==Ai)return l();for(c in o)if(h=o[c],h.name===n.name){if(h.state===En)return $i(a);h.state===Ti?(h.state=Sn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Sn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if($i(function(){n.state===En&&(n.state=Ti,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=$o,n.on.call("start",e,e.__data__,n.index,n.group),n.state===$o){for(n.state=En,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Ao,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Ao&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Sn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Nn(e,t){var n=e.__transition,o,i,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){r=!1;continue}i=o.state>$o&&o.state<Ao,o.state=Sn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}r&&delete e.__transition}}function oc(e){return this.each(function(){Nn(this,e)})}function ic(e,t){var n,o;return function(){var i=Ze(this,e),r=i.tween;if(r!==n){o=n=r;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function rc(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Ze(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}r.tween=i}}function ac(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=He(this.node(),n).tween,i=0,r=o.length,a;i<r;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((t==null?ic:rc)(n,e,t))}function Qo(e,t,n){var o=e._id;return e.each(function(){var i=Ze(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return He(i,o).value[t]}}function oa(e,t){var n;return(typeof t=="number"?ot:t instanceof Qt?Ni:(n=Qt(t))?(t=n,Ni):Fu)(e,t)}function sc(e){return function(){this.removeAttribute(e)}}function lc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function uc(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttribute(e);return a===i?null:a===o?r:r=t(o=a,n)}}function cc(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?r:r=t(o=a,n)}}function dc(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function fc(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function hc(e,t){var n=Zn(e),o=n==="transform"?Xu:oa;return this.attrTween(e,typeof t=="function"?(n.local?fc:dc)(n,o,Qo(this,"attr."+e,t)):t==null?(n.local?lc:sc)(n):(n.local?cc:uc)(n,o,t))}function gc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function pc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function vc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&pc(e,r)),n}return i._value=t,i}function mc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&gc(e,r)),n}return i._value=t,i}function yc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Zn(e);return this.tween(n,(o.local?vc:mc)(o,t))}function _c(e,t){return function(){Jo(this,e).delay=+t.apply(this,arguments)}}function wc(e,t){return t=+t,function(){Jo(this,e).delay=t}}function bc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_c:wc)(t,e)):He(this.node(),t).delay}function xc(e,t){return function(){Ze(this,e).duration=+t.apply(this,arguments)}}function Ec(e,t){return t=+t,function(){Ze(this,e).duration=t}}function Sc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xc:Ec)(t,e)):He(this.node(),t).duration}function Nc(e,t){if(typeof t!="function")throw new Error;return function(){Ze(this,e).ease=t}}function Mc(e){var t=this._id;return arguments.length?this.each(Nc(t,e)):He(this.node(),t).ease}function kc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ze(this,e).ease=n}}function Cc(e){if(typeof e!="function")throw new Error;return this.each(kc(this._id,e))}function $c(e){typeof e!="function"&&(e=zr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new et(o,this._parents,this._name,this._id)}function Ac(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),s=0;s<r;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<o;++s)a[s]=t[s];return new et(a,this._parents,this._name,this._id)}function Tc(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Ic(e,t,n){var o,i,r=Tc(t)?Jo:Ze;return function(){var a=r(this,e),s=a.on;s!==o&&(i=(o=s).copy()).on(t,n),a.on=i}}function Pc(e,t){var n=this._id;return arguments.length<2?He(this.node(),n).on.on(e):this.each(Ic(n,e,t))}function Dc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function zc(){return this.on("end.remove",Dc(this._id))}function Oc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zo(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var s=o[a],l=s.length,u=r[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Wn(u[f],t,n,f,u,He(c,n)));return new et(r,this._parents,t,n)}function Bc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dr(e));for(var o=this._groups,i=o.length,r=[],a=[],s=0;s<i;++s)for(var l=o[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,E=He(c,n),g=0,v=f.length;g<v;++g)(h=f[g])&&Wn(h,t,n,g,f,E);r.push(f),a.push(c)}return new et(r,a,t,n)}var Vc=rn.prototype.constructor;function Rc(){return new Vc(this._groups,this._parents)}function Hc(e,t){var n,o,i;return function(){var r=At(this,e),a=(this.style.removeProperty(e),At(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}function ia(e){return function(){this.style.removeProperty(e)}}function Fc(e,t,n){var o,i=n+"",r;return function(){var a=At(this,e);return a===i?null:a===o?r:r=t(o=a,n)}}function Lc(e,t,n){var o,i,r;return function(){var a=At(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),At(this,e))),a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s))}}function Gc(e,t){var n,o,i,r="style."+t,a="end."+r,s;return function(){var l=Ze(this,e),u=l.on,c=l.value[r]==null?s||(s=ia(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(a,i=c),l.on=o}}function Yc(e,t,n){var o=(e+="")=="transform"?Yu:oa;return t==null?this.styleTween(e,Hc(e,o)).on("end.style."+e,ia(e)):typeof t=="function"?this.styleTween(e,Lc(e,o,Qo(this,"style."+e,t))).each(Gc(this._id,e)):this.styleTween(e,Fc(e,o,t),n).on("end.style."+e,null)}function Xc(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Uc(e,t,n){var o,i;function r(){var a=t.apply(this,arguments);return a!==i&&(o=(i=a)&&Xc(e,a,n)),o}return r._value=t,r}function Zc(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,Uc(e,t,n??""))}function qc(e){return function(){this.textContent=e}}function Wc(e){return function(){var t=e(this);this.textContent=t??""}}function Kc(e){return this.tween("text",typeof e=="function"?Wc(Qo(this,"text",e)):qc(e==null?"":e+""))}function Jc(e){return function(t){this.textContent=e.call(this,t)}}function Qc(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Jc(i)),t}return o._value=e,o}function jc(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Qc(e))}function ed(){for(var e=this._name,t=this._id,n=ra(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=He(l,t);Wn(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new et(o,this._parents,e,n)}function td(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--i===0&&r()}};n.each(function(){var u=Ze(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&r()})}var nd=0;function et(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function ra(){return++nd}var We=rn.prototype;et.prototype={constructor:et,select:Oc,selectAll:Bc,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:$c,merge:Ac,selection:Rc,transition:ed,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:Pc,attr:hc,attrTween:yc,style:Yc,styleTween:Zc,text:Kc,textTween:jc,remove:zc,tween:ac,delay:bc,duration:Sc,ease:Mc,easeVarying:Cc,end:td,[Symbol.iterator]:We[Symbol.iterator]};function od(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var id={time:null,delay:0,duration:250,ease:od};function rd(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function ad(e){var t,n;e instanceof et?(t=e._id,e=e._name):(t=ra(),(n=id).time=Ko(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Wn(l,e,t,u,a,n||rd(l,t));return new et(o,this._parents,e,t)}rn.prototype.interrupt=oc;rn.prototype.transition=ad;const hn=e=>()=>e;function sd(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Qe(e,t,n){this.k=e,this.x=t,this.y=n}Qe.prototype={constructor:Qe,scale:function(e){return e===1?this:new Qe(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qe(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var It=new Qe(1,0,0);Qe.prototype;function ho(e){e.stopImmediatePropagation()}function Rt(e){e.preventDefault(),e.stopImmediatePropagation()}function ld(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function ud(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ii(){return this.__zoom||It}function cd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function dd(){return navigator.maxTouchPoints||"ontouchstart"in this}function fd(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function hd(){var e=ld,t=ud,n=fd,o=cd,i=dd,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Wu,u=Un("start","zoom","end"),c,d,f,h=500,E=150,g=0,v=10;function b(m){m.property("__zoom",Ii).on("wheel.zoom",H,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",X).filter(i).on("touchstart.zoom",O).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(m,T,N,I){var B=m.selection?m.selection():m;B.property("__zoom",Ii),m!==B?M(m,T,N,I):B.interrupt().each(function(){z(this,arguments).event(I).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},b.scaleBy=function(m,T,N,I){b.scaleTo(m,function(){var B=this.__zoom.k,k=typeof T=="function"?T.apply(this,arguments):T;return B*k},N,I)},b.scaleTo=function(m,T,N,I){b.transform(m,function(){var B=t.apply(this,arguments),k=this.__zoom,A=N==null?x(B):typeof N=="function"?N.apply(this,arguments):N,W=k.invert(A),ee=typeof T=="function"?T.apply(this,arguments):T;return n(S(y(k,ee),A,W),B,a)},N,I)},b.translateBy=function(m,T,N,I){b.transform(m,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof N=="function"?N.apply(this,arguments):N),t.apply(this,arguments),a)},null,I)},b.translateTo=function(m,T,N,I,B){b.transform(m,function(){var k=t.apply(this,arguments),A=this.__zoom,W=I==null?x(k):typeof I=="function"?I.apply(this,arguments):I;return n(It.translate(W[0],W[1]).scale(A.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof N=="function"?-N.apply(this,arguments):-N),k,a)},I,B)};function y(m,T){return T=Math.max(r[0],Math.min(r[1],T)),T===m.k?m:new Qe(T,m.x,m.y)}function S(m,T,N){var I=T[0]-N[0]*m.k,B=T[1]-N[1]*m.k;return I===m.x&&B===m.y?m:new Qe(m.k,I,B)}function x(m){return[(+m[0][0]+ +m[1][0])/2,(+m[0][1]+ +m[1][1])/2]}function M(m,T,N,I){m.on("start.zoom",function(){z(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(I).end()}).tween("zoom",function(){var B=this,k=arguments,A=z(B,k).event(I),W=t.apply(B,k),ee=N==null?x(W):typeof N=="function"?N.apply(B,k):N,L=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),J=B.__zoom,ue=typeof T=="function"?T.apply(B,k):T,D=l(J.invert(ee).concat(L/J.k),ue.invert(ee).concat(L/ue.k));return function(ie){if(ie===1)ie=ue;else{var K=D(ie),Z=L/K[2];ie=new Qe(Z,ee[0]-K[0]*Z,ee[1]-K[1]*Z)}A.zoom(null,ie)}})}function z(m,T,N){return!N&&m.__zooming||new w(m,T)}function w(m,T){this.that=m,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(m,T),this.taps=0}w.prototype={event:function(m){return m&&(this.sourceEvent=m),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(m,T){return this.mouse&&m!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&m!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&m!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(m){var T=Oe(this.that).datum();u.call(m,this.that,new sd(m,{sourceEvent:this.sourceEvent,target:b,type:m,transform:this.that.__zoom,dispatch:u}),T)}};function H(m,...T){if(!e.apply(this,arguments))return;var N=z(this,T).event(m),I=this.__zoom,B=Math.max(r[0],Math.min(r[1],I.k*Math.pow(2,o.apply(this,arguments)))),k=Le(m);if(N.wheel)(N.mouse[0][0]!==k[0]||N.mouse[0][1]!==k[1])&&(N.mouse[1]=I.invert(N.mouse[0]=k)),clearTimeout(N.wheel);else{if(I.k===B)return;N.mouse=[k,I.invert(k)],Nn(this),N.start()}Rt(m),N.wheel=setTimeout(A,E),N.zoom("mouse",n(S(y(I,B),N.mouse[0],N.mouse[1]),N.extent,a));function A(){N.wheel=null,N.end()}}function R(m,...T){if(f||!e.apply(this,arguments))return;var N=m.currentTarget,I=z(this,T,!0).event(m),B=Oe(m.view).on("mousemove.zoom",ee,!0).on("mouseup.zoom",L,!0),k=Le(m,N),A=m.clientX,W=m.clientY;Xr(m.view),ho(m),I.mouse=[k,this.__zoom.invert(k)],Nn(this),I.start();function ee(J){if(Rt(J),!I.moved){var ue=J.clientX-A,D=J.clientY-W;I.moved=ue*ue+D*D>g}I.event(J).zoom("mouse",n(S(I.that.__zoom,I.mouse[0]=Le(J,N),I.mouse[1]),I.extent,a))}function L(J){B.on("mousemove.zoom mouseup.zoom",null),Ur(J.view,I.moved),Rt(J),I.event(J).end()}}function X(m,...T){if(e.apply(this,arguments)){var N=this.__zoom,I=Le(m.changedTouches?m.changedTouches[0]:m,this),B=N.invert(I),k=N.k*(m.shiftKey?.5:2),A=n(S(y(N,k),I,B),t.apply(this,T),a);Rt(m),s>0?Oe(this).transition().duration(s).call(M,A,I,m):Oe(this).call(b.transform,A,I,m)}}function O(m,...T){if(e.apply(this,arguments)){var N=m.touches,I=N.length,B=z(this,T,m.changedTouches.length===I).event(m),k,A,W,ee;for(ho(m),A=0;A<I;++A)W=N[A],ee=Le(W,this),ee=[ee,this.__zoom.invert(ee),W.identifier],B.touch0?!B.touch1&&B.touch0[2]!==ee[2]&&(B.touch1=ee,B.taps=0):(B.touch0=ee,k=!0,B.taps=1+!!c);c&&(c=clearTimeout(c)),k&&(B.taps<2&&(d=ee[0],c=setTimeout(function(){c=null},h)),Nn(this),B.start())}}function j(m,...T){if(this.__zooming){var N=z(this,T).event(m),I=m.changedTouches,B=I.length,k,A,W,ee;for(Rt(m),k=0;k<B;++k)A=I[k],W=Le(A,this),N.touch0&&N.touch0[2]===A.identifier?N.touch0[0]=W:N.touch1&&N.touch1[2]===A.identifier&&(N.touch1[0]=W);if(A=N.that.__zoom,N.touch1){var L=N.touch0[0],J=N.touch0[1],ue=N.touch1[0],D=N.touch1[1],ie=(ie=ue[0]-L[0])*ie+(ie=ue[1]-L[1])*ie,K=(K=D[0]-J[0])*K+(K=D[1]-J[1])*K;A=y(A,Math.sqrt(ie/K)),W=[(L[0]+ue[0])/2,(L[1]+ue[1])/2],ee=[(J[0]+D[0])/2,(J[1]+D[1])/2]}else if(N.touch0)W=N.touch0[0],ee=N.touch0[1];else return;N.zoom("touch",n(S(A,W,ee),N.extent,a))}}function U(m,...T){if(this.__zooming){var N=z(this,T).event(m),I=m.changedTouches,B=I.length,k,A;for(ho(m),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),k=0;k<B;++k)A=I[k],N.touch0&&N.touch0[2]===A.identifier?delete N.touch0:N.touch1&&N.touch1[2]===A.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(A=Le(A,this),Math.hypot(d[0]-A[0],d[1]-A[1])<v)){var W=Oe(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return b.wheelDelta=function(m){return arguments.length?(o=typeof m=="function"?m:hn(+m),b):o},b.filter=function(m){return arguments.length?(e=typeof m=="function"?m:hn(!!m),b):e},b.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:hn(!!m),b):i},b.extent=function(m){return arguments.length?(t=typeof m=="function"?m:hn([[+m[0][0],+m[0][1]],[+m[1][0],+m[1][1]]]),b):t},b.scaleExtent=function(m){return arguments.length?(r[0]=+m[0],r[1]=+m[1],b):[r[0],r[1]]},b.translateExtent=function(m){return arguments.length?(a[0][0]=+m[0][0],a[1][0]=+m[1][0],a[0][1]=+m[0][1],a[1][1]=+m[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(m){return arguments.length?(n=m,b):n},b.duration=function(m){return arguments.length?(s=+m,b):s},b.interpolate=function(m){return arguments.length?(l=m,b):l},b.on=function(){var m=u.on.apply(u,arguments);return m===u?b:m},b.clickDistance=function(m){return arguments.length?(g=(m=+m)*m,b):Math.sqrt(g)},b.tapDistance=function(m){return arguments.length?(v=+m,b):v},b}var Q=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(Q||{}),jo=(e=>(e.Partial="partial",e.Full="full",e))(jo||{}),st=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(st||{}),vt=(e=>(e.Strict="strict",e.Loose="loose",e))(vt||{}),To=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(To||{}),Zt=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Zt||{});function ei(){return typeof window<"u"?window:{chrome:!1,addEventListener(...e){}}}function Io(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof(o==null?void 0:o.hasAttribute)=="function"?o.hasAttribute("contenteditable"):!1,r=typeof(o==null?void 0:o.closest)=="function"?o.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(o==null?void 0:o.nodeName)||i||!!r}function gd(e){return e.ctrlKey||e.metaKey||e.shiftKey}function Pi(e,t,n,o){const i=t.split("+").map(r=>r.trim().toLowerCase());return i.length===1?e.toLowerCase()===t.toLowerCase():(o?n.delete(e.toLowerCase()):n.add(e.toLowerCase()),i.every((r,a)=>n.has(r)&&Array.from(n.values())[a]===i[a]))}function pd(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=vd(n.code,e);return Array.isArray(e)?e.some(i=>Pi(n[o],i,t,n.type==="keyup")):Pi(n[o],e,t,n.type==="keyup")}}function vd(e,t){return typeof t=="string"?e===t?"code":"key":t.includes(e)?"code":"key"}function qt(e,t){const n=ei(),o=fe(ae(e)===!0);let i=!1;const r=new Set;let a=l(ae(e));return ge(o,(u,c)=>{u!==c&&(t==null||t(u))}),ge(()=>ae(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&s(),a=l(u)},{immediate:!0}),Ir(n,"blur",()=>{ae(e)!==!0&&(o.value=!1)}),gi((...u)=>a(...u),u=>{i=gd(u),!(!i&&Io(u))&&(u.preventDefault(),o.value=!0)},{eventName:"keydown"}),gi((...u)=>a(...u),u=>{if(o.value){if(!i&&Io(u))return;s()}},{eventName:"keyup"}),o;function s(){i=!1,r.clear(),o.value=!1}function l(u){return u===null?(s(),()=>!1):typeof u=="boolean"?(s(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?pd(u,r):u}}const aa="vue-flow__node-desc",sa="vue-flow__edge-desc",md="vue-flow__aria-live",la=["Enter"," ","Escape"],kt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function ua(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodes:r,nodeExtent:a,nodeDragThreshold:s,viewport:l,autoPanOnNodeDrag:u,nodesDraggable:c,panBy:d,findNode:f,multiSelectionActive:h,nodesSelectionActive:E,selectNodesOnDrag:g,removeSelectedElements:v,addSelectedNodes:b,updateNodePositions:y,emits:S}=_e(),{onStart:x,onDrag:M,onStop:z,el:w,disabled:H,id:R,selectable:X,dragHandle:O}=e,j=fe(!1);let U=[],m,T=null,N={x:void 0,y:void 0},I={x:0,y:0},B=null,k=!1,A=0,W=!1;const ee=xd(),L=({x:Z,y:te})=>{N={x:Z,y:te};let ne=!1;if(U=U.map(le=>{const me={x:Z-le.distance.x,y:te-le.distance.y};n.value&&(me.x=o.value[0]*Math.round(me.x/o.value[0]),me.y=o.value[1]*Math.round(me.y/o.value[1]));const{computedPosition:ve}=ni(le,me,S.error,a.value,le.parentNode?f(le.parentNode):void 0);return ne=ne||le.position.x!==ve.x||le.position.y!==ve.y,le.position=ve,le}),!!ne&&(y(U,!0,!0),j.value=!0,B)){const[le,me]=yo({id:R,dragItems:U,findNode:f});M({event:B,node:le,nodes:me})}},J=()=>{if(!T)return;const[Z,te]=Ea(I,T);if(Z!==0||te!==0){const ne={x:(N.x??0)-Z/l.value.zoom,y:(N.y??0)-te/l.value.zoom};d({x:Z,y:te})&&L(ne)}A=requestAnimationFrame(J)},ue=(Z,te)=>{k=!0;const ne=f(R);!g.value&&!h.value&&ne&&(ne.selected||v()),ne&&ae(X)&&g.value&&Oo(ne,h.value,b,v,E,!1,te);const le=ee(Z);if(N=le,U=Vd(r.value,c.value,le,f,R),U.length){const[me,ve]=yo({id:R,dragItems:U,findNode:f});x({event:Z.sourceEvent,node:me,nodes:ve})}},D=(Z,te)=>{var ne;s.value===0&&ue(Z,te),N=ee(Z),T=((ne=t.value)==null?void 0:ne.getBoundingClientRect())||null,I=ht(Z.sourceEvent,T)},ie=(Z,te)=>{const ne=ee(Z);if(!W&&k&&u.value&&(W=!0,J()),!k){const le=ne.xSnapped-(N.x??0),me=ne.ySnapped-(N.y??0);Math.sqrt(le*le+me*me)>s.value&&ue(Z,te)}(N.x!==ne.xSnapped||N.y!==ne.ySnapped)&&U.length&&k&&(B=Z.sourceEvent,I=ht(Z.sourceEvent,T),L(ne))},K=Z=>{if(k&&(j.value=!1,W=!1,k=!1,cancelAnimationFrame(A),U.length)){y(U,!1,!1);const[te,ne]=yo({id:R,dragItems:U,findNode:f});z({event:Z.sourceEvent,node:te,nodes:ne})}};return ge([()=>ae(H),w],([Z,te],ne,le)=>{if(te){const me=Oe(te);Z||(m=Eu().on("start",ve=>D(ve,te)).on("drag",ve=>ie(ve,te)).on("end",ve=>K(ve)).filter(ve=>{const _=ve.target,p=ae(O);return!ve.button&&(!i.value||!Gi(_,`.${i.value}`,te)&&(!p||Gi(_,p,te)))}),me.call(m)),le(()=>{me.on(".drag",null),m&&(m.on("start",null),m.on("drag",null),m.on("end",null))})}}),j}const Di=Symbol("vueFlow"),ca=Symbol("nodeId"),da=Symbol("nodeRef"),yd=Symbol("edgeId"),_d=Symbol("edgeRef"),Kn=Symbol("slots");function wd(){return{doubleClick:F(),click:F(),mouseEnter:F(),mouseMove:F(),mouseLeave:F(),contextMenu:F(),updateStart:F(),update:F(),updateEnd:F()}}function bd(e,t){const n=wd();return n.doubleClick.on(o=>{var i,r;t.edgeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.edgeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.edgeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.edgeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.edgeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.edgeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.updateStart.on(o=>{var i,r;t.edgeUpdateStart(o),(r=(i=e.events)==null?void 0:i.updateStart)==null||r.call(i,o)}),n.update.on(o=>{var i,r;t.edgeUpdate(o),(r=(i=e.events)==null?void 0:i.update)==null||r.call(i,o)}),n.updateEnd.on(o=>{var i,r;t.edgeUpdateEnd(o),(r=(i=e.events)==null?void 0:i.updateEnd)==null||r.call(i,o)}),Object.entries(n).reduce((o,[i,r])=>(o.emit[i]=r.trigger,o.on[i]=r.on,o),{emit:{},on:{}})}function xd(){const{viewport:e,snapGrid:t,snapToGrid:n}=_e();return({sourceEvent:o})=>{const i=o.touches?o.touches[0].clientX:o.clientX,r=o.touches?o.touches[0].clientY:o.clientY,a={x:(i-e.value.x)/e.value.zoom,y:(r-e.value.y)/e.value.zoom};return{xSnapped:n.value?t.value[0]*Math.round(a.x/t.value[0]):a.x,ySnapped:n.value?t.value[1]*Math.round(a.y/t.value[1]):a.y,...a}}}function gn(){return!0}function fa({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:r,onEdgeUpdateEnd:a}){const{vueFlowRef:s,connectionMode:l,connectionRadius:u,connectOnClick:c,connectionClickStartHandle:d,nodesConnectable:f,autoPanOnConnect:h,findNode:E,panBy:g,getNodes:v,startConnection:b,updateConnection:y,endConnection:S,emits:x,viewport:M,edges:z,nodes:w,isValidConnection:H}=_e();let R=null,X=!1,O=null;function j(m){var T;const N=ae(n)==="target",I=oi(m),B=Oi(m.target);if(I&&m.button===0||!I){let k=function(_){ne=ht(_,Z);const{handle:p,validHandleResult:P}=Xd(_,B,Do(ne,M.value,!1,[1,1]),u.value,me,$=>Zi(_,$,l.value,ae(t),ae(e),N?"target":"source",ee,B,z.value,w.value,E));if(L=p,le||(ve(),le=!0),R=P.connection,X=P.isValid,O=P.handleDomNode,y(L&&X?ya({x:L.x,y:L.y},M.value):ne,P.endHandle,Zd(!!L,X)),!L&&!X&&!O)return _o(te);R&&R.source!==R.target&&O&&(_o(te),te=O,O.classList.add("connecting","vue-flow__handle-connecting"),O.classList.toggle("valid",X),O.classList.toggle("vue-flow__handle-valid",X))},A=function(_){(L||O)&&R&&X&&(r?r(_,R):x.connect(R)),x.connectEnd(_),i&&(a==null||a(_)),_o(te),cancelAnimationFrame(J),S(_),le=!1,X=!1,R=null,O=null,B.removeEventListener("mousemove",k),B.removeEventListener("mouseup",A),B.removeEventListener("touchmove",k),B.removeEventListener("touchend",A)};const W=E(ae(t));let ee=ae(o)||H.value||gn;!ee&&W&&(ee=(N?W.isValidSourcePos:W.isValidTargetPos)||gn);let L,J=0;const{x:ue,y:D}=ht(m),ie=B==null?void 0:B.elementFromPoint(ue,D),K=ii(ae(i),ie),Z=(T=s.value)==null?void 0:T.getBoundingClientRect();if(!Z||!K)return;let te,ne=ht(m,Z),le=!1;const me=Ud({nodes:v.value,nodeId:ae(t),handleId:ae(e),handleType:K}),ve=()=>{if(!h)return;const[_,p]=Ea(ne,Z);g({x:_,y:p}),J=requestAnimationFrame(ve)};b({nodeId:ae(t),handleId:ae(e),type:K},{x:ue-Z.left,y:D-Z.top},m),x.connectStart({event:m,nodeId:ae(t),handleId:ae(e),handleType:K}),B.addEventListener("mousemove",k),B.addEventListener("mouseup",A),B.addEventListener("touchmove",k),B.addEventListener("touchend",A)}}function U(m){if(!c.value)return;const T=ae(n)==="target";if(!d.value)x.clickConnectStart({event:m,nodeId:ae(t),handleId:ae(e)}),b({nodeId:ae(t),type:ae(n),handleId:ae(e)},void 0,m,!0);else{let N=ae(o)||H.value||gn;const I=E(ae(t));if(!N&&I&&(N=(T?I.isValidSourcePos:I.isValidTargetPos)||gn),I&&(typeof I.connectable>"u"?f.value:I.connectable)===!1)return;const B=Oi(m.target),{connection:k,isValid:A}=Zi(m,{nodeId:ae(t),id:ae(e),type:ae(n)},l.value,d.value.nodeId,d.value.handleId||null,d.value.type,N,B,z.value,w.value,E),W=k.source===k.target;A&&!W&&x.connect(k),x.clickConnectEnd(m),S(m,!0)}}return{handlePointerDown:j,handleClick:U}}function Ed(){return zt(ca,"")}function Sd(e){const t=Ed()??"",n=zt(da,fe(null)),{findNode:o,edges:i,emits:r}=_e(),a=o(t);return a||r.error(new Ce(Me.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:a,parentNode:se(()=>o(a.parentNode)),connectedEdges:se(()=>ti([a],i.value))}}function Nd(){return{doubleClick:F(),click:F(),mouseEnter:F(),mouseMove:F(),mouseLeave:F(),contextMenu:F(),dragStart:F(),drag:F(),dragStop:F()}}function Md(e,t){const n=Nd();return n.doubleClick.on(o=>{var i,r;t.nodeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.nodeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.nodeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.nodeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.nodeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.nodeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.dragStart.on(o=>{var i,r;t.nodeDragStart(o),(r=(i=e.events)==null?void 0:i.dragStart)==null||r.call(i,o)}),n.drag.on(o=>{var i,r;t.nodeDrag(o),(r=(i=e.events)==null?void 0:i.drag)==null||r.call(i,o)}),n.dragStop.on(o=>{var i,r;t.nodeDragStop(o),(r=(i=e.events)==null?void 0:i.dragStop)==null||r.call(i,o)}),Object.entries(n).reduce((o,[i,r])=>(o.emit[i]=r.trigger,o.on[i]=r.on,o),{emit:{},on:{}})}function ha(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:r,nodesDraggable:a,emits:s}=_e();return(l,u=!1)=>{const c=r.value?i.value[0]:5,d=r.value?i.value[1]:5,f=u?4:1,h=l.x*c*f,E=l.y*d*f,g=e.value.filter(v=>v.draggable||a&&typeof v.draggable>"u").map(v=>{const b={x:v.computedPosition.x+h,y:v.computedPosition.y+E},{computedPosition:y}=ni(v,b,s.error,t.value,v.parentNode?o(v.parentNode):void 0);return{id:v.id,position:y,from:v.position,distance:{x:l.x,y:l.y},dimensions:v.dimensions}});n(g,!0,!1)}}const go=.1;function nt(){return Qn("Viewport not initialized yet."),Promise.resolve(!1)}const kd={zoomIn:nt,zoomOut:nt,zoomTo:nt,fitView:nt,setCenter:nt,fitBounds:nt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:nt,setTransform:nt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function Cd(e,t){const{getNodes:n}=t;function o(r,a){return new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleBy(po(e.d3Selection,a,()=>{s(!0)}),r):s(!1)})}function i(r,a,s,l){return new Promise(u=>{const{x:c,y:d}=ga({x:-r,y:-a},e.translateExtent),f=It.translate(-c,-d).scale(s);e.d3Selection&&e.d3Zoom?e.d3Zoom.transform(po(e.d3Selection,l,()=>{u(!0)}),f):u(!1)})}return se(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:a=>o(1.2,a==null?void 0:a.duration),zoomOut:a=>o(1/1.2,a==null?void 0:a.duration),zoomTo:(a,s)=>new Promise(l=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleTo(po(e.d3Selection,s==null?void 0:s.duration,()=>{l(!0)}),a):l(!1)}),setViewport:(a,s)=>i(a.x,a.y,a.zoom,s==null?void 0:s.duration),setTransform:(a,s)=>i(a.x,a.y,a.zoom,s==null?void 0:s.duration),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(a={padding:go,includeHiddenNodes:!1,duration:0})=>{const s=(a.includeHiddenNodes?e.nodes:n.value).filter(f=>{var h;const E=f.dimensions.width&&f.dimensions.height;let g=!0;return(h=a.nodes)!=null&&h.length&&(g=a.nodes.includes(f.id)),E&&g});if(!s.length)return Promise.resolve(!1);const l=wa(s),{x:u,y:c,zoom:d}=Bi(l,e.dimensions.width,e.dimensions.height,a.minZoom??e.minZoom,a.maxZoom??e.maxZoom,a.padding??go,a.offset);return i(u,c,d,a==null?void 0:a.duration)},setCenter:(a,s,l)=>{const u=typeof(l==null?void 0:l.zoom)<"u"?l.zoom:e.maxZoom,c=e.dimensions.width/2-a*u,d=e.dimensions.height/2-s*u;return i(c,d,u,l==null?void 0:l.duration)},fitBounds:(a,s={padding:go})=>{const{x:l,y:u,zoom:c}=Bi(a,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,s.padding);return i(l,u,c,s==null?void 0:s.duration)},project:a=>Do(a,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:a=>{if(e.vueFlowRef){const{x:s,y:l}=e.vueFlowRef.getBoundingClientRect(),u={x:a.x-s,y:a.y-l};return Do(u,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:a=>{if(e.vueFlowRef){const{x:s,y:l}=e.vueFlowRef.getBoundingClientRect(),u={x:a.x+s,y:a.y+l};return ya(u,e.viewport)}return{x:0,y:0}}}:kd)}function po(e,t=0,n){return e.transition().duration(t).on("end",n)}function $d(e,t,n){const o=xr(!0);return o.run(()=>{const i=()=>{o.run(()=>{let g,v,b=!!(n.nodes.value.length||n.edges.value.length);g=bt([e.modelValue,()=>{var y,S;return(S=(y=e.modelValue)==null?void 0:y.value)==null?void 0:S.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setElements(y),!v&&!b&&y.length?b=!0:v==null||v.resume())}),v=bt([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([y,S])=>{var x;(x=e.modelValue)!=null&&x.value&&Array.isArray(e.modelValue.value)&&(g==null||g.pause(),e.modelValue.value=[...y,...S],Ye(()=>{g==null||g.resume()}))},{immediate:b}),bn(()=>{g==null||g.stop(),v==null||v.stop()})})},r=()=>{o.run(()=>{let g,v,b=!!n.nodes.value.length;g=bt([e.nodes,()=>{var y,S;return(S=(y=e.nodes)==null?void 0:y.value)==null?void 0:S.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setNodes(y),!v&&!b&&y.length?b=!0:v==null||v.resume())}),v=bt([n.nodes,()=>n.nodes.value.length],([y])=>{var S;(S=e.nodes)!=null&&S.value&&Array.isArray(e.nodes.value)&&(g==null||g.pause(),e.nodes.value=[...y],Ye(()=>{g==null||g.resume()}))},{immediate:b}),bn(()=>{g==null||g.stop(),v==null||v.stop()})})},a=()=>{o.run(()=>{let g,v,b=!!n.edges.value.length;g=bt([e.edges,()=>{var y,S;return(S=(y=e.edges)==null?void 0:y.value)==null?void 0:S.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setEdges(y),!v&&!b&&y.length?b=!0:v==null||v.resume())}),v=bt([n.edges,()=>n.edges.value.length],([y])=>{var S;(S=e.edges)!=null&&S.value&&Array.isArray(e.edges.value)&&(g==null||g.pause(),e.edges.value=[...y],Ye(()=>{g==null||g.resume()}))},{immediate:b}),bn(()=>{g==null||g.stop(),v==null||v.stop()})})},s=()=>{o.run(()=>{ge(()=>t.maxZoom,()=>{t.maxZoom&&Ee(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{o.run(()=>{ge(()=>t.minZoom,()=>{t.minZoom&&Ee(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{ge(()=>t.translateExtent,()=>{t.translateExtent&&Ee(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{ge(()=>t.nodeExtent,()=>{t.nodeExtent&&Ee(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{ge(()=>t.applyDefault,()=>{Ee(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{o.run(()=>{const g=async v=>{let b=v;typeof t.autoConnect=="function"&&(b=await t.autoConnect(v)),b!==!1&&n.addEdges([b])};ge(()=>t.autoConnect,()=>{Ee(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),ge(n.autoConnect,(v,b,y)=>{v?n.onConnect(g):n.hooks.value.connect.off(g),y(()=>{n.hooks.value.connect.off(g)})},{immediate:!0})})},h=()=>{const g=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const v of Object.keys(t)){const b=v;if(!g.includes(b)){const y=$e(()=>t[b]),S=n[b];Yn(S)&&o.run(()=>{ge(y,x=>{Ee(x)&&(S.value=x)},{immediate:!0,flush:"pre"})})}}};(()=>{i(),r(),a(),l(),s(),u(),c(),d(),f(),h()})()}),()=>o.stop()}function zi(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Po(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Jn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function mt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function ga(e,t){return{x:mt(e.x,t[0][0],t[1][0]),y:mt(e.y,t[0][1],t[1][1])}}function Oi(e){const t=e.getRootNode();return"elementFromPoint"in t?t:ei().document}function yt(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function ft(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!yt(e)}function xt(e){return ft(e)&&"computedPosition"in e}function pn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Ad(e){return pn(e.width)&&pn(e.height)&&pn(e.x)&&pn(e.y)}function Td(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:St({width:0,height:0}),handleBounds:{source:[],target:[]},computedPosition:St({z:0,...e.position}),draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ee(e.data)?e.data:{},events:St(Ee(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function pa(e,t,n){var o,i;const r={id:e.id.toString(),type:e.type??(t==null?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??(n==null?void 0:n.updatable),selectable:e.selectable??(n==null?void 0:n.selectable),focusable:e.focusable??(n==null?void 0:n.focusable),data:Ee(e.data)?e.data:{},events:St(Ee(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(n==null?void 0:n.interactionWidth),...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function va(e,t,n,o){const i=typeof e=="string"?e:e.id,r=new Set,a=o==="source"?"target":"source";for(const s of n)s[a]===i&&r.add(s[o]);return t.filter(s=>r.has(s.id))}function Id(...e){if(e.length===3){const[r,a,s]=e;return va(r,a,s,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>yt(r)&&r.source===o).map(r=>n.find(a=>ft(a)&&a.id===r.target))}function Pd(...e){if(e.length===3){const[r,a,s]=e;return va(r,a,s,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>yt(r)&&r.target===o).map(r=>n.find(a=>ft(a)&&a.id===r.source))}function ma({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Dd(e,t){return t.some(n=>yt(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function ya({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function Do({x:e,y:t},{x:n,y:o,zoom:i},r,[a,s]){const l={x:(e-n)/i,y:(t-o)/i};return r?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l}function zd(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function _a({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Od({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function wa(e){const t=e.reduce((n,{computedPosition:o={x:0,y:0},dimensions:i={width:0,height:0}}={})=>zd(n,_a({...o,...i})),{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY});return Od(t)}function ba(e,t,{x:n,y:o,zoom:i}={x:0,y:0,zoom:1},r=!1,a=!1){const s={x:(t.x-n)/i,y:(t.y-o)/i,width:t.width/i,height:t.height/i};return e.filter(l=>{const{computedPosition:u={x:0,y:0},dimensions:c={width:0,height:0},selectable:d}=l;if(a&&!d)return!1;const f={...u,width:c.width||0,height:c.height||0},h=Po(s,f),E=typeof c.width>"u"||typeof c.height>"u"||c.width===0||c.height===0,g=r&&h>0,v=c.width*c.height;return E||g||h>=v})}function ti(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function Bi(e,t,n,o,i,r=.1,a={x:0,y:0}){const s=t/(e.width*(1+r)),l=n/(e.height*(1+r)),u=Math.min(s,l),c=mt(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c+(a.x??0),E=n/2-f*c+(a.y??0);return{x:h,y:E,zoom:c}}function Bd(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function xa(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:xa(n,t):!1}function ut(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function Vi(e,t,n){return e<t?mt(Math.abs(e-t),1,50)/50:e>n?-mt(Math.abs(e-n),1,50)/50:0}function Ea(e,t){const n=Vi(e.x,35,t.width-35)*20,o=Vi(e.y,35,t.height-35)*20;return[n,o]}function vo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if(typeof t.style=="function"?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if(typeof i.width=="string"){const r=Number(i.width.replace("px",""));i.width=`${r+n}px`}else i.width+=n;if(o>0)if(typeof i.height=="string"){const r=Number(i.height.replace("px",""));i.height=`${r+o}px`}else i.height+=o;if(e.position.x<0){const r=Math.abs(e.position.x);if(t.position.x=t.position.x-r,typeof i.width=="string"){const a=Number(i.width.replace("px",""));i.width=`${a+r}px`}else i.width+=r;e.position.x=0}if(e.position.y<0){const r=Math.abs(e.position.y);if(t.position.y=t.position.y-r,typeof i.height=="string"){const a=Number(i.height.replace("px",""));i.height=`${a+r}px`}else i.height+=r;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),typeof t.style=="function"?t.style=r=>{const a=t.style;return{...a(r),...i}}:t.style={...t.style,...i}}}}function Ri(e,t){var n,o;const i=e.filter(a=>a.type==="add"||a.type==="remove");for(const a of i)if(a.type==="add")t.findIndex(l=>l.id===a.item.id)===-1&&t.push(a.item);else if(a.type==="remove"){const s=t.findIndex(l=>l.id===a.id);s!==-1&&t.splice(s,1)}const r=t.map(a=>a.id);for(const a of t){const s=e.filter(l=>l.id===a.id);for(const l of s)switch(l.type){case"select":a.selected=l.selected;break;case"position":if(xt(a)&&(typeof l.position<"u"&&(a.position=l.position),typeof l.dragging<"u"&&(a.dragging=l.dragging),a.expandParent&&a.parentNode)){const u=t[r.indexOf(a.parentNode)];u&&xt(u)&&vo(a,u)}break;case"dimensions":if(xt(a)){if(typeof l.dimensions<"u"&&(a.dimensions=l.dimensions),typeof l.updateStyle<"u"&&(a.style={...a.style||{},width:`${(n=l.dimensions)==null?void 0:n.width}px`,height:`${(o=l.dimensions)==null?void 0:o.height}px`}),typeof l.resizing<"u"&&(a.resizing=l.resizing),a.expandParent&&a.parentNode){const u=t[r.indexOf(a.parentNode)];u&&xt(u)&&(u.initialized?vo(a,u):Ye(()=>{vo(a,u)}))}a.initialized||(a.initialized=!0)}break}}return t}function Je(e,t){return{id:e,type:"select",selected:t}}function Hi(e){return{item:e,type:"add"}}function Fi(e){return{id:e,type:"remove"}}function Li(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function mo(e,t){return e.reduce((n,o)=>{let i=t.includes(o.id);Ee(o.selectable)&&!o.selectable&&(i=!1);const r=xt(o)?"changedNodes":"changedEdges";return!o.selected&&i?n[r].push(Je(o.id,!0)):o.selected&&!i&&n[r].push(Je(o.id,!1)),n},{changedNodes:[],changedEdges:[]})}function F(e){const t=new Set;let n=!1;const o=()=>t.size>0;e&&(n=!0,t.add(e));const i=s=>{t.delete(s)};return{on:s=>{e&&n&&t.delete(e),t.add(s);const l=()=>{i(s),e&&n&&t.add(e)};return Xn(l),{off:l}},off:i,trigger:s=>Promise.all(Array.from(t).map(l=>l(s))),hasListeners:o,fns:t}}function Gi(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Vd(e,t,n,o,i){return e.filter(r=>(r.selected||r.id===i)&&(!r.parentNode||!xa(r,o))&&(r.draggable||t&&typeof r.draggable>"u")).map(r=>{var a,s;return St({id:r.id,position:r.position||{x:0,y:0},distance:{x:n.x-((a=r.computedPosition)==null?void 0:a.x)||0,y:n.y-((s=r.computedPosition)==null?void 0:s.y)||0},from:r.computedPosition,extent:r.extent,parentNode:r.parentNode,dimensions:r.dimensions,expandParent:r.expandParent})})}function yo({id:e,dragItems:t,findNode:n}){const o=t.reduce((i,r)=>{const a=n(r.id);return a&&i.push(a),i},[]);return[e?o.find(i=>i.id===e):o[0],o]}function Sa(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function Rd(e,t,n){const[o,i,r,a]=typeof e!="string"?Sa(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-r]]:!1}function Hd(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&(i==null?void 0:i.range)==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=Rd(i,e,o);r&&(i=r)}else t(new Ce(Me.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=(o==null?void 0:o.computedPosition.x)||0,a=(o==null?void 0:o.computedPosition.y)||0;i=[[i[0][0]+r,i[0][1]+a],[i[1][0]+r,i[1][1]+a]]}else if(i!=="parent"&&(i!=null&&i.range)&&Array.isArray(i.range)){const[r,a,s,l]=Sa(i.padding),u=(o==null?void 0:o.computedPosition.x)||0,c=(o==null?void 0:o.computedPosition.y)||0;i=[[i.range[0][0]+u+l,i.range[0][1]+c+r],[i.range[1][0]+u-a,i.range[1][1]+c-s]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Fd({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function ni(e,t,n,o,i){const r=Fd(e.dimensions,Hd(e,n,o,i)),a=ga(t,r);return{position:{x:a.x-((i==null?void 0:i.computedPosition.x)||0),y:a.y-((i==null?void 0:i.computedPosition.y)||0)},computedPosition:a}}function zo(e,t,n){const o=((n==null?void 0:n.x)??0)+t.x,i=((n==null?void 0:n.y)??0)+t.y,r=(n==null?void 0:n.width)??t.width,a=(n==null?void 0:n.height)??t.height;switch(e){case Q.Top:return{x:o+r/2,y:i};case Q.Right:return{x:o+r,y:i+a/2};case Q.Bottom:return{x:o+r/2,y:i+a};case Q.Left:return{x:o,y:i+a/2}}}function Yi(e=[],t){return e.length&&(t?e.find(n=>n.id===t):e[0])||null}function Ld(e,t,n,o,i,r){const a=zo(n,{...e.dimensions,...e.computedPosition},t),s=zo(r,{...o.dimensions,...o.computedPosition},i);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}}function Gd({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:a,height:s,viewport:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+r)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=_a({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:a/l.zoom,height:s/l.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function Yd(e,t,n=!1){const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const r=t(e.source),a=t(e.target);return!r||!a?0:(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,a.computedPosition.z||0)),i)}var Me=(e=>(e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e))(Me||{});const Xi={MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
3
3
|
Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
|
4
4
|
Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
|
5
5
|
Node: ${e}
|
@@ -19,4 +19,4 @@ Edge: ${e}
|
|
19
19
|
Source: ${t}
|
20
20
|
Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
|
21
21
|
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
22
|
-
Edge: ${e}`};class Ce extends Error{constructor(t,...n){var o;super((o=Xi[t])==null?void 0:o.call(Xi,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function oi(e){return"clientX"in e}function ht(e,t){var n,o;const i=oi(e),r=i?e.clientX:(n=e.touches)==null?void 0:n[0].clientX,a=i?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}}const On=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Na(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function _o(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Ui(e,t,n,o){return(t[n]||[]).reduce((i,r)=>{var a,s;return`${e.id}-${r.id}-${n}`!==o&&i.push({id:r.id||null,type:n,nodeId:e.id,x:(((a=e.computedPosition)==null?void 0:a.x)??0)+r.x+r.width/2,y:(((s=e.computedPosition)==null?void 0:s.y)??0)+r.y+r.height/2,width:r.width,height:r.height}),i},[])}function Xd(e,t,n,o,i,r){const{x:a,y:s}=ht(e),u=t.elementsFromPoint(a,s).find(E=>E.classList.contains("vue-flow__handle"));if(u){const E=u.getAttribute("data-nodeid");if(E){const g=ii(void 0,u),v=u.getAttribute("data-handleid"),b=r({nodeId:E,id:v,type:g});if(b){const y=i.find(S=>S.nodeId===E&&S.type===g&&S.id===v);return{handle:{id:v,type:g,nodeId:E,x:(y==null?void 0:y.x)||n.x,y:(y==null?void 0:y.y)||n.y},validHandleResult:b}}}}let c=[],d=Number.POSITIVE_INFINITY;for(const E of i){const g=Math.sqrt((E.x-n.x)**2+(E.y-n.y)**2);if(g<=o){const v=r(E);g<=d&&(g<d?c=[{handle:E,validHandleResult:v}]:g===d&&c.push({handle:E,validHandleResult:v}),d=g)}}if(!c.length)return{handle:null,validHandleResult:Na()};if(c.length===1)return c[0];const f=c.some(({validHandleResult:E})=>E.isValid),h=c.some(({handle:E})=>E.type==="target");return c.find(({handle:E,validHandleResult:g})=>h?E.type==="target":f?g.isValid:!0)||c[0]}function Zi(e,t,n,o,i,r,a,s,l,u,c){const d=r==="target",f=s.querySelector(`.vue-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:h,y:E}=ht(e),g=s.elementFromPoint(h,E),v=g!=null&&g.classList.contains("vue-flow__handle")?g:f,b=Na();if(v){b.handleDomNode=v;const y=ii(void 0,v),S=v.getAttribute("data-nodeid"),x=v.getAttribute("data-handleid"),M=v.classList.contains("connectable"),z=v.classList.contains("connectableend"),w={source:d?S:o,sourceHandle:d?x:i,target:d?o:S,targetHandle:d?i:x};b.connection=w;const R=M&&z&&(n===vt.Strict?d&&y==="source"||!d&&y==="target":S!==o||x!==i);b.endHandle={nodeId:S,handleId:x,type:y},R&&(b.isValid=a(w,{edges:l,nodes:u,sourceNode:c(w.source),targetNode:c(w.target)}))}return b}function Ud({nodes:e,nodeId:t,handleId:n,handleType:o}){return e.reduce((i,r)=>{const{handleBounds:a}=r;let s=[],l=[];return a&&(s=Ui(r,a,"source",`${t}-${n}-${o}`),l=Ui(r,a,"target",`${t}-${n}-${o}`)),i.push(...s,...l),i},[])}function ii(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Zd(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}const qd=["production","prod"];function Qn(e,...t){qd.includes("production")||console.warn(`[Vue Flow]: ${e}`,...t)}function qi(e,t,n){const o=t.querySelectorAll(`.vue-flow__handle${e}`);if(!o||!o.length)return;const i=Array.from(o),r=t.getBoundingClientRect();return i.map(a=>{const s=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),position:a.getAttribute("data-handlepos"),x:(s.left-r.left)/n,y:(s.top-r.top)/n,...Jn(a)}})}function Oo(e,t,n,o,i,r=!1,a){i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),Ye(()=>{a.blur()})):n([e])}function Ee(e){return typeof C(e)<"u"}function Wd(e,t,n,o){if(!e||!e.source||!e.target)return n(new Ce(Me.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let i;return yt(e)?i=e:i={...e,id:ma(e)},i=pa(i,void 0,o),Dd(i,t)?!1:i}function Kd(e,t,n,o,i,r){if(!t.source||!t.target)return r(new Ce(Me.EDGE_INVALID,e.id)),!1;const a=o(e.id);if(!a)return r(new Ce(Me.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...l}=e,u={...l,id:i?ma(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.splice(n.indexOf(a),1,u),u}function Wi(e,t,n,o){const i={},r=e.reduce((s,l,u)=>{if(!ft(l))return o(new Ce(Me.NODE_INVALID,l==null?void 0:l.id)||`[ID UNKNOWN|INDEX ${u}]`),s;const c=Td(l,n(l.id),l.parentNode);return l.parentNode&&(i[l.parentNode]=!0),s.concat(c)},[]),a=[...r,...t];for(const s of r){const l=a.find(u=>u.id===s.parentNode);s.parentNode&&!l&&o(new Ce(Me.NODE_MISSING_PARENT,s.id,s.parentNode)),(s.parentNode||i[s.id])&&(i[s.id]&&(s.isParent=!0),l&&(l.isParent=!0))}return r}function Ki(e,t){e.clear();for(const n of t){const{source:o,target:i,sourceHandle:r=null,targetHandle:a=null}=n,s=`${o}-source-${r}`,l=`${i}-target-${a}`,u=e.get(s)||new Map,c=e.get(l)||new Map,d=St({source:o,target:i,sourceHandle:r,targetHandle:a});e.set(s,u.set(`${i}-${a}`,d)),e.set(l,c.set(`${o}-${r}`,d))}}function Jd(){return{edgesChange:F(),nodesChange:F(),nodeDoubleClick:F(),nodeClick:F(),nodeMouseEnter:F(),nodeMouseMove:F(),nodeMouseLeave:F(),nodeContextMenu:F(),nodeDragStart:F(),nodeDrag:F(),nodeDragStop:F(),nodesInitialized:F(),miniMapNodeClick:F(),miniMapNodeDoubleClick:F(),miniMapNodeMouseEnter:F(),miniMapNodeMouseMove:F(),miniMapNodeMouseLeave:F(),connect:F(),connectStart:F(),connectEnd:F(),clickConnectStart:F(),clickConnectEnd:F(),paneReady:F(),init:F(),move:F(),moveStart:F(),moveEnd:F(),selectionDragStart:F(),selectionDrag:F(),selectionDragStop:F(),selectionContextMenu:F(),selectionStart:F(),selectionEnd:F(),viewportChangeStart:F(),viewportChange:F(),viewportChangeEnd:F(),paneScroll:F(),paneClick:F(),paneContextMenu:F(),paneMouseEnter:F(),paneMouseMove:F(),paneMouseLeave:F(),edgeContextMenu:F(),edgeMouseEnter:F(),edgeMouseMove:F(),edgeMouseLeave:F(),edgeDoubleClick:F(),edgeClick:F(),edgeUpdateStart:F(),edgeUpdate:F(),edgeUpdateEnd:F(),updateNodeInternals:F(),error:F(e=>Qn(e.message))}}function Qd(e,t){as(()=>{for(const[n,o]of Object.entries(t.value)){const i=r=>{e(n,r)};o.fns.add(i),Xn(()=>{o.off(i)})}})}function Ma(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:jo.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Zt.Free,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:st.Bezier,style:{}},connectionMode:vt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:On()?"Meta":"Control",zoomActivationKeyCode:On()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:Jd(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,disableKeyboardA11y:!1,ariaLiveMessage:"",__experimentalFeatures:{nestedFlow:!1}}}const jd=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function ef(e,t,n,o,i){const r=Cd(t,n),a=_=>{const p=_??o.value??[];t.hooks.updateNodeInternals.trigger(p)},s=_=>Pd(_,t.nodes,t.edges),l=_=>Id(_,t.nodes,t.edges),u=_=>ti(_,t.edges),c=_=>{if(_)return t.nodes&&!o.value.length?t.nodes.find(p=>p.id===_):t.nodes[o.value.indexOf(_)]},d=_=>{if(_)return t.edges&&!i.value.length?t.edges.find(p=>p.id===_):t.edges[i.value.indexOf(_)]},f=(_,p,P)=>{var $,V;const Y=[];for(const q of _){const re={id:q.id,type:"position",dragging:P,from:q.from};if(p&&(re.position=q.position,q.parentNode)){const ce=c(q.parentNode);re.position={x:re.position.x-((($=ce==null?void 0:ce.computedPosition)==null?void 0:$.x)??0),y:re.position.y-(((V=ce==null?void 0:ce.computedPosition)==null?void 0:V.y)??0)}}Y.push(re)}Y!=null&&Y.length&&t.hooks.nodesChange.trigger(Y)},h=_=>{if(!t.vueFlowRef)return;const p=t.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const P=window.getComputedStyle(p),{m22:$}=new window.DOMMatrixReadOnly(P.transform),V=_.reduce((Y,q)=>{const re=c(q.id);if(re){const ce=Jn(q.nodeElement);!!(ce.width&&ce.height&&(re.dimensions.width!==ce.width||re.dimensions.height!==ce.height||q.forceUpdate))&&(re.handleBounds.source=qi(".source",q.nodeElement,$),re.handleBounds.target=qi(".target",q.nodeElement,$),re.dimensions=ce,re.initialized=!0,Y.push({id:re.id,type:"dimensions",dimensions:ce}))}return Y},[]);!t.fitViewOnInitDone&&t.fitViewOnInit&&Ye(()=>{r.value.fitView(),t.fitViewOnInitDone=!0}),V.length&&t.hooks.nodesChange.trigger(V)},E=(_,p)=>{const P=_.map(Y=>Y.id);let $,V=[];if(t.multiSelectionActive)$=P.map(Y=>Je(Y,p));else{const Y=mo([...t.nodes,...t.edges],P);$=Y.changedNodes,V=Y.changedEdges}$.length&&t.hooks.nodesChange.trigger($),V.length&&t.hooks.edgesChange.trigger(V)},g=(_,p)=>{const P=_.map(Y=>Y.id);let $=[],V;if(t.multiSelectionActive)V=P.map(Y=>Je(Y,p));else{const Y=mo([...t.nodes,...t.edges],P);$=Y.changedNodes,V=Y.changedEdges}$.length&&t.hooks.nodesChange.trigger($),V.length&&t.hooks.edgesChange.trigger(V)},v=(_,p)=>{const P=_.filter(ft).map(q=>q.id),$=_.filter(yt).map(q=>q.id);let{changedNodes:V,changedEdges:Y}=mo([...t.nodes,...t.edges],[...P,...$]);t.multiSelectionActive&&(V=P.map(q=>Je(q,p)),Y=$.map(q=>Je(q,p))),V.length&&t.hooks.nodesChange.trigger(V),Y.length&&t.hooks.edgesChange.trigger(Y)},b=_=>{E(_,!0)},y=_=>{g(_,!0)},S=_=>{v(_,!0)},x=_=>{if(!_.length)return E(_,!1);const P=_.map($=>$.id).map($=>Je($,!1));P.length&&t.hooks.nodesChange.trigger(P)},M=_=>{if(!_.length)return g(_,!1);const P=_.map($=>$.id).map($=>Je($,!1));P.length&&t.hooks.edgesChange.trigger(P)},z=_=>{if(!_||!_.length)return v([],!1);const p=_.reduce((P,$)=>{const V=Je($.id,!1);return ft($)?P.nodes.push(V):P.edges.push(V),P},{nodes:[],edges:[]});p.nodes.length&&t.hooks.nodesChange.trigger(p.nodes),p.edges.length&&t.hooks.edgesChange.trigger(p.edges)},w=_=>{var p;(p=t.d3Zoom)==null||p.scaleExtent([_,t.maxZoom]),t.minZoom=_},H=_=>{var p;(p=t.d3Zoom)==null||p.scaleExtent([t.minZoom,_]),t.maxZoom=_},R=_=>{var p;(p=t.d3Zoom)==null||p.translateExtent(_),t.translateExtent=_},X=_=>{t.nodeExtent=_,a(o.value)},O=_=>{t.nodesDraggable=_,t.nodesConnectable=_,t.elementsSelectable=_},j=_=>{const p=_ instanceof Function?_(t.nodes):_;!t.initialized&&!p.length||(t.nodes=Wi(p,t.nodes,c,t.hooks.error.trigger))},U=_=>{const p=_ instanceof Function?_(t.edges):_;if(!t.initialized&&!p.length)return;const P=t.isValidConnection?p.filter($=>t.isValidConnection($,{edges:t.edges,nodes:t.nodes,sourceNode:c($.source),targetNode:c($.target)})):p;Ki(t.connectionLookup,P),t.edges=P.reduce(($,V)=>{const Y=c(V.source),q=c(V.target),re=!Y||typeof Y>"u",ce=!q||typeof q>"u";if(re&&ce?t.hooks.error.trigger(new Ce(Me.EDGE_SOURCE_TARGET_MISSING,V.id,V.source,V.target)):(re&&t.hooks.error.trigger(new Ce(Me.EDGE_SOURCE_MISSING,V.id,V.source)),ce&&t.hooks.error.trigger(new Ce(Me.EDGE_TARGET_MISSING,V.id,V.target))),re||ce)return $;const Se=d(V.id);return $.push({...pa(V,Se,t.defaultEdgeOptions),sourceNode:Y,targetNode:q}),$},[])},m=_=>{const p=_ instanceof Function?_([...t.nodes,...t.edges]):_;!t.initialized&&!p.length||(j(p.filter(ft)),U(p.filter(yt)))},T=_=>{let p=_ instanceof Function?_(t.nodes):_;p=Array.isArray(p)?p:[p];const $=Wi(p,t.nodes,c,t.hooks.error.trigger).map(Hi);$.length&&t.hooks.nodesChange.trigger($)},N=_=>{let p=_ instanceof Function?_(t.edges):_;p=Array.isArray(p)?p:[p];const $=(t.isValidConnection?p.filter(V=>{var Y;return(Y=t.isValidConnection)==null?void 0:Y.call(t,V,{edges:t.edges,nodes:t.nodes,sourceNode:c(V.source),targetNode:c(V.target)})}):p).reduce((V,Y)=>{const q=Wd(Y,t.edges,t.hooks.error.trigger,t.defaultEdgeOptions);if(q){const re=c(q.source),ce=c(q.target);V.push(Hi({...q,sourceNode:re,targetNode:ce}))}return V},[]);$.length&&t.hooks.edgesChange.trigger($)},I=(_,p=!0,P=!1)=>{const $=_ instanceof Function?_(t.nodes):_,V=Array.isArray($)?$:[$],Y=[],q=[];function re(Se){const ke=u(Se).filter(De=>Ee(De.deletable)?De.deletable:!0);q.push(...ke.map(De=>Li(De.id,De.source,De.target,De.sourceHandle,De.targetHandle)))}function ce(Se){const ke=t.nodes.filter(De=>De.parentNode===Se);if(ke.length){const De=ke.map(Ot=>Ot.id);Y.push(...De.map(Ot=>Fi(Ot))),p&&re(ke);for(const Ot of ke)ce(Ot.id)}}for(const Se of V){const ke=typeof Se=="string"?c(Se):Se;ke&&(Ee(ke.deletable)&&!ke.deletable||(Y.push(Fi(ke.id)),p&&re([ke]),P&&ce(ke.id)))}q.length&&t.hooks.edgesChange.trigger(q),Y.length&&t.hooks.nodesChange.trigger(Y)},B=_=>{const p=_ instanceof Function?_(t.edges):_,P=Array.isArray(p)?p:[p],$=[];for(const V of P){const Y=typeof V=="string"?d(V):V;Y&&(Ee(Y.deletable)&&!Y.deletable||$.push(Li(typeof V=="string"?V:V.id,Y.source,Y.target,Y.sourceHandle,Y.targetHandle)))}t.hooks.edgesChange.trigger($)},k=(_,p,P=!0)=>Kd(_,p,t.edges,d,P,t.hooks.error.trigger),A=_=>Ri(_,t.nodes),W=_=>{const p=Ri(_,t.edges);return Ki(t.connectionLookup,p),p},ee=(_,p,P={replace:!1})=>{const $=c(_);if(!$)return;const V=typeof p=="function"?p($):p;P.replace?t.nodes.splice(t.nodes.indexOf($),1,V):Object.assign($,V)},L=(_,p,P={replace:!1})=>{ee(_,$=>{const V=typeof p=="function"?p($):p;return P.replace?{...$,data:V}:{...$,data:{...$.data,...V}}},P)},J=(_,p,P,$=!1)=>{$?t.connectionClickStartHandle=_:t.connectionStartHandle=_,t.connectionEndHandle=null,t.connectionStatus=null,p&&(t.connectionPosition=p)},ue=(_,p=null,P=null)=>{t.connectionStartHandle&&(t.connectionPosition=_,t.connectionEndHandle=p,t.connectionStatus=P)},D=(_,p)=>{t.connectionPosition={x:Number.NaN,y:Number.NaN},t.connectionEndHandle=null,t.connectionStatus=null,p?t.connectionClickStartHandle=null:t.connectionStartHandle=null},ie=_=>{const p=Ad(_),P=p?null:xt(_)?_:c(_.id);return!p&&!P?[null,null,p]:[p?_:zi(P),P,p]},K=(_,p=!0,P=t.nodes)=>{const[$,V,Y]=ie(_);return $?(P||t.nodes).filter(q=>{if(!Y&&(q.id===V.id||!q.computedPosition))return!1;const re=zi(q),ce=Po(re,$);return p&&ce>0||ce>=Number($.width)*Number($.height)}):[]},Z=(_,p,P=!0)=>{const[$]=ie(_);if(!$)return!1;const V=Po($,p);return P&&V>0||V>=Number($.width)*Number($.height)},te=_=>{const{viewport:p,dimensions:P,d3Zoom:$,d3Selection:V,translateExtent:Y}=t;if(!$||!V||!_.x&&!_.y)return!1;const q=It.translate(p.x+_.x,p.y+_.y).scale(p.zoom),re=[[0,0],[P.width,P.height]],ce=$.constrain()(q,re,Y),Se=t.viewport.x!==ce.x||t.viewport.y!==ce.y||t.viewport.zoom!==ce.k;return $.transform(V,ce),Se},ne=_=>{const p=_ instanceof Function?_(t):_,P=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ee(p.defaultEdgeOptions)&&(t.defaultEdgeOptions=p.defaultEdgeOptions);const $=p.modelValue||p.nodes||p.edges?[]:void 0;$&&(p.modelValue&&$.push(...p.modelValue),p.nodes&&$.push(...p.nodes),p.edges&&$.push(...p.edges),m($));const V=()=>{Ee(p.maxZoom)&&H(p.maxZoom),Ee(p.minZoom)&&w(p.minZoom),Ee(p.translateExtent)&&R(p.translateExtent)};for(const Y of Object.keys(p)){const q=Y,re=p[q];![...jd,...P].includes(q)&&Ee(re)&&(t[q]=re)}$n(()=>t.d3Zoom).not.toBeNull().then(V),t.initialized||(t.initialized=!0)};return{updateNodePositions:f,updateNodeDimensions:h,setElements:m,setNodes:j,setEdges:U,addNodes:T,addEdges:N,removeNodes:I,removeEdges:B,findNode:c,findEdge:d,updateEdge:k,updateNode:ee,updateNodeData:L,applyEdgeChanges:W,applyNodeChanges:A,addSelectedElements:S,addSelectedNodes:b,addSelectedEdges:y,setMinZoom:w,setMaxZoom:H,setTranslateExtent:R,setNodeExtent:X,removeSelectedElements:z,removeSelectedNodes:x,removeSelectedEdges:M,startConnection:J,updateConnection:ue,endConnection:D,setInteractive:O,setState:ne,getIntersectingNodes:K,getIncomers:s,getOutgoers:l,getConnectedEdges:u,isNodeIntersecting:Z,panBy:te,fitView:_=>r.value.fitView(_),zoomIn:_=>r.value.zoomIn(_),zoomOut:_=>r.value.zoomOut(_),zoomTo:(_,p)=>r.value.zoomTo(_,p),setViewport:(_,p)=>r.value.setViewport(_,p),setTransform:(_,p)=>r.value.setTransform(_,p),getViewport:()=>r.value.getViewport(),getTransform:()=>r.value.getTransform(),setCenter:(_,p,P)=>r.value.setCenter(_,p,P),fitBounds:(_,p)=>r.value.fitBounds(_,p),project:_=>r.value.project(_),screenToFlowCoordinate:_=>r.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>r.value.flowToScreenCoordinate(_),toObject:()=>JSON.parse(JSON.stringify({nodes:t.nodes.map(_=>{const{computedPosition:p,handleBounds:P,selected:$,dimensions:V,isParent:Y,resizing:q,dragging:re,initialized:ce,events:Se,...ke}=_;return ke}),edges:t.edges.map(_=>{const{selected:p,sourceNode:P,targetNode:$,events:V,...Y}=_;return Y}),position:[t.viewport.x,t.viewport.y],zoom:t.viewport.zoom,viewport:t.viewport})),fromObject:_=>new Promise(p=>{const{nodes:P,edges:$,position:V,zoom:Y,viewport:q}=_;if(P&&j(P),$&&U($),q!=null&&q.x&&(q!=null&&q.y)||V){const re=(q==null?void 0:q.x)||V[0],ce=(q==null?void 0:q.y)||V[1],Se=(q==null?void 0:q.zoom)||Y||t.viewport.zoom;return $n(()=>r.value.viewportInitialized).toBe(!0).then(()=>{r.value.setViewport({x:re,y:ce,zoom:Se}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:a,viewportHelper:r,$reset:()=>{const _=Ma();if(t.edges=[],t.nodes=[],t.d3Zoom&&t.d3Selection){const p=It.translate(_.defaultViewport.x??0,_.defaultViewport.y??0).scale(mt(_.defaultViewport.zoom??1,_.minZoom,_.maxZoom)),P=t.viewportRef.getBoundingClientRect(),$=[[0,0],[P.width,P.height]],V=t.d3Zoom.constrain()(p,$,_.translateExtent);t.d3Zoom.transform(t.d3Selection,V)}ne(_)},$destroy:()=>{}}}const tf=["data-id","data-handleid","data-nodeid","data-handlepos"],nf={name:"Handle",compatConfig:{MODE:3}},Bn=he({...nf,props:{id:{},type:{},position:{default:()=>Q.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=wr(e,["position","connectable","connectableStart","connectableEnd","id"]),o=$e(()=>n.type??"source"),i=$e(()=>n.isValidConnection??null),{connectionStartHandle:r,connectionClickStartHandle:a,connectionEndHandle:s,vueFlowRef:l,nodesConnectable:u,noDragClassName:c,noPanClassName:d}=_e(),{id:f,node:h,nodeEl:E,connectedEdges:g}=Sd(),v=fe(),b=$e(()=>e.id??`${f}__handle-${e.position}`),y=$e(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),S=$e(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),x=$e(()=>{var O,j,U,m,T,N;return((O=r.value)==null?void 0:O.nodeId)===f&&((j=r.value)==null?void 0:j.handleId)===b.value&&((U=r.value)==null?void 0:U.type)===o.value||((m=s.value)==null?void 0:m.nodeId)===f&&((T=s.value)==null?void 0:T.handleId)===b.value&&((N=s.value)==null?void 0:N.type)===o.value}),M=$e(()=>{var O,j,U;return((O=a.value)==null?void 0:O.nodeId)===f&&((j=a.value)==null?void 0:j.handleId)===b.value&&((U=a.value)==null?void 0:U.type)===o.value}),{handlePointerDown:z,handleClick:w}=fa({nodeId:f,handleId:b,isValidConnection:i,type:o}),H=se(()=>typeof e.connectable=="string"&&e.connectable==="single"?!g.value.some(O=>{const j=O[`${o.value}Handle`];return O[o.value]!==f?!1:j?j===b.value:!0}):typeof e.connectable=="number"?g.value.filter(O=>{const j=O[`${o.value}Handle`];return O[o.value]!==f?!1:j?j===b.value:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(h,g.value):Ee(e.connectable)?e.connectable:u.value);$n(()=>h.initialized).toBe(!0,{flush:"post"}).then(()=>{var O;const j=(O=h.handleBounds[o.value])==null?void 0:O.find(k=>k.id===b.value);if(!l.value||j)return;const U=l.value.querySelector(".vue-flow__transformationpane");if(!E.value||!v.value||!U||!b.value)return;const m=E.value.getBoundingClientRect(),T=v.value.getBoundingClientRect(),N=window.getComputedStyle(U),{m22:I}=new window.DOMMatrixReadOnly(N.transform),B={id:b.value,position:e.position,x:(T.left-m.left)/I,y:(T.top-m.top)/I,...Jn(v.value)};h.handleBounds[o.value]=[...h.handleBounds[o.value]??[],B]}),br(()=>{const O=h.handleBounds[o.value];O&&(h.handleBounds[o.value]=O.filter(j=>j.id!==b.value))});function R(O){const j=oi(O);H.value&&y.value&&(j&&O.button===0||!j)&&z(O)}function X(O){!f||!a.value&&!y.value||H.value&&w(O)}return t({handleClick:w,handlePointerDown:z,onClick:X,onPointerDown:R}),(O,j)=>(G(),oe("div",{ref_key:"handle",ref:v,"data-id":`${C(f)}-${C(b)}-${C(o)}`,"data-handleid":C(b),"data-nodeid":C(f),"data-handlepos":O.position,class:je(["vue-flow__handle",[`vue-flow__handle-${O.position}`,`vue-flow__handle-${C(b)}`,C(c),C(d),C(o),{connectable:H.value,connecting:C(M),connectablestart:C(y),connectableend:C(S),connectionindicator:H.value&&(C(y)&&!C(x)||C(S)&&C(x))}]]),onMousedown:R,onTouchstartPassive:R,onClick:X},[ye(O.$slots,"default",{id:O.id})],42,tf))}}),jn=function({sourcePosition:e=Q.Bottom,targetPosition:t=Q.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:r}){return[pe(Bn,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof n!="string"&&n?pe(n):pe("div",{innerHTML:n}),pe(Bn,{type:"source",position:e,connectable:o,isValidConnection:r})]};jn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable"];jn.inheritAttrs=!1;jn.compatConfig={MODE:3};const of=jn,eo=function({targetPosition:e=Q.Top,label:t,connectable:n=!0,isValidTargetPos:o}){return[pe(Bn,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof t!="string"&&t?pe(t):pe("div",{innerHTML:t})]};eo.props=["targetPosition","label","isValidTargetPos","connectable"];eo.inheritAttrs=!1;eo.compatConfig={MODE:3};const rf=eo,to=function({sourcePosition:e=Q.Bottom,label:t,connectable:n=!0,isValidSourcePos:o}){return[typeof t!="string"&&t?pe(t):pe("div",{innerHTML:t}),pe(Bn,{type:"source",position:e,connectable:n,isValidConnection:o})]};to.props=["sourcePosition","label","isValidSourcePos","connectable"];to.inheritAttrs=!1;to.compatConfig={MODE:3};const af=to,sf=["transform"],lf=["width","height","x","y","rx","ry"],uf=["y"],cf={name:"EdgeText",compatConfig:{MODE:3}},df=he({...cf,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=fe({x:0,y:0,width:0,height:0}),n=fe(null),o=se(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);wt(i),ge([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const r=n.value.getBBox();(r.width!==t.value.width||r.height!==t.value.height)&&(t.value=r)}return(r,a)=>(G(),oe("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(G(),oe("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*r.labelBgPadding[0]}px`,height:`${t.value.height+2*r.labelBgPadding[1]}px`,x:-r.labelBgPadding[0],y:-r.labelBgPadding[1],style:ze(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,lf)):we("",!0),de("text",us(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[ye(r.$slots,"default",{},()=>[typeof r.label!="string"?(G(),be(rt(r.label),{key:0})):(G(),oe(at,{key:1},[ls(Ge(r.label),1)],64))])],16,uf)],8,sf))}}),ff=["id","d","marker-end","marker-start"],hf=["d","stroke-width"],gf={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},no=he({...gf,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},style:{},ref:{type:[String,Object,Function]},labelStyle:{},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=wr(e,["interactionWidth","labelShowBg"]),o=fe(null),i=fe(null),r=fe(null),a=ss();return t({pathEl:o,interactionEl:i,labelEl:r}),(s,l)=>(G(),oe(at,null,[de("path",{id:s.id,ref_key:"pathEl",ref:o,d:s.path,style:ze(n.style),class:je(["vue-flow__edge-path",C(a).class]),"marker-end":s.markerEnd,"marker-start":s.markerStart},null,14,ff),s.interactionWidth?(G(),oe("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,hf)):we("",!0),s.label&&s.labelX&&s.labelY?(G(),be(df,{key:1,ref_key:"labelEl",ref:r,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):we("",!0)],64))}});function ka({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,r=n<e?n+i:n-i,a=Math.abs(o-t)/2,s=o<t?o+a:o-a;return[r,s,i,a]}function Ca({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:r,targetControlX:a,targetControlY:s}){const l=e*.125+i*.375+a*.375+n*.125,u=t*.125+r*.375+s*.375+o*.125,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}function vn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ji({pos:e,x1:t,y1:n,x2:o,y2:i,c:r}){let a,s;switch(e){case Q.Left:a=t-vn(t-o,r),s=n;break;case Q.Right:a=t+vn(o-t,r),s=n;break;case Q.Top:a=t,s=n-vn(n-i,r);break;case Q.Bottom:a=t,s=n+vn(i-n,r);break}return[a,s]}function $a({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:o,targetY:i,targetPosition:r=Q.Top,curvature:a=.25}){const[s,l]=Ji({pos:n,x1:e,y1:t,x2:o,y2:i,c:a}),[u,c]=Ji({pos:r,x1:o,y1:i,x2:e,y2:t,c:a}),[d,f,h,E]=Ca({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,d,f,h,E]}function Qi({pos:e,x1:t,y1:n,x2:o,y2:i}){let r,a;switch(e){case Q.Left:case Q.Right:r=.5*(t+o),a=n;break;case Q.Top:case Q.Bottom:r=t,a=.5*(n+i);break}return[r,a]}function Aa({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:o,targetY:i,targetPosition:r=Q.Top}){const[a,s]=Qi({pos:n,x1:e,y1:t,x2:o,y2:i}),[l,u]=Qi({pos:r,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=Ca({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:a,sourceControlY:s,targetControlX:l,targetControlY:u});return[`M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,c,d,f,h]}const ji={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}};function pf({source:e,sourcePosition:t=Q.Bottom,target:n}){return t===Q.Left||t===Q.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function er(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function vf({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:o=Q.Top,center:i,offset:r}){const a=ji[t],s=ji[o],l={x:e.x+a.x*r,y:e.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},c=pf({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h,E,g;const v={x:0,y:0},b={x:0,y:0},[y,S,x,M]=ka({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){E=i.x||y,g=i.y||S;const w=[{x:E,y:l.y},{x:E,y:u.y}],H=[{x:l.x,y:g},{x:u.x,y:g}];a[d]===f?h=d==="x"?w:H:h=d==="x"?H:w}else{const w=[{x:l.x,y:u.y}],H=[{x:u.x,y:l.y}];if(d==="x"?h=a.x===f?H:w:h=a.y===f?w:H,t===o){const U=Math.abs(e[d]-n[d]);if(U<=r){const m=Math.min(r-1,r-U);a[d]===f?v[d]=m:b[d]=m}}if(t!==o){const U=d==="x"?"y":"x",m=a[d]===s[U],T=l[U]>u[U],N=l[U]<u[U];(a[d]===1&&(!m&&T||m&&N)||a[d]!==1&&(!m&&N||m&&T))&&(h=d==="x"?w:H)}const R={x:l.x-v.x,y:l.y-v.y},X={x:u.x-b.x,y:u.y-b.y},O=Math.max(Math.abs(R.x-h[0].x),Math.abs(X.x-h[0].x)),j=Math.max(Math.abs(R.y-h[0].y),Math.abs(X.y-h[0].y));O>=j?(E=(R.x+X.x)/2,g=h[0].y):(E=h[0].x,g=(R.y+X.y)/2)}return[[e,{x:l.x-v.x,y:l.y-v.y},...h,{x:u.x-b.x,y:u.y-b.y},n],E,g,x,M]}function mf(e,t,n,o){const i=Math.min(er(e,t)/2,er(t,n)/2,o),{x:r,y:a}=t;if(e.x===r&&r===n.x||e.y===a&&a===n.y)return`L${r} ${a}`;if(e.y===a){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${r+i*u},${a}Q ${r},${a} ${r},${a+i*c}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${r},${a+i*l}Q ${r},${a} ${r+i*s},${a}`}function Bo({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:o,targetY:i,targetPosition:r=Q.Top,borderRadius:a=5,centerX:s,centerY:l,offset:u=20}){const[c,d,f,h,E]=vf({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:r,center:{x:s,y:l},offset:u});return[c.reduce((v,b,y)=>{let S;return y>0&&y<c.length-1?S=mf(c[y-1],b,c[y+1],a):S=`${y===0?"M":"L"}${b.x} ${b.y}`,v+=S,v},""),d,f,h,E]}function yf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[i,r,a,s]=ka({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,r,a,s]}const _f=he({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=yf(e);return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),wf=_f,bf=he({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=Bo({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),Ta=bf,xf=he({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>pe(Ta,{...e,...t,borderRadius:0})}}),Ef=xf,Sf=he({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=$a({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),Nf=Sf,Mf=he({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=Aa({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),kf=Mf,Cf={input:af,default:of,output:rf},$f={default:Nf,straight:wf,step:Ef,smoothstep:Ta,simplebezier:kf};function Af(e,t,n){const o=se(()=>v=>e.nodes&&!t.value.length?e.nodes.find(b=>b.id===v):e.nodes[t.value.indexOf(v)]),i=se(()=>v=>e.edges&&!n.value.length?e.edges.find(b=>b.id===v):e.edges[n.value.indexOf(v)]),r=se(()=>{const v={...$f,...e.edgeTypes},b=Object.keys(v);for(const y of e.edges)y.type&&!b.includes(y.type)&&(v[y.type]=y.type);return v}),a=se(()=>{const v={...Cf,...e.nodeTypes},b=Object.keys(v);for(const y of e.nodes)y.type&&!b.includes(y.type)&&(v[y.type]=y.type);return v}),s=se(()=>{const v=e.nodes.filter(b=>!b.hidden);return e.onlyRenderVisibleElements?v&&ba(v,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):v??[]}),l=(v,b,y)=>{if(b=b??o.value(v.source),y=y??o.value(v.target),!b||!y){e.hooks.error.trigger(new Ce(Me.EDGE_ORPHANED,v.id));return}return!v.hidden&&!y.hidden&&!b.hidden},u=se(()=>e.onlyRenderVisibleElements?e.edges.filter(v=>{const b=o.value(v.source),y=o.value(v.target);return l(v,b,y)&&Gd({sourcePos:b.computedPosition||{x:0,y:0},targetPos:y.computedPosition||{x:0,y:0},sourceWidth:b.dimensions.width,sourceHeight:b.dimensions.height,targetWidth:y.dimensions.width,targetHeight:y.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})}):e.edges.filter(v=>l(v))),c=se(()=>[...s.value,...u.value]),d=se(()=>e.nodes.filter(v=>v.selected)),f=se(()=>e.edges.filter(v=>v.selected)),h=se(()=>[...d.value??[],...f.value??[]]),E=se(()=>s.value.filter(v=>v.initialized&&v.handleBounds!==void 0)),g=se(()=>s.value.length>0&&E.value.length===s.value.length);return{getNode:o,getEdge:i,getElements:c,getEdgeTypes:r,getNodeTypes:a,getEdges:u,getNodes:s,getSelectedElements:h,getSelectedNodes:d,getSelectedEdges:f,getNodesInitialized:E,areNodesInitialized:g}}class Et{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){return Et.instance||(Et.instance=new Et),Et.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Ma(),i=Mr(o),r={};for(const[f,h]of Object.entries(i.hooks)){const E=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;r[E]=h.on}const a={};for(const[f,h]of Object.entries(i.hooks))a[f]=h.trigger;const s=se(()=>i.nodes.map(f=>f.id)),l=se(()=>i.edges.map(f=>f.id)),u=Af(i,s,l),c=ef(t,i,u,s,l);c.setState({...i,...n});const d={...r,...u,...c,...Ts(i),emits:a,id:t,vueFlowVersion:"1.31.0",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function _e(e){const t=Et.getInstance(),n=Er(),o=e==null?void 0:e.id,i=(n==null?void 0:n.vueFlowId)||o;let r;if(n){const a=zt(Di,null);typeof a<"u"&&a!==null&&(r=a)}if(r||i&&(r=t.get(i)),!r||r&&o&&o!==r.id){const a=o??t.getId(),s=t.create(a,e);r=s,xr().run(()=>{ge(s.applyDefault,(l,u,c)=>{const d=h=>{s.applyNodeChanges(h)},f=h=>{s.applyEdgeChanges(h)};l?(s.onNodesChange(d),s.onEdgesChange(f)):(s.hooks.value.nodesChange.off(d),s.hooks.value.edgesChange.off(f)),c(()=>{s.hooks.value.nodesChange.off(d),s.hooks.value.edgesChange.off(f)})},{immediate:!0}),Xn(()=>{if(r){const l=t.get(r.id);l?l.$destroy():Qn(`No store instance found for id ${r.id} in storage.`)}})})}else e&&r.setState(e);return n&&($t(Di,r),n.vueFlowId=r.id),r}function Tf(e){const t=ei(),{emits:n,dimensions:o}=_e();let i;wt(()=>{const r=e.value,a=()=>{if(!r)return;const s=Jn(r);(s.width===0||s.height===0)&&n.error(new Ce(Me.MISSING_VIEWPORT_DIMENSIONS)),o.value={width:s.width||500,height:s.height||500}};a(),t.addEventListener("resize",a),r&&(i=new ResizeObserver(()=>a()),i.observe(r)),Xo(()=>{t.removeEventListener("resize",a),i&&r&&i.unobserve(r)})})}const If={name:"UserSelection",compatConfig:{MODE:3}},Pf=he({...If,props:{userSelectionRect:{}},setup(e){return(t,n)=>(G(),oe("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Df=["tabIndex"],zf={name:"NodesSelection",compatConfig:{MODE:3}},Of=he({...zf,setup(e){const t=_e(),n=Ne(t,"emits"),o=Ne(t,"viewport"),i=Ne(t,"getSelectedNodes"),r=Ne(t,"noPanClassName"),a=Ne(t,"disableKeyboardA11y"),s=Ne(t,"userSelectionActive"),l=ha(),u=fe(null),c=ua({el:u,onStart(g){n.value.selectionDragStart(g)},onDrag(g){n.value.selectionDrag(g)},onStop(g){n.value.selectionDragStop(g)}});wt(()=>{var g;a.value||(g=u.value)==null||g.focus({preventScroll:!0})});const d=se(()=>wa(i.value)),f=se(()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`}));function h(g){n.value.selectionContextMenu({event:g,nodes:i.value})}function E(g){a.value||kt[g.key]&&l({x:kt[g.key].x,y:kt[g.key].y},g.shiftKey)}return(g,v)=>!s.value&&d.value.width&&d.value.height?(G(),oe("div",{key:0,class:je(["vue-flow__nodesselection vue-flow__container",r.value]),style:ze({transform:`translate(${o.value.x}px,${o.value.y}px) scale(${o.value.zoom})`})},[de("div",{ref_key:"el",ref:u,class:je([{dragging:C(c)},"vue-flow__nodesselection-rect"]),style:ze(f.value),tabIndex:a.value?void 0:-1,onContextmenu:h,onKeydown:E},null,46,Df)],6)):we("",!0)}});function tr(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Bf={name:"Pane",compatConfig:{MODE:3}},Vf=he({...Bf,props:{isSelecting:{type:Boolean}},setup(e){const{vueFlowRef:t,getNodes:n,getEdges:o,viewport:i,emits:r,userSelectionActive:a,removeSelectedElements:s,panOnDrag:l,userSelectionRect:u,elementsSelectable:c,nodesSelectionActive:d,addSelectedElements:f,getSelectedEdges:h,getSelectedNodes:E,removeNodes:g,removeEdges:v,selectionMode:b,deleteKeyCode:y,multiSelectionKeyCode:S,multiSelectionActive:x}=_e(),M=fe(null),z=fe(0),w=fe(0),H=fe(),R=$e(()=>c.value&&(e.isSelecting||a.value));qt(y,k=>{if(!k)return;const A=n.value.reduce((W,ee)=>((!ee.selected&&ee.parentNode&&W.find(L=>L.id===ee.parentNode)||ee.selected)&&W.push(ee),W),[]);(A||h.value)&&(h.value.length>0&&v(h.value),A.length>0&&g(A),d.value=!1,s())}),qt(S,k=>{x.value=k});function X(){a.value=!1,u.value=null,z.value=0,w.value=0}function O(k){k.target!==M.value||R.value||(r.paneClick(k),s(),d.value=!1)}function j(k){var A;if(k.target===M.value){if(Array.isArray(l.value)&&((A=l.value)!=null&&A.includes(2))){k.preventDefault();return}r.paneContextMenu(k)}}function U(k){k.target===M.value&&r.paneScroll(k)}function m(k){if(H.value=t.value.getBoundingClientRect(),!R.value||!c||!e.isSelecting||k.button!==0||k.target!==M.value||!H.value)return;const{x:A,y:W}=tr(k,H.value);s(),u.value={width:0,height:0,startX:A,startY:W,x:A,y:W},a.value=!0,r.selectionStart(k)}function T(k){if(!R.value)return r.paneMouseMove(k);if(!e.isSelecting||!H.value||!u.value)return;a.value||(a.value=!0),d.value&&(d.value=!1);const A=tr(k,H.value),W=u.value.startX??0,ee=u.value.startY??0,L={...u.value,x:A.x<W?A.x:W,y:A.y<ee?A.y:ee,width:Math.abs(A.x-W),height:Math.abs(A.y-ee)},J=ba(n.value,u.value,i.value,b.value===jo.Partial),ue=ti(J,o.value);z.value=J.length,w.value=ue.length,u.value=L,f([...J,...ue])}function N(k){R.value&&k.button===0&&(!a.value&&u.value&&k.target===M.value&&O(k),d.value=z.value>0,X(),r.selectionEnd(k))}function I(k){var A;if(!R.value)return r.paneMouseLeave(k);a.value&&(d.value=z.value>0,(A=r.selectionEnd)==null||A.call(r,k)),X()}function B(k){R.value||r.paneMouseEnter(k)}return(k,A)=>(G(),oe("div",{ref_key:"container",ref:M,class:je(["vue-flow__pane vue-flow__container",{selection:k.isSelecting}]),onClick:O,onContextmenu:j,onWheelPassive:U,onMouseenter:B,onMousedown:m,onMousemove:T,onMouseup:N,onMouseleave:I},[ye(k.$slots,"default"),C(a)&&C(u)?(G(),be(Pf,{key:0,"user-selection-rect":C(u)},null,8,["user-selection-rect"])):we("",!0),C(d)&&C(E).length?(G(),be(Of,{key:1})):we("",!0)],34))}}),Rf={name:"Transform",compatConfig:{MODE:3}},Hf=he({...Rf,setup(e){const{viewport:t}=_e();return(n,o)=>(G(),oe("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:`translate(${C(t).x}px,${C(t).y}px) scale(${C(t).zoom})`})},[ye(n.$slots,"default")],4))}}),Ff={name:"Viewport",compatConfig:{MODE:3}},Lf=he({...Ff,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:r,selectionKeyCode:a,panActivationKeyCode:s,panOnScroll:l,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:E,preventScrolling:g,noWheelClassName:v,noPanClassName:b,emits:y,connectionStartHandle:S,userSelectionActive:x,paneDragging:M,d3Zoom:z,d3Selection:w,d3ZoomHandler:H,viewport:R,viewportRef:X}=_e();Tf(X);const O=fe(!1),j=fe(!1);let U=null,m=!1,T=0,N={x:0,y:0,zoom:0};const I=qt(s),B=qt(a),k=qt(r),A=$e(()=>I.value||d.value),W=$e(()=>I.value||l.value),ee=$e(()=>B.value||a.value===!0&&A.value!==!0);wt(()=>{if(!X.value){Qn("Viewport element is missing");return}const K=X.value,Z=K.getBoundingClientRect(),te=hd().scaleExtent([t.value,n.value]).translateExtent(i.value),ne=Oe(K).call(te),le=ne.on("wheel.zoom"),me=It.translate(o.value.x??0,o.value.y??0).scale(mt(o.value.zoom??1,t.value,n.value)),ve=[[0,0],[Z.width,Z.height]],_=te.constrain()(me,ve,i.value);te.transform(ne,_),te.wheelDelta(J),z.value=te,w.value=ne,H.value=le,R.value={x:_.x,y:_.y,zoom:_.k},te.on("start",p=>{var P;if(!p.sourceEvent)return null;T=p.sourceEvent.button,O.value=!0;const $=D(p.transform);((P=p.sourceEvent)==null?void 0:P.type)==="mousedown"&&(M.value=!0),N=$,y.viewportChangeStart($),y.moveStart({event:p,flowTransform:$})}),te.on("end",p=>{if(!p.sourceEvent)return null;if(O.value=!1,M.value=!1,L(A.value,T??0)&&!m&&y.paneContextMenu(p.sourceEvent),m=!1,ue(N,p.transform)){const P=D(p.transform);N=P,y.viewportChangeEnd(P),y.moveEnd({event:p,flowTransform:P})}}),te.filter(p=>{var P,$;const V=k.value||E.value,Y=h.value&&p.ctrlKey;if((A.value===!0||Array.isArray(A.value)&&A.value.includes(1))&&p.button===1&&p.type==="mousedown"&&((P=p.target)!=null&&P.closest(".vue-flow__node")||($=p.target)!=null&&$.closest(".vue-flow__edge")))return!0;if(!A.value&&!V&&!W.value&&!f.value&&!h.value||x.value||!f.value&&p.type==="dblclick"||ie(p,v.value)&&p.type==="wheel"||ie(p,b.value)&&(p.type!=="wheel"||W.value&&p.type==="wheel"&&!k.value)||!h.value&&p.ctrlKey&&p.type==="wheel"||!V&&!W.value&&!Y&&p.type==="wheel"||!A.value&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(A.value)&&!A.value.includes(p.button)&&(p.type==="mousedown"||p.type==="touchstart"))return!1;const q=Array.isArray(A.value)&&A.value.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||p.type==="wheel")&&q}),ge([x,A],()=>{x.value&&!O.value?te.on("zoom",null):x.value||te.on("zoom",p=>{R.value={x:p.transform.x,y:p.transform.y,zoom:p.transform.k};const P=D(p.transform);m=L(A.value,T??0),y.viewportChange(P),y.move({event:p,flowTransform:P})})},{immediate:!0}),ge([x,W,u,k,h,g,v],()=>{W.value&&!k.value&&!x.value?ne.on("wheel.zoom",p=>{if(ie(p,v.value))return!1;p.preventDefault(),p.stopImmediatePropagation();const P=ne.property("__zoom").k||1,$=On();if(p.ctrlKey&&h.value&&$){const ce=Le(p),Se=J(p),ke=P*2**Se;te.scaleTo(ne,ke,ce,p);return}const V=p.deltaMode===1?20:1;let Y=u.value===Zt.Vertical?0:p.deltaX*V,q=u.value===Zt.Horizontal?0:p.deltaY*V;!$&&p.shiftKey&&u.value!==Zt.Vertical&&!Y&&q&&(Y=q,q=0),te.translateBy(ne,-(Y/P)*c.value,-(q/P)*c.value);const re=D(ne.property("__zoom"));U&&clearTimeout(U),j.value?(y.move({event:p,flowTransform:re}),y.viewportChange(re),U=setTimeout(()=>{y.moveEnd({event:p,flowTransform:re}),y.viewportChangeEnd(re),j.value=!1},150)):(j.value=!0,y.moveStart({event:p,flowTransform:re}),y.viewportChangeStart(re))},{passive:!1}):typeof le<"u"&&ne.on("wheel.zoom",function(p,P){if(!g.value||ie(p,v.value))return null;p.preventDefault(),le.call(this,p,P)},{passive:!1})},{immediate:!0})});function L(K,Z){return Z===2&&Array.isArray(K)&&K.includes(2)}function J(K){const Z=K.ctrlKey&&On()?10:1;return-K.deltaY*(K.deltaMode===1?.05:K.deltaMode?1:.002)*Z}function ue(K,Z){return K.x!==Z.x&&!Number.isNaN(Z.x)||K.y!==Z.y&&!Number.isNaN(Z.y)||K.zoom!==Z.k&&!Number.isNaN(Z.k)}function D(K){return{x:K.x,y:K.y,zoom:K.k}}function ie(K,Z){return K.target.closest(`.${Z}`)}return(K,Z)=>(G(),oe("div",{ref_key:"viewportRef",ref:X,class:"vue-flow__viewport vue-flow__container"},[xe(Vf,{"is-selecting":C(ee),class:je({connecting:!!C(S),dragging:C(M),draggable:C(A)})},{default:Ie(()=>[xe(Hf,null,{default:Ie(()=>[ye(K.$slots,"default")]),_:3})]),_:3},8,["is-selecting","class"])],512))}}),Gf=["id"],Yf=["id"],Xf=["id"],Uf={name:"A11yDescriptions",compatConfig:{MODE:3}},Zf=he({...Uf,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=_e();return(i,r)=>(G(),oe(at,null,[de("div",{id:`${C(aa)}-${C(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Ge(C(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,Gf),de("div",{id:`${C(sa)}-${C(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Yf),C(n)?we("",!0):(G(),oe("div",{key:0,id:`${C(md)}-${C(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Ge(C(o)),9,Xf))],64))}});function qf(){const e=_e();ge(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Wf(e,t,n){return n===Q.Left?e-t:n===Q.Right?e+t:e}function Kf(e,t,n){return n===Q.Top?e-t:n===Q.Bottom?e+t:e}const ri=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=Q.Top,type:i}){return pe("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:Wf(t,e,o),cy:Kf(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};ri.props=["radius","centerX","centerY","position","type"];ri.compatConfig={MODE:3};const nr=ri,Jf=he({name:"Edge",compatConfig:{MODE:3},props:["name","type","id","updatable","selectable","focusable","edge"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:r,nodesSelectionActive:a,noPanClassName:s,getEdgeTypes:l,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:f,multiSelectionActive:h}=_e(),E=bd(e.edge,r),g=Ut(e,"edge"),v=fe(!1),b=fe(!1),y=fe(""),S=fe(null),x=fe("source"),M=fe(null);$t(yd,e.id),$t(_d,M);const z=se(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),w=se(()=>g.value.style instanceof Function?g.value.style(g.value):g.value.style),{handlePointerDown:H}=fa({nodeId:y,handleId:S,type:x,isValidConnection:f,edgeUpdaterType:x,onEdgeUpdate:O,onEdgeUpdateEnd:j});return()=>{const L=d(g.value.source),J=d(g.value.target);if(!L&&!J)return r.error(new Ce(Me.EDGE_SOURCE_TARGET_MISSING,g.value.id,g.value.source,g.value.target)),null;if(!L)return r.error(new Ce(Me.EDGE_SOURCE_MISSING,g.value.id,g.value.source)),null;if(!J)return r.error(new Ce(Me.EDGE_TARGET_MISSING,g.value.id,g.value.target)),null;if(!g||L.hidden||J.hidden)return null;let ue;o.value===vt.Strict?ue=L.handleBounds.source:ue=[...L.handleBounds.source||[],...L.handleBounds.target||[]];const D=Yi(ue,g.value.sourceHandle);let ie;o.value===vt.Strict?ie=J.handleBounds.target:ie=[...J.handleBounds.target||[],...J.handleBounds.source||[]];const K=Yi(ie,g.value.targetHandle),Z=D?D.position:Q.Bottom,te=K?K.position:Q.Top,{sourceX:ne,sourceY:le,targetY:me,targetX:ve}=Ld(L,D,Z,J,K,te);return g.value.sourceX=ne,g.value.sourceY=le,g.value.targetX=ve,g.value.targetY=me,pe("g",{ref:M,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${e.type===!1?"default":e.name}`,s.value,z.value,{updating:v.value,selected:g.value.selected,animated:g.value.animated,inactive:!e.selectable}],onClick:m,onContextmenu:T,onDblclick:N,onMouseenter:I,onMousemove:B,onMouseleave:k,onKeyDown:e.focusable?ee:void 0,tabIndex:e.focusable?0:void 0,"aria-label":g.value.ariaLabel===null?void 0:g.value.ariaLabel||`Edge from ${g.value.source} to ${g.value.target}`,"aria-describedby":e.focusable?`${sa}-${t}`:void 0,role:e.focusable?"button":"img"},[b.value?null:pe(e.type===!1?l.value.default:e.type,{id:e.id,sourceNode:L,targetNode:J,source:g.value.source,target:g.value.target,type:g.value.type,updatable:e.updatable,selected:g.value.selected,animated:g.value.animated,label:g.value.label,labelStyle:g.value.labelStyle,labelShowBg:g.value.labelShowBg,labelBgStyle:g.value.labelBgStyle,labelBgPadding:g.value.labelBgPadding,labelBgBorderRadius:g.value.labelBgBorderRadius,data:g.value.data,events:{...g.value.events,...E.on},style:w.value,markerStart:`url(#${ut(g.value.markerStart,t)})`,markerEnd:`url(#${ut(g.value.markerEnd,t)})`,sourcePosition:Z,targetPosition:te,sourceX:ne,sourceY:le,targetX:ve,targetY:me,sourceHandleId:g.value.sourceHandle,targetHandleId:g.value.targetHandle,interactionWidth:g.value.interactionWidth}),[e.updatable==="source"||e.updatable===!0?[pe("g",{onMousedown:A,onMouseenter:R,onMouseout:X},pe(nr,{position:Z,centerX:ne,centerY:le,radius:i.value,type:"source","data-type":"source"}))]:null,e.updatable==="target"||e.updatable===!0?[pe("g",{onMousedown:W,onMouseenter:R,onMouseout:X},pe(nr,{position:te,centerX:ve,centerY:me,radius:i.value,type:"target","data-type":"target"}))]:null]])};function R(){v.value=!0}function X(){v.value=!1}function O(L,J){E.emit.update({event:L,edge:g.value,connection:J})}function j(L){E.emit.updateEnd({event:L,edge:g.value}),b.value=!1}function U(L,J){L.button===0&&(b.value=!0,y.value=J?g.value.target:g.value.source,S.value=(J?g.value.targetHandle:g.value.sourceHandle)??"",x.value=J?"target":"source",E.emit.updateStart({event:L,edge:g.value}),H(L))}function m(L){var J;const ue={event:L,edge:g.value};e.selectable&&(a.value=!1,g.value.selected&&h.value?(u([g.value]),(J=M.value)==null||J.blur()):n([g.value])),E.emit.click(ue)}function T(L){E.emit.contextMenu({event:L,edge:g.value})}function N(L){E.emit.doubleClick({event:L,edge:g.value})}function I(L){E.emit.mouseEnter({event:L,edge:g.value})}function B(L){E.emit.mouseMove({event:L,edge:g.value})}function k(L){E.emit.mouseLeave({event:L,edge:g.value})}function A(L){U(L,!0)}function W(L){U(L,!1)}function ee(L){var J;la.includes(L.key)&&e.selectable&&(L.key==="Escape"?((J=M.value)==null||J.blur(),u([c(e.id)])):n([c(e.id)]))}}}),Qf=Jf,jf={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top},eh=he({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:r,connectionLineType:a,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:u,viewport:c,findNode:d}=_e(),f=(e=zt(Kn))==null?void 0:e["connection-line"];return()=>{var h,E,g,v,b;if(!o.value)return null;const y=d(o.value.nodeId);if(!y)return null;const S=o.value.handleId,x=o.value.type,M=((h=i.value)==null?void 0:h.handleId)&&d(i.value.nodeId)||null,z=(r.value.x-c.value.x)/c.value.zoom,w=(r.value.y-c.value.y)/c.value.zoom,H=y.handleBounds;let R=H==null?void 0:H[x];if(n.value===vt.Loose&&(R=R||(H==null?void 0:H[x==="source"?"target":"source"])),!R)return null;const X=(S?R.find(k=>k.id===S):R[0])??null,O=(X==null?void 0:X.position)||Q.Top,{x:j,y:U}=zo(O,{...y.dimensions,...y.computedPosition},X),m=M&&((E=i.value)==null?void 0:E.handleId)&&((n.value===vt.Strict?(g=M.handleBounds[x==="source"?"target":"source"])==null?void 0:g.find(k=>{var A;return k.id===((A=i.value)==null?void 0:A.handleId)}):(v=[...M.handleBounds.source||[],...M.handleBounds.target||[]])==null?void 0:v.find(k=>{var A;return k.id===((A=i.value)==null?void 0:A.handleId)}))||((b=M.handleBounds[x??"target"])==null?void 0:b[0]))||null,T=O?jf[O]:null;if(!O||!T)return null;const N=a.value??l.value.type??st.Bezier;let I="";const B={sourceX:j,sourceY:U,sourcePosition:O,targetX:z,targetY:w,targetPosition:T};return N===st.Bezier?[I]=$a(B):N===st.Step?[I]=Bo({...B,borderRadius:0}):N===st.SmoothStep?[I]=Bo(B):N===st.SimpleBezier?[I]=Aa(B):I=`M${j},${U} ${z},${w}`,pe("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},pe("g",{class:"vue-flow__connection"},f?pe(f,{sourceX:j,sourceY:U,sourcePosition:O,targetX:z,targetY:w,targetPosition:T,sourceNode:y,sourceHandle:X,targetNode:M,targetHandle:m,markerEnd:`url(#${ut(l.value.markerEnd,t)})`,markerStart:`url(#${ut(l.value.markerStart,t)})`,connectionStatus:u.value}):pe("path",{d:I,class:[l.value.class,u,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":`url(#${ut(l.value.markerEnd,t)})`,"marker-start":`url(#${ut(l.value.markerStart,t)})`})))}}}),th=eh,nh=["id","markerWidth","markerHeight","markerUnits","orient"],oh={name:"MarkerType",compatConfig:{MODE:3}},ih=he({...oh,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(G(),oe("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===C(To).ArrowClosed?(G(),oe("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):we("",!0),t.type===C(To).Arrow?(G(),oe("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):we("",!0)],8,nh))}}),rh={name:"MarkerDefinitions",compatConfig:{MODE:3}},ah=he({...rh,setup(e){const t=_e(),n=Ne(t,"id"),o=Ne(t,"edges"),i=Ne(t,"connectionLineOptions"),r=Ne(t,"defaultMarkerColor"),a=se(()=>{const s=[],l=[],u=c=>{if(c){const d=ut(c,n.value);s.includes(d)||(typeof c=="object"?l.push({...c,id:d,color:c.color||r.value}):l.push({id:d,color:r.value,type:c}),s.push(d))}};for(const c of[i.value.markerEnd,i.value.markerStart])u(c);return o.value.reduce((c,d)=>{for(const f of[d.markerStart,d.markerEnd])u(f);return c.sort((f,h)=>f.id.localeCompare(h.id))},l),l});return(s,l)=>(G(),oe("defs",null,[(G(!0),oe(at,null,Yo(a.value,u=>(G(),be(ih,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))]))}}),sh={class:"vue-flow__edges vue-flow__container"},lh={name:"Edges",compatConfig:{MODE:3}},uh=he({...lh,setup(e){const t=zt(Kn),{edgesUpdatable:n,edgesFocusable:o,elementsSelectable:i,findNode:r,getEdges:a,getEdgeTypes:s,elevateEdgesOnSelect:l,dimensions:u,emits:c}=_e(),d=Uo();function f(v){return typeof v>"u"?i.value:v}function h(v){return typeof v>"u"?n.value:v}function E(v){return typeof v>"u"?o.value:v}function g(v,b){const y=v||"default",S=t==null?void 0:t[`edge-${y}`];if(S)return S;let x=b??s.value[y];if(typeof x=="string"&&d){const M=Object.keys(d.appContext.components);M&&M.includes(y)&&(x=kr(y,!1))}return x&&typeof x!="string"?x:(c.error(new Ce(Me.EDGE_TYPE_MISSING,x)),!1)}return(v,b)=>C(u).width&&C(u).height?(G(),oe(at,{key:0},[(G(),oe("svg",sh,[xe(ah)])),(G(!0),oe(at,null,Yo(C(a),y=>(G(),oe("svg",{key:y.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:C(Yd)(y,C(r),C(l))})},[xe(C(Qf),{id:y.id,edge:y,type:g(y.type,y.template),name:y.type||"default",selectable:f(y.selectable),updatable:h(y.updatable),focusable:E(y.focusable)},null,8,["id","edge","type","name","selectable","updatable","focusable"])],4))),128)),xe(C(th))],64)):we("",!0)}}),ch=he({name:"Node",compatConfig:{MODE:3},props:["name","type","id","draggable","selectable","focusable","connectable","node","resizeObserver"],setup(e){$t(ca,e.id);const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:r,emits:a,findNode:s,removeSelectedNodes:l,addSelectedNodes:u,updateNodeDimensions:c,onUpdateNodeInternals:d,getIntersectingNodes:f,getNodeTypes:h,nodeExtent:E,elevateNodesOnSelect:g,disableKeyboardA11y:v,ariaLiveMessage:b,snapToGrid:y,snapGrid:S,nodeDragThreshold:x,getConnectedEdges:M}=_e(),z=ha(),w=Ut(e,"node"),H=se(()=>{var D;return s((D=w.value)==null?void 0:D.parentNode)}),R=se(()=>M(w.value?[w.value]:[])),X=fe(null);$t(da,X);const{emit:O,on:j}=Md(w.value,a),U=ua({id:e.id,el:X,disabled:()=>!e.draggable,selectable:()=>e.selectable,dragHandle:()=>w.value.dragHandle,onStart(D){O.dragStart({...D,intersections:f(w.value)})},onDrag(D){O.drag({...D,intersections:f(w.value)})},onStop(D){O.dragStop({...D,intersections:f(w.value)})}}),m=se(()=>w.value.class instanceof Function?w.value.class(w.value):w.value.class),T=se(()=>{const D=(w.value.style instanceof Function?w.value.style(w.value):w.value.style)||{},ie=w.value.width instanceof Function?w.value.width(w.value):w.value.width,K=w.value.height instanceof Function?w.value.height(w.value):w.value.height;return ie&&(D.width=typeof ie=="string"?ie:`${ie}px`),K&&(D.height=typeof K=="string"?K:`${K}px`),D}),N=$e(()=>Number(w.value.zIndex??T.value.zIndex??0));return d(D=>{D.includes(e.id)&&B()}),wt(()=>{e.resizeObserver.observe(X.value)}),Xo(()=>{e.resizeObserver.unobserve(X.value)}),ge([()=>w.value.type,()=>w.value.sourcePosition,()=>w.value.targetPosition],()=>{Ye(()=>{c([{id:e.id,nodeElement:X.value,forceUpdate:!0}])})}),ge([()=>w.value.position.x,()=>w.value.position.y,()=>{var D;return(D=H.value)==null?void 0:D.computedPosition.x},()=>{var D;return(D=H.value)==null?void 0:D.computedPosition.y},()=>{var D;return(D=H.value)==null?void 0:D.computedPosition.z},N,()=>w.value.selected,()=>w.value.dimensions.height,()=>w.value.dimensions.width,()=>{var D;return(D=H.value)==null?void 0:D.dimensions.height},()=>{var D;return(D=H.value)==null?void 0:D.dimensions.width}],([D,ie,K,Z,te,ne])=>{const le={x:D,y:ie,z:ne+(g.value&&w.value.selected?1e3:0)};typeof K<"u"&&typeof Z<"u"?w.value.computedPosition=Bd({x:K,y:Z,z:te},le):w.value.computedPosition=le},{flush:"post",immediate:!0}),ge([()=>w.value.extent,E],([D,ie],[K,Z])=>{(D!==K||ie!==Z)&&I()}),w.value.extent==="parent"||typeof w.value.extent=="object"&&"range"in w.value.extent&&w.value.extent.range==="parent"?$n(()=>w.value.initialized).toBe(!0).then(I):I(),()=>pe("div",{ref:X,"data-id":w.value.id,class:["vue-flow__node",`vue-flow__node-${e.type===!1?"default":e.name}`,{[n.value]:e.draggable,dragging:U==null?void 0:U.value,selected:w.value.selected,selectable:e.selectable,parent:w.value.isParent},m.value],style:{visibility:w.value.initialized?"visible":"hidden",zIndex:w.value.computedPosition.z??N.value,transform:`translate(${w.value.computedPosition.x}px,${w.value.computedPosition.y}px)`,pointerEvents:e.selectable||e.draggable?"all":"none",...T.value},tabIndex:e.focusable?0:void 0,role:e.focusable?"button":void 0,"aria-describedby":v.value?void 0:`${aa}-${t}`,"aria-label":w.value.ariaLabel,onMouseenter:k,onMousemove:A,onMouseleave:W,onContextmenu:ee,onClick:J,onDblclick:L,onKeydown:ue},[pe(e.type===!1?h.value.default:e.type,{id:w.value.id,type:w.value.type,data:w.value.data,events:{...w.value.events,...j},selected:w.value.selected,resizing:w.value.resizing,dragging:U.value,connectable:e.connectable,position:w.value.computedPosition,dimensions:w.value.dimensions,isValidTargetPos:w.value.isValidTargetPos,isValidSourcePos:w.value.isValidSourcePos,parent:w.value.parentNode,parentNodeId:w.value.parentNode,zIndex:w.value.computedPosition.z??N.value,targetPosition:w.value.targetPosition,sourcePosition:w.value.sourcePosition,label:w.value.label,dragHandle:w.value.dragHandle,onUpdateNodeInternals:B})]);function I(){const D=w.value.computedPosition;y.value&&(D.x=S.value[0]*Math.round(D.x/S.value[0]),D.y=S.value[1]*Math.round(D.y/S.value[1]));const{computedPosition:ie,position:K}=ni(w.value,D,a.error,E.value,H.value);(w.value.computedPosition.x!==ie.x||w.value.computedPosition.y!==ie.y)&&(w.value.computedPosition={...w.value.computedPosition,...ie}),(w.value.position.x!==K.x||w.value.position.y!==K.y)&&(w.value.position=K)}function B(){X.value&&c([{id:e.id,nodeElement:X.value,forceUpdate:!0}])}function k(D){U!=null&&U.value||O.mouseEnter({event:D,node:w.value,connectedEdges:R.value})}function A(D){U!=null&&U.value||O.mouseMove({event:D,node:w.value,connectedEdges:R.value})}function W(D){U!=null&&U.value||O.mouseLeave({event:D,node:w.value,connectedEdges:R.value})}function ee(D){return O.contextMenu({event:D,node:w.value,connectedEdges:R.value})}function L(D){return O.doubleClick({event:D,node:w.value,connectedEdges:R.value})}function J(D){e.selectable&&(!o.value||!e.draggable||x.value>0)&&Oo(w.value,r.value,u,l,i,!1,X.value),O.click({event:D,node:w.value,connectedEdges:R.value})}function ue(D){if(!Io(D))if(la.includes(D.key)&&e.selectable){const ie=D.key==="Escape";Oo(w.value,r.value,u,l,i,ie,X.value)}else!v.value&&e.draggable&&w.value.selected&&kt[D.key]&&(b.value=`Moved selected node ${D.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~w.value.position.x}, y: ${~~w.value.position.y}`,z({x:kt[D.key].x,y:kt[D.key].y},D.shiftKey))}}}),dh=ch,fh={height:"0",width:"0"},hh={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},e0=he({...hh,setup(e){const{viewportRef:t}=_e(),n=$e(()=>{var o;return(o=t.value)==null?void 0:o.getElementsByClassName("vue-flow__edge-labels")[0]});return(o,i)=>(G(),oe("svg",null,[(G(),oe("foreignObject",fh,[(G(),be(is,{to:C(n),disabled:!C(n)},[ye(o.$slots,"default")],8,["to","disabled"]))]))]))}}),gh={class:"vue-flow__nodes vue-flow__container"},ph={name:"Nodes",compatConfig:{MODE:3}},vh=he({...ph,setup(e){const t=zt(Kn),{nodesDraggable:n,nodesFocusable:o,elementsSelectable:i,nodesConnectable:r,getNodes:a,getNodesInitialized:s,areNodesInitialized:l,getNodeTypes:u,updateNodeDimensions:c,emits:d}=_e(),f=fe(),h=Uo();Is(()=>l.value,()=>{Ye(()=>{d.nodesInitialized(s.value)})}),wt(()=>{f.value=new ResizeObserver(S=>{const x=S.map(M=>({id:M.target.getAttribute("data-id"),nodeElement:M.target,forceUpdate:!0}));Ye(()=>c(x))})}),Xo(()=>{var S;return(S=f.value)==null?void 0:S.disconnect()});function E(S){return typeof S>"u"?n.value:S}function g(S){return typeof S>"u"?i.value:S}function v(S){return typeof S>"u"?r.value:S}function b(S){return typeof S>"u"?o.value:S}function y(S,x){const M=S||"default",z=t==null?void 0:t[`node-${M}`];if(z)return z;let w=x??u.value[M];if(typeof w=="string"&&h){const H=Object.keys(h.appContext.components);H&&H.includes(M)&&(w=kr(M,!1))}return w&&typeof w!="string"?w:(d.error(new Ce(Me.NODE_TYPE_MISSING,w)),!1)}return(S,x)=>(G(),oe("div",gh,[f.value?(G(!0),oe(at,{key:0},Yo(C(a),M=>(G(),be(C(dh),{id:M.id,key:M.id,"resize-observer":f.value,type:y(M.type,M.template),name:M.type||"default",draggable:E(M.draggable),selectable:g(M.selectable),connectable:v(M.connectable),focusable:b(M.focusable),node:M},null,8,["id","resize-observer","type","name","draggable","selectable","connectable","focusable","node"]))),128)):we("",!0)]))}}),mh=de("div",{class:"vue-flow__edge-labels"},null,-1),yh={name:"VueFlow",compatConfig:{MODE:3}},t0=he({...yh,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},__experimentalFeatures:{}},emits:["nodesChange","edgesChange","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","nodesInitialized","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","init","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","updateNodeInternals","error","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=rs(),r=Ut(o,"modelValue",n),a=Ut(o,"nodes",n),s=Ut(o,"edges",n),{vueFlowRef:l,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f}=_e(o),h=$d({modelValue:r,nodes:a,edges:s},o,{vueFlowRef:l,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f});return Qd(n,u),qf(),$t(Kn,i),br(()=>{h()}),t({vueFlowRef:l,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f}),(E,g)=>(G(),oe("div",{ref_key:"vueFlowRef",ref:l,class:"vue-flow"},[xe(Lf,null,{default:Ie(()=>[xe(uh),mh,xe(vh),ye(E.$slots,"zoom-pane")]),_:3}),ye(E.$slots,"default"),xe(Zf)],512))}}),_h=["x","y","width","height"],wh=["stroke","stroke-width","d"],bh=["cx","cy","r","fill"],xh={key:2,height:"100",width:"100"},Eh=["fill"],Sh=["x","y","fill"],Nh={name:"Background"},n0=he({...Nh,props:{variant:{default:()=>"dots"},gap:{default:10},size:{default:.4},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0}},setup(e){const t={dots:"#81818a",lines:"#eee"},{id:n,viewport:o}=_e(),i=se(()=>{const l=e.gap&&e.gap*o.value.zoom,u=l&&o.value.x%l,c=l&&o.value.y%l,d=e.size*o.value.zoom;return{scaledGap:l,xOffset:u,yOffset:c,size:d}}),r=`pattern-${n}`,a=se(()=>e.patternColor||t[e.variant||"dots"]),s=se(()=>`M${i.value.scaledGap/2} 0 V${i.value.scaledGap} M0 ${i.value.scaledGap/2} H${i.value.scaledGap}`);return(l,u)=>(G(),oe("svg",{class:"vue-flow__background",style:ze({height:`${e.height>100?100:e.height}%`,width:`${e.width>100?100:e.width}%`})},[ye(l.$slots,"pattern-container",{id:r},()=>[de("pattern",{id:r,x:i.value.xOffset,y:i.value.yOffset,width:i.value.scaledGap,height:i.value.scaledGap,patternUnits:"userSpaceOnUse"},[ye(l.$slots,"pattern",{},()=>[e.variant==="lines"?(G(),oe("path",{key:0,stroke:C(a),"stroke-width":e.size,d:C(s)},null,8,wh)):e.variant==="dots"?(G(),oe("circle",{key:1,cx:i.value.size,cy:i.value.size,r:i.value.size,fill:C(a)},null,8,bh)):we("",!0),e.bgColor?(G(),oe("svg",xh,[de("rect",{width:"100%",height:"100%",fill:e.bgColor},null,8,Eh)])):we("",!0)])],8,_h)]),de("rect",{x:e.x,y:e.y,width:"100%",height:"100%",fill:`url(#${r})`},null,8,Sh),ye(l.$slots,"default",{id:r})],4))}}),oo=he({__name:"Panel",props:{position:null},setup(e){const t=e,{userSelectionActive:n}=_e(),o=se(()=>`${t.position}`.split("-"));return(i,r)=>(G(),oe("div",{class:je(["vue-flow__panel",C(o)]),style:ze({pointerEvents:C(n)?"none":"all"})},[ye(i.$slots,"default")],6))}});var io=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(io||{});const Mh={name:"ControlButton"},kh=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Ch={class:"vue-flow__controls-button"};function $h(e,t,n,o,i,r){return G(),oe("button",Ch,[ye(e.$slots,"default")])}const mn=kh(Mh,[["render",$h]]),Ah={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Th=de("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),Ih=[Th];function Ph(e,t){return G(),oe("svg",Ah,Ih)}const Dh={render:Ph},zh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Oh=de("path",{d:"M0 0h32v4.2H0z"},null,-1),Bh=[Oh];function Vh(e,t){return G(),oe("svg",zh,Bh)}const Rh={render:Vh},Hh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Fh=de("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),Lh=[Fh];function Gh(e,t){return G(),oe("svg",Hh,Lh)}const Yh={render:Gh},Xh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Uh=de("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),Zh=[Uh];function qh(e,t){return G(),oe("svg",Xh,Zh)}const Wh={render:qh},Kh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Jh=de("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),Qh=[Jh];function jh(e,t){return G(),oe("svg",Kh,Qh)}const eg={render:jh},tg={name:"Controls"},o0=he({...tg,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:()=>"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const n=_e(),o=Ne(n,"nodesDraggable"),i=Ne(n,"nodesConnectable"),r=Ne(n,"elementsSelectable"),a=Ne(n,"setInteractive"),s=Ne(n,"zoomIn"),l=Ne(n,"zoomOut"),u=Ne(n,"fitView"),c=se(()=>o.value&&i.value&&r.value),d=()=>{s.value(),t("zoomIn")},f=()=>{l.value(),t("zoomOut")},h=()=>{u.value(e.fitViewParams),t("fitView")},E=()=>{a.value(!c.value),t("interactionChange",!c.value)};return(g,v)=>(G(),be(C(oo),{class:"vue-flow__controls",position:e.position},{default:Ie(()=>[ye(g.$slots,"top"),e.showZoom?(G(),oe(at,{key:0},[ye(g.$slots,"control-zoom-in",{},()=>[xe(mn,{class:"vue-flow__controls-zoomin",onClick:d},{default:Ie(()=>[ye(g.$slots,"icon-zoom-in",{},()=>[(G(),be(rt(C(Dh))))])]),_:3})]),ye(g.$slots,"control-zoom-out",{},()=>[xe(mn,{class:"vue-flow__controls-zoomout",onClick:f},{default:Ie(()=>[ye(g.$slots,"icon-zoom-out",{},()=>[(G(),be(rt(C(Rh))))])]),_:3})])],64)):we("",!0),e.showFitView?ye(g.$slots,"control-fit-view",{key:1},()=>[xe(mn,{class:"vue-flow__controls-fitview",onClick:h},{default:Ie(()=>[ye(g.$slots,"icon-fit-view",{},()=>[(G(),be(rt(C(Yh))))])]),_:3})]):we("",!0),e.showInteractive?ye(g.$slots,"control-interactive",{key:2},()=>[e.showInteractive?(G(),be(mn,{key:0,class:"vue-flow__controls-interactive",onClick:E},{default:Ie(()=>[C(c)?ye(g.$slots,"icon-unlock",{key:0},()=>[(G(),be(rt(C(eg))))]):we("",!0),C(c)?we("",!0):ye(g.$slots,"icon-lock",{key:1},()=>[(G(),be(rt(C(Wh))))])]),_:3})):we("",!0)]):we("",!0),ye(g.$slots,"default")]),_:3},8,["position"]))}});var ng={value:()=>{}};function Ia(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Mn(n)}function Mn(e){this._=e}function og(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Mn.prototype=Ia.prototype={constructor:Mn,on:function(e,t){var n=this._,o=og(e+"",n),i,r=-1,a=o.length;if(arguments.length<2){for(;++r<a;)if((i=(e=o[r]).type)&&(i=ig(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(i=(e=o[r]).type)n[i]=or(n[i],e.name,t);else if(t==null)for(i in n)n[i]=or(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Mn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function ig(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function or(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=ng,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Vo="http://www.w3.org/1999/xhtml";const ir={svg:"http://www.w3.org/2000/svg",xhtml:Vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ro(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ir.hasOwnProperty(t)?{space:ir[t],local:e}:e}function rg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Vo&&t.documentElement.namespaceURI===Vo?t.createElement(e):t.createElementNS(n,e)}}function ag(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pa(e){var t=ro(e);return(t.local?ag:rg)(t)}function sg(){}function ai(e){return e==null?sg:function(){return this.querySelector(e)}}function lg(e){typeof e!="function"&&(e=ai(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=new Array(a),l,u,c=0;c<a;++c)(l=r[c])&&(u=e.call(l,l.__data__,c,r))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Re(o,this._parents)}function ug(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function cg(){return[]}function Da(e){return e==null?cg:function(){return this.querySelectorAll(e)}}function dg(e){return function(){return ug(e.apply(this,arguments))}}function fg(e){typeof e=="function"?e=dg(e):e=Da(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a=t[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(o.push(e.call(l,l.__data__,u,a)),i.push(l));return new Re(o,i)}function za(e){return function(){return this.matches(e)}}function Oa(e){return function(t){return t.matches(e)}}var hg=Array.prototype.find;function gg(e){return function(){return hg.call(this.children,e)}}function pg(){return this.firstElementChild}function vg(e){return this.select(e==null?pg:gg(typeof e=="function"?e:Oa(e)))}var mg=Array.prototype.filter;function yg(){return Array.from(this.children)}function _g(e){return function(){return mg.call(this.children,e)}}function wg(e){return this.selectAll(e==null?yg:_g(typeof e=="function"?e:Oa(e)))}function bg(e){typeof e!="function"&&(e=za(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new Re(o,this._parents)}function Ba(e){return new Array(e.length)}function xg(){return new Re(this._enter||this._groups.map(Ba),this._parents)}function Vn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vn.prototype={constructor:Vn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Eg(e){return function(){return e}}function Sg(e,t,n,o,i,r){for(var a=0,s,l=t.length,u=r.length;a<u;++a)(s=t[a])?(s.__data__=r[a],o[a]=s):n[a]=new Vn(e,r[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function Ng(e,t,n,o,i,r,a){var s,l,u=new Map,c=t.length,d=r.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=a.call(l,l.__data__,s,t)+"",u.has(h)?i[s]=l:u.set(h,l));for(s=0;s<d;++s)h=a.call(e,r[s],s,r)+"",(l=u.get(h))?(o[s]=l,l.__data__=r[s],u.delete(h)):n[s]=new Vn(e,r[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function Mg(e){return e.__data__}function kg(e,t){if(!arguments.length)return Array.from(this,Mg);var n=t?Ng:Sg,o=this._parents,i=this._groups;typeof e!="function"&&(e=Eg(e));for(var r=i.length,a=new Array(r),s=new Array(r),l=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],f=d.length,h=Cg(e.call(c,c&&c.__data__,u,o)),E=h.length,g=s[u]=new Array(E),v=a[u]=new Array(E),b=l[u]=new Array(f);n(c,d,g,v,b,h,t);for(var y=0,S=0,x,M;y<E;++y)if(x=g[y]){for(y>=S&&(S=y+1);!(M=v[S])&&++S<E;);x._next=M||null}}return a=new Re(a,o),a._enter=s,a._exit=l,a}function Cg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $g(){return new Re(this._exit||this._groups.map(Ba),this._parents)}function Ag(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function Tg(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=o[l],d=u.length,f=s[l]=new Array(d),h,E=0;E<d;++E)(h=u[E]||c[E])&&(f[E]=h);for(;l<i;++l)s[l]=n[l];return new Re(s,this._parents)}function Ig(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],a;--i>=0;)(a=o[i])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function Pg(e){e||(e=Dg);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a=n[r],s=a.length,l=i[r]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Re(i,this._parents).order()}function Dg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function zg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Og(){return Array.from(this)}function Bg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null}function Vg(){let e=0;for(const t of this)++e;return e}function Rg(){return!this.node()}function Hg(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,a=i.length,s;r<a;++r)(s=i[r])&&e.call(s,s.__data__,r,i);return this}function Fg(e){return function(){this.removeAttribute(e)}}function Lg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gg(e,t){return function(){this.setAttribute(e,t)}}function Yg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ug(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Zg(e,t){var n=ro(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Lg:Fg:typeof t=="function"?n.local?Ug:Xg:n.local?Yg:Gg)(n,t))}function Va(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qg(e){return function(){this.style.removeProperty(e)}}function Wg(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Kg(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Jg(e,t,n){return arguments.length>1?this.each((t==null?qg:typeof t=="function"?Kg:Wg)(e,t,n??"")):Pt(this.node(),e)}function Pt(e,t){return e.style.getPropertyValue(t)||Va(e).getComputedStyle(e,null).getPropertyValue(t)}function Qg(e){return function(){delete this[e]}}function jg(e,t){return function(){this[e]=t}}function ep(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function tp(e,t){return arguments.length>1?this.each((t==null?Qg:typeof t=="function"?ep:jg)(e,t)):this.node()[e]}function Ra(e){return e.trim().split(/^|\s+/)}function si(e){return e.classList||new Ha(e)}function Ha(e){this._node=e,this._names=Ra(e.getAttribute("class")||"")}Ha.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Fa(e,t){for(var n=si(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function La(e,t){for(var n=si(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function np(e){return function(){Fa(this,e)}}function op(e){return function(){La(this,e)}}function ip(e,t){return function(){(t.apply(this,arguments)?Fa:La)(this,e)}}function rp(e,t){var n=Ra(e+"");if(arguments.length<2){for(var o=si(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ip:t?np:op)(n,t))}function ap(){this.textContent=""}function sp(e){return function(){this.textContent=e}}function lp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function up(e){return arguments.length?this.each(e==null?ap:(typeof e=="function"?lp:sp)(e)):this.node().textContent}function cp(){this.innerHTML=""}function dp(e){return function(){this.innerHTML=e}}function fp(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hp(e){return arguments.length?this.each(e==null?cp:(typeof e=="function"?fp:dp)(e)):this.node().innerHTML}function gp(){this.nextSibling&&this.parentNode.appendChild(this)}function pp(){return this.each(gp)}function vp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mp(){return this.each(vp)}function yp(e){var t=typeof e=="function"?e:Pa(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function _p(){return null}function wp(e,t){var n=typeof e=="function"?e:Pa(e),o=t==null?_p:typeof t=="function"?t:ai(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function bp(){var e=this.parentNode;e&&e.removeChild(this)}function xp(){return this.each(bp)}function Ep(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sp(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Np(e){return this.select(e?Sp:Ep)}function Mp(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kp(e){return function(t){e.call(this,t,this.__data__)}}function Cp(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function $p(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function Ap(e,t,n){return function(){var o=this.__on,i,r=kp(t);if(o){for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function Tp(e,t,n){var o=Cp(e+""),i,r=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<r;++i)if((a=o[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?Ap:$p,i=0;i<r;++i)this.each(s(o[i],t,n));return this}function Ga(e,t,n){var o=Va(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Ip(e,t){return function(){return Ga(this,e,t)}}function Pp(e,t){return function(){return Ga(this,e,t.apply(this,arguments))}}function Dp(e,t){return this.each((typeof t=="function"?Pp:Ip)(e,t))}function*zp(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,a;i<r;++i)(a=o[i])&&(yield a)}var Op=[null];function Re(e,t){this._groups=e,this._parents=t}function sn(){return new Re([[document.documentElement]],Op)}function Bp(){return this}Re.prototype=sn.prototype={constructor:Re,select:lg,selectAll:fg,selectChild:vg,selectChildren:wg,filter:bg,data:kg,enter:xg,exit:$g,join:Ag,merge:Tg,selection:Bp,order:Ig,sort:Pg,call:zg,nodes:Og,node:Bg,size:Vg,empty:Rg,each:Hg,attr:Zg,style:Jg,property:tp,classed:rp,text:up,html:hp,raise:pp,lower:mp,append:yp,insert:wp,remove:xp,clone:Np,datum:Mp,on:Tp,dispatch:Dp,[Symbol.iterator]:zp};function li(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ya(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function ln(){}var en=.7,Rn=1/en,Ct="\\s*([+-]?\\d+)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vp=/^#([0-9a-f]{3,8})$/,Rp=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),Hp=new RegExp(`^rgb\\(${Ue},${Ue},${Ue}\\)$`),Fp=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${tn}\\)$`),Lp=new RegExp(`^rgba\\(${Ue},${Ue},${Ue},${tn}\\)$`),Gp=new RegExp(`^hsl\\(${tn},${Ue},${Ue}\\)$`),Yp=new RegExp(`^hsla\\(${tn},${Ue},${Ue},${tn}\\)$`),rr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};li(ln,nn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ar,formatHex:ar,formatHex8:Xp,formatHsl:Up,formatRgb:sr,toString:sr});function ar(){return this.rgb().formatHex()}function Xp(){return this.rgb().formatHex8()}function Up(){return Xa(this).formatHsl()}function sr(){return this.rgb().formatRgb()}function nn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Vp.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?lr(t):n===3?new Te(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Rp.exec(e))?new Te(t[1],t[2],t[3],1):(t=Hp.exec(e))?new Te(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fp.exec(e))?yn(t[1],t[2],t[3],t[4]):(t=Lp.exec(e))?yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gp.exec(e))?dr(t[1],t[2]/100,t[3]/100,1):(t=Yp.exec(e))?dr(t[1],t[2]/100,t[3]/100,t[4]):rr.hasOwnProperty(e)?lr(rr[e]):e==="transparent"?new Te(NaN,NaN,NaN,0):null}function lr(e){return new Te(e>>16&255,e>>8&255,e&255,1)}function yn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Te(e,t,n,o)}function Zp(e){return e instanceof ln||(e=nn(e)),e?(e=e.rgb(),new Te(e.r,e.g,e.b,e.opacity)):new Te}function Ro(e,t,n,o){return arguments.length===1?Zp(e):new Te(e,t,n,o??1)}function Te(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}li(Te,Ro,Ya(ln,{brighter(e){return e=e==null?Rn:Math.pow(Rn,e),new Te(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?en:Math.pow(en,e),new Te(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Te(gt(this.r),gt(this.g),gt(this.b),Hn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ur,formatHex:ur,formatHex8:qp,formatRgb:cr,toString:cr}));function ur(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}`}function qp(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}${ct((isNaN(this.opacity)?1:this.opacity)*255)}`}function cr(){const e=Hn(this.opacity);return`${e===1?"rgb(":"rgba("}${gt(this.r)}, ${gt(this.g)}, ${gt(this.b)}${e===1?")":`, ${e})`}`}function Hn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ct(e){return e=gt(e),(e<16?"0":"")+e.toString(16)}function dr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,n,o)}function Xa(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof ln||(e=nn(e)),!e)return new Ve;if(e instanceof Ve)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,s=r-i,l=(r+i)/2;return s?(t===r?a=(n-o)/s+(n<o)*6:n===r?a=(o-t)/s+2:a=(t-n)/s+4,s/=l<.5?r+i:2-r-i,a*=60):s=l>0&&l<1?0:a,new Ve(a,s,l,e.opacity)}function Wp(e,t,n,o){return arguments.length===1?Xa(e):new Ve(e,t,n,o??1)}function Ve(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}li(Ve,Wp,Ya(ln,{brighter(e){return e=e==null?Rn:Math.pow(Rn,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?en:Math.pow(en,e),new Ve(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Te(wo(e>=240?e-240:e+120,i,o),wo(e,i,o),wo(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ve(fr(this.h),_n(this.s),_n(this.l),Hn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Hn(this.opacity);return`${e===1?"hsl(":"hsla("}${fr(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fr(e){return e=(e||0)%360,e<0?e+360:e}function _n(e){return Math.max(0,Math.min(1,e||0))}function wo(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ua=e=>()=>e;function Kp(e,t){return function(n){return e+n*t}}function Jp(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Qp(e){return(e=+e)==1?Za:function(t,n){return n-t?Jp(t,n,e):Ua(isNaN(t)?n:t)}}function Za(e,t){var n=t-e;return n?Kp(e,n):Ua(isNaN(e)?t:e)}const hr=function e(t){var n=Qp(t);function o(i,r){var a=n((i=Ro(i)).r,(r=Ro(r)).r),s=n(i.g,r.g),l=n(i.b,r.b),u=Za(i.opacity,r.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return o.gamma=e,o}(1);function it(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ho=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bo=new RegExp(Ho.source,"g");function jp(e){return function(){return e}}function ev(e){return function(t){return e(t)+""}}function tv(e,t){var n=Ho.lastIndex=bo.lastIndex=0,o,i,r,a=-1,s=[],l=[];for(e=e+"",t=t+"";(o=Ho.exec(e))&&(i=bo.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(o=o[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:it(o,i)})),n=bo.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?ev(l[0].x):jp(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}var gr=180/Math.PI,qa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wa(e,t,n,o,i,r){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,l/=s),e*o<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*gr,skewX:Math.atan(l)*gr,scaleX:a,scaleY:s}}var wn;function nv(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qa:Wa(t.a,t.b,t.c,t.d,t.e,t.f)}function ov(e){return e==null||(wn||(wn=document.createElementNS("http://www.w3.org/2000/svg","g")),wn.setAttribute("transform",e),!(e=wn.transform.baseVal.consolidate()))?qa:(e=e.matrix,Wa(e.a,e.b,e.c,e.d,e.e,e.f))}function Ka(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);E.push({i:g-4,x:it(u,d)},{i:g-2,x:it(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:it(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:it(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function l(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");E.push({i:g-4,x:it(u,d)},{i:g-2,x:it(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var E=-1,g=f.length,v;++E<g;)d[(v=f[E]).i]=v.x(h);return d.join("")}}}var iv=Ka(nv,"px, ","px)","deg)"),rv=Ka(ov,", ",")",")"),av=1e-12;function pr(e){return((e=Math.exp(e))+1/e)/2}function sv(e){return((e=Math.exp(e))-1/e)/2}function lv(e){return((e=Math.exp(2*e))-1)/(e+1)}(function e(t,n,o){function i(r,a){var s=r[0],l=r[1],u=r[2],c=a[0],d=a[1],f=a[2],h=c-s,E=d-l,g=h*h+E*E,v,b;if(g<av)b=Math.log(f/u)/t,v=function(w){return[s+w*h,l+w*E,u*Math.exp(t*w*b)]};else{var y=Math.sqrt(g),S=(f*f-u*u+o*g)/(2*u*n*y),x=(f*f-u*u-o*g)/(2*f*n*y),M=Math.log(Math.sqrt(S*S+1)-S),z=Math.log(Math.sqrt(x*x+1)-x);b=(z-M)/t,v=function(w){var H=w*b,R=pr(M),X=u/(n*y)*(R*lv(t*H+M)-sv(M));return[s+X*h,l+X*E,u*R/pr(t*H+M)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return i.rho=function(r){var a=Math.max(.001,+r),s=a*a,l=s*s;return e(a,s,l)},i})(Math.SQRT2,2,4);var Dt=0,Gt=0,Ht=0,Ja=1e3,Fn,Yt,Ln=0,_t=0,ao=0,on=typeof performance=="object"&&performance.now?performance:Date,Qa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ui(){return _t||(Qa(uv),_t=on.now()+ao)}function uv(){_t=0}function Gn(){this._call=this._time=this._next=null}Gn.prototype=ja.prototype={constructor:Gn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ui():+n)+(t==null?0:+t),!this._next&&Yt!==this&&(Yt?Yt._next=this:Fn=this,Yt=this),this._call=e,this._time=n,Fo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fo())}};function ja(e,t,n){var o=new Gn;return o.restart(e,t,n),o}function cv(){ui(),++Dt;for(var e=Fn,t;e;)(t=_t-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dt}function vr(){_t=(Ln=on.now())+ao,Dt=Gt=0;try{cv()}finally{Dt=0,fv(),_t=0}}function dv(){var e=on.now(),t=e-Ln;t>Ja&&(ao-=t,Ln=e)}function fv(){for(var e,t=Fn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Fn=n);Yt=e,Fo(o)}function Fo(e){if(!Dt){Gt&&(Gt=clearTimeout(Gt));var t=e-_t;t>24?(e<1/0&&(Gt=setTimeout(vr,e-on.now()-ao)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Ln=on.now(),Ht=setInterval(dv,Ja)),Dt=1,Qa(vr))}}function mr(e,t,n){var o=new Gn;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var hv=Ia("start","end","cancel","interrupt"),gv=[],es=0,yr=1,Lo=2,kn=3,_r=4,Go=5,Cn=6;function so(e,t,n,o,i,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;pv(e,n,{name:t,index:o,group:i,on:hv,tween:gv,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:es})}function ci(e,t){var n=Fe(e,t);if(n.state>es)throw new Error("too late; already scheduled");return n}function qe(e,t){var n=Fe(e,t);if(n.state>kn)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function pv(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=ja(r,0,n.time);function r(u){n.state=yr,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==yr)return l();for(c in o)if(h=o[c],h.name===n.name){if(h.state===kn)return mr(a);h.state===_r?(h.state=Cn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Cn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(mr(function(){n.state===kn&&(n.state=_r,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Lo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Lo){for(n.state=kn,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Go,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Go&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Cn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function vv(e,t){var n=e.__transition,o,i,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){r=!1;continue}i=o.state>Lo&&o.state<Go,o.state=Cn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}r&&delete e.__transition}}function mv(e){return this.each(function(){vv(this,e)})}function yv(e,t){var n,o;return function(){var i=qe(this,e),r=i.tween;if(r!==n){o=n=r;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function _v(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=qe(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}r.tween=i}}function wv(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Fe(this.node(),n).tween,i=0,r=o.length,a;i<r;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((t==null?yv:_v)(n,e,t))}function di(e,t,n){var o=e._id;return e.each(function(){var i=qe(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,o).value[t]}}function ts(e,t){var n;return(typeof t=="number"?it:t instanceof nn?hr:(n=nn(t))?(t=n,hr):tv)(e,t)}function bv(e){return function(){this.removeAttribute(e)}}function xv(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ev(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttribute(e);return a===i?null:a===o?r:r=t(o=a,n)}}function Sv(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?r:r=t(o=a,n)}}function Nv(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function Mv(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function kv(e,t){var n=ro(e),o=n==="transform"?rv:ts;return this.attrTween(e,typeof t=="function"?(n.local?Mv:Nv)(n,o,di(this,"attr."+e,t)):t==null?(n.local?xv:bv)(n):(n.local?Sv:Ev)(n,o,t))}function Cv(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function $v(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Av(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&$v(e,r)),n}return i._value=t,i}function Tv(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Cv(e,r)),n}return i._value=t,i}function Iv(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=ro(e);return this.tween(n,(o.local?Av:Tv)(o,t))}function Pv(e,t){return function(){ci(this,e).delay=+t.apply(this,arguments)}}function Dv(e,t){return t=+t,function(){ci(this,e).delay=t}}function zv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Pv:Dv)(t,e)):Fe(this.node(),t).delay}function Ov(e,t){return function(){qe(this,e).duration=+t.apply(this,arguments)}}function Bv(e,t){return t=+t,function(){qe(this,e).duration=t}}function Vv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ov:Bv)(t,e)):Fe(this.node(),t).duration}function Rv(e,t){if(typeof t!="function")throw new Error;return function(){qe(this,e).ease=t}}function Hv(e){var t=this._id;return arguments.length?this.each(Rv(t,e)):Fe(this.node(),t).ease}function Fv(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;qe(this,e).ease=n}}function Lv(e){if(typeof e!="function")throw new Error;return this.each(Fv(this._id,e))}function Gv(e){typeof e!="function"&&(e=za(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new tt(o,this._parents,this._name,this._id)}function Yv(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),s=0;s<r;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<o;++s)a[s]=t[s];return new tt(a,this._parents,this._name,this._id)}function Xv(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Uv(e,t,n){var o,i,r=Xv(t)?ci:qe;return function(){var a=r(this,e),s=a.on;s!==o&&(i=(o=s).copy()).on(t,n),a.on=i}}function Zv(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(Uv(n,e,t))}function qv(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Wv(){return this.on("end.remove",qv(this._id))}function Kv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ai(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var s=o[a],l=s.length,u=r[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,so(u[f],t,n,f,u,Fe(c,n)));return new tt(r,this._parents,t,n)}function Jv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Da(e));for(var o=this._groups,i=o.length,r=[],a=[],s=0;s<i;++s)for(var l=o[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,E=Fe(c,n),g=0,v=f.length;g<v;++g)(h=f[g])&&so(h,t,n,g,f,E);r.push(f),a.push(c)}return new tt(r,a,t,n)}var Qv=sn.prototype.constructor;function jv(){return new Qv(this._groups,this._parents)}function em(e,t){var n,o,i;return function(){var r=Pt(this,e),a=(this.style.removeProperty(e),Pt(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}function ns(e){return function(){this.style.removeProperty(e)}}function tm(e,t,n){var o,i=n+"",r;return function(){var a=Pt(this,e);return a===i?null:a===o?r:r=t(o=a,n)}}function nm(e,t,n){var o,i,r;return function(){var a=Pt(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Pt(this,e))),a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s))}}function om(e,t){var n,o,i,r="style."+t,a="end."+r,s;return function(){var l=qe(this,e),u=l.on,c=l.value[r]==null?s||(s=ns(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(a,i=c),l.on=o}}function im(e,t,n){var o=(e+="")=="transform"?iv:ts;return t==null?this.styleTween(e,em(e,o)).on("end.style."+e,ns(e)):typeof t=="function"?this.styleTween(e,nm(e,o,di(this,"style."+e,t))).each(om(this._id,e)):this.styleTween(e,tm(e,o,t),n).on("end.style."+e,null)}function rm(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function am(e,t,n){var o,i;function r(){var a=t.apply(this,arguments);return a!==i&&(o=(i=a)&&rm(e,a,n)),o}return r._value=t,r}function sm(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,am(e,t,n??""))}function lm(e){return function(){this.textContent=e}}function um(e){return function(){var t=e(this);this.textContent=t??""}}function cm(e){return this.tween("text",typeof e=="function"?um(di(this,"text",e)):lm(e==null?"":e+""))}function dm(e){return function(t){this.textContent=e.call(this,t)}}function fm(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&dm(i)),t}return o._value=e,o}function hm(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,fm(e))}function gm(){for(var e=this._name,t=this._id,n=os(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Fe(l,t);so(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tt(o,this._parents,e,n)}function pm(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--i===0&&r()}};n.each(function(){var u=qe(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&r()})}var vm=0;function tt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function os(){return++vm}var Ke=sn.prototype;tt.prototype={constructor:tt,select:Kv,selectAll:Jv,selectChild:Ke.selectChild,selectChildren:Ke.selectChildren,filter:Gv,merge:Yv,selection:jv,transition:gm,call:Ke.call,nodes:Ke.nodes,node:Ke.node,size:Ke.size,empty:Ke.empty,each:Ke.each,on:Zv,attr:kv,attrTween:Iv,style:im,styleTween:sm,text:cm,textTween:hm,remove:Wv,tween:wv,delay:zv,duration:Vv,ease:Hv,easeVarying:Lv,end:pm,[Symbol.iterator]:Ke[Symbol.iterator]};function mm(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ym={time:null,delay:0,duration:250,ease:mm};function _m(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function wm(e){var t,n;e instanceof tt?(t=e._id,e=e._name):(t=os(),(n=ym).time=ui(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&so(l,e,t,u,a,n||_m(l,t));return new tt(o,this._parents,e,t)}sn.prototype.interrupt=mv;sn.prototype.transition=wm;function Xt(e,t,n){this.k=e,this.x=t,this.y=n}Xt.prototype={constructor:Xt,scale:function(e){return e===1?this:new Xt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Xt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Xt.prototype;const bm={class:"nc-icon",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},xm=de("path",{fill:"currentColor",d:"M3 21v-5h2v3h3v2zm13 0v-2h3v-3h2v5zM3 8V3h5v2H5v3zm16 0V5h-3V3h5v5z"},null,-1),Em=[xm];function Sm(e,t){return G(),oe("svg",bm,[...Em])}const Nm={name:"material-symbols-fullscreen",render:Sm},Mm={class:"nc-icon",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},km=de("path",{fill:"currentColor",d:"M6 21v-3H3v-2h5v5zm10 0v-5h5v2h-3v3zM3 8V6h3V3h2v5zm13 0V3h2v3h3v2z"},null,-1),Cm=[km];function $m(e,t){return G(),oe("svg",Mm,[...Cm])}const Am={name:"material-symbols-fullscreen-exit",render:$m},Tm={class:"flex"},Im=he({__name:"FullScreenToggle",props:{config:{}},emits:["toggleFullScreen"],setup(e,{emit:t}){const n=e,o=t,{config:i}=Cr(n),r=()=>{o("toggleFullScreen")};return(a,s)=>(G(),be(C(oo),{class:"text-xs bg-white border-1 rounded-md p-2 border-gray-200 z-50 nc-erd-histogram cursor-pointer hover:bg-gray-100 shadow-md",position:C(io).BottomRight},{default:Ie(()=>[de("div",Tm,[C(i).isFullScreen?(G(),be(C(Am),{key:0,class:"h-5 w-5",onClick:r})):(G(),be(C(Nm),{key:1,class:"h-5 w-5",onClick:r}))])]),_:1},8,["position"]))}}),Pm={class:"flex items-center gap-2"},Dm={class:"flex items-center gap-2"},zm={class:"select-none nc-erd-config-option-label"},Om={key:0,class:"flex items-center gap-2"},Bm={class:"select-none nc-erd-config-option-label"},Vm={key:1,class:"flex flex-row items-center"},Rm={class:"ml-2 select-none nc-erd-config-option-label"},Hm={key:2,class:"flex items-center gap-2"},Fm={class:"select-none nc-erd-config-option-label"},Lm=he({__name:"ConfigPanel",props:{config:{}},setup(e){const t=e,{includeM2M:n}=cs(),o=ds(t,"config"),i=fe(!1);return(r,a)=>{const s=Es,l=fs("e");return G(),be(C(oo),{class:"flex flex-col gap-y-1 bg-white border-1 rounded-lg border-gray-200 z-50 px-3 py-2 nc-erd-context-menu shadow-md",position:C(io).TopRight},{default:Ie(()=>[de("div",Pm,[Bt(xe(s,{checked:C(o).showAllColumns,"onUpdate:checked":a[0]||(a[0]=u=>C(o).showAllColumns=u),class:"nc-erd-showColumns-checkbox"},null,8,["checked"]),[[l,["c:erd:showAllColumns"]]]),de("span",{class:"select-none nc-erd-config-option-label nc-erd-showColumns-label text-xs",onDblclick:a[1]||(a[1]=u=>i.value=!0)},Ge(r.$t("activity.erd.showColumns")),33)]),de("div",Dm,[Bt(xe(s,{checked:C(o).showPkAndFk,"onUpdate:checked":a[2]||(a[2]=u=>C(o).showPkAndFk=u),class:je(["nc-erd-showPkAndFk-checkbox",[`nc-erd-showPkAndFk-checkbox-${C(o).showAllColumns?"enabled":"disabled"}`,`nc-erd-showPkAndFk-checkbox-${C(o).showPkAndFk?"checked":"unchecked"}`]]),disabled:!C(o).showAllColumns},null,8,["checked","class","disabled"]),[[l,["c:erd:showPkAndFk"]]]),de("span",zm,Ge(r.$t("activity.erd.showPkAndFk")),1)]),C(o).singleTableMode?we("",!0):(G(),oe("div",Om,[Bt(xe(s,{checked:C(o).showViews,"onUpdate:checked":a[3]||(a[3]=u=>C(o).showViews=u),class:"nc-erd-showViews-checkbox"},null,8,["checked"]),[[l,["c:erd:showViews"]]]),de("span",Bm,Ge(r.$t("activity.erd.showSqlViews")),1)])),!C(o).singleTableMode&&C(i)&&C(n)?(G(),oe("div",Vm,[Bt(xe(s,{checked:C(o).showMMTables,"onUpdate:checked":a[4]||(a[4]=u=>C(o).showMMTables=u),class:"nc-erd-showMMTables-checkbox"},null,8,["checked"]),[[l,["c:erd:showMMTables"]]]),de("span",Rm,Ge(r.$t("activity.erd.showMMTables")),1)])):we("",!0),C(i)&&C(n)?(G(),oe("div",Hm,[Bt(xe(s,{checked:C(o).showJunctionTableNames,"onUpdate:checked":a[5]||(a[5]=u=>C(o).showJunctionTableNames=u),class:"nc-erd-showJunctionTableNames-checkbox"},null,8,["checked"]),[[l,["c:erd:showJunctionTableNames"]]]),de("span",Fm,Ge(r.$t("activity.erd.showJunctionTableNames")),1)])):we("",!0)]),_:1},8,["position"])}}}),Gm=hs(Lm,[["__scopeId","data-v-86453fd1"]]),Ym={class:"flex flex-col"},Xm={class:"flex items-center gap-1.5 p-2"},Um={class:"flex items-center gap-1.5 p-2"},Zm=he({__name:"HistogramPanel",setup(e){return(t,n)=>(G(),be(C(oo),{class:"text-xs bg-white border-1 rounded border-gray-200 shadow-md p-1.5 z-50 nc-erd-histogram",position:C(io).TopLeft},{default:Ie(()=>[de("div",Ym,[de("div",Xm,[(G(),be(rt(("iconMap"in t?t.iconMap:C(fi)).table),{class:"!text-gray-600/75"})),de("div",null,Ge(t.$t("objects.table")),1)]),de("div",Um,[(G(),be(rt(("iconMap"in t?t.iconMap:C(fi)).eye))),de("div",null,Ge(t.$t("objects.sqlVIew")),1)])])]),_:1},8,["position"]))}}),qm=ws(()=>bs(()=>import("./D_qsPe1a.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url).then(e=>e.default||e)),Wm={class:"relative h-full"},Km={class:"h-full w-full flex flex-col justify-center items-center"},i0=he({__name:"View",props:{sourceId:{type:String,default:""},table:{type:Object,default:null},showAllColumns:{type:Boolean,default:!0},baseId:{type:String,default:void 0}},setup(e){const t=e,{bases:n}=lo(gs()),{base:o}=lo(ps()),i=se(()=>t.baseId??o.value.id),r=vs(),{baseTables:a}=lo(r),s=se(()=>a.value.get(i.value)??[]),l=se(()=>{var y;return((y=n.value.get(i.value))==null?void 0:y.sources)||[]}),{metas:u,getMeta:c}=ms(),d=fe([]),f=fe(!0),h=Mr({showPkAndFk:!0,showViews:!1,showAllColumns:t.showAllColumns,singleTableMode:!!t.table,showMMTables:!1,showJunctionTableNames:!1,isFullScreen:!1}),E=async y=>{const x=async z=>{await Promise.all(z.map(async w=>{await c(w.id)}))},M=y.filter(z=>!u.value[z.id]&&z.source_id===t.sourceId);for(let z=0;z<M.length;z+=5){const w=M.slice(z,z+5);await x(w)}},g=async()=>{let y=[];if(t.table){const S=await c(t.table.id);y=s.value.filter(x=>{var M,z;return x.id===((M=t.table)==null?void 0:M.id)||((z=S.columns)==null?void 0:z.find(w=>{var H;return ys(w.uidt)&&((H=w.colOptions)==null?void 0:H.fk_related_model_id)===x.id}))})}else y=s.value;await E(y),d.value=y.filter(S=>{var x;return h.showMMTables||!h.showMMTables&&!S.mm||S.id===((x=t.table)==null?void 0:x.id)}).filter(S=>h.singleTableMode||!h.showViews&&S.type!=="view"||h.showViews),f.value=!1},v=()=>{h.isFullScreen=!h.isFullScreen};ge([u,s],g,{flush:"post",immediate:!0}),ge(h,g,{flush:"post",deep:!0});const b=se(()=>d.value.filter(y=>{var S;return t!=null&&t.sourceId?y.source_id===t.sourceId:y.source_id===((S=l.value)==null?void 0:S.filter(x=>x.enabled)[0].id)}));return ge(()=>h.showAllColumns,()=>{h.showPkAndFk=h.showAllColumns}),wt(async()=>{t.baseId&&(a.value.get(t.baseId)||await r.loadProjectTables(t.baseId))}),(y,S)=>{const x=_s,M=xs,z=Im,w=Gm,H=Zm,R=qm;return G(),oe("div",{class:je(["w-full bg-white border-1 border-gray-100 rounded-lg",{"z-100 h-screen w-screen fixed top-0 left-0 right-0 bottom-0":C(h).isFullScreen,"nc-erd-vue-flow-single-table":C(h).singleTableMode,"nc-erd-vue-flow":!C(h).singleTableMode}]),style:ze(C(h).isFullScreen?"":"height: inherit")},[de("div",Wm,[xe(R,{tables:C(b),config:C(h)},{default:Ie(()=>[xe(M,{modelValue:C(f),"onUpdate:modelValue":S[0]||(S[0]=X=>Yn(f)?f.value=X:null),inline:"",class:"bg-gray-300/50"},{default:Ie(()=>[de("div",Km,[xe(x,{size:"large"})])]),_:1},8,["modelValue"]),xe(z,{config:C(h),onToggleFullScreen:v},null,8,["config"]),xe(w,{config:C(h)},null,8,["config"]),C(h).singleTableMode?we("",!0):(G(),be(H,{key:0}))]),_:1},8,["tables","config"])])],6)}}});export{n0 as G,To as M,oo as O,Q as P,io as R,o0 as W,i0 as _,Bn as a,e0 as b,yt as c,t0 as d,$a as g,ft as i,_e as u};
|
22
|
+
Edge: ${e}`};class Ce extends Error{constructor(t,...n){var o;super((o=Xi[t])==null?void 0:o.call(Xi,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function oi(e){return"clientX"in e}function ht(e,t){var n,o;const i=oi(e),r=i?e.clientX:(n=e.touches)==null?void 0:n[0].clientX,a=i?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}}const On=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Na(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function _o(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Ui(e,t,n,o){return(t[n]||[]).reduce((i,r)=>{var a,s;return`${e.id}-${r.id}-${n}`!==o&&i.push({id:r.id||null,type:n,nodeId:e.id,x:(((a=e.computedPosition)==null?void 0:a.x)??0)+r.x+r.width/2,y:(((s=e.computedPosition)==null?void 0:s.y)??0)+r.y+r.height/2,width:r.width,height:r.height}),i},[])}function Xd(e,t,n,o,i,r){const{x:a,y:s}=ht(e),u=t.elementsFromPoint(a,s).find(E=>E.classList.contains("vue-flow__handle"));if(u){const E=u.getAttribute("data-nodeid");if(E){const g=ii(void 0,u),v=u.getAttribute("data-handleid"),b=r({nodeId:E,id:v,type:g});if(b){const y=i.find(S=>S.nodeId===E&&S.type===g&&S.id===v);return{handle:{id:v,type:g,nodeId:E,x:(y==null?void 0:y.x)||n.x,y:(y==null?void 0:y.y)||n.y},validHandleResult:b}}}}let c=[],d=Number.POSITIVE_INFINITY;for(const E of i){const g=Math.sqrt((E.x-n.x)**2+(E.y-n.y)**2);if(g<=o){const v=r(E);g<=d&&(g<d?c=[{handle:E,validHandleResult:v}]:g===d&&c.push({handle:E,validHandleResult:v}),d=g)}}if(!c.length)return{handle:null,validHandleResult:Na()};if(c.length===1)return c[0];const f=c.some(({validHandleResult:E})=>E.isValid),h=c.some(({handle:E})=>E.type==="target");return c.find(({handle:E,validHandleResult:g})=>h?E.type==="target":f?g.isValid:!0)||c[0]}function Zi(e,t,n,o,i,r,a,s,l,u,c){const d=r==="target",f=s.querySelector(`.vue-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:h,y:E}=ht(e),g=s.elementFromPoint(h,E),v=g!=null&&g.classList.contains("vue-flow__handle")?g:f,b=Na();if(v){b.handleDomNode=v;const y=ii(void 0,v),S=v.getAttribute("data-nodeid"),x=v.getAttribute("data-handleid"),M=v.classList.contains("connectable"),z=v.classList.contains("connectableend"),w={source:d?S:o,sourceHandle:d?x:i,target:d?o:S,targetHandle:d?i:x};b.connection=w;const R=M&&z&&(n===vt.Strict?d&&y==="source"||!d&&y==="target":S!==o||x!==i);b.endHandle={nodeId:S,handleId:x,type:y},R&&(b.isValid=a(w,{edges:l,nodes:u,sourceNode:c(w.source),targetNode:c(w.target)}))}return b}function Ud({nodes:e,nodeId:t,handleId:n,handleType:o}){return e.reduce((i,r)=>{const{handleBounds:a}=r;let s=[],l=[];return a&&(s=Ui(r,a,"source",`${t}-${n}-${o}`),l=Ui(r,a,"target",`${t}-${n}-${o}`)),i.push(...s,...l),i},[])}function ii(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Zd(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}const qd=["production","prod"];function Qn(e,...t){qd.includes("production")||console.warn(`[Vue Flow]: ${e}`,...t)}function qi(e,t,n){const o=t.querySelectorAll(`.vue-flow__handle${e}`);if(!o||!o.length)return;const i=Array.from(o),r=t.getBoundingClientRect();return i.map(a=>{const s=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),position:a.getAttribute("data-handlepos"),x:(s.left-r.left)/n,y:(s.top-r.top)/n,...Jn(a)}})}function Oo(e,t,n,o,i,r=!1,a){i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),Ye(()=>{a.blur()})):n([e])}function Ee(e){return typeof C(e)<"u"}function Wd(e,t,n,o){if(!e||!e.source||!e.target)return n(new Ce(Me.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let i;return yt(e)?i=e:i={...e,id:ma(e)},i=pa(i,void 0,o),Dd(i,t)?!1:i}function Kd(e,t,n,o,i,r){if(!t.source||!t.target)return r(new Ce(Me.EDGE_INVALID,e.id)),!1;const a=o(e.id);if(!a)return r(new Ce(Me.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...l}=e,u={...l,id:i?ma(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.splice(n.indexOf(a),1,u),u}function Wi(e,t,n,o){const i={},r=e.reduce((s,l,u)=>{if(!ft(l))return o(new Ce(Me.NODE_INVALID,l==null?void 0:l.id)||`[ID UNKNOWN|INDEX ${u}]`),s;const c=Td(l,n(l.id),l.parentNode);return l.parentNode&&(i[l.parentNode]=!0),s.concat(c)},[]),a=[...r,...t];for(const s of r){const l=a.find(u=>u.id===s.parentNode);s.parentNode&&!l&&o(new Ce(Me.NODE_MISSING_PARENT,s.id,s.parentNode)),(s.parentNode||i[s.id])&&(i[s.id]&&(s.isParent=!0),l&&(l.isParent=!0))}return r}function Ki(e,t){e.clear();for(const n of t){const{source:o,target:i,sourceHandle:r=null,targetHandle:a=null}=n,s=`${o}-source-${r}`,l=`${i}-target-${a}`,u=e.get(s)||new Map,c=e.get(l)||new Map,d=St({source:o,target:i,sourceHandle:r,targetHandle:a});e.set(s,u.set(`${i}-${a}`,d)),e.set(l,c.set(`${o}-${r}`,d))}}function Jd(){return{edgesChange:F(),nodesChange:F(),nodeDoubleClick:F(),nodeClick:F(),nodeMouseEnter:F(),nodeMouseMove:F(),nodeMouseLeave:F(),nodeContextMenu:F(),nodeDragStart:F(),nodeDrag:F(),nodeDragStop:F(),nodesInitialized:F(),miniMapNodeClick:F(),miniMapNodeDoubleClick:F(),miniMapNodeMouseEnter:F(),miniMapNodeMouseMove:F(),miniMapNodeMouseLeave:F(),connect:F(),connectStart:F(),connectEnd:F(),clickConnectStart:F(),clickConnectEnd:F(),paneReady:F(),init:F(),move:F(),moveStart:F(),moveEnd:F(),selectionDragStart:F(),selectionDrag:F(),selectionDragStop:F(),selectionContextMenu:F(),selectionStart:F(),selectionEnd:F(),viewportChangeStart:F(),viewportChange:F(),viewportChangeEnd:F(),paneScroll:F(),paneClick:F(),paneContextMenu:F(),paneMouseEnter:F(),paneMouseMove:F(),paneMouseLeave:F(),edgeContextMenu:F(),edgeMouseEnter:F(),edgeMouseMove:F(),edgeMouseLeave:F(),edgeDoubleClick:F(),edgeClick:F(),edgeUpdateStart:F(),edgeUpdate:F(),edgeUpdateEnd:F(),updateNodeInternals:F(),error:F(e=>Qn(e.message))}}function Qd(e,t){as(()=>{for(const[n,o]of Object.entries(t.value)){const i=r=>{e(n,r)};o.fns.add(i),Xn(()=>{o.off(i)})}})}function Ma(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:jo.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Zt.Free,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:st.Bezier,style:{}},connectionMode:vt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:On()?"Meta":"Control",zoomActivationKeyCode:On()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:Jd(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,disableKeyboardA11y:!1,ariaLiveMessage:"",__experimentalFeatures:{nestedFlow:!1}}}const jd=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function ef(e,t,n,o,i){const r=Cd(t,n),a=_=>{const p=_??o.value??[];t.hooks.updateNodeInternals.trigger(p)},s=_=>Pd(_,t.nodes,t.edges),l=_=>Id(_,t.nodes,t.edges),u=_=>ti(_,t.edges),c=_=>{if(_)return t.nodes&&!o.value.length?t.nodes.find(p=>p.id===_):t.nodes[o.value.indexOf(_)]},d=_=>{if(_)return t.edges&&!i.value.length?t.edges.find(p=>p.id===_):t.edges[i.value.indexOf(_)]},f=(_,p,P)=>{var $,V;const Y=[];for(const q of _){const re={id:q.id,type:"position",dragging:P,from:q.from};if(p&&(re.position=q.position,q.parentNode)){const ce=c(q.parentNode);re.position={x:re.position.x-((($=ce==null?void 0:ce.computedPosition)==null?void 0:$.x)??0),y:re.position.y-(((V=ce==null?void 0:ce.computedPosition)==null?void 0:V.y)??0)}}Y.push(re)}Y!=null&&Y.length&&t.hooks.nodesChange.trigger(Y)},h=_=>{if(!t.vueFlowRef)return;const p=t.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const P=window.getComputedStyle(p),{m22:$}=new window.DOMMatrixReadOnly(P.transform),V=_.reduce((Y,q)=>{const re=c(q.id);if(re){const ce=Jn(q.nodeElement);!!(ce.width&&ce.height&&(re.dimensions.width!==ce.width||re.dimensions.height!==ce.height||q.forceUpdate))&&(re.handleBounds.source=qi(".source",q.nodeElement,$),re.handleBounds.target=qi(".target",q.nodeElement,$),re.dimensions=ce,re.initialized=!0,Y.push({id:re.id,type:"dimensions",dimensions:ce}))}return Y},[]);!t.fitViewOnInitDone&&t.fitViewOnInit&&Ye(()=>{r.value.fitView(),t.fitViewOnInitDone=!0}),V.length&&t.hooks.nodesChange.trigger(V)},E=(_,p)=>{const P=_.map(Y=>Y.id);let $,V=[];if(t.multiSelectionActive)$=P.map(Y=>Je(Y,p));else{const Y=mo([...t.nodes,...t.edges],P);$=Y.changedNodes,V=Y.changedEdges}$.length&&t.hooks.nodesChange.trigger($),V.length&&t.hooks.edgesChange.trigger(V)},g=(_,p)=>{const P=_.map(Y=>Y.id);let $=[],V;if(t.multiSelectionActive)V=P.map(Y=>Je(Y,p));else{const Y=mo([...t.nodes,...t.edges],P);$=Y.changedNodes,V=Y.changedEdges}$.length&&t.hooks.nodesChange.trigger($),V.length&&t.hooks.edgesChange.trigger(V)},v=(_,p)=>{const P=_.filter(ft).map(q=>q.id),$=_.filter(yt).map(q=>q.id);let{changedNodes:V,changedEdges:Y}=mo([...t.nodes,...t.edges],[...P,...$]);t.multiSelectionActive&&(V=P.map(q=>Je(q,p)),Y=$.map(q=>Je(q,p))),V.length&&t.hooks.nodesChange.trigger(V),Y.length&&t.hooks.edgesChange.trigger(Y)},b=_=>{E(_,!0)},y=_=>{g(_,!0)},S=_=>{v(_,!0)},x=_=>{if(!_.length)return E(_,!1);const P=_.map($=>$.id).map($=>Je($,!1));P.length&&t.hooks.nodesChange.trigger(P)},M=_=>{if(!_.length)return g(_,!1);const P=_.map($=>$.id).map($=>Je($,!1));P.length&&t.hooks.edgesChange.trigger(P)},z=_=>{if(!_||!_.length)return v([],!1);const p=_.reduce((P,$)=>{const V=Je($.id,!1);return ft($)?P.nodes.push(V):P.edges.push(V),P},{nodes:[],edges:[]});p.nodes.length&&t.hooks.nodesChange.trigger(p.nodes),p.edges.length&&t.hooks.edgesChange.trigger(p.edges)},w=_=>{var p;(p=t.d3Zoom)==null||p.scaleExtent([_,t.maxZoom]),t.minZoom=_},H=_=>{var p;(p=t.d3Zoom)==null||p.scaleExtent([t.minZoom,_]),t.maxZoom=_},R=_=>{var p;(p=t.d3Zoom)==null||p.translateExtent(_),t.translateExtent=_},X=_=>{t.nodeExtent=_,a(o.value)},O=_=>{t.nodesDraggable=_,t.nodesConnectable=_,t.elementsSelectable=_},j=_=>{const p=_ instanceof Function?_(t.nodes):_;!t.initialized&&!p.length||(t.nodes=Wi(p,t.nodes,c,t.hooks.error.trigger))},U=_=>{const p=_ instanceof Function?_(t.edges):_;if(!t.initialized&&!p.length)return;const P=t.isValidConnection?p.filter($=>t.isValidConnection($,{edges:t.edges,nodes:t.nodes,sourceNode:c($.source),targetNode:c($.target)})):p;Ki(t.connectionLookup,P),t.edges=P.reduce(($,V)=>{const Y=c(V.source),q=c(V.target),re=!Y||typeof Y>"u",ce=!q||typeof q>"u";if(re&&ce?t.hooks.error.trigger(new Ce(Me.EDGE_SOURCE_TARGET_MISSING,V.id,V.source,V.target)):(re&&t.hooks.error.trigger(new Ce(Me.EDGE_SOURCE_MISSING,V.id,V.source)),ce&&t.hooks.error.trigger(new Ce(Me.EDGE_TARGET_MISSING,V.id,V.target))),re||ce)return $;const Se=d(V.id);return $.push({...pa(V,Se,t.defaultEdgeOptions),sourceNode:Y,targetNode:q}),$},[])},m=_=>{const p=_ instanceof Function?_([...t.nodes,...t.edges]):_;!t.initialized&&!p.length||(j(p.filter(ft)),U(p.filter(yt)))},T=_=>{let p=_ instanceof Function?_(t.nodes):_;p=Array.isArray(p)?p:[p];const $=Wi(p,t.nodes,c,t.hooks.error.trigger).map(Hi);$.length&&t.hooks.nodesChange.trigger($)},N=_=>{let p=_ instanceof Function?_(t.edges):_;p=Array.isArray(p)?p:[p];const $=(t.isValidConnection?p.filter(V=>{var Y;return(Y=t.isValidConnection)==null?void 0:Y.call(t,V,{edges:t.edges,nodes:t.nodes,sourceNode:c(V.source),targetNode:c(V.target)})}):p).reduce((V,Y)=>{const q=Wd(Y,t.edges,t.hooks.error.trigger,t.defaultEdgeOptions);if(q){const re=c(q.source),ce=c(q.target);V.push(Hi({...q,sourceNode:re,targetNode:ce}))}return V},[]);$.length&&t.hooks.edgesChange.trigger($)},I=(_,p=!0,P=!1)=>{const $=_ instanceof Function?_(t.nodes):_,V=Array.isArray($)?$:[$],Y=[],q=[];function re(Se){const ke=u(Se).filter(De=>Ee(De.deletable)?De.deletable:!0);q.push(...ke.map(De=>Li(De.id,De.source,De.target,De.sourceHandle,De.targetHandle)))}function ce(Se){const ke=t.nodes.filter(De=>De.parentNode===Se);if(ke.length){const De=ke.map(Ot=>Ot.id);Y.push(...De.map(Ot=>Fi(Ot))),p&&re(ke);for(const Ot of ke)ce(Ot.id)}}for(const Se of V){const ke=typeof Se=="string"?c(Se):Se;ke&&(Ee(ke.deletable)&&!ke.deletable||(Y.push(Fi(ke.id)),p&&re([ke]),P&&ce(ke.id)))}q.length&&t.hooks.edgesChange.trigger(q),Y.length&&t.hooks.nodesChange.trigger(Y)},B=_=>{const p=_ instanceof Function?_(t.edges):_,P=Array.isArray(p)?p:[p],$=[];for(const V of P){const Y=typeof V=="string"?d(V):V;Y&&(Ee(Y.deletable)&&!Y.deletable||$.push(Li(typeof V=="string"?V:V.id,Y.source,Y.target,Y.sourceHandle,Y.targetHandle)))}t.hooks.edgesChange.trigger($)},k=(_,p,P=!0)=>Kd(_,p,t.edges,d,P,t.hooks.error.trigger),A=_=>Ri(_,t.nodes),W=_=>{const p=Ri(_,t.edges);return Ki(t.connectionLookup,p),p},ee=(_,p,P={replace:!1})=>{const $=c(_);if(!$)return;const V=typeof p=="function"?p($):p;P.replace?t.nodes.splice(t.nodes.indexOf($),1,V):Object.assign($,V)},L=(_,p,P={replace:!1})=>{ee(_,$=>{const V=typeof p=="function"?p($):p;return P.replace?{...$,data:V}:{...$,data:{...$.data,...V}}},P)},J=(_,p,P,$=!1)=>{$?t.connectionClickStartHandle=_:t.connectionStartHandle=_,t.connectionEndHandle=null,t.connectionStatus=null,p&&(t.connectionPosition=p)},ue=(_,p=null,P=null)=>{t.connectionStartHandle&&(t.connectionPosition=_,t.connectionEndHandle=p,t.connectionStatus=P)},D=(_,p)=>{t.connectionPosition={x:Number.NaN,y:Number.NaN},t.connectionEndHandle=null,t.connectionStatus=null,p?t.connectionClickStartHandle=null:t.connectionStartHandle=null},ie=_=>{const p=Ad(_),P=p?null:xt(_)?_:c(_.id);return!p&&!P?[null,null,p]:[p?_:zi(P),P,p]},K=(_,p=!0,P=t.nodes)=>{const[$,V,Y]=ie(_);return $?(P||t.nodes).filter(q=>{if(!Y&&(q.id===V.id||!q.computedPosition))return!1;const re=zi(q),ce=Po(re,$);return p&&ce>0||ce>=Number($.width)*Number($.height)}):[]},Z=(_,p,P=!0)=>{const[$]=ie(_);if(!$)return!1;const V=Po($,p);return P&&V>0||V>=Number($.width)*Number($.height)},te=_=>{const{viewport:p,dimensions:P,d3Zoom:$,d3Selection:V,translateExtent:Y}=t;if(!$||!V||!_.x&&!_.y)return!1;const q=It.translate(p.x+_.x,p.y+_.y).scale(p.zoom),re=[[0,0],[P.width,P.height]],ce=$.constrain()(q,re,Y),Se=t.viewport.x!==ce.x||t.viewport.y!==ce.y||t.viewport.zoom!==ce.k;return $.transform(V,ce),Se},ne=_=>{const p=_ instanceof Function?_(t):_,P=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ee(p.defaultEdgeOptions)&&(t.defaultEdgeOptions=p.defaultEdgeOptions);const $=p.modelValue||p.nodes||p.edges?[]:void 0;$&&(p.modelValue&&$.push(...p.modelValue),p.nodes&&$.push(...p.nodes),p.edges&&$.push(...p.edges),m($));const V=()=>{Ee(p.maxZoom)&&H(p.maxZoom),Ee(p.minZoom)&&w(p.minZoom),Ee(p.translateExtent)&&R(p.translateExtent)};for(const Y of Object.keys(p)){const q=Y,re=p[q];![...jd,...P].includes(q)&&Ee(re)&&(t[q]=re)}$n(()=>t.d3Zoom).not.toBeNull().then(V),t.initialized||(t.initialized=!0)};return{updateNodePositions:f,updateNodeDimensions:h,setElements:m,setNodes:j,setEdges:U,addNodes:T,addEdges:N,removeNodes:I,removeEdges:B,findNode:c,findEdge:d,updateEdge:k,updateNode:ee,updateNodeData:L,applyEdgeChanges:W,applyNodeChanges:A,addSelectedElements:S,addSelectedNodes:b,addSelectedEdges:y,setMinZoom:w,setMaxZoom:H,setTranslateExtent:R,setNodeExtent:X,removeSelectedElements:z,removeSelectedNodes:x,removeSelectedEdges:M,startConnection:J,updateConnection:ue,endConnection:D,setInteractive:O,setState:ne,getIntersectingNodes:K,getIncomers:s,getOutgoers:l,getConnectedEdges:u,isNodeIntersecting:Z,panBy:te,fitView:_=>r.value.fitView(_),zoomIn:_=>r.value.zoomIn(_),zoomOut:_=>r.value.zoomOut(_),zoomTo:(_,p)=>r.value.zoomTo(_,p),setViewport:(_,p)=>r.value.setViewport(_,p),setTransform:(_,p)=>r.value.setTransform(_,p),getViewport:()=>r.value.getViewport(),getTransform:()=>r.value.getTransform(),setCenter:(_,p,P)=>r.value.setCenter(_,p,P),fitBounds:(_,p)=>r.value.fitBounds(_,p),project:_=>r.value.project(_),screenToFlowCoordinate:_=>r.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>r.value.flowToScreenCoordinate(_),toObject:()=>JSON.parse(JSON.stringify({nodes:t.nodes.map(_=>{const{computedPosition:p,handleBounds:P,selected:$,dimensions:V,isParent:Y,resizing:q,dragging:re,initialized:ce,events:Se,...ke}=_;return ke}),edges:t.edges.map(_=>{const{selected:p,sourceNode:P,targetNode:$,events:V,...Y}=_;return Y}),position:[t.viewport.x,t.viewport.y],zoom:t.viewport.zoom,viewport:t.viewport})),fromObject:_=>new Promise(p=>{const{nodes:P,edges:$,position:V,zoom:Y,viewport:q}=_;if(P&&j(P),$&&U($),q!=null&&q.x&&(q!=null&&q.y)||V){const re=(q==null?void 0:q.x)||V[0],ce=(q==null?void 0:q.y)||V[1],Se=(q==null?void 0:q.zoom)||Y||t.viewport.zoom;return $n(()=>r.value.viewportInitialized).toBe(!0).then(()=>{r.value.setViewport({x:re,y:ce,zoom:Se}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:a,viewportHelper:r,$reset:()=>{const _=Ma();if(t.edges=[],t.nodes=[],t.d3Zoom&&t.d3Selection){const p=It.translate(_.defaultViewport.x??0,_.defaultViewport.y??0).scale(mt(_.defaultViewport.zoom??1,_.minZoom,_.maxZoom)),P=t.viewportRef.getBoundingClientRect(),$=[[0,0],[P.width,P.height]],V=t.d3Zoom.constrain()(p,$,_.translateExtent);t.d3Zoom.transform(t.d3Selection,V)}ne(_)},$destroy:()=>{}}}const tf=["data-id","data-handleid","data-nodeid","data-handlepos"],nf={name:"Handle",compatConfig:{MODE:3}},Bn=he({...nf,props:{id:{},type:{},position:{default:()=>Q.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=wr(e,["position","connectable","connectableStart","connectableEnd","id"]),o=$e(()=>n.type??"source"),i=$e(()=>n.isValidConnection??null),{connectionStartHandle:r,connectionClickStartHandle:a,connectionEndHandle:s,vueFlowRef:l,nodesConnectable:u,noDragClassName:c,noPanClassName:d}=_e(),{id:f,node:h,nodeEl:E,connectedEdges:g}=Sd(),v=fe(),b=$e(()=>e.id??`${f}__handle-${e.position}`),y=$e(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),S=$e(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),x=$e(()=>{var O,j,U,m,T,N;return((O=r.value)==null?void 0:O.nodeId)===f&&((j=r.value)==null?void 0:j.handleId)===b.value&&((U=r.value)==null?void 0:U.type)===o.value||((m=s.value)==null?void 0:m.nodeId)===f&&((T=s.value)==null?void 0:T.handleId)===b.value&&((N=s.value)==null?void 0:N.type)===o.value}),M=$e(()=>{var O,j,U;return((O=a.value)==null?void 0:O.nodeId)===f&&((j=a.value)==null?void 0:j.handleId)===b.value&&((U=a.value)==null?void 0:U.type)===o.value}),{handlePointerDown:z,handleClick:w}=fa({nodeId:f,handleId:b,isValidConnection:i,type:o}),H=se(()=>typeof e.connectable=="string"&&e.connectable==="single"?!g.value.some(O=>{const j=O[`${o.value}Handle`];return O[o.value]!==f?!1:j?j===b.value:!0}):typeof e.connectable=="number"?g.value.filter(O=>{const j=O[`${o.value}Handle`];return O[o.value]!==f?!1:j?j===b.value:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(h,g.value):Ee(e.connectable)?e.connectable:u.value);$n(()=>h.initialized).toBe(!0,{flush:"post"}).then(()=>{var O;const j=(O=h.handleBounds[o.value])==null?void 0:O.find(k=>k.id===b.value);if(!l.value||j)return;const U=l.value.querySelector(".vue-flow__transformationpane");if(!E.value||!v.value||!U||!b.value)return;const m=E.value.getBoundingClientRect(),T=v.value.getBoundingClientRect(),N=window.getComputedStyle(U),{m22:I}=new window.DOMMatrixReadOnly(N.transform),B={id:b.value,position:e.position,x:(T.left-m.left)/I,y:(T.top-m.top)/I,...Jn(v.value)};h.handleBounds[o.value]=[...h.handleBounds[o.value]??[],B]}),br(()=>{const O=h.handleBounds[o.value];O&&(h.handleBounds[o.value]=O.filter(j=>j.id!==b.value))});function R(O){const j=oi(O);H.value&&y.value&&(j&&O.button===0||!j)&&z(O)}function X(O){!f||!a.value&&!y.value||H.value&&w(O)}return t({handleClick:w,handlePointerDown:z,onClick:X,onPointerDown:R}),(O,j)=>(G(),oe("div",{ref_key:"handle",ref:v,"data-id":`${C(f)}-${C(b)}-${C(o)}`,"data-handleid":C(b),"data-nodeid":C(f),"data-handlepos":O.position,class:je(["vue-flow__handle",[`vue-flow__handle-${O.position}`,`vue-flow__handle-${C(b)}`,C(c),C(d),C(o),{connectable:H.value,connecting:C(M),connectablestart:C(y),connectableend:C(S),connectionindicator:H.value&&(C(y)&&!C(x)||C(S)&&C(x))}]]),onMousedown:R,onTouchstartPassive:R,onClick:X},[ye(O.$slots,"default",{id:O.id})],42,tf))}}),jn=function({sourcePosition:e=Q.Bottom,targetPosition:t=Q.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:r}){return[pe(Bn,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof n!="string"&&n?pe(n):pe("div",{innerHTML:n}),pe(Bn,{type:"source",position:e,connectable:o,isValidConnection:r})]};jn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable"];jn.inheritAttrs=!1;jn.compatConfig={MODE:3};const of=jn,eo=function({targetPosition:e=Q.Top,label:t,connectable:n=!0,isValidTargetPos:o}){return[pe(Bn,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof t!="string"&&t?pe(t):pe("div",{innerHTML:t})]};eo.props=["targetPosition","label","isValidTargetPos","connectable"];eo.inheritAttrs=!1;eo.compatConfig={MODE:3};const rf=eo,to=function({sourcePosition:e=Q.Bottom,label:t,connectable:n=!0,isValidSourcePos:o}){return[typeof t!="string"&&t?pe(t):pe("div",{innerHTML:t}),pe(Bn,{type:"source",position:e,connectable:n,isValidConnection:o})]};to.props=["sourcePosition","label","isValidSourcePos","connectable"];to.inheritAttrs=!1;to.compatConfig={MODE:3};const af=to,sf=["transform"],lf=["width","height","x","y","rx","ry"],uf=["y"],cf={name:"EdgeText",compatConfig:{MODE:3}},df=he({...cf,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=fe({x:0,y:0,width:0,height:0}),n=fe(null),o=se(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);wt(i),ge([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const r=n.value.getBBox();(r.width!==t.value.width||r.height!==t.value.height)&&(t.value=r)}return(r,a)=>(G(),oe("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(G(),oe("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*r.labelBgPadding[0]}px`,height:`${t.value.height+2*r.labelBgPadding[1]}px`,x:-r.labelBgPadding[0],y:-r.labelBgPadding[1],style:ze(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,lf)):we("",!0),de("text",us(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[ye(r.$slots,"default",{},()=>[typeof r.label!="string"?(G(),be(rt(r.label),{key:0})):(G(),oe(at,{key:1},[ls(Ge(r.label),1)],64))])],16,uf)],8,sf))}}),ff=["id","d","marker-end","marker-start"],hf=["d","stroke-width"],gf={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},no=he({...gf,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},style:{},ref:{type:[String,Object,Function]},labelStyle:{},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=wr(e,["interactionWidth","labelShowBg"]),o=fe(null),i=fe(null),r=fe(null),a=ss();return t({pathEl:o,interactionEl:i,labelEl:r}),(s,l)=>(G(),oe(at,null,[de("path",{id:s.id,ref_key:"pathEl",ref:o,d:s.path,style:ze(n.style),class:je(["vue-flow__edge-path",C(a).class]),"marker-end":s.markerEnd,"marker-start":s.markerStart},null,14,ff),s.interactionWidth?(G(),oe("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,hf)):we("",!0),s.label&&s.labelX&&s.labelY?(G(),be(df,{key:1,ref_key:"labelEl",ref:r,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):we("",!0)],64))}});function ka({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,r=n<e?n+i:n-i,a=Math.abs(o-t)/2,s=o<t?o+a:o-a;return[r,s,i,a]}function Ca({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:r,targetControlX:a,targetControlY:s}){const l=e*.125+i*.375+a*.375+n*.125,u=t*.125+r*.375+s*.375+o*.125,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}function vn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ji({pos:e,x1:t,y1:n,x2:o,y2:i,c:r}){let a,s;switch(e){case Q.Left:a=t-vn(t-o,r),s=n;break;case Q.Right:a=t+vn(o-t,r),s=n;break;case Q.Top:a=t,s=n-vn(n-i,r);break;case Q.Bottom:a=t,s=n+vn(i-n,r);break}return[a,s]}function $a({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:o,targetY:i,targetPosition:r=Q.Top,curvature:a=.25}){const[s,l]=Ji({pos:n,x1:e,y1:t,x2:o,y2:i,c:a}),[u,c]=Ji({pos:r,x1:o,y1:i,x2:e,y2:t,c:a}),[d,f,h,E]=Ca({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${o},${i}`,d,f,h,E]}function Qi({pos:e,x1:t,y1:n,x2:o,y2:i}){let r,a;switch(e){case Q.Left:case Q.Right:r=.5*(t+o),a=n;break;case Q.Top:case Q.Bottom:r=t,a=.5*(n+i);break}return[r,a]}function Aa({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:o,targetY:i,targetPosition:r=Q.Top}){const[a,s]=Qi({pos:n,x1:e,y1:t,x2:o,y2:i}),[l,u]=Qi({pos:r,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=Ca({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:a,sourceControlY:s,targetControlX:l,targetControlY:u});return[`M${e},${t} C${a},${s} ${l},${u} ${o},${i}`,c,d,f,h]}const ji={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}};function pf({source:e,sourcePosition:t=Q.Bottom,target:n}){return t===Q.Left||t===Q.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function er(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function vf({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:o=Q.Top,center:i,offset:r}){const a=ji[t],s=ji[o],l={x:e.x+a.x*r,y:e.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},c=pf({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h,E,g;const v={x:0,y:0},b={x:0,y:0},[y,S,x,M]=ka({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){E=i.x||y,g=i.y||S;const w=[{x:E,y:l.y},{x:E,y:u.y}],H=[{x:l.x,y:g},{x:u.x,y:g}];a[d]===f?h=d==="x"?w:H:h=d==="x"?H:w}else{const w=[{x:l.x,y:u.y}],H=[{x:u.x,y:l.y}];if(d==="x"?h=a.x===f?H:w:h=a.y===f?w:H,t===o){const U=Math.abs(e[d]-n[d]);if(U<=r){const m=Math.min(r-1,r-U);a[d]===f?v[d]=m:b[d]=m}}if(t!==o){const U=d==="x"?"y":"x",m=a[d]===s[U],T=l[U]>u[U],N=l[U]<u[U];(a[d]===1&&(!m&&T||m&&N)||a[d]!==1&&(!m&&N||m&&T))&&(h=d==="x"?w:H)}const R={x:l.x-v.x,y:l.y-v.y},X={x:u.x-b.x,y:u.y-b.y},O=Math.max(Math.abs(R.x-h[0].x),Math.abs(X.x-h[0].x)),j=Math.max(Math.abs(R.y-h[0].y),Math.abs(X.y-h[0].y));O>=j?(E=(R.x+X.x)/2,g=h[0].y):(E=h[0].x,g=(R.y+X.y)/2)}return[[e,{x:l.x-v.x,y:l.y-v.y},...h,{x:u.x-b.x,y:u.y-b.y},n],E,g,x,M]}function mf(e,t,n,o){const i=Math.min(er(e,t)/2,er(t,n)/2,o),{x:r,y:a}=t;if(e.x===r&&r===n.x||e.y===a&&a===n.y)return`L${r} ${a}`;if(e.y===a){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${r+i*u},${a}Q ${r},${a} ${r},${a+i*c}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${r},${a+i*l}Q ${r},${a} ${r+i*s},${a}`}function Bo({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:o,targetY:i,targetPosition:r=Q.Top,borderRadius:a=5,centerX:s,centerY:l,offset:u=20}){const[c,d,f,h,E]=vf({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:r,center:{x:s,y:l},offset:u});return[c.reduce((v,b,y)=>{let S;return y>0&&y<c.length-1?S=mf(c[y-1],b,c[y+1],a):S=`${y===0?"M":"L"}${b.x} ${b.y}`,v+=S,v},""),d,f,h,E]}function yf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[i,r,a,s]=ka({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,r,a,s]}const _f=he({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=yf(e);return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),wf=_f,bf=he({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=Bo({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),Ta=bf,xf=he({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>pe(Ta,{...e,...t,borderRadius:0})}}),Ef=xf,Sf=he({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=$a({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),Nf=Sf,Mf=he({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=Aa({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return pe(no,{path:n,labelX:o,labelY:i,...t,...e})}}}),kf=Mf,Cf={input:af,default:of,output:rf},$f={default:Nf,straight:wf,step:Ef,smoothstep:Ta,simplebezier:kf};function Af(e,t,n){const o=se(()=>v=>e.nodes&&!t.value.length?e.nodes.find(b=>b.id===v):e.nodes[t.value.indexOf(v)]),i=se(()=>v=>e.edges&&!n.value.length?e.edges.find(b=>b.id===v):e.edges[n.value.indexOf(v)]),r=se(()=>{const v={...$f,...e.edgeTypes},b=Object.keys(v);for(const y of e.edges)y.type&&!b.includes(y.type)&&(v[y.type]=y.type);return v}),a=se(()=>{const v={...Cf,...e.nodeTypes},b=Object.keys(v);for(const y of e.nodes)y.type&&!b.includes(y.type)&&(v[y.type]=y.type);return v}),s=se(()=>{const v=e.nodes.filter(b=>!b.hidden);return e.onlyRenderVisibleElements?v&&ba(v,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):v??[]}),l=(v,b,y)=>{if(b=b??o.value(v.source),y=y??o.value(v.target),!b||!y){e.hooks.error.trigger(new Ce(Me.EDGE_ORPHANED,v.id));return}return!v.hidden&&!y.hidden&&!b.hidden},u=se(()=>e.onlyRenderVisibleElements?e.edges.filter(v=>{const b=o.value(v.source),y=o.value(v.target);return l(v,b,y)&&Gd({sourcePos:b.computedPosition||{x:0,y:0},targetPos:y.computedPosition||{x:0,y:0},sourceWidth:b.dimensions.width,sourceHeight:b.dimensions.height,targetWidth:y.dimensions.width,targetHeight:y.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})}):e.edges.filter(v=>l(v))),c=se(()=>[...s.value,...u.value]),d=se(()=>e.nodes.filter(v=>v.selected)),f=se(()=>e.edges.filter(v=>v.selected)),h=se(()=>[...d.value??[],...f.value??[]]),E=se(()=>s.value.filter(v=>v.initialized&&v.handleBounds!==void 0)),g=se(()=>s.value.length>0&&E.value.length===s.value.length);return{getNode:o,getEdge:i,getElements:c,getEdgeTypes:r,getNodeTypes:a,getEdges:u,getNodes:s,getSelectedElements:h,getSelectedNodes:d,getSelectedEdges:f,getNodesInitialized:E,areNodesInitialized:g}}class Et{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){return Et.instance||(Et.instance=new Et),Et.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Ma(),i=Mr(o),r={};for(const[f,h]of Object.entries(i.hooks)){const E=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;r[E]=h.on}const a={};for(const[f,h]of Object.entries(i.hooks))a[f]=h.trigger;const s=se(()=>i.nodes.map(f=>f.id)),l=se(()=>i.edges.map(f=>f.id)),u=Af(i,s,l),c=ef(t,i,u,s,l);c.setState({...i,...n});const d={...r,...u,...c,...Ts(i),emits:a,id:t,vueFlowVersion:"1.31.0",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function _e(e){const t=Et.getInstance(),n=Er(),o=e==null?void 0:e.id,i=(n==null?void 0:n.vueFlowId)||o;let r;if(n){const a=zt(Di,null);typeof a<"u"&&a!==null&&(r=a)}if(r||i&&(r=t.get(i)),!r||r&&o&&o!==r.id){const a=o??t.getId(),s=t.create(a,e);r=s,xr().run(()=>{ge(s.applyDefault,(l,u,c)=>{const d=h=>{s.applyNodeChanges(h)},f=h=>{s.applyEdgeChanges(h)};l?(s.onNodesChange(d),s.onEdgesChange(f)):(s.hooks.value.nodesChange.off(d),s.hooks.value.edgesChange.off(f)),c(()=>{s.hooks.value.nodesChange.off(d),s.hooks.value.edgesChange.off(f)})},{immediate:!0}),Xn(()=>{if(r){const l=t.get(r.id);l?l.$destroy():Qn(`No store instance found for id ${r.id} in storage.`)}})})}else e&&r.setState(e);return n&&($t(Di,r),n.vueFlowId=r.id),r}function Tf(e){const t=ei(),{emits:n,dimensions:o}=_e();let i;wt(()=>{const r=e.value,a=()=>{if(!r)return;const s=Jn(r);(s.width===0||s.height===0)&&n.error(new Ce(Me.MISSING_VIEWPORT_DIMENSIONS)),o.value={width:s.width||500,height:s.height||500}};a(),t.addEventListener("resize",a),r&&(i=new ResizeObserver(()=>a()),i.observe(r)),Xo(()=>{t.removeEventListener("resize",a),i&&r&&i.unobserve(r)})})}const If={name:"UserSelection",compatConfig:{MODE:3}},Pf=he({...If,props:{userSelectionRect:{}},setup(e){return(t,n)=>(G(),oe("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Df=["tabIndex"],zf={name:"NodesSelection",compatConfig:{MODE:3}},Of=he({...zf,setup(e){const t=_e(),n=Ne(t,"emits"),o=Ne(t,"viewport"),i=Ne(t,"getSelectedNodes"),r=Ne(t,"noPanClassName"),a=Ne(t,"disableKeyboardA11y"),s=Ne(t,"userSelectionActive"),l=ha(),u=fe(null),c=ua({el:u,onStart(g){n.value.selectionDragStart(g)},onDrag(g){n.value.selectionDrag(g)},onStop(g){n.value.selectionDragStop(g)}});wt(()=>{var g;a.value||(g=u.value)==null||g.focus({preventScroll:!0})});const d=se(()=>wa(i.value)),f=se(()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`}));function h(g){n.value.selectionContextMenu({event:g,nodes:i.value})}function E(g){a.value||kt[g.key]&&l({x:kt[g.key].x,y:kt[g.key].y},g.shiftKey)}return(g,v)=>!s.value&&d.value.width&&d.value.height?(G(),oe("div",{key:0,class:je(["vue-flow__nodesselection vue-flow__container",r.value]),style:ze({transform:`translate(${o.value.x}px,${o.value.y}px) scale(${o.value.zoom})`})},[de("div",{ref_key:"el",ref:u,class:je([{dragging:C(c)},"vue-flow__nodesselection-rect"]),style:ze(f.value),tabIndex:a.value?void 0:-1,onContextmenu:h,onKeydown:E},null,46,Df)],6)):we("",!0)}});function tr(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Bf={name:"Pane",compatConfig:{MODE:3}},Vf=he({...Bf,props:{isSelecting:{type:Boolean}},setup(e){const{vueFlowRef:t,getNodes:n,getEdges:o,viewport:i,emits:r,userSelectionActive:a,removeSelectedElements:s,panOnDrag:l,userSelectionRect:u,elementsSelectable:c,nodesSelectionActive:d,addSelectedElements:f,getSelectedEdges:h,getSelectedNodes:E,removeNodes:g,removeEdges:v,selectionMode:b,deleteKeyCode:y,multiSelectionKeyCode:S,multiSelectionActive:x}=_e(),M=fe(null),z=fe(0),w=fe(0),H=fe(),R=$e(()=>c.value&&(e.isSelecting||a.value));qt(y,k=>{if(!k)return;const A=n.value.reduce((W,ee)=>((!ee.selected&&ee.parentNode&&W.find(L=>L.id===ee.parentNode)||ee.selected)&&W.push(ee),W),[]);(A||h.value)&&(h.value.length>0&&v(h.value),A.length>0&&g(A),d.value=!1,s())}),qt(S,k=>{x.value=k});function X(){a.value=!1,u.value=null,z.value=0,w.value=0}function O(k){k.target!==M.value||R.value||(r.paneClick(k),s(),d.value=!1)}function j(k){var A;if(k.target===M.value){if(Array.isArray(l.value)&&((A=l.value)!=null&&A.includes(2))){k.preventDefault();return}r.paneContextMenu(k)}}function U(k){k.target===M.value&&r.paneScroll(k)}function m(k){if(H.value=t.value.getBoundingClientRect(),!R.value||!c||!e.isSelecting||k.button!==0||k.target!==M.value||!H.value)return;const{x:A,y:W}=tr(k,H.value);s(),u.value={width:0,height:0,startX:A,startY:W,x:A,y:W},a.value=!0,r.selectionStart(k)}function T(k){if(!R.value)return r.paneMouseMove(k);if(!e.isSelecting||!H.value||!u.value)return;a.value||(a.value=!0),d.value&&(d.value=!1);const A=tr(k,H.value),W=u.value.startX??0,ee=u.value.startY??0,L={...u.value,x:A.x<W?A.x:W,y:A.y<ee?A.y:ee,width:Math.abs(A.x-W),height:Math.abs(A.y-ee)},J=ba(n.value,u.value,i.value,b.value===jo.Partial),ue=ti(J,o.value);z.value=J.length,w.value=ue.length,u.value=L,f([...J,...ue])}function N(k){R.value&&k.button===0&&(!a.value&&u.value&&k.target===M.value&&O(k),d.value=z.value>0,X(),r.selectionEnd(k))}function I(k){var A;if(!R.value)return r.paneMouseLeave(k);a.value&&(d.value=z.value>0,(A=r.selectionEnd)==null||A.call(r,k)),X()}function B(k){R.value||r.paneMouseEnter(k)}return(k,A)=>(G(),oe("div",{ref_key:"container",ref:M,class:je(["vue-flow__pane vue-flow__container",{selection:k.isSelecting}]),onClick:O,onContextmenu:j,onWheelPassive:U,onMouseenter:B,onMousedown:m,onMousemove:T,onMouseup:N,onMouseleave:I},[ye(k.$slots,"default"),C(a)&&C(u)?(G(),be(Pf,{key:0,"user-selection-rect":C(u)},null,8,["user-selection-rect"])):we("",!0),C(d)&&C(E).length?(G(),be(Of,{key:1})):we("",!0)],34))}}),Rf={name:"Transform",compatConfig:{MODE:3}},Hf=he({...Rf,setup(e){const{viewport:t}=_e();return(n,o)=>(G(),oe("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:`translate(${C(t).x}px,${C(t).y}px) scale(${C(t).zoom})`})},[ye(n.$slots,"default")],4))}}),Ff={name:"Viewport",compatConfig:{MODE:3}},Lf=he({...Ff,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:r,selectionKeyCode:a,panActivationKeyCode:s,panOnScroll:l,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:E,preventScrolling:g,noWheelClassName:v,noPanClassName:b,emits:y,connectionStartHandle:S,userSelectionActive:x,paneDragging:M,d3Zoom:z,d3Selection:w,d3ZoomHandler:H,viewport:R,viewportRef:X}=_e();Tf(X);const O=fe(!1),j=fe(!1);let U=null,m=!1,T=0,N={x:0,y:0,zoom:0};const I=qt(s),B=qt(a),k=qt(r),A=$e(()=>I.value||d.value),W=$e(()=>I.value||l.value),ee=$e(()=>B.value||a.value===!0&&A.value!==!0);wt(()=>{if(!X.value){Qn("Viewport element is missing");return}const K=X.value,Z=K.getBoundingClientRect(),te=hd().scaleExtent([t.value,n.value]).translateExtent(i.value),ne=Oe(K).call(te),le=ne.on("wheel.zoom"),me=It.translate(o.value.x??0,o.value.y??0).scale(mt(o.value.zoom??1,t.value,n.value)),ve=[[0,0],[Z.width,Z.height]],_=te.constrain()(me,ve,i.value);te.transform(ne,_),te.wheelDelta(J),z.value=te,w.value=ne,H.value=le,R.value={x:_.x,y:_.y,zoom:_.k},te.on("start",p=>{var P;if(!p.sourceEvent)return null;T=p.sourceEvent.button,O.value=!0;const $=D(p.transform);((P=p.sourceEvent)==null?void 0:P.type)==="mousedown"&&(M.value=!0),N=$,y.viewportChangeStart($),y.moveStart({event:p,flowTransform:$})}),te.on("end",p=>{if(!p.sourceEvent)return null;if(O.value=!1,M.value=!1,L(A.value,T??0)&&!m&&y.paneContextMenu(p.sourceEvent),m=!1,ue(N,p.transform)){const P=D(p.transform);N=P,y.viewportChangeEnd(P),y.moveEnd({event:p,flowTransform:P})}}),te.filter(p=>{var P,$;const V=k.value||E.value,Y=h.value&&p.ctrlKey;if((A.value===!0||Array.isArray(A.value)&&A.value.includes(1))&&p.button===1&&p.type==="mousedown"&&((P=p.target)!=null&&P.closest(".vue-flow__node")||($=p.target)!=null&&$.closest(".vue-flow__edge")))return!0;if(!A.value&&!V&&!W.value&&!f.value&&!h.value||x.value||!f.value&&p.type==="dblclick"||ie(p,v.value)&&p.type==="wheel"||ie(p,b.value)&&(p.type!=="wheel"||W.value&&p.type==="wheel"&&!k.value)||!h.value&&p.ctrlKey&&p.type==="wheel"||!V&&!W.value&&!Y&&p.type==="wheel"||!A.value&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(A.value)&&!A.value.includes(p.button)&&(p.type==="mousedown"||p.type==="touchstart"))return!1;const q=Array.isArray(A.value)&&A.value.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||p.type==="wheel")&&q}),ge([x,A],()=>{x.value&&!O.value?te.on("zoom",null):x.value||te.on("zoom",p=>{R.value={x:p.transform.x,y:p.transform.y,zoom:p.transform.k};const P=D(p.transform);m=L(A.value,T??0),y.viewportChange(P),y.move({event:p,flowTransform:P})})},{immediate:!0}),ge([x,W,u,k,h,g,v],()=>{W.value&&!k.value&&!x.value?ne.on("wheel.zoom",p=>{if(ie(p,v.value))return!1;p.preventDefault(),p.stopImmediatePropagation();const P=ne.property("__zoom").k||1,$=On();if(p.ctrlKey&&h.value&&$){const ce=Le(p),Se=J(p),ke=P*2**Se;te.scaleTo(ne,ke,ce,p);return}const V=p.deltaMode===1?20:1;let Y=u.value===Zt.Vertical?0:p.deltaX*V,q=u.value===Zt.Horizontal?0:p.deltaY*V;!$&&p.shiftKey&&u.value!==Zt.Vertical&&!Y&&q&&(Y=q,q=0),te.translateBy(ne,-(Y/P)*c.value,-(q/P)*c.value);const re=D(ne.property("__zoom"));U&&clearTimeout(U),j.value?(y.move({event:p,flowTransform:re}),y.viewportChange(re),U=setTimeout(()=>{y.moveEnd({event:p,flowTransform:re}),y.viewportChangeEnd(re),j.value=!1},150)):(j.value=!0,y.moveStart({event:p,flowTransform:re}),y.viewportChangeStart(re))},{passive:!1}):typeof le<"u"&&ne.on("wheel.zoom",function(p,P){if(!g.value||ie(p,v.value))return null;p.preventDefault(),le.call(this,p,P)},{passive:!1})},{immediate:!0})});function L(K,Z){return Z===2&&Array.isArray(K)&&K.includes(2)}function J(K){const Z=K.ctrlKey&&On()?10:1;return-K.deltaY*(K.deltaMode===1?.05:K.deltaMode?1:.002)*Z}function ue(K,Z){return K.x!==Z.x&&!Number.isNaN(Z.x)||K.y!==Z.y&&!Number.isNaN(Z.y)||K.zoom!==Z.k&&!Number.isNaN(Z.k)}function D(K){return{x:K.x,y:K.y,zoom:K.k}}function ie(K,Z){return K.target.closest(`.${Z}`)}return(K,Z)=>(G(),oe("div",{ref_key:"viewportRef",ref:X,class:"vue-flow__viewport vue-flow__container"},[xe(Vf,{"is-selecting":C(ee),class:je({connecting:!!C(S),dragging:C(M),draggable:C(A)})},{default:Ie(()=>[xe(Hf,null,{default:Ie(()=>[ye(K.$slots,"default")]),_:3})]),_:3},8,["is-selecting","class"])],512))}}),Gf=["id"],Yf=["id"],Xf=["id"],Uf={name:"A11yDescriptions",compatConfig:{MODE:3}},Zf=he({...Uf,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=_e();return(i,r)=>(G(),oe(at,null,[de("div",{id:`${C(aa)}-${C(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Ge(C(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,Gf),de("div",{id:`${C(sa)}-${C(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Yf),C(n)?we("",!0):(G(),oe("div",{key:0,id:`${C(md)}-${C(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Ge(C(o)),9,Xf))],64))}});function qf(){const e=_e();ge(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Wf(e,t,n){return n===Q.Left?e-t:n===Q.Right?e+t:e}function Kf(e,t,n){return n===Q.Top?e-t:n===Q.Bottom?e+t:e}const ri=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=Q.Top,type:i}){return pe("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:Wf(t,e,o),cy:Kf(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};ri.props=["radius","centerX","centerY","position","type"];ri.compatConfig={MODE:3};const nr=ri,Jf=he({name:"Edge",compatConfig:{MODE:3},props:["name","type","id","updatable","selectable","focusable","edge"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:r,nodesSelectionActive:a,noPanClassName:s,getEdgeTypes:l,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:f,multiSelectionActive:h}=_e(),E=bd(e.edge,r),g=Ut(e,"edge"),v=fe(!1),b=fe(!1),y=fe(""),S=fe(null),x=fe("source"),M=fe(null);$t(yd,e.id),$t(_d,M);const z=se(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),w=se(()=>g.value.style instanceof Function?g.value.style(g.value):g.value.style),{handlePointerDown:H}=fa({nodeId:y,handleId:S,type:x,isValidConnection:f,edgeUpdaterType:x,onEdgeUpdate:O,onEdgeUpdateEnd:j});return()=>{const L=d(g.value.source),J=d(g.value.target);if(!L&&!J)return r.error(new Ce(Me.EDGE_SOURCE_TARGET_MISSING,g.value.id,g.value.source,g.value.target)),null;if(!L)return r.error(new Ce(Me.EDGE_SOURCE_MISSING,g.value.id,g.value.source)),null;if(!J)return r.error(new Ce(Me.EDGE_TARGET_MISSING,g.value.id,g.value.target)),null;if(!g||L.hidden||J.hidden)return null;let ue;o.value===vt.Strict?ue=L.handleBounds.source:ue=[...L.handleBounds.source||[],...L.handleBounds.target||[]];const D=Yi(ue,g.value.sourceHandle);let ie;o.value===vt.Strict?ie=J.handleBounds.target:ie=[...J.handleBounds.target||[],...J.handleBounds.source||[]];const K=Yi(ie,g.value.targetHandle),Z=D?D.position:Q.Bottom,te=K?K.position:Q.Top,{sourceX:ne,sourceY:le,targetY:me,targetX:ve}=Ld(L,D,Z,J,K,te);return g.value.sourceX=ne,g.value.sourceY=le,g.value.targetX=ve,g.value.targetY=me,pe("g",{ref:M,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${e.type===!1?"default":e.name}`,s.value,z.value,{updating:v.value,selected:g.value.selected,animated:g.value.animated,inactive:!e.selectable}],onClick:m,onContextmenu:T,onDblclick:N,onMouseenter:I,onMousemove:B,onMouseleave:k,onKeyDown:e.focusable?ee:void 0,tabIndex:e.focusable?0:void 0,"aria-label":g.value.ariaLabel===null?void 0:g.value.ariaLabel||`Edge from ${g.value.source} to ${g.value.target}`,"aria-describedby":e.focusable?`${sa}-${t}`:void 0,role:e.focusable?"button":"img"},[b.value?null:pe(e.type===!1?l.value.default:e.type,{id:e.id,sourceNode:L,targetNode:J,source:g.value.source,target:g.value.target,type:g.value.type,updatable:e.updatable,selected:g.value.selected,animated:g.value.animated,label:g.value.label,labelStyle:g.value.labelStyle,labelShowBg:g.value.labelShowBg,labelBgStyle:g.value.labelBgStyle,labelBgPadding:g.value.labelBgPadding,labelBgBorderRadius:g.value.labelBgBorderRadius,data:g.value.data,events:{...g.value.events,...E.on},style:w.value,markerStart:`url(#${ut(g.value.markerStart,t)})`,markerEnd:`url(#${ut(g.value.markerEnd,t)})`,sourcePosition:Z,targetPosition:te,sourceX:ne,sourceY:le,targetX:ve,targetY:me,sourceHandleId:g.value.sourceHandle,targetHandleId:g.value.targetHandle,interactionWidth:g.value.interactionWidth}),[e.updatable==="source"||e.updatable===!0?[pe("g",{onMousedown:A,onMouseenter:R,onMouseout:X},pe(nr,{position:Z,centerX:ne,centerY:le,radius:i.value,type:"source","data-type":"source"}))]:null,e.updatable==="target"||e.updatable===!0?[pe("g",{onMousedown:W,onMouseenter:R,onMouseout:X},pe(nr,{position:te,centerX:ve,centerY:me,radius:i.value,type:"target","data-type":"target"}))]:null]])};function R(){v.value=!0}function X(){v.value=!1}function O(L,J){E.emit.update({event:L,edge:g.value,connection:J})}function j(L){E.emit.updateEnd({event:L,edge:g.value}),b.value=!1}function U(L,J){L.button===0&&(b.value=!0,y.value=J?g.value.target:g.value.source,S.value=(J?g.value.targetHandle:g.value.sourceHandle)??"",x.value=J?"target":"source",E.emit.updateStart({event:L,edge:g.value}),H(L))}function m(L){var J;const ue={event:L,edge:g.value};e.selectable&&(a.value=!1,g.value.selected&&h.value?(u([g.value]),(J=M.value)==null||J.blur()):n([g.value])),E.emit.click(ue)}function T(L){E.emit.contextMenu({event:L,edge:g.value})}function N(L){E.emit.doubleClick({event:L,edge:g.value})}function I(L){E.emit.mouseEnter({event:L,edge:g.value})}function B(L){E.emit.mouseMove({event:L,edge:g.value})}function k(L){E.emit.mouseLeave({event:L,edge:g.value})}function A(L){U(L,!0)}function W(L){U(L,!1)}function ee(L){var J;la.includes(L.key)&&e.selectable&&(L.key==="Escape"?((J=M.value)==null||J.blur(),u([c(e.id)])):n([c(e.id)]))}}}),Qf=Jf,jf={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top},eh=he({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:r,connectionLineType:a,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:u,viewport:c,findNode:d}=_e(),f=(e=zt(Kn))==null?void 0:e["connection-line"];return()=>{var h,E,g,v,b;if(!o.value)return null;const y=d(o.value.nodeId);if(!y)return null;const S=o.value.handleId,x=o.value.type,M=((h=i.value)==null?void 0:h.handleId)&&d(i.value.nodeId)||null,z=(r.value.x-c.value.x)/c.value.zoom,w=(r.value.y-c.value.y)/c.value.zoom,H=y.handleBounds;let R=H==null?void 0:H[x];if(n.value===vt.Loose&&(R=R||(H==null?void 0:H[x==="source"?"target":"source"])),!R)return null;const X=(S?R.find(k=>k.id===S):R[0])??null,O=(X==null?void 0:X.position)||Q.Top,{x:j,y:U}=zo(O,{...y.dimensions,...y.computedPosition},X),m=M&&((E=i.value)==null?void 0:E.handleId)&&((n.value===vt.Strict?(g=M.handleBounds[x==="source"?"target":"source"])==null?void 0:g.find(k=>{var A;return k.id===((A=i.value)==null?void 0:A.handleId)}):(v=[...M.handleBounds.source||[],...M.handleBounds.target||[]])==null?void 0:v.find(k=>{var A;return k.id===((A=i.value)==null?void 0:A.handleId)}))||((b=M.handleBounds[x??"target"])==null?void 0:b[0]))||null,T=O?jf[O]:null;if(!O||!T)return null;const N=a.value??l.value.type??st.Bezier;let I="";const B={sourceX:j,sourceY:U,sourcePosition:O,targetX:z,targetY:w,targetPosition:T};return N===st.Bezier?[I]=$a(B):N===st.Step?[I]=Bo({...B,borderRadius:0}):N===st.SmoothStep?[I]=Bo(B):N===st.SimpleBezier?[I]=Aa(B):I=`M${j},${U} ${z},${w}`,pe("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},pe("g",{class:"vue-flow__connection"},f?pe(f,{sourceX:j,sourceY:U,sourcePosition:O,targetX:z,targetY:w,targetPosition:T,sourceNode:y,sourceHandle:X,targetNode:M,targetHandle:m,markerEnd:`url(#${ut(l.value.markerEnd,t)})`,markerStart:`url(#${ut(l.value.markerStart,t)})`,connectionStatus:u.value}):pe("path",{d:I,class:[l.value.class,u,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":`url(#${ut(l.value.markerEnd,t)})`,"marker-start":`url(#${ut(l.value.markerStart,t)})`})))}}}),th=eh,nh=["id","markerWidth","markerHeight","markerUnits","orient"],oh={name:"MarkerType",compatConfig:{MODE:3}},ih=he({...oh,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(G(),oe("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===C(To).ArrowClosed?(G(),oe("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):we("",!0),t.type===C(To).Arrow?(G(),oe("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):we("",!0)],8,nh))}}),rh={name:"MarkerDefinitions",compatConfig:{MODE:3}},ah=he({...rh,setup(e){const t=_e(),n=Ne(t,"id"),o=Ne(t,"edges"),i=Ne(t,"connectionLineOptions"),r=Ne(t,"defaultMarkerColor"),a=se(()=>{const s=[],l=[],u=c=>{if(c){const d=ut(c,n.value);s.includes(d)||(typeof c=="object"?l.push({...c,id:d,color:c.color||r.value}):l.push({id:d,color:r.value,type:c}),s.push(d))}};for(const c of[i.value.markerEnd,i.value.markerStart])u(c);return o.value.reduce((c,d)=>{for(const f of[d.markerStart,d.markerEnd])u(f);return c.sort((f,h)=>f.id.localeCompare(h.id))},l),l});return(s,l)=>(G(),oe("defs",null,[(G(!0),oe(at,null,Yo(a.value,u=>(G(),be(ih,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))]))}}),sh={class:"vue-flow__edges vue-flow__container"},lh={name:"Edges",compatConfig:{MODE:3}},uh=he({...lh,setup(e){const t=zt(Kn),{edgesUpdatable:n,edgesFocusable:o,elementsSelectable:i,findNode:r,getEdges:a,getEdgeTypes:s,elevateEdgesOnSelect:l,dimensions:u,emits:c}=_e(),d=Uo();function f(v){return typeof v>"u"?i.value:v}function h(v){return typeof v>"u"?n.value:v}function E(v){return typeof v>"u"?o.value:v}function g(v,b){const y=v||"default",S=t==null?void 0:t[`edge-${y}`];if(S)return S;let x=b??s.value[y];if(typeof x=="string"&&d){const M=Object.keys(d.appContext.components);M&&M.includes(y)&&(x=kr(y,!1))}return x&&typeof x!="string"?x:(c.error(new Ce(Me.EDGE_TYPE_MISSING,x)),!1)}return(v,b)=>C(u).width&&C(u).height?(G(),oe(at,{key:0},[(G(),oe("svg",sh,[xe(ah)])),(G(!0),oe(at,null,Yo(C(a),y=>(G(),oe("svg",{key:y.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:C(Yd)(y,C(r),C(l))})},[xe(C(Qf),{id:y.id,edge:y,type:g(y.type,y.template),name:y.type||"default",selectable:f(y.selectable),updatable:h(y.updatable),focusable:E(y.focusable)},null,8,["id","edge","type","name","selectable","updatable","focusable"])],4))),128)),xe(C(th))],64)):we("",!0)}}),ch=he({name:"Node",compatConfig:{MODE:3},props:["name","type","id","draggable","selectable","focusable","connectable","node","resizeObserver"],setup(e){$t(ca,e.id);const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:r,emits:a,findNode:s,removeSelectedNodes:l,addSelectedNodes:u,updateNodeDimensions:c,onUpdateNodeInternals:d,getIntersectingNodes:f,getNodeTypes:h,nodeExtent:E,elevateNodesOnSelect:g,disableKeyboardA11y:v,ariaLiveMessage:b,snapToGrid:y,snapGrid:S,nodeDragThreshold:x,getConnectedEdges:M}=_e(),z=ha(),w=Ut(e,"node"),H=se(()=>{var D;return s((D=w.value)==null?void 0:D.parentNode)}),R=se(()=>M(w.value?[w.value]:[])),X=fe(null);$t(da,X);const{emit:O,on:j}=Md(w.value,a),U=ua({id:e.id,el:X,disabled:()=>!e.draggable,selectable:()=>e.selectable,dragHandle:()=>w.value.dragHandle,onStart(D){O.dragStart({...D,intersections:f(w.value)})},onDrag(D){O.drag({...D,intersections:f(w.value)})},onStop(D){O.dragStop({...D,intersections:f(w.value)})}}),m=se(()=>w.value.class instanceof Function?w.value.class(w.value):w.value.class),T=se(()=>{const D=(w.value.style instanceof Function?w.value.style(w.value):w.value.style)||{},ie=w.value.width instanceof Function?w.value.width(w.value):w.value.width,K=w.value.height instanceof Function?w.value.height(w.value):w.value.height;return ie&&(D.width=typeof ie=="string"?ie:`${ie}px`),K&&(D.height=typeof K=="string"?K:`${K}px`),D}),N=$e(()=>Number(w.value.zIndex??T.value.zIndex??0));return d(D=>{D.includes(e.id)&&B()}),wt(()=>{e.resizeObserver.observe(X.value)}),Xo(()=>{e.resizeObserver.unobserve(X.value)}),ge([()=>w.value.type,()=>w.value.sourcePosition,()=>w.value.targetPosition],()=>{Ye(()=>{c([{id:e.id,nodeElement:X.value,forceUpdate:!0}])})}),ge([()=>w.value.position.x,()=>w.value.position.y,()=>{var D;return(D=H.value)==null?void 0:D.computedPosition.x},()=>{var D;return(D=H.value)==null?void 0:D.computedPosition.y},()=>{var D;return(D=H.value)==null?void 0:D.computedPosition.z},N,()=>w.value.selected,()=>w.value.dimensions.height,()=>w.value.dimensions.width,()=>{var D;return(D=H.value)==null?void 0:D.dimensions.height},()=>{var D;return(D=H.value)==null?void 0:D.dimensions.width}],([D,ie,K,Z,te,ne])=>{const le={x:D,y:ie,z:ne+(g.value&&w.value.selected?1e3:0)};typeof K<"u"&&typeof Z<"u"?w.value.computedPosition=Bd({x:K,y:Z,z:te},le):w.value.computedPosition=le},{flush:"post",immediate:!0}),ge([()=>w.value.extent,E],([D,ie],[K,Z])=>{(D!==K||ie!==Z)&&I()}),w.value.extent==="parent"||typeof w.value.extent=="object"&&"range"in w.value.extent&&w.value.extent.range==="parent"?$n(()=>w.value.initialized).toBe(!0).then(I):I(),()=>pe("div",{ref:X,"data-id":w.value.id,class:["vue-flow__node",`vue-flow__node-${e.type===!1?"default":e.name}`,{[n.value]:e.draggable,dragging:U==null?void 0:U.value,selected:w.value.selected,selectable:e.selectable,parent:w.value.isParent},m.value],style:{visibility:w.value.initialized?"visible":"hidden",zIndex:w.value.computedPosition.z??N.value,transform:`translate(${w.value.computedPosition.x}px,${w.value.computedPosition.y}px)`,pointerEvents:e.selectable||e.draggable?"all":"none",...T.value},tabIndex:e.focusable?0:void 0,role:e.focusable?"button":void 0,"aria-describedby":v.value?void 0:`${aa}-${t}`,"aria-label":w.value.ariaLabel,onMouseenter:k,onMousemove:A,onMouseleave:W,onContextmenu:ee,onClick:J,onDblclick:L,onKeydown:ue},[pe(e.type===!1?h.value.default:e.type,{id:w.value.id,type:w.value.type,data:w.value.data,events:{...w.value.events,...j},selected:w.value.selected,resizing:w.value.resizing,dragging:U.value,connectable:e.connectable,position:w.value.computedPosition,dimensions:w.value.dimensions,isValidTargetPos:w.value.isValidTargetPos,isValidSourcePos:w.value.isValidSourcePos,parent:w.value.parentNode,parentNodeId:w.value.parentNode,zIndex:w.value.computedPosition.z??N.value,targetPosition:w.value.targetPosition,sourcePosition:w.value.sourcePosition,label:w.value.label,dragHandle:w.value.dragHandle,onUpdateNodeInternals:B})]);function I(){const D=w.value.computedPosition;y.value&&(D.x=S.value[0]*Math.round(D.x/S.value[0]),D.y=S.value[1]*Math.round(D.y/S.value[1]));const{computedPosition:ie,position:K}=ni(w.value,D,a.error,E.value,H.value);(w.value.computedPosition.x!==ie.x||w.value.computedPosition.y!==ie.y)&&(w.value.computedPosition={...w.value.computedPosition,...ie}),(w.value.position.x!==K.x||w.value.position.y!==K.y)&&(w.value.position=K)}function B(){X.value&&c([{id:e.id,nodeElement:X.value,forceUpdate:!0}])}function k(D){U!=null&&U.value||O.mouseEnter({event:D,node:w.value,connectedEdges:R.value})}function A(D){U!=null&&U.value||O.mouseMove({event:D,node:w.value,connectedEdges:R.value})}function W(D){U!=null&&U.value||O.mouseLeave({event:D,node:w.value,connectedEdges:R.value})}function ee(D){return O.contextMenu({event:D,node:w.value,connectedEdges:R.value})}function L(D){return O.doubleClick({event:D,node:w.value,connectedEdges:R.value})}function J(D){e.selectable&&(!o.value||!e.draggable||x.value>0)&&Oo(w.value,r.value,u,l,i,!1,X.value),O.click({event:D,node:w.value,connectedEdges:R.value})}function ue(D){if(!Io(D))if(la.includes(D.key)&&e.selectable){const ie=D.key==="Escape";Oo(w.value,r.value,u,l,i,ie,X.value)}else!v.value&&e.draggable&&w.value.selected&&kt[D.key]&&(b.value=`Moved selected node ${D.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~w.value.position.x}, y: ${~~w.value.position.y}`,z({x:kt[D.key].x,y:kt[D.key].y},D.shiftKey))}}}),dh=ch,fh={height:"0",width:"0"},hh={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},e0=he({...hh,setup(e){const{viewportRef:t}=_e(),n=$e(()=>{var o;return(o=t.value)==null?void 0:o.getElementsByClassName("vue-flow__edge-labels")[0]});return(o,i)=>(G(),oe("svg",null,[(G(),oe("foreignObject",fh,[(G(),be(is,{to:C(n),disabled:!C(n)},[ye(o.$slots,"default")],8,["to","disabled"]))]))]))}}),gh={class:"vue-flow__nodes vue-flow__container"},ph={name:"Nodes",compatConfig:{MODE:3}},vh=he({...ph,setup(e){const t=zt(Kn),{nodesDraggable:n,nodesFocusable:o,elementsSelectable:i,nodesConnectable:r,getNodes:a,getNodesInitialized:s,areNodesInitialized:l,getNodeTypes:u,updateNodeDimensions:c,emits:d}=_e(),f=fe(),h=Uo();Is(()=>l.value,()=>{Ye(()=>{d.nodesInitialized(s.value)})}),wt(()=>{f.value=new ResizeObserver(S=>{const x=S.map(M=>({id:M.target.getAttribute("data-id"),nodeElement:M.target,forceUpdate:!0}));Ye(()=>c(x))})}),Xo(()=>{var S;return(S=f.value)==null?void 0:S.disconnect()});function E(S){return typeof S>"u"?n.value:S}function g(S){return typeof S>"u"?i.value:S}function v(S){return typeof S>"u"?r.value:S}function b(S){return typeof S>"u"?o.value:S}function y(S,x){const M=S||"default",z=t==null?void 0:t[`node-${M}`];if(z)return z;let w=x??u.value[M];if(typeof w=="string"&&h){const H=Object.keys(h.appContext.components);H&&H.includes(M)&&(w=kr(M,!1))}return w&&typeof w!="string"?w:(d.error(new Ce(Me.NODE_TYPE_MISSING,w)),!1)}return(S,x)=>(G(),oe("div",gh,[f.value?(G(!0),oe(at,{key:0},Yo(C(a),M=>(G(),be(C(dh),{id:M.id,key:M.id,"resize-observer":f.value,type:y(M.type,M.template),name:M.type||"default",draggable:E(M.draggable),selectable:g(M.selectable),connectable:v(M.connectable),focusable:b(M.focusable),node:M},null,8,["id","resize-observer","type","name","draggable","selectable","connectable","focusable","node"]))),128)):we("",!0)]))}}),mh=de("div",{class:"vue-flow__edge-labels"},null,-1),yh={name:"VueFlow",compatConfig:{MODE:3}},t0=he({...yh,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},__experimentalFeatures:{}},emits:["nodesChange","edgesChange","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","nodesInitialized","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","init","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","updateNodeInternals","error","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=rs(),r=Ut(o,"modelValue",n),a=Ut(o,"nodes",n),s=Ut(o,"edges",n),{vueFlowRef:l,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f}=_e(o),h=$d({modelValue:r,nodes:a,edges:s},o,{vueFlowRef:l,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f});return Qd(n,u),qf(),$t(Kn,i),br(()=>{h()}),t({vueFlowRef:l,hooks:u,getNodeTypes:c,getEdgeTypes:d,...f}),(E,g)=>(G(),oe("div",{ref_key:"vueFlowRef",ref:l,class:"vue-flow"},[xe(Lf,null,{default:Ie(()=>[xe(uh),mh,xe(vh),ye(E.$slots,"zoom-pane")]),_:3}),ye(E.$slots,"default"),xe(Zf)],512))}}),_h=["x","y","width","height"],wh=["stroke","stroke-width","d"],bh=["cx","cy","r","fill"],xh={key:2,height:"100",width:"100"},Eh=["fill"],Sh=["x","y","fill"],Nh={name:"Background"},n0=he({...Nh,props:{variant:{default:()=>"dots"},gap:{default:10},size:{default:.4},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0}},setup(e){const t={dots:"#81818a",lines:"#eee"},{id:n,viewport:o}=_e(),i=se(()=>{const l=e.gap&&e.gap*o.value.zoom,u=l&&o.value.x%l,c=l&&o.value.y%l,d=e.size*o.value.zoom;return{scaledGap:l,xOffset:u,yOffset:c,size:d}}),r=`pattern-${n}`,a=se(()=>e.patternColor||t[e.variant||"dots"]),s=se(()=>`M${i.value.scaledGap/2} 0 V${i.value.scaledGap} M0 ${i.value.scaledGap/2} H${i.value.scaledGap}`);return(l,u)=>(G(),oe("svg",{class:"vue-flow__background",style:ze({height:`${e.height>100?100:e.height}%`,width:`${e.width>100?100:e.width}%`})},[ye(l.$slots,"pattern-container",{id:r},()=>[de("pattern",{id:r,x:i.value.xOffset,y:i.value.yOffset,width:i.value.scaledGap,height:i.value.scaledGap,patternUnits:"userSpaceOnUse"},[ye(l.$slots,"pattern",{},()=>[e.variant==="lines"?(G(),oe("path",{key:0,stroke:C(a),"stroke-width":e.size,d:C(s)},null,8,wh)):e.variant==="dots"?(G(),oe("circle",{key:1,cx:i.value.size,cy:i.value.size,r:i.value.size,fill:C(a)},null,8,bh)):we("",!0),e.bgColor?(G(),oe("svg",xh,[de("rect",{width:"100%",height:"100%",fill:e.bgColor},null,8,Eh)])):we("",!0)])],8,_h)]),de("rect",{x:e.x,y:e.y,width:"100%",height:"100%",fill:`url(#${r})`},null,8,Sh),ye(l.$slots,"default",{id:r})],4))}}),oo=he({__name:"Panel",props:{position:null},setup(e){const t=e,{userSelectionActive:n}=_e(),o=se(()=>`${t.position}`.split("-"));return(i,r)=>(G(),oe("div",{class:je(["vue-flow__panel",C(o)]),style:ze({pointerEvents:C(n)?"none":"all"})},[ye(i.$slots,"default")],6))}});var io=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(io||{});const Mh={name:"ControlButton"},kh=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Ch={class:"vue-flow__controls-button"};function $h(e,t,n,o,i,r){return G(),oe("button",Ch,[ye(e.$slots,"default")])}const mn=kh(Mh,[["render",$h]]),Ah={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Th=de("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),Ih=[Th];function Ph(e,t){return G(),oe("svg",Ah,Ih)}const Dh={render:Ph},zh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Oh=de("path",{d:"M0 0h32v4.2H0z"},null,-1),Bh=[Oh];function Vh(e,t){return G(),oe("svg",zh,Bh)}const Rh={render:Vh},Hh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Fh=de("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),Lh=[Fh];function Gh(e,t){return G(),oe("svg",Hh,Lh)}const Yh={render:Gh},Xh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Uh=de("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),Zh=[Uh];function qh(e,t){return G(),oe("svg",Xh,Zh)}const Wh={render:qh},Kh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Jh=de("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),Qh=[Jh];function jh(e,t){return G(),oe("svg",Kh,Qh)}const eg={render:jh},tg={name:"Controls"},o0=he({...tg,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:()=>"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const n=_e(),o=Ne(n,"nodesDraggable"),i=Ne(n,"nodesConnectable"),r=Ne(n,"elementsSelectable"),a=Ne(n,"setInteractive"),s=Ne(n,"zoomIn"),l=Ne(n,"zoomOut"),u=Ne(n,"fitView"),c=se(()=>o.value&&i.value&&r.value),d=()=>{s.value(),t("zoomIn")},f=()=>{l.value(),t("zoomOut")},h=()=>{u.value(e.fitViewParams),t("fitView")},E=()=>{a.value(!c.value),t("interactionChange",!c.value)};return(g,v)=>(G(),be(C(oo),{class:"vue-flow__controls",position:e.position},{default:Ie(()=>[ye(g.$slots,"top"),e.showZoom?(G(),oe(at,{key:0},[ye(g.$slots,"control-zoom-in",{},()=>[xe(mn,{class:"vue-flow__controls-zoomin",onClick:d},{default:Ie(()=>[ye(g.$slots,"icon-zoom-in",{},()=>[(G(),be(rt(C(Dh))))])]),_:3})]),ye(g.$slots,"control-zoom-out",{},()=>[xe(mn,{class:"vue-flow__controls-zoomout",onClick:f},{default:Ie(()=>[ye(g.$slots,"icon-zoom-out",{},()=>[(G(),be(rt(C(Rh))))])]),_:3})])],64)):we("",!0),e.showFitView?ye(g.$slots,"control-fit-view",{key:1},()=>[xe(mn,{class:"vue-flow__controls-fitview",onClick:h},{default:Ie(()=>[ye(g.$slots,"icon-fit-view",{},()=>[(G(),be(rt(C(Yh))))])]),_:3})]):we("",!0),e.showInteractive?ye(g.$slots,"control-interactive",{key:2},()=>[e.showInteractive?(G(),be(mn,{key:0,class:"vue-flow__controls-interactive",onClick:E},{default:Ie(()=>[C(c)?ye(g.$slots,"icon-unlock",{key:0},()=>[(G(),be(rt(C(eg))))]):we("",!0),C(c)?we("",!0):ye(g.$slots,"icon-lock",{key:1},()=>[(G(),be(rt(C(Wh))))])]),_:3})):we("",!0)]):we("",!0),ye(g.$slots,"default")]),_:3},8,["position"]))}});var ng={value:()=>{}};function Ia(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Mn(n)}function Mn(e){this._=e}function og(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Mn.prototype=Ia.prototype={constructor:Mn,on:function(e,t){var n=this._,o=og(e+"",n),i,r=-1,a=o.length;if(arguments.length<2){for(;++r<a;)if((i=(e=o[r]).type)&&(i=ig(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(i=(e=o[r]).type)n[i]=or(n[i],e.name,t);else if(t==null)for(i in n)n[i]=or(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Mn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function ig(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function or(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=ng,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Vo="http://www.w3.org/1999/xhtml";const ir={svg:"http://www.w3.org/2000/svg",xhtml:Vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ro(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ir.hasOwnProperty(t)?{space:ir[t],local:e}:e}function rg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Vo&&t.documentElement.namespaceURI===Vo?t.createElement(e):t.createElementNS(n,e)}}function ag(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pa(e){var t=ro(e);return(t.local?ag:rg)(t)}function sg(){}function ai(e){return e==null?sg:function(){return this.querySelector(e)}}function lg(e){typeof e!="function"&&(e=ai(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=new Array(a),l,u,c=0;c<a;++c)(l=r[c])&&(u=e.call(l,l.__data__,c,r))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Re(o,this._parents)}function ug(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function cg(){return[]}function Da(e){return e==null?cg:function(){return this.querySelectorAll(e)}}function dg(e){return function(){return ug(e.apply(this,arguments))}}function fg(e){typeof e=="function"?e=dg(e):e=Da(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a=t[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(o.push(e.call(l,l.__data__,u,a)),i.push(l));return new Re(o,i)}function za(e){return function(){return this.matches(e)}}function Oa(e){return function(t){return t.matches(e)}}var hg=Array.prototype.find;function gg(e){return function(){return hg.call(this.children,e)}}function pg(){return this.firstElementChild}function vg(e){return this.select(e==null?pg:gg(typeof e=="function"?e:Oa(e)))}var mg=Array.prototype.filter;function yg(){return Array.from(this.children)}function _g(e){return function(){return mg.call(this.children,e)}}function wg(e){return this.selectAll(e==null?yg:_g(typeof e=="function"?e:Oa(e)))}function bg(e){typeof e!="function"&&(e=za(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new Re(o,this._parents)}function Ba(e){return new Array(e.length)}function xg(){return new Re(this._enter||this._groups.map(Ba),this._parents)}function Vn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vn.prototype={constructor:Vn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Eg(e){return function(){return e}}function Sg(e,t,n,o,i,r){for(var a=0,s,l=t.length,u=r.length;a<u;++a)(s=t[a])?(s.__data__=r[a],o[a]=s):n[a]=new Vn(e,r[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function Ng(e,t,n,o,i,r,a){var s,l,u=new Map,c=t.length,d=r.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=a.call(l,l.__data__,s,t)+"",u.has(h)?i[s]=l:u.set(h,l));for(s=0;s<d;++s)h=a.call(e,r[s],s,r)+"",(l=u.get(h))?(o[s]=l,l.__data__=r[s],u.delete(h)):n[s]=new Vn(e,r[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function Mg(e){return e.__data__}function kg(e,t){if(!arguments.length)return Array.from(this,Mg);var n=t?Ng:Sg,o=this._parents,i=this._groups;typeof e!="function"&&(e=Eg(e));for(var r=i.length,a=new Array(r),s=new Array(r),l=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],f=d.length,h=Cg(e.call(c,c&&c.__data__,u,o)),E=h.length,g=s[u]=new Array(E),v=a[u]=new Array(E),b=l[u]=new Array(f);n(c,d,g,v,b,h,t);for(var y=0,S=0,x,M;y<E;++y)if(x=g[y]){for(y>=S&&(S=y+1);!(M=v[S])&&++S<E;);x._next=M||null}}return a=new Re(a,o),a._enter=s,a._exit=l,a}function Cg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $g(){return new Re(this._exit||this._groups.map(Ba),this._parents)}function Ag(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function Tg(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=o[l],d=u.length,f=s[l]=new Array(d),h,E=0;E<d;++E)(h=u[E]||c[E])&&(f[E]=h);for(;l<i;++l)s[l]=n[l];return new Re(s,this._parents)}function Ig(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],a;--i>=0;)(a=o[i])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function Pg(e){e||(e=Dg);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a=n[r],s=a.length,l=i[r]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Re(i,this._parents).order()}function Dg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function zg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Og(){return Array.from(this)}function Bg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null}function Vg(){let e=0;for(const t of this)++e;return e}function Rg(){return!this.node()}function Hg(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,a=i.length,s;r<a;++r)(s=i[r])&&e.call(s,s.__data__,r,i);return this}function Fg(e){return function(){this.removeAttribute(e)}}function Lg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gg(e,t){return function(){this.setAttribute(e,t)}}function Yg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ug(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Zg(e,t){var n=ro(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Lg:Fg:typeof t=="function"?n.local?Ug:Xg:n.local?Yg:Gg)(n,t))}function Va(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qg(e){return function(){this.style.removeProperty(e)}}function Wg(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Kg(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Jg(e,t,n){return arguments.length>1?this.each((t==null?qg:typeof t=="function"?Kg:Wg)(e,t,n??"")):Pt(this.node(),e)}function Pt(e,t){return e.style.getPropertyValue(t)||Va(e).getComputedStyle(e,null).getPropertyValue(t)}function Qg(e){return function(){delete this[e]}}function jg(e,t){return function(){this[e]=t}}function ep(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function tp(e,t){return arguments.length>1?this.each((t==null?Qg:typeof t=="function"?ep:jg)(e,t)):this.node()[e]}function Ra(e){return e.trim().split(/^|\s+/)}function si(e){return e.classList||new Ha(e)}function Ha(e){this._node=e,this._names=Ra(e.getAttribute("class")||"")}Ha.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Fa(e,t){for(var n=si(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function La(e,t){for(var n=si(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function np(e){return function(){Fa(this,e)}}function op(e){return function(){La(this,e)}}function ip(e,t){return function(){(t.apply(this,arguments)?Fa:La)(this,e)}}function rp(e,t){var n=Ra(e+"");if(arguments.length<2){for(var o=si(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ip:t?np:op)(n,t))}function ap(){this.textContent=""}function sp(e){return function(){this.textContent=e}}function lp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function up(e){return arguments.length?this.each(e==null?ap:(typeof e=="function"?lp:sp)(e)):this.node().textContent}function cp(){this.innerHTML=""}function dp(e){return function(){this.innerHTML=e}}function fp(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hp(e){return arguments.length?this.each(e==null?cp:(typeof e=="function"?fp:dp)(e)):this.node().innerHTML}function gp(){this.nextSibling&&this.parentNode.appendChild(this)}function pp(){return this.each(gp)}function vp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mp(){return this.each(vp)}function yp(e){var t=typeof e=="function"?e:Pa(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function _p(){return null}function wp(e,t){var n=typeof e=="function"?e:Pa(e),o=t==null?_p:typeof t=="function"?t:ai(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function bp(){var e=this.parentNode;e&&e.removeChild(this)}function xp(){return this.each(bp)}function Ep(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sp(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Np(e){return this.select(e?Sp:Ep)}function Mp(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kp(e){return function(t){e.call(this,t,this.__data__)}}function Cp(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function $p(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function Ap(e,t,n){return function(){var o=this.__on,i,r=kp(t);if(o){for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function Tp(e,t,n){var o=Cp(e+""),i,r=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<r;++i)if((a=o[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?Ap:$p,i=0;i<r;++i)this.each(s(o[i],t,n));return this}function Ga(e,t,n){var o=Va(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Ip(e,t){return function(){return Ga(this,e,t)}}function Pp(e,t){return function(){return Ga(this,e,t.apply(this,arguments))}}function Dp(e,t){return this.each((typeof t=="function"?Pp:Ip)(e,t))}function*zp(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,a;i<r;++i)(a=o[i])&&(yield a)}var Op=[null];function Re(e,t){this._groups=e,this._parents=t}function sn(){return new Re([[document.documentElement]],Op)}function Bp(){return this}Re.prototype=sn.prototype={constructor:Re,select:lg,selectAll:fg,selectChild:vg,selectChildren:wg,filter:bg,data:kg,enter:xg,exit:$g,join:Ag,merge:Tg,selection:Bp,order:Ig,sort:Pg,call:zg,nodes:Og,node:Bg,size:Vg,empty:Rg,each:Hg,attr:Zg,style:Jg,property:tp,classed:rp,text:up,html:hp,raise:pp,lower:mp,append:yp,insert:wp,remove:xp,clone:Np,datum:Mp,on:Tp,dispatch:Dp,[Symbol.iterator]:zp};function li(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ya(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function ln(){}var en=.7,Rn=1/en,Ct="\\s*([+-]?\\d+)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vp=/^#([0-9a-f]{3,8})$/,Rp=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),Hp=new RegExp(`^rgb\\(${Ue},${Ue},${Ue}\\)$`),Fp=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${tn}\\)$`),Lp=new RegExp(`^rgba\\(${Ue},${Ue},${Ue},${tn}\\)$`),Gp=new RegExp(`^hsl\\(${tn},${Ue},${Ue}\\)$`),Yp=new RegExp(`^hsla\\(${tn},${Ue},${Ue},${tn}\\)$`),rr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};li(ln,nn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ar,formatHex:ar,formatHex8:Xp,formatHsl:Up,formatRgb:sr,toString:sr});function ar(){return this.rgb().formatHex()}function Xp(){return this.rgb().formatHex8()}function Up(){return Xa(this).formatHsl()}function sr(){return this.rgb().formatRgb()}function nn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Vp.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?lr(t):n===3?new Te(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Rp.exec(e))?new Te(t[1],t[2],t[3],1):(t=Hp.exec(e))?new Te(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fp.exec(e))?yn(t[1],t[2],t[3],t[4]):(t=Lp.exec(e))?yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gp.exec(e))?dr(t[1],t[2]/100,t[3]/100,1):(t=Yp.exec(e))?dr(t[1],t[2]/100,t[3]/100,t[4]):rr.hasOwnProperty(e)?lr(rr[e]):e==="transparent"?new Te(NaN,NaN,NaN,0):null}function lr(e){return new Te(e>>16&255,e>>8&255,e&255,1)}function yn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Te(e,t,n,o)}function Zp(e){return e instanceof ln||(e=nn(e)),e?(e=e.rgb(),new Te(e.r,e.g,e.b,e.opacity)):new Te}function Ro(e,t,n,o){return arguments.length===1?Zp(e):new Te(e,t,n,o??1)}function Te(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}li(Te,Ro,Ya(ln,{brighter(e){return e=e==null?Rn:Math.pow(Rn,e),new Te(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?en:Math.pow(en,e),new Te(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Te(gt(this.r),gt(this.g),gt(this.b),Hn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ur,formatHex:ur,formatHex8:qp,formatRgb:cr,toString:cr}));function ur(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}`}function qp(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}${ct((isNaN(this.opacity)?1:this.opacity)*255)}`}function cr(){const e=Hn(this.opacity);return`${e===1?"rgb(":"rgba("}${gt(this.r)}, ${gt(this.g)}, ${gt(this.b)}${e===1?")":`, ${e})`}`}function Hn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ct(e){return e=gt(e),(e<16?"0":"")+e.toString(16)}function dr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,n,o)}function Xa(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof ln||(e=nn(e)),!e)return new Ve;if(e instanceof Ve)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,s=r-i,l=(r+i)/2;return s?(t===r?a=(n-o)/s+(n<o)*6:n===r?a=(o-t)/s+2:a=(t-n)/s+4,s/=l<.5?r+i:2-r-i,a*=60):s=l>0&&l<1?0:a,new Ve(a,s,l,e.opacity)}function Wp(e,t,n,o){return arguments.length===1?Xa(e):new Ve(e,t,n,o??1)}function Ve(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}li(Ve,Wp,Ya(ln,{brighter(e){return e=e==null?Rn:Math.pow(Rn,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?en:Math.pow(en,e),new Ve(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Te(wo(e>=240?e-240:e+120,i,o),wo(e,i,o),wo(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ve(fr(this.h),_n(this.s),_n(this.l),Hn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Hn(this.opacity);return`${e===1?"hsl(":"hsla("}${fr(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fr(e){return e=(e||0)%360,e<0?e+360:e}function _n(e){return Math.max(0,Math.min(1,e||0))}function wo(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ua=e=>()=>e;function Kp(e,t){return function(n){return e+n*t}}function Jp(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Qp(e){return(e=+e)==1?Za:function(t,n){return n-t?Jp(t,n,e):Ua(isNaN(t)?n:t)}}function Za(e,t){var n=t-e;return n?Kp(e,n):Ua(isNaN(e)?t:e)}const hr=function e(t){var n=Qp(t);function o(i,r){var a=n((i=Ro(i)).r,(r=Ro(r)).r),s=n(i.g,r.g),l=n(i.b,r.b),u=Za(i.opacity,r.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return o.gamma=e,o}(1);function it(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ho=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bo=new RegExp(Ho.source,"g");function jp(e){return function(){return e}}function ev(e){return function(t){return e(t)+""}}function tv(e,t){var n=Ho.lastIndex=bo.lastIndex=0,o,i,r,a=-1,s=[],l=[];for(e=e+"",t=t+"";(o=Ho.exec(e))&&(i=bo.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(o=o[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:it(o,i)})),n=bo.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?ev(l[0].x):jp(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}var gr=180/Math.PI,qa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wa(e,t,n,o,i,r){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,l/=s),e*o<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*gr,skewX:Math.atan(l)*gr,scaleX:a,scaleY:s}}var wn;function nv(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qa:Wa(t.a,t.b,t.c,t.d,t.e,t.f)}function ov(e){return e==null||(wn||(wn=document.createElementNS("http://www.w3.org/2000/svg","g")),wn.setAttribute("transform",e),!(e=wn.transform.baseVal.consolidate()))?qa:(e=e.matrix,Wa(e.a,e.b,e.c,e.d,e.e,e.f))}function Ka(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);E.push({i:g-4,x:it(u,d)},{i:g-2,x:it(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:it(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:it(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function l(u,c,d,f,h,E){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");E.push({i:g-4,x:it(u,d)},{i:g-2,x:it(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var E=-1,g=f.length,v;++E<g;)d[(v=f[E]).i]=v.x(h);return d.join("")}}}var iv=Ka(nv,"px, ","px)","deg)"),rv=Ka(ov,", ",")",")"),av=1e-12;function pr(e){return((e=Math.exp(e))+1/e)/2}function sv(e){return((e=Math.exp(e))-1/e)/2}function lv(e){return((e=Math.exp(2*e))-1)/(e+1)}(function e(t,n,o){function i(r,a){var s=r[0],l=r[1],u=r[2],c=a[0],d=a[1],f=a[2],h=c-s,E=d-l,g=h*h+E*E,v,b;if(g<av)b=Math.log(f/u)/t,v=function(w){return[s+w*h,l+w*E,u*Math.exp(t*w*b)]};else{var y=Math.sqrt(g),S=(f*f-u*u+o*g)/(2*u*n*y),x=(f*f-u*u-o*g)/(2*f*n*y),M=Math.log(Math.sqrt(S*S+1)-S),z=Math.log(Math.sqrt(x*x+1)-x);b=(z-M)/t,v=function(w){var H=w*b,R=pr(M),X=u/(n*y)*(R*lv(t*H+M)-sv(M));return[s+X*h,l+X*E,u*R/pr(t*H+M)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return i.rho=function(r){var a=Math.max(.001,+r),s=a*a,l=s*s;return e(a,s,l)},i})(Math.SQRT2,2,4);var Dt=0,Gt=0,Ht=0,Ja=1e3,Fn,Yt,Ln=0,_t=0,ao=0,on=typeof performance=="object"&&performance.now?performance:Date,Qa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ui(){return _t||(Qa(uv),_t=on.now()+ao)}function uv(){_t=0}function Gn(){this._call=this._time=this._next=null}Gn.prototype=ja.prototype={constructor:Gn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ui():+n)+(t==null?0:+t),!this._next&&Yt!==this&&(Yt?Yt._next=this:Fn=this,Yt=this),this._call=e,this._time=n,Fo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fo())}};function ja(e,t,n){var o=new Gn;return o.restart(e,t,n),o}function cv(){ui(),++Dt;for(var e=Fn,t;e;)(t=_t-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dt}function vr(){_t=(Ln=on.now())+ao,Dt=Gt=0;try{cv()}finally{Dt=0,fv(),_t=0}}function dv(){var e=on.now(),t=e-Ln;t>Ja&&(ao-=t,Ln=e)}function fv(){for(var e,t=Fn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Fn=n);Yt=e,Fo(o)}function Fo(e){if(!Dt){Gt&&(Gt=clearTimeout(Gt));var t=e-_t;t>24?(e<1/0&&(Gt=setTimeout(vr,e-on.now()-ao)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Ln=on.now(),Ht=setInterval(dv,Ja)),Dt=1,Qa(vr))}}function mr(e,t,n){var o=new Gn;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var hv=Ia("start","end","cancel","interrupt"),gv=[],es=0,yr=1,Lo=2,kn=3,_r=4,Go=5,Cn=6;function so(e,t,n,o,i,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;pv(e,n,{name:t,index:o,group:i,on:hv,tween:gv,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:es})}function ci(e,t){var n=Fe(e,t);if(n.state>es)throw new Error("too late; already scheduled");return n}function qe(e,t){var n=Fe(e,t);if(n.state>kn)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function pv(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=ja(r,0,n.time);function r(u){n.state=yr,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==yr)return l();for(c in o)if(h=o[c],h.name===n.name){if(h.state===kn)return mr(a);h.state===_r?(h.state=Cn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Cn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(mr(function(){n.state===kn&&(n.state=_r,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Lo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Lo){for(n.state=kn,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Go,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Go&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Cn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function vv(e,t){var n=e.__transition,o,i,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){r=!1;continue}i=o.state>Lo&&o.state<Go,o.state=Cn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}r&&delete e.__transition}}function mv(e){return this.each(function(){vv(this,e)})}function yv(e,t){var n,o;return function(){var i=qe(this,e),r=i.tween;if(r!==n){o=n=r;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function _v(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=qe(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}r.tween=i}}function wv(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Fe(this.node(),n).tween,i=0,r=o.length,a;i<r;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((t==null?yv:_v)(n,e,t))}function di(e,t,n){var o=e._id;return e.each(function(){var i=qe(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,o).value[t]}}function ts(e,t){var n;return(typeof t=="number"?it:t instanceof nn?hr:(n=nn(t))?(t=n,hr):tv)(e,t)}function bv(e){return function(){this.removeAttribute(e)}}function xv(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ev(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttribute(e);return a===i?null:a===o?r:r=t(o=a,n)}}function Sv(e,t,n){var o,i=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?r:r=t(o=a,n)}}function Nv(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function Mv(e,t,n){var o,i,r;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s)))}}function kv(e,t){var n=ro(e),o=n==="transform"?rv:ts;return this.attrTween(e,typeof t=="function"?(n.local?Mv:Nv)(n,o,di(this,"attr."+e,t)):t==null?(n.local?xv:bv)(n):(n.local?Sv:Ev)(n,o,t))}function Cv(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function $v(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Av(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&$v(e,r)),n}return i._value=t,i}function Tv(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Cv(e,r)),n}return i._value=t,i}function Iv(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=ro(e);return this.tween(n,(o.local?Av:Tv)(o,t))}function Pv(e,t){return function(){ci(this,e).delay=+t.apply(this,arguments)}}function Dv(e,t){return t=+t,function(){ci(this,e).delay=t}}function zv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Pv:Dv)(t,e)):Fe(this.node(),t).delay}function Ov(e,t){return function(){qe(this,e).duration=+t.apply(this,arguments)}}function Bv(e,t){return t=+t,function(){qe(this,e).duration=t}}function Vv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ov:Bv)(t,e)):Fe(this.node(),t).duration}function Rv(e,t){if(typeof t!="function")throw new Error;return function(){qe(this,e).ease=t}}function Hv(e){var t=this._id;return arguments.length?this.each(Rv(t,e)):Fe(this.node(),t).ease}function Fv(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;qe(this,e).ease=n}}function Lv(e){if(typeof e!="function")throw new Error;return this.each(Fv(this._id,e))}function Gv(e){typeof e!="function"&&(e=za(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],a=r.length,s=o[i]=[],l,u=0;u<a;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&s.push(l);return new tt(o,this._parents,this._name,this._id)}function Yv(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),s=0;s<r;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<o;++s)a[s]=t[s];return new tt(a,this._parents,this._name,this._id)}function Xv(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Uv(e,t,n){var o,i,r=Xv(t)?ci:qe;return function(){var a=r(this,e),s=a.on;s!==o&&(i=(o=s).copy()).on(t,n),a.on=i}}function Zv(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(Uv(n,e,t))}function qv(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Wv(){return this.on("end.remove",qv(this._id))}function Kv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ai(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var s=o[a],l=s.length,u=r[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,so(u[f],t,n,f,u,Fe(c,n)));return new tt(r,this._parents,t,n)}function Jv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Da(e));for(var o=this._groups,i=o.length,r=[],a=[],s=0;s<i;++s)for(var l=o[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,E=Fe(c,n),g=0,v=f.length;g<v;++g)(h=f[g])&&so(h,t,n,g,f,E);r.push(f),a.push(c)}return new tt(r,a,t,n)}var Qv=sn.prototype.constructor;function jv(){return new Qv(this._groups,this._parents)}function em(e,t){var n,o,i;return function(){var r=Pt(this,e),a=(this.style.removeProperty(e),Pt(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}function ns(e){return function(){this.style.removeProperty(e)}}function tm(e,t,n){var o,i=n+"",r;return function(){var a=Pt(this,e);return a===i?null:a===o?r:r=t(o=a,n)}}function nm(e,t,n){var o,i,r;return function(){var a=Pt(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Pt(this,e))),a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,s))}}function om(e,t){var n,o,i,r="style."+t,a="end."+r,s;return function(){var l=qe(this,e),u=l.on,c=l.value[r]==null?s||(s=ns(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(a,i=c),l.on=o}}function im(e,t,n){var o=(e+="")=="transform"?iv:ts;return t==null?this.styleTween(e,em(e,o)).on("end.style."+e,ns(e)):typeof t=="function"?this.styleTween(e,nm(e,o,di(this,"style."+e,t))).each(om(this._id,e)):this.styleTween(e,tm(e,o,t),n).on("end.style."+e,null)}function rm(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function am(e,t,n){var o,i;function r(){var a=t.apply(this,arguments);return a!==i&&(o=(i=a)&&rm(e,a,n)),o}return r._value=t,r}function sm(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,am(e,t,n??""))}function lm(e){return function(){this.textContent=e}}function um(e){return function(){var t=e(this);this.textContent=t??""}}function cm(e){return this.tween("text",typeof e=="function"?um(di(this,"text",e)):lm(e==null?"":e+""))}function dm(e){return function(t){this.textContent=e.call(this,t)}}function fm(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&dm(i)),t}return o._value=e,o}function hm(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,fm(e))}function gm(){for(var e=this._name,t=this._id,n=os(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Fe(l,t);so(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tt(o,this._parents,e,n)}function pm(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--i===0&&r()}};n.each(function(){var u=qe(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&r()})}var vm=0;function tt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function os(){return++vm}var Ke=sn.prototype;tt.prototype={constructor:tt,select:Kv,selectAll:Jv,selectChild:Ke.selectChild,selectChildren:Ke.selectChildren,filter:Gv,merge:Yv,selection:jv,transition:gm,call:Ke.call,nodes:Ke.nodes,node:Ke.node,size:Ke.size,empty:Ke.empty,each:Ke.each,on:Zv,attr:kv,attrTween:Iv,style:im,styleTween:sm,text:cm,textTween:hm,remove:Wv,tween:wv,delay:zv,duration:Vv,ease:Hv,easeVarying:Lv,end:pm,[Symbol.iterator]:Ke[Symbol.iterator]};function mm(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ym={time:null,delay:0,duration:250,ease:mm};function _m(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function wm(e){var t,n;e instanceof tt?(t=e._id,e=e._name):(t=os(),(n=ym).time=ui(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a=o[r],s=a.length,l,u=0;u<s;++u)(l=a[u])&&so(l,e,t,u,a,n||_m(l,t));return new tt(o,this._parents,e,t)}sn.prototype.interrupt=mv;sn.prototype.transition=wm;function Xt(e,t,n){this.k=e,this.x=t,this.y=n}Xt.prototype={constructor:Xt,scale:function(e){return e===1?this:new Xt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Xt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Xt.prototype;const bm={class:"nc-icon",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},xm=de("path",{fill:"currentColor",d:"M3 21v-5h2v3h3v2zm13 0v-2h3v-3h2v5zM3 8V3h5v2H5v3zm16 0V5h-3V3h5v5z"},null,-1),Em=[xm];function Sm(e,t){return G(),oe("svg",bm,[...Em])}const Nm={name:"material-symbols-fullscreen",render:Sm},Mm={class:"nc-icon",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},km=de("path",{fill:"currentColor",d:"M6 21v-3H3v-2h5v5zm10 0v-5h5v2h-3v3zM3 8V6h3V3h2v5zm13 0V3h2v3h3v2z"},null,-1),Cm=[km];function $m(e,t){return G(),oe("svg",Mm,[...Cm])}const Am={name:"material-symbols-fullscreen-exit",render:$m},Tm={class:"flex"},Im=he({__name:"FullScreenToggle",props:{config:{}},emits:["toggleFullScreen"],setup(e,{emit:t}){const n=e,o=t,{config:i}=Cr(n),r=()=>{o("toggleFullScreen")};return(a,s)=>(G(),be(C(oo),{class:"text-xs bg-white border-1 rounded-md p-2 border-gray-200 z-50 nc-erd-histogram cursor-pointer hover:bg-gray-100 shadow-md",position:C(io).BottomRight},{default:Ie(()=>[de("div",Tm,[C(i).isFullScreen?(G(),be(C(Am),{key:0,class:"h-5 w-5",onClick:r})):(G(),be(C(Nm),{key:1,class:"h-5 w-5",onClick:r}))])]),_:1},8,["position"]))}}),Pm={class:"flex items-center gap-2"},Dm={class:"flex items-center gap-2"},zm={class:"select-none nc-erd-config-option-label"},Om={key:0,class:"flex items-center gap-2"},Bm={class:"select-none nc-erd-config-option-label"},Vm={key:1,class:"flex flex-row items-center"},Rm={class:"ml-2 select-none nc-erd-config-option-label"},Hm={key:2,class:"flex items-center gap-2"},Fm={class:"select-none nc-erd-config-option-label"},Lm=he({__name:"ConfigPanel",props:{config:{}},setup(e){const t=e,{includeM2M:n}=cs(),o=ds(t,"config"),i=fe(!1);return(r,a)=>{const s=Es,l=fs("e");return G(),be(C(oo),{class:"flex flex-col gap-y-1 bg-white border-1 rounded-lg border-gray-200 z-50 px-3 py-2 nc-erd-context-menu shadow-md",position:C(io).TopRight},{default:Ie(()=>[de("div",Pm,[Bt(xe(s,{checked:C(o).showAllColumns,"onUpdate:checked":a[0]||(a[0]=u=>C(o).showAllColumns=u),class:"nc-erd-showColumns-checkbox"},null,8,["checked"]),[[l,["c:erd:showAllColumns"]]]),de("span",{class:"select-none nc-erd-config-option-label nc-erd-showColumns-label text-xs",onDblclick:a[1]||(a[1]=u=>i.value=!0)},Ge(r.$t("activity.erd.showColumns")),33)]),de("div",Dm,[Bt(xe(s,{checked:C(o).showPkAndFk,"onUpdate:checked":a[2]||(a[2]=u=>C(o).showPkAndFk=u),class:je(["nc-erd-showPkAndFk-checkbox",[`nc-erd-showPkAndFk-checkbox-${C(o).showAllColumns?"enabled":"disabled"}`,`nc-erd-showPkAndFk-checkbox-${C(o).showPkAndFk?"checked":"unchecked"}`]]),disabled:!C(o).showAllColumns},null,8,["checked","class","disabled"]),[[l,["c:erd:showPkAndFk"]]]),de("span",zm,Ge(r.$t("activity.erd.showPkAndFk")),1)]),C(o).singleTableMode?we("",!0):(G(),oe("div",Om,[Bt(xe(s,{checked:C(o).showViews,"onUpdate:checked":a[3]||(a[3]=u=>C(o).showViews=u),class:"nc-erd-showViews-checkbox"},null,8,["checked"]),[[l,["c:erd:showViews"]]]),de("span",Bm,Ge(r.$t("activity.erd.showSqlViews")),1)])),!C(o).singleTableMode&&C(i)&&C(n)?(G(),oe("div",Vm,[Bt(xe(s,{checked:C(o).showMMTables,"onUpdate:checked":a[4]||(a[4]=u=>C(o).showMMTables=u),class:"nc-erd-showMMTables-checkbox"},null,8,["checked"]),[[l,["c:erd:showMMTables"]]]),de("span",Rm,Ge(r.$t("activity.erd.showMMTables")),1)])):we("",!0),C(i)&&C(n)?(G(),oe("div",Hm,[Bt(xe(s,{checked:C(o).showJunctionTableNames,"onUpdate:checked":a[5]||(a[5]=u=>C(o).showJunctionTableNames=u),class:"nc-erd-showJunctionTableNames-checkbox"},null,8,["checked"]),[[l,["c:erd:showJunctionTableNames"]]]),de("span",Fm,Ge(r.$t("activity.erd.showJunctionTableNames")),1)])):we("",!0)]),_:1},8,["position"])}}}),Gm=hs(Lm,[["__scopeId","data-v-86453fd1"]]),Ym={class:"flex flex-col"},Xm={class:"flex items-center gap-1.5 p-2"},Um={class:"flex items-center gap-1.5 p-2"},Zm=he({__name:"HistogramPanel",setup(e){return(t,n)=>(G(),be(C(oo),{class:"text-xs bg-white border-1 rounded border-gray-200 shadow-md p-1.5 z-50 nc-erd-histogram",position:C(io).TopLeft},{default:Ie(()=>[de("div",Ym,[de("div",Xm,[(G(),be(rt(("iconMap"in t?t.iconMap:C(fi)).table),{class:"!text-gray-600/75"})),de("div",null,Ge(t.$t("objects.table")),1)]),de("div",Um,[(G(),be(rt(("iconMap"in t?t.iconMap:C(fi)).eye))),de("div",null,Ge(t.$t("objects.sqlVIew")),1)])])]),_:1},8,["position"]))}}),qm=ws(()=>bs(()=>import("./DaSR3TNr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url).then(e=>e.default||e)),Wm={class:"relative h-full"},Km={class:"h-full w-full flex flex-col justify-center items-center"},i0=he({__name:"View",props:{sourceId:{type:String,default:""},table:{type:Object,default:null},showAllColumns:{type:Boolean,default:!0},baseId:{type:String,default:void 0}},setup(e){const t=e,{bases:n}=lo(gs()),{base:o}=lo(ps()),i=se(()=>t.baseId??o.value.id),r=vs(),{baseTables:a}=lo(r),s=se(()=>a.value.get(i.value)??[]),l=se(()=>{var y;return((y=n.value.get(i.value))==null?void 0:y.sources)||[]}),{metas:u,getMeta:c}=ms(),d=fe([]),f=fe(!0),h=Mr({showPkAndFk:!0,showViews:!1,showAllColumns:t.showAllColumns,singleTableMode:!!t.table,showMMTables:!1,showJunctionTableNames:!1,isFullScreen:!1}),E=async y=>{const x=async z=>{await Promise.all(z.map(async w=>{await c(w.id)}))},M=y.filter(z=>!u.value[z.id]&&z.source_id===t.sourceId);for(let z=0;z<M.length;z+=5){const w=M.slice(z,z+5);await x(w)}},g=async()=>{let y=[];if(t.table){const S=await c(t.table.id);y=s.value.filter(x=>{var M,z;return x.id===((M=t.table)==null?void 0:M.id)||((z=S.columns)==null?void 0:z.find(w=>{var H;return ys(w.uidt)&&((H=w.colOptions)==null?void 0:H.fk_related_model_id)===x.id}))})}else y=s.value;await E(y),d.value=y.filter(S=>{var x;return h.showMMTables||!h.showMMTables&&!S.mm||S.id===((x=t.table)==null?void 0:x.id)}).filter(S=>h.singleTableMode||!h.showViews&&S.type!=="view"||h.showViews),f.value=!1},v=()=>{h.isFullScreen=!h.isFullScreen};ge([u,s],g,{flush:"post",immediate:!0}),ge(h,g,{flush:"post",deep:!0});const b=se(()=>d.value.filter(y=>{var S;return t!=null&&t.sourceId?y.source_id===t.sourceId:y.source_id===((S=l.value)==null?void 0:S.filter(x=>x.enabled)[0].id)}));return ge(()=>h.showAllColumns,()=>{h.showPkAndFk=h.showAllColumns}),wt(async()=>{t.baseId&&(a.value.get(t.baseId)||await r.loadProjectTables(t.baseId))}),(y,S)=>{const x=_s,M=xs,z=Im,w=Gm,H=Zm,R=qm;return G(),oe("div",{class:je(["w-full bg-white border-1 border-gray-100 rounded-lg",{"z-100 h-screen w-screen fixed top-0 left-0 right-0 bottom-0":C(h).isFullScreen,"nc-erd-vue-flow-single-table":C(h).singleTableMode,"nc-erd-vue-flow":!C(h).singleTableMode}]),style:ze(C(h).isFullScreen?"":"height: inherit")},[de("div",Wm,[xe(R,{tables:C(b),config:C(h)},{default:Ie(()=>[xe(M,{modelValue:C(f),"onUpdate:modelValue":S[0]||(S[0]=X=>Yn(f)?f.value=X:null),inline:"",class:"bg-gray-300/50"},{default:Ie(()=>[de("div",Km,[xe(x,{size:"large"})])]),_:1},8,["modelValue"]),xe(z,{config:C(h),onToggleFullScreen:v},null,8,["config"]),xe(w,{config:C(h)},null,8,["config"]),C(h).singleTableMode?we("",!0):(G(),be(H,{key:0}))]),_:1},8,["tables","config"])])],6)}}});export{n0 as G,To as M,oo as O,Q as P,io as R,o0 as W,i0 as _,Bn as a,e0 as b,yt as c,t0 as d,$a as g,ft as i,_e as u};
|