@layers-app/editor 0.7.23 → 0.7.24

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 (234) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +7 -79
  3. package/dist/index.js +9 -15
  4. package/dist/{layers.DrEc52LK.js → layers.-58OrB2h.js} +1 -1
  5. package/dist/{layers.RWijwG9P.js → layers.-qmjZJBI.js} +1 -1
  6. package/dist/layers.1s4BbICk.js +1 -0
  7. package/dist/{layers.-cpLB214.js → layers.53hChJFF.js} +6 -6
  8. package/dist/{layers.DnEkqLVp.js → layers.5R_vfSOI.js} +1 -1
  9. package/dist/{layers.DJw2J7bw.js → layers.5U6DsNQ8.js} +6 -9
  10. package/dist/{layers.CMYe7bYN.js → layers.6Og6_hox.js} +1 -1
  11. package/dist/{layers.BazhlVmO.js → layers.8HXImnXe.js} +7 -7
  12. package/dist/{layers.B9UnUe7h.js → layers.90LiGxII.js} +5 -8
  13. package/dist/{layers.NrGhQL7i.js → layers.A6MvZ2Sd.js} +4 -4
  14. package/dist/{layers.DYzee1AM.js → layers.Aw65tqqV.js} +1 -1
  15. package/dist/{layers.gaS1bI-f.js → layers.B-Ftwt7z.js} +1 -1
  16. package/dist/{layers.DT2omWm7.js → layers.B0gBsd1G.js} +15 -18
  17. package/dist/{layers.DXJdiDQR.js → layers.B1l2IEoW.js} +1 -1
  18. package/dist/{layers.BOn89qn9.js → layers.B2SmhxzW.js} +1 -1
  19. package/dist/{layers.CM1N26Bn.js → layers.B2nS5rBS.js} +1 -1
  20. package/dist/{layers.CQ_qc_P4.js → layers.B4ZRP4dv.js} +1 -1
  21. package/dist/{layers.CE4cvR9M.js → layers.B5V9R6dS.js} +89 -92
  22. package/dist/{layers.D7NU7knG.js → layers.B6C5kDa3.js} +1 -1
  23. package/dist/{layers.Pdfj-rps.js → layers.B8qo87mf.js} +1 -1
  24. package/dist/{layers.DWi6TS6_.js → layers.BB-2khdc.js} +4 -4
  25. package/dist/{layers.CZhCCCF4.js → layers.BBgqB-dj.js} +1 -1
  26. package/dist/{layers.Dk79hkeN.js → layers.BCDRxkn5.js} +84 -86
  27. package/dist/{layers.D15hEfXi.js → layers.BDuP7QP1.js} +7 -7
  28. package/dist/{layers.Dlx8_WlO.js → layers.BE_-JA1T.js} +1 -1
  29. package/dist/{layers.D_ElsD-x.js → layers.BFDXAxa6.js} +1 -1
  30. package/dist/{layers.CJuRPa36.js → layers.BFclfxlH.js} +3 -3
  31. package/dist/{layers.DgSp_qNb.js → layers.BG9jBVsg.js} +1 -1
  32. package/dist/{layers.D60upjIB.js → layers.BGGuOo27.js} +1 -1
  33. package/dist/{layers.I6dVKb2e.js → layers.BI0TTMdG.js} +1 -1
  34. package/dist/{layers.D8mfmXuz.js → layers.BJOmz-8E.js} +1 -1
  35. package/dist/{layers.CNaC0uOJ.js → layers.BKOg8e2U.js} +1 -1
  36. package/dist/{layers.CD5MZRoU.js → layers.BKWiI_4a.js} +1 -1
  37. package/dist/{layers.CHgOkwRS.js → layers.BLERpK_S.js} +1 -1
  38. package/dist/layers.BLvWGmxZ.js +304 -0
  39. package/dist/{layers.CaaLILN3.js → layers.BNxa_eCc.js} +1 -1
  40. package/dist/{layers.Bk57FuHz.js → layers.BOWoLhye.js} +3 -3
  41. package/dist/layers.BPXa6Xko.js +8 -0
  42. package/dist/{layers.CY50u5GH.js → layers.BSwRsFvu.js} +7 -7
  43. package/dist/layers.BUT_cQlY.js +1 -0
  44. package/dist/{layers.YI-YTy5V.js → layers.BV2fpDYI.js} +1 -1
  45. package/dist/{layers.CiInvjHq.js → layers.BVHCv5uJ.js} +4 -7
  46. package/dist/{layers.BMiwXEvW.js → layers.BVSO7aWV.js} +1 -1
  47. package/dist/{layers.CPa8seQC.js → layers.BW593_YD.js} +1 -1
  48. package/dist/{layers.Bhsf0xTD.js → layers.BY9o3NTY.js} +1 -1
  49. package/dist/layers.BZMHF27f.js +6 -0
  50. package/dist/{layers.BUGfxwRr.js → layers.BZv7cxTR.js} +89 -92
  51. package/dist/{layers.BO79CD9P.js → layers.BbDBKF7d.js} +1 -1
  52. package/dist/{layers.DxlYXQXW.js → layers.BdiCSpJ4.js} +1 -1
  53. package/dist/{layers.BGdjq9k4.js → layers.Bdzg4UkM.js} +1 -1
  54. package/dist/{layers.CGjdGBZm.js → layers.BfK7Zksy.js} +1 -1
  55. package/dist/layers.Bfcc7TOH.js +1 -0
  56. package/dist/{layers.DK3yoXNH.js → layers.BhOCkx36.js} +1 -1
  57. package/dist/{layers.29-Qh75h.js → layers.Bi8uSmnl.js} +1 -1
  58. package/dist/{layers.COELVm2I.js → layers.BiD-9uwr.js} +1 -1
  59. package/dist/layers.BjtEPALX.js +19 -0
  60. package/dist/layers.BlT1aHiA.js +1 -0
  61. package/dist/{layers.D_LRJFEv.js → layers.Bq3WRO3x.js} +1 -1
  62. package/dist/{layers.bc_jaTfK.js → layers.BqikkqHY.js} +1 -1
  63. package/dist/{layers.uRZ4uGOB.js → layers.BqkB6bfG.js} +1 -1
  64. package/dist/{layers.Bm6lNIVW.js → layers.BqxiZwrm.js} +1 -1
  65. package/dist/layers.Br5DTynl.js +74 -0
  66. package/dist/{layers.Dv6WAMwH.js → layers.BrUMsy26.js} +1 -1
  67. package/dist/{layers.D1jHpzKw.js → layers.BsV8AKqE.js} +6 -9
  68. package/dist/{layers.BvzZuQYi.js → layers.BuGAznjj.js} +4 -4
  69. package/dist/{layers.BZETNwke.js → layers.Bv1xDmd0.js} +1 -1
  70. package/dist/{layers.B2KFTJGl.js → layers.Bvra5UGQ.js} +1 -1
  71. package/dist/{layers.73y0cSdc.js → layers.BwHEZWKu.js} +1 -1
  72. package/dist/{layers.BCqWj4Xz.js → layers.BwtMeyCj.js} +3 -3
  73. package/dist/{layers.DjfEK9cQ.js → layers.BxX_THjw.js} +1 -1
  74. package/dist/{layers.BiqSW2by.js → layers.Bzrkz_Q7.js} +1 -1
  75. package/dist/{layers.ij555eO_.js → layers.C-UCCxZT.js} +1 -1
  76. package/dist/{layers.DPnWbB6j.js → layers.C0BLZbdT.js} +1 -1
  77. package/dist/{layers.Cw-HPQf-.js → layers.C2-P7-v8.js} +1 -1
  78. package/dist/{layers.Z4nbVM_-.js → layers.C20Qi890.js} +1 -1
  79. package/dist/{layers.tfwszVHU.js → layers.C47JbXwl.js} +1 -1
  80. package/dist/{layers.BIG9YKzs.js → layers.C5JgdF76.js} +1 -1
  81. package/dist/{layers.BffDLyKk.js → layers.CA5feGxW.js} +1 -1
  82. package/dist/{layers.BDD1KfeR.js → layers.CCqe9zp9.js} +1 -1
  83. package/dist/{layers.TYxUe44n.js → layers.CDPIcOqa.js} +1 -1
  84. package/dist/{layers.BSfmVK7z.js → layers.CDexQZa_.js} +5 -8
  85. package/dist/{layers.C0OvS3X2.js → layers.CFSfvSsm.js} +1 -1
  86. package/dist/{layers.CcDkFL6P.js → layers.CH4plVEu.js} +3 -3
  87. package/dist/{layers.DBMV9sVv.js → layers.CHa9lFoT.js} +1 -1
  88. package/dist/{layers.CXDrUFaD.js → layers.CLT1Xhw2.js} +1 -1
  89. package/dist/{layers.2g3p410y.js → layers.CP3EufOe.js} +1 -1
  90. package/dist/{layers.Jso1Rtcd.js → layers.CPIxu6GO.js} +5 -8
  91. package/dist/{layers.D3HS9TbW.js → layers.CQMssu5A.js} +1 -1
  92. package/dist/layers.CQR0Nl7I.js +1 -0
  93. package/dist/{layers.35jlOcdS.js → layers.CR8SQeln.js} +224 -227
  94. package/dist/{layers.CJdUktnw.js → layers.CRKCl3-s.js} +1 -1
  95. package/dist/{layers.CHZLcfzW.js → layers.CSi2XRJ2.js} +1 -1
  96. package/dist/{layers.CxxIH2di.js → layers.CUV1fBKt.js} +12 -15
  97. package/dist/{layers.C2uP3dSX.js → layers.CV3PBAi0.js} +1 -1
  98. package/dist/{layers.BqRK5hcw.js → layers.CXPJGJnh.js} +1 -1
  99. package/dist/{layers.hgaybOo2.js → layers.CXp0yiA_.js} +1 -1
  100. package/dist/{layers.zxBrRE1P.js → layers.CYMmJIgK.js} +4 -7
  101. package/dist/{layers.D6MKuxHB.js → layers.Ca_hxCzh.js} +1 -1
  102. package/dist/{layers.CvQemHpn.js → layers.CadrukAB.js} +1 -1
  103. package/dist/{layers.Cz08SEjI.js → layers.Cc1VRWwn.js} +1 -1
  104. package/dist/{layers.pU2_Gt2w.js → layers.CeuPBpSS.js} +1 -1
  105. package/dist/{layers.DxJkl90c.js → layers.Cf85CE4j.js} +1 -1
  106. package/dist/{layers.CsMF9Mcc.js → layers.CfJUJqdv.js} +1 -1
  107. package/dist/layers.CgDb5aPr.js +2 -0
  108. package/dist/{layers.Bk6_Os8z.js → layers.CiFtNCp_.js} +1 -1
  109. package/dist/{layers.CA6t_Bjs.js → layers.CkEhuwys.js} +8 -11
  110. package/dist/{layers.BVKQ1q-V.js → layers.CmWWurhR.js} +1 -1
  111. package/dist/layers.CmxZ8EKk.js +1 -0
  112. package/dist/{layers.Q_PS-tRN.js → layers.Co1X8jDP.js} +1 -1
  113. package/dist/{layers.B2HAS3jD.js → layers.CoCdUjOH.js} +1 -1
  114. package/dist/layers.Cp63Ydn2.js +50707 -0
  115. package/dist/{layers.C4B4dvWx.js → layers.CqggRfmv.js} +1 -1
  116. package/dist/layers.CtCTIWni.js +1 -0
  117. package/dist/layers.Ctzw3Xb5.js +1 -0
  118. package/dist/{layers.DTuGifBE.js → layers.CvU_g0Ek.js} +1 -1
  119. package/dist/layers.Cw5bBQfp.js +118 -0
  120. package/dist/{layers.CP2XIdh_.js → layers.Cynva3D_.js} +1 -1
  121. package/dist/{layers.KlKmfsBA.js → layers.Czdt779o.js} +1 -1
  122. package/dist/{layers.-Tff0gbg.js → layers.D-iLQKYz.js} +1 -1
  123. package/dist/layers.D0GEGoV_.js +373 -0
  124. package/dist/{layers.uzQ-2V7t.js → layers.D0ptqEmo.js} +1 -1
  125. package/dist/{layers.CwqZ78CF.js → layers.D33lu-eC.js} +1 -1
  126. package/dist/{layers.CIBX4kN6.js → layers.D4VJ5B0e.js} +1 -1
  127. package/dist/layers.D5DNThwz.js +208 -0
  128. package/dist/{layers.Bu85fkOP.js → layers.D6XgZ8Az.js} +1 -1
  129. package/dist/layers.D71D_04V.js +1359 -0
  130. package/dist/{layers.D2f2ApIk.js → layers.D8vSQAh0.js} +8 -8
  131. package/dist/{layers.CnjADqOy.js → layers.D9yXBIuK.js} +1 -1
  132. package/dist/{layers.Cnqb7wKB.js → layers.DAF65Eyh.js} +1 -1
  133. package/dist/{layers.C4mOUFRJ.js → layers.DD5DttRP.js} +1 -1
  134. package/dist/{layers.C24-EacD.js → layers.DH-cj5fE.js} +2 -2
  135. package/dist/{layers.B-kCa5Od.js → layers.DJ7ZL_sW.js} +6 -9
  136. package/dist/layers.DJnnhy8m.js +96 -0
  137. package/dist/{layers.CMxdtuyk.js → layers.DM9hpazD.js} +1 -1
  138. package/dist/{layers.CSqoVmKS.js → layers.DNJEfwiQ.js} +1 -1
  139. package/dist/{layers.CupTWZsA.js → layers.DNOD_LF5.js} +1 -1
  140. package/dist/{layers.BLzus7b8.js → layers.DO1NcRAM.js} +1 -1
  141. package/dist/{layers.DbhnKU2H.js → layers.DPP6_cbD.js} +6 -9
  142. package/dist/{layers.C7SPnzuD.js → layers.DQIT2lCm.js} +1 -1
  143. package/dist/{layers.V47hYk_p.js → layers.DRZylWPP.js} +1 -1
  144. package/dist/{layers.uaIfPWsI.js → layers.DU7EZINs.js} +1 -1
  145. package/dist/{layers.4pgTRQX0.js → layers.DXyBsBF5.js} +1 -1
  146. package/dist/{layers.BJzTny2j.js → layers.D_XM1OQx.js} +3 -3
  147. package/dist/{layers.CJAH6bhp.js → layers.DcKjvxHE.js} +1 -1
  148. package/dist/{layers.BhTu7lKR.js → layers.DenZLHkn.js} +1 -1
  149. package/dist/{layers.BsHOozaJ.js → layers.Df79MJjN.js} +3 -3
  150. package/dist/{layers.DV77DVIT.js → layers.DfgtWeVl.js} +1 -1
  151. package/dist/layers.DgCaJXYg.js +257 -0
  152. package/dist/{layers.BOMJfSmk.js → layers.DjGdrDC1.js} +1 -1
  153. package/dist/{layers.Ba0U3m_a.js → layers.DmEW632Y.js} +2 -2
  154. package/dist/{layers.CG2UCtoJ.js → layers.DnvUnO-4.js} +1 -1
  155. package/dist/{layers.CfE7zjUC.js → layers.DpAWXloN.js} +7 -10
  156. package/dist/{layers.2nKKnihc.js → layers.Dq9b1xqh.js} +1 -1
  157. package/dist/{layers.CO_gtBDp.js → layers.DrZAE5o5.js} +1 -1
  158. package/dist/{layers.DDIAJqfF.js → layers.DrprvZC4.js} +1 -1
  159. package/dist/{layers.HUBCzsU0.js → layers.DvNvJZss.js} +1 -1
  160. package/dist/layers.Dvl1mlTI.js +1 -0
  161. package/dist/{layers.CbbuOQ3N.js → layers.DyvnTlHi.js} +1 -1
  162. package/dist/layers.DzDR_oG4.js +8 -0
  163. package/dist/{layers.Cf41PJM_.js → layers.DzghPRf3.js} +3813 -3230
  164. package/dist/{layers._pWN5IRm.js → layers.EXQpfQWq.js} +1 -1
  165. package/dist/{layers.y9K1nFwM.js → layers.FBzg3C04.js} +50 -50
  166. package/dist/{layers.DHXWA0Q_.js → layers.FlOgidCp.js} +1 -1
  167. package/dist/{layers.CyXyFV7h.js → layers.I85BW5o2.js} +1 -1
  168. package/dist/{layers.DYQ3Thdf.js → layers.IPxhkSfj.js} +1 -1
  169. package/dist/{layers.CPCRYtsi.js → layers.Lc29kAuz.js} +1 -1
  170. package/dist/{layers.DdfRdbPy.js → layers.MHEFRzDP.js} +5 -8
  171. package/dist/{layers.Cbgf19EI.js → layers.MNW-ShKu.js} +11 -14
  172. package/dist/{layers.CtKHNDRt.js → layers.Me9S-22r.js} +7 -10
  173. package/dist/{layers.u5kr3hHk.js → layers.Q-xFVVwC.js} +1 -1
  174. package/dist/layers.Qn6nodoY.js +2 -0
  175. package/dist/layers.R8mPlCA0.js +261 -0
  176. package/dist/{layers.BO4uJmfR.js → layers.RpoUh8kq.js} +1 -1
  177. package/dist/{layers.8ytQIYJn.js → layers.SsSYgMGG.js} +1 -1
  178. package/dist/{layers.BwTGqVnK.js → layers.V-9Fvifr.js} +1 -1
  179. package/dist/{layers.SlCB94vp.js → layers.W66NF2U9.js} +1 -1
  180. package/dist/{layers.CkH00BH2.js → layers.WwL-1p8w.js} +1 -1
  181. package/dist/{layers.CJc3FMhy.js → layers.X0J3BhYy.js} +4 -7
  182. package/dist/{layers.B9y931t5.js → layers.XS2AIvBG.js} +1 -1
  183. package/dist/{layers.CGId_znN.js → layers.XZft6Ook.js} +1 -1
  184. package/dist/{layers.BTZO4D1M.js → layers.adnwY8ML.js} +1 -1
  185. package/dist/layers.b9B2NY7n.js +11690 -0
  186. package/dist/{layers.7RM-Rgpr.js → layers.cf3uaysm.js} +1 -1
  187. package/dist/{layers.B2lIQaKn.js → layers.d9OooXQC.js} +1 -1
  188. package/dist/{layers.RDvNC_8V.js → layers.eNGl-u4H.js} +1 -1
  189. package/dist/{layers.SgNVpv0G.js → layers.eaKLR5Q2.js} +1 -1
  190. package/dist/{layers.BqssQgQi.js → layers.edPrT81i.js} +1 -1
  191. package/dist/{layers.C2gSNxMr.js → layers.ekCtLRbA.js} +1 -1
  192. package/dist/{layers.CiWApQBX.js → layers.fiMaf-_a.js} +3 -3
  193. package/dist/{layers.CnYkQAte.js → layers.gnAUWHV-.js} +1 -1
  194. package/dist/{layers.CnwMf9I0.js → layers.h4L4Mc41.js} +1 -1
  195. package/dist/{layers.C92eHUWa.js → layers.iyoop3cH.js} +3 -3
  196. package/dist/{layers.CrJ6Ln86.js → layers.jTaJiZzk.js} +1 -1
  197. package/dist/{layers.Dx6XWGBv.js → layers.jZvrWKJt.js} +1 -1
  198. package/dist/{layers.BNduWBRP.js → layers.l-ywSwa2.js} +1 -1
  199. package/dist/{layers.CuHedZYG.js → layers.lG7Mase1.js} +1 -1
  200. package/dist/{layers.B-9SWmBm.js → layers.mgh4Cwfx.js} +1 -1
  201. package/dist/{layers.ovBuAp5w.js → layers.mnoq184J.js} +1 -1
  202. package/dist/{layers.bHAHcDTt.js → layers.nFMauJSN.js} +1 -1
  203. package/dist/{layers.BuwjUr0U.js → layers.nNlLwZ_E.js} +1 -1
  204. package/dist/{layers.nVkvDfax.js → layers.oJ61CNkw.js} +1 -1
  205. package/dist/{layers.D3iO0BYj.js → layers.rzToPUAK.js} +1 -1
  206. package/dist/{layers.CdbUVvAx.js → layers.soJefnD3.js} +1 -1
  207. package/dist/{layers.mLGxc7Zs.js → layers.waYEJRmN.js} +1 -1
  208. package/dist/{layers.PUiCNtZG.js → layers.y0ia1Vp6.js} +1 -1
  209. package/dist/{layers.3URzBh7V.js → layers.zDfwTCmT.js} +1 -1
  210. package/package.json +1 -1
  211. package/dist/layers.BORw_DXM.js +0 -1
  212. package/dist/layers.BPXfA_Bi.js +0 -389
  213. package/dist/layers.Bn96IwAe.js +0 -96
  214. package/dist/layers.C5Ndiwef.js +0 -8
  215. package/dist/layers.C7XeME1v.js +0 -6
  216. package/dist/layers.C9iwVv2g.js +0 -1
  217. package/dist/layers.CCjwwvUf.js +0 -1
  218. package/dist/layers.CCsKL6P-.js +0 -1
  219. package/dist/layers.CTq-VHKd.js +0 -8
  220. package/dist/layers.D0BbR-kO.js +0 -76
  221. package/dist/layers.D1-NVvB4.js +0 -2
  222. package/dist/layers.D3ej58GE.js +0 -118
  223. package/dist/layers.D3kEalRl.js +0 -1
  224. package/dist/layers.DNR3bB9r.js +0 -2
  225. package/dist/layers.DVRVApG_.js +0 -22
  226. package/dist/layers.DzXJQPQT.js +0 -257
  227. package/dist/layers.GYLtRKCK.js +0 -1
  228. package/dist/layers.KJwFQi9T.js +0 -1
  229. package/dist/layers.RUMhBCMz.js +0 -1
  230. package/dist/layers.TF5UbhSz.js +0 -39287
  231. package/dist/layers.WIHPbs6I.js +0 -1225
  232. package/dist/layers.XvSvPUQo.js +0 -213
  233. package/dist/layers._fDrpnXx.js +0 -1
  234. package/dist/layers.fQ35NBL8.js +0 -271
