@intent-hq/web 2.310.1 → 2.310.3

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 (252) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{DiagramPresentation.fimBl1wP.css → DiagramPresentation.Bfi3xHm0.css} +1 -1
  3. package/web/app/immutable/chunks/-xK_vQQs.js +1 -0
  4. package/web/app/immutable/chunks/{CeEeQIAV.js → 2rlMb19F.js} +1 -1
  5. package/web/app/immutable/chunks/{Bhcwd2SW.js → 6Z5k9P1U.js} +4 -4
  6. package/web/app/immutable/chunks/7xAw-BT0.js +213 -0
  7. package/web/app/immutable/chunks/{t3bi-ExW.js → B1s3oEqm.js} +2 -2
  8. package/web/app/immutable/chunks/{phowbgF-.js → B2JLNOy6.js} +1 -1
  9. package/web/app/immutable/chunks/B53WwE3a.js +1 -0
  10. package/web/app/immutable/chunks/{R7gFhaG_.js → B7VncZW5.js} +1 -1
  11. package/web/app/immutable/chunks/{EZw3rvya.js → B7s4-XTz.js} +30 -30
  12. package/web/app/immutable/chunks/{DOHtPCK9.js → BDPXN-l5.js} +1 -1
  13. package/web/app/immutable/chunks/{zXW6V5sa.js → BENBNSN7.js} +1 -1
  14. package/web/app/immutable/chunks/{DevHtnbn.js → BFXzH5IE.js} +1 -1
  15. package/web/app/immutable/chunks/BGcL9rs9.js +217 -0
  16. package/web/app/immutable/chunks/BHnD9zfx.js +99 -0
  17. package/web/app/immutable/chunks/{qMHHnffV.js → BI_SwxaN.js} +1 -1
  18. package/web/app/immutable/chunks/{BV9p4X5I.js → BMMFveB2.js} +6 -6
  19. package/web/app/immutable/chunks/BP6OqM9o.js +1 -0
  20. package/web/app/immutable/chunks/BRvgBsbx.js +291 -0
  21. package/web/app/immutable/chunks/{Cuozo7M1.js → BSel_zEu.js} +1 -1
  22. package/web/app/immutable/chunks/{B4dTn6xv.js → BUlPMLws.js} +1 -1
  23. package/web/app/immutable/chunks/{xMirTl3q.js → BYxB_o2p.js} +2 -2
  24. package/web/app/immutable/chunks/{CsYRAdgB.js → B_mbXOka.js} +1 -1
  25. package/web/app/immutable/chunks/BakMVsPT.js +2 -0
  26. package/web/app/immutable/chunks/{DeopB2f-.js → Bd0N6Q84.js} +3 -3
  27. package/web/app/immutable/chunks/{CHH2PtZ7.js → BfPWAh77.js} +1 -1
  28. package/web/app/immutable/chunks/BfZK-g4H.js +2 -0
  29. package/web/app/immutable/chunks/BhWJ-mUa.js +292 -0
  30. package/web/app/immutable/chunks/{CwH3s3Sg.js → Bhw4MKUW.js} +1 -1
  31. package/web/app/immutable/chunks/{CUvX4uDB.js → BmpVZmDT.js} +3 -3
  32. package/web/app/immutable/chunks/{BNg3GOxL.js → Bn-4GS40.js} +2 -2
  33. package/web/app/immutable/chunks/BpXeqZkK.js +12 -0
  34. package/web/app/immutable/chunks/{D-9LH0ah.js → Bpofk5Ge.js} +1 -1
  35. package/web/app/immutable/chunks/{DjEB6QMF.js → BrV7vQ-C.js} +1 -1
  36. package/web/app/immutable/chunks/ByGoYv9M.js +1 -0
  37. package/web/app/immutable/chunks/C-1nTNwc.js +120 -0
  38. package/web/app/immutable/chunks/{CBHPIqXg.js → C3nOF7W6.js} +1 -1
  39. package/web/app/immutable/chunks/{BIxkRFIj.js → C72YfPmr.js} +2 -2
  40. package/web/app/immutable/chunks/{DMGAuSgb.js → C87YV7yB.js} +4 -4
  41. package/web/app/immutable/chunks/{Coy9jSf1.js → CCDTjxXZ.js} +1 -1
  42. package/web/app/immutable/chunks/CEXJj_TX.js +62 -0
  43. package/web/app/immutable/chunks/CHFvnHJS.js +39 -0
  44. package/web/app/immutable/chunks/{CWyh7Yhz.js → CK1qXB1I.js} +1 -1
  45. package/web/app/immutable/chunks/{CCIGQjYf.js → CLEySo6k.js} +1 -1
  46. package/web/app/immutable/chunks/{DXOCO_oS.js → CNxOtEoC.js} +1 -1
  47. package/web/app/immutable/chunks/{7KTbkf4W.js → CPi1vTiT.js} +2 -2
  48. package/web/app/immutable/chunks/{ejL3HmTG.js → CQI-dvtu.js} +3 -3
  49. package/web/app/immutable/chunks/CSiG9Hvp.js +1 -0
  50. package/web/app/immutable/chunks/{C0DDaBnV.js → CTaTQq2B.js} +1 -1
  51. package/web/app/immutable/chunks/{dtB9lR1B.js → CUMlGGeg.js} +1 -1
  52. package/web/app/immutable/chunks/{fULl8IO9.js → CVyfvlNb.js} +7 -7
  53. package/web/app/immutable/chunks/{DUkegami.js → C_tu278J.js} +1 -1
  54. package/web/app/immutable/chunks/CcUMYVEM.js +41 -0
  55. package/web/app/immutable/chunks/Ccfa6x-j.js +24 -0
  56. package/web/app/immutable/chunks/{BmDskjjc.js → Cd_IIsl2.js} +1 -1
  57. package/web/app/immutable/chunks/CeijcUhC.js +38 -0
  58. package/web/app/immutable/chunks/Ci2_N-bK.js +370 -0
  59. package/web/app/immutable/chunks/CiPifYNB.js +1 -0
  60. package/web/app/immutable/chunks/{D8SVxzqF.js → CjcP6chv.js} +1 -1
  61. package/web/app/immutable/chunks/Cl430GWg.js +344 -0
  62. package/web/app/immutable/chunks/ClKsLSpN.js +27 -0
  63. package/web/app/immutable/chunks/ClebXGIM.js +141 -0
  64. package/web/app/immutable/chunks/{DOVnLHFz.js → CnIb6mve.js} +1 -1
  65. package/web/app/immutable/chunks/{qOCErwrn.js → CrdTEIp7.js} +1 -1
  66. package/web/app/immutable/chunks/{CPvhRhlk.js → Cstq9SM5.js} +11 -11
  67. package/web/app/immutable/chunks/CuzanJ4G.js +1 -0
  68. package/web/app/immutable/chunks/{D81gRUjY.js → D-QdqmeZ.js} +1 -1
  69. package/web/app/immutable/chunks/D0gJOzJU.js +40 -0
  70. package/web/app/immutable/chunks/{CoeuT-m3.js → D2ffSQ9J.js} +1 -1
  71. package/web/app/immutable/chunks/D2ojbL4J.js +98 -0
  72. package/web/app/immutable/chunks/{Bfkn2BGM.js → D3lH_sy-.js} +1 -1
  73. package/web/app/immutable/chunks/{C0Yks_oS.js → D5XrjD_m.js} +1 -1
  74. package/web/app/immutable/chunks/{DzvQOT8_.js → D5gGhPeB.js} +1 -1
  75. package/web/app/immutable/chunks/{DLm51UIm.js → D7ePuUtq.js} +1 -1
  76. package/web/app/immutable/chunks/{B9r0JXjW.js → D9RktmhG.js} +1 -1
  77. package/web/app/immutable/chunks/{Si43_nYW.js → D9zTmP-H.js} +3 -3
  78. package/web/app/immutable/chunks/{DQEBW0YT.js → DAhqFWJw.js} +1 -1
  79. package/web/app/immutable/chunks/{B20hJMKp.js → DAmyup4Q.js} +2 -2
  80. package/web/app/immutable/chunks/{B0X6Qy4e.js → DH-0T9oO.js} +1 -1
  81. package/web/app/immutable/chunks/{D-o9b0Cd.js → DHf042m3.js} +2 -2
  82. package/web/app/immutable/chunks/DICP2Iar.js +169 -0
  83. package/web/app/immutable/chunks/{D04E4MVv.js → DJ4er0zy.js} +4 -4
  84. package/web/app/immutable/chunks/{BtHVXttl.js → DLTK7s08.js} +5 -5
  85. package/web/app/immutable/chunks/{DQulsXJ7.js → DM80xiYc.js} +1 -1
  86. package/web/app/immutable/chunks/{BsP5G0Fo.js → DPWD_Z0m.js} +1 -1
  87. package/web/app/immutable/chunks/{t9id1Dgw.js → DPjuFI2m.js} +1 -1
  88. package/web/app/immutable/chunks/{DhdMM_zt.js → DR30pTuY.js} +14 -14
  89. package/web/app/immutable/chunks/{D_9AVJm5.js → DStbB4cJ.js} +1 -1
  90. package/web/app/immutable/chunks/{C8CCN24q.js → DV_gHrZ4.js} +1 -1
  91. package/web/app/immutable/chunks/{CQe4IdgR.js → DWqMBuHP.js} +1 -1
  92. package/web/app/immutable/chunks/DhDem5lD.js +34 -0
  93. package/web/app/immutable/chunks/{DaEQgqyy.js → Dj7a19mR.js} +1 -1
  94. package/web/app/immutable/chunks/{CnmCWFKQ.js → Dn1Hge9W.js} +2 -2
  95. package/web/app/immutable/chunks/{DxlwMmI8.js → DpbPS--w.js} +1 -1
  96. package/web/app/immutable/chunks/{Drg52kVf.js → DqPGIq9m.js} +1 -1
  97. package/web/app/immutable/chunks/Dr9n9KYD.js +8 -0
  98. package/web/app/immutable/chunks/Dx4xDmS-.js +1 -0
  99. package/web/app/immutable/chunks/{D411lQkp.js → DxBZwGJl.js} +1 -1
  100. package/web/app/immutable/chunks/{CEdLQlJ6.js → EF47gh5F.js} +6 -6
  101. package/web/app/immutable/chunks/FTZaXc8b.js +106 -0
  102. package/web/app/immutable/chunks/NHQiGgbv.js +200 -0
  103. package/web/app/immutable/chunks/{BCm8Gasf.js → OEEtadht.js} +1 -1
  104. package/web/app/immutable/chunks/{DCeW9_0X.js → PR2rc_KV.js} +2 -2
  105. package/web/app/immutable/chunks/{_F3xl3RI.js → Q48HTbqK.js} +1 -1
  106. package/web/app/immutable/chunks/{TQIai6Ne.js → Sd4DhpzB.js} +79 -79
  107. package/web/app/immutable/chunks/{C-Mmob1s.js → WaYTk5P-.js} +1 -1
  108. package/web/app/immutable/chunks/{ByGsJxdn.js → X-Frg4xt.js} +1 -1
  109. package/web/app/immutable/chunks/YDWB9C4j.js +36 -0
  110. package/web/app/immutable/chunks/{BUSwtV99.js → YqBgboHy.js} +1 -1
  111. package/web/app/immutable/chunks/{B_D0NLtg.js → _GDZ01fB.js} +1 -1
  112. package/web/app/immutable/chunks/{C7oH1dbI.js → aloh9OcN.js} +1 -1
  113. package/web/app/immutable/chunks/{BEhoKnQT.js → ap51LBWo.js} +1 -1
  114. package/web/app/immutable/chunks/bBO0iA4_.js +7 -0
  115. package/web/app/immutable/chunks/cMysCMc_.js +24 -0
  116. package/web/app/immutable/chunks/dpdLM1Cx.js +140 -0
  117. package/web/app/immutable/chunks/eHLf0w_s.js +1 -0
  118. package/web/app/immutable/chunks/fyjA8lOg.js +4 -0
  119. package/web/app/immutable/chunks/{CQf-fH5v.js → h6Xb9K7f.js} +1 -1
  120. package/web/app/immutable/chunks/{j0ThtFJc.js → iX-41BqF.js} +1 -1
  121. package/web/app/immutable/chunks/ibC6Wlul.js +3 -0
  122. package/web/app/immutable/chunks/jU5_8m_P.js +84 -0
  123. package/web/app/immutable/chunks/{BKGPkCRs.js → kHJUvxPR.js} +1 -1
  124. package/web/app/immutable/chunks/{BBTS8ZOM.js → lG67Zx5D.js} +3 -3
  125. package/web/app/immutable/chunks/{CgAIOmc3.js → lb9Uy5lM.js} +4 -4
  126. package/web/app/immutable/chunks/{DdAxykhC.js → lh2cjQS1.js} +1 -1
  127. package/web/app/immutable/chunks/{r1_PrlQL.js → lqs_HYEw.js} +1 -1
  128. package/web/app/immutable/chunks/{CnszEr0a.js → oEWQ7BWN.js} +1 -1
  129. package/web/app/immutable/chunks/{BGLkcG6I.js → ry72TFIz.js} +2 -2
  130. package/web/app/immutable/chunks/{BV7dztYI.js → ryFwnMjp.js} +1 -1
  131. package/web/app/immutable/chunks/{CsASRGy9.js → uOEty9O6.js} +5 -5
  132. package/web/app/immutable/chunks/wh3Y68il.js +1 -0
  133. package/web/app/immutable/chunks/{DRMT9vvq.js → xPs_63iv.js} +1 -1
  134. package/web/app/immutable/entry/{app.DlF41taB.js → app.np0VAfbg.js} +2 -2
  135. package/web/app/immutable/entry/start.BGCfjmAX.js +1 -0
  136. package/web/app/immutable/nodes/{0.BLjNhnkb.js → 0.DoZAnEaT.js} +1 -1
  137. package/web/app/immutable/nodes/{1.DaghOy3j.js → 1.BfLNDde5.js} +1 -1
  138. package/web/app/immutable/nodes/{10.CbV_flkh.js → 10.WVRhKQHR.js} +1 -1
  139. package/web/app/immutable/nodes/{14.N_oC1pv5.js → 14.BGrxllXE.js} +1 -1
  140. package/web/app/immutable/nodes/{16.Cn0uYbJe.js → 16.CkZkKSWx.js} +2 -2
  141. package/web/app/immutable/nodes/{2.CMERPJYK.js → 2.COM3w17g.js} +8 -8
  142. package/web/app/immutable/nodes/{3.Dk5w9XeG.js → 3.BhRx3b1m.js} +1 -1
  143. package/web/app/immutable/nodes/{4.CvLiKH0B.js → 4.C02hhSi-.js} +1 -1
  144. package/web/app/immutable/nodes/{5.BL5oLCOi.js → 5.Dgt2hWD3.js} +1 -1
  145. package/web/app/immutable/nodes/{6.DiKzgiKt.js → 6.KyP4WP5g.js} +1 -1
  146. package/web/app/immutable/nodes/{7.CM-hNW3A.js → 7.BxnoAMeX.js} +1 -1
  147. package/web/app/immutable/nodes/{8.BThIGSQR.js → 8.CnlHpTsC.js} +2 -2
  148. package/web/app/immutable/nodes/{9.D70tN3NX.js → 9.CJ1_wepy.js} +18 -18
  149. package/web/app/version.json +1 -1
  150. package/web/index.html +9 -9
  151. package/web/app/immutable/chunks/-SL67XKV.js +0 -1
  152. package/web/app/immutable/chunks/351KaJp_.js +0 -24
  153. package/web/app/immutable/chunks/7Iuyw4Ow.js +0 -106
  154. package/web/app/immutable/chunks/9ySBq1wF.js +0 -36
  155. package/web/app/immutable/chunks/B2safKX4.js +0 -1
  156. package/web/app/immutable/chunks/B8QrskMI.js +0 -139
  157. package/web/app/immutable/chunks/BCO4VeSA.js +0 -1
  158. package/web/app/immutable/chunks/BCaDoF8Y.js +0 -1
  159. package/web/app/immutable/chunks/BEdJCn-8.js +0 -1
  160. package/web/app/immutable/chunks/BGBb6fI-.js +0 -120
  161. package/web/app/immutable/chunks/BGQ3htf5.js +0 -1
  162. package/web/app/immutable/chunks/BKLEAopb.js +0 -7
  163. package/web/app/immutable/chunks/BKSgn5w-.js +0 -1
  164. package/web/app/immutable/chunks/BKY64haD.js +0 -12
  165. package/web/app/immutable/chunks/BOXqfDS_.js +0 -40
  166. package/web/app/immutable/chunks/BP_ooGOd.js +0 -24
  167. package/web/app/immutable/chunks/BQApP15C.js +0 -99
  168. package/web/app/immutable/chunks/BS6cE8e9.js +0 -231
  169. package/web/app/immutable/chunks/BTXk2yGf.js +0 -96
  170. package/web/app/immutable/chunks/BVrOGXf1.js +0 -78
  171. package/web/app/immutable/chunks/BZoKWA-r.js +0 -96
  172. package/web/app/immutable/chunks/BbiXTFqz.js +0 -1
  173. package/web/app/immutable/chunks/BgmKjqUX.js +0 -1
  174. package/web/app/immutable/chunks/Bk7xBWHf.js +0 -34
  175. package/web/app/immutable/chunks/BoiNnj2h.js +0 -1
  176. package/web/app/immutable/chunks/BrVvVCxw.js +0 -1
  177. package/web/app/immutable/chunks/ByM2DIOs.js +0 -1
  178. package/web/app/immutable/chunks/ByzYvvQp.js +0 -70
  179. package/web/app/immutable/chunks/Bz0SnIMO.js +0 -1
  180. package/web/app/immutable/chunks/C1IwSyrV.js +0 -99
  181. package/web/app/immutable/chunks/C9gL5x04.js +0 -39
  182. package/web/app/immutable/chunks/C9nyJoiB.js +0 -41
  183. package/web/app/immutable/chunks/CBV2Z_QZ.js +0 -89
  184. package/web/app/immutable/chunks/CDHds8o_.js +0 -3
  185. package/web/app/immutable/chunks/CHIHAnR-.js +0 -1
  186. package/web/app/immutable/chunks/CHj2oCmD.js +0 -39
  187. package/web/app/immutable/chunks/CIXNMjfT.js +0 -206
  188. package/web/app/immutable/chunks/CKFDW9cI.js +0 -24
  189. package/web/app/immutable/chunks/CKQlE_M1.js +0 -88
  190. package/web/app/immutable/chunks/CSBhPNbN.js +0 -206
  191. package/web/app/immutable/chunks/CSLTsum9.js +0 -38
  192. package/web/app/immutable/chunks/CSbiiZpm.js +0 -354
  193. package/web/app/immutable/chunks/CToDhNW4.js +0 -1
  194. package/web/app/immutable/chunks/CYFK9YEX.js +0 -168
  195. package/web/app/immutable/chunks/CcGF51wP.js +0 -1
  196. package/web/app/immutable/chunks/Cd5vVJw4.js +0 -292
  197. package/web/app/immutable/chunks/CgjSMAIJ.js +0 -120
  198. package/web/app/immutable/chunks/Ck7B90Kr.js +0 -38
  199. package/web/app/immutable/chunks/CkAILno9.js +0 -62
  200. package/web/app/immutable/chunks/CkawHIFZ.js +0 -1
  201. package/web/app/immutable/chunks/ClXr1b-t.js +0 -8
  202. package/web/app/immutable/chunks/CmWBRPmR.js +0 -24
  203. package/web/app/immutable/chunks/Cmo-9vFV.js +0 -1
  204. package/web/app/immutable/chunks/CoFCa7Mb.js +0 -231
  205. package/web/app/immutable/chunks/CrcLvVto.js +0 -84
  206. package/web/app/immutable/chunks/Cs_Q6mos.js +0 -1
  207. package/web/app/immutable/chunks/CsnLwu9F.js +0 -2
  208. package/web/app/immutable/chunks/CuYeKLE8.js +0 -8
  209. package/web/app/immutable/chunks/CvOaoHrI.js +0 -1
  210. package/web/app/immutable/chunks/CvYzv8kf.js +0 -1
  211. package/web/app/immutable/chunks/CxRm1vYn.js +0 -342
  212. package/web/app/immutable/chunks/CyfBUrNA.js +0 -1
  213. package/web/app/immutable/chunks/D1QKDDLH.js +0 -1
  214. package/web/app/immutable/chunks/D61DwhDw.js +0 -3
  215. package/web/app/immutable/chunks/DBAJPVI_.js +0 -1
  216. package/web/app/immutable/chunks/DBt8jmEX.js +0 -40
  217. package/web/app/immutable/chunks/DD-T_Om0.js +0 -178
  218. package/web/app/immutable/chunks/DEOiJZFa.js +0 -168
  219. package/web/app/immutable/chunks/DHW4IXFj.js +0 -36
  220. package/web/app/immutable/chunks/DJ0w8Oax.js +0 -129
  221. package/web/app/immutable/chunks/DJ52BT20.js +0 -1
  222. package/web/app/immutable/chunks/DK1048Bw.js +0 -129
  223. package/web/app/immutable/chunks/DZ0nrC9W.js +0 -162
  224. package/web/app/immutable/chunks/DeRneTJF.js +0 -106
  225. package/web/app/immutable/chunks/Df6EnPla.js +0 -4
  226. package/web/app/immutable/chunks/DfMKUxMU.js +0 -30
  227. package/web/app/immutable/chunks/DkH3yb1j.js +0 -34
  228. package/web/app/immutable/chunks/Doxgswr3.js +0 -4
  229. package/web/app/immutable/chunks/Dt53cexP.js +0 -1
  230. package/web/app/immutable/chunks/Dx6eBL0x.js +0 -1
  231. package/web/app/immutable/chunks/HP7Asd0t.js +0 -2
  232. package/web/app/immutable/chunks/HP8lGamR.js +0 -257
  233. package/web/app/immutable/chunks/HzpfURmp.js +0 -84
  234. package/web/app/immutable/chunks/PJfe_iA1.js +0 -1
  235. package/web/app/immutable/chunks/PXMyYXQv.js +0 -1
  236. package/web/app/immutable/chunks/Qi3HrsAm.js +0 -1
  237. package/web/app/immutable/chunks/S1FanOB0.js +0 -162
  238. package/web/app/immutable/chunks/SuMU9B9i.js +0 -1
  239. package/web/app/immutable/chunks/UaGv-ChR.js +0 -257
  240. package/web/app/immutable/chunks/YqyEOqRv.js +0 -178
  241. package/web/app/immutable/chunks/_MGNV7ZN.js +0 -338
  242. package/web/app/immutable/chunks/_lZu5Dth.js +0 -292
  243. package/web/app/immutable/chunks/gzjZWAx8.js +0 -62
  244. package/web/app/immutable/chunks/hqSEunOk.js +0 -15
  245. package/web/app/immutable/chunks/nGCCQCpO.js +0 -1
  246. package/web/app/immutable/chunks/o-kBqlaj.js +0 -7
  247. package/web/app/immutable/chunks/opO2fBQB.js +0 -1
  248. package/web/app/immutable/chunks/pdFamTTi.js +0 -7
  249. package/web/app/immutable/chunks/rEI8JpP3.js +0 -1
  250. package/web/app/immutable/chunks/s5P9UVzf.js +0 -1
  251. package/web/app/immutable/chunks/sIHUXgeh.js +0 -41
  252. package/web/app/immutable/entry/start.CCtO40vu.js +0 -1
