@layers-app/editor 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/{layers.-tEbFEea.js → layers.-THyAidr.js} +1 -1
  5. package/dist/{layers.web18Twc.js → layers.1FkpTuWt.js} +1 -1
  6. package/dist/{layers.CjSufFtR.js → layers.2GNX05Pw.js} +1 -1
  7. package/dist/{layers.Czo4N9da.js → layers.2bJDLUkj.js} +5 -5
  8. package/dist/{layers.EDJAvZne.js → layers.3NyP4_qT.js} +1 -1
  9. package/dist/{layers.DqVko4VS.js → layers.6-iHUtfG.js} +1 -1
  10. package/dist/{layers.C9p0mMXG.js → layers.6GCZDvGx.js} +1 -1
  11. package/dist/{layers.BFLIxvTQ.js → layers.6RHZalMZ.js} +1 -1
  12. package/dist/{layers.DSwpnF_n.js → layers.6xXrGatf.js} +1 -1
  13. package/dist/{layers.BKbrY6tU.js → layers.8GY1gxnr.js} +1 -1
  14. package/dist/{layers.CU9PM1go.js → layers.8MD88NKF.js} +1 -1
  15. package/dist/{layers.DRPLaH1S.js → layers.8vRwYGF1.js} +1 -1
  16. package/dist/{layers.CPozxFPx.js → layers.9k_FZTgg.js} +1 -1
  17. package/dist/{layers.jeSeOpIN.js → layers.9oQFg6fr.js} +1 -1
  18. package/dist/{layers.K93rRg7h.js → layers.B-nkbrh5.js} +1 -1
  19. package/dist/{layers.BhEGWMwB.js → layers.B11T8maX.js} +1 -1
  20. package/dist/{layers.C8C7CSoC.js → layers.B1k8RI4Z.js} +1 -1
  21. package/dist/{layers.BCqayhjh.js → layers.B28D_DBt.js} +1 -1
  22. package/dist/{layers.C_2YmvP6.js → layers.B2tb3whp.js} +1 -1
  23. package/dist/{layers.Cn9PgF9u.js → layers.B2wS58vI.js} +1 -1
  24. package/dist/{layers.Dg4utwst.js → layers.B4w94KuV.js} +1 -1
  25. package/dist/{layers.CgOiwStq.js → layers.B506dNih.js} +1 -1
  26. package/dist/{layers.jf4GXTEM.js → layers.B59VihkX.js} +1 -1
  27. package/dist/{layers.D7o8HeUe.js → layers.BA81yT-b.js} +1 -1
  28. package/dist/{layers.B87JL-Ab.js → layers.BAh3d4KR.js} +3 -3
  29. package/dist/{layers.CDoL8VSM.js → layers.BBd4YX6K.js} +1 -1
  30. package/dist/{layers.D5vvb1es.js → layers.BBePbCjA.js} +1 -1
  31. package/dist/{layers.CyTiWc8R.js → layers.BBq4fj8u.js} +1 -1
  32. package/dist/{layers.Dlc_qb9C.js → layers.BDE_IR8r.js} +3 -3
  33. package/dist/{layers.TxMU5irA.js → layers.BEPcBFjZ.js} +1 -1
  34. package/dist/{layers.tYaYGlY9.js → layers.BHgHEynK.js} +1 -1
  35. package/dist/{layers.DpNa42gZ.js → layers.BIEVr8Wi.js} +4 -4
  36. package/dist/{layers.v6J5zOI0.js → layers.BJRMniLA.js} +1 -1
  37. package/dist/{layers.TCs6JDoq.js → layers.BJrUwvwD.js} +1 -1
  38. package/dist/{layers.B_JtZCN9.js → layers.BKgF4R45.js} +1 -1
  39. package/dist/{layers.CIlYw-Ld.js → layers.BMzUC_gx.js} +1 -1
  40. package/dist/{layers.B8OqtRY0.js → layers.BOMiFT-Y.js} +1 -1
  41. package/dist/{layers.DYG4TDJT.js → layers.BP2mjL7_.js} +1 -1
  42. package/dist/{layers.CRnGEgwX.js → layers.BRsS7R4b.js} +3 -3
  43. package/dist/{layers.n-b_sibm.js → layers.BTwi_ZxE.js} +1 -1
  44. package/dist/{layers.Bib8ivdT.js → layers.BUGQHpPT.js} +2 -2
  45. package/dist/{layers.Dud5Uqc_.js → layers.BV3EswOu.js} +1 -1
  46. package/dist/{layers.D2NZqIBf.js → layers.BV6FPNeb.js} +1 -1
  47. package/dist/{layers.kq19s5wd.js → layers.BX1MdAq8.js} +1 -1
  48. package/dist/{layers.C-R-oVhg.js → layers.BXekB429.js} +5 -5
  49. package/dist/{layers.CEDQUMRS.js → layers.BYDoIFfy.js} +2 -2
  50. package/dist/{layers.D7m8veg5.js → layers.BYqpCPZb.js} +1 -1
  51. package/dist/{layers.SSatf9ti.js → layers.BabP1fiw.js} +1 -1
  52. package/dist/{layers.DPknniKO.js → layers.Bc50wrG5.js} +1 -1
  53. package/dist/layers.BenfT4mt.js +1 -0
  54. package/dist/{layers.BMP_74lB.js → layers.BfaAthjY.js} +1 -1
  55. package/dist/{layers.D1U2EImF.js → layers.BhTd0sg_.js} +1 -1
  56. package/dist/{layers.CWLsT0ha.js → layers.Bhpc11Hc.js} +1 -1
  57. package/dist/{layers.CaLTEjck.js → layers.Bj-2Dyxc.js} +1 -1
  58. package/dist/{layers.CIKwPi4Z.js → layers.BkWZ5_0j.js} +1 -1
  59. package/dist/{layers.DNUD-CJ8.js → layers.BmcygZTX.js} +4 -4
  60. package/dist/{layers.Bh3-MllH.js → layers.BrOM6vfK.js} +1 -1
  61. package/dist/{layers.CvMjvpAC.js → layers.Brev-26t.js} +6252 -5985
  62. package/dist/{layers.CLRCSdJu.js → layers.BriGfDX2.js} +1 -1
  63. package/dist/{layers.dZZJZDAg.js → layers.Brj2cyLm.js} +1 -1
  64. package/dist/{layers.CHdXKlXk.js → layers.BtlPFMf9.js} +3 -3
  65. package/dist/{layers.DnIrOpxR.js → layers.BumaB91K.js} +1 -1
  66. package/dist/{layers.B4Q2wfB6.js → layers.Bwo3vhyF.js} +1 -1
  67. package/dist/{layers.Cwfp_SWw.js → layers.Bxo3HtJ2.js} +1 -1
  68. package/dist/{layers.k3626i7i.js → layers.ByTQuMyW.js} +1 -1
  69. package/dist/{layers.ii-DkG87.js → layers.Bz5d8lWK.js} +3 -3
  70. package/dist/{layers.DorSa_L5.js → layers.C0HWsM5A.js} +1 -1
  71. package/dist/{layers.B-rj7oTM.js → layers.C1cUcyve.js} +1 -1
  72. package/dist/{layers.DbNQWK8M.js → layers.C23qv1Ox.js} +1 -1
  73. package/dist/{layers.ZqFKkHtx.js → layers.C2TVfTUd.js} +1 -1
  74. package/dist/{layers.an73ne6R.js → layers.C2xJRtr0.js} +1 -1
  75. package/dist/{layers.Uwkohx1o.js → layers.C39hIalq.js} +1 -1
  76. package/dist/{layers.DQWkfOvY.js → layers.C6vOZ4-M.js} +1 -1
  77. package/dist/{layers.BuHZ-Ghv.js → layers.C7LnOwMa.js} +3 -3
  78. package/dist/{layers.DCBZyMeN.js → layers.C7O0F2jp.js} +1 -1
  79. package/dist/{layers.DgiE5ZFx.js → layers.C8stWsCD.js} +1 -1
  80. package/dist/{layers.CjfwbokM.js → layers.CF8u0DDC.js} +2 -2
  81. package/dist/{layers.CE6zliiq.js → layers.CGkWVE5z.js} +1 -1
  82. package/dist/layers.CHA7gZD-.js +8 -0
  83. package/dist/{layers.ysnHCXdj.js → layers.CHeZfM6b.js} +1 -1
  84. package/dist/{layers.DcyKLTKN.js → layers.CKOwE1KP.js} +25 -25
  85. package/dist/{layers.Bn6Iejgx.js → layers.CKQSF82x.js} +1 -1
  86. package/dist/{layers.CyVJlwhy.js → layers.CKzn8by9.js} +1 -1
  87. package/dist/{layers.7aU-H2uI.js → layers.CLOknEyK.js} +1 -1
  88. package/dist/{layers.D7s9Zwrz.js → layers.CQRTd1l9.js} +1 -1
  89. package/dist/{layers.CSbeUzlx.js → layers.CSP9OiI1.js} +1 -1
  90. package/dist/{layers.CNyFLQnc.js → layers.CVxd3e3t.js} +1 -1
  91. package/dist/{layers.BN4qRLeM.js → layers.CYG8cFpH.js} +1 -1
  92. package/dist/{layers.DuZffOf7.js → layers.CZSdV7lx.js} +1 -1
  93. package/dist/{layers.Bb5zlvhh.js → layers.C_i7CkmW.js} +1 -1
  94. package/dist/{layers.Cl2kkt_w.js → layers.Ca-DcB8D.js} +1 -1
  95. package/dist/{layers.D8w74-1O.js → layers.CbMZtk17.js} +3 -3
  96. package/dist/{layers.DzyRBxYV.js → layers.Cb_oOg_L.js} +1 -1
  97. package/dist/{layers.BDL62gCx.js → layers.CbdX4CWo.js} +1 -1
  98. package/dist/{layers.CSnjafAH.js → layers.Ce0udOn0.js} +1 -1
  99. package/dist/{layers.Bby3suAC.js → layers.Ce5uNv1J.js} +1 -1
  100. package/dist/{layers.rL4xM0YF.js → layers.Ce6k_pSK.js} +1 -1
  101. package/dist/{layers.CVdTDg0L.js → layers.Ch5K_ZMO.js} +1 -1
  102. package/dist/{layers.BN8UhSmo.js → layers.ChRTWuD7.js} +1 -1
  103. package/dist/{layers.FT8CWNYr.js → layers.CifsBSZV.js} +1 -1
  104. package/dist/{layers.DY5-BiNC.js → layers.Cj8hq2Z-.js} +1 -1
  105. package/dist/{layers.DsO27g6e.js → layers.ClkXaSfh.js} +1 -1
  106. package/dist/{layers.DdGNejEI.js → layers.CmGfUsb9.js} +1 -1
  107. package/dist/{layers.Bdcf9Z5D.js → layers.CmTXBzdV.js} +15 -15
  108. package/dist/{layers.C3kOgem-.js → layers.CoBvfguA.js} +1 -1
  109. package/dist/{layers.C_ewGFAV.js → layers.Cpt-jjL4.js} +1 -1
  110. package/dist/{layers.CMbvzTIf.js → layers.CqAPb68X.js} +1 -1
  111. package/dist/{layers.gQahMh2X.js → layers.CqNXqUA6.js} +1 -1
  112. package/dist/{layers.BSFvSxAW.js → layers.Cst1XIxz.js} +2 -2
  113. package/dist/{layers.C0jByRD3.js → layers.CuFTVBMY.js} +1 -1
  114. package/dist/{layers.8Pb_NF3J.js → layers.D-N0qSum.js} +1 -1
  115. package/dist/{layers.CcOPnJ0R.js → layers.D-g8G4kx.js} +1 -1
  116. package/dist/{layers.BeZm_cHd.js → layers.D-plBcwK.js} +1 -1
  117. package/dist/{layers.DYGP06g1.js → layers.D1wiBAJl.js} +1 -1
  118. package/dist/{layers.BTqtABFp.js → layers.D2mBaFns.js} +1 -1
  119. package/dist/{layers.BXwtj068.js → layers.D6OziFAT.js} +1 -1
  120. package/dist/{layers.rxko9Uhx.js → layers.D6SyP1to.js} +1 -1
  121. package/dist/{layers.CLOPPsD7.js → layers.D7HzvRdP.js} +1 -1
  122. package/dist/{layers.BEuTfkxl.js → layers.D7QERizK.js} +1 -1
  123. package/dist/{layers.DBsOSFoM.js → layers.D8aJk5aR.js} +44 -44
  124. package/dist/layers.DEMu7kXv.js +1 -0
  125. package/dist/{layers.Bp96rGKj.js → layers.DEVNBboK.js} +1 -1
  126. package/dist/{layers.CauW8tpB.js → layers.DFS23k-f.js} +1 -1
  127. package/dist/{layers.3hQu2S_W.js → layers.DGP48o-U.js} +1 -1
  128. package/dist/{layers.BAWhP4OK.js → layers.DHZ0UD8E.js} +1 -1
  129. package/dist/{layers.LyVM1EwO.js → layers.DJsH6KLe.js} +3 -3
  130. package/dist/{layers.B0Swa5pj.js → layers.DKFMQjAM.js} +1 -1
  131. package/dist/{layers.DfJ3ZtHm.js → layers.DLAos8jE.js} +1 -1
  132. package/dist/{layers.UyBxa8pk.js → layers.DLu5GZkR.js} +1 -1
  133. package/dist/{layers.CpriF7L5.js → layers.DM9eI3ue.js} +1 -1
  134. package/dist/{layers.CUclTWP1.js → layers.DMgsDoqx.js} +1 -1
  135. package/dist/{layers.CcCAMrS6.js → layers.DOS89pOI.js} +4 -4
  136. package/dist/{layers.Cy-4eS9t.js → layers.DPG6Kejz.js} +1 -1
  137. package/dist/{layers.B7hUyZYE.js → layers.DTXjaw38.js} +1 -1
  138. package/dist/{layers.B5tfuvvb.js → layers.DTvk-m3B.js} +4 -4
  139. package/dist/layers.DVqVxTox.js +991 -0
  140. package/dist/{layers.BqBcVmuA.js → layers.DW9UYYIz.js} +2 -2
  141. package/dist/{layers.gu1X4m9G.js → layers.DZpWjvhE.js} +2 -2
  142. package/dist/{layers.D10ka4_R.js → layers.D_EiHOk0.js} +1 -1
  143. package/dist/{layers.Usxx3zwE.js → layers.Da0gWHz7.js} +1 -1
  144. package/dist/{layers.JyX-Sgav.js → layers.DbOekfZ4.js} +1 -1
  145. package/dist/layers.Dbe1Lv4b.js +6 -0
  146. package/dist/{layers.CJvs1ehb.js → layers.Dbuxjhjz.js} +4 -4
  147. package/dist/{layers.C4Me_ssm.js → layers.Dd8VPyy5.js} +1 -1
  148. package/dist/{layers.Ucg2KioU.js → layers.DdUEa3pB.js} +1 -1
  149. package/dist/{layers.DRyq7HXZ.js → layers.DeDDm1S3.js} +1 -1
  150. package/dist/{layers.DamzqDiR.js → layers.DeKg1Kj4.js} +1 -1
  151. package/dist/{layers.CLPz47Cx.js → layers.DgJcSG20.js} +1 -1
  152. package/dist/{layers.Br1FFtT0.js → layers.Dh_e6o8O.js} +1 -1
  153. package/dist/{layers.D5T47bY1.js → layers.DiGwEc8h.js} +1 -1
  154. package/dist/{layers.DlNM-Dqc.js → layers.DklM50Fh.js} +1 -1
  155. package/dist/{layers.D2FhK8JW.js → layers.DlFG6-7w.js} +1 -1
  156. package/dist/{layers.BVFjrhyH.js → layers.DlrVrTZe.js} +1 -1
  157. package/dist/{layers.BK4IKcTn.js → layers.DmDq3Ige.js} +1 -1
  158. package/dist/{layers.BhkhIN75.js → layers.Dmxgzlv0.js} +1 -1
  159. package/dist/{layers.BxEzn6nN.js → layers.Do_UAEH5.js} +1 -1
  160. package/dist/{layers.BpGapBb_.js → layers.DossOWBf.js} +1 -1
  161. package/dist/{layers.BEfYTrlS.js → layers.Dpanm_sK.js} +1 -1
  162. package/dist/{layers.C8oJKs9B.js → layers.Dq9i4Gyx.js} +1 -1
  163. package/dist/{layers.goOIHVE6.js → layers.DrBMVWxc.js} +1 -1
  164. package/dist/{layers.DOocKSCn.js → layers.DrSuEk4e.js} +1 -1
  165. package/dist/{layers.Cb1OeHPk.js → layers.DsGTZR4K.js} +1 -1
  166. package/dist/{layers.g5UO5TI7.js → layers.DwI2n78x.js} +1 -1
  167. package/dist/{layers.DzDzwnFj.js → layers.DwpaC3QG.js} +1 -1
  168. package/dist/{layers.CWY-RnLQ.js → layers.DzYR3tnR.js} +1 -1
  169. package/dist/{layers.qX5GXECm.js → layers.DzvTriiF.js} +3 -3
  170. package/dist/{layers.CnsIGgOH.js → layers.ERHXJJqQ.js} +1 -1
  171. package/dist/{layers.BCO7xt78.js → layers.GbaqRR7Q.js} +1 -1
  172. package/dist/{layers.CJj-Yc0Y.js → layers.GxJv9KGQ.js} +1 -1
  173. package/dist/{layers.vurepPvZ.js → layers.IwvJKyAu.js} +1 -1
  174. package/dist/{layers.EKR6tyV6.js → layers.IzJGXzwK.js} +1 -1
  175. package/dist/{layers.BMP4kJwf.js → layers.MCEGzqup.js} +4 -4
  176. package/dist/{layers.BVKUpmY-.js → layers.MKXFM1jl.js} +1 -1
  177. package/dist/{layers.cQhTHtoM.js → layers.NGXgo8wE.js} +1 -1
  178. package/dist/{layers.CM8dv7Gh.js → layers.OqI8SZ_5.js} +4 -4
  179. package/dist/{layers.BOztdAeE.js → layers.QTf7TpTz.js} +1 -1
  180. package/dist/{layers.BVQnJMRw.js → layers.RMRU1Pwi.js} +1 -1
  181. package/dist/{layers.BZjGZC6Y.js → layers.Rv22DsaM.js} +3 -3
  182. package/dist/{layers.BUXlslMo.js → layers.Tj63woFf.js} +1 -1
  183. package/dist/{layers.XzXWsQdt.js → layers.UjeTceyz.js} +1 -1
  184. package/dist/{layers.C_hg39kk.js → layers._5B_ZiMv.js} +4 -4
  185. package/dist/{layers.uJXaMwcZ.js → layers.cixNxAbL.js} +4 -4
  186. package/dist/{layers.DuF7Wr_J.js → layers.cj2V1uGQ.js} +1 -1
  187. package/dist/{layers.CWFsDWIO.js → layers.f6otQFMU.js} +1 -1
  188. package/dist/{layers.E50JDeRu.js → layers.fvaELuu6.js} +1 -1
  189. package/dist/{layers.VIC89oh3.js → layers.hmZLdf__.js} +1 -1
  190. package/dist/{layers.C7KyEelm.js → layers.iL8l0xSW.js} +1 -1
  191. package/dist/{layers.O3Mjf-uq.js → layers.isOoYLWo.js} +1 -1
  192. package/dist/{layers.1iQaRppm.js → layers.jDxKzvoU.js} +1 -1
  193. package/dist/{layers.D5FEVMaj.js → layers.l1CT1blb.js} +1 -1
  194. package/dist/{layers.WXRqF7Gu.js → layers.mWbRwNt5.js} +1 -1
  195. package/dist/{layers.DLe33_L_.js → layers.no4b_g8z.js} +1 -1
  196. package/dist/{layers.CbTtLiC-.js → layers.qsnZ9CDw.js} +15636 -14830
  197. package/dist/{layers.DfzCnkal.js → layers.qvSlyKaO.js} +1 -1
  198. package/dist/{layers.BvBP7pVu.js → layers.svu5Y3ao.js} +1 -1
  199. package/dist/{layers.DNlW5pNO.js → layers.tYVynPLG.js} +1 -1
  200. package/dist/{layers.CeYuOfPG.js → layers.wG7jne3t.js} +6 -6
  201. package/dist/{layers.BYm-cdxh.js → layers.wUC-B92c.js} +1 -1
  202. package/dist/{layers.D5oWH2Zi.js → layers.xAimX3-2.js} +1028 -1035
  203. package/dist/{layers.C62ZXEw2.js → layers.xon73J5r.js} +1 -1
  204. package/package.json +80 -80
  205. package/dist/layers.BO3G20N6.js +0 -8
  206. package/dist/layers.Be3hGKWN.js +0 -1
  207. package/dist/layers.CwDIIaj6.js +0 -1
  208. package/dist/layers.CzfJNUQR.js +0 -6
  209. package/dist/layers.tMd_QB9T.js +0 -845
