@layers-app/editor 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +37 -1
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +2 -2
  5. package/dist/{layers.C3-Awt80.js → layers.0GV8bqI4.js} +6 -6
  6. package/dist/{layers.B51TBzz6.js → layers.2-v72gXD.js} +1 -1
  7. package/dist/{layers.DBgQS_TD.js → layers.271NUg7u.js} +1 -1
  8. package/dist/{layers.C00McVdb.js → layers.2YgiancJ.js} +1 -1
  9. package/dist/{layers.DiAtOpGJ.js → layers.3DEO2eFX.js} +1 -1
  10. package/dist/{layers._uJVChzG.js → layers.3PKeLS62.js} +6 -6
  11. package/dist/{layers.Bxuc5Ku1.js → layers.6M02Y2O6.js} +1 -1
  12. package/dist/{layers.Ctcl9I58.js → layers.7DTJccah.js} +3 -3
  13. package/dist/{layers.BGXN8iGN.js → layers.7geZ_Z3x.js} +1 -1
  14. package/dist/{layers.Q933nYVT.js → layers.88aO_Zsd.js} +2 -2
  15. package/dist/{layers.BVhV_yLo.js → layers.8hFVbiPY.js} +12 -12
  16. package/dist/{layers.TP-LPR2e.js → layers.9KaBpXFA.js} +5 -5
  17. package/dist/layers.AIKsYMqL.js +8 -0
  18. package/dist/{layers.CEW7Z5oj.js → layers.B-0J3b5U.js} +1 -1
  19. package/dist/{layers.DMXwnUhk.js → layers.B4yEsxVs.js} +1 -1
  20. package/dist/{layers.DGfERl47.js → layers.B5Xhxhbr.js} +1 -1
  21. package/dist/{layers.C6ueRaWn.js → layers.B6jgTP72.js} +1 -1
  22. package/dist/{layers.Dr9AgtBT.js → layers.B8a2ydDI.js} +2 -2
  23. package/dist/layers.B9EoV4pJ.js +1 -0
  24. package/dist/{layers.BU0ouPbJ.js → layers.BAI7Z-Wd.js} +1 -1
  25. package/dist/{layers.NLvydYLt.js → layers.BB24KMYM.js} +6 -6
  26. package/dist/{layers.DlH0lUyY.js → layers.BBWAKePM.js} +1 -1
  27. package/dist/{layers.C6FZDcP0.js → layers.BBWcXYuR.js} +1 -1
  28. package/dist/{layers.BVLHr0fv.js → layers.BC3JkNtz.js} +4 -4
  29. package/dist/{layers.oLym9I6R.js → layers.BFKY-mk1.js} +1 -1
  30. package/dist/{layers.BeXV53PI.js → layers.BGnHNrIw.js} +1 -1
  31. package/dist/{layers.OqM7Ogm0.js → layers.BIF7gnlw.js} +1 -1
  32. package/dist/layers.BJDrjORS.js +244 -0
  33. package/dist/{layers.BdxgA5Mh.js → layers.BJtqK_fc.js} +1 -1
  34. package/dist/layers.BLMsv5-v.js +295 -0
  35. package/dist/layers.BLd2spTm.js +1 -0
  36. package/dist/{layers.CP7ZgLdQ.js → layers.BLj5XN2k.js} +4 -4
  37. package/dist/{layers.Dr-_us97.js → layers.BMzZVoyQ.js} +1 -1
  38. package/dist/{layers.9--aZzKT.js → layers.BN0X-mKK.js} +1 -1
  39. package/dist/{layers.D3PBqBbY.js → layers.BNP0J0MG.js} +1 -1
  40. package/dist/{layers.D37kPodI.js → layers.BQgrfzZU.js} +1 -1
  41. package/dist/{layers.CX4-2iW9.js → layers.BRFujA4d.js} +1 -1
  42. package/dist/{layers.BIATzXuT.js → layers.BSXvhEG5.js} +1 -1
  43. package/dist/{layers.j4D7aRnj.js → layers.BSzdascH.js} +1 -1
  44. package/dist/{layers.BXGZ-IPG.js → layers.BTsJAbTY.js} +1 -1
  45. package/dist/{layers.DsIrXvQc.js → layers.BUpmCmqT.js} +1 -1
  46. package/dist/{layers.Cmeg2JEe.js → layers.BVAnEpZl.js} +1 -1
  47. package/dist/{layers.DRd1i4Pe.js → layers.BW84v3Ox.js} +2 -2
  48. package/dist/layers.B_Lan92M.js +1 -0
  49. package/dist/{layers.l7Uj4NoM.js → layers.BaW-t_Zc.js} +1 -1
  50. package/dist/{layers.BR9erYvc.js → layers.BapT0txt.js} +1 -1
  51. package/dist/{layers.BK7Umu5k.js → layers.BdqQLuaK.js} +1 -1
  52. package/dist/{layers.CZianMah.js → layers.Bdwk_Ggl.js} +1 -1
  53. package/dist/{layers.DIW19mY0.js → layers.Bg7-KHZC.js} +3 -3
  54. package/dist/{layers._uHasBFO.js → layers.BkFD_pHb.js} +1 -1
  55. package/dist/{layers.C8WU47YC.js → layers.BlN6GnRT.js} +1 -1
  56. package/dist/{layers.C8Lyyff8.js → layers.Bm84E1I5.js} +1 -1
  57. package/dist/{layers.Doo3HAhr.js → layers.Bo3tMbEB.js} +1 -1
  58. package/dist/{layers.BATSJhNp.js → layers.BoOcWXFs.js} +1 -1
  59. package/dist/{layers.CusXQPSP.js → layers.BrHN_kMd.js} +1 -1
  60. package/dist/{layers.B4Jcovwh.js → layers.BruMG2wy.js} +1 -1
  61. package/dist/{layers.Cg0Puk92.js → layers.BsWPnWD1.js} +1 -1
  62. package/dist/{layers.99J97lec.js → layers.Bu9ZoRYM.js} +1 -1
  63. package/dist/{layers.DSiVxrm-.js → layers.BvjpCDHj.js} +1 -1
  64. package/dist/{layers.P0RFt4vw.js → layers.Bwb7QBBL.js} +1 -1
  65. package/dist/{layers.BoUDsd20.js → layers.Bx0DgrIz.js} +1 -1
  66. package/dist/{layers.CJdGap0M.js → layers.By8wynAO.js} +1 -1
  67. package/dist/{layers.B2AGu32C.js → layers.C0Lgw_Sx.js} +1107 -1111
  68. package/dist/{layers.Ih_DycCa.js → layers.C3me1AOA.js} +3 -3
  69. package/dist/{layers.DOjcR2u6.js → layers.C5XL_KJW.js} +1 -1
  70. package/dist/{layers.wRnSjyfZ.js → layers.C65tYhLf.js} +1 -1
  71. package/dist/{layers.DKhnUElF.js → layers.C67fBVg3.js} +1 -1
  72. package/dist/{layers.B7uv8aVq.js → layers.C6HmVi2T.js} +1 -1
  73. package/dist/{layers.BL7PsAnh.js → layers.C8oO_BiQ.js} +1 -1
  74. package/dist/{layers.CdPjGs2x.js → layers.C9AvvTRV.js} +1 -1
  75. package/dist/{layers.CXoz8wje.js → layers.CA3DQGmO.js} +1 -1
  76. package/dist/{layers.Clo5oIEO.js → layers.CCoWlQxf.js} +1 -1
  77. package/dist/{layers.CeESKes4.js → layers.CCy49ah1.js} +1 -1
  78. package/dist/{layers.OF4XgnEn.js → layers.CDftR5Kg.js} +2 -2
  79. package/dist/{layers.BHEN4Zl8.js → layers.CDw-iNbj.js} +1 -1
  80. package/dist/{layers.De4i5Pzr.js → layers.CEDfv2oj.js} +1 -1
  81. package/dist/{layers.DV0u_-wO.js → layers.CGeTu6ph.js} +1 -1
  82. package/dist/{layers.BOY6DvLj.js → layers.CJlWYRtk.js} +1 -1
  83. package/dist/{layers.DdULzc5-.js → layers.CKy_DRKv.js} +1 -1
  84. package/dist/{layers.Dx7QSKbZ.js → layers.COEorZbZ.js} +1 -1
  85. package/dist/{layers.CIkcRflS.js → layers.CP2_7vUR.js} +1 -1
  86. package/dist/{layers.rSvdeOjc.js → layers.CPEzOey-.js} +1 -1
  87. package/dist/{layers.hzJoyUwS.js → layers.CSY_lOK0.js} +6 -6
  88. package/dist/{layers.pRFngToG.js → layers.CT_bvOgC.js} +1 -1
  89. package/dist/{layers.CX4mdDUE.js → layers.CUWVPrVU.js} +1 -1
  90. package/dist/{layers.BChBzZgi.js → layers.CVCC2rNb.js} +1 -1
  91. package/dist/{layers.DE8kdoob.js → layers.CXbK6Z0C.js} +1 -1
  92. package/dist/{layers.gSOgK4cv.js → layers.CXzpm8-U.js} +1 -1
  93. package/dist/{layers.UPBrkQqm.js → layers.CYwLZCUi.js} +3 -3
  94. package/dist/{layers.CHMDrzTP.js → layers.CZ6FLSh1.js} +1 -1
  95. package/dist/{layers.7aWFCBDk.js → layers.CZzvHupu.js} +1 -1
  96. package/dist/{layers.C5th-3Bk.js → layers.CaZJgSbm.js} +1 -1
  97. package/dist/{layers.B5HV5CkN.js → layers.CcX1e4Cb.js} +1 -1
  98. package/dist/{layers.Bl2uWPK5.js → layers.CgHCxAKJ.js} +1 -1
  99. package/dist/{layers.HnnZ9X3g.js → layers.CgyRf-4B.js} +1 -1
  100. package/dist/{layers.rwvkqrdF.js → layers.ChtNiFGR.js} +1 -1
  101. package/dist/{layers.Cj5o49qm.js → layers.CiYt11kd.js} +1 -1
  102. package/dist/{layers.BI-S-U1z.js → layers.Cik9ty7R.js} +1 -1
  103. package/dist/{layers.PWkD3FXd.js → layers.Cizp88rb.js} +1 -1
  104. package/dist/{layers.MXTL7J0X.js → layers.Cjxg13wd.js} +24330 -23129
  105. package/dist/{layers.BkDwnhF3.js → layers.Cl6-9OBf.js} +1 -1
  106. package/dist/{layers.d0donhTp.js → layers.ClExSsZJ.js} +1 -1
  107. package/dist/{layers.BXIQjroR.js → layers.CqE1nYk3.js} +1 -1
  108. package/dist/{layers.G0qyEFRn.js → layers.CsNI3f74.js} +1 -1
  109. package/dist/{layers.C6vMG-T6.js → layers.CuAECIsO.js} +1 -1
  110. package/dist/{layers.BxCLnc_z.js → layers.CuVNrIcW.js} +1 -1
  111. package/dist/{layers.DYJhYqR2.js → layers.Cv-z4RwC.js} +1 -1
  112. package/dist/{layers.BWppdp8z.js → layers.CvPdAUZN.js} +1 -1
  113. package/dist/{layers.CyaiBxcg.js → layers.CvQiknH6.js} +1 -1
  114. package/dist/{layers.D0t24lyP.js → layers.Cwn1D7F6.js} +1 -1
  115. package/dist/{layers.CdZEenM8.js → layers.CyOP0v_-.js} +1 -1
  116. package/dist/{layers.BCtnSgBi.js → layers.CyvQNQUj.js} +1 -1
  117. package/dist/layers.Cyzu9PKQ.js +1 -0
  118. package/dist/{layers.BldgpPoA.js → layers.Cz4E3Gls.js} +8 -8
  119. package/dist/{layers.NQOujqxE.js → layers.D-rCo5dz.js} +1 -1
  120. package/dist/{layers.B5VQ5ysd.js → layers.D11yimAp.js} +7 -7
  121. package/dist/{layers.DczwzPio.js → layers.D1sBwAcX.js} +1 -1
  122. package/dist/{layers.BH9NvW2c.js → layers.D22AIgry.js} +1 -1
  123. package/dist/{layers.D3eSioXs.js → layers.D2Y56Lcj.js} +1 -1
  124. package/dist/{layers.Bf4maS9l.js → layers.D2sjiqI3.js} +1 -1
  125. package/dist/{layers.Dg_ubB5o.js → layers.D3OtVkCp.js} +1 -1
  126. package/dist/{layers.CbrkK8Nl.js → layers.D3pymTps.js} +1 -1
  127. package/dist/{layers.C4Z2eV4H.js → layers.D44d_6CD.js} +4 -4
  128. package/dist/layers.D4T8fTcj.js +1223 -0
  129. package/dist/{layers.N0KTyT8H.js → layers.D9umovmT.js} +1 -1
  130. package/dist/{layers.BkZl0e9Y.js → layers.DE-6jvOp.js} +1 -1
  131. package/dist/{layers.BzufRV9o.js → layers.DFWypiYS.js} +1 -1
  132. package/dist/{layers.DaA4pT9g.js → layers.DFZcoBfL.js} +1 -1
  133. package/dist/{layers.fjvgvmUK.js → layers.DGHPyPPP.js} +1 -1
  134. package/dist/{layers.BAe6u370.js → layers.DL_hhIIR.js} +3 -3
  135. package/dist/{layers.Cl9YbTGP.js → layers.DMkqdBNu.js} +1 -1
  136. package/dist/{layers.DYR-z4Xd.js → layers.DNpGJLyQ.js} +2 -2
  137. package/dist/{layers.CXFcyuib.js → layers.DPumOFMF.js} +1 -1
  138. package/dist/{layers.CSKgny-q.js → layers.DQ9duwtV.js} +5 -5
  139. package/dist/{layers.U8d2vvil.js → layers.DQSx2qqb.js} +1 -1
  140. package/dist/{layers.D_KjhW7m.js → layers.DRj2t11p.js} +1 -1
  141. package/dist/{layers.CKyZ6fil.js → layers.DWvD3vql.js} +6 -6
  142. package/dist/{layers.C5fqgGR6.js → layers.DXVNKM5t.js} +1 -1
  143. package/dist/{layers.-23sKdPr.js → layers.DXg_yjAg.js} +1 -1
  144. package/dist/{layers.UHdtuNW7.js → layers.DYXNu8ur.js} +1 -1
  145. package/dist/layers.Da3-MQaS.js +315 -0
  146. package/dist/{layers.Dwrpihyi.js → layers.DbEYtfVc.js} +2249 -2231
  147. package/dist/{layers.DyIa2FAJ.js → layers.Dc79Ci3K.js} +3 -3
  148. package/dist/{layers.C-S1uftF.js → layers.DdaAmsdK.js} +1 -1
  149. package/dist/{layers.CDmsB9ui.js → layers.DeGb7buU.js} +1 -1
  150. package/dist/{layers.mS0YwpDF.js → layers.DeUrAJLR.js} +4 -4
  151. package/dist/{layers.C46xOyCn.js → layers.DfLG2r9J.js} +1 -1
  152. package/dist/{layers.DuC5Q-Uc.js → layers.DfVTedYs.js} +1 -1
  153. package/dist/{layers.BLha5Ags.js → layers.DgM9vwax.js} +1 -1
  154. package/dist/layers.Dhzc98B1.js +1 -0
  155. package/dist/{layers.BId9R-tt.js → layers.Dit1Y-a1.js} +1 -1
  156. package/dist/{layers.BXe2f2v0.js → layers.Dj4g5Vb5.js} +1 -1
  157. package/dist/{layers.6xiY7Dmk.js → layers.DkOYepgq.js} +1 -1
  158. package/dist/{layers.Dq7WsWG1.js → layers.Dld8CjhI.js} +1 -1
  159. package/dist/{layers.DEMbeDH5.js → layers.Dlp-dPD8.js} +28 -28
  160. package/dist/{layers.DnvdN9TC.js → layers.DlrAk6DA.js} +1 -1
  161. package/dist/{layers.Bxx3QiqH.js → layers.Dm5fcqXE.js} +1 -1
  162. package/dist/{layers.CHE9Vv0w.js → layers.DpuQVg48.js} +1 -1
  163. package/dist/{layers.B16HCOzz.js → layers.DqT5Jouj.js} +1 -1
  164. package/dist/{layers.CJgtfrlM.js → layers.DrlOZ3DT.js} +1 -1
  165. package/dist/{layers.BQ5pHr1t.js → layers.DsSMSFyE.js} +1 -1
  166. package/dist/layers.DtcuZ6vs.js +187 -0
  167. package/dist/{layers.CAZF51iw.js → layers.DuGoIpLS.js} +5 -5
  168. package/dist/{layers.BTjqsj2D.js → layers.DxS_nrN5.js} +1 -1
  169. package/dist/{layers.xbymChc4.js → layers.DxhSwb8B.js} +320 -319
  170. package/dist/{layers.rK-vslvx.js → layers.DxwOJMY_.js} +1 -1
  171. package/dist/{layers.D0fuzbA_.js → layers.DyPFKCS6.js} +3 -3
  172. package/dist/{layers.Ck_m9yBu.js → layers.DyydDZDU.js} +1 -1
  173. package/dist/{layers.ChLLCYeV.js → layers.GaSOetZx.js} +1 -1
  174. package/dist/{layers.O7rgjuxq.js → layers.IAZiYFRK.js} +1 -1
  175. package/dist/layers.JgqeK3h7.js +1 -0
  176. package/dist/layers.K2rcpzhY.js +4 -0
  177. package/dist/{layers.BCMyc6dl.js → layers.KIWs25tZ.js} +1 -1
  178. package/dist/{layers.BiK_NhRx.js → layers.LLke4z7b.js} +1 -1
  179. package/dist/{layers.B1VWPJr7.js → layers.Marfmnqs.js} +1 -1
  180. package/dist/{layers.2Zh_Eqge.js → layers.OFho5MbN.js} +1 -1
  181. package/dist/layers.R8QN7W65.js +1 -0
  182. package/dist/{layers.CESONz7C.js → layers.RT_eBoD-.js} +1 -1
  183. package/dist/{layers.BgXRgBMD.js → layers.SbloXQp4.js} +1 -1
  184. package/dist/{layers.ShoHTpWp.js → layers.SvUN62A9.js} +1 -1
  185. package/dist/{layers.CENOzW4d.js → layers.TGEy1wS6.js} +1 -1
  186. package/dist/{layers.DhtUpSvn.js → layers.TdE-jeZL.js} +1 -1
  187. package/dist/{layers.C5pjkDUm.js → layers.UWRNxgT8.js} +1 -1
  188. package/dist/{layers.B4o4Yght.js → layers.VA5efHzM.js} +1 -1
  189. package/dist/layers._2_sfSMa.js +1 -0
  190. package/dist/{layers.D-4MyOv6.js → layers.ajIRcGd4.js} +1 -1
  191. package/dist/{layers.BvQfT02S.js → layers.cjE12qw2.js} +1 -1
  192. package/dist/{layers.BNcxqXDY.js → layers.dJvyCZ1b.js} +1 -1
  193. package/dist/{layers.h2SsCt7w.js → layers.da887to_.js} +1 -1
  194. package/dist/{layers.B9ypkXfB.js → layers.dhxVHEDE.js} +1 -1
  195. package/dist/{layers.BkkBEMI4.js → layers.ejvu1U9t.js} +1 -1
  196. package/dist/{layers.C7md-mpb.js → layers.epvyXTdV.js} +5 -5
  197. package/dist/layers.fm_nJlxH.js +6 -0
  198. package/dist/{layers.xlbtHZsv.js → layers.guGfRsPS.js} +1 -1
  199. package/dist/layers.hweLqW3I.js +261 -0
  200. package/dist/{layers.BmdNYA8O.js → layers.j04tfCKj.js} +1 -1
  201. package/dist/{layers.C5vdiuk-.js → layers.kzDq9Q-l.js} +1 -1
  202. package/dist/{layers.B1GsQlw2.js → layers.ldz4asX5.js} +6 -6
  203. package/dist/{layers.BaREUEpY.js → layers.ov1rbOW3.js} +1 -1
  204. package/dist/{layers.CK15u90j.js → layers.pHVqEwm3.js} +1 -1
  205. package/dist/{layers.D56jgM5P.js → layers.rgYI6gus.js} +2 -2
  206. package/dist/{layers.BjIrZvhA.js → layers.sTUiyAuM.js} +1 -1
  207. package/dist/{layers.DIsd_eLu.js → layers.uMaAjCOP.js} +5 -5
  208. package/dist/{layers.Dpl-_pRd.js → layers.vJ0fdhPp.js} +78 -78
  209. package/dist/{layers.ChG4YWfr.js → layers.vqKLXMfn.js} +1 -1
  210. package/dist/{layers.DyrpParn.js → layers.wSBHMHgW.js} +1 -1
  211. package/dist/{layers.Dms1jgA7.js → layers.yquOOwF7.js} +1 -1
  212. package/dist/{layers.Bqy_BDRk.js → layers.zJTwyIu5.js} +1 -1
  213. package/package.json +6 -7
  214. package/dist/layers.9QK1wiQj.js +0 -1
  215. package/dist/layers.BIj1zRV6.js +0 -8
  216. package/dist/layers.Bgx4q6Yl.js +0 -1
  217. package/dist/layers.C7lIplJU.js +0 -247
  218. package/dist/layers.COAF7f8g.js +0 -1
  219. package/dist/layers.CQ_KfkMs.js +0 -1
  220. package/dist/layers.CXnC6LGK.js +0 -1
  221. package/dist/layers.CebNnxUV.js +0 -185
  222. package/dist/layers.Cs24L6er.js +0 -261
  223. package/dist/layers.Cuf8LL65.js +0 -4
  224. package/dist/layers.D4fGb2cV.js +0 -1272
  225. package/dist/layers.DGhEo4ps.js +0 -6
  226. package/dist/layers.DHbgl38J.js +0 -1
  227. package/dist/layers.DcGuLvyP.js +0 -1
  228. package/dist/layers.Y1n_hIuc.js +0 -1
  229. package/dist/layers.b_l02tem.js +0 -319
  230. package/dist/layers.pGJnLNqj.js +0 -285