@@ -1 +0,0 @@
1
- import{E as c,G as y,aj as U,ap as G,z as tr,ai as E,a9 as Y,ae as W,aS as ie,af as m,au as N,a6 as g,al as P,Y as Oe,am as xe,D as I,ak as oe,aN as ar,C as de,A as S,aW as L,av as z,aY as ir,aO as T,m as or,F as dr,H as sr,s as ur,a4 as fr}from"./CSbiiZpm.js";import{g as s}from"./CxRm1vYn.js";function x(e,n,r,t){var a;do a=ie(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}s(x,"addDummyNode");function Ne(e){var n=new y().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}s(Ne,"simplify");function se(e){var n=new y({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}s(se,"asNonCompoundGraph");function J(e,n){var r=e.x,t=e.y,a=n.x-r,i=n.y-t,o=e.width/2,d=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var u,f;return Math.abs(i)*o>Math.abs(a)*d?(i<0&&(d=-d),u=d*a/i,f=d):(a<0&&(o=-o),u=o,f=o*i/a),{x:r+u,y:t+f}}s(J,"intersectRect");function j(e){var n=m(N(ue(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),a=t.rank;g(a)||(n[a][t.order]=r)}),n}s(j,"buildLayerMatrix");function Le(e){var n=P(m(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);Oe(t,"rank")&&(t.rank-=n)})}s(Le,"normalizeRanks");function _e(e){var n=P(m(e.nodes(),function(i){return e.node(i).rank})),r=[];c(e.nodes(),function(i){var o=e.node(i).rank-n;r[o]||(r[o]=[]),r[o].push(i)});var t=0,a=e.graph().nodeRankFactor;c(r,function(i,o){g(i)&&o%a!==0?--t:t&&c(i,function(d){e.node(d).rank+=t})})}s(_e,"removeEmptyRanks");function K(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),x(e,"border",a,n)}s(K,"addBorderNode");function ue(e){return E(m(e.nodes(),function(n){var r=e.node(n).rank;if(!g(r))return r}))}s(ue,"maxRank");function Ce(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}s(Ce,"partition");function Pe(e,n){var r=xe();try{return n()}finally{console.log(e+" time: "+(xe()-r)+"ms")}}s(Pe,"time");function Re(e,n){return n()}s(Re,"notime");function Ie(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;i<o;++i)Q(e,"borderLeft","_bl",r,a,i),Q(e,"borderRight","_br",r,a,i)}}s(n,"dfs"),c(e.children(),n)}s(Ie,"addBorderSegments");function Q(e,n,r,t,a,i){var o={width:0,height:0,rank:i,borderType:n},d=a[n][i-1],u=x(e,"border",o,r);a[n][i]=u,e.setParent(u,t),d&&e.setEdge(d,u,{weight:1})}s(Q,"addBorderNode");function Se(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&fe(e)}s(Se,"adjust");function Te(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&je(e),(n==="lr"||n==="rl")&&(Me(e),fe(e))}s(Te,"undo");function fe(e){c(e.nodes(),function(n){Z(e.node(n))}),c(e.edges(),function(n){Z(e.edge(n))})}s(fe,"swapWidthHeight");function Z(e){var n=e.width;e.width=e.height,e.height=n}s(Z,"swapWidthHeightOne");function je(e){c(e.nodes(),function(n){M(e.node(n))}),c(e.edges(),function(n){var r=e.edge(n);c(r.points,M),Object.prototype.hasOwnProperty.call(r,"y")&&M(r)})}s(je,"reverseY");function M(e){e.y=-e.y}s(M,"reverseYOne");function Me(e){c(e.nodes(),function(n){F(e.node(n))}),c(e.edges(),function(n){var r=e.edge(n);c(r.points,F),Object.prototype.hasOwnProperty.call(r,"x")&&F(r)})}s(Me,"swapXY");function F(e){var n=e.x;e.x=e.y,e.y=n}s(F,"swapXYOne");var O,cr=(O=class{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return $(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&$(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Fe)),t=t._prev;return"["+n.join(", ")+"]"}},s(O,"List"),O);function $(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}s($,"unlink");function Fe(e,n){if(e!=="_next"&&e!=="_prev")return n}s(Fe,"filterOutLinks");var lr=ur(1);function Be(e,n){if(e.nodeCount()<=1)return[];var r=Ae(e,n||lr),t=Ve(r.graph,r.buckets,r.zeroIdx);return I(m(t,function(a){return e.outEdges(a.v,a.w)}))}s(Be,"greedyFAS");function Ve(e,n,r){for(var t=[],a=n[n.length-1],i=n[0],o;e.nodeCount();){for(;o=i.dequeue();)B(e,n,r,o);for(;o=a.dequeue();)B(e,n,r,o);if(e.nodeCount()){for(var d=n.length-2;d>0;--d)if(o=n[d].dequeue(),o){t=t.concat(B(e,n,r,o,!0));break}}}return t}s(Ve,"doGreedyFAS");function B(e,n,r,t,a){var i=a?[]:void 0;return c(e.inEdges(t.v),function(o){var d=e.edge(o),u=e.node(o.v);a&&i.push({v:o.v,w:o.w}),u.out-=d,D(n,r,u)}),c(e.outEdges(t.v),function(o){var d=e.edge(o),u=o.w,f=e.node(u);f.in-=d,D(n,r,f)}),e.removeNode(t.v),i}s(B,"removeNode");function Ae(e,n){var r=new y,t=0,a=0;c(e.nodes(),function(d){r.setNode(d,{v:d,in:0,out:0})}),c(e.edges(),function(d){var u=r.edge(d.v,d.w)||0,f=n(d),l=u+f;r.setEdge(d.v,d.w,l),a=Math.max(a,r.node(d.v).out+=f),t=Math.max(t,r.node(d.w).in+=f)});var i=N(a+t+3).map(function(){return new cr}),o=t+1;return c(r.nodes(),function(d){D(i,o,r.node(d))}),{graph:r,buckets:i,zeroIdx:o}}s(Ae,"buildState");function D(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}s(D,"assignBucket");function Ge(e){var n=e.graph().acyclicer==="greedy"?Be(e,r(e)):Ye(e);c(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,ie("rev"))});function r(t){return function(a){return t.edge(a).weight}}s(r,"weightFn")}s(Ge,"run");function Ye(e){var n=[],r={},t={};function a(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,c(e.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):a(o.w)}),delete r[i])}return s(a,"dfs"),c(e.nodes(),a),n}s(Ye,"dfsFAS");function De(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}s(De,"undo");function We(e){e.graph().dummyChains=[],c(e.edges(),function(n){ze(e,n)})}s(We,"run");function ze(e,n){var r=n.v,t=e.node(r).rank,a=n.w,i=e.node(a).rank,o=n.name,d=e.edge(n),u=d.labelRank;if(i!==t+1){e.removeEdge(n);var f=void 0,l,h;for(h=0,++t;t<i;++h,++t)d.points=[],f={width:0,height:0,edgeLabel:d,edgeObj:n,rank:t},l=x(e,"edge",f,"_d"),t===u&&(f.width=d.width,f.height=d.height,f.dummy="edge-label",f.labelpos=d.labelpos),e.setEdge(r,l,{weight:d.weight},o),h===0&&e.graph().dummyChains.push(l),r=l;e.setEdge(r,a,{weight:d.weight},o)}}s(ze,"normalizeEdge");function qe(e){c(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}s(qe,"undo");function q(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var i=P(m(e.outEdges(t),function(o){return r(o.w)-e.edge(o).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}s(r,"dfs"),c(e.sources(),r)}s(q,"longestPath");function _(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}s(_,"slack");function ce(e){var n=new y({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,i;Xe(n,e)<t;)a=He(n,e),i=n.hasNode(a.v)?_(e,a):-_(e,a),Ue(n,e,i);return n}s(ce,"feasibleTree");function Xe(e,n){function r(t){c(n.nodeEdges(t),function(a){var i=a.v,o=t===i?a.w:i;!e.hasNode(o)&&!_(n,a)&&(e.setNode(o,{}),e.setEdge(t,o,{}),r(o))})}return s(r,"dfs"),c(e.nodes(),r),e.nodeCount()}s(Xe,"tightTree");function He(e,n){return oe(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return _(n,r)})}s(He,"findMinSlackEdge");function Ue(e,n,r){c(e.nodes(),function(t){n.node(t).rank+=r})}s(Ue,"shiftRanks");Je.CycleException=R;function Je(e){var n={},r={},t=[];function a(i){if(Object.prototype.hasOwnProperty.call(r,i))throw new R;Object.prototype.hasOwnProperty.call(n,i)||(r[i]=!0,n[i]=!0,c(e.predecessors(i),a),delete r[i],t.push(i))}if(s(a,"visit"),c(e.sinks(),a),ar(n)!==e.nodeCount())throw new R;return t}s(Je,"topsort");function R(){}s(R,"CycleException");R.prototype=new Error;function le(e,n,r){fr(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],i={};return c(n,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);he(e,o,r==="post",i,t,a)}),a}s(le,"dfs");function he(e,n,r,t,a,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),c(a(n),function(o){he(e,o,r,t,a,i)}),r&&i.push(n))}s(he,"doDfs");function Ke(e,n){return le(e,n,"post")}s(Ke,"postorder");function Qe(e,n){return le(e,n,"pre")}s(Qe,"preorder");k.initLowLimValues=H;k.initCutValues=X;k.calcCutValue=ve;k.leaveEdge=we;k.enterEdge=me;k.exchangeEdges=be;function k(e){e=Ne(e),q(e);var n=ce(e);H(n),X(n,e);for(var r,t;r=we(n);)t=me(n,e,r),be(n,e,r,t)}s(k,"networkSimplex");function X(e,n){var r=Ke(e,e.nodes());r=r.slice(0,r.length-1),c(r,function(t){Ze(e,n,t)})}s(X,"initCutValues");function Ze(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=ve(e,n,r)}s(Ze,"assignCutValue");function ve(e,n,r){var t=e.node(r),a=t.parent,i=!0,o=n.edge(r,a),d=0;return o||(i=!1,o=n.edge(a,r)),d=o.weight,c(n.nodeEdges(r),function(u){var f=u.v===r,l=f?u.w:u.v;if(l!==a){var h=f===i,v=n.edge(u).weight;if(d+=h?v:-v,en(e,r,l)){var p=e.edge(r,l).cutvalue;d+=h?-p:p}}}),d}s(ve,"calcCutValue");function H(e,n){arguments.length<2&&(n=e.nodes()[0]),pe(e,{},1,n)}s(H,"initLowLimValues");function pe(e,n,r,t,a){var i=r,o=e.node(t);return n[t]=!0,c(e.neighbors(t),function(d){Object.prototype.hasOwnProperty.call(n,d)||(r=pe(e,n,r,d,t))}),o.low=i,o.lim=r++,a?o.parent=a:delete o.parent,r}s(pe,"dfsAssignLowLim");function we(e){return de(e.edges(),function(n){return e.edge(n).cutvalue<0})}s(we,"leaveEdge");function me(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var i=e.node(t),o=e.node(a),d=i,u=!1;i.lim>o.lim&&(d=o,u=!0);var f=S(n.edges(),function(l){return u===ee(e,e.node(l.v),d)&&u!==ee(e,e.node(l.w),d)});return oe(f,function(l){return _(n,l)})}s(me,"enterEdge");function be(e,n,r,t){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(t.v,t.w,{}),H(e),X(e,n),$e(e,n)}s(be,"exchangeEdges");function $e(e,n){var r=de(e.nodes(),function(a){return!n.node(a).parent}),t=Qe(e,r);t=t.slice(1),c(t,function(a){var i=e.node(a).parent,o=n.edge(a,i),d=!1;o||(o=n.edge(i,a),d=!0),n.node(a).rank=n.node(i).rank+(d?o.minlen:-o.minlen)})}s($e,"updateRanks");function en(e,n,r){return e.hasEdge(n,r)}s(en,"isTreeEdge");function ee(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}s(ee,"isDescendant");function nn(e){switch(e.graph().ranker){case"network-simplex":ne(e);break;case"tight-tree":rn(e);break;case"longest-path":hr(e);break;default:ne(e)}}s(nn,"rank");var hr=q;function rn(e){q(e),ce(e)}s(rn,"tightTreeRanker");function ne(e){k(e)}s(ne,"networkSimplexRanker");function tn(e){var n=x(e,"root",{},"_root"),r=an(e),t=E(L(r))-1,a=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(o){e.edge(o).minlen*=a});var i=on(e)+1;c(e.children(),function(o){ge(e,n,a,i,t,r,o)}),e.graph().nodeRankFactor=a}s(tn,"run");function ge(e,n,r,t,a,i,o){var d=e.children(o);if(!d.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var u=K(e,"_bt"),f=K(e,"_bb"),l=e.node(o);e.setParent(u,o),l.borderTop=u,e.setParent(f,o),l.borderBottom=f,c(d,function(h){ge(e,n,r,t,a,i,h);var v=e.node(h),p=v.borderTop?v.borderTop:h,w=v.borderBottom?v.borderBottom:h,b=v.borderTop?t:2*t,C=p!==w?1:a-i[o]+1;e.setEdge(u,p,{weight:b,minlen:C,nestingEdge:!0}),e.setEdge(w,f,{weight:b,minlen:C,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,u,{weight:0,minlen:a+i[o]})}s(ge,"dfs");function an(e){var n={};function r(t,a){var i=e.children(t);i&&i.length&&c(i,function(o){r(o,a+1)}),n[t]=a}return s(r,"dfs"),c(e.children(),function(t){r(t,1)}),n}s(an,"treeDepths");function on(e){return z(e.edges(),function(n,r){return n+e.edge(r).weight},0)}s(on,"sumWeights");function dn(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}s(dn,"cleanup");function sn(e,n,r){var t={},a;c(r,function(i){for(var o=e.parent(i),d,u;o;){if(d=e.parent(o),d?(u=t[d],t[d]=o):(u=a,a=o),u&&u!==o){n.setEdge(u,o);return}o=d}})}s(sn,"addSubgraphConstraints");function un(e,n,r){var t=fn(e),a=new y({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return e.node(i)});return c(e.nodes(),function(i){var o=e.node(i),d=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,d||t),c(e[r](i),function(u){var f=u.v===i?u.w:u.v,l=a.edge(f,i),h=g(l)?0:l.weight;a.setEdge(f,i,{weight:e.edge(u).weight+h})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}s(un,"buildLayerGraph");function fn(e){for(var n;e.hasNode(n=ie("_root")););return n}s(fn,"createRootNode");function cn(e,n){for(var r=0,t=1;t<n.length;++t)r+=ln(e,n[t-1],n[t]);return r}s(cn,"crossCount");function ln(e,n,r){for(var t=ir(r,m(r,function(f,l){return l})),a=I(m(n,function(f){return T(m(e.outEdges(f),function(l){return{pos:t[l.w],weight:e.edge(l).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var o=2*i-1;i-=1;var d=m(new Array(o),function(){return 0}),u=0;return c(a.forEach(function(f){var l=f.pos+i;d[l]+=f.weight;for(var h=0;l>0;)l%2&&(h+=d[l+1]),l=l-1>>1,d[l]+=f.weight;u+=f.weight*h})),u}s(ln,"twoLayerCrossCount");function hn(e){var n={},r=S(e.nodes(),function(d){return!e.children(d).length}),t=E(m(r,function(d){return e.node(d).rank})),a=m(N(t+1),function(){return[]});function i(d){if(!Oe(n,d)){n[d]=!0;var u=e.node(d);a[u.rank].push(d),c(e.successors(d),i)}}s(i,"dfs");var o=T(r,function(d){return e.node(d).rank});return c(o,i),a}s(hn,"initOrder");function vn(e,n){return m(n,function(r){var t=e.inEdges(r);if(t.length){var a=z(t,function(i,o){var d=e.edge(o),u=e.node(o.v);return{sum:i.sum+d.weight*u.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}s(vn,"barycenter");function pn(e,n){var r={};c(e,function(a,i){var o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};g(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),c(n.edges(),function(a){var i=r[a.v],o=r[a.w];!g(i)&&!g(o)&&(o.indegree++,i.out.push(r[a.w]))});var t=S(r,function(a){return!a.indegree});return wn(t)}s(pn,"resolveConflicts");function wn(e){var n=[];function r(i){return function(o){o.merged||(g(o.barycenter)||g(i.barycenter)||o.barycenter>=i.barycenter)&&mn(i,o)}}s(r,"handleIn");function t(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(s(t,"handleOut");e.length;){var a=e.pop();n.push(a),c(a.in.reverse(),r(a)),c(a.out,t(a))}return m(S(n,function(i){return!i.merged}),function(i){return G(i,["vs","i","barycenter","weight"])})}s(wn,"doResolveConflicts");function mn(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}s(mn,"mergeEntries");function bn(e,n){var r=Ce(e,function(l){return Object.prototype.hasOwnProperty.call(l,"barycenter")}),t=r.lhs,a=T(r.rhs,function(l){return-l.i}),i=[],o=0,d=0,u=0;t.sort(gn(!!n)),u=re(i,a,u),c(t,function(l){u+=l.vs.length,i.push(l.vs),o+=l.barycenter*l.weight,d+=l.weight,u=re(i,a,u)});var f={vs:I(i)};return d&&(f.barycenter=o/d,f.weight=d),f}s(bn,"sort");function re(e,n,r){for(var t;n.length&&(t=Y(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}s(re,"consumeUnsortable");function gn(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}s(gn,"compareWithBias");function ye(e,n,r,t){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,d=i?i.borderRight:void 0,u={};o&&(a=S(a,function(w){return w!==o&&w!==d}));var f=vn(e,a);c(f,function(w){if(e.children(w.v).length){var b=ye(e,w.v,r,t);u[w.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&kn(w,b)}});var l=pn(f,r);yn(l,u);var h=bn(l,t);if(o&&(h.vs=I([o,h.vs,d]),e.predecessors(o).length)){var v=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(d)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+v.order+p.order)/(h.weight+2),h.weight+=2}return h}s(ye,"sortSubgraph");function yn(e,n){c(e,function(r){r.vs=I(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}s(yn,"expandSubgraphs");function kn(e,n){g(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}s(kn,"mergeBarycenters");function En(e){var n=ue(e),r=te(e,N(1,n+1),"inEdges"),t=te(e,N(n-1,-1,-1),"outEdges"),a=hn(e);ae(e,a);for(var i=Number.POSITIVE_INFINITY,o,d=0,u=0;u<4;++d,++u){xn(d%2?r:t,d%4>=2),a=j(e);var f=cn(e,a);f<i&&(u=0,o=or(a),i=f)}ae(e,o)}s(En,"order");function te(e,n,r){return m(n,function(t){return un(e,t,r)})}s(te,"buildLayerGraphs");function xn(e,n){var r=new y;c(e,function(t){var a=t.graph().root,i=ye(t,a,r,n);c(i.vs,function(o,d){t.node(o).order=d}),sn(t,r,i.vs)})}s(xn,"sweepLayerGraphs");function ae(e,n){c(n,function(r){c(r,function(t,a){e.node(t).order=a})})}s(ae,"assignOrder");function On(e){var n=Ln(e);c(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,i=Nn(e,n,a.v,a.w),o=i.path,d=i.lca,u=0,f=o[u],l=!0;r!==a.w;){if(t=e.node(r),l){for(;(f=o[u])!==d&&e.node(f).maxRank<t.rank;)u++;f===d&&(l=!1)}if(!l){for(;u<o.length-1&&e.node(f=o[u+1]).minRank<=t.rank;)u++;f=o[u]}e.setParent(r,f),r=e.successors(r)[0]}})}s(On,"parentDummyChains");function Nn(e,n,r,t){var a=[],i=[],o=Math.min(n[r].low,n[t].low),d=Math.max(n[r].lim,n[t].lim),u,f;u=r;do u=e.parent(u),a.push(u);while(u&&(n[u].low>o||d>n[u].lim));for(f=u,u=t;(u=e.parent(u))!==f;)i.push(u);return{path:a.concat(i.reverse()),lca:f}}s(Nn,"findPath");function Ln(e){var n={},r=0;function t(a){var i=r;c(e.children(a),t),n[a]={low:i,lim:r++}}return s(t,"dfs"),c(e.children(),t),n}s(Ln,"postorder");function _n(e,n){var r={};function t(a,i){var o=0,d=0,u=a.length,f=Y(i);return c(i,function(l,h){var v=Pn(e,l),p=v?e.node(v).order:u;(v||l===f)&&(c(i.slice(d,h+1),function(w){c(e.predecessors(w),function(b){var C=e.node(b),Ee=C.order;(Ee<o||p<Ee)&&!(C.dummy&&e.node(w).dummy)&&ke(r,b,w)})}),d=h+1,o=p)}),i}return s(t,"visitLayer"),z(n,t),r}s(_n,"findType1Conflicts");function Cn(e,n){var r={};function t(i,o,d,u,f){var l;c(N(o,d),function(h){l=i[h],e.node(l).dummy&&c(e.predecessors(l),function(v){var p=e.node(v);p.dummy&&(p.order<u||p.order>f)&&ke(r,v,l)})})}s(t,"scan");function a(i,o){var d=-1,u,f=0;return c(o,function(l,h){if(e.node(l).dummy==="border"){var v=e.predecessors(l);v.length&&(u=e.node(v[0]).order,t(o,f,h,d,u),f=h,d=u)}t(o,f,o.length,u,i.length)}),o}return s(a,"visitLayer"),z(n,a),r}s(Cn,"findType2Conflicts");function Pn(e,n){if(e.node(n).dummy)return de(e.predecessors(n),function(r){return e.node(r).dummy})}s(Pn,"findOtherInnerSegmentNode");function ke(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}s(ke,"addConflict");function Rn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}s(Rn,"hasConflict");function In(e,n,r,t){var a={},i={},o={};return c(n,function(d){c(d,function(u,f){a[u]=u,i[u]=u,o[u]=f})}),c(n,function(d){var u=-1;c(d,function(f){var l=t(f);if(l.length){l=T(l,function(b){return o[b]});for(var h=(l.length-1)/2,v=Math.floor(h),p=Math.ceil(h);v<=p;++v){var w=l[v];i[f]===f&&u<o[w]&&!Rn(r,f,w)&&(i[w]=f,i[f]=a[f]=a[w],u=o[w])}}})}),{root:a,align:i}}s(In,"verticalAlignment");function Sn(e,n,r,t,a){var i={},o=Tn(e,n,r,a),d=a?"borderLeft":"borderRight";function u(h,v){for(var p=o.nodes(),w=p.pop(),b={};w;)b[w]?h(w):(b[w]=!0,p.push(w),p=p.concat(v(w))),w=p.pop()}s(u,"iterate");function f(h){i[h]=o.inEdges(h).reduce(function(v,p){return Math.max(v,i[p.v]+o.edge(p))},0)}s(f,"pass1");function l(h){var v=o.outEdges(h).reduce(function(w,b){return Math.min(w,i[b.w]-o.edge(b))},Number.POSITIVE_INFINITY),p=e.node(h);v!==Number.POSITIVE_INFINITY&&p.borderType!==d&&(i[h]=Math.max(i[h],v))}return s(l,"pass2"),u(f,o.predecessors.bind(o)),u(l,o.successors.bind(o)),c(t,function(h){i[h]=i[r[h]]}),i}s(Sn,"horizontalCompaction");function Tn(e,n,r,t){var a=new y,i=e.graph(),o=Vn(i.nodesep,i.edgesep,t);return c(n,function(d){var u;c(d,function(f){var l=r[f];if(a.setNode(l),u){var h=r[u],v=a.edge(h,l);a.setEdge(h,l,Math.max(o(e,f,u),v||0))}u=f})}),a}s(Tn,"buildBlockGraph");function jn(e,n){return oe(L(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return dr(r,function(i,o){var d=An(e,o)/2;t=Math.max(i+d,t),a=Math.min(i-d,a)}),t-a})}s(jn,"findSmallestWidthAlignment");function Mn(e,n){var r=L(n),t=P(r),a=E(r);c(["u","d"],function(i){c(["l","r"],function(o){var d=i+o,u=e[d],f;if(u!==n){var l=L(u);f=o==="l"?t-P(l):a-E(l),f&&(e[d]=W(u,function(h){return h+f}))}})})}s(Mn,"alignCoordinates");function Fn(e,n){return W(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=T(m(e,t));return(a[1]+a[2])/2})}s(Fn,"balance");function Bn(e){var n=j(e),r=U(_n(e,n),Cn(e,n)),t={},a;c(["u","d"],function(o){a=o==="u"?n:L(n).reverse(),c(["l","r"],function(d){d==="r"&&(a=m(a,function(h){return L(h).reverse()}));var u=(o==="u"?e.predecessors:e.successors).bind(e),f=In(e,a,r,u),l=Sn(e,a,f.root,f.align,d==="r");d==="r"&&(l=W(l,function(h){return-h})),t[o+d]=l})});var i=jn(e,t);return Mn(t,i),Fn(t,e.graph().align)}s(Bn,"positionX");function Vn(e,n,r){return function(t,a,i){var o=t.node(a),d=t.node(i),u=0,f;if(u+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":f=-o.width/2;break;case"r":f=o.width/2;break}if(f&&(u+=r?f:-f),f=0,u+=(o.dummy?n:e)/2,u+=(d.dummy?n:e)/2,u+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":f=d.width/2;break;case"r":f=-d.width/2;break}return f&&(u+=r?f:-f),f=0,u}}s(Vn,"sep");function An(e,n){return e.node(n).width}s(An,"width");function Gn(e){e=se(e),Yn(e),sr(Bn(e),function(n,r){e.node(r).x=n})}s(Gn,"position");function Yn(e){var n=j(e),r=e.graph().ranksep,t=0;c(n,function(a){var i=E(m(a,function(o){return e.node(o).height}));c(a,function(o){e.node(o).y=t+i/2}),t+=i+r})}s(Yn,"positionY");function vr(e,n){var r=n&&n.debugTiming?Pe:Re;r("layout",()=>{var t=r(" buildLayoutGraph",()=>zn(e));r(" runLayout",()=>Dn(t,r)),r(" updateInputGraph",()=>Wn(e,t))})}s(vr,"layout");function Dn(e,n){n(" makeSpaceForEdgeLabels",()=>qn(e)),n(" removeSelfEdges",()=>er(e)),n(" acyclic",()=>Ge(e)),n(" nestingGraph.run",()=>tn(e)),n(" rank",()=>nn(se(e))),n(" injectEdgeLabelProxies",()=>Xn(e)),n(" removeEmptyRanks",()=>_e(e)),n(" nestingGraph.cleanup",()=>dn(e)),n(" normalizeRanks",()=>Le(e)),n(" assignRankMinMax",()=>Hn(e)),n(" removeEdgeLabelProxies",()=>Un(e)),n(" normalize.run",()=>We(e)),n(" parentDummyChains",()=>On(e)),n(" addBorderSegments",()=>Ie(e)),n(" order",()=>En(e)),n(" insertSelfEdges",()=>nr(e)),n(" adjustCoordinateSystem",()=>Se(e)),n(" position",()=>Gn(e)),n(" positionSelfEdges",()=>rr(e)),n(" removeBorderNodes",()=>$n(e)),n(" normalize.undo",()=>qe(e)),n(" fixupEdgeLabelCoords",()=>Qn(e)),n(" undoCoordinateSystem",()=>Te(e)),n(" translateGraph",()=>Jn(e)),n(" assignNodeIntersects",()=>Kn(e)),n(" reversePoints",()=>Zn(e)),n(" acyclic.undo",()=>De(e))}s(Dn,"runLayout");function Wn(e,n){c(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),c(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}s(Wn,"updateInputGraph");var pr=["nodesep","edgesep","ranksep","marginx","marginy"],wr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},mr=["acyclicer","ranker","rankdir","align"],br=["width","height"],gr={width:0,height:0},yr=["minlen","weight","width","height","labeloffset"],kr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Er=["labelpos"];function zn(e){var n=new y({multigraph:!0,compound:!0}),r=A(e.graph());return n.setGraph(U({},wr,V(r,pr),G(r,mr))),c(e.nodes(),function(t){var a=A(e.node(t));n.setNode(t,tr(V(a,br),gr)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var a=A(e.edge(t));n.setEdge(t,U({},kr,V(a,yr),G(a,Er)))}),n}s(zn,"buildLayoutGraph");function qn(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}s(qn,"makeSpaceForEdgeLabels");function Xn(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-t.rank)/2+t.rank,e:n};x(e,"edge-proxy",i,"_ep")}})}s(Xn,"injectEdgeLabelProxies");function Hn(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=E(n,t.maxRank))}),e.graph().maxRank=n}s(Hn,"assignRankMinMax");function Un(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}s(Un,"removeEdgeLabelProxies");function Jn(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,d=i.marginy||0;function u(f){var l=f.x,h=f.y,v=f.width,p=f.height;n=Math.min(n,l-v/2),r=Math.max(r,l+v/2),t=Math.min(t,h-p/2),a=Math.max(a,h+p/2)}s(u,"getExtremes"),c(e.nodes(),function(f){u(e.node(f))}),c(e.edges(),function(f){var l=e.edge(f);Object.prototype.hasOwnProperty.call(l,"x")&&u(l)}),n-=o,t-=d,c(e.nodes(),function(f){var l=e.node(f);l.x-=n,l.y-=t}),c(e.edges(),function(f){var l=e.edge(f);c(l.points,function(h){h.x-=n,h.y-=t}),Object.prototype.hasOwnProperty.call(l,"x")&&(l.x-=n),Object.prototype.hasOwnProperty.call(l,"y")&&(l.y-=t)}),i.width=r-n+o,i.height=a-t+d}s(Jn,"translateGraph");function Kn(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=t),r.points.unshift(J(t,i)),r.points.push(J(a,o))})}s(Kn,"assignNodeIntersects");function Qn(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}s(Qn,"fixupEdgeLabelCoords");function Zn(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}s(Zn,"reversePointsForReversedEdges");function $n(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(Y(r.borderLeft)),o=e.node(Y(r.borderRight));r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}s($n,"removeBorderNodes");function er(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}s(er,"removeSelfEdges");function nr(e){var n=j(e);c(n,function(r){var t=0;c(r,function(a,i){var o=e.node(a);o.order=i+t,c(o.selfEdges,function(d){x(e,"selfedge",{width:d.label.width,height:d.label.height,rank:o.rank,order:i+ ++t,e:d.e,label:d.label},"_se")}),delete o.selfEdges})})}s(nr,"insertSelfEdges");function rr(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,i=t.y,o=r.x-a,d=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*o/3,y:i-d},{x:a+5*o/6,y:i-d},{x:a+o,y:i},{x:a+5*o/6,y:i+d},{x:a+2*o/3,y:i+d}],r.label.x=r.x,r.label.y=r.y}})}s(rr,"positionSelfEdges");function V(e,n){return W(G(e,n),Number)}s(V,"selectNumberAttrs");function A(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}s(A,"canonicalize");export{vr as l};
@@ -1,99 +0,0 @@
1
- import{g as Ut}from"./j0ThtFJc.js";import{s as Kt}from"./nGCCQCpO.js";import{f,c7 as Zt,aL as jt,c6 as qt,aK as Wt,c9 as Ht,aP as Qt,aO as tt,bC as F,a4 as Xt,a0 as Jt,aQ as $t,c0 as te,e as ee,aS as se,bZ as ie,c3 as re,cx as ae}from"./CxRm1vYn.js";import{c as ne}from"./ByM2DIOs.js";var Ot=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],h=[1,10],y=[1,11],b=[1,12],k=[1,30],R=[1,23],p=[1,24],g=[1,25],C=[1,26],v=[1,27],O=[1,19],x=[1,28],A=[1,29],N=[1,20],D=[1,18],L=[1,21],w=[1,22],xt=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],pt=[1,36],ft=[1,37],bt=[1,38],gt=[1,39],yt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],Ct=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],_t=[18,61,64,66],kt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:h,25:y,27:b,28:13,29:14,30:15,31:16,32:17,34:k,37:R,38:p,39:g,40:C,41:v,43:O,46:x,47:A,51:N,53:D,54:L,55:w},s(a,xt,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:pt,70:ft,71:bt,72:gt,73:yt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:N,53:D,54:L,55:w},{10:51,43:O,51:N,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:N,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:h,25:y,27:b,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:R,38:p,39:g,40:C,41:v,43:O,46:x,47:A,51:N,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:B,69:pt,70:ft,71:bt,72:gt,73:yt}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:pt,70:ft,71:bt,72:gt,73:yt},s(Nt,[2,82]),s(Nt,[2,83]),s(u,[2,31]),s(u,xt),{6:st,9:it,35:90,45:Ct,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(u,[2,45],{45:B}),{6:st,9:it,35:95,45:Ct,50:rt},s(u,[2,32]),{10:97,36:96,43:O,51:N,53:D,54:L,55:w},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:N,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(u,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:O,51:N,53:D,54:L,55:w},s(vt,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(_t,[2,72]),s(J,[2,75]),s(_t,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(u,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:B}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:B},s(u,[2,9]),s(_t,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(Y.yy[mt]=this.yy[mt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Et=m.yylloc;t.push(Et);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,St,U={},ht,I,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var Tt="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?Tt="Parse error on line "+(lt+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Tt="Parse error on line "+(lt+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Tt,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:Et,expected:ut})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(T[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(T[1]),E=null,Dt=m.yyleng,e=m.yytext,lt=m.yylineno,Et=m.yylloc;break;case 2:if(I=this.productions_[T[1]][1],U.$=_[_.length-I],U._$={first_line:t[t.length-(I||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(I||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(I||1)].range[0],t[t.length-1].range[1]]),St=this.performAction.apply(U,[e,Dt,lt,Y.yy,T[1],_,t].concat(Yt)),typeof St<"u")return St;I&&(d=d.slice(0,-1*I*2),_=_.slice(0,-1*I),t=t.slice(0,-1*I)),d.push(this.productions_[T[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=(function(){var G={EOF:1,parseError:f(function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},"parseError"),setInput:f(function(n,l){return this.yy=l||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var l=n.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:f(function(n){var l=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(n){this.unput(this.match.slice(n))},"less"),pastInput:f(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var n=this.pastInput(),l=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
- `+l+"^"},"showPosition"),test_match:f(function(n,l){var d,i,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),i=n[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],d=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in _)this[t]=_[t];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,l,d,i;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),t=0;t<_.length;t++)if(d=this._input.match(this.rules[_[t]]),d&&(!l||d[0].length>l[0].length)){if(l=d,i=t,this.options.backtrack_lexer){if(n=this.test_match(d,_[t]),n!==!1)return n;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(n=this.test_match(l,_[i]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var l=this.next();return l||this.lex()},"lex"),begin:f(function(l){this.conditionStack.push(l)},"begin"),popState:f(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:f(function(l){this.begin(l)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(l,d,i,_){switch(i){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return d.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return d.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return G})();kt.lexer=Gt;function ct(){this.yy={}}return f(ct,"Parser"),ct.prototype=kt,kt.Parser=ct,new ct})();Ot.parser=Ot;var oe=Ot,K,ce=(K=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Zt,this.getAccTitle=jt,this.setAccDescription=qt,this.getAccDescription=Wt,this.setDiagramTitle=Ht,this.getDiagramTitle=Qt,this.getConfig=f(()=>tt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}addEntity(a,o=""){return this.entities.has(a)?!this.entities.get(a)?.alias&&o&&(this.entities.get(a).alias=o,F.info(`Add alias '${o}' to entity '${a}'`)):(this.entities.set(a,{id:`entity-${a}-${this.entities.size}`,label:a,attributes:[],alias:o,shape:"erBox",look:tt().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),F.info("Added new entity :",a)),this.entities.get(a)}getEntity(a){return this.entities.get(a)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(a,o){const c=this.addEntity(a);let r;for(r=o.length-1;r>=0;r--)o[r].keys||(o[r].keys=[]),o[r].comment||(o[r].comment=""),c.attributes.push(o[r]),F.debug("Added attribute ",o[r].name)}addRelationship(a,o,c,r){let h;if(this.subGraphLookup.has(a))h=a;else{const k=this.addEntity(a);if(!k)return;h=k.id}let y;if(this.subGraphLookup.has(c))y=c;else{const k=this.addEntity(c);if(!k)return;y=k.id}const b={entityA:h,roleA:o,entityB:y,relSpec:r};this.relationships.push(b),F.debug("Added new relationship :",b)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(a){this.direction=a}getCompiledStyles(a){let o=[];for(const c of a){const r=this.classes.get(c);r?.styles&&(o=[...o,...r.styles??[]].map(h=>h.trim())),r?.textStyles&&(o=[...o,...r.textStyles??[]].map(h=>h.trim()))}return o}addCssStyles(a,o){for(const c of a){const r=this.entities.get(c),h=this.subGraphLookup.get(c);if(o){if(r)for(const y of o)r.cssStyles.push(y);if(h){h.cssStyles||(h.cssStyles=[]);for(const y of o)h.cssStyles.push(y)}}}}addClass(a,o){a.forEach(c=>{let r=this.classes.get(c);r===void 0&&(r={id:c,styles:[],textStyles:[]},this.classes.set(c,r)),o&&o.forEach(function(h){if(/color/.exec(h)){const y=h.replace("fill","bgFill");r.textStyles.push(y)}r.styles.push(h)})})}addSubGraph(a,o,c){let r=a.text.trim(),h=c.text;const b=f(g=>{const C=new Set;let v;return{nodeList:g.filter(x=>{if(x?.stmt)return x.stmt==="dir"&&(v=x.value),!1;if(typeof x!="string")return!1;const A=x.trim();return!A||C.has(A)?!1:(C.add(A),!0)}),dir:v}},"uniq")(o.flat()),k=b.nodeList,R=b.dir;r=r??"subGraph"+this.subCount,h=h||"",h=this.sanitizeText(h),this.subCount=this.subCount+1;const p={id:r,nodes:k,title:h.trim(),classes:[],cssStyles:[],dir:R,labelType:this.sanitizeNodeLabelType(c?.type)};return F.info("Adding",p.id,p.nodes,p.dir),p.nodes=this.makeUniq(p,this.subGraphs).nodes,this.subGraphs.push(p),this.subGraphLookup.set(r,p),r}getSubGraphs(){return this.subGraphs}setClass(a,o){for(const c of a){const r=this.entities.get(c);if(r)for(const y of o)r.cssClasses+=" "+y;const h=this.subGraphLookup.get(c);if(h)for(const y of o)h.classes.push(y)}}subgraphNodeCache(a){const o=new Set;for(const c of a)for(const r of c.nodes)o.add(r);return o}makeUniq(a,o){const c=this.subgraphNodeCache(o),r=[];return a.nodes.forEach((h,y)=>{c.has(h)?F.warn(`Entity '${h}' already belongs to another subgraph and will be ignored`):r.push(a.nodes[y])}),{nodes:r}}sanitizeText(a){return Xt.sanitizeText(a,tt())}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,Jt()}getData(){const a=[],o=[],c=tt(),r=this.getSubGraphs(),h=new Map,y=new Map;for(let p=r.length-1;p>=0;p--){const g=r[p];g.nodes.length>0&&y.set(g.id,!0);for(const C of g.nodes)h.set(C,g.id)}for(let p=r.length-1;p>=0;p--){const g=r[p];a.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:h.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssStyles:g.cssStyles,cssClasses:g.classes.join(" "),shape:"rect",dir:g.dir,isGroup:!0,look:c.look})}const b=new Set(r.map(p=>p.id));let k=0;for(const p of this.entities.keys()){if(b.has(p))continue;const g=this.entities.get(p);g&&(g.cssCompiledStyles=this.getCompiledStyles(g.cssClasses.split(" ")),g.colorIndex=k++,a.push({...g,parentId:h.get(p),isGroup:!1}))}let R=0;for(const p of this.relationships){const g={id:$t(p.entityA,p.entityB,{prefix:"id",counter:R++}),type:"normal",curve:"basis",start:p.entityA,end:p.entityB,label:p.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:p.relSpec.cardB.toLowerCase(),arrowTypeEnd:p.relSpec.cardA.toLowerCase(),pattern:p.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:c.look,labelType:"markdown"};o.push(g)}return{nodes:a,edges:o,other:{},config:c,direction:this.direction}}},f(K,"ErDB"),K),Bt={};ee(Bt,{draw:()=>le});var le=f(async function(s,a,o,c){F.info("REF0:"),F.info("Drawing er diagram (unified)",a);const{securityLevel:r,er:h,layout:y}=tt(),b=c.db.getData(),k=Ut(a,r);b.type=c.type,b.layoutAlgorithm=se(y),b.config.flowchart.nodeSpacing=h?.nodeSpacing||140,b.config.flowchart.rankSpacing=h?.rankSpacing||80,b.direction=c.db.getDirection();const{config:R}=b,{look:p}=R;p==="neo"?b.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:b.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],b.diagramId=a,await ie(b,k),b.layoutAlgorithm==="elk"&&k.select(".edges").lower();const g=k.selectAll('[id*="-background"]');Array.from(g).length>0&&g.each(function(){const v=re(this),x=v.attr("id").replace("-background",""),A=k.select(`#${CSS.escape(x)}`);if(!A.empty()){const N=A.attr("transform");v.attr("transform",N)}});const C=8;ae.insertTitle(k,"erDiagramTitleText",h?.titleTopMargin??25,c.db.getDiagramTitle()),Kt(k,C,"erDiagram",h?.useMaxWidth??!0)},"draw"),Mt=f((s,a)=>{const o=ne,c=o(s,"r"),r=o(s,"g"),h=o(s,"b");return te(c,r,h,a)},"fade"),dt=new Set(["redux-color","redux-dark-color"]),he=f(s=>{const{theme:a,look:o,bkgColorArray:c,borderColorArray:r}=s;if(!dt.has(a))return"";const h=c?.length>0;let y="";for(let b=0;b<s.THEME_COLOR_LIMIT;b++)y+=`
7
-
8
- [data-look="${o}"][data-color-id="color-${b}"].node path {
9
- stroke: ${r[b]};
10
- ${h?`fill: ${c[b]};`:""}
11
- }
12
-
13
- [data-look="${o}"][data-color-id="color-${b}"].node rect {
14
- stroke: ${r[b]};
15
- ${h?`fill: ${c[b]};`:""}
16
- }
17
- `;return y},"genColor"),ue=f(s=>{const{look:a,theme:o,erEdgeLabelBackground:c,strokeWidth:r}=s;return`
18
- ${he(s)}
19
- .entityBox {
20
- fill: ${s.mainBkg};
21
- stroke: ${s.nodeBorder};
22
- }
23
-
24
- .relationshipLabelBox {
25
- fill: ${s.tertiaryColor};
26
- opacity: 0.7;
27
- background-color: ${s.tertiaryColor};
28
- rect {
29
- opacity: 0.5;
30
- }
31
- }
32
-
33
- .labelBkg {
34
- background-color: ${dt.has(o)&&c?c:Mt(s.tertiaryColor,.5)};
35
- }
36
-
37
- .edgeLabel {
38
- background-color: ${dt.has(o)&&c?c:s.edgeLabelBackground};
39
- }
40
- .edgeLabel .label rect {
41
- fill: ${dt.has(o)&&c?c:s.edgeLabelBackground};
42
- }
43
- .edgeLabel .label text {
44
- fill: ${s.textColor};
45
- }
46
-
47
- .edgeLabel .label {
48
- fill: ${s.nodeBorder};
49
- font-size: 14px;
50
- }
51
-
52
- .label {
53
- font-family: ${s.fontFamily};
54
- color: ${s.nodeTextColor||s.textColor};
55
- }
56
-
57
- .edge-pattern-dashed {
58
- stroke-dasharray: 8,8;
59
- }
60
-
61
- .node rect,
62
- .node circle,
63
- .node ellipse,
64
- .node polygon
65
- {
66
- fill: ${s.mainBkg};
67
- stroke: ${s.nodeBorder};
68
- stroke-width: ${a==="neo"?r:"1px"};
69
- }
70
-
71
- .relationshipLine {
72
- stroke: ${s.lineColor};
73
- stroke-width: ${a==="neo"?r:"1px"};
74
- fill: none;
75
- }
76
-
77
- .marker {
78
- fill: none !important;
79
- stroke: ${s.lineColor} !important;
80
- stroke-width: 1;
81
- }
82
- [data-look=neo].labelBkg {
83
- background-color: ${Mt(s.tertiaryColor,.5)};
84
- }
85
-
86
- .cluster rect {
87
- fill: ${s.clusterBkg??s.mainBkg};
88
- stroke: ${s.clusterBorder??s.nodeBorder};
89
- stroke-width: 1px;
90
- }
91
-
92
- .cluster text {
93
- fill: ${s.titleColor??s.textColor};
94
- }
95
-
96
- .cluster-label text {
97
- fill: ${s.titleColor??s.textColor};
98
- }
99
- `},"getStyles"),de=ue,ye={parser:oe,get db(){return new ce},renderer:Bt,styles:de};export{ye as diagram};
@@ -1,39 +0,0 @@
1
- import{p as tt}from"./CkawHIFZ.js";import{p as et}from"./DD-T_Om0.js";import{K as at,aF as rt,L as it,aG as nt,O as ot,aI as st,a as l,ad as z,N as lt,j as ct,aE as dt,an as gt,r as pt,k as ht,y as ft}from"./CSbiiZpm.js";import"./CxRm1vYn.js";import{d as I}from"./PXMyYXQv.js";import{o as ut}from"./CmKTTxBW.js";import{d as mt}from"./Dt53cexP.js";var vt=ft.pie,L={sections:new Map,showData:!1},T=L.sections,R=L.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{T=new Map,R=L.showData,ht()},"clear"),Ct=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),$t=l(()=>T,"getSections"),yt=l(t=>{R=t},"setShowData"),Dt=l(()=>R,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:st,getDiagramTitle:ot,setAccTitle:nt,getAccTitle:it,setAccDescription:rt,getAccDescription:at,addSection:Ct,getSections:$t,setShowData:yt,getShowData:Dt},Tt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),bt={parse:l(async t=>{const a=await et("pie",t);z.debug(a),Tt(a,U)},"parse")},At=l(t=>`
2
- .pieCircle{
3
- stroke: ${t.pieStrokeColor};
4
- stroke-width : ${t.pieStrokeWidth};
5
- opacity : ${t.pieOpacity};
6
- }
7
- .pieCircle.highlighted{
8
- scale: 1.05;
9
- opacity: 1;
10
- }
11
- .pieCircle.highlightedOnHover:hover{
12
- transition-duration: 250ms;
13
- scale: 1.05;
14
- opacity: 1;
15
- }
16
- .pieOuterCircle{
17
- stroke: ${t.pieOuterStrokeColor};
18
- stroke-width: ${t.pieOuterStrokeWidth};
19
- fill: none;
20
- }
21
- .pieTitleText {
22
- text-anchor: middle;
23
- font-size: ${t.pieTitleTextSize};
24
- fill: ${t.pieTitleTextColor};
25
- font-family: ${t.fontFamily};
26
- }
27
- .slice {
28
- font-family: ${t.fontFamily};
29
- fill: ${t.pieSectionTextColor};
30
- font-size:${t.pieSectionTextSize};
31
- // fill: white;
32
- }
33
- .legend text {
34
- fill: ${t.pieLegendTextColor};
35
- font-family: ${t.fontFamily};
36
- font-size: ${t.pieLegendTextSize};
37
- }
38
- `,"getStyles"),kt=At,_t=l(t=>{const a=[...t.values()].reduce((o,m)=>o+m,0),F=[...t.entries()].map(([o,m])=>({label:o,value:m})).filter(o=>o.value/a*100>=1);return mt().value(o=>o.value).sort(null)(F)},"createPieArcs"),Et=l((t,a,F,O)=>{z.debug(`rendering pie chart
39
- `+t);const o=O.db,m=lt(),h=ct(o.getConfig(),m.pie),W=40,i=18,c=4,C=450,S=C,b=dt(a),$=b.append("g");$.attr("transform","translate("+S/2+","+C/2+")");const{themeVariables:n}=m;let[G]=gt(n.pieOuterStrokeWidth);G??=2;const j=h.legendPosition,H=h.textPosition,K=h.donutHole>0&&h.donutHole<=.9?h.donutHole:0,f=Math.min(S,C)/2-W,V=I().innerRadius(K*f).outerRadius(f),X=I().innerRadius(f*H).outerRadius(f*H),x=$.append("g");x.append("circle").attr("cx",0).attr("cy",0).attr("r",f+G/2).attr("class","pieOuterCircle");const y=o.getSections(),Z=_t(y),q=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12];let A=0;y.forEach(e=>{A+=e});const M=Z.filter(e=>(e.data.value/A*100).toFixed(0)!=="0"),k=ut(q).domain([...y.keys()]);x.selectAll("mySlices").data(M).enter().append("path").attr("d",V).attr("fill",e=>k(e.data.label)).attr("class",e=>{let r="pieCircle";return h.highlightSlice==="hover"?r+=" highlightedOnHover":h.highlightSlice===e.data.label&&(r+=" highlighted"),r}),x.selectAll("mySlices").data(M).enter().append("text").text(e=>(e.data.value/A*100).toFixed(0)+"%").attr("transform",e=>"translate("+X.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const J=$.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),w=[...y.entries()].map(([e,r])=>({label:e,value:r})),u=$.selectAll(".legend").data(w).enter().append("g").attr("class","legend");u.append("rect").attr("width",i).attr("height",i).style("fill",e=>k(e.label)).style("stroke",e=>k(e.label)),u.append("text").attr("x",i+c).attr("y",i-c).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const v=Math.max(...u.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));let D=C,_=S+W;const s=i+c,E=w.length*s;switch(j){case"center":u.attr("transform",(e,r)=>{const d=s*w.length/2,g=-v/2-(i+c),p=r*s-d;return"translate("+g+","+p+")"});break;case"top":D+=E,u.attr("transform",(e,r)=>{const d=f,g=-v/2-(i+c),p=r*s-d;return`translate(${g}, ${p})`}),x.attr("transform",()=>`translate(0, ${E+s})`);break;case"bottom":D+=E,u.attr("transform",(e,r)=>{const d=-f-s,g=-v/2-(i+c),p=r*s-d;return"translate("+g+","+p+")"});break;case"left":_+=i+c+v,u.attr("transform",(e,r)=>{const d=s*w.length/2,g=-f-(i+c),p=r*s-d;return"translate("+g+","+p+")"}),x.attr("transform",()=>`translate(${v+i+c}, 0)`);break;case"right":default:_+=i+c+v,u.attr("transform",(e,r)=>{const d=s*w.length/2,g=12*i,p=r*s-d;return"translate("+g+","+p+")"});break}const P=J.node()?.getBoundingClientRect().width??0,Q=S/2-P/2,Y=S/2+P/2,N=Math.min(0,Q),B=Math.max(_,Y)-N;b.attr("viewBox",`${N} 0 ${B} ${D}`),pt(b,D,B,h.useMaxWidth)},"draw"),zt={draw:Et},Pt={parser:bt,db:U,renderer:zt,styles:kt};export{Pt as diagram};
@@ -1,41 +0,0 @@
1
- import{p as _}from"./CkawHIFZ.js";import{p as E}from"./DD-T_Om0.js";import{aF as F,K as D,O as G,aI as P,L as z,aG as B,a as c,aE as W,k as V,j as C,M as T,y as j,ad as k,U as H,r as U}from"./CSbiiZpm.js";import{g as w}from"./CxRm1vYn.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,S={axes:[],curves:[],options:x},m=structuredClone(S),K=j.radar,X=c(()=>C({...K,...T().radar}),"getConfig"),O=c(()=>m.axes,"getAxes"),N=c(()=>m.curves,"getCurves"),Y=c(()=>m.options,"getOptions"),Z=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),q=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:J(t.entries)}))},"setCurves"),J=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=O();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Q=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(k.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),tt=c(()=>{V(),m=structuredClone(S)},"clear"),$={getAxes:O,getCurves:N,getOptions:Y,setAxes:Z,setCurves:q,setOptions:Q,getConfig:X,clear:tt,setAccTitle:B,getAccTitle:z,setDiagramTitle:P,getDiagramTitle:G,getAccDescription:D,setAccDescription:F},et=c(a=>{_(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),at={parse:c(async a=>{const t=await E("radar",a);k.debug(t),et(t)},"parse")},rt=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=W(t),u=st(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;nt(u,i,v,n.ticks,n.graticule),ot(u,i,v,o),b(u,i,l,h,g,n.graticule,o),L(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),st=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return U(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),nt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),ot=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function b(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=A(g,r,s,o),R=f*Math.cos(v),I=f*Math.sin(v);return{x:R,y:I}});i==="circle"?a.append("path").attr("d",M(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}w(b,"drawCurves");c(b,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}w(A,"relativeRadius");c(A,"relativeRadius");function M(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}w(M,"closedRoundCurve");c(M,"closedRoundCurve");function L(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}w(L,"drawLegend");c(L,"drawLegend");var it={draw:rt},lt=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
- .radarCurve-${r} {
3
- color: ${s};
4
- fill: ${s};
5
- fill-opacity: ${t.curveOpacity};
6
- stroke: ${s};
7
- stroke-width: ${t.curveStrokeWidth};
8
- }
9
- .radarLegendBox-${r} {
10
- fill: ${s};
11
- fill-opacity: ${t.curveOpacity};
12
- stroke: ${s};
13
- }
14
- `}return e},"genIndexStyles"),ct=c(a=>{const t=H(),e=T(),r=C(t,e.themeVariables),s=C(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),dt=c(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ct(a);return`
15
- .radarTitle {
16
- font-size: ${t.fontSize};
17
- color: ${t.titleColor};
18
- dominant-baseline: hanging;
19
- text-anchor: middle;
20
- }
21
- .radarAxisLine {
22
- stroke: ${e.axisColor};
23
- stroke-width: ${e.axisStrokeWidth};
24
- }
25
- .radarAxisLabel {
26
- font-size: ${e.axisLabelFontSize}px;
27
- color: ${e.axisColor};
28
- }
29
- .radarGraticule {
30
- fill: ${e.graticuleColor};
31
- fill-opacity: ${e.graticuleOpacity};
32
- stroke: ${e.graticuleColor};
33
- stroke-width: ${e.graticuleStrokeWidth};
34
- }
35
- .radarLegendText {
36
- text-anchor: start;
37
- font-size: ${e.legendFontSize}px;
38
- dominant-baseline: hanging;
39
- }
40
- ${lt(t,e)}
41
- `},"styles"),xt={parser:at,db:$,renderer:it,styles:dt};export{xt as diagram};
@@ -1,89 +0,0 @@
1
- import{a as o,ad as se,N as W,aE as ye,$ as me,a3 as be,ar as _e,aK as Ee,y as Y,aD as G,ac as ke,J as Se,a8 as Ne,aa as he,w as ue}from"./CSbiiZpm.js";import{g as xe}from"./hqSEunOk.js";import{g as _}from"./CxRm1vYn.js";var te=(function(){var e=o(function(I,s,n,r){for(n=n||{},r=I.length;r--;n[I[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],E=[1,16],b=[1,20],l=[1,19],L=[6,7,8],C=[1,26],g=[1,24],A=[1,25],k=[6,7,11],M=[1,31],x=[6,7,11,24],j=[1,6,13,16,17,20,23],f=[1,35],T=[1,36],O=[1,6,7,11,13,16,17,20,23],U=[1,38],R={trace:o(_(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(_(function(s,n,r,a,u,t,H){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:E,18:17,19:18,20:b,23:l},e(L,[2,3]),{1:[2,2]},e(L,[2,4]),e(L,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:E,18:17,19:18,20:b,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:E,18:17,19:18,20:b,23:l},{6:C,7:g,10:23,11:A},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:b,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:M}),e(k,[2,22]),e(k,[2,23]),e(x,[2,25]),e(x,[2,26]),e(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:g,10:34,11:A},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:E,18:17,19:18,20:b,23:l},e(j,[2,14],{7:f,11:T}),e(O,[2,8]),e(O,[2,9]),e(O,[2,10]),e(k,[2,16],{15:37,24:M}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:U}),e(x,[2,31]),{21:[1,39]},{22:[1,40]},e(j,[2,13],{7:f,11:T}),e(O,[2,11]),e(O,[2,12]),e(k,[2,15],{24:U}),e(x,[2,30]),{22:[1,41]},e(x,[2,27]),e(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(_(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),"parseError"),parse:o(_(function(s){var n=this,r=[0],a=[],u=[null],t=[],H=this.table,c="",z=0,ae=0,de=2,oe=1,pe=t.slice.call(arguments,1),m=Object.create(this.lexer),V={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(V.yy[q]=this.yy[q]);m.setInput(s,V.yy),V.yy.lexer=m,V.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Q=m.yylloc;t.push(Q);var fe=m.options&&m.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(N){r.length=r.length-2*N,u.length=u.length-N,t.length=t.length-N}_(ce,"popStack"),o(ce,"popStack");function Z(){var N;return N=a.pop()||m.lex()||oe,typeof N!="number"&&(N instanceof Array&&(a=N,N=a.pop()),N=n.symbols_[N]||N),N}_(Z,"lex"),o(Z,"lex");for(var S,B,v,$,F={},K,w,le,X;;){if(B=r[r.length-1],this.defaultActions[B]?v=this.defaultActions[B]:((S===null||typeof S>"u")&&(S=Z()),v=H[B]&&H[B][S]),typeof v>"u"||!v.length||!v[0]){var ee="";X=[];for(K in H[B])this.terminals_[K]&&K>de&&X.push("'"+this.terminals_[K]+"'");m.showPosition?ee="Parse error on line "+(z+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+X.join(", ")+", got '"+(this.terminals_[S]||S)+"'":ee="Parse error on line "+(z+1)+": Unexpected "+(S==oe?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(ee,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:Q,expected:X})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+S);switch(v[0]){case 1:r.push(S),u.push(m.yytext),t.push(m.yylloc),r.push(v[1]),S=null,ae=m.yyleng,c=m.yytext,z=m.yylineno,Q=m.yylloc;break;case 2:if(w=this.productions_[v[1]][1],F.$=u[u.length-w],F._$={first_line:t[t.length-(w||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(w||1)].first_column,last_column:t[t.length-1].last_column},fe&&(F._$.range=[t[t.length-(w||1)].range[0],t[t.length-1].range[1]]),$=this.performAction.apply(F,[c,ae,z,V.yy,v[1],u,t].concat(pe)),typeof $<"u")return $;w&&(r=r.slice(0,-1*w*2),u=u.slice(0,-1*w),t=t.slice(0,-1*w)),r.push(this.productions_[v[1]][0]),u.push(F.$),t.push(F._$),le=H[r[r.length-2]][r[r.length-1]],r.push(le);break;case 3:return!0}}return!0},"parse"),"parse")},J=(function(){var I={EOF:1,parseError:o(_(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),"parseError"),setInput:o(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var n=s.length,r=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+n+"^"},"showPosition"),test_match:o(function(s,n){var r,a,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),a=s[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],r=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var t in u)this[t]=u[t];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,r,a;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),t=0;t<u.length;t++)if(r=this._input.match(this.rules[u[t]]),r&&(!n||r[0].length>n[0].length)){if(n=r,a=t,this.options.backtrack_lexer){if(s=this.test_match(r,u[t]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[a]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(_(function(){var n=this.next();return n||this.lex()},"lex"),"lex"),begin:o(_(function(n){this.conditionStack.push(n)},"begin"),"begin"),popState:o(_(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:o(_(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:o(_(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),"topState"),pushState:o(_(function(n){this.begin(n)},"pushState"),"pushState"),stateStackSize:o(_(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:o(_(function(n,r,a,u){switch(a){case 0:return this.pushState("shapeData"),r.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const t=/\n\s*/g;return r.yytext=r.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",r.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",r.yytext),21;case 42:return n.getLogger().trace("Long description:",r.yytext),21}},"anonymous"),"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return I})();R.lexer=J;function P(){this.yy={}}return _(P,"Parser"),o(P,"Parser"),P.prototype=R,R.Parser=P,new P})();te.parser=te;var ve=te,D=[],ie=[],ne=0,re={},De=o(()=>{D=[],ie=[],ne=0,re={}},"clear"),Le=o(e=>{if(D.length===0)return null;const h=D[0].level;let p=null;for(let i=D.length-1;i>=0;i--)if(D[i].level===h&&!p&&(p=D[i]),D[i].level<h)throw new Error('Items without section detected, found section ("'+D[i].label+'")');return e===p?.level?null:p},"getSection"),ge=o(function(){return ie},"getSections"),Oe=o(function(){const e=[],h=[],p=ge(),i=W();for(const d of p){const E={id:d.id,label:G(d.label??"",i),labelType:"markdown",isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:i.look};h.push(E);const b=D.filter(l=>l.parentId===d.id);for(const l of b){const L={id:l.id,parentId:d.id,label:G(l.label??"",i),labelType:"markdown",isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};h.push(L)}}return{nodes:h,edges:e,other:{},config:W()}},"getData"),Ie=o((e,h,p,i,d)=>{const E=W();let b=E.mindmap?.padding??Y.mindmap.padding;switch(i){case y.ROUNDED_RECT:case y.RECT:case y.HEXAGON:b*=2}const l={id:G(h,E)||"kbn"+ne++,level:e,label:G(p,E),width:E.mindmap?.maxNodeWidth??Y.mindmap.maxNodeWidth,padding:b,isGroup:!1};if(d!==void 0){let C;d.includes(`
7
- `)?C=d+`
8
- `:C=`{
9
- `+d+`
10
- }`;const g=ke(C,{schema:Se});if(g.shape&&(g.shape!==g.shape.toLowerCase()||g.shape.includes("_")))throw new Error(`No such shape: ${g.shape}. Shape names should be lowercase.`);g?.shape&&g.shape==="kanbanItem"&&(l.shape=g?.shape),g?.label&&(l.label=g?.label),g?.icon&&(l.icon=g?.icon.toString()),g?.assigned&&(l.assigned=g?.assigned.toString()),g?.ticket&&(l.ticket=g?.ticket.toString()),g?.priority&&(l.priority=g?.priority)}const L=Le(e);L?l.parentId=L.id||"kbn"+ne++:ie.push(l),D.push(l)},"addNode"),y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ce=o((e,h)=>{switch(se.debug("In get type",e,h),e){case"[":return y.RECT;case"(":return h===")"?y.ROUNDED_RECT:y.CLOUD;case"((":return y.CIRCLE;case")":return y.CLOUD;case"))":return y.BANG;case"{{":return y.HEXAGON;default:return y.DEFAULT}},"getType"),we=o((e,h)=>{re[e]=h},"setElementForId"),Ae=o(e=>{if(!e)return;const h=W(),p=D[D.length-1];e.icon&&(p.icon=G(e.icon,h)),e.class&&(p.cssClasses=G(e.class,h))},"decorateNode"),Te=o(e=>{switch(e){case y.DEFAULT:return"no-border";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded-rect";case y.CIRCLE:return"circle";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Re=o(()=>se,"getLogger"),Pe=o(e=>re[e],"getElementById"),Ve={clear:De,addNode:Ie,getSections:ge,getData:Oe,nodeType:y,getType:Ce,setElementForId:we,decorateNode:Ae,type2Str:Te,getLogger:Re,getElementById:Pe},Be=Ve,je=o(async(e,h,p,i)=>{se.debug(`Rendering kanban diagram
11
- `+e);const E=i.db.getData(),b=W();b.htmlLabels=!1;const l=ye(h);for(const f of E.nodes)f.domId=`${h}-${f.id}`;const L=l.append("g");L.attr("class","sections");const C=l.append("g");C.attr("class","items");const g=E.nodes.filter(f=>f.isGroup);let A=0;const k=10,M=[];let x=25;for(const f of g){const T=b?.kanban?.sectionWidth||200;A=A+1,f.x=T*A+(A-1)*k/2,f.width=T,f.y=0,f.height=T*3,f.rx=5,f.ry=5,f.cssClasses=f.cssClasses+" section-"+A;const O=await me(L,f);x=Math.max(x,O?.labelBBox?.height),M.push(O)}let j=0;for(const f of g){const T=M[j];j=j+1;const O=b?.kanban?.sectionWidth||200,U=-O*3/2+x;let R=U;const J=E.nodes.filter(s=>s.parentId===f.id);for(const s of J){if(s.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");s.x=f.x,s.width=O-1.5*k;const r=(await be(C,s,{config:b})).node().getBBox();s.y=R+r.height/2,await _e(s),R=s.y+r.height/2+k/2}const P=T.cluster.select("rect"),I=Math.max(R-U+3*k,50)+(x-25);P.attr("height",I)}Ee(void 0,l,b.mindmap?.padding??Y.kanban.padding,b.mindmap?.useMaxWidth??Y.kanban.useMaxWidth)},"draw"),Fe={draw:je},Ge=o(e=>{let h="";for(let i=0;i<e.THEME_COLOR_LIMIT;i++)e["lineColor"+i]=e["lineColor"+i]||e["cScaleInv"+i],Ne(e["lineColor"+i])?e["lineColor"+i]=he(e["lineColor"+i],20):e["lineColor"+i]=ue(e["lineColor"+i],20);const p=o((i,d)=>e.darkMode?ue(i,d):he(i,d),"adjuster");for(let i=0;i<e.THEME_COLOR_LIMIT;i++){const d=""+(17-3*i);h+=`
12
- .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
13
- fill: ${p(e["cScale"+i],10)};
14
- stroke: ${p(e["cScale"+i],10)};
15
-
16
- }
17
- .section-${i-1} text {
18
- fill: ${e["cScaleLabel"+i]};
19
- }
20
- .node-icon-${i-1} {
21
- font-size: 40px;
22
- color: ${e["cScaleLabel"+i]};
23
- }
24
- .section-edge-${i-1}{
25
- stroke: ${e["cScale"+i]};
26
- }
27
- .edge-depth-${i-1}{
28
- stroke-width: ${d};
29
- }
30
- .section-${i-1} line {
31
- stroke: ${e["cScaleInv"+i]} ;
32
- stroke-width: 3;
33
- }
34
-
35
- .disabled, .disabled circle, .disabled text {
36
- fill: lightgray;
37
- }
38
- .disabled text {
39
- fill: #efefef;
40
- }
41
-
42
- .node rect,
43
- .node circle,
44
- .node ellipse,
45
- .node polygon,
46
- .node path {
47
- fill: ${e.background};
48
- stroke: ${e.nodeBorder};
49
- stroke-width: 1px;
50
- }
51
-
52
- .kanban-ticket-link {
53
- fill: ${e.background};
54
- stroke: ${e.nodeBorder};
55
- text-decoration: underline;
56
- }
57
- `}return h},"genSections"),Me=o(e=>`
58
- .edge {
59
- stroke-width: 3;
60
- }
61
- ${Ge(e)}
62
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
- fill: ${e.git0};
64
- }
65
- .section-root text {
66
- fill: ${e.gitBranchLabel0};
67
- }
68
- .icon-container {
69
- height:100%;
70
- display: flex;
71
- justify-content: center;
72
- align-items: center;
73
- }
74
- .edge {
75
- fill: none;
76
- }
77
- .cluster-label, .label {
78
- color: ${e.textColor};
79
- fill: ${e.textColor};
80
- }
81
- .kanban-label {
82
- dy: 1em;
83
- alignment-baseline: middle;
84
- text-anchor: middle;
85
- dominant-baseline: middle;
86
- text-align: center;
87
- }
88
- ${xe()}
89
- `,"getStyles"),Ue=Me,Ke={db:Be,renderer:Fe,parser:ve,styles:Ue};export{Ke as diagram};
@@ -1,3 +0,0 @@
1
- import{p as oe}from"./CkawHIFZ.js";import{p as se,i as de}from"./DD-T_Om0.js";import{O as le,aI as ce,aF as me,K as ue,L as xe,aG as fe,a as o,ad as h,N as ne,aL as ge,k as he,j as pe,M as A,y as ve,aD as B,aX as M,f as be}from"./CSbiiZpm.js";import{c3 as we,g as d}from"./CxRm1vYn.js";var ae="position frame",ie="frame positioned",k="position relation",re="relation positioned",ye=o(function(e){h.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){R(),he()},"clear");function R(){D={}}d(R,"reset");o(R,"reset");var Fe=ve.eventmodeling,Be=o(()=>pe({...Fe,...A().eventmodeling}),"getConfig"),D={};function N(){let e=Me;const{ast:n}=D,t=P();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((a,i)=>{const r=H(a,n.dataEntities,t);e=w(e,{$kind:ae,index:i,frame:a,textProps:r});let l;X(a)?(h.debug("source frame",a.sourceFrames),l=n.frames.filter(c=>a.sourceFrames.some(m=>m.$refText===c.name)),l.forEach(c=>{e=w(e,{$kind:k,index:i,frame:a,sourceFrame:c})})):e=w(e,{$kind:k,index:i,frame:a})}),e={...e,sortedSwimlanesArray:S(e.swimlanes)},e}d(N,"getState");o(N,"getState");function T(e){D.ast=e}d(T,"setAst");o(T,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function P(){return s}d(P,"getDiagramProps");o(P,"getDiagramProps");var Me={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function $(e){const n=e.split(".");if(n.length===2)return n[0]}d($,"extractNamespace");o($,"extractNamespace");function C(e){const n=e.split(".");return n.length===2?n[1]:e}d(C,"extractName");o(C,"extractName");function I(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}d(I,"findSwimlaneByNamespace");o(I,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(a=>{const i=Number.parseInt(a);return i>n&&i<t}).map(a=>Number.parseInt(a)))+1}d(b,"findNextAvailableIndex");o(b,"findNextAvailableIndex");function O(e,n){const t=$(e.entityIdentifier),a=I(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return a?{index:a.index,label:a.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return a?{index:a.index,label:a.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return a?{index:a.index,label:a.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}d(O,"calculateSwimlaneProps");o(O,"calculateSwimlaneProps");function W(e){const{themeVariables:n}=A();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}d(W,"calculateEntityVisualProps");o(W,"calculateEntityVisualProps");function H(e,n,t){const a=A(),i=B(C(e.entityIdentifier)??"",a);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let m=`<b>${M(i,t.textMaxWidth,l)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const v=n.find(F=>F.name===e.dataReference?.$refText);v&&(r=v.dataBlockValue,r=r.substring(r.indexOf(`{
2
- `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" ","&nbsp;"),r+="<br/>")}const u=r!==void 0;u&&(m+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const f={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},x=be(m,f),p=u?x.width/3:x.width,g={content:m,width:p,height:x.height};return h.debug(`[${e.name}] ${e.entityIdentifier} text`,g),g}d(H,"calculateTextProps");o(H,"calculateTextProps");function U(e,n){const t=n,a=W(t.frame),i={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:ie,frame:t.frame,index:t.index,visual:a,dimension:i,textProps:t.textProps}]}d(U,"decidePositionFrame");o(U,"decidePositionFrame");function L(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}d(L,"calculateX");o(L,"calculateX");function _(e,n){const t=[...e.map(a=>a.r),n];return Math.max(...t)}d(_,"calculateMaxRight");o(_,"calculateMaxRight");function S(e){return Object.values(e).sort((n,t)=>n.index-t.index)}d(S,"sortedSwimlanesArray");o(S,"sortedSwimlanesArray");function G(e,n){const t=n,a=O(t.frame,e.swimlanes);let i;a.index in e.swimlanes?i=e.swimlanes[a.index]:i={index:a.index,label:a.label,r:0,y:a.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,l=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,c={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},m=L(i,l,r),u=m+c.width+s.boxPadding,f=_(Object.values(e.swimlanes),u);i.r=m+c.width,i.maxHeight=Math.max(i.maxHeight,c.height),i.height=Math.max(s.swimlaneMinHeight,i.maxHeight)+2*s.swimlanePadding;const x={x:m,y:s.swimlanePadding+i.y,r:u,dimension:c,leftSibling:!1,swimlane:i,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},p={...e,boxes:[...e.boxes,x],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:a.index,previousFrame:t.frame,maxR:f},g=S(p.swimlanes);g.length>0&&(g[0].y=0);for(let v=1;v<g.length;v++){const F=g[v],te=g[v-1];F.y=te.y+te.height+s.swimlaneGap}return p}d(G,"evolveFramePositioned");o(G,"evolveFramePositioned");function V(e,n){return e===0&&n.sourceFrames.length===0}d(V,"isFirstFrame");o(V,"isFirstFrame");function X(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}d(X,"hasSourceFrame");o(X,"hasSourceFrame");function y(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}d(y,"findBoxByFrame");o(y,"findBoxByFrame");function j(e,n,t){if(!(t<0))for(let a=t;a>=0;a--){const i=e[a];if(i.swimlane.index!==n)return i}}d(j,"findBoxByLineIndex");o(j,"findBoxByLineIndex");function Y(e,n){const t=n;if(de(t.frame)||V(t.index,t.frame))return[];const a=y(e.boxes,t.frame);if(a===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let i;return t.sourceFrame?i=y(e.boxes,t.sourceFrame):i=j(e.boxes,a.swimlane.index,t.index-1),i===void 0?[]:[{$kind:re,frame:t.frame,index:t.index,sourceBox:i,targetBox:a}]}d(Y,"decidePositionRelation");o(Y,"decidePositionRelation");function K(e,n){const t=n,a={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,a]}}d(K,"evolveRelationPositioned");o(K,"evolveRelationPositioned");var ke={[ae]:U,[k]:Y},Ee={[ie]:G,[re]:K};function z(e,n){const t=ke[n.$kind];if(t==null)return[];const a=t(e,n);return h.debug("decided events",a),a}d(z,"decide");o(z,"decide");function q(e,n){const t=n.reduce((a,i)=>{const r=Ee[i.$kind];return r==null?a:r(a,i)},e);return h.debug("evolve events",{state:e,newState:t,events:n}),t}d(q,"evolve");o(q,"evolve");function w(e,n){const t=z(e,n);return q(e,t)}d(w,"dispatch");o(w,"dispatch");var E={getConfig:Be,setOptions:ye,getOptions:Pe,clear:Se,setAccTitle:fe,getAccTitle:xe,getAccDescription:ue,setAccDescription:me,setDiagramTitle:ce,getDiagramTitle:le,setAst:T,getDiagramProps:P,getState:N},Ae={parse:o(async e=>{const n=await se("eventmodeling",e);h.debug(n),E.setAst(n),oe(n,E)},"parse")},Re=ne(),De=Re?.eventmodeling;function J(e,n){return t=>{const a=t.swimlane.y+n.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",t.x).attr("y",a).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),i.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",a+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}d(J,"renderD3Box");o(J,"renderD3Box");function Q(e,n){return e>n}d(Q,"dirUpwards");o(Q,"dirUpwards");function Z(e,n,t,a){return i=>{const r=i.sourceBox.swimlane.y+n.swimlanePadding,l=i.targetBox.swimlane.y+n.swimlanePadding,c=Q(r,l),m=i.sourceBox.x+i.sourceBox.dimension.width*2/3,u=i.targetBox.x+i.targetBox.dimension.width/3;let f,x;h.debug(`rendering relation up=${c} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),c?(f=r,x=l+i.targetBox.dimension.height):(f=r+i.sourceBox.dimension.height,x=l);const p=a.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${m} ${f} L${u} ${x}`)}}d(Z,"renderD3Relation");o(Z,"renderD3Relation");function ee(e,n,t,a){return i=>{const r=e.append("g").attr("class","em-swimlane"),l=a.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=a.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",i.height).attr("fill",l).attr("stroke",c),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}d(ee,"renderD3Swimlane");o(ee,"renderD3Swimlane");var Ne=o(function(e,n,t,a){if(h.debug("in eventmodeling renderer",e+`
3
- `,"id:",n,t),!De)throw new Error("EventModeling config not found");const i=a.db,{themeVariables:r,eventmodeling:l}=ne(),c=we(`[id="${n}"]`),m=i.getDiagramProps(),u=i.getState(),f=`em-arrowhead-${n}`,x=r.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(ee(c,u.maxR,m,r)),u.boxes.forEach(J(c,m)),u.relations.forEach(Z(c,m,f,r)),c.append("defs").append("marker").attr("id",f).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",x),ge(void 0,c,l?.padding??30,l?.useMaxWidth)},"draw"),Te={draw:Ne},$e=o(e=>"","getStyles"),Ce=$e,Ue={parser:Ae,db:E,renderer:Te,styles:Ce};export{Ue as diagram};
@@ -1 +0,0 @@
1
- import{s as r,a as s,c as e,C as t}from"./CSBhPNbN.js";import{f as l}from"./CxRm1vYn.js";var d={parser:e,get db(){return new t},renderer:s,styles:r,init:l(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute},"init")};export{d as diagram};
@@ -1,39 +0,0 @@
1
- import{p as tt}from"./BEhoKnQT.js";import{aK as et,c6 as at,aL as rt,c7 as it,aP as nt,c9 as ot,f as l,bC as E,aO as st,$ as lt,c4 as ct,bQ as dt,a6 as gt,a0 as ht,ax as pt}from"./CxRm1vYn.js";import{p as ft}from"./YqyEOqRv.js";import{d as I}from"./PXMyYXQv.js";import{o as ut}from"./CmKTTxBW.js";import{d as mt}from"./Dt53cexP.js";var vt=pt.pie,L={sections:new Map,showData:!1},b=L.sections,R=L.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,R=L.showData,ht()},"clear"),Ct=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),E.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),$t=l(()=>b,"getSections"),Dt=l(t=>{R=t},"setShowData"),yt=l(()=>R,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:ot,getDiagramTitle:nt,setAccTitle:it,getAccTitle:rt,setAccDescription:at,getAccDescription:et,addSection:Ct,getSections:$t,setShowData:Dt,getShowData:yt},bt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:l(async t=>{const a=await ft("pie",t);E.debug(a),bt(a,U)},"parse")},At=l(t=>`
2
- .pieCircle{
3
- stroke: ${t.pieStrokeColor};
4
- stroke-width : ${t.pieStrokeWidth};
5
- opacity : ${t.pieOpacity};
6
- }
7
- .pieCircle.highlighted{
8
- scale: 1.05;
9
- opacity: 1;
10
- }
11
- .pieCircle.highlightedOnHover:hover{
12
- transition-duration: 250ms;
13
- scale: 1.05;
14
- opacity: 1;
15
- }
16
- .pieOuterCircle{
17
- stroke: ${t.pieOuterStrokeColor};
18
- stroke-width: ${t.pieOuterStrokeWidth};
19
- fill: none;
20
- }
21
- .pieTitleText {
22
- text-anchor: middle;
23
- font-size: ${t.pieTitleTextSize};
24
- fill: ${t.pieTitleTextColor};
25
- font-family: ${t.fontFamily};
26
- }
27
- .slice {
28
- font-family: ${t.fontFamily};
29
- fill: ${t.pieSectionTextColor};
30
- font-size:${t.pieSectionTextSize};
31
- // fill: white;
32
- }
33
- .legend text {
34
- fill: ${t.pieLegendTextColor};
35
- font-family: ${t.fontFamily};
36
- font-size: ${t.pieLegendTextSize};
37
- }
38
- `,"getStyles"),kt=At,_t=l(t=>{const a=[...t.values()].reduce((o,m)=>o+m,0),O=[...t.entries()].map(([o,m])=>({label:o,value:m})).filter(o=>o.value/a*100>=1);return mt().value(o=>o.value).sort(null)(O)},"createPieArcs"),zt=l((t,a,O,P)=>{E.debug(`rendering pie chart
39
- `+t);const o=P.db,m=st(),p=lt(o.getConfig(),m.pie),W=40,i=18,c=4,C=450,S=C,T=ct(a),$=T.append("g");$.attr("transform","translate("+S/2+","+C/2+")");const{themeVariables:n}=m;let[F]=dt(n.pieOuterStrokeWidth);F??=2;const K=p.legendPosition,H=p.textPosition,Q=p.donutHole>0&&p.donutHole<=.9?p.donutHole:0,f=Math.min(S,C)/2-W,V=I().innerRadius(Q*f).outerRadius(f),X=I().innerRadius(f*H).outerRadius(f*H),x=$.append("g");x.append("circle").attr("cx",0).attr("cy",0).attr("r",f+F/2).attr("class","pieOuterCircle");const D=o.getSections(),Z=_t(D),j=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12];let A=0;D.forEach(e=>{A+=e});const M=Z.filter(e=>(e.data.value/A*100).toFixed(0)!=="0"),k=ut(j).domain([...D.keys()]);x.selectAll("mySlices").data(M).enter().append("path").attr("d",V).attr("fill",e=>k(e.data.label)).attr("class",e=>{let r="pieCircle";return p.highlightSlice==="hover"?r+=" highlightedOnHover":p.highlightSlice===e.data.label&&(r+=" highlighted"),r}),x.selectAll("mySlices").data(M).enter().append("text").text(e=>(e.data.value/A*100).toFixed(0)+"%").attr("transform",e=>"translate("+X.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const q=$.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),w=[...D.entries()].map(([e,r])=>({label:e,value:r})),u=$.selectAll(".legend").data(w).enter().append("g").attr("class","legend");u.append("rect").attr("width",i).attr("height",i).style("fill",e=>k(e.label)).style("stroke",e=>k(e.label)),u.append("text").attr("x",i+c).attr("y",i-c).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const v=Math.max(...u.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));let y=C,_=S+W;const s=i+c,z=w.length*s;switch(K){case"center":u.attr("transform",(e,r)=>{const d=s*w.length/2,g=-v/2-(i+c),h=r*s-d;return"translate("+g+","+h+")"});break;case"top":y+=z,u.attr("transform",(e,r)=>{const d=f,g=-v/2-(i+c),h=r*s-d;return`translate(${g}, ${h})`}),x.attr("transform",()=>`translate(0, ${z+s})`);break;case"bottom":y+=z,u.attr("transform",(e,r)=>{const d=-f-s,g=-v/2-(i+c),h=r*s-d;return"translate("+g+","+h+")"});break;case"left":_+=i+c+v,u.attr("transform",(e,r)=>{const d=s*w.length/2,g=-f-(i+c),h=r*s-d;return"translate("+g+","+h+")"}),x.attr("transform",()=>`translate(${v+i+c}, 0)`);break;case"right":default:_+=i+c+v,u.attr("transform",(e,r)=>{const d=s*w.length/2,g=12*i,h=r*s-d;return"translate("+g+","+h+")"});break}const G=q.node()?.getBoundingClientRect().width??0,J=S/2-G/2,Y=S/2+G/2,B=Math.min(0,J),N=Math.max(_,Y)-B;T.attr("viewBox",`${B} 0 ${N} ${y}`),gt(T,y,N,p.useMaxWidth)},"draw"),Et={draw:zt},Mt={parser:Tt,db:U,renderer:Et,styles:kt};export{Mt as diagram};