@@ -1 +1 @@
1
- "use strict";const P=require("lodash-es"),J=require("./layers.Cyzu9PKQ.js"),k=require("./layers.BLd2spTm.js"),u=require("./layers.C8oJKs9B.js"),i=require("./layers.DcyKLTKN.js"),j=require("./layers.CVdTDg0L.js");function G(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=G(P);function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:F(e)};return m.isUndefined(e.graph())||(t.value=m.clone(e.graph())),t}function M(e){return m.map(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m.isUndefined(n)||(s.value=n),m.isUndefined(r)||(s.parent=r),s})}function F(e){return m.map(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m.isUndefined(t.name)||(r.name=t.name),m.isUndefined(n)||(r.value=n),r})}let a={},w={},p={};const q=()=>{w={},p={},a={}},X=(e,t)=>(i.log$1.trace("In isDescendant",t," ",e," = ",w[t].includes(e)),!!w[t].includes(e)),_=(e,t)=>(i.log$1.info("Descendants of ",t," is ",w[t]),i.log$1.info("Edge is ",e),e.v===t||e.w===t?!1:w[t]?w[t].includes(e.v)||X(e.v,t)||X(e.w,t)||w[t].includes(e.w):(i.log$1.debug("Tilt, ",t,",not in descendants"),!1)),B=(e,t,n,r)=>{i.log$1.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.log$1.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)B(o,t,n,r);else{const f=t.node(o);i.log$1.info("cp ",o," to ",r," with parent ",e),n.setNode(o,f),r!==t.parent(o)&&(i.log$1.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==r&&o!==e?(i.log$1.debug("Setting parent",o,e),n.setParent(o,e)):(i.log$1.info("In copy ",e,"root",r,"data",t.node(e),r),i.log$1.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==r,"node!==clusterId",o!==e));const g=t.edges(o);i.log$1.debug("Copying Edges",g),g.forEach(d=>{i.log$1.info("Edge",d);const h=t.edge(d.v,d.w,d.name);i.log$1.info("Edge data",h,r);try{_(d,r)?(i.log$1.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),i.log$1.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.log$1.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch($){i.log$1.error($)}})}i.log$1.debug("Removing node",o),t.removeNode(o)})},D=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)p[s]=e,r=[...r,...D(s,t)];return r},C=(e,t)=>{i.log$1.trace("Searching",e);const n=t.children(e);if(i.log$1.trace("Searching children of id ",e,n),n.length<1)return i.log$1.trace("This is a valid node",e),e;for(const r of n){const s=C(r,t);if(s)return i.log$1.trace("Found replacement for",e," => ",s),s}},S=e=>!a[e]||!a[e].externalConnections?e:a[e]?a[e].id:e,U=(e,t)=>{if(!e||t>10){i.log$1.debug("Opting out, no graph ");return}else i.log$1.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.log$1.warn("Cluster identified",n," Replacement id in edges: ",C(n,e)),w[n]=D(n,e),a[n]={id:C(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.log$1.debug("Cluster identified",n,w),s.forEach(o=>{if(o.v!==n&&o.w!==n){const f=X(o.v,n),g=X(o.w,n);f^g&&(i.log$1.warn("Edge: ",o," leaves cluster ",n),i.log$1.warn("Descendants of XXX ",n,": ",w[n]),a[n].externalConnections=!0)}})):i.log$1.debug("Not a cluster ",n,w)});for(let n of Object.keys(a)){const r=a[n].id,s=e.parent(r);s!==n&&a[s]&&!a[s].externalConnections&&(a[n].id=s)}e.edges().forEach(function(n){const r=e.edge(n);i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(i.log$1.warn("Fix XXX",a,"ids:",n.v,n.w,"Translating: ",a[n.v]," --- ",a[n.w]),a[n.v]&&a[n.w]&&a[n.v]===a[n.w]){i.log$1.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name);const f=n.w+"---"+n.v;e.setNode(f,{domId:f,id:f,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const g=structuredClone(r),d=structuredClone(r);g.label="",g.arrowTypeEnd="none",d.label="",g.fromCluster=n.v,d.toCluster=n.v,e.setEdge(s,f,g,n.name+"-cyclic-special"),e.setEdge(f,o,d,n.name+"-cyclic-special")}else if(a[n.v]||a[n.w]){if(i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const f=e.parent(s);a[f].externalConnections=!0,r.fromCluster=n.v}if(o!==n.w){const f=e.parent(o);a[f].externalConnections=!0,r.toCluster=n.w}i.log$1.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,r,n.name)}}),i.log$1.warn("Adjusted Graph",x(e)),T(e,0),i.log$1.trace(a)},T=(e,t)=>{if(i.log$1.warn("extractor - ",t,x(e),e.children("D")),t>10){i.log$1.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const o=e.children(s);r=r||o.length>0}if(!r){i.log$1.debug("Done, no node has children",e.nodes());return}i.log$1.debug("Nodes = ",n,t);for(const s of n)if(i.log$1.debug("Extracting node",s,a,a[s]&&!a[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!a[s])i.log$1.debug("Not a cluster",s,t);else if(!a[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.log$1.warn("Cluster without external connections, without a parent and with children",s,t);let f=e.graph().rankdir==="TB"?"LR":"TB";a[s]&&a[s].clusterData&&a[s].clusterData.dir&&(f=a[s].clusterData.dir,i.log$1.warn("Fixing dir",a[s].clusterData.dir,f));const g=new k.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.log$1.warn("Old graph before copy",x(e)),B(s,e,g,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:a[s].clusterData,labelText:a[s].labelText,graph:g}),i.log$1.warn("New graph after copy node: (",s,")",x(g)),i.log$1.debug("Old graph after copy",x(e))}else i.log$1.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!a[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.log$1.debug(a);n=e.nodes(),i.log$1.warn("New list of nodes",n);for(const s of n){const o=e.node(s);i.log$1.warn(" Now next level",s,o),o.clusterNode&&T(o.graph,t+1)}},O=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),o=O(e,s);n=[...n,...o]}),n},A=e=>O(e,e.children()),H=(e,t)=>{i.log$1.info("Creating subgraph rect for ",t.id,t);const n=i.getConfig(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),s=r.insert("rect",":first-child"),o=i.evaluate(n.flowchart.htmlLabels),f=r.insert("g").attr("class","cluster-label"),g=t.labelType==="markdown"?j.createText(f,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):f.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}const h=0*t.padding,$=h/2,y=t.width<=d.width+h?d.width+h:t.width;t.width<=d.width+h?t.diff=(d.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.log$1.trace("Data ",t,JSON.stringify(t)),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-y/2).attr("y",t.y-t.height/2-$).attr("width",y).attr("height",t.height+h);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o?f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+N})`):f.attr("transform",`translate(${t.x}, ${t.y-t.height/2+N})`);const b=s.node().getBBox();return t.width=b.width,t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},V=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(g){return u.intersectRect$1(t,g)},n},z=(e,t)=>{const n=i.getConfig(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),s=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),f=r.append("rect"),g=o.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}d=g.getBBox();const h=0*t.padding,$=h/2,y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(d.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,s.attr("class","outer").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$).attr("width",y+h).attr("height",t.height+h),f.attr("class","inner").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$+d.height-1).attr("width",y+h).attr("height",t.height+h-d.height-3);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2-t.padding/3+(i.evaluate(n.flowchart.htmlLabels)?5:3)+N})`);const b=s.node().getBBox();return t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},W=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.diff=-t.padding/2,t.intersect=function(g){return u.intersectRect$1(t,g)},n},K={rect:H,roundedWithTitle:z,noteGroup:V,divider:W};let R={};const Q=(e,t)=>{i.log$1.trace("Inserting cluster");const n=t.shape||"rect";R[t.id]=K[n](e,t)},Y=()=>{R={}},L=async(e,t,n,r,s,o)=>{i.log$1.info("Graph in recursive render: XXX",x(t),s);const f=t.graph().rankdir;i.log$1.trace("Dir in recursive render - dir:",f);const g=e.insert("g").attr("class","root");t.nodes()?i.log$1.info("Recursive render XXX",t.nodes()):i.log$1.info("No nodes found for",t),t.edges().length>0&&i.log$1.trace("Recursive edges",t.edge(t.edges()[0]));const d=g.insert("g").attr("class","clusters"),h=g.insert("g").attr("class","edgePaths"),$=g.insert("g").attr("class","edgeLabels"),y=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(l){const c=t.node(l);if(s!==void 0){const v=JSON.parse(JSON.stringify(s.clusterData));i.log$1.info("Setting data for cluster XXX (",l,") ",v,s),t.setNode(s.id,v),t.parent(l)||(i.log$1.trace("Setting parent",l,s.id),t.setParent(l,s.id,v))}if(i.log$1.info("(Insert) Node XXX"+l+": "+JSON.stringify(t.node(l))),c&&c.clusterNode){i.log$1.info("Cluster identified",l,c.width,t.node(l));const v=await L(y,c.graph,n,r,t.node(l),o),E=v.elem;u.updateNodeBounds(c,E),c.diff=v.diff||0,i.log$1.info("Node bounds (abc123)",l,c,c.width,c.x,c.y),u.setNodeElem(E,c),i.log$1.warn("Recursive render complete ",E,c)}else t.children(l).length>0?(i.log$1.info("Cluster - the non recursive path XXX",l,c.id,c,t),i.log$1.info(C(c.id,t)),a[c.id]={id:C(c.id,t),node:c}):(i.log$1.info("Node - the non recursive path",l,c.id,c),await u.insertNode(y,t.node(l),f))})),t.edges().forEach(function(l){const c=t.edge(l.v,l.w,l.name);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l)),i.log$1.info("Edge "+l.v+" -> "+l.w+": ",l," ",JSON.stringify(t.edge(l))),i.log$1.info("Fix",a,"ids:",l.v,l.w,"Translating: ",a[l.v],a[l.w]),u.insertEdgeLabel($,c)}),t.edges().forEach(function(l){i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l))}),i.log$1.info("#############################################"),i.log$1.info("### Layout ###"),i.log$1.info("#############################################"),i.log$1.info(t),J.layout(t),i.log$1.info("Graph after layout:",x(t));let N=0;const{subGraphTitleTotalMargin:b}=u.getSubGraphTitleMargins(o);return A(t).forEach(function(l){const c=t.node(l);i.log$1.info("Position "+l+": "+JSON.stringify(t.node(l))),i.log$1.info("Position "+l+": ("+c.x,","+c.y,") width: ",c.width," height: ",c.height),c&&c.clusterNode?(c.y+=b,u.positionNode(c)):t.children(l).length>0?(c.height+=b,Q(d,c),a[c.id].node=c):(c.y+=b/2,u.positionNode(c))}),t.edges().forEach(function(l){const c=t.edge(l);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(c),c),c.points.forEach(E=>E.y+=b/2);const v=u.insertEdge(h,l,c,a,n,t,r);u.positionEdgeLabel(c,v)}),t.nodes().forEach(function(l){const c=t.node(l);i.log$1.info(l,c.type,c.diff),c.type==="group"&&(N=c.diff)}),{elem:g,diff:N}},Z=async(e,t,n,r,s)=>{u.insertMarkers$1(e,n,r,s),u.clear$1(),u.clear(),Y(),q(),i.log$1.warn("Graph at first:",JSON.stringify(x(t))),U(t),i.log$1.warn("Graph after:",JSON.stringify(x(t)));const o=i.getConfig();await L(e,t,r,s,void 0,o)};exports.render=Z;
1
+ "use strict";const P=require("lodash-es"),J=require("./layers.Cyzu9PKQ.js"),k=require("./layers.BLd2spTm.js"),u=require("./layers.Dq9i4Gyx.js"),i=require("./layers.CKOwE1KP.js"),j=require("./layers.Ch5K_ZMO.js");function G(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=G(P);function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:F(e)};return m.isUndefined(e.graph())||(t.value=m.clone(e.graph())),t}function M(e){return m.map(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m.isUndefined(n)||(s.value=n),m.isUndefined(r)||(s.parent=r),s})}function F(e){return m.map(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m.isUndefined(t.name)||(r.name=t.name),m.isUndefined(n)||(r.value=n),r})}let a={},w={},p={};const q=()=>{w={},p={},a={}},X=(e,t)=>(i.log$1.trace("In isDescendant",t," ",e," = ",w[t].includes(e)),!!w[t].includes(e)),_=(e,t)=>(i.log$1.info("Descendants of ",t," is ",w[t]),i.log$1.info("Edge is ",e),e.v===t||e.w===t?!1:w[t]?w[t].includes(e.v)||X(e.v,t)||X(e.w,t)||w[t].includes(e.w):(i.log$1.debug("Tilt, ",t,",not in descendants"),!1)),B=(e,t,n,r)=>{i.log$1.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.log$1.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)B(o,t,n,r);else{const f=t.node(o);i.log$1.info("cp ",o," to ",r," with parent ",e),n.setNode(o,f),r!==t.parent(o)&&(i.log$1.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==r&&o!==e?(i.log$1.debug("Setting parent",o,e),n.setParent(o,e)):(i.log$1.info("In copy ",e,"root",r,"data",t.node(e),r),i.log$1.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==r,"node!==clusterId",o!==e));const g=t.edges(o);i.log$1.debug("Copying Edges",g),g.forEach(d=>{i.log$1.info("Edge",d);const h=t.edge(d.v,d.w,d.name);i.log$1.info("Edge data",h,r);try{_(d,r)?(i.log$1.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),i.log$1.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.log$1.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch($){i.log$1.error($)}})}i.log$1.debug("Removing node",o),t.removeNode(o)})},D=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)p[s]=e,r=[...r,...D(s,t)];return r},C=(e,t)=>{i.log$1.trace("Searching",e);const n=t.children(e);if(i.log$1.trace("Searching children of id ",e,n),n.length<1)return i.log$1.trace("This is a valid node",e),e;for(const r of n){const s=C(r,t);if(s)return i.log$1.trace("Found replacement for",e," => ",s),s}},S=e=>!a[e]||!a[e].externalConnections?e:a[e]?a[e].id:e,U=(e,t)=>{if(!e||t>10){i.log$1.debug("Opting out, no graph ");return}else i.log$1.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.log$1.warn("Cluster identified",n," Replacement id in edges: ",C(n,e)),w[n]=D(n,e),a[n]={id:C(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.log$1.debug("Cluster identified",n,w),s.forEach(o=>{if(o.v!==n&&o.w!==n){const f=X(o.v,n),g=X(o.w,n);f^g&&(i.log$1.warn("Edge: ",o," leaves cluster ",n),i.log$1.warn("Descendants of XXX ",n,": ",w[n]),a[n].externalConnections=!0)}})):i.log$1.debug("Not a cluster ",n,w)});for(let n of Object.keys(a)){const r=a[n].id,s=e.parent(r);s!==n&&a[s]&&!a[s].externalConnections&&(a[n].id=s)}e.edges().forEach(function(n){const r=e.edge(n);i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(i.log$1.warn("Fix XXX",a,"ids:",n.v,n.w,"Translating: ",a[n.v]," --- ",a[n.w]),a[n.v]&&a[n.w]&&a[n.v]===a[n.w]){i.log$1.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name);const f=n.w+"---"+n.v;e.setNode(f,{domId:f,id:f,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const g=structuredClone(r),d=structuredClone(r);g.label="",g.arrowTypeEnd="none",d.label="",g.fromCluster=n.v,d.toCluster=n.v,e.setEdge(s,f,g,n.name+"-cyclic-special"),e.setEdge(f,o,d,n.name+"-cyclic-special")}else if(a[n.v]||a[n.w]){if(i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const f=e.parent(s);a[f].externalConnections=!0,r.fromCluster=n.v}if(o!==n.w){const f=e.parent(o);a[f].externalConnections=!0,r.toCluster=n.w}i.log$1.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,r,n.name)}}),i.log$1.warn("Adjusted Graph",x(e)),T(e,0),i.log$1.trace(a)},T=(e,t)=>{if(i.log$1.warn("extractor - ",t,x(e),e.children("D")),t>10){i.log$1.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const o=e.children(s);r=r||o.length>0}if(!r){i.log$1.debug("Done, no node has children",e.nodes());return}i.log$1.debug("Nodes = ",n,t);for(const s of n)if(i.log$1.debug("Extracting node",s,a,a[s]&&!a[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!a[s])i.log$1.debug("Not a cluster",s,t);else if(!a[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.log$1.warn("Cluster without external connections, without a parent and with children",s,t);let f=e.graph().rankdir==="TB"?"LR":"TB";a[s]&&a[s].clusterData&&a[s].clusterData.dir&&(f=a[s].clusterData.dir,i.log$1.warn("Fixing dir",a[s].clusterData.dir,f));const g=new k.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.log$1.warn("Old graph before copy",x(e)),B(s,e,g,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:a[s].clusterData,labelText:a[s].labelText,graph:g}),i.log$1.warn("New graph after copy node: (",s,")",x(g)),i.log$1.debug("Old graph after copy",x(e))}else i.log$1.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!a[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.log$1.debug(a);n=e.nodes(),i.log$1.warn("New list of nodes",n);for(const s of n){const o=e.node(s);i.log$1.warn(" Now next level",s,o),o.clusterNode&&T(o.graph,t+1)}},O=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),o=O(e,s);n=[...n,...o]}),n},A=e=>O(e,e.children()),H=(e,t)=>{i.log$1.info("Creating subgraph rect for ",t.id,t);const n=i.getConfig(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),s=r.insert("rect",":first-child"),o=i.evaluate(n.flowchart.htmlLabels),f=r.insert("g").attr("class","cluster-label"),g=t.labelType==="markdown"?j.createText(f,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):f.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}const h=0*t.padding,$=h/2,y=t.width<=d.width+h?d.width+h:t.width;t.width<=d.width+h?t.diff=(d.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.log$1.trace("Data ",t,JSON.stringify(t)),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-y/2).attr("y",t.y-t.height/2-$).attr("width",y).attr("height",t.height+h);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o?f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+N})`):f.attr("transform",`translate(${t.x}, ${t.y-t.height/2+N})`);const b=s.node().getBBox();return t.width=b.width,t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},V=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(g){return u.intersectRect$1(t,g)},n},z=(e,t)=>{const n=i.getConfig(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),s=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),f=r.append("rect"),g=o.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}d=g.getBBox();const h=0*t.padding,$=h/2,y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(d.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,s.attr("class","outer").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$).attr("width",y+h).attr("height",t.height+h),f.attr("class","inner").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$+d.height-1).attr("width",y+h).attr("height",t.height+h-d.height-3);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2-t.padding/3+(i.evaluate(n.flowchart.htmlLabels)?5:3)+N})`);const b=s.node().getBBox();return t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},W=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.diff=-t.padding/2,t.intersect=function(g){return u.intersectRect$1(t,g)},n},K={rect:H,roundedWithTitle:z,noteGroup:V,divider:W};let R={};const Q=(e,t)=>{i.log$1.trace("Inserting cluster");const n=t.shape||"rect";R[t.id]=K[n](e,t)},Y=()=>{R={}},L=async(e,t,n,r,s,o)=>{i.log$1.info("Graph in recursive render: XXX",x(t),s);const f=t.graph().rankdir;i.log$1.trace("Dir in recursive render - dir:",f);const g=e.insert("g").attr("class","root");t.nodes()?i.log$1.info("Recursive render XXX",t.nodes()):i.log$1.info("No nodes found for",t),t.edges().length>0&&i.log$1.trace("Recursive edges",t.edge(t.edges()[0]));const d=g.insert("g").attr("class","clusters"),h=g.insert("g").attr("class","edgePaths"),$=g.insert("g").attr("class","edgeLabels"),y=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(l){const c=t.node(l);if(s!==void 0){const v=JSON.parse(JSON.stringify(s.clusterData));i.log$1.info("Setting data for cluster XXX (",l,") ",v,s),t.setNode(s.id,v),t.parent(l)||(i.log$1.trace("Setting parent",l,s.id),t.setParent(l,s.id,v))}if(i.log$1.info("(Insert) Node XXX"+l+": "+JSON.stringify(t.node(l))),c&&c.clusterNode){i.log$1.info("Cluster identified",l,c.width,t.node(l));const v=await L(y,c.graph,n,r,t.node(l),o),E=v.elem;u.updateNodeBounds(c,E),c.diff=v.diff||0,i.log$1.info("Node bounds (abc123)",l,c,c.width,c.x,c.y),u.setNodeElem(E,c),i.log$1.warn("Recursive render complete ",E,c)}else t.children(l).length>0?(i.log$1.info("Cluster - the non recursive path XXX",l,c.id,c,t),i.log$1.info(C(c.id,t)),a[c.id]={id:C(c.id,t),node:c}):(i.log$1.info("Node - the non recursive path",l,c.id,c),await u.insertNode(y,t.node(l),f))})),t.edges().forEach(function(l){const c=t.edge(l.v,l.w,l.name);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l)),i.log$1.info("Edge "+l.v+" -> "+l.w+": ",l," ",JSON.stringify(t.edge(l))),i.log$1.info("Fix",a,"ids:",l.v,l.w,"Translating: ",a[l.v],a[l.w]),u.insertEdgeLabel($,c)}),t.edges().forEach(function(l){i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l))}),i.log$1.info("#############################################"),i.log$1.info("### Layout ###"),i.log$1.info("#############################################"),i.log$1.info(t),J.layout(t),i.log$1.info("Graph after layout:",x(t));let N=0;const{subGraphTitleTotalMargin:b}=u.getSubGraphTitleMargins(o);return A(t).forEach(function(l){const c=t.node(l);i.log$1.info("Position "+l+": "+JSON.stringify(t.node(l))),i.log$1.info("Position "+l+": ("+c.x,","+c.y,") width: ",c.width," height: ",c.height),c&&c.clusterNode?(c.y+=b,u.positionNode(c)):t.children(l).length>0?(c.height+=b,Q(d,c),a[c.id].node=c):(c.y+=b/2,u.positionNode(c))}),t.edges().forEach(function(l){const c=t.edge(l);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(c),c),c.points.forEach(E=>E.y+=b/2);const v=u.insertEdge(h,l,c,a,n,t,r);u.positionEdgeLabel(c,v)}),t.nodes().forEach(function(l){const c=t.node(l);i.log$1.info(l,c.type,c.diff),c.type==="group"&&(N=c.diff)}),{elem:g,diff:N}},Z=async(e,t,n,r,s)=>{u.insertMarkers$1(e,n,r,s),u.clear$1(),u.clear(),Y(),q(),i.log$1.warn("Graph at first:",JSON.stringify(x(t))),U(t),i.log$1.warn("Graph after:",JSON.stringify(x(t)));const o=i.getConfig();await L(e,t,r,s,void 0,o)};exports.render=Z;
@@ -1,4 +1,4 @@
1
- import "./layers.CvMjvpAC.js";
1
+ import "./layers.Brev-26t.js";
2
2
  var e = { paste: "Pegar", pasteAsPlaintext: "Pegar coma texto sen formato", pasteCharts: "Pegar gráficos", selectAll: "Seleccionar todo", multiSelect: "Engadir elemento á selección", moveCanvas: "Mover o lenzo", cut: "Cortar", copy: "Copiar", copyAsPng: "Copiar no portapapeis como PNG", copyAsSvg: "Copiar no portapapeis como SVG", copyText: "Copia no portapapeis como texto", copySource: "", convertToCode: "", bringForward: "Traer cara adiante", sendToBack: "Enviar cara atrás", bringToFront: "Traer á fronte", sendBackward: "Enviar ao fondo", delete: "Borrar", copyStyles: "Copiar estilo", pasteStyles: "Pegar estilo", stroke: "Trazo", background: "Fondo", fill: "Recheo", strokeWidth: "Largo do trazo", strokeStyle: "Estilo do trazo", strokeStyle_solid: "Sólido", strokeStyle_dashed: "Liña de trazos", strokeStyle_dotted: "Liña de puntos", sloppiness: "Estilo de trazo", opacity: "Opacidade", textAlign: "Aliñar texto", edges: "Bordos", sharp: "Agudo", round: "Redondo", arrowheads: "Puntas de frecha", arrowhead_none: "Ningunha", arrowhead_arrow: "Frecha", arrowhead_bar: "Barra", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "Triángulo", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "Tamaño da fonte", fontFamily: "Tipo de fonte", addWatermark: 'Engadir "Feito con Excalidraw"', handDrawn: "Debuxado a man", normal: "Normal", code: "Código", small: "Pequeno", medium: "Mediano", large: "Grande", veryLarge: "Moi grande", solid: "Sólido", hachure: "Folleto", zigzag: "Zigzag", crossHatch: "Raiado transversal", thin: "Estreito", bold: "Groso", left: "Esquerda", center: "Centrado", right: "Dereita", extraBold: "Moi groso", architect: "Arquitecto", artist: "Artista", cartoonist: "Caricatura", fileTitle: "Nome do arquivo", colorPicker: "Selector de cor", canvasColors: "Usado en lenzo", canvasBackground: "Fondo do lenzo", drawingCanvas: "Lenzo de debuxo", layers: "Capas", actions: "Accións", language: "Idioma", liveCollaboration: "Colaboración en directo...", duplicateSelection: "Duplicar", untitled: "Sen título", name: "Nome", yourName: "O teu nome", madeWithExcalidraw: "Feito con Excalidraw", group: "Agrupar selección", ungroup: "Desagrupar selección", collaborators: "Colaboradores", showGrid: "Mostrar cuadrícula", addToLibrary: "Engadir á biblioteca", removeFromLibrary: "Eliminar da biblioteca", libraryLoadingMessage: "Cargando biblioteca…", libraries: "Explorar bibliotecas", loadingScene: "Cargando escena…", align: "Aliñamento", alignTop: "Aliñamento superior", alignBottom: "Aliñamento inferior", alignLeft: "Aliñar a esquerda", alignRight: "Aliñar a dereita", centerVertically: "Centrar verticalmente", centerHorizontally: "Centrar horizontalmente", distributeHorizontally: "Distribuír horizontalmente", distributeVertically: "Distribuír verticalmente", flipHorizontal: "Virar horizontalmente", flipVertical: "Virar verticalmente", viewMode: "Modo de visualización", share: "Compartir", showStroke: "Mostrar selector de cores do trazo", showBackground: "Mostrar selector de cores do fondo", toggleTheme: "Alternar tema", personalLib: "Biblioteca Persoal", excalidrawLib: "Biblioteca Excalidraw", decreaseFontSize: "Diminuír tamaño da fonte", increaseFontSize: "Aumentar o tamaño da fonte", unbindText: "Desvincular texto", bindText: "Ligar o texto ao contedor", createContainerFromText: "Envolver o texto nun contedor", link: { edit: "Editar ligazón", editEmbed: "", create: "Crear ligazón", createEmbed: "", label: "Ligazón", labelEmbed: "", empty: "" }, lineEditor: { edit: "Editar liña", exit: "Saír do editor de liñas" }, elementLock: { lock: "Bloquear", unlock: "Desbloquear", lockAll: "Bloquear todo", unlockAll: "Desbloquear todo" }, statusPublished: "Publicado", sidebarLock: "Manter a barra lateral aberta", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, a = { noItems: "Aínda non hai elementos engadidos...", hint_emptyLibrary: "Seleccione un elemento no lenzo para engadilo aquí, ou instale unha biblioteca dende o repositorio público, como se detalla a continuación.", hint_emptyPrivateLibrary: "Seleccione un elemento do lenzo para engadilo aquí." }, o = { clearReset: "Limpar o lenzo", exportJSON: "Exportar a arquivo", exportImage: "Exportar imaxe...", export: "Gardar en...", copyToClipboard: "Copiar ao portapapeis", save: "Gardar no ficheiro actual", saveAs: "Gardar como", load: "Abrir", getShareableLink: "Obter unha ligazón que se poida compartir", close: "Pechar", selectLanguage: "Seleccionar idioma", scrollBackToContent: "Volver ao contido", zoomIn: "Ampliar", zoomOut: "Reducir", resetZoom: "Reiniciar zoom", menu: "Menú", done: "Feito", edit: "Editar", undo: "Desfacer", redo: "Refacer", resetLibrary: "Reiniciar biblioteca", createNewRoom: "Crear nova sala", fullScreen: "Pantalla completa", darkMode: "Modo escuro", lightMode: "Modo claro", zenMode: "Modo zen", objectsSnapMode: "", exitZenMode: "Saír do modo zen", cancel: "Cancelar", clear: "Limpar", remove: "Eliminar", embed: "", publishLibrary: "Publicar", submit: "Enviar", confirm: "Confirmar", embeddableInteractionButton: "Faga clic para interactuar" }, r = { clearReset: "Isto limpará todo o lenzo. Estás seguro?", couldNotCreateShareableLink: "Non se puido crear unha ligazón para compartir.", couldNotCreateShareableLinkTooBig: "Non se puido crear a ligazón para compartir: a escena é demasiado grande", couldNotLoadInvalidFile: "Non se puido cargar o ficheiro non válido", importBackendFailed: "A importación dende o backend fallou.", cannotExportEmptyCanvas: "Non se pode exportar un lenzo baleiro.", couldNotCopyToClipboard: "Non se puido copiar ao portapapeis.", decryptFailed: "Non se poideron descifrar os datos.", uploadedSecurly: "A carga foi asegurada con cifrado de extremo a extremo, o que significa que o servidor de Excalidraw e terceiros non poden ler o contido.", loadSceneOverridePrompt: "A carga dun debuxo externo substituirá o contido existente. Desexa continuar?", collabStopOverridePrompt: `Deter a sesión, sobrescribirá o seu debuxo local previamente almacenado. Está seguro?
3
3
 
4
4
  (Se quere manter o seu debuxo local, simplemente peche a lapela do navegador.)`, errorAddingToLibrary: "Non se puido engadir o elemento á biblioteca", errorRemovingFromLibrary: "Non se puido eliminar o elemento da biblioteca", confirmAddLibrary: "Isto engadirá {{numShapes}} forma(s) a túa biblioteca. Estás seguro?", imageDoesNotContainScene: "Esta imaxe non parece conter ningún dato da escena. Activou a inserción de escenas durante a exportación?", cannotRestoreFromImage: "Non se puido restaurar a escena dende este arquivo de imaxe", invalidSceneUrl: "Non se puido importar a escena dende a URL proporcionada. Ou ben está malformada ou non contén un JSON con información válida para Excalidraw.", resetLibrary: "Isto limpará a súa biblioteca. Está seguro?", removeItemsFromsLibrary: "Eliminar {{count}} elemento(s) da biblioteca?", invalidEncryptionKey: "A clave de cifrado debe ter 22 caracteres. A colaboración en directo está desactivada.", collabOfflineWarning: `Non hai conexión a Internet dispoñible.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./layers.C4Me_ssm.js"),t=require("./layers.DcyKLTKN.js"),_=require("./layers.BLd2spTm.js"),N=require("./layers.D5FEVMaj.js");require("./layers.DBsOSFoM.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const k=s=>t.common$1.sanitizeText(s,t.getConfig());let w={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,o,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const n=s[r],d={shape:"rect",id:n.id,domId:n.domId,labelText:k(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};o.setNode(n.id,d),$(n.classes,o,f,i,n.id),t.log$1.info("setNode",d)})},$=function(s,o,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,n;const a=s[l],d=a.cssClasses.join(" "),g=t.getStylesFromArray(a.styles),p=a.label??a.id,y=0,u={labelStyle:g.labelStyle,shape:"class_box",labelText:k(p),classData:a,rx:y,ry:y,class:d,style:g.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((n=t.getConfig().class)==null?void 0:n.padding)};o.setNode(a.id,u),e&&o.setParent(a.id,e),t.log$1.info("setNode",u)})},D=function(s,o,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const n=e,a="",d={labelStyle:"",style:""},g=n.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:k(g),noteData:n,rx:p,ry:p,class:a,style:d.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(o.setNode(n.id,b),t.log$1.info("setNode",b),!n.class||!(n.class in i))return;const u=f+r,x={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(w.curve,t.curveLinear)};o.setEdge(n.id,n.class,x,u)})},E=function(s,o){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./layers.Dd8VPyy5.js"),t=require("./layers.CKOwE1KP.js"),_=require("./layers.BLd2spTm.js"),N=require("./layers.l1CT1blb.js");require("./layers.D8aJk5aR.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const k=s=>t.common$1.sanitizeText(s,t.getConfig());let w={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,o,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const n=s[r],d={shape:"rect",id:n.id,domId:n.domId,labelText:k(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};o.setNode(n.id,d),$(n.classes,o,f,i,n.id),t.log$1.info("setNode",d)})},$=function(s,o,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,n;const a=s[l],d=a.cssClasses.join(" "),g=t.getStylesFromArray(a.styles),p=a.label??a.id,y=0,u={labelStyle:g.labelStyle,shape:"class_box",labelText:k(p),classData:a,rx:y,ry:y,class:d,style:g.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((n=t.getConfig().class)==null?void 0:n.padding)};o.setNode(a.id,u),e&&o.setParent(a.id,e),t.log$1.info("setNode",u)})},D=function(s,o,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const n=e,a="",d={labelStyle:"",style:""},g=n.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:k(g),noteData:n,rx:p,ry:p,class:a,style:d.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(o.setNode(n.id,b),t.log$1.info("setNode",b),!n.class||!(n.class in i))return;const u=f+r,x={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(w.curve,t.curveLinear)};o.setEdge(n.id,n.class,x,u)})},E=function(s,o){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
2
2
  `),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),o.setEdge(e.id1,e.id2,l,i)})},A=function(s){w={...w,...s}},M=async function(s,o,f,i){t.log$1.info("Drawing class - ",o);const e=t.getConfig().flowchart??t.getConfig().class,r=t.getConfig().securityLevel;t.log$1.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,c=(e==null?void 0:e.rankSpacing)??50,n=new _.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),d=i.db.getClasses(),g=i.db.getRelations(),p=i.db.getNotes();t.log$1.info(g),q(a,n,o,i),$(d,n,o,i),E(g,n),D(p,n,g.length+1,d);let y;r==="sandbox"&&(y=t.select("#i"+o));const b=r==="sandbox"?t.select(y.nodes()[0].contentDocument.body):t.select("body"),u=b.select(`[id="${o}"]`),x=b.select("#"+o+" g");if(await N.render(x,n,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",o),t.utils.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),t.setupGraphViewbox$1(n,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const S=r==="sandbox"?y.nodes()[0].contentDocument:document,L=S.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const m of L){const T=m.getBBox(),h=S.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),m.insertBefore(h,m.firstChild)}}};function C(s){let o;switch(s){case 0:o="aggregation";break;case 1:o="extension";break;case 2:o="composition";break;case 3:o="dependency";break;case 4:o="lollipop";break;default:o="none"}return o}const I={setConf:A,draw:M},B={parser:v.parser$1,db:v.db,renderer:I,styles:v.styles,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,v.db.clear()}};exports.diagram=B;