@@ -1,1225 +0,0 @@
1
- import { W as se, a6 as ye, d as H, e as Ee, l as S, q as we, j as De, g as he, _ as ve } from "./layers.Cf41PJM_.js";
2
- import Ne from "lodash-es/clone.js";
3
- import { i as ke, a as Ie, b as Oe, p as Te, c as ge, d as ze } from "./layers.D15hEfXi.js";
4
- import { G as Ce } from "./layers.BJDrjORS.js";
5
- import "./layers.D2f2ApIk.js";
6
- import "lodash-es/memoize.js";
7
- import "lodash-es/merge.js";
8
- import "lodash-es/isEmpty.js";
9
- import { c as Ae } from "./layers.I6dVKb2e.js";
10
- import { o as Re } from "./layers.b0h5ZBmD.js";
11
- import { s as Be } from "./layers.D7jGxypv.js";
12
- var le, oe, ee = (function() {
13
- var e = function(D, o, s, i) {
14
- for (s = s || {}, i = D.length; i--; s[D[i]] = o)
15
- ;
16
- return s;
17
- }, a = [1, 7], d = [1, 13], c = [1, 14], n = [1, 15], g = [1, 19], l = [1, 16], f = [1, 17], b = [1, 18], p = [8, 30], x = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], y = [1, 23], T = [1, 24], v = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], N = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], L = {
18
- trace: function() {
19
- },
20
- yy: {},
21
- symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, block: 31, NODE_ID: 32, nodeShapeNLabel: 33, dirList: 34, DIR: 35, NODE_DSTART: 36, NODE_DEND: 37, BLOCK_ARROW_START: 38, BLOCK_ARROW_END: 39, classDef: 40, CLASSDEF_ID: 41, CLASSDEF_STYLEOPTS: 42, DEFAULT: 43, class: 44, CLASSENTITY_IDS: 45, STYLECLASS: 46, style: 47, STYLE_ENTITY_IDS: 48, STYLE_DEFINITION_DATA: 49, $accept: 0, $end: 1 },
22
- terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" },
23
- productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
24
- performAction: function(o, s, i, u, h, t, m) {
25
- var r = t.length - 1;
26
- switch (h) {
27
- case 4:
28
- u.getLogger().debug("Rule: separator (NL) ");
29
- break;
30
- case 5:
31
- u.getLogger().debug("Rule: separator (Space) ");
32
- break;
33
- case 6:
34
- u.getLogger().debug("Rule: separator (EOF) ");
35
- break;
36
- case 7:
37
- u.getLogger().debug("Rule: hierarchy: ", t[r - 1]), u.setHierarchy(t[r - 1]);
38
- break;
39
- case 8:
40
- u.getLogger().debug("Stop NL ");
41
- break;
42
- case 9:
43
- u.getLogger().debug("Stop EOF ");
44
- break;
45
- case 10:
46
- u.getLogger().debug("Stop NL2 ");
47
- break;
48
- case 11:
49
- u.getLogger().debug("Stop EOF2 ");
50
- break;
51
- case 12:
52
- u.getLogger().debug("Rule: statement: ", t[r]), typeof t[r].length == "number" ? this.$ = t[r] : this.$ = [t[r]];
53
- break;
54
- case 13:
55
- u.getLogger().debug("Rule: statement #2: ", t[r - 1]), this.$ = [t[r - 1]].concat(t[r]);
56
- break;
57
- case 14:
58
- u.getLogger().debug("Rule: link: ", t[r], o), this.$ = { edgeTypeStr: t[r], label: "" };
59
- break;
60
- case 15:
61
- u.getLogger().debug("Rule: LABEL link: ", t[r - 3], t[r - 1], t[r]), this.$ = { edgeTypeStr: t[r], label: t[r - 1] };
62
- break;
63
- case 18:
64
- const R = parseInt(t[r]), Y = u.generateId();
65
- this.$ = { id: Y, type: "space", label: "", width: R, children: [] };
66
- break;
67
- case 23:
68
- u.getLogger().debug("Rule: (nodeStatement link node) ", t[r - 2], t[r - 1], t[r], " typestr: ", t[r - 1].edgeTypeStr);
69
- const F = u.edgeStrToEdgeData(t[r - 1].edgeTypeStr);
70
- this.$ = [
71
- { id: t[r - 2].id, label: t[r - 2].label, type: t[r - 2].type, directions: t[r - 2].directions },
72
- { id: t[r - 2].id + "-" + t[r].id, start: t[r - 2].id, end: t[r].id, label: t[r - 1].label, type: "edge", directions: t[r].directions, arrowTypeEnd: F, arrowTypeStart: "arrow_open" },
73
- { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions }
74
- ];
75
- break;
76
- case 24:
77
- u.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[r - 1], t[r]), this.$ = { id: t[r - 1].id, label: t[r - 1].label, type: u.typeStr2Type(t[r - 1].typeStr), directions: t[r - 1].directions, widthInColumns: parseInt(t[r], 10) };
78
- break;
79
- case 25:
80
- u.getLogger().debug("Rule: nodeStatement (node) ", t[r]), this.$ = { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions, widthInColumns: 1 };
81
- break;
82
- case 26:
83
- u.getLogger().debug("APA123", this ? this : "na"), u.getLogger().debug("COLUMNS: ", t[r]), this.$ = { type: "column-setting", columns: t[r] === "auto" ? -1 : parseInt(t[r]) };
84
- break;
85
- case 27:
86
- u.getLogger().debug("Rule: id-block statement : ", t[r - 2], t[r - 1]), u.generateId(), this.$ = { ...t[r - 2], type: "composite", children: t[r - 1] };
87
- break;
88
- case 28:
89
- u.getLogger().debug("Rule: blockStatement : ", t[r - 2], t[r - 1], t[r]);
90
- const C = u.generateId();
91
- this.$ = { id: C, type: "composite", label: "", children: t[r - 1] };
92
- break;
93
- case 29:
94
- u.getLogger().debug("Rule: node (NODE_ID separator): ", t[r]), this.$ = { id: t[r] };
95
- break;
96
- case 30:
97
- u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[r - 1], t[r]), this.$ = { id: t[r - 1], label: t[r].label, typeStr: t[r].typeStr, directions: t[r].directions };
98
- break;
99
- case 31:
100
- u.getLogger().debug("Rule: dirList: ", t[r]), this.$ = [t[r]];
101
- break;
102
- case 32:
103
- u.getLogger().debug("Rule: dirList: ", t[r - 1], t[r]), this.$ = [t[r - 1]].concat(t[r]);
104
- break;
105
- case 33:
106
- u.getLogger().debug("Rule: nodeShapeNLabel: ", t[r - 2], t[r - 1], t[r]), this.$ = { typeStr: t[r - 2] + t[r], label: t[r - 1] };
107
- break;
108
- case 34:
109
- u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[r - 3], t[r - 2], " #3:", t[r - 1], t[r]), this.$ = { typeStr: t[r - 3] + t[r], label: t[r - 2], directions: t[r - 1] };
110
- break;
111
- case 35:
112
- case 36:
113
- this.$ = { type: "classDef", id: t[r - 1].trim(), css: t[r].trim() };
114
- break;
115
- case 37:
116
- this.$ = { type: "applyClass", id: t[r - 1].trim(), styleClass: t[r].trim() };
117
- break;
118
- case 38:
119
- this.$ = { type: "applyStyles", id: t[r - 1].trim(), stylesStr: t[r].trim() };
120
- break;
121
- }
122
- },
123
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 8: [1, 20] }, e(p, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: a, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }), e(x, [2, 16], { 14: 22, 15: y, 16: T }), e(x, [2, 17]), e(x, [2, 18]), e(x, [2, 19]), e(x, [2, 20]), e(x, [2, 21]), e(x, [2, 22]), e(v, [2, 25], { 27: [1, 25] }), e(x, [2, 26]), { 19: 26, 26: 12, 32: g }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(N, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(p, [2, 13]), { 26: 35, 32: g }, { 32: [2, 14] }, { 17: [1, 36] }, e(v, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: y, 16: T, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(N, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(v, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(x, [2, 28]), e(x, [2, 35]), e(x, [2, 36]), e(x, [2, 37]), e(x, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(x, [2, 27]), e(N, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(N, [2, 34]), { 39: [2, 32] }],
124
- defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
125
- parseError: function(o, s) {
126
- if (s.recoverable)
127
- this.trace(o);
128
- else {
129
- var i = new Error(o);
130
- throw i.hash = s, i;
131
- }
132
- },
133
- parse: function(o) {
134
- var s = this, i = [0], u = [], h = [null], t = [], m = this.table, r = "", R = 0, Y = 0, F = 2, C = 1, Le = t.slice.call(arguments, 1), w = Object.create(this.lexer), K = { yy: {} };
135
- for (var Z in this.yy)
136
- Object.prototype.hasOwnProperty.call(this.yy, Z) && (K.yy[Z] = this.yy[Z]);
137
- w.setInput(o, K.yy), K.yy.lexer = w, K.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
138
- var J = w.yylloc;
139
- t.push(J);
140
- var me = w.options && w.options.ranges;
141
- typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
142
- function _e() {
143
- var P;
144
- return P = u.pop() || w.lex() || C, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = s.symbols_[P] || P), P;
145
- }
146
- for (var I, M, z, Q, W = {}, X, B, ae, G; ; ) {
147
- if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((I === null || typeof I > "u") && (I = _e()), z = m[M] && m[M][I]), typeof z > "u" || !z.length || !z[0]) {
148
- var $ = "";
149
- G = [];
150
- for (X in m[M])
151
- this.terminals_[X] && X > F && G.push("'" + this.terminals_[X] + "'");
152
- w.showPosition ? $ = "Parse error on line " + (R + 1) + `:
153
- ` + w.showPosition() + `
154
- Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "Parse error on line " + (R + 1) + ": Unexpected " + (I == C ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError($, {
155
- text: w.match,
156
- token: this.terminals_[I] || I,
157
- line: w.yylineno,
158
- loc: J,
159
- expected: G
160
- });
161
- }
162
- if (z[0] instanceof Array && z.length > 1)
163
- throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + I);
164
- switch (z[0]) {
165
- case 1:
166
- i.push(I), h.push(w.yytext), t.push(w.yylloc), i.push(z[1]), I = null, Y = w.yyleng, r = w.yytext, R = w.yylineno, J = w.yylloc;
167
- break;
168
- case 2:
169
- if (B = this.productions_[z[1]][1], W.$ = h[h.length - B], W._$ = {
170
- first_line: t[t.length - (B || 1)].first_line,
171
- last_line: t[t.length - 1].last_line,
172
- first_column: t[t.length - (B || 1)].first_column,
173
- last_column: t[t.length - 1].last_column
174
- }, me && (W._$.range = [
175
- t[t.length - (B || 1)].range[0],
176
- t[t.length - 1].range[1]
177
- ]), Q = this.performAction.apply(W, [
178
- r,
179
- Y,
180
- R,
181
- K.yy,
182
- z[1],
183
- h,
184
- t
185
- ].concat(Le)), typeof Q < "u")
186
- return Q;
187
- B && (i = i.slice(0, -1 * B * 2), h = h.slice(0, -1 * B), t = t.slice(0, -1 * B)), i.push(this.productions_[z[1]][0]), h.push(W.$), t.push(W._$), ae = m[i[i.length - 2]][i[i.length - 1]], i.push(ae);
188
- break;
189
- case 3:
190
- return !0;
191
- }
192
- }
193
- return !0;
194
- }
195
- }, A = /* @__PURE__ */ (function() {
196
- var D = {
197
- EOF: 1,
198
- parseError: function(s, i) {
199
- if (this.yy.parser)
200
- this.yy.parser.parseError(s, i);
201
- else
202
- throw new Error(s);
203
- },
204
- // resets the lexer, sets new input
205
- setInput: function(o, s) {
206
- return this.yy = s || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
207
- first_line: 1,
208
- first_column: 0,
209
- last_line: 1,
210
- last_column: 0
211
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
212
- },
213
- // consumes and returns one char from the input
214
- input: function() {
215
- var o = this._input[0];
216
- this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
217
- var s = o.match(/(?:\r\n?|\n).*/g);
218
- return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
219
- },
220
- // unshifts one char (or a string) into the input
221
- unput: function(o) {
222
- var s = o.length, i = o.split(/(?:\r\n?|\n)/g);
223
- this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
224
- var u = this.match.split(/(?:\r\n?|\n)/g);
225
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), i.length - 1 && (this.yylineno -= i.length - 1);
226
- var h = this.yylloc.range;
227
- return this.yylloc = {
228
- first_line: this.yylloc.first_line,
229
- last_line: this.yylineno + 1,
230
- first_column: this.yylloc.first_column,
231
- last_column: i ? (i.length === u.length ? this.yylloc.first_column : 0) + u[u.length - i.length].length - i[0].length : this.yylloc.first_column - s
232
- }, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
233
- },
234
- // When called from action, caches matched text and appends it on next action
235
- more: function() {
236
- return this._more = !0, this;
237
- },
238
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
239
- reject: function() {
240
- if (this.options.backtrack_lexer)
241
- this._backtrack = !0;
242
- else
243
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
244
- ` + this.showPosition(), {
245
- text: "",
246
- token: null,
247
- line: this.yylineno
248
- });
249
- return this;
250
- },
251
- // retain first n characters of the match
252
- less: function(o) {
253
- this.unput(this.match.slice(o));
254
- },
255
- // displays already matched input, i.e. for error messages
256
- pastInput: function() {
257
- var o = this.matched.substr(0, this.matched.length - this.match.length);
258
- return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
259
- },
260
- // displays upcoming input, i.e. for error messages
261
- upcomingInput: function() {
262
- var o = this.match;
263
- return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
264
- },
265
- // displays the character position where the lexing error occurred, i.e. for error messages
266
- showPosition: function() {
267
- var o = this.pastInput(), s = new Array(o.length + 1).join("-");
268
- return o + this.upcomingInput() + `
269
- ` + s + "^";
270
- },
271
- // test the lexed token: return FALSE when not a match, otherwise return token
272
- test_match: function(o, s) {
273
- var i, u, h;
274
- if (this.options.backtrack_lexer && (h = {
275
- yylineno: this.yylineno,
276
- yylloc: {
277
- first_line: this.yylloc.first_line,
278
- last_line: this.last_line,
279
- first_column: this.yylloc.first_column,
280
- last_column: this.yylloc.last_column
281
- },
282
- yytext: this.yytext,
283
- match: this.match,
284
- matches: this.matches,
285
- matched: this.matched,
286
- yyleng: this.yyleng,
287
- offset: this.offset,
288
- _more: this._more,
289
- _input: this._input,
290
- yy: this.yy,
291
- conditionStack: this.conditionStack.slice(0),
292
- done: this.done
293
- }, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), u = o[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
294
- first_line: this.yylloc.last_line,
295
- last_line: this.yylineno + 1,
296
- first_column: this.yylloc.last_column,
297
- last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
298
- }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], i = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i)
299
- return i;
300
- if (this._backtrack) {
301
- for (var t in h)
302
- this[t] = h[t];
303
- return !1;
304
- }
305
- return !1;
306
- },
307
- // return next match in input
308
- next: function() {
309
- if (this.done)
310
- return this.EOF;
311
- this._input || (this.done = !0);
312
- var o, s, i, u;
313
- this._more || (this.yytext = "", this.match = "");
314
- for (var h = this._currentRules(), t = 0; t < h.length; t++)
315
- if (i = this._input.match(this.rules[h[t]]), i && (!s || i[0].length > s[0].length)) {
316
- if (s = i, u = t, this.options.backtrack_lexer) {
317
- if (o = this.test_match(i, h[t]), o !== !1)
318
- return o;
319
- if (this._backtrack) {
320
- s = !1;
321
- continue;
322
- } else
323
- return !1;
324
- } else if (!this.options.flex)
325
- break;
326
- }
327
- return s ? (o = this.test_match(s, h[u]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
328
- ` + this.showPosition(), {
329
- text: "",
330
- token: null,
331
- line: this.yylineno
332
- });
333
- },
334
- // return next match that has a token
335
- lex: function() {
336
- var s = this.next();
337
- return s || this.lex();
338
- },
339
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
340
- begin: function(s) {
341
- this.conditionStack.push(s);
342
- },
343
- // pop the previously active lexer condition state off the condition stack
344
- popState: function() {
345
- var s = this.conditionStack.length - 1;
346
- return s > 0 ? this.conditionStack.pop() : this.conditionStack[0];
347
- },
348
- // produce the lexer rule set which is active for the currently active lexer condition state
349
- _currentRules: function() {
350
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
351
- },
352
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
353
- topState: function(s) {
354
- return s = this.conditionStack.length - 1 - Math.abs(s || 0), s >= 0 ? this.conditionStack[s] : "INITIAL";
355
- },
356
- // alias for begin(condition)
357
- pushState: function(s) {
358
- this.begin(s);
359
- },
360
- // return the number of states currently on the stack
361
- stateStackSize: function() {
362
- return this.conditionStack.length;
363
- },
364
- options: {},
365
- performAction: function(s, i, u, h) {
366
- switch (u) {
367
- case 0:
368
- return 10;
369
- case 1:
370
- return s.getLogger().debug("Found space-block"), 31;
371
- case 2:
372
- return s.getLogger().debug("Found nl-block"), 31;
373
- case 3:
374
- return s.getLogger().debug("Found space-block"), 29;
375
- case 4:
376
- s.getLogger().debug(".", i.yytext);
377
- break;
378
- case 5:
379
- s.getLogger().debug("_", i.yytext);
380
- break;
381
- case 6:
382
- return 5;
383
- case 7:
384
- return i.yytext = -1, 28;
385
- case 8:
386
- return i.yytext = i.yytext.replace(/columns\s+/, ""), s.getLogger().debug("COLUMNS (LEX)", i.yytext), 28;
387
- case 9:
388
- this.pushState("md_string");
389
- break;
390
- case 10:
391
- return "MD_STR";
392
- case 11:
393
- this.popState();
394
- break;
395
- case 12:
396
- this.pushState("string");
397
- break;
398
- case 13:
399
- s.getLogger().debug("LEX: POPPING STR:", i.yytext), this.popState();
400
- break;
401
- case 14:
402
- return s.getLogger().debug("LEX: STR end:", i.yytext), "STR";
403
- case 15:
404
- return i.yytext = i.yytext.replace(/space\:/, ""), s.getLogger().debug("SPACE NUM (LEX)", i.yytext), 21;
405
- case 16:
406
- return i.yytext = "1", s.getLogger().debug("COLUMNS (LEX)", i.yytext), 21;
407
- case 17:
408
- return 43;
409
- case 18:
410
- return "LINKSTYLE";
411
- case 19:
412
- return "INTERPOLATE";
413
- case 20:
414
- return this.pushState("CLASSDEF"), 40;
415
- case 21:
416
- return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
417
- case 22:
418
- return this.popState(), this.pushState("CLASSDEFID"), 41;
419
- case 23:
420
- return this.popState(), 42;
421
- case 24:
422
- return this.pushState("CLASS"), 44;
423
- case 25:
424
- return this.popState(), this.pushState("CLASS_STYLE"), 45;
425
- case 26:
426
- return this.popState(), 46;
427
- case 27:
428
- return this.pushState("STYLE_STMNT"), 47;
429
- case 28:
430
- return this.popState(), this.pushState("STYLE_DEFINITION"), 48;
431
- case 29:
432
- return this.popState(), 49;
433
- case 30:
434
- return this.pushState("acc_title"), "acc_title";
435
- case 31:
436
- return this.popState(), "acc_title_value";
437
- case 32:
438
- return this.pushState("acc_descr"), "acc_descr";
439
- case 33:
440
- return this.popState(), "acc_descr_value";
441
- case 34:
442
- this.pushState("acc_descr_multiline");
443
- break;
444
- case 35:
445
- this.popState();
446
- break;
447
- case 36:
448
- return "acc_descr_multiline_value";
449
- case 37:
450
- return 30;
451
- case 38:
452
- return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
453
- case 39:
454
- return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
455
- case 40:
456
- return this.popState(), s.getLogger().debug("Lex: ))"), "NODE_DEND";
457
- case 41:
458
- return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
459
- case 42:
460
- return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
461
- case 43:
462
- return this.popState(), s.getLogger().debug("Lex: (-"), "NODE_DEND";
463
- case 44:
464
- return this.popState(), s.getLogger().debug("Lex: -)"), "NODE_DEND";
465
- case 45:
466
- return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
467
- case 46:
468
- return this.popState(), s.getLogger().debug("Lex: ]]"), "NODE_DEND";
469
- case 47:
470
- return this.popState(), s.getLogger().debug("Lex: ("), "NODE_DEND";
471
- case 48:
472
- return this.popState(), s.getLogger().debug("Lex: ])"), "NODE_DEND";
473
- case 49:
474
- return this.popState(), s.getLogger().debug("Lex: /]"), "NODE_DEND";
475
- case 50:
476
- return this.popState(), s.getLogger().debug("Lex: /]"), "NODE_DEND";
477
- case 51:
478
- return this.popState(), s.getLogger().debug("Lex: )]"), "NODE_DEND";
479
- case 52:
480
- return this.popState(), s.getLogger().debug("Lex: )"), "NODE_DEND";
481
- case 53:
482
- return this.popState(), s.getLogger().debug("Lex: ]>"), "NODE_DEND";
483
- case 54:
484
- return this.popState(), s.getLogger().debug("Lex: ]"), "NODE_DEND";
485
- case 55:
486
- return s.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 36;
487
- case 56:
488
- return s.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 36;
489
- case 57:
490
- return s.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 36;
491
- case 58:
492
- return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
493
- case 59:
494
- return s.getLogger().debug("Lex: ((("), this.pushState("NODE"), 36;
495
- case 60:
496
- return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
497
- case 61:
498
- return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
499
- case 62:
500
- return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
501
- case 63:
502
- return s.getLogger().debug("Lexc: >"), this.pushState("NODE"), 36;
503
- case 64:
504
- return s.getLogger().debug("Lexa: (["), this.pushState("NODE"), 36;
505
- case 65:
506
- return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
507
- case 66:
508
- return this.pushState("NODE"), 36;
509
- case 67:
510
- return this.pushState("NODE"), 36;
511
- case 68:
512
- return this.pushState("NODE"), 36;
513
- case 69:
514
- return this.pushState("NODE"), 36;
515
- case 70:
516
- return this.pushState("NODE"), 36;
517
- case 71:
518
- return this.pushState("NODE"), 36;
519
- case 72:
520
- return this.pushState("NODE"), 36;
521
- case 73:
522
- return s.getLogger().debug("Lexa: ["), this.pushState("NODE"), 36;
523
- case 74:
524
- return this.pushState("BLOCK_ARROW"), s.getLogger().debug("LEX ARR START"), 38;
525
- case 75:
526
- return s.getLogger().debug("Lex: NODE_ID", i.yytext), 32;
527
- case 76:
528
- return s.getLogger().debug("Lex: EOF", i.yytext), 8;
529
- case 77:
530
- this.pushState("md_string");
531
- break;
532
- case 78:
533
- this.pushState("md_string");
534
- break;
535
- case 79:
536
- return "NODE_DESCR";
537
- case 80:
538
- this.popState();
539
- break;
540
- case 81:
541
- s.getLogger().debug("Lex: Starting string"), this.pushState("string");
542
- break;
543
- case 82:
544
- s.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
545
- break;
546
- case 83:
547
- return s.getLogger().debug("LEX: NODE_DESCR:", i.yytext), "NODE_DESCR";
548
- case 84:
549
- s.getLogger().debug("LEX POPPING"), this.popState();
550
- break;
551
- case 85:
552
- s.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
553
- break;
554
- case 86:
555
- return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (right): dir:", i.yytext), "DIR";
556
- case 87:
557
- return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (left):", i.yytext), "DIR";
558
- case 88:
559
- return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (x):", i.yytext), "DIR";
560
- case 89:
561
- return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (y):", i.yytext), "DIR";
562
- case 90:
563
- return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (up):", i.yytext), "DIR";
564
- case 91:
565
- return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (down):", i.yytext), "DIR";
566
- case 92:
567
- return i.yytext = "]>", s.getLogger().debug("Lex (ARROW_DIR end):", i.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
568
- case 93:
569
- return s.getLogger().debug("Lex: LINK", "#" + i.yytext + "#"), 15;
570
- case 94:
571
- return s.getLogger().debug("Lex: LINK", i.yytext), 15;
572
- case 95:
573
- return s.getLogger().debug("Lex: LINK", i.yytext), 15;
574
- case 96:
575
- return s.getLogger().debug("Lex: LINK", i.yytext), 15;
576
- case 97:
577
- return s.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
578
- case 98:
579
- return s.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
580
- case 99:
581
- return s.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
582
- case 100:
583
- this.pushState("md_string");
584
- break;
585
- case 101:
586
- return s.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
587
- case 102:
588
- return this.popState(), s.getLogger().debug("Lex: LINK", "#" + i.yytext + "#"), 15;
589
- case 103:
590
- return this.popState(), s.getLogger().debug("Lex: LINK", i.yytext), 15;
591
- case 104:
592
- return this.popState(), s.getLogger().debug("Lex: LINK", i.yytext), 15;
593
- case 105:
594
- return s.getLogger().debug("Lex: COLON", i.yytext), i.yytext = i.yytext.slice(1), 27;
595
- }
596
- },
597
- rules: [/^(?:block-beta\b)/, /^(?:block\s+)/, /^(?:block\n+)/, /^(?:block:)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
598
- conditions: { STYLE_DEFINITION: { rules: [29], inclusive: !1 }, STYLE_STMNT: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [23], inclusive: !1 }, CLASSDEF: { rules: [21, 22], inclusive: !1 }, CLASS_STYLE: { rules: [26], inclusive: !1 }, CLASS: { rules: [25], inclusive: !1 }, LLABEL: { rules: [100, 101, 102, 103, 104], inclusive: !1 }, ARROW_DIR: { rules: [86, 87, 88, 89, 90, 91, 92], inclusive: !1 }, BLOCK_ARROW: { rules: [77, 82, 85], inclusive: !1 }, NODE: { rules: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], inclusive: !1 }, md_string: { rules: [10, 11, 79, 80], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [13, 14, 83, 84], inclusive: !1 }, acc_descr_multiline: { rules: [35, 36], inclusive: !1 }, acc_descr: { rules: [33], inclusive: !1 }, acc_title: { rules: [31], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 24, 27, 30, 32, 34, 37, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 93, 94, 95, 96, 97, 98, 99, 105], inclusive: !0 } }
599
- };
600
- return D;
601
- })();
602
- L.lexer = A;
603
- function k() {
604
- this.yy = {};
605
- }
606
- return k.prototype = L, L.Parser = k, new k();
607
- })();
608
- ee.parser = ee;
609
- const Pe = ee;
610
- let O = {}, ie = [], j = {};
611
- const ce = "color", ue = "fill", Fe = "bgFill", pe = ",", Ke = he();
612
- let V = {};
613
- const Me = (e) => De.sanitizeText(e, Ke), Ye = function(e, a = "") {
614
- V[e] === void 0 && (V[e] = { id: e, styles: [], textStyles: [] });
615
- const d = V[e];
616
- a != null && a.split(pe).forEach((c) => {
617
- const n = c.replace(/([^;]*);/, "$1").trim();
618
- if (c.match(ce)) {
619
- const l = n.replace(ue, Fe).replace(ce, ue);
620
- d.textStyles.push(l);
621
- }
622
- d.styles.push(n);
623
- });
624
- }, We = function(e, a = "") {
625
- const d = O[e];
626
- a != null && (d.styles = a.split(pe));
627
- }, je = function(e, a) {
628
- e.split(",").forEach(function(d) {
629
- let c = O[d];
630
- if (c === void 0) {
631
- const n = d.trim();
632
- O[n] = { id: n, type: "na", children: [] }, c = O[n];
633
- }
634
- c.classes || (c.classes = []), c.classes.push(a);
635
- });
636
- }, fe = (e, a) => {
637
- const d = e.flat(), c = [];
638
- for (const n of d) {
639
- if (n.label && (n.label = Me(n.label)), n.type === "classDef") {
640
- Ye(n.id, n.css);
641
- continue;
642
- }
643
- if (n.type === "applyClass") {
644
- je(n.id, (n == null ? void 0 : n.styleClass) || "");
645
- continue;
646
- }
647
- if (n.type === "applyStyles") {
648
- n != null && n.stylesStr && We(n.id, n == null ? void 0 : n.stylesStr);
649
- continue;
650
- }
651
- if (n.type === "column-setting")
652
- a.columns = n.columns || -1;
653
- else if (n.type === "edge")
654
- j[n.id] ? j[n.id]++ : j[n.id] = 1, n.id = j[n.id] + "-" + n.id, ie.push(n);
655
- else {
656
- n.label || (n.type === "composite" ? n.label = "" : n.label = n.id);
657
- const g = !O[n.id];
658
- if (g ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children && fe(n.children, n), n.type === "space") {
659
- const l = n.width || 1;
660
- for (let f = 0; f < l; f++) {
661
- const b = Ne(n);
662
- b.id = b.id + "-" + f, O[b.id] = b, c.push(b);
663
- }
664
- } else g && c.push(n);
665
- }
666
- }
667
- a.children = c;
668
- };
669
- let re = [], U = { id: "root", type: "composite", children: [], columns: -1 };
670
- const Ve = () => {
671
- S.debug("Clear called"), we(), U = { id: "root", type: "composite", children: [], columns: -1 }, O = { root: U }, re = [], V = {}, ie = [], j = {};
672
- };
673
- function Ue(e) {
674
- switch (S.debug("typeStr2Type", e), e) {
675
- case "[]":
676
- return "square";
677
- case "()":
678
- return S.debug("we have a round"), "round";
679
- case "(())":
680
- return "circle";
681
- case ">]":
682
- return "rect_left_inv_arrow";
683
- case "{}":
684
- return "diamond";
685
- case "{{}}":
686
- return "hexagon";
687
- case "([])":
688
- return "stadium";
689
- case "[[]]":
690
- return "subroutine";
691
- case "[()]":
692
- return "cylinder";
693
- case "((()))":
694
- return "doublecircle";
695
- case "[//]":
696
- return "lean_right";
697
- case "[\\\\]":
698
- return "lean_left";
699
- case "[/\\]":
700
- return "trapezoid";
701
- case "[\\/]":
702
- return "inv_trapezoid";
703
- case "<[]>":
704
- return "block_arrow";
705
- default:
706
- return "na";
707
- }
708
- }
709
- function Xe(e) {
710
- switch (S.debug("typeStr2Type", e), e) {
711
- case "==":
712
- return "thick";
713
- default:
714
- return "normal";
715
- }
716
- }
717
- function Ge(e) {
718
- switch (e.trim()) {
719
- case "--x":
720
- return "arrow_cross";
721
- case "--o":
722
- return "arrow_circle";
723
- default:
724
- return "arrow_point";
725
- }
726
- }
727
- let de = 0;
728
- const He = () => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + de), qe = (e) => {
729
- U.children = e, fe(e, U), re = U.children;
730
- }, Ze = (e) => {
731
- const a = O[e];
732
- return a ? a.columns ? a.columns : a.children ? a.children.length : -1 : -1;
733
- }, Je = () => [...Object.values(O)], Qe = () => re || [], $e = () => ie, et = (e) => O[e], tt = (e) => {
734
- O[e.id] = e;
735
- }, st = () => console, it = function() {
736
- return V;
737
- }, rt = {
738
- getConfig: () => se().block,
739
- typeStr2Type: Ue,
740
- edgeTypeStr2Type: Xe,
741
- edgeStrToEdgeData: Ge,
742
- getLogger: st,
743
- getBlocksFlat: Je,
744
- getBlocks: Qe,
745
- getEdges: $e,
746
- setHierarchy: qe,
747
- getBlock: et,
748
- setBlock: tt,
749
- getColumns: Ze,
750
- getClasses: it,
751
- clear: Ve,
752
- generateId: He
753
- }, nt = rt, q = (e, a) => {
754
- const d = Ae, c = d(e, "r"), n = d(e, "g"), g = d(e, "b");
755
- return ye(c, n, g, a);
756
- }, at = (e) => `.label {
757
- font-family: ${e.fontFamily};
758
- color: ${e.nodeTextColor || e.textColor};
759
- }
760
- .cluster-label text {
761
- fill: ${e.titleColor};
762
- }
763
- .cluster-label span,p {
764
- color: ${e.titleColor};
765
- }
766
-
767
-
768
-
769
- .label text,span,p {
770
- fill: ${e.nodeTextColor || e.textColor};
771
- color: ${e.nodeTextColor || e.textColor};
772
- }
773
-
774
- .node rect,
775
- .node circle,
776
- .node ellipse,
777
- .node polygon,
778
- .node path {
779
- fill: ${e.mainBkg};
780
- stroke: ${e.nodeBorder};
781
- stroke-width: 1px;
782
- }
783
- .flowchart-label text {
784
- text-anchor: middle;
785
- }
786
- // .flowchart-label .text-outer-tspan {
787
- // text-anchor: middle;
788
- // }
789
- // .flowchart-label .text-inner-tspan {
790
- // text-anchor: start;
791
- // }
792
-
793
- .node .label {
794
- text-align: center;
795
- }
796
- .node.clickable {
797
- cursor: pointer;
798
- }
799
-
800
- .arrowheadPath {
801
- fill: ${e.arrowheadColor};
802
- }
803
-
804
- .edgePath .path {
805
- stroke: ${e.lineColor};
806
- stroke-width: 2.0px;
807
- }
808
-
809
- .flowchart-link {
810
- stroke: ${e.lineColor};
811
- fill: none;
812
- }
813
-
814
- .edgeLabel {
815
- background-color: ${e.edgeLabelBackground};
816
- rect {
817
- opacity: 0.5;
818
- background-color: ${e.edgeLabelBackground};
819
- fill: ${e.edgeLabelBackground};
820
- }
821
- text-align: center;
822
- }
823
-
824
- /* For html labels only */
825
- .labelBkg {
826
- background-color: ${q(e.edgeLabelBackground, 0.5)};
827
- // background-color:
828
- }
829
-
830
- .node .cluster {
831
- // fill: ${q(e.mainBkg, 0.5)};
832
- fill: ${q(e.clusterBkg, 0.5)};
833
- stroke: ${q(e.clusterBorder, 0.2)};
834
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
835
- stroke-width: 1px;
836
- }
837
-
838
- .cluster text {
839
- fill: ${e.titleColor};
840
- }
841
-
842
- .cluster span,p {
843
- color: ${e.titleColor};
844
- }
845
- /* .cluster div {
846
- color: ${e.titleColor};
847
- } */
848
-
849
- div.mermaidTooltip {
850
- position: absolute;
851
- text-align: center;
852
- max-width: 200px;
853
- padding: 2px;
854
- font-family: ${e.fontFamily};
855
- font-size: 12px;
856
- background: ${e.tertiaryColor};
857
- border: 1px solid ${e.border2};
858
- border-radius: 2px;
859
- pointer-events: none;
860
- z-index: 100;
861
- }
862
-
863
- .flowchartTitleText {
864
- text-anchor: middle;
865
- font-size: 18px;
866
- fill: ${e.textColor};
867
- }
868
- `, lt = at;
869
- function be(e, a, d = !1) {
870
- var c, n, g;
871
- const l = e;
872
- let f = "default";
873
- (((c = l == null ? void 0 : l.classes) == null ? void 0 : c.length) || 0) > 0 && (f = ((l == null ? void 0 : l.classes) || []).join(" ")), f = f + " flowchart-label";
874
- let b = 0, p = "", x;
875
- switch (l.type) {
876
- case "round":
877
- b = 5, p = "rect";
878
- break;
879
- case "composite":
880
- b = 0, p = "composite", x = 0;
881
- break;
882
- case "square":
883
- p = "rect";
884
- break;
885
- case "diamond":
886
- p = "question";
887
- break;
888
- case "hexagon":
889
- p = "hexagon";
890
- break;
891
- case "block_arrow":
892
- p = "block_arrow";
893
- break;
894
- case "odd":
895
- p = "rect_left_inv_arrow";
896
- break;
897
- case "lean_right":
898
- p = "lean_right";
899
- break;
900
- case "lean_left":
901
- p = "lean_left";
902
- break;
903
- case "trapezoid":
904
- p = "trapezoid";
905
- break;
906
- case "inv_trapezoid":
907
- p = "inv_trapezoid";
908
- break;
909
- case "rect_left_inv_arrow":
910
- p = "rect_left_inv_arrow";
911
- break;
912
- case "circle":
913
- p = "circle";
914
- break;
915
- case "ellipse":
916
- p = "ellipse";
917
- break;
918
- case "stadium":
919
- p = "stadium";
920
- break;
921
- case "subroutine":
922
- p = "subroutine";
923
- break;
924
- case "cylinder":
925
- p = "cylinder";
926
- break;
927
- case "group":
928
- p = "rect";
929
- break;
930
- case "doublecircle":
931
- p = "doublecircle";
932
- break;
933
- default:
934
- p = "rect";
935
- }
936
- const y = ve((l == null ? void 0 : l.styles) || []), T = l.label, v = l.size || { width: 0, height: 0, x: 0, y: 0 };
937
- return {
938
- labelStyle: y.labelStyle,
939
- shape: p,
940
- labelText: T,
941
- rx: b,
942
- ry: b,
943
- class: f,
944
- style: y.style,
945
- id: l.id,
946
- directions: l.directions,
947
- width: v.width,
948
- height: v.height,
949
- x: v.x,
950
- y: v.y,
951
- positioned: d,
952
- intersect: void 0,
953
- type: l.type,
954
- padding: x ?? (((g = (n = se()) == null ? void 0 : n.block) == null ? void 0 : g.padding) || 0)
955
- };
956
- }
957
- async function ot(e, a, d) {
958
- const c = be(a, d, !1);
959
- if (c.type === "group")
960
- return;
961
- const n = await ge(e, c), g = n.node().getBBox(), l = d.getBlock(c.id);
962
- l.size = { width: g.width, height: g.height, x: 0, y: 0, node: n }, d.setBlock(l), n.remove();
963
- }
964
- async function ct(e, a, d) {
965
- const c = be(a, d, !0);
966
- d.getBlock(c.id).type !== "space" && (await ge(e, c), a.intersect = c == null ? void 0 : c.intersect, ze(c));
967
- }
968
- async function ne(e, a, d, c) {
969
- for (const n of a)
970
- await c(e, n, d), n.children && await ne(e, n.children, d, c);
971
- }
972
- async function ut(e, a, d) {
973
- await ne(e, a, d, ot);
974
- }
975
- async function dt(e, a, d) {
976
- await ne(e, a, d, ct);
977
- }
978
- async function ht(e, a, d, c, n) {
979
- const g = new Ce({
980
- multigraph: !0,
981
- compound: !0
982
- });
983
- g.setGraph({
984
- rankdir: "TB",
985
- nodesep: 10,
986
- ranksep: 10,
987
- marginx: 8,
988
- marginy: 8
989
- });
990
- for (const l of d)
991
- l.size && g.setNode(l.id, {
992
- width: l.size.width,
993
- height: l.size.height,
994
- intersect: l.intersect
995
- });
996
- for (const l of a)
997
- if (l.start && l.end) {
998
- const f = c.getBlock(l.start), b = c.getBlock(l.end);
999
- if (f != null && f.size && (b != null && b.size)) {
1000
- const p = f.size, x = b.size, y = [
1001
- { x: p.x, y: p.y },
1002
- { x: p.x + (x.x - p.x) / 2, y: p.y + (x.y - p.y) / 2 },
1003
- { x: x.x, y: x.y }
1004
- ];
1005
- await Ie(
1006
- e,
1007
- { v: l.start, w: l.end, name: l.id },
1008
- {
1009
- ...l,
1010
- arrowTypeEnd: l.arrowTypeEnd,
1011
- arrowTypeStart: l.arrowTypeStart,
1012
- points: y,
1013
- classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1014
- },
1015
- void 0,
1016
- "block",
1017
- g,
1018
- n
1019
- ), l.label && (await Oe(e, {
1020
- ...l,
1021
- label: l.label,
1022
- labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1023
- arrowTypeEnd: l.arrowTypeEnd,
1024
- arrowTypeStart: l.arrowTypeStart
1025
- }), await Te(
1026
- { ...l, x: y[1].x, y: y[1].y },
1027
- {
1028
- originalPath: y
1029
- }
1030
- ));
1031
- }
1032
- }
1033
- }
1034
- const _ = ((oe = (le = he()) == null ? void 0 : le.block) == null ? void 0 : oe.padding) || 8;
1035
- function gt(e, a) {
1036
- if (e === 0 || !Number.isInteger(e))
1037
- throw new Error("Columns must be an integer !== 0.");
1038
- if (a < 0 || !Number.isInteger(a))
1039
- throw new Error("Position must be a non-negative integer." + a);
1040
- if (e < 0)
1041
- return { px: a, py: 0 };
1042
- if (e === 1)
1043
- return { px: 0, py: a };
1044
- const d = a % e, c = Math.floor(a / e);
1045
- return { px: d, py: c };
1046
- }
1047
- const pt = (e) => {
1048
- let a = 0, d = 0;
1049
- for (const c of e.children) {
1050
- const { width: n, height: g, x: l, y: f } = c.size || { width: 0, height: 0, x: 0, y: 0 };
1051
- S.debug(
1052
- "getMaxChildSize abc95 child:",
1053
- c.id,
1054
- "width:",
1055
- n,
1056
- "height:",
1057
- g,
1058
- "x:",
1059
- l,
1060
- "y:",
1061
- f,
1062
- c.type
1063
- ), c.type !== "space" && (n > a && (a = n / (e.widthInColumns || 1)), g > d && (d = g));
1064
- }
1065
- return { width: a, height: d };
1066
- };
1067
- function te(e, a, d = 0, c = 0) {
1068
- var n, g, l, f, b, p, x, y, T, v, N;
1069
- S.debug(
1070
- "setBlockSizes abc95 (start)",
1071
- e.id,
1072
- (n = e == null ? void 0 : e.size) == null ? void 0 : n.x,
1073
- "block width =",
1074
- e == null ? void 0 : e.size,
1075
- "sieblingWidth",
1076
- d
1077
- ), (g = e == null ? void 0 : e.size) != null && g.width || (e.size = {
1078
- width: d,
1079
- height: c,
1080
- x: 0,
1081
- y: 0
1082
- });
1083
- let E = 0, L = 0;
1084
- if (((l = e.children) == null ? void 0 : l.length) > 0) {
1085
- for (const h of e.children)
1086
- te(h, a);
1087
- const A = pt(e);
1088
- E = A.width, L = A.height, S.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", E, L);
1089
- for (const h of e.children)
1090
- h.size && (S.debug(
1091
- `abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`
1092
- ), h.size.width = E * (h.widthInColumns || 1) + _ * ((h.widthInColumns || 1) - 1), h.size.height = L, h.size.x = 0, h.size.y = 0, S.debug(
1093
- `abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`
1094
- ));
1095
- for (const h of e.children)
1096
- te(h, a, E, L);
1097
- const k = e.columns || -1;
1098
- let D = 0;
1099
- for (const h of e.children)
1100
- D += h.widthInColumns || 1;
1101
- let o = e.children.length;
1102
- k > 0 && k < D && (o = k), e.widthInColumns;
1103
- const s = Math.ceil(D / o);
1104
- let i = o * (E + _) + _, u = s * (L + _) + _;
1105
- if (i < d) {
1106
- S.debug(
1107
- `Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`
1108
- ), i = d, u = c;
1109
- const h = (d - o * _ - _) / o, t = (c - s * _ - _) / s;
1110
- S.debug("Size indata abc88", e.id, "childWidth", h, "maxWidth", E), S.debug("Size indata abc88", e.id, "childHeight", t, "maxHeight", L), S.debug("Size indata abc88 xSize", o, "padding", _);
1111
- for (const m of e.children)
1112
- m.size && (m.size.width = h, m.size.height = t, m.size.x = 0, m.size.y = 0);
1113
- }
1114
- if (S.debug(
1115
- `abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i, ((f = e.size) == null ? void 0 : f.width) || 0)}`
1116
- ), i < (((b = e == null ? void 0 : e.size) == null ? void 0 : b.width) || 0)) {
1117
- i = ((p = e == null ? void 0 : e.size) == null ? void 0 : p.width) || 0;
1118
- const h = k > 0 ? Math.min(e.children.length, k) : e.children.length;
1119
- if (h > 0) {
1120
- const t = (i - h * _ - _) / h;
1121
- S.debug("abc95 (growing to fit) width", e.id, i, (x = e.size) == null ? void 0 : x.width, t);
1122
- for (const m of e.children)
1123
- m.size && (m.size.width = t);
1124
- }
1125
- }
1126
- e.size = {
1127
- width: i,
1128
- height: u,
1129
- x: 0,
1130
- y: 0
1131
- };
1132
- }
1133
- S.debug(
1134
- "setBlockSizes abc94 (done)",
1135
- e.id,
1136
- (y = e == null ? void 0 : e.size) == null ? void 0 : y.x,
1137
- (T = e == null ? void 0 : e.size) == null ? void 0 : T.width,
1138
- (v = e == null ? void 0 : e.size) == null ? void 0 : v.y,
1139
- (N = e == null ? void 0 : e.size) == null ? void 0 : N.height
1140
- );
1141
- }
1142
- function xe(e, a) {
1143
- var d, c, n, g, l, f, b, p, x, y, T, v, N, E, L, A, k;
1144
- S.debug(
1145
- `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d = e == null ? void 0 : e.size) == null ? void 0 : d.x} y: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.y} width: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.width}`
1146
- );
1147
- const D = e.columns || -1;
1148
- if (S.debug("layoutBlocks columns abc95", e.id, "=>", D, e), e.children && // find max width of children
1149
- e.children.length > 0) {
1150
- const o = ((l = (g = e == null ? void 0 : e.children[0]) == null ? void 0 : g.size) == null ? void 0 : l.width) || 0, s = e.children.length * o + (e.children.length - 1) * _;
1151
- S.debug("widthOfChildren 88", s, "posX");
1152
- let i = 0;
1153
- S.debug("abc91 block?.size?.x", e.id, (f = e == null ? void 0 : e.size) == null ? void 0 : f.x);
1154
- let u = (b = e == null ? void 0 : e.size) != null && b.x ? ((p = e == null ? void 0 : e.size) == null ? void 0 : p.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -_, h = 0;
1155
- for (const t of e.children) {
1156
- const m = e;
1157
- if (!t.size)
1158
- continue;
1159
- const { width: r, height: R } = t.size, { px: Y, py: F } = gt(D, i);
1160
- if (F != h && (h = F, u = (y = e == null ? void 0 : e.size) != null && y.x ? ((T = e == null ? void 0 : e.size) == null ? void 0 : T.x) + (-((v = e == null ? void 0 : e.size) == null ? void 0 : v.width) / 2 || 0) : -_, S.debug("New row in layout for block", e.id, " and child ", t.id, h)), S.debug(
1161
- `abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${F} (${(N = m == null ? void 0 : m.size) == null ? void 0 : N.x},${(E = m == null ? void 0 : m.size) == null ? void 0 : E.y}) parent: ${m.id} width: ${r}${_}`
1162
- ), m.size) {
1163
- const C = r / 2;
1164
- t.size.x = u + _ + C, S.debug(
1165
- `abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${C} padding=${_} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
1166
- ), u = t.size.x + C, t.size.y = m.size.y - m.size.height / 2 + F * (R + _) + R / 2 + _, S.debug(
1167
- `abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${_}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
1168
- );
1169
- }
1170
- t.children && xe(t), i += (t == null ? void 0 : t.widthInColumns) || 1, S.debug("abc88 columnsPos", t, i);
1171
- }
1172
- }
1173
- S.debug(
1174
- `layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e == null ? void 0 : e.size) == null ? void 0 : L.x} y: ${(A = e == null ? void 0 : e.size) == null ? void 0 : A.y} width: ${(k = e == null ? void 0 : e.size) == null ? void 0 : k.width}`
1175
- );
1176
- }
1177
- function Se(e, { minX: a, minY: d, maxX: c, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1178
- if (e.size && e.id !== "root") {
1179
- const { x: g, y: l, width: f, height: b } = e.size;
1180
- g - f / 2 < a && (a = g - f / 2), l - b / 2 < d && (d = l - b / 2), g + f / 2 > c && (c = g + f / 2), l + b / 2 > n && (n = l + b / 2);
1181
- }
1182
- if (e.children)
1183
- for (const g of e.children)
1184
- ({ minX: a, minY: d, maxX: c, maxY: n } = Se(g, { minX: a, minY: d, maxX: c, maxY: n }));
1185
- return { minX: a, minY: d, maxX: c, maxY: n };
1186
- }
1187
- function ft(e) {
1188
- const a = e.getBlock("root");
1189
- if (!a)
1190
- return;
1191
- te(a, e, 0, 0), xe(a), S.debug("getBlocks", JSON.stringify(a, null, 2));
1192
- const { minX: d, minY: c, maxX: n, maxY: g } = Se(a), l = g - c, f = n - d;
1193
- return { x: d, y: c, width: f, height: l };
1194
- }
1195
- const bt = function(e, a) {
1196
- return a.db.getClasses();
1197
- }, xt = async function(e, a, d, c) {
1198
- const { securityLevel: n, block: g } = se(), l = c.db;
1199
- let f;
1200
- n === "sandbox" && (f = H("#i" + a));
1201
- const b = n === "sandbox" ? H(f.nodes()[0].contentDocument.body) : H("body"), p = n === "sandbox" ? b.select(`[id="${a}"]`) : H(`[id="${a}"]`);
1202
- ke(p, ["point", "circle", "cross"], c.type, a);
1203
- const y = l.getBlocks(), T = l.getBlocksFlat(), v = l.getEdges(), N = p.insert("g").attr("class", "block");
1204
- await ut(N, y, l);
1205
- const E = ft(l);
1206
- if (await dt(N, y, l), await ht(N, v, T, l, a), E) {
1207
- const L = E, A = Math.max(1, Math.round(0.125 * (L.width / L.height))), k = L.height + A + 10, D = L.width + 10, { useMaxWidth: o } = g;
1208
- Ee(p, k, D, !!o), S.debug("Here Bounds", E, L), p.attr(
1209
- "viewBox",
1210
- `${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
1211
- );
1212
- }
1213
- Re(Be);
1214
- }, St = {
1215
- draw: xt,
1216
- getClasses: bt
1217
- }, Ot = {
1218
- parser: Pe,
1219
- db: nt,
1220
- renderer: St,
1221
- styles: lt
1222
- };
1223
- export {
1224
- Ot as diagram
1225
- };