@@ -1,52 +1,53 @@
1
- import { f as W, p as kt } from "./layers.D-4MyOv6.js";
2
- import { d as b, a0 as P, l as D, g as R, Y as St, _ as z, $ as V, t as j, V as tt, j as et } from "./layers.Dwrpihyi.js";
3
- import * as g from "lodash-es";
4
- import { l as Lt } from "./layers.D4fGb2cV.js";
5
- import { G as _t } from "./layers.C7lIplJU.js";
6
- import { b as N, c as rt, i as at, d as E, e as nt, g as st, f as Et, a as Tt, s as Nt } from "./layers.C4Z2eV4H.js";
7
- import { l as At } from "./layers.CZianMah.js";
8
- import "./layers.BldgpPoA.js";
9
- function Ct(r) {
1
+ import { f as $, p as St } from "./layers.ajIRcGd4.js";
2
+ import { d as x, a0 as G, l as M, g as D, Y as Lt, _ as V, $ as W, t as Z, V as tt, j as et } from "./layers.DbEYtfVc.js";
3
+ import * as rt from "lodash-es";
4
+ import { pick as _t, defaults as I } from "lodash-es";
5
+ import { l as Et } from "./layers.D4T8fTcj.js";
6
+ import { G as Tt } from "./layers.BJDrjORS.js";
7
+ import { b as T, c as at, i as nt, d as _, e as st, g as it, f as Nt, a as At, s as Pt } from "./layers.D44d_6CD.js";
8
+ import { l as Ct } from "./layers.Bdwk_Ggl.js";
9
+ import "./layers.Cz4E3Gls.js";
10
+ function It(r) {
10
11
  if (!r.ok) throw new Error(r.status + " " + r.statusText);
11
12
  return r.text();
12
13
  }
13
- function It(r, e) {
14
- return fetch(r, e).then(Ct);
14
+ function Bt(r, e) {
15
+ return fetch(r, e).then(It);
15
16
  }
16
- function Bt(r) {
17
- return (e, t) => It(e, t).then((n) => new DOMParser().parseFromString(n, r));
17
+ function Mt(r) {
18
+ return (e, t) => Bt(e, t).then((n) => new DOMParser().parseFromString(n, r));
18
19
  }
19
- var Mt = Bt("image/svg+xml"), Y = {
20
- normal: Rt,
21
- vee: Gt,
22
- undirected: Pt
20
+ var Dt = Mt("image/svg+xml"), z = {
21
+ normal: Gt,
22
+ vee: Ot,
23
+ undirected: Ut
23
24
  };
24
- function Dt(r) {
25
- Y = r;
25
+ function Rt(r) {
26
+ z = r;
26
27
  }
27
- function Rt(r, e, t, n) {
28
+ function Gt(r, e, t, n) {
28
29
  var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
29
- N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
30
+ T(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
30
31
  }
31
- function Gt(r, e, t, n) {
32
+ function Ot(r, e, t, n) {
32
33
  var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
33
- N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
34
+ T(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
34
35
  }
35
- function Pt(r, e, t, n) {
36
+ function Ut(r, e, t, n) {
36
37
  var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
37
- N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
38
+ T(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
38
39
  }
39
- function Ut(r, e) {
40
+ function $t(r, e) {
40
41
  var t = r;
41
- return t.node().appendChild(e.label), N(t, e.labelStyle), t;
42
+ return t.node().appendChild(e.label), T(t, e.labelStyle), t;
42
43
  }
43
- function $t(r, e) {
44
- for (var t = r.append("text"), n = Wt(e.label).split(`
44
+ function Wt(r, e) {
45
+ for (var t = r.append("text"), n = Vt(e.label).split(`
45
46
  `), a = 0; a < n.length; a++)
46
47
  t.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(n[a]);
47
- return N(t, e.labelStyle), t;
48
+ return T(t, e.labelStyle), t;
48
49
  }
49
- function Wt(r) {
50
+ function Vt(r) {
50
51
  for (var e = "", t = !1, n, a = 0; a < r.length; ++a)
51
52
  if (n = r[a], t) {
52
53
  switch (n) {
@@ -61,9 +62,9 @@ function Wt(r) {
61
62
  } else n === "\\" ? t = !0 : e += n;
62
63
  return e;
63
64
  }
64
- function K(r, e, t) {
65
+ function q(r, e, t) {
65
66
  var n = e.label, a = r.append("g");
66
- e.labelType === "svg" ? Ut(a, e) : typeof n != "string" || e.labelType === "html" ? rt(a, e) : $t(a, e);
67
+ e.labelType === "svg" ? $t(a, e) : typeof n != "string" || e.labelType === "html" ? at(a, e) : Wt(a, e);
67
68
  var s = a.node().getBBox(), i;
68
69
  switch (t) {
69
70
  case "top":
@@ -77,152 +78,152 @@ function K(r, e, t) {
77
78
  }
78
79
  return a.attr("transform", "translate(" + -s.width / 2 + "," + i + ")"), a;
79
80
  }
80
- var H = function(r, e) {
81
+ var Y = function(r, e) {
81
82
  var t = e.nodes().filter(function(s) {
82
- return at(e, s);
83
+ return nt(e, s);
83
84
  }), n = r.selectAll("g.cluster").data(t, function(s) {
84
85
  return s;
85
86
  });
86
- E(n.exit(), e).style("opacity", 0).remove();
87
+ _(n.exit(), e).style("opacity", 0).remove();
87
88
  var a = n.enter().append("g").attr("class", "cluster").attr("id", function(s) {
88
89
  var i = e.node(s);
89
90
  return i.id;
90
91
  }).style("opacity", 0).each(function(s) {
91
- var i = e.node(s), o = b(this);
92
- b(this).append("rect");
92
+ var i = e.node(s), o = x(this);
93
+ x(this).append("rect");
93
94
  var c = o.append("g").attr("class", "label");
94
- K(c, i, i.clusterLabelPos);
95
+ q(c, i, i.clusterLabelPos);
95
96
  });
96
- return n = n.merge(a), n = E(n, e).style("opacity", 1), n.selectAll("rect").each(function(s) {
97
- var i = e.node(s), o = b(this);
98
- N(o, i.style);
97
+ return n = n.merge(a), n = _(n, e).style("opacity", 1), n.selectAll("rect").each(function(s) {
98
+ var i = e.node(s), o = x(this);
99
+ T(o, i.style);
99
100
  }), n;
100
101
  };
101
- function Vt(r) {
102
- H = r;
102
+ function zt(r) {
103
+ Y = r;
103
104
  }
104
- let X = function(r, e) {
105
+ let H = function(r, e) {
105
106
  var t = r.selectAll("g.edgeLabel").data(e.edges(), function(a) {
106
- return nt(a);
107
+ return st(a);
107
108
  }).classed("update", !0);
108
109
  t.exit().remove(), t.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), t = r.selectAll("g.edgeLabel"), t.each(function(a) {
109
- var s = b(this);
110
+ var s = x(this);
110
111
  s.select(".label").remove();
111
- var i = e.edge(a), o = K(s, e.edge(a), 0).classed("label", !0), c = o.node().getBBox();
112
- i.labelId && o.attr("id", i.labelId), g.has(i, "width") || (i.width = c.width), g.has(i, "height") || (i.height = c.height);
112
+ var i = e.edge(a), o = q(s, e.edge(a), 0).classed("label", !0), c = o.node().getBBox();
113
+ i.labelId && o.attr("id", i.labelId), Object.prototype.hasOwnProperty.call(i, "width") || (i.width = c.width), Object.prototype.hasOwnProperty.call(i, "height") || (i.height = c.height);
113
114
  });
114
115
  var n;
115
- return t.exit ? n = t.exit() : n = t.selectAll(null), E(n, e).style("opacity", 0).remove(), t;
116
+ return t.exit ? n = t.exit() : n = t.selectAll(null), _(n, e).style("opacity", 0).remove(), t;
116
117
  };
117
- function zt(r) {
118
- X = r;
118
+ function Yt(r) {
119
+ H = r;
119
120
  }
120
- function Z(r, e) {
121
+ function K(r, e) {
121
122
  return r.intersect(e);
122
123
  }
123
- var F = function(r, e, t) {
124
+ var X = function(r, e, t) {
124
125
  var n = r.selectAll("g.edgePath").data(e.edges(), function(i) {
125
- return nt(i);
126
+ return st(i);
126
127
  }).classed("update", !0), a = qt(n, e);
127
128
  Qt(n, e);
128
129
  var s = n.merge !== void 0 ? n.merge(a) : n;
129
- return E(s, e).style("opacity", 1), s.each(function(i) {
130
- var o = b(this), c = e.edge(i);
131
- c.elem = this, c.id && o.attr("id", c.id), st(
130
+ return _(s, e).style("opacity", 1), s.each(function(i) {
131
+ var o = x(this), c = e.edge(i);
132
+ c.elem = this, c.id && o.attr("id", c.id), it(
132
133
  o,
133
134
  c.class,
134
135
  (o.classed("update") ? "update " : "") + "edgePath"
135
136
  );
136
137
  }), s.selectAll("path.path").each(function(i) {
137
138
  var o = e.edge(i);
138
- o.arrowheadId = g.uniqueId("arrowhead");
139
- var c = b(this).attr("marker-end", function() {
140
- return "url(" + Ht(location.href, o.arrowheadId) + ")";
139
+ o.arrowheadId = rt.uniqueId("arrowhead");
140
+ var c = x(this).attr("marker-end", function() {
141
+ return "url(" + Xt(location.href, o.arrowheadId) + ")";
141
142
  }).style("fill", "none");
142
- E(c, e).attr("d", function(d) {
143
- return Xt(e, d);
144
- }), N(c, o.style);
143
+ _(c, e).attr("d", function(d) {
144
+ return Ft(e, d);
145
+ }), T(c, o.style);
145
146
  }), s.selectAll("defs *").remove(), s.selectAll("defs").each(function(i) {
146
147
  var o = e.edge(i), c = t[o.arrowhead];
147
- c(b(this), o.arrowheadId, o, "arrowhead");
148
+ c(x(this), o.arrowheadId, o, "arrowhead");
148
149
  }), s;
149
150
  };
150
- function Yt(r) {
151
- F = r;
151
+ function Ht(r) {
152
+ X = r;
152
153
  }
153
- function Ht(r, e) {
154
+ function Xt(r, e) {
154
155
  var t = r.split("#")[0];
155
156
  return t + "#" + e;
156
157
  }
157
- function Xt(r, e) {
158
+ function Ft(r, e) {
158
159
  var t = r.edge(e), n = r.node(e.v), a = r.node(e.w), s = t.points.slice(1, t.points.length - 1);
159
- return s.unshift(Z(n, s[0])), s.push(Z(a, s[s.length - 1])), it(t, s);
160
+ return s.unshift(K(n, s[0])), s.push(K(a, s[s.length - 1])), ot(t, s);
160
161
  }
161
- function it(r, e) {
162
- var t = (At || Mt.line)().x(function(n) {
162
+ function ot(r, e) {
163
+ var t = (Ct || Dt.line)().x(function(n) {
163
164
  return n.x;
164
165
  }).y(function(n) {
165
166
  return n.y;
166
167
  });
167
168
  return (t.curve || t.interpolate)(r.curve), t(e);
168
169
  }
169
- function Ft(r) {
170
+ function jt(r) {
170
171
  var e = r.getBBox(), t = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2);
171
172
  return { x: t.e, y: t.f };
172
173
  }
173
174
  function qt(r, e) {
174
175
  var t = r.enter().append("g").attr("class", "edgePath").style("opacity", 0);
175
176
  return t.append("path").attr("class", "path").attr("d", function(n) {
176
- var a = e.edge(n), s = e.node(n.v).elem, i = g.range(a.points.length).map(function() {
177
- return Ft(s);
177
+ var a = e.edge(n), s = e.node(n.v).elem, i = rt.range(a.points.length).map(function() {
178
+ return jt(s);
178
179
  });
179
- return it(a, i);
180
+ return ot(a, i);
180
181
  }), t.append("defs"), t;
181
182
  }
182
183
  function Qt(r, e) {
183
184
  var t = r.exit();
184
- E(t, e).style("opacity", 0).remove();
185
+ _(t, e).style("opacity", 0).remove();
185
186
  }
186
- var q = function(r, e, t) {
187
+ var F = function(r, e, t) {
187
188
  var n = e.nodes().filter(function(i) {
188
- return !at(e, i);
189
+ return !nt(e, i);
189
190
  }), a = r.selectAll("g.node").data(n, function(i) {
190
191
  return i;
191
192
  }).classed("update", !0);
192
193
  a.exit().remove(), a.enter().append("g").attr("class", "node").style("opacity", 0), a = r.selectAll("g.node"), a.each(function(i) {
193
- var o = e.node(i), c = b(this);
194
- st(
194
+ var o = e.node(i), c = x(this);
195
+ it(
195
196
  c,
196
197
  o.class,
197
198
  (c.classed("update") ? "update " : "") + "node"
198
199
  ), c.select("g.label").remove();
199
- var d = c.append("g").attr("class", "label"), l = K(d, o), v = t[o.shape], h = g.pick(l.node().getBBox(), "width", "height");
200
- o.elem = this, o.id && c.attr("id", o.id), o.labelId && d.attr("id", o.labelId), g.has(o, "width") && (h.width = o.width), g.has(o, "height") && (h.height = o.height), h.width += o.paddingLeft + o.paddingRight, h.height += o.paddingTop + o.paddingBottom, d.attr(
200
+ var d = c.append("g").attr("class", "label"), l = q(d, o), y = t[o.shape], h = _t(l.node().getBBox(), "width", "height");
201
+ o.elem = this, o.id && c.attr("id", o.id), o.labelId && d.attr("id", o.labelId), Object.prototype.hasOwnProperty.call(o, "width") && (h.width = o.width), Object.prototype.hasOwnProperty.call(o, "height") && (h.height = o.height), h.width += o.paddingLeft + o.paddingRight, h.height += o.paddingTop + o.paddingBottom, d.attr(
201
202
  "transform",
202
203
  "translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
203
204
  );
204
- var u = b(this);
205
+ var u = x(this);
205
206
  u.select(".label-container").remove();
206
- var p = v(u, h, o).classed("label-container", !0);
207
- N(p, o.style);
208
- var w = p.node().getBBox();
209
- o.width = w.width, o.height = w.height;
207
+ var f = y(u, h, o).classed("label-container", !0);
208
+ T(f, o.style);
209
+ var g = f.node().getBBox();
210
+ o.width = g.width, o.height = g.height;
210
211
  });
211
212
  var s;
212
- return a.exit ? s = a.exit() : s = a.selectAll(null), E(s, e).style("opacity", 0).remove(), a;
213
+ return a.exit ? s = a.exit() : s = a.selectAll(null), _(s, e).style("opacity", 0).remove(), a;
213
214
  };
214
215
  function Kt(r) {
215
- q = r;
216
+ F = r;
216
217
  }
217
218
  function Jt(r, e) {
218
219
  var t = r.filter(function() {
219
- return !b(this).classed("update");
220
+ return !x(this).classed("update");
220
221
  });
221
222
  function n(a) {
222
223
  var s = e.node(a);
223
224
  return "translate(" + s.x + "," + s.y + ")";
224
225
  }
225
- t.attr("transform", n), E(r, e).style("opacity", 1).attr("transform", n), E(t.selectAll("rect"), e).attr("width", function(a) {
226
+ t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n), _(t.selectAll("rect"), e).attr("width", function(a) {
226
227
  return e.node(a).width;
227
228
  }).attr("height", function(a) {
228
229
  return e.node(a).height;
@@ -236,92 +237,92 @@ function Jt(r, e) {
236
237
  }
237
238
  function Zt(r, e) {
238
239
  var t = r.filter(function() {
239
- return !b(this).classed("update");
240
+ return !x(this).classed("update");
240
241
  });
241
242
  function n(a) {
242
243
  var s = e.edge(a);
243
- return g.has(s, "x") ? "translate(" + s.x + "," + s.y + ")" : "";
244
+ return Object.prototype.hasOwnProperty.call(s, "x") ? "translate(" + s.x + "," + s.y + ")" : "";
244
245
  }
245
- t.attr("transform", n), E(r, e).style("opacity", 1).attr("transform", n);
246
+ t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n);
246
247
  }
247
- function Ot(r, e) {
248
+ function te(r, e) {
248
249
  var t = r.filter(function() {
249
- return !b(this).classed("update");
250
+ return !x(this).classed("update");
250
251
  });
251
252
  function n(a) {
252
253
  var s = e.node(a);
253
254
  return "translate(" + s.x + "," + s.y + ")";
254
255
  }
255
- t.attr("transform", n), E(r, e).style("opacity", 1).attr("transform", n);
256
+ t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n);
256
257
  }
257
- function ot(r, e, t, n) {
258
+ function lt(r, e, t, n) {
258
259
  var a = r.x, s = r.y, i = a - n.x, o = s - n.y, c = Math.sqrt(e * e * o * o + t * t * i * i), d = Math.abs(e * t * i / c);
259
260
  n.x < a && (d = -d);
260
261
  var l = Math.abs(e * t * o / c);
261
262
  return n.y < s && (l = -l), { x: a + d, y: s + l };
262
263
  }
263
- function jt(r, e, t) {
264
- return ot(r, e, e, t);
264
+ function ee(r, e, t) {
265
+ return lt(r, e, e, t);
265
266
  }
266
- function te(r, e, t, n) {
267
- var a, s, i, o, c, d, l, v, h, u, p, w, f, y, S;
268
- if (a = e.y - r.y, i = r.x - e.x, c = e.x * r.y - r.x * e.y, h = a * t.x + i * t.y + c, u = a * n.x + i * n.y + c, !(h !== 0 && u !== 0 && O(h, u)) && (s = n.y - t.y, o = t.x - n.x, d = n.x * t.y - t.x * n.y, l = s * r.x + o * r.y + d, v = s * e.x + o * e.y + d, !(l !== 0 && v !== 0 && O(l, v)) && (p = a * o - s * i, p !== 0)))
269
- return w = Math.abs(p / 2), f = i * d - o * c, y = f < 0 ? (f - w) / p : (f + w) / p, f = s * c - a * d, S = f < 0 ? (f - w) / p : (f + w) / p, { x: y, y: S };
267
+ function re(r, e, t, n) {
268
+ var a, s, i, o, c, d, l, y, h, u, f, g, p, v, k;
269
+ if (a = e.y - r.y, i = r.x - e.x, c = e.x * r.y - r.x * e.y, h = a * t.x + i * t.y + c, u = a * n.x + i * n.y + c, !(h !== 0 && u !== 0 && J(h, u)) && (s = n.y - t.y, o = t.x - n.x, d = n.x * t.y - t.x * n.y, l = s * r.x + o * r.y + d, y = s * e.x + o * e.y + d, !(l !== 0 && y !== 0 && J(l, y)) && (f = a * o - s * i, f !== 0)))
270
+ return g = Math.abs(f / 2), p = i * d - o * c, v = p < 0 ? (p - g) / f : (p + g) / f, p = s * c - a * d, k = p < 0 ? (p - g) / f : (p + g) / f, { x: v, y: k };
270
271
  }
271
- function O(r, e) {
272
+ function J(r, e) {
272
273
  return r * e > 0;
273
274
  }
274
- function T(r, e, t) {
275
+ function E(r, e, t) {
275
276
  var n = r.x, a = r.y, s = [], i = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
276
- e.forEach(function(p) {
277
- i = Math.min(i, p.x), o = Math.min(o, p.y);
277
+ e.forEach(function(f) {
278
+ i = Math.min(i, f.x), o = Math.min(o, f.y);
278
279
  });
279
280
  for (var c = n - r.width / 2 - i, d = a - r.height / 2 - o, l = 0; l < e.length; l++) {
280
- var v = e[l], h = e[l < e.length - 1 ? l + 1 : 0], u = te(
281
+ var y = e[l], h = e[l < e.length - 1 ? l + 1 : 0], u = re(
281
282
  r,
282
283
  t,
283
- { x: c + v.x, y: d + v.y },
284
+ { x: c + y.x, y: d + y.y },
284
285
  { x: c + h.x, y: d + h.y }
285
286
  );
286
287
  u && s.push(u);
287
288
  }
288
- return s.length ? (s.length > 1 && s.sort(function(p, w) {
289
- var f = p.x - t.x, y = p.y - t.y, S = Math.sqrt(f * f + y * y), I = w.x - t.x, _ = w.y - t.y, U = Math.sqrt(I * I + _ * _);
290
- return S < U ? -1 : S === U ? 0 : 1;
289
+ return s.length ? (s.length > 1 && s.sort(function(f, g) {
290
+ var p = f.x - t.x, v = f.y - t.y, k = Math.sqrt(p * p + v * v), P = g.x - t.x, L = g.y - t.y, O = Math.sqrt(P * P + L * L);
291
+ return k < O ? -1 : k === O ? 0 : 1;
291
292
  }), s[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r);
292
293
  }
293
- function J(r, e) {
294
+ function Q(r, e) {
294
295
  var t = r.x, n = r.y, a = e.x - t, s = e.y - n, i = r.width / 2, o = r.height / 2, c, d;
295
296
  return Math.abs(s) * i > Math.abs(a) * o ? (s < 0 && (o = -o), c = s === 0 ? 0 : o * a / s, d = o) : (a < 0 && (i = -i), c = i, d = a === 0 ? 0 : i * s / a), { x: t + c, y: n + d };
296
297
  }
297
- var Q = {
298
- rect: re,
299
- ellipse: ae,
300
- circle: ne,
301
- diamond: se
298
+ var j = {
299
+ rect: ne,
300
+ ellipse: se,
301
+ circle: ie,
302
+ diamond: oe
302
303
  };
303
- function ee(r) {
304
- Q = r;
304
+ function ae(r) {
305
+ j = r;
305
306
  }
306
- function re(r, e, t) {
307
+ function ne(r, e, t) {
307
308
  var n = r.insert("rect", ":first-child").attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height);
308
309
  return t.intersect = function(a) {
309
- return J(t, a);
310
+ return Q(t, a);
310
311
  }, n;
311
312
  }
312
- function ae(r, e, t) {
313
+ function se(r, e, t) {
313
314
  var n = e.width / 2, a = e.height / 2, s = r.insert("ellipse", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("rx", n).attr("ry", a);
314
315
  return t.intersect = function(i) {
315
- return ot(t, n, a, i);
316
+ return lt(t, n, a, i);
316
317
  }, s;
317
318
  }
318
- function ne(r, e, t) {
319
+ function ie(r, e, t) {
319
320
  var n = Math.max(e.width, e.height) / 2, a = r.insert("circle", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("r", n);
320
321
  return t.intersect = function(s) {
321
- return jt(t, n, s);
322
+ return ee(t, n, s);
322
323
  }, a;
323
324
  }
324
- function se(r, e, t) {
325
+ function oe(r, e, t) {
325
326
  var n = e.width * Math.SQRT2 / 2, a = e.height * Math.SQRT2 / 2, s = [
326
327
  { x: 0, y: -a },
327
328
  { x: -n, y: 0 },
@@ -334,32 +335,32 @@ function se(r, e, t) {
334
335
  }).join(" ")
335
336
  );
336
337
  return t.intersect = function(o) {
337
- return T(t, s, o);
338
+ return E(t, s, o);
338
339
  }, i;
339
340
  }
340
- function ie() {
341
+ function le() {
341
342
  var r = function(e, t) {
342
- ce(t);
343
- var n = M(e, "output"), a = M(n, "clusters"), s = M(n, "edgePaths"), i = X(M(n, "edgeLabels"), t), o = q(M(n, "nodes"), t, Q);
344
- Lt(t), Ot(o, t), Zt(i, t), F(s, t, Y);
345
- var c = H(a, t);
346
- Jt(c, t), de(t);
343
+ he(t);
344
+ var n = B(e, "output"), a = B(n, "clusters"), s = B(n, "edgePaths"), i = H(B(n, "edgeLabels"), t), o = F(B(n, "nodes"), t, j);
345
+ Et(t), te(o, t), Zt(i, t), X(s, t, z);
346
+ var c = Y(a, t);
347
+ Jt(c, t), ue(t);
347
348
  };
348
349
  return r.createNodes = function(e) {
349
- return arguments.length ? (Kt(e), r) : q;
350
+ return arguments.length ? (Kt(e), r) : F;
350
351
  }, r.createClusters = function(e) {
351
- return arguments.length ? (Vt(e), r) : H;
352
+ return arguments.length ? (zt(e), r) : Y;
352
353
  }, r.createEdgeLabels = function(e) {
353
- return arguments.length ? (zt(e), r) : X;
354
+ return arguments.length ? (Yt(e), r) : H;
354
355
  }, r.createEdgePaths = function(e) {
355
- return arguments.length ? (Yt(e), r) : F;
356
+ return arguments.length ? (Ht(e), r) : X;
356
357
  }, r.shapes = function(e) {
357
- return arguments.length ? (ee(e), r) : Q;
358
+ return arguments.length ? (ae(e), r) : j;
358
359
  }, r.arrows = function(e) {
359
- return arguments.length ? (Dt(e), r) : Y;
360
+ return arguments.length ? (Rt(e), r) : z;
360
361
  }, r;
361
362
  }
362
- var oe = {
363
+ var ce = {
363
364
  paddingLeft: 10,
364
365
  paddingRight: 10,
365
366
  paddingTop: 10,
@@ -367,54 +368,54 @@ var oe = {
367
368
  rx: 0,
368
369
  ry: 0,
369
370
  shape: "rect"
370
- }, le = {
371
+ }, de = {
371
372
  arrowhead: "normal",
372
- curve: P
373
+ curve: G
373
374
  };
374
- function ce(r) {
375
- r.nodes().forEach(function(e) {
376
- var t = r.node(e);
377
- !g.has(t, "label") && !r.children(e).length && (t.label = e), g.has(t, "paddingX") && g.defaults(t, {
375
+ function he(r) {
376
+ r.nodes().forEach((e) => {
377
+ const t = r.node(e);
378
+ !Object.prototype.hasOwnProperty.call(t, "label") && !r.children(e).length && (t.label = e), Object.prototype.hasOwnProperty.call(t, "paddingX") && I(t, {
378
379
  paddingLeft: t.paddingX,
379
380
  paddingRight: t.paddingX
380
- }), g.has(t, "paddingY") && g.defaults(t, {
381
+ }), Object.prototype.hasOwnProperty.call(t, "paddingY") && I(t, {
381
382
  paddingTop: t.paddingY,
382
383
  paddingBottom: t.paddingY
383
- }), g.has(t, "padding") && g.defaults(t, {
384
+ }), Object.prototype.hasOwnProperty.call(t, "padding") && I(t, {
384
385
  paddingLeft: t.padding,
385
386
  paddingRight: t.padding,
386
387
  paddingTop: t.padding,
387
388
  paddingBottom: t.padding
388
- }), g.defaults(t, oe), g.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) {
389
+ }), I(t, ce), ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"].forEach((n) => {
389
390
  t[n] = Number(t[n]);
390
- }), g.has(t, "width") && (t._prevWidth = t.width), g.has(t, "height") && (t._prevHeight = t.height);
391
+ }), Object.prototype.hasOwnProperty.call(t, "width") && (t._prevWidth = t.width), Object.prototype.hasOwnProperty.call(t, "height") && (t._prevHeight = t.height);
391
392
  }), r.edges().forEach(function(e) {
392
393
  var t = r.edge(e);
393
- g.has(t, "label") || (t.label = ""), g.defaults(t, le);
394
+ Object.prototype.hasOwnProperty.call(t, "label") || (t.label = ""), I(t, de);
394
395
  });
395
396
  }
396
- function de(r) {
397
- g.each(r.nodes(), function(e) {
397
+ function ue(r) {
398
+ r.nodes().forEach((e) => {
398
399
  var t = r.node(e);
399
- g.has(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, g.has(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
400
+ Object.prototype.hasOwnProperty.call(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, Object.prototype.hasOwnProperty.call(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
400
401
  });
401
402
  }
402
- function M(r, e) {
403
+ function B(r, e) {
403
404
  var t = r.select("g." + e);
404
405
  return t.empty() && (t = r.append("g").attr("class", e)), t;
405
406
  }
406
- function lt(r, e, t) {
407
+ function ct(r, e, t) {
407
408
  const n = e.width, a = e.height, s = (n + a) * 0.9, i = [
408
409
  { x: s / 2, y: 0 },
409
410
  { x: s, y: -s / 2 },
410
411
  { x: s / 2, y: -s },
411
412
  { x: 0, y: -s / 2 }
412
- ], o = A(r, s, s, i);
413
+ ], o = N(r, s, s, i);
413
414
  return t.intersect = function(c) {
414
- return T(t, i, c);
415
+ return E(t, i, c);
415
416
  }, o;
416
417
  }
417
- function ct(r, e, t) {
418
+ function dt(r, e, t) {
418
419
  const a = e.height, s = a / 4, i = e.width + 2 * s, o = [
419
420
  { x: s, y: 0 },
420
421
  { x: i - s, y: 0 },
@@ -422,43 +423,43 @@ function ct(r, e, t) {
422
423
  { x: i - s, y: -a },
423
424
  { x: s, y: -a },
424
425
  { x: 0, y: -a / 2 }
425
- ], c = A(r, i, a, o);
426
+ ], c = N(r, i, a, o);
426
427
  return t.intersect = function(d) {
427
- return T(t, o, d);
428
+ return E(t, o, d);
428
429
  }, c;
429
430
  }
430
- function dt(r, e, t) {
431
+ function ht(r, e, t) {
431
432
  const n = e.width, a = e.height, s = [
432
433
  { x: -a / 2, y: 0 },
433
434
  { x: n, y: 0 },
434
435
  { x: n, y: -a },
435
436
  { x: -a / 2, y: -a },
436
437
  { x: 0, y: -a / 2 }
437
- ], i = A(r, n, a, s);
438
+ ], i = N(r, n, a, s);
438
439
  return t.intersect = function(o) {
439
- return T(t, s, o);
440
+ return E(t, s, o);
440
441
  }, i;
441
442
  }
442
- function ht(r, e, t) {
443
+ function ut(r, e, t) {
443
444
  const n = e.width, a = e.height, s = [
444
445
  { x: -2 * a / 6, y: 0 },
445
446
  { x: n - a / 6, y: 0 },
446
447
  { x: n + 2 * a / 6, y: -a },
447
448
  { x: a / 6, y: -a }
448
- ], i = A(r, n, a, s);
449
+ ], i = N(r, n, a, s);
449
450
  return t.intersect = function(o) {
450
- return T(t, s, o);
451
+ return E(t, s, o);
451
452
  }, i;
452
453
  }
453
- function ut(r, e, t) {
454
+ function pt(r, e, t) {
454
455
  const n = e.width, a = e.height, s = [
455
456
  { x: 2 * a / 6, y: 0 },
456
457
  { x: n + a / 6, y: 0 },
457
458
  { x: n - 2 * a / 6, y: -a },
458
459
  { x: -a / 6, y: -a }
459
- ], i = A(r, n, a, s);
460
+ ], i = N(r, n, a, s);
460
461
  return t.intersect = function(o) {
461
- return T(t, s, o);
462
+ return E(t, s, o);
462
463
  }, i;
463
464
  }
464
465
  function ft(r, e, t) {
@@ -467,20 +468,20 @@ function ft(r, e, t) {
467
468
  { x: n + 2 * a / 6, y: 0 },
468
469
  { x: n - a / 6, y: -a },
469
470
  { x: a / 6, y: -a }
470
- ], i = A(r, n, a, s);
471
+ ], i = N(r, n, a, s);
471
472
  return t.intersect = function(o) {
472
- return T(t, s, o);
473
+ return E(t, s, o);
473
474
  }, i;
474
475
  }
475
- function pt(r, e, t) {
476
+ function yt(r, e, t) {
476
477
  const n = e.width, a = e.height, s = [
477
478
  { x: a / 6, y: 0 },
478
479
  { x: n - a / 6, y: 0 },
479
480
  { x: n + 2 * a / 6, y: -a },
480
481
  { x: -2 * a / 6, y: -a }
481
- ], i = A(r, n, a, s);
482
+ ], i = N(r, n, a, s);
482
483
  return t.intersect = function(o) {
483
- return T(t, s, o);
484
+ return E(t, s, o);
484
485
  }, i;
485
486
  }
486
487
  function vt(r, e, t) {
@@ -490,18 +491,18 @@ function vt(r, e, t) {
490
491
  { x: n, y: -a / 2 },
491
492
  { x: n + a / 2, y: -a },
492
493
  { x: 0, y: -a }
493
- ], i = A(r, n, a, s);
494
+ ], i = N(r, n, a, s);
494
495
  return t.intersect = function(o) {
495
- return T(t, s, o);
496
+ return E(t, s, o);
496
497
  }, i;
497
498
  }
498
499
  function gt(r, e, t) {
499
500
  const n = e.height, a = e.width + n / 4, s = r.insert("rect", ":first-child").attr("rx", n / 2).attr("ry", n / 2).attr("x", -a / 2).attr("y", -n / 2).attr("width", a).attr("height", n);
500
501
  return t.intersect = function(i) {
501
- return J(t, i);
502
+ return Q(t, i);
502
503
  }, s;
503
504
  }
504
- function yt(r, e, t) {
505
+ function wt(r, e, t) {
505
506
  const n = e.width, a = e.height, s = [
506
507
  { x: 0, y: 0 },
507
508
  { x: n, y: 0 },
@@ -513,29 +514,29 @@ function yt(r, e, t) {
513
514
  { x: n + 8, y: -a },
514
515
  { x: -8, y: -a },
515
516
  { x: -8, y: 0 }
516
- ], i = A(r, n, a, s);
517
+ ], i = N(r, n, a, s);
517
518
  return t.intersect = function(o) {
518
- return T(t, s, o);
519
+ return E(t, s, o);
519
520
  }, i;
520
521
  }
521
- function wt(r, e, t) {
522
+ function mt(r, e, t) {
522
523
  const n = e.width, a = n / 2, s = a / (2.5 + n / 50), i = e.height + s, o = "M 0," + s + " a " + a + "," + s + " 0,0,0 " + n + " 0 a " + a + "," + s + " 0,0,0 " + -n + " 0 l 0," + i + " a " + a + "," + s + " 0,0,0 " + n + " 0 l 0," + -i, c = r.attr("label-offset-y", s).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -n / 2 + "," + -(i / 2 + s) + ")");
523
524
  return t.intersect = function(d) {
524
- const l = J(t, d), v = l.x - t.x;
525
- if (a != 0 && (Math.abs(v) < t.width / 2 || Math.abs(v) == t.width / 2 && Math.abs(l.y - t.y) > t.height / 2 - s)) {
526
- let h = s * s * (1 - v * v / (a * a));
525
+ const l = Q(t, d), y = l.x - t.x;
526
+ if (a != 0 && (Math.abs(y) < t.width / 2 || Math.abs(y) == t.width / 2 && Math.abs(l.y - t.y) > t.height / 2 - s)) {
527
+ let h = s * s * (1 - y * y / (a * a));
527
528
  h != 0 && (h = Math.sqrt(h)), h = s - h, d.y - t.y > 0 && (h = -h), l.y += h;
528
529
  }
529
530
  return l;
530
531
  }, c;
531
532
  }
532
- function he(r) {
533
- r.shapes().question = lt, r.shapes().hexagon = ct, r.shapes().stadium = gt, r.shapes().subroutine = yt, r.shapes().cylinder = wt, r.shapes().rect_left_inv_arrow = dt, r.shapes().lean_right = ht, r.shapes().lean_left = ut, r.shapes().trapezoid = ft, r.shapes().inv_trapezoid = pt, r.shapes().rect_right_inv_arrow = vt;
533
+ function pe(r) {
534
+ r.shapes().question = ct, r.shapes().hexagon = dt, r.shapes().stadium = gt, r.shapes().subroutine = wt, r.shapes().cylinder = mt, r.shapes().rect_left_inv_arrow = ht, r.shapes().lean_right = ut, r.shapes().lean_left = pt, r.shapes().trapezoid = ft, r.shapes().inv_trapezoid = yt, r.shapes().rect_right_inv_arrow = vt;
534
535
  }
535
- function ue(r) {
536
- r({ question: lt }), r({ hexagon: ct }), r({ stadium: gt }), r({ subroutine: yt }), r({ cylinder: wt }), r({ rect_left_inv_arrow: dt }), r({ lean_right: ht }), r({ lean_left: ut }), r({ trapezoid: ft }), r({ inv_trapezoid: pt }), r({ rect_right_inv_arrow: vt });
536
+ function fe(r) {
537
+ r({ question: ct }), r({ hexagon: dt }), r({ stadium: gt }), r({ subroutine: wt }), r({ cylinder: mt }), r({ rect_left_inv_arrow: ht }), r({ lean_right: ut }), r({ lean_left: pt }), r({ trapezoid: ft }), r({ inv_trapezoid: yt }), r({ rect_right_inv_arrow: vt });
537
538
  }
538
- function A(r, e, t, n) {
539
+ function N(r, e, t, n) {
539
540
  return r.insert("polygon", ":first-child").attr(
540
541
  "points",
541
542
  n.map(function(a) {
@@ -543,248 +544,248 @@ function A(r, e, t, n) {
543
544
  }).join(" ")
544
545
  ).attr("transform", "translate(" + -e / 2 + "," + t / 2 + ")");
545
546
  }
546
- const fe = {
547
- addToRender: he,
548
- addToRenderV2: ue
549
- }, xt = {}, pe = function(r) {
547
+ const ye = {
548
+ addToRender: pe,
549
+ addToRenderV2: fe
550
+ }, xt = {}, ve = function(r) {
550
551
  const e = Object.keys(r);
551
552
  for (const t of e)
552
553
  xt[t] = r[t];
553
- }, mt = async function(r, e, t, n, a, s) {
554
- const i = n ? n.select(`[id="${t}"]`) : b(`[id="${t}"]`), o = a || document, c = Object.keys(r);
554
+ }, bt = async function(r, e, t, n, a, s) {
555
+ const i = n ? n.select(`[id="${t}"]`) : x(`[id="${t}"]`), o = a || document, c = Object.keys(r);
555
556
  for (const d of c) {
556
557
  const l = r[d];
557
- let v = "default";
558
- l.classes.length > 0 && (v = l.classes.join(" "));
559
- const h = z(l.styles);
560
- let u = l.text !== void 0 ? l.text : l.id, p;
561
- if (j(R().flowchart.htmlLabels)) {
562
- const y = {
558
+ let y = "default";
559
+ l.classes.length > 0 && (y = l.classes.join(" "));
560
+ const h = V(l.styles);
561
+ let u = l.text !== void 0 ? l.text : l.id, f;
562
+ if (Z(D().flowchart.htmlLabels)) {
563
+ const v = {
563
564
  label: await tt(
564
565
  u.replace(
565
566
  /fa[blrs]?:fa-[\w-]+/g,
566
567
  // cspell:disable-line
567
- (S) => `<i class='${S.replace(":", " ")}'></i>`
568
+ (k) => `<i class='${k.replace(":", " ")}'></i>`
568
569
  ),
569
- R()
570
+ D()
570
571
  )
571
572
  };
572
- p = rt(i, y).node(), p.parentNode.removeChild(p);
573
+ f = at(i, v).node(), f.parentNode.removeChild(f);
573
574
  } else {
574
- const y = o.createElementNS("http://www.w3.org/2000/svg", "text");
575
- y.setAttribute("style", h.labelStyle.replace("color:", "fill:"));
576
- const S = u.split(et.lineBreakRegex);
577
- for (const I of S) {
578
- const _ = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
579
- _.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), _.setAttribute("dy", "1em"), _.setAttribute("x", "1"), _.textContent = I, y.appendChild(_);
575
+ const v = o.createElementNS("http://www.w3.org/2000/svg", "text");
576
+ v.setAttribute("style", h.labelStyle.replace("color:", "fill:"));
577
+ const k = u.split(et.lineBreakRegex);
578
+ for (const P of k) {
579
+ const L = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
580
+ L.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), L.setAttribute("dy", "1em"), L.setAttribute("x", "1"), L.textContent = P, v.appendChild(L);
580
581
  }
581
- p = y;
582
+ f = v;
582
583
  }
583
- let w = 0, f = "";
584
+ let g = 0, p = "";
584
585
  switch (l.type) {
585
586
  case "round":
586
- w = 5, f = "rect";
587
+ g = 5, p = "rect";
587
588
  break;
588
589
  case "square":
589
- f = "rect";
590
+ p = "rect";
590
591
  break;
591
592
  case "diamond":
592
- f = "question";
593
+ p = "question";
593
594
  break;
594
595
  case "hexagon":
595
- f = "hexagon";
596
+ p = "hexagon";
596
597
  break;
597
598
  case "odd":
598
- f = "rect_left_inv_arrow";
599
+ p = "rect_left_inv_arrow";
599
600
  break;
600
601
  case "lean_right":
601
- f = "lean_right";
602
+ p = "lean_right";
602
603
  break;
603
604
  case "lean_left":
604
- f = "lean_left";
605
+ p = "lean_left";
605
606
  break;
606
607
  case "trapezoid":
607
- f = "trapezoid";
608
+ p = "trapezoid";
608
609
  break;
609
610
  case "inv_trapezoid":
610
- f = "inv_trapezoid";
611
+ p = "inv_trapezoid";
611
612
  break;
612
613
  case "odd_right":
613
- f = "rect_left_inv_arrow";
614
+ p = "rect_left_inv_arrow";
614
615
  break;
615
616
  case "circle":
616
- f = "circle";
617
+ p = "circle";
617
618
  break;
618
619
  case "ellipse":
619
- f = "ellipse";
620
+ p = "ellipse";
620
621
  break;
621
622
  case "stadium":
622
- f = "stadium";
623
+ p = "stadium";
623
624
  break;
624
625
  case "subroutine":
625
- f = "subroutine";
626
+ p = "subroutine";
626
627
  break;
627
628
  case "cylinder":
628
- f = "cylinder";
629
+ p = "cylinder";
629
630
  break;
630
631
  case "group":
631
- f = "rect";
632
+ p = "rect";
632
633
  break;
633
634
  default:
634
- f = "rect";
635
+ p = "rect";
635
636
  }
636
- D.warn("Adding node", l.id, l.domId), e.setNode(s.db.lookUpDomId(l.id), {
637
+ M.warn("Adding node", l.id, l.domId), e.setNode(s.db.lookUpDomId(l.id), {
637
638
  labelType: "svg",
638
639
  labelStyle: h.labelStyle,
639
- shape: f,
640
- label: p,
641
- rx: w,
642
- ry: w,
643
- class: v,
640
+ shape: p,
641
+ label: f,
642
+ rx: g,
643
+ ry: g,
644
+ class: y,
644
645
  style: h.style,
645
646
  id: s.db.lookUpDomId(l.id)
646
647
  });
647
648
  }
648
- }, bt = async function(r, e, t) {
649
+ }, kt = async function(r, e, t) {
649
650
  let n = 0, a, s;
650
651
  if (r.defaultStyle !== void 0) {
651
- const i = z(r.defaultStyle);
652
+ const i = V(r.defaultStyle);
652
653
  a = i.style, s = i.labelStyle;
653
654
  }
654
655
  for (const i of r) {
655
656
  n++;
656
657
  const o = "L-" + i.start + "-" + i.end, c = "LS-" + i.start, d = "LE-" + i.end, l = {};
657
658
  i.type === "arrow_open" ? l.arrowhead = "none" : l.arrowhead = "normal";
658
- let v = "", h = "";
659
+ let y = "", h = "";
659
660
  if (i.style !== void 0) {
660
- const u = z(i.style);
661
- v = u.style, h = u.labelStyle;
661
+ const u = V(i.style);
662
+ y = u.style, h = u.labelStyle;
662
663
  } else
663
664
  switch (i.stroke) {
664
665
  case "normal":
665
- v = "fill:none", a !== void 0 && (v = a), s !== void 0 && (h = s);
666
+ y = "fill:none", a !== void 0 && (y = a), s !== void 0 && (h = s);
666
667
  break;
667
668
  case "dotted":
668
- v = "fill:none;stroke-width:2px;stroke-dasharray:3;";
669
+ y = "fill:none;stroke-width:2px;stroke-dasharray:3;";
669
670
  break;
670
671
  case "thick":
671
- v = " stroke-width: 3.5px;fill:none";
672
+ y = " stroke-width: 3.5px;fill:none";
672
673
  break;
673
674
  }
674
- l.style = v, l.labelStyle = h, i.interpolate !== void 0 ? l.curve = V(i.interpolate, P) : r.defaultInterpolate !== void 0 ? l.curve = V(r.defaultInterpolate, P) : l.curve = V(xt.curve, P), i.text === void 0 ? i.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", j(R().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `<span id="L-${o}" class="edgeLabel L-${c}' L-${d}" style="${l.labelStyle}">${await tt(
675
+ l.style = y, l.labelStyle = h, i.interpolate !== void 0 ? l.curve = W(i.interpolate, G) : r.defaultInterpolate !== void 0 ? l.curve = W(r.defaultInterpolate, G) : l.curve = W(xt.curve, G), i.text === void 0 ? i.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", Z(D().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `<span id="L-${o}" class="edgeLabel L-${c}' L-${d}" style="${l.labelStyle}">${await tt(
675
676
  i.text.replace(
676
677
  /fa[blrs]?:fa-[\w-]+/g,
677
678
  // cspell:disable-line
678
679
  (u) => `<i class='${u.replace(":", " ")}'></i>`
679
680
  ),
680
- R()
681
+ D()
681
682
  )}</span>`) : (l.labelType = "text", l.label = i.text.replace(et.lineBreakRegex, `
682
683
  `), i.style === void 0 && (l.style = l.style || "stroke: #333; stroke-width: 1.5px;fill:none"), l.labelStyle = l.labelStyle.replace("color:", "fill:"))), l.id = o, l.class = c + " " + d, l.minlen = i.length || 1, e.setEdge(t.db.lookUpDomId(i.start), t.db.lookUpDomId(i.end), l, n);
683
684
  }
684
- }, ve = function(r, e) {
685
- return D.info("Extracting classes"), e.db.getClasses();
686
- }, ge = async function(r, e, t, n) {
687
- D.info("Drawing flowchart");
688
- const { securityLevel: a, flowchart: s } = R();
685
+ }, ge = function(r, e) {
686
+ return M.info("Extracting classes"), e.db.getClasses();
687
+ }, we = async function(r, e, t, n) {
688
+ M.info("Drawing flowchart");
689
+ const { securityLevel: a, flowchart: s } = D();
689
690
  let i;
690
- a === "sandbox" && (i = b("#i" + e));
691
- const o = a === "sandbox" ? b(i.nodes()[0].contentDocument.body) : b("body"), c = a === "sandbox" ? i.nodes()[0].contentDocument : document;
691
+ a === "sandbox" && (i = x("#i" + e));
692
+ const o = a === "sandbox" ? x(i.nodes()[0].contentDocument.body) : x("body"), c = a === "sandbox" ? i.nodes()[0].contentDocument : document;
692
693
  let d = n.db.getDirection();
693
694
  d === void 0 && (d = "TD");
694
- const l = s.nodeSpacing || 50, v = s.rankSpacing || 50, h = new _t({
695
+ const l = s.nodeSpacing || 50, y = s.rankSpacing || 50, h = new Tt({
695
696
  multigraph: !0,
696
697
  compound: !0
697
698
  }).setGraph({
698
699
  rankdir: d,
699
700
  nodesep: l,
700
- ranksep: v,
701
+ ranksep: y,
701
702
  marginx: 8,
702
703
  marginy: 8
703
704
  }).setDefaultEdgeLabel(function() {
704
705
  return {};
705
706
  });
706
707
  let u;
707
- const p = n.db.getSubGraphs();
708
- for (let x = p.length - 1; x >= 0; x--)
709
- u = p[x], n.db.addVertex(u.id, u.title, "group", void 0, u.classes);
710
- const w = n.db.getVertices();
711
- D.warn("Get vertices", w);
712
- const f = n.db.getEdges();
713
- let y = 0;
714
- for (y = p.length - 1; y >= 0; y--) {
715
- u = p[y], Nt("cluster").append("text");
716
- for (let x = 0; x < u.nodes.length; x++)
717
- D.warn(
708
+ const f = n.db.getSubGraphs();
709
+ for (let w = f.length - 1; w >= 0; w--)
710
+ u = f[w], n.db.addVertex(u.id, u.title, "group", void 0, u.classes);
711
+ const g = n.db.getVertices();
712
+ M.warn("Get vertices", g);
713
+ const p = n.db.getEdges();
714
+ let v = 0;
715
+ for (v = f.length - 1; v >= 0; v--) {
716
+ u = f[v], Pt("cluster").append("text");
717
+ for (let w = 0; w < u.nodes.length; w++)
718
+ M.warn(
718
719
  "Setting subgraph",
719
- u.nodes[x],
720
- n.db.lookUpDomId(u.nodes[x]),
720
+ u.nodes[w],
721
+ n.db.lookUpDomId(u.nodes[w]),
721
722
  n.db.lookUpDomId(u.id)
722
- ), h.setParent(n.db.lookUpDomId(u.nodes[x]), n.db.lookUpDomId(u.id));
723
+ ), h.setParent(n.db.lookUpDomId(u.nodes[w]), n.db.lookUpDomId(u.id));
723
724
  }
724
- await mt(w, h, e, o, c, n), await bt(f, h, n);
725
- const S = new ie();
726
- fe.addToRender(S), S.arrows().none = function(k, L, m, B) {
727
- const C = k.append("marker").attr("id", L).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
728
- N(C, m[B + "Style"]);
729
- }, S.arrows().normal = function(k, L) {
730
- k.append("marker").attr("id", L).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
725
+ await bt(g, h, e, o, c, n), await kt(p, h, n);
726
+ const k = new le();
727
+ ye.addToRender(k), k.arrows().none = function(b, S, m, C) {
728
+ const A = b.append("marker").attr("id", S).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
729
+ T(A, m[C + "Style"]);
730
+ }, k.arrows().normal = function(b, S) {
731
+ b.append("marker").attr("id", S).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
731
732
  };
732
- const I = o.select(`[id="${e}"]`), _ = o.select("#" + e + " g");
733
- for (S(_, h), _.selectAll("g.node").attr("title", function() {
733
+ const P = o.select(`[id="${e}"]`), L = o.select("#" + e + " g");
734
+ for (k(L, h), L.selectAll("g.node").attr("title", function() {
734
735
  return n.db.getTooltip(this.id);
735
- }), n.db.indexNodes("subGraph" + y), y = 0; y < p.length; y++)
736
- if (u = p[y], u.title !== "undefined") {
737
- const x = c.querySelectorAll(
736
+ }), n.db.indexNodes("subGraph" + v), v = 0; v < f.length; v++)
737
+ if (u = f[v], u.title !== "undefined") {
738
+ const w = c.querySelectorAll(
738
739
  "#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"] rect'
739
- ), k = c.querySelectorAll(
740
+ ), b = c.querySelectorAll(
740
741
  "#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"]'
741
- ), L = x[0].x.baseVal.value, m = x[0].y.baseVal.value, B = x[0].width.baseVal.value, C = b(k[0]).select(".label");
742
- C.attr("transform", `translate(${L + B / 2}, ${m + 14})`), C.attr("id", e + "Text");
743
- for (let $ = 0; $ < u.classes.length; $++)
744
- k[0].classList.add(u.classes[$]);
742
+ ), S = w[0].x.baseVal.value, m = w[0].y.baseVal.value, C = w[0].width.baseVal.value, A = x(b[0]).select(".label");
743
+ A.attr("transform", `translate(${S + C / 2}, ${m + 14})`), A.attr("id", e + "Text");
744
+ for (let U = 0; U < u.classes.length; U++)
745
+ b[0].classList.add(u.classes[U]);
745
746
  }
746
747
  if (!s.htmlLabels) {
747
- const x = c.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
748
- for (const k of x) {
749
- const L = k.getBBox(), m = c.createElementNS("http://www.w3.org/2000/svg", "rect");
750
- m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", L.width), m.setAttribute("height", L.height), k.insertBefore(m, k.firstChild);
748
+ const w = c.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
749
+ for (const b of w) {
750
+ const S = b.getBBox(), m = c.createElementNS("http://www.w3.org/2000/svg", "rect");
751
+ m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", S.width), m.setAttribute("height", S.height), b.insertBefore(m, b.firstChild);
751
752
  }
752
753
  }
753
- St(h, I, s.diagramPadding, s.useMaxWidth), Object.keys(w).forEach(function(x) {
754
- const k = w[x];
755
- if (k.link) {
756
- const L = o.select("#" + e + ' [id="' + n.db.lookUpDomId(x) + '"]');
757
- if (L) {
754
+ Lt(h, P, s.diagramPadding, s.useMaxWidth), Object.keys(g).forEach(function(w) {
755
+ const b = g[w];
756
+ if (b.link) {
757
+ const S = o.select("#" + e + ' [id="' + n.db.lookUpDomId(w) + '"]');
758
+ if (S) {
758
759
  const m = c.createElementNS("http://www.w3.org/2000/svg", "a");
759
- m.setAttributeNS("http://www.w3.org/2000/svg", "class", k.classes.join(" ")), m.setAttributeNS("http://www.w3.org/2000/svg", "href", k.link), m.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? m.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : k.linkTarget && m.setAttributeNS("http://www.w3.org/2000/svg", "target", k.linkTarget);
760
- const B = L.insert(function() {
760
+ m.setAttributeNS("http://www.w3.org/2000/svg", "class", b.classes.join(" ")), m.setAttributeNS("http://www.w3.org/2000/svg", "href", b.link), m.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? m.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : b.linkTarget && m.setAttributeNS("http://www.w3.org/2000/svg", "target", b.linkTarget);
761
+ const C = S.insert(function() {
761
762
  return m;
762
- }, ":first-child"), G = L.select(".label-container");
763
- G && B.append(function() {
764
- return G.node();
763
+ }, ":first-child"), R = S.select(".label-container");
764
+ R && C.append(function() {
765
+ return R.node();
765
766
  });
766
- const C = L.select(".label");
767
- C && B.append(function() {
768
- return C.node();
767
+ const A = S.select(".label");
768
+ A && C.append(function() {
769
+ return A.node();
769
770
  });
770
771
  }
771
772
  }
772
773
  });
773
- }, ye = {
774
- setConf: pe,
775
- addVertices: mt,
776
- addEdges: bt,
777
- getClasses: ve,
778
- draw: ge
779
- }, _e = {
780
- parser: kt,
781
- db: W,
782
- renderer: Tt,
783
- styles: Et,
774
+ }, me = {
775
+ setConf: ve,
776
+ addVertices: bt,
777
+ addEdges: kt,
778
+ getClasses: ge,
779
+ draw: we
780
+ }, Ne = {
781
+ parser: St,
782
+ db: $,
783
+ renderer: At,
784
+ styles: Nt,
784
785
  init: (r) => {
785
- r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, ye.setConf(r.flowchart), W.clear(), W.setGen("gen-1");
786
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, me.setConf(r.flowchart), $.clear(), $.setGen("gen-1");
786
787
  }
787
788
  };
788
789
  export {
789
- _e as diagram
790
+ Ne as diagram
790
791
  };