collabmd 0.1.52 → 0.1.55

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 (464) hide show
  1. package/bin/collabmd.js +22 -40
  2. package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-cMeDxAEL.js +1 -0
  3. package/dist/client/assets/{abnfDiagram-VCTEODGH-DxNxad6-.js → abnfDiagram-VCTEODGH-D2UdmYvj.js} +1 -1
  4. package/dist/client/assets/{abnfDiagram-O67JEVCF-Dwt6a0Ds.js → abnfDiagram-YUKMZFIV-DbmU4Q-X.js} +1 -1
  5. package/dist/client/assets/api-client-utils-C5ESDKMG.js +1 -0
  6. package/dist/client/assets/architecture-7GRP2DOG-BBwRXFv3.js +1 -1
  7. package/dist/client/assets/architecture-WOLXFQ4H-C0NxYiG7.js +1 -0
  8. package/dist/client/assets/{architectureDiagram-NJMV4G6O-D5CGiX3G.js → architectureDiagram-47P4ROYG-C7OjXK9S.js} +3 -3
  9. package/dist/client/assets/{architectureDiagram-5GKGNRK7-C1uvg5id.js → architectureDiagram-5GKGNRK7-CSiUzzeN.js} +1 -1
  10. package/dist/client/assets/base-CaIEJUF9.css +1 -0
  11. package/dist/client/assets/{blockDiagram-BEXU5L5S-BgTM0var.js → blockDiagram-E7TT5TSB-DMG-YlZw.js} +3 -3
  12. package/dist/client/assets/{blockDiagram-I7D4REHJ-B2YonsoG.js → blockDiagram-I7D4REHJ-sXfAgK2w.js} +1 -1
  13. package/dist/client/assets/{browser-BKLM0ThC-IxjwuOIz-C0mP17s1.js → browser-BKLM0ThC-BCLQGPD6-CcMAHZXi.js} +1 -1
  14. package/dist/client/assets/{c4Diagram-7LVT6UL2-r4IwomZm.js → c4Diagram-7LVT6UL2-C88V_K-8.js} +1 -1
  15. package/dist/client/assets/{c4Diagram-YGBWAQC7-_xZPrNkB.js → c4Diagram-CRA5TL53-D3F9ElJv.js} +2 -2
  16. package/dist/client/assets/canvasEditor-BJkwGzO1.css +1 -0
  17. package/dist/client/assets/canvasEditor-sBK7KfrD.js +1 -0
  18. package/dist/client/assets/{chunk-6AZGARVD--pTGpDnx.js → chunk-24IY7LWP-flnn6SWX.js} +1 -1
  19. package/dist/client/assets/chunk-2BW5OAIV-CNFO1U_e.js +10 -0
  20. package/dist/client/assets/{chunk-2E4U76K2-CIQUuV9n.js → chunk-2E4U76K2-DEnS5IbF.js} +1 -1
  21. package/dist/client/assets/{chunk-5V3GS4D5-B5uC2oxu.js → chunk-3M4EKCLJ-D-sZGCtO.js} +1 -1
  22. package/dist/client/assets/chunk-3YJQHVM4-Ctp__8EK.js +2 -0
  23. package/dist/client/assets/{chunk-7PRAP22T-9uTvtc_-.js → chunk-4EA7E6EY-bU4wRJot.js} +1 -1
  24. package/dist/client/assets/{chunk-4HAMMTFA-q0ldNVvr.js → chunk-4HAMMTFA-CQy6Skzw.js} +1 -1
  25. package/dist/client/assets/{chunk-6K3QC6MW-JnuvEGV4.js → chunk-4S7OKTRW-BpUW13a3.js} +1 -1
  26. package/dist/client/assets/{chunk-ICYGCRZG-odvlDZyA.js → chunk-53FOQ5SW-5lPdGYP4.js} +1 -1
  27. package/dist/client/assets/{chunk-75Z2AOVW-DitkSoSG.js → chunk-75Z2AOVW-BRdhvVTZ.js} +1 -1
  28. package/dist/client/assets/{chunk-GWA4HPMP-CGmv2yIq.js → chunk-7TKQ45FW-rA2u-WUl.js} +1 -1
  29. package/dist/client/assets/{chunk-GTNCS2PH-ChgkzEIi.js → chunk-AW2ZBBNX-DL0KGAdi.js} +3 -3
  30. package/dist/client/assets/{chunk-747NJXEK-BjqqAsS9.js → chunk-BP2KR52E-DAQ1pzDV.js} +1 -1
  31. package/dist/client/assets/{chunk-CLGD4ZFX-BfYJtJm1.js → chunk-CLGD4ZFX-DJiSE0gD.js} +1 -1
  32. package/dist/client/assets/{chunk-5DYCD2WN-BKWCKnK-.js → chunk-DBDB3WZW-CXleNlok.js} +1 -1
  33. package/dist/client/assets/{chunk-DU6HZSFF-CWlP1Dk_.js → chunk-DU6HZSFF-C-18UZkS.js} +1 -1
  34. package/dist/client/assets/{chunk-MBY4JIJT-DTJ4UcAm.js → chunk-E2ZNV5FY-D_07zfWd.js} +3 -3
  35. package/dist/client/assets/chunk-EU5HNXII-CETVNUXF.js +213 -0
  36. package/dist/client/assets/{chunk-F27PBJKO-DPcsPcEs.js → chunk-F27PBJKO-_beIJos4.js} +1 -1
  37. package/dist/client/assets/{chunk-2ZTRR5NV-DcPRfelM.js → chunk-F6S3BTY2-DVWKCAHp.js} +1 -1
  38. package/dist/client/assets/{chunk-RUX4WMZV-BGnd3s_C.js → chunk-FLFP27SU-CydzbSsY.js} +2 -2
  39. package/dist/client/assets/chunk-FVRAUYC3-C7b9SJ81.js +1 -0
  40. package/dist/client/assets/{chunk-GMAD6QVW-Bgk8qnty.js → chunk-GMAD6QVW-DnZH7DxV.js} +1 -1
  41. package/dist/client/assets/{chunk-GVQU2GXP-CQ8cl-Uu.js → chunk-GVQU2GXP-B0Vm415C.js} +1 -1
  42. package/dist/client/assets/chunk-H5A3YXKD-ChP7mNJq.js +41 -0
  43. package/dist/client/assets/{chunk-742MDFTN-D1nh6vNv.js → chunk-HJ2JQQFS-DQX7RePR.js} +1 -1
  44. package/dist/client/assets/{chunk-NETBCI7D-CmUwDWUZ.js → chunk-HTAEGDNF-C0PA_N-c.js} +1 -1
  45. package/dist/client/assets/{chunk-IMKFNOWR-CBqxfpcP.js → chunk-IMKFNOWR-DoO8IHzF.js} +1 -1
  46. package/dist/client/assets/{chunk-IH6LHLGP-BNevEHZK.js → chunk-KPI5JJXK-B2ld5-w4.js} +1 -1
  47. package/dist/client/assets/{chunk-WEXAMYUT-DDlVNp8J.js → chunk-KQW6MTUR-OQ4MyMr_.js} +1 -1
  48. package/dist/client/assets/{chunk-L3NEJ4N5-BflzkdTI.js → chunk-L3NEJ4N5-CvHossEU.js} +1 -1
  49. package/dist/client/assets/chunk-NGNAAXSQ-DqoPQk1a.js +136 -0
  50. package/dist/client/assets/{chunk-UA2S7LBM-DicYDjDM.js → chunk-NTY3LDVX-CVWLK_fh.js} +1 -1
  51. package/dist/client/assets/{chunk-UY3FDG6J-QT-rkt0y.js → chunk-OD3NTWWA-Dz9nCUGX.js} +1 -1
  52. package/dist/client/assets/{chunk-OSK3NFVY-DqeKV_pg.js → chunk-OSK3NFVY-C3JOcBao.js} +1 -1
  53. package/dist/client/assets/{chunk-P2QGCYS3-BA--DhpW.js → chunk-P2QGCYS3-Bfo8qS8r.js} +1 -1
  54. package/dist/client/assets/{chunk-POPQ4Y6H-V_NEc45n.js → chunk-POPQ4Y6H-sv6rCftH.js} +1 -1
  55. package/dist/client/assets/{chunk-PWAF6VOD-D_kLse-N.js → chunk-PWAF6VOD-B-AT-L2H.js} +1 -1
  56. package/dist/client/assets/{chunk-3Z5EZCMW-BAnA6eQ7.js → chunk-QNH66VMT-Cb9xxTwQ.js} +1 -1
  57. package/dist/client/assets/{chunk-SHT3W25Y-YM3S-A_M.js → chunk-SHT3W25Y-C1lu518T.js} +1 -1
  58. package/dist/client/assets/{chunk-GNY47TPC-CTrH5O5R.js → chunk-SVEVUXB4-BnM-LXop.js} +1 -1
  59. package/dist/client/assets/{chunk-SVP7TREG-DdNhDOmW.js → chunk-SVP7TREG-CKqt0syj.js} +1 -1
  60. package/dist/client/assets/{chunk-TICWLB2K-BGGgCr4x.js → chunk-TICWLB2K-D2ZnWAfF.js} +1 -1
  61. package/dist/client/assets/{chunk-TLUHSLCS-DCZhIDYA.js → chunk-TLUHSLCS-BMIhqv1X.js} +1 -1
  62. package/dist/client/assets/{chunk-6EIED4P4-DBVWq7Tz.js → chunk-TPMEZKFX-DIPHIqGb.js} +1 -1
  63. package/dist/client/assets/{chunk-6TQVIW2G-BSj0l_pu.js → chunk-VPELOWWC-DXayM28-.js} +1 -1
  64. package/dist/client/assets/chunk-VPRB5NB3-BqaJfj_v.js +127 -0
  65. package/dist/client/assets/{chunk-I5DQTOEV-aBZooNp1.js → chunk-VTWWFHGB-SZnJiyWY.js} +1 -1
  66. package/dist/client/assets/{chunk-KI3K4JFJ-FTtDwx3-.js → chunk-VZTHESGH-eHyXmK8W.js} +1 -1
  67. package/dist/client/assets/{chunk-7INBJB4K-CDmiHbaX.js → chunk-XC4XBNZT-D9oehSn8.js} +20 -20
  68. package/dist/client/assets/{chunk-XHIXRSVI-DN_fEwws.js → chunk-YK26KJH5-DVy3MGMd.js} +1 -1
  69. package/dist/client/assets/{chunk-6AEJRKK7-DTVZj5bY.js → chunk-Z6ETV63D-DOcrnz-P.js} +1 -1
  70. package/dist/client/assets/{chunk-OUJLGHUK-75UXlPjl.js → chunk-ZO67DCNQ-BAOMIkLF.js} +1 -1
  71. package/dist/client/assets/classDiagram-ZZMXUADV-BmETdFmC.js +1 -0
  72. package/dist/client/assets/{classDiagram-v2-NBCMYWYE-3TQORq33.js → classDiagram-v2-K4WV4PDN-eaadfJDB.js} +3 -3
  73. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BmETdFmC.js +1 -0
  74. package/dist/client/assets/{comment-markdown-renderer-Bxi_JRSR.js → comment-markdown-renderer-CpBKaj7H.js} +1 -1
  75. package/dist/client/assets/comment-thread-store-DUQsWtnu.js +1 -0
  76. package/dist/client/assets/comment-threads-DnfkLVJA.js +4 -0
  77. package/dist/client/assets/comment-ui-shared-D_pgPUti.js +7 -0
  78. package/dist/client/assets/cynefin-EF2NZ3EQ-DVkJeZ8i.js +1 -0
  79. package/dist/client/assets/cynefin-OW5HDTMX-CF3N9j1_.js +1 -1
  80. package/dist/client/assets/{cynefinDiagram-VND7K2PF-DwfMZ3vk.js → cynefinDiagram-3GCD6N5R-DjpAsBHC.js} +1 -1
  81. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-DTnLZaO7.js → cynefinDiagram-5FMLGOSQ-D2rFQG67.js} +1 -1
  82. package/dist/client/assets/dagre-C-rnJpZF.js +1 -0
  83. package/dist/client/assets/{dagre-GXQ25YYZ-Vtyx08Qh.js → dagre-GXQ25YYZ-Cku9eia9.js} +2 -2
  84. package/dist/client/assets/{dagre-6A5THRUB-DewyAGK6.js → dagre-W4DXFKR2-DOMOIsPd.js} +2 -2
  85. package/dist/client/assets/deferred-collab-C9aa9cvT.css +1 -0
  86. package/dist/client/assets/deferred-git-BPQ-UgrN.css +1 -0
  87. package/dist/client/assets/deferred-preview-B-RebLry.css +1 -0
  88. package/dist/client/assets/{diagram-22UHCM2B-DbZirFfl.js → diagram-2UJZ2QOL-D8WvnEyx.js} +6 -6
  89. package/dist/client/assets/{diagram-3UASUU5V-DmhdYv6_.js → diagram-OVF4WLC6-D8_escYE.js} +2 -2
  90. package/dist/client/assets/{diagram-CDSNMT55-D_qyS11R.js → diagram-PFPMY2P6-B1izZfrN.js} +3 -3
  91. package/dist/client/assets/{diagram-S7CK7UJ4-CGTzfo2f.js → diagram-S7CK7UJ4-BzicH2t-.js} +1 -1
  92. package/dist/client/assets/{diagram-MLGK6HIB-DIBG6Ivu.js → diagram-UMYRVEAY-Djf7WDjZ.js} +1 -1
  93. package/dist/client/assets/{diagram-UQ7AKVKN-CWZS8QtB.js → diagram-UQ7AKVKN-DqX4zTtr.js} +1 -1
  94. package/dist/client/assets/{diagram-VSXAHHWV-DaO1nOZF.js → diagram-VSXAHHWV-DnVbfI4Y.js} +1 -1
  95. package/dist/client/assets/{diagram-VX7I27RA-B54P6Cyf.js → diagram-VX7I27RA-D-Dj0TQC.js} +1 -1
  96. package/dist/client/assets/{diagram-MPIPVDR6-D9XsALDV.js → diagram-YEKJPTXX-B40bP3Yr.js} +2 -2
  97. package/dist/client/assets/{diagram-Z3DM3KII-Cl2EXiXp.js → diagram-Z3DM3KII-_iT7Uz5p.js} +1 -1
  98. package/dist/client/assets/diagram-ZIFT7M5P-BUUK0oNw.js +3 -0
  99. package/dist/client/assets/{direct-engine-DdrQKpgq-4QysbH_V.js → direct-engine-DVLMOJWp-DWtWIifK.js} +1 -1
  100. package/dist/client/assets/dist-26Ce-5t4.js +1 -0
  101. package/dist/client/assets/dist-8MLNn-I6.js +1 -0
  102. package/dist/client/assets/dist-Amm5Pr1C.js +1 -0
  103. package/dist/client/assets/dist-BXXPaoUV.js +1 -0
  104. package/dist/client/assets/{dist-zHDLm1oE.js → dist-Bkb-_VdB.js} +1 -1
  105. package/dist/client/assets/dist-Bl4yuUS9.js +1 -0
  106. package/dist/client/assets/{dist-CKf7LlAo.js → dist-C2CGvCPd.js} +1 -1
  107. package/dist/client/assets/dist-C2niyEh0.js +1 -0
  108. package/dist/client/assets/{dist-Y6zYRI-A.js → dist-CFCSUmJk.js} +1 -1
  109. package/dist/client/assets/dist-CHUI56fT.js +6 -0
  110. package/dist/client/assets/dist-CJh3Qrid.js +13 -0
  111. package/dist/client/assets/{dist-Ch6Sr9KF.js → dist-CKxETpSC.js} +3 -3
  112. package/dist/client/assets/dist-CSHJthAI.js +2 -0
  113. package/dist/client/assets/dist-CbKnZGN4.js +1 -0
  114. package/dist/client/assets/{dist-BVCNc-Es.js → dist-Cik4RJXj.js} +1 -1
  115. package/dist/client/assets/{dist-DGa-2MNX.js → dist-CqkAY6Ot.js} +2 -2
  116. package/dist/client/assets/dist-D2ql2LCd.js +1 -0
  117. package/dist/client/assets/{dist-CvVoyTRF.js → dist-D47MOYFN.js} +1 -1
  118. package/dist/client/assets/dist-DBhUaexM.js +1 -0
  119. package/dist/client/assets/dist-DJux6Vc5.js +1 -0
  120. package/dist/client/assets/{dist-CXOUa90Q.js → dist-DLNdMWPH.js} +1 -1
  121. package/dist/client/assets/dist-DPJj-Y3l.js +1 -0
  122. package/dist/client/assets/{dist-DI6c02Da.js → dist-DRYFMufe.js} +6 -6
  123. package/dist/client/assets/{dist-CUsXdnU4.js → dist-DTGcVSU8.js} +1 -1
  124. package/dist/client/assets/dist-DlOxjzWi.js +9 -0
  125. package/dist/client/assets/{dist-BfpAc922.js → dist-DogjjM_B.js} +1 -1
  126. package/dist/client/assets/dist-Dyv_RvyB.js +23 -0
  127. package/dist/client/assets/dist-FUFeH5Cx.js +1 -0
  128. package/dist/client/assets/dist-It70ktCU.js +1 -0
  129. package/dist/client/assets/dist-QMvcnJHf.js +1 -0
  130. package/dist/client/assets/dist-QN1K2czv.js +11 -0
  131. package/dist/client/assets/dist-W8ilOKl3.js +1 -0
  132. package/dist/client/assets/dist-_17-t9qP.js +1 -0
  133. package/dist/client/assets/{dist-CsQTfQFi.js → dist-uE774WWs.js} +1 -1
  134. package/dist/client/assets/document-formatter-DtXmKZcy.js +1 -0
  135. package/dist/client/assets/drawioEditor-DO6IOaJ1.js +9 -0
  136. package/dist/client/assets/{ebnfDiagram-PWID7BFC-PfC84FyI.js → ebnfDiagram-PWID7BFC-IemGPf9X.js} +1 -1
  137. package/dist/client/assets/{ebnfDiagram-ZINNZB2B-DYvm_QtE.js → ebnfDiagram-VR2GEFS7-9fXqy1DI.js} +1 -1
  138. package/dist/client/assets/editor-session-CPsqXY_A.js +13 -0
  139. package/dist/client/assets/elk-IJKZMXRS-DsbrbBYg.js +27 -0
  140. package/dist/client/assets/embedded-editor-base-C44ZcCZv.css +1 -0
  141. package/dist/client/assets/{embedpdf-DyOonRvx.js → embedpdf-BfUI-3pv.js} +1 -1
  142. package/dist/client/assets/{embedpdf-DA4bA119-DsoNiPlQ.js → embedpdf-cl9qiF45-CLMxJTMP.js} +3 -3
  143. package/dist/client/assets/en-7ZVUCEYH-C_VXKxxb.js +1 -0
  144. package/dist/client/assets/{erDiagram-OPXOYQCR-o8GRv8A_.js → erDiagram-O2IAPWRE-Cdadm-HN.js} +2 -2
  145. package/dist/client/assets/{erDiagram-RLTQ6QDP-C9cJl5NB.js → erDiagram-RLTQ6QDP-CGGmjm8t.js} +1 -1
  146. package/dist/client/assets/{estree-DCT3Jm65.js → estree-DGmLqopC.js} +17 -17
  147. package/dist/client/assets/eventmodeling-K75KTNOO-BWBlZ5cR.js +1 -0
  148. package/dist/client/assets/eventmodeling-NTZA5JFV-CDy1bN6j.js +1 -1
  149. package/dist/client/assets/excalidraw-element-link-NQnskRkm.js +1 -0
  150. package/dist/client/assets/excalidraw-scene-DLlw4jyc.js +1 -0
  151. package/dist/client/assets/excalidrawEditor-DiKOIudt.css +1 -0
  152. package/dist/client/assets/excalidrawEditor-W2lZ5Mej.js +9 -0
  153. package/dist/client/assets/export-page-Bomh9oEr.js +46 -0
  154. package/dist/client/assets/exportDocument-BFIOECJ3.js +2 -0
  155. package/dist/client/assets/exportDocument-D0mONgQ4.css +1 -0
  156. package/dist/client/assets/file-kind-BGxTVHan.js +1 -0
  157. package/dist/client/assets/{file-search-3hYF4cYa.js → file-search-Dk2O14Vw.js} +1 -1
  158. package/dist/client/assets/flowDiagram-HODETNUW-DcVVYJUZ.js +1 -0
  159. package/dist/client/assets/flowDiagram-OXPTDLAJ-Dy6y46oF.js +1 -0
  160. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-x40PW0Ah.js → ganttDiagram-EL5Y4UJY-Duu4KnsU.js} +1 -1
  161. package/dist/client/assets/ganttDiagram-R7TSEDQI-BWy52pjn.js +292 -0
  162. package/dist/client/assets/gitGraph-4MIJSDKK-B-rpDYbz.js +1 -1
  163. package/dist/client/assets/gitGraph-VSP46ZUC-1499lQAI.js +1 -0
  164. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-ahsNaZsp.js → gitGraphDiagram-WWUBYQGX-CaJ0vC1a.js} +1 -1
  165. package/dist/client/assets/gitGraphDiagram-XJZIOB7I-DJwp9ilx.js +106 -0
  166. package/dist/client/assets/graphlib-DS17s2tU.js +1 -0
  167. package/dist/client/assets/{html-CBXMuS97.js → html-BryNQ_yx.js} +6 -6
  168. package/dist/client/assets/image-6XY3GD3F-DCWbu6d4.js +1 -0
  169. package/dist/client/assets/image-lightbox-controller-DAcXEXxT.js +184 -0
  170. package/dist/client/assets/index-CglpXOg7.css +1 -0
  171. package/dist/client/assets/index-D3WGkxfI.js +960 -0
  172. package/dist/client/assets/info-A6RAGUB7-BlutK7BT.js +1 -1
  173. package/dist/client/assets/info-OHQRW6UA-BDFQOo4H.js +1 -0
  174. package/dist/client/assets/{infoDiagram-27XIBGKW-MrZyptIy.js → infoDiagram-27XIBGKW-DBJh7QOu.js} +1 -1
  175. package/dist/client/assets/{infoDiagram-VRGFBTTK-KkUjDRAQ.js → infoDiagram-5W2HQ5XZ-DmWsqJ0w.js} +1 -1
  176. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-Bnt9yM0O.js → ishikawaDiagram-5VMMS53U-CeEbSJem.js} +1 -1
  177. package/dist/client/assets/{ishikawaDiagram-OU5B5YK6-Di9BcpOY.js → ishikawaDiagram-K3B6WC7H-DH1NI35G.js} +2 -2
  178. package/dist/client/assets/{journeyDiagram-3NMN7TZE-Bl0abK1r.js → journeyDiagram-3NMN7TZE-BoIEEr6U.js} +1 -1
  179. package/dist/client/assets/{journeyDiagram-ZHPQQLJL-J-sGrs9e.js → journeyDiagram-COXZFDF6-CnHV2f9V.js} +3 -3
  180. package/dist/client/assets/{kanban-definition-PNTS6WVX-5ZDV_yIa.js → kanban-definition-P3RFRI5V-Cxvn5ZAG.js} +4 -4
  181. package/dist/client/assets/{kanban-definition-UXKFOSKX-DMgUfNt0.js → kanban-definition-UXKFOSKX-BY16Tgbr.js} +1 -1
  182. package/dist/client/assets/keyboard-shortcuts-BWNCBJqw.js +1 -0
  183. package/dist/client/assets/lobby-presence-DNNXcuwR.js +1 -0
  184. package/dist/client/assets/{markdown-Bo71X2X2.js → markdown-DU84620G.js} +17 -17
  185. package/dist/client/assets/markdown-headings-zYEUahfW.js +41 -0
  186. package/dist/client/assets/{markdown-math-CyyBVuDO.js → markdown-math-B96cnrz1.js} +11 -11
  187. package/dist/client/assets/{mermaid-parser.core-Bpogunsh.js → mermaid-parser.core-R-uwU5kf.js} +3 -3
  188. package/dist/client/assets/{mermaid-parser.core-DBy--Jc0.js → mermaid-parser.core-mE6t1qEO.js} +1 -1
  189. package/dist/client/assets/mermaid.core-D8Z6LN7O.js +10 -0
  190. package/dist/client/assets/{mindmap-definition-NLK3R4M7-ByVb-0vj.js → mindmap-definition-LZFPQGKD-DVfFenfJ.js} +3 -3
  191. package/dist/client/assets/{mindmap-definition-YA3MSWOX-DBZN5_GH.js → mindmap-definition-YA3MSWOX-DtiE80UJ.js} +1 -1
  192. package/dist/client/assets/packet-AYTQ26CC-DvbY8dI6.js +1 -1
  193. package/dist/client/assets/packet-JDAUHWVQ-DJ9K2MA4.js +1 -0
  194. package/dist/client/assets/{pdfium-RAgkpwfK.wasm → pdfium-BJ2Yip8Q.wasm} +0 -0
  195. package/dist/client/assets/{pegDiagram-GJSIUBJH-aost1sSO.js → pegDiagram-BGZESJAR-DxfvEcwv.js} +1 -1
  196. package/dist/client/assets/{pegDiagram-XKGWAZYB-DRo8CZu3.js → pegDiagram-XKGWAZYB-CyozY-Kt.js} +1 -1
  197. package/dist/client/assets/pie-WAS4IAKB-DWSm9SSD.js +1 -1
  198. package/dist/client/assets/pie-XZMESJXO-CQIQasY-.js +1 -0
  199. package/dist/client/assets/{pieDiagram-5QR66LMP-BICdpEuz.js → pieDiagram-CAPJLFHJ-CRlMcrv3.js} +2 -2
  200. package/dist/client/assets/{pieDiagram-E7YTZNPT-CZThaHsc.js → pieDiagram-E7YTZNPT-BRdmTkDq.js} +1 -1
  201. package/dist/client/assets/preload-helper-CYtfOYgs.js +1 -0
  202. package/dist/client/assets/preview-render-compiler-D_aJv7Ew.js +3 -0
  203. package/dist/client/assets/{preview-render-worker-BI2bFVqM.js → preview-render-worker-dFNyrVyB.js} +47 -43
  204. package/dist/client/assets/prod-ItolaHmf.js +145 -0
  205. package/dist/client/assets/prod-rdly4JJQ.js +1 -0
  206. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-C5iowkl_.js → quadrantDiagram-AXDQQJYC-7QyPIXkF.js} +1 -1
  207. package/dist/client/assets/{quadrantDiagram-O4NWA36T-Bgx5bF97.js → quadrantDiagram-GDMTTRAM-DE30uqTl.js} +3 -3
  208. package/dist/client/assets/quick-switcher-controller-DsK70I7K.js +1 -0
  209. package/dist/client/assets/radar-ABXABTNO-ByfpCXh9.js +1 -0
  210. package/dist/client/assets/radar-RG4KPBEZ-BfNQUEQy.js +1 -1
  211. package/dist/client/assets/railroad-74A4TZTK-BaQ6U6eJ.js +1 -1
  212. package/dist/client/assets/railroad-I3PHUGI6-CTUn9HhI.js +1 -0
  213. package/dist/client/assets/railroad-abnf-HS5TGJTU-BJ3KZw7J.js +1 -1
  214. package/dist/client/assets/railroad-abnf-LNEFI6M7-Ct-b-y0F.js +1 -0
  215. package/dist/client/assets/railroad-ebnf-DWYD2UWJ-BZMYMWOe.js +1 -0
  216. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DA0sEq7w.js +1 -1
  217. package/dist/client/assets/railroad-peg-JR7BVNR7-Dj23PxYc.js +1 -0
  218. package/dist/client/assets/railroad-peg-WCYAUIDC-DCmlICzO.js +1 -1
  219. package/dist/client/assets/{railroadDiagram-O6MQD6OU-BTt_rKjT.js → railroadDiagram-O6MQD6OU-BPk3RS2D.js} +1 -1
  220. package/dist/client/assets/{railroadDiagram-XR7U4H2S-DbVoNgSz.js → railroadDiagram-SM67HX2B-CZRXJ647.js} +1 -1
  221. package/dist/client/assets/{requirementDiagram-BXWQKSXE-BkvazG7r.js → requirementDiagram-BXWQKSXE-BRwfym6z.js} +1 -1
  222. package/dist/client/assets/{requirementDiagram-PLB6GJNP-BT0j9C40.js → requirementDiagram-X7JNWC4A-BofCuLJA.js} +4 -4
  223. package/dist/client/assets/runtime-config-CvrkHb0n.js +1 -0
  224. package/dist/client/assets/runtime-paths-qQGhzNx4.js +1 -0
  225. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-C_IemB9h.js → sankeyDiagram-P5KCCOFB-D4LcrKpW.js} +1 -1
  226. package/dist/client/assets/{sankeyDiagram-IPEJSGJF-X1BCUIrf.js → sankeyDiagram-UM26HJRW-CLKMDbej.js} +3 -3
  227. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-CxFBgLGd.js → sequenceDiagram-WJ2MYXX4-DQjtv-Bs.js} +1 -1
  228. package/dist/client/assets/sequenceDiagram-ZO4K6R2Y-CDP_m6ma.js +169 -0
  229. package/dist/client/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
  230. package/dist/client/assets/sizeCapture-INFHLROL-BMR1ovSU.js +1 -0
  231. package/dist/client/assets/src-D5mvpivG.js +2 -0
  232. package/dist/client/assets/{standalone-6z5x8CWe.js → standalone-D_lg5NC9.js} +1 -1
  233. package/dist/client/assets/{stateDiagram-D77RDMKH-BaSQ6Owj.js → stateDiagram-D77RDMKH-DSMvV-kF.js} +1 -1
  234. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-ClmOOUsT.js +1 -0
  235. package/dist/client/assets/{stateDiagram-v2-GCMORJYK-CsVcfwVp.js → stateDiagram-v2-TBUQTH76-Dc5-FKzd.js} +2 -2
  236. package/dist/client/assets/{swimlanes-42K2YHIH-CALFEmiS.js → swimlanes-42K2YHIH-BUz31lO3.js} +1 -1
  237. package/dist/client/assets/{swimlanes-2SLR337P-CnYTVqRX.js → swimlanes-N4OXWK64-Dd3dFdPD.js} +1 -1
  238. package/dist/client/assets/swimlanesDiagram-K3J5GTZL-Bz9gFdls.js +8 -0
  239. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DoDs3zod.js +8 -0
  240. package/dist/client/assets/{timeline-definition-24CTP7MA-zse-5Dbm.js → timeline-definition-24CTP7MA-BvqCvSjy.js} +1 -1
  241. package/dist/client/assets/{timeline-definition-EJHVYXUP-BhqPlKkN.js → timeline-definition-YOQAKGHF-D2XWPSLs.js} +3 -3
  242. package/dist/client/assets/treeView-D4JQ5SDB-DcX7Bx0H.js +1 -0
  243. package/dist/client/assets/treeView-Q6P3EWNA-BvHOzbu9.js +1 -1
  244. package/dist/client/assets/treemap-SAJKECNS-BcCHmcAX.js +1 -0
  245. package/dist/client/assets/treemap-WGGIJYW6-oety7paS.js +1 -1
  246. package/dist/client/assets/usecaseDiagram-VIAY4XPW-CDe-IMjS.js +328 -0
  247. package/dist/client/assets/vault-api-client-DrRW0QwO.js +7 -0
  248. package/dist/client/assets/{vennDiagram-4TSXK5OY-DgHr6cJD.js → vennDiagram-4TSXK5OY-BW6Qp12d.js} +1 -1
  249. package/dist/client/assets/{vennDiagram-UO4OBE2U-BRwLn2Q1.js → vennDiagram-BLWOH2XV-KxIPKpHi.js} +3 -3
  250. package/dist/client/assets/wardley-7MLQ67FV-DOahSwbZ.js +1 -0
  251. package/dist/client/assets/wardley-WFR3VGLG-BdwDpX_I.js +1 -1
  252. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-9A60XZis.js → wardleyDiagram-VM6X3IG4-BoCETVsK.js} +1 -1
  253. package/dist/client/assets/{wardleyDiagram-VNRHLVJA-B_tMcVFG.js → wardleyDiagram-YMQ3BMBF-BNYqEy7M.js} +4 -4
  254. package/dist/client/assets/{wiki-link-resolver-Dch88erO.js → wiki-link-resolver-BCdGUpdu.js} +1 -1
  255. package/dist/client/assets/{worker-engine-m0rlHn8R-5h66k403.js → worker-engine-BCCrxWYm-1fphds7O.js} +1 -1
  256. package/dist/client/assets/workspace-sync-client-C_P9wtjf.js +1 -0
  257. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-D00iy-wB.js → xychartDiagram-S5SC5T6Z-eB5Fu9P7.js} +1 -1
  258. package/dist/client/assets/xychartDiagram-TAQBALBS-Sv6aaptV.js +7 -0
  259. package/dist/client/assets/yjs-Jd9fna_Y.js +4 -0
  260. package/dist/client/assets/yjs-provider-reset-guard-Cqu0Z6xH.js +1 -0
  261. package/dist/client/canvas-editor.html +16 -0
  262. package/dist/client/drawio-editor.html +9 -8
  263. package/dist/client/excalidraw-editor.html +33 -32
  264. package/dist/client/export-document.html +4 -3
  265. package/dist/client/index.html +13 -2
  266. package/package.json +31 -33
  267. package/scripts/local-compose.mjs +101 -0
  268. package/src/client/app/canvas-editor.html +13 -0
  269. package/src/client/app/index.html +11 -0
  270. package/src/client/app/main-entry.js +30 -4
  271. package/src/client/application/app-shell/git-feature.js +3 -2
  272. package/src/client/application/app-shell/ui-feature-identity.js +1 -0
  273. package/src/client/application/app-shell/ui-feature-shell.js +2 -0
  274. package/src/client/application/app-shell/ui-feature-tab-activity.js +4 -0
  275. package/src/client/application/app-shell/workspace-feature.js +8 -34
  276. package/src/client/application/diagram-chrome.js +8 -11
  277. package/src/client/application/diagram-preview-hydrator.js +5 -5
  278. package/src/client/application/mermaid-preview-hydrator.js +3 -2
  279. package/src/client/application/plantuml-preview-hydrator.js +6 -0
  280. package/src/client/application/preview-render-compiler.js +34 -98
  281. package/src/client/application/preview-render-executor.js +3 -0
  282. package/src/client/application/preview-render-worker.js +2 -0
  283. package/src/client/application/preview-renderer.js +9 -5
  284. package/src/client/application/workspace-coordinator.js +18 -10
  285. package/src/client/application/workspace-preview-controller.js +105 -158
  286. package/src/client/application/workspace-route-controller.js +29 -54
  287. package/src/client/bootstrap/canvas-markdown-preview.js +87 -0
  288. package/src/client/bootstrap/collabmd-app-shell.js +31 -14
  289. package/src/client/browser-utils.js +21 -0
  290. package/src/client/canvas-editor.js +143 -0
  291. package/src/client/domain/canvas-view.js +50 -0
  292. package/src/client/domain/excalidraw-scene.js +4 -49
  293. package/src/client/domain/file-search.js +1 -1
  294. package/src/client/domain/highlight-runtime.js +0 -4
  295. package/src/client/domain/markdown-formatting.js +12 -94
  296. package/src/client/domain/markdown-headings.js +98 -0
  297. package/src/client/domain/runtime-paths.js +4 -0
  298. package/src/client/domain/wiki-link-completions.js +42 -10
  299. package/src/client/infrastructure/browser-preferences-port.js +27 -33
  300. package/src/client/infrastructure/canvas-room-client.js +210 -0
  301. package/src/client/infrastructure/canvas-text-editor.js +36 -0
  302. package/src/client/infrastructure/comment-thread-store.js +19 -77
  303. package/src/client/infrastructure/editor-view-adapter.js +0 -30
  304. package/src/client/infrastructure/excalidraw-room-client.js +22 -10
  305. package/src/client/infrastructure/hosted-api-client.js +4 -2
  306. package/src/client/infrastructure/runtime-config.js +14 -0
  307. package/src/client/infrastructure/vault-api-client.js +4 -4
  308. package/src/client/presentation/canvas-editor-view.js +1028 -0
  309. package/src/client/presentation/canvas-embed-controller.js +116 -0
  310. package/src/client/presentation/canvas-picker.js +111 -0
  311. package/src/client/presentation/drawio-embed-controller.js +4 -4
  312. package/src/client/presentation/excalidraw-embed-controller.js +13 -4
  313. package/src/client/presentation/file-action-controller.js +58 -1
  314. package/src/client/presentation/file-explorer-controller.js +1 -2
  315. package/src/client/presentation/file-explorer-view.js +31 -7
  316. package/src/client/presentation/file-icon-svg.js +1 -1
  317. package/src/client/presentation/file-tree-state.js +4 -1
  318. package/src/client/presentation/image-lightbox-controller.js +1 -5
  319. package/src/client/presentation/team-settings-controller.js +44 -10
  320. package/src/client/presentation/vault-dashboard.js +63 -0
  321. package/src/client/styles/components/actions.css +4 -16
  322. package/src/client/styles/components/surfaces.css +0 -7
  323. package/src/client/styles/features/comment-card.css +1 -2
  324. package/src/client/styles/features/comment-markdown.css +0 -18
  325. package/src/client/styles/features/diagram-preview.css +0 -18
  326. package/src/client/styles/features/git-branch.css +0 -4
  327. package/src/client/styles/foundation/themes.css +6 -0
  328. package/src/client/styles/foundation/utilities.css +3 -2
  329. package/src/client/styles/layout/editor-page.css +0 -13
  330. package/src/client/styles/layout/overlays.css +5 -0
  331. package/src/client/styles/layout/responsive.css +2 -7
  332. package/src/client/styles/layout/shell.css +165 -1
  333. package/src/client/styles/layout/view-modes.css +1 -0
  334. package/src/client/styles/surfaces/canvas-editor.css +239 -0
  335. package/src/domain/canvas-room-codec.js +359 -0
  336. package/src/domain/collabmd-content-capabilities.js +10 -1
  337. package/src/domain/comment-threads.js +49 -5
  338. package/src/domain/excalidraw-room-codec.js +23 -73
  339. package/src/domain/excalidraw-scene.js +48 -0
  340. package/src/domain/file-kind.js +13 -1
  341. package/src/server/application/workspace-reconciliation.js +0 -14
  342. package/src/server/config/env.js +39 -6
  343. package/src/server/domain/backlink-index.js +1 -36
  344. package/src/server/domain/bases/base-index-snapshot-store.js +41 -24
  345. package/src/server/domain/bases/base-query-service.js +1 -47
  346. package/src/server/domain/collaboration/collaboration-room.js +149 -15
  347. package/src/server/domain/collaboration/room-registry.js +7 -7
  348. package/src/server/domain/hosted-workspace.js +29 -2
  349. package/src/server/domain/plantuml-encoder.js +7 -43
  350. package/src/server/infrastructure/git/diff-service.js +1 -5
  351. package/src/server/infrastructure/git/history-service.js +18 -2
  352. package/src/server/infrastructure/git/untracked-files.js +1 -1
  353. package/src/server/infrastructure/http/create-git-api-command-handler.js +60 -149
  354. package/src/server/infrastructure/http/create-hosted-api-handler.js +5 -2
  355. package/src/server/infrastructure/http/create-static-handler.js +3 -1
  356. package/src/server/infrastructure/http/create-vault-api-query-handler.js +3 -3
  357. package/src/server/infrastructure/http/http-response.js +2 -36
  358. package/src/server/infrastructure/http/request-body.js +14 -49
  359. package/src/server/infrastructure/persistence/hosted-metadata-store.js +12 -3
  360. package/src/server/infrastructure/persistence/path-utils.js +8 -2
  361. package/src/server/infrastructure/persistence/vault-file-store.js +26 -60
  362. package/src/server/{infrastructure/git → shared}/image-mime.js +2 -2
  363. package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-BEz2BKN1.js +0 -1
  364. package/dist/client/assets/_basePickBy-QJXUw_pr.js +0 -1
  365. package/dist/client/assets/_baseUniq-DR4vVjyC.js +0 -1
  366. package/dist/client/assets/architecture-7GRP2DOG-DJVtYNt-.js +0 -1
  367. package/dist/client/assets/browser-utils-vlHL9goC.js +0 -1
  368. package/dist/client/assets/chunk-3FUC2YCW-8tZlhTGX.js +0 -1
  369. package/dist/client/assets/chunk-4SOEAONT-C3fufoVl.js +0 -40
  370. package/dist/client/assets/chunk-7M6MHVWA-BDakkknV.js +0 -213
  371. package/dist/client/assets/chunk-FOHPRMQF-Dmmo5Kak.js +0 -161
  372. package/dist/client/assets/chunk-O7XYJQB3-D0_ZY2za.js +0 -126
  373. package/dist/client/assets/chunk-Z7XXMR3K-P4Vaq8hD.js +0 -10
  374. package/dist/client/assets/chunk-ZIGJFQKS-b8OUHKK5.js +0 -2
  375. package/dist/client/assets/classDiagram-ZZMXUADV-QLbh_Nkf.js +0 -1
  376. package/dist/client/assets/classDiagram-v2-VYDZK3BY-QLbh_Nkf.js +0 -1
  377. package/dist/client/assets/comment-thread-store-CHvy8GF8.js +0 -1
  378. package/dist/client/assets/comment-threads-nJhK1yfc.js +0 -4
  379. package/dist/client/assets/cynefin-OW5HDTMX-e-Quc9Yl.js +0 -1
  380. package/dist/client/assets/dagre-D7FiCLLP.js +0 -1
  381. package/dist/client/assets/deferred-collab-D4cxEdad.css +0 -1
  382. package/dist/client/assets/deferred-git-BHKtkFYi.css +0 -1
  383. package/dist/client/assets/deferred-preview-BAXYgf4T.css +0 -1
  384. package/dist/client/assets/diagram-ATOU4E4O-B5uX-jVO.js +0 -3
  385. package/dist/client/assets/dist-B7fBbwrO.js +0 -1
  386. package/dist/client/assets/dist-BYBF4LtZ.js +0 -1
  387. package/dist/client/assets/dist-B_1hMrc6.js +0 -1
  388. package/dist/client/assets/dist-BnVaoRgZ.js +0 -1
  389. package/dist/client/assets/dist-Bog8M5U3.js +0 -13
  390. package/dist/client/assets/dist-CAG5sIOj.js +0 -1
  391. package/dist/client/assets/dist-CYMCikZo.js +0 -1
  392. package/dist/client/assets/dist-CYfPeupF.js +0 -1
  393. package/dist/client/assets/dist-Ck-B8onw.js +0 -2
  394. package/dist/client/assets/dist-CrkYYcOU.js +0 -1
  395. package/dist/client/assets/dist-Cu5Ze2cs.js +0 -6
  396. package/dist/client/assets/dist-D4kDR0g8.js +0 -1
  397. package/dist/client/assets/dist-D8LnhZzy.js +0 -1
  398. package/dist/client/assets/dist-DNONgI1P.js +0 -11
  399. package/dist/client/assets/dist-DVBYH83t.js +0 -1
  400. package/dist/client/assets/dist-DX6qtdxv.js +0 -1
  401. package/dist/client/assets/dist-Da-jLrCf.js +0 -1
  402. package/dist/client/assets/dist-DofvCYzJ.js +0 -1
  403. package/dist/client/assets/dist-Dx37MHWs.js +0 -1
  404. package/dist/client/assets/dist-GTGhtpyW.js +0 -9
  405. package/dist/client/assets/dist-W0FoeIxk.js +0 -23
  406. package/dist/client/assets/dist-jVKfryIL.js +0 -1
  407. package/dist/client/assets/document-formatter-gO8qM2qY.js +0 -1
  408. package/dist/client/assets/drawioEditor-DCkWweiy.js +0 -9
  409. package/dist/client/assets/editor-session-DxRyr4EM.js +0 -14
  410. package/dist/client/assets/elk-276RUBZZ-B8LB3Pac.js +0 -27
  411. package/dist/client/assets/embedded-editor-base-elU0Avik.css +0 -1
  412. package/dist/client/assets/en-GNC3RJIS-CEy_oGTd.js +0 -1
  413. package/dist/client/assets/eventmodeling-NTZA5JFV-Dxtv5D-P.js +0 -1
  414. package/dist/client/assets/excalidraw-element-link-CGZ5934B.js +0 -7
  415. package/dist/client/assets/excalidraw-scene-6uROebca.js +0 -1
  416. package/dist/client/assets/excalidrawEditor-BCTFp_CV.css +0 -1
  417. package/dist/client/assets/excalidrawEditor-BVfSxjSO.js +0 -9
  418. package/dist/client/assets/export-page-BCo_e15t.js +0 -46
  419. package/dist/client/assets/exportDocument-Ba-n1X4U.css +0 -1
  420. package/dist/client/assets/exportDocument-DP6oE_or.js +0 -2
  421. package/dist/client/assets/file-kind-BwMIcZbi.js +0 -1
  422. package/dist/client/assets/flowDiagram-HODETNUW-Bq4470NR.js +0 -1
  423. package/dist/client/assets/flowDiagram-KWPJA3E3-DQG9qGiU.js +0 -1
  424. package/dist/client/assets/ganttDiagram-FUAMR5RP-BQpsI7gQ.js +0 -292
  425. package/dist/client/assets/gitGraph-4MIJSDKK-ZaBIE4Lb.js +0 -1
  426. package/dist/client/assets/gitGraphDiagram-X574FWY7-wbs_2m9f.js +0 -106
  427. package/dist/client/assets/graphlib-C9Tl7QrK.js +0 -1
  428. package/dist/client/assets/image-EJJKRVD3-BQfi5nWJ.js +0 -1
  429. package/dist/client/assets/index-BxAuGDoN.css +0 -1
  430. package/dist/client/assets/index-uw9O0z1c.js +0 -1112
  431. package/dist/client/assets/info-A6RAGUB7-BcGxhjED.js +0 -1
  432. package/dist/client/assets/lobby-presence-Cz5jGOPg.js +0 -1
  433. package/dist/client/assets/mermaid.core-BeOUPE3Q.js +0 -10
  434. package/dist/client/assets/packet-AYTQ26CC-CqpSjTWl.js +0 -1
  435. package/dist/client/assets/pie-WAS4IAKB-Bg2eCNl5.js +0 -1
  436. package/dist/client/assets/preload-helper-BAlEavIC.js +0 -1
  437. package/dist/client/assets/preview-render-compiler-ktU0SXxY.js +0 -43
  438. package/dist/client/assets/prod-DU-0VfI7.js +0 -145
  439. package/dist/client/assets/prod-cXUNdmYV.js +0 -1
  440. package/dist/client/assets/quick-switcher-controller-DSlOwOsU.js +0 -1
  441. package/dist/client/assets/radar-RG4KPBEZ-DxExotg6.js +0 -1
  442. package/dist/client/assets/railroad-74A4TZTK-FfHmeIQk.js +0 -1
  443. package/dist/client/assets/railroad-abnf-HS5TGJTU-CLkdDRsJ.js +0 -1
  444. package/dist/client/assets/railroad-ebnf-LZEXJU2U-B162zvcG.js +0 -1
  445. package/dist/client/assets/railroad-peg-WCYAUIDC-CGs5GeJ5.js +0 -1
  446. package/dist/client/assets/runtime-config-BFVdhnJu.js +0 -1
  447. package/dist/client/assets/runtime-paths-Cn0snt_9.js +0 -1
  448. package/dist/client/assets/sequenceDiagram-PO4LG4MO-B-2QfXhV.js +0 -169
  449. package/dist/client/assets/sizeCapture-INFHLROL-B0uUizjq.js +0 -1
  450. package/dist/client/assets/sizeCapture-INFHLROL-DrzwYt5z.js +0 -1
  451. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CLlwrdvU.js +0 -1
  452. package/dist/client/assets/swimlanesDiagram-TC7HE7FX-Bh4tmz27.js +0 -8
  453. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-xhehUG9e.js +0 -8
  454. package/dist/client/assets/treeView-Q6P3EWNA-Cccy0ngL.js +0 -1
  455. package/dist/client/assets/treemap-WGGIJYW6-sMRCjCtX.js +0 -1
  456. package/dist/client/assets/usecaseDiagram-POWQR4AR-DR2LHQYs.js +0 -328
  457. package/dist/client/assets/vault-api-client-BQxLVPeF.js +0 -7
  458. package/dist/client/assets/wardley-WFR3VGLG-Y7xty_3m.js +0 -1
  459. package/dist/client/assets/workspace-sync-client-C2pdaQUN.js +0 -1
  460. package/dist/client/assets/xychartDiagram-PMCCYNJV-fRpZ1MA5.js +0 -7
  461. package/dist/client/assets/yjs-B41tM6Sz.js +0 -4
  462. package/dist/client/assets/yjs-provider-reset-guard-DpntzUDR.js +0 -1
  463. package/scripts/local-plantuml-compose.mjs +0 -92
  464. package/scripts/local-structurizr-compose.mjs +0 -101
package/bin/collabmd.js CHANGED
@@ -70,8 +70,9 @@ const useLocalPlantUml = values['local-plantuml'];
70
70
  const useLocalStructurizr = values['local-structurizr'];
71
71
 
72
72
  const { resolveCliVaultDir, resolveConfiguredVaults, loadConfig } = await import('../src/server/config/env.js');
73
- // ponytail: explicit directory wins; COLLABMD_VAULTS only applies with no positional
74
- const useVaultList = positionals.length === 0 && String(process.env.COLLABMD_VAULTS ?? '').trim() !== '';
73
+ // An explicit directory wins over both the list and discovery.
74
+ const useVaultList = positionals.length === 0
75
+ && [process.env.COLLABMD_VAULTS, process.env.COLLABMD_VAULT_DISCOVERY].some((value) => String(value ?? '').trim() !== '');
75
76
  const vaultPath = useVaultList ? '' : resolveCliVaultDir(positionals);
76
77
  // ponytail: primary vault known before loadConfig so local services mirror the right dir
77
78
  const primaryVaultDir = useVaultList ? resolveConfiguredVaults({}, process.env)[0].dir : vaultPath;
@@ -90,45 +91,26 @@ if (values['auth-password']) {
90
91
  process.env.AUTH_PASSWORD = values['auth-password'];
91
92
  }
92
93
 
93
- if (useLocalPlantUml) {
94
- const {
95
- getLocalPlantUmlServerUrl,
96
- startLocalPlantUmlComposeService,
97
- } = await import('../scripts/local-plantuml-compose.mjs');
98
-
99
- try {
100
- const localPlantUmlUrl = getLocalPlantUmlServerUrl();
101
- console.log(` PlantUML: starting local docker-compose service at ${localPlantUmlUrl}...`);
102
- await startLocalPlantUmlComposeService();
103
- process.env.PLANTUML_SERVER_URL = localPlantUmlUrl;
104
- } catch (error) {
105
- if (error.code === 'ENOENT') {
106
- console.error('Error: Docker is not available. Install Docker Desktop or Docker Engine first.');
107
- } else {
108
- console.error(`Error: Failed to start local PlantUML service: ${error.message}`);
109
- }
110
- process.exit(1);
111
- }
112
- }
113
-
114
- if (useLocalStructurizr) {
115
- const {
116
- getLocalStructurizrServerUrl,
117
- startLocalStructurizrComposeService,
118
- } = await import('../scripts/local-structurizr-compose.mjs');
119
-
120
- try {
121
- const localStructurizrUrl = getLocalStructurizrServerUrl();
122
- console.log(` Structurizr: starting local docker-compose service at ${localStructurizrUrl}...`);
123
- await startLocalStructurizrComposeService({ vaultDir: primaryVaultDir });
124
- process.env.STRUCTURIZR_SERVER_URL = localStructurizrUrl;
125
- } catch (error) {
126
- if (error.code === 'ENOENT') {
127
- console.error('Error: Docker is not available. Install Docker Desktop or Docker Engine first.');
128
- } else {
129
- console.error(`Error: Failed to start local Structurizr service: ${error.message}`);
94
+ if (useLocalPlantUml || useLocalStructurizr) {
95
+ const { getLocalComposeServerUrl, startLocalComposeService } = await import('../scripts/local-compose.mjs');
96
+ for (const [enabled, service, label, envName] of [
97
+ [useLocalPlantUml, 'plantuml', 'PlantUML', 'PLANTUML_SERVER_URL'],
98
+ [useLocalStructurizr, 'structurizr', 'Structurizr', 'STRUCTURIZR_SERVER_URL'],
99
+ ]) {
100
+ if (!enabled) continue;
101
+ try {
102
+ const url = getLocalComposeServerUrl(service);
103
+ console.log(` ${label}: starting local docker-compose service at ${url}...`);
104
+ await startLocalComposeService(service, { vaultDir: primaryVaultDir });
105
+ process.env[envName] = url;
106
+ } catch (error) {
107
+ if (error.code === 'ENOENT') {
108
+ console.error('Error: Docker is not available. Install Docker Desktop or Docker Engine first.');
109
+ } else {
110
+ console.error(`Error: Failed to start local ${label} service: ${error.message}`);
111
+ }
112
+ process.exit(1);
130
113
  }
131
- process.exit(1);
132
114
  }
133
115
  }
134
116
 
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{J as t,P as n,R as r,St as i,X as a,c as o,ct as s,dt as c,et as l,lt as u,t as d,wt as f}from"./dist-CJh3Qrid.js";import{a as p,o as m,p as h,s as g}from"./dist-8MLNn-I6.js";import{n as _,t as v}from"./jsx-runtime-DKj5X9O4.js";import"./chunk-SRAX5OIU-KFQikY-4.js";var y=e(_(),1),b=v(),x=o.define({token(e){return e.match(/^%%.*$/)?`comment`:e.match(/^"(?:[^"\\]|\\.)*"/)?`string`:e.match(/^(flowchart|graph|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt|pie|mindmap|journey|gitGraph|timeline|quadrantChart|sankey|xychart)\b/i)||e.match(/^(TB|TD|BT|RL|LR)\b/)||e.match(/^(subgraph|end|participant|actor|loop|alt|else|opt|par|critical|break|rect|note|over|activate|deactivate|title|section|class|style|linkStyle|classDef|click)\b/i)?`keyword`:e.match(/^[-.=<>|ox]+>/)||e.match(/^<[-.=<>|ox]+/)||e.match(/^--+|\.\.+|==+/)?`operator`:e.match(/^[[\](){}|<>]/)?`bracket`:e.match(/^[A-Za-z_][A-Za-z0-9_]*/)?`variableName`:e.match(/^\d+(\.\d+)?/)?`number`:e.match(/^[,:;]/)?`punctuation`:(e.eatSpace()||e.next(),null)}});function S(){return x}var C=a.theme({"&":{backgroundColor:`#1e1e1e`,color:`#d4d4d4`},".cm-content":{caretColor:`#fff`},".cm-cursor":{borderLeftColor:`#fff`},".cm-gutters":{backgroundColor:`#1e1e1e`,color:`#858585`,border:`none`},".cm-activeLineGutter":{backgroundColor:`#2a2a2a`},".cm-activeLine":{backgroundColor:`#2a2a2a`},".cm-errorLine":{backgroundColor:`rgba(255, 0, 0, 0.15)`}},{dark:!0}),w=d.define([{tag:r.keyword,color:`#569cd6`},{tag:r.string,color:`#ce9178`},{tag:r.comment,color:`#6a9955`},{tag:r.number,color:`#b5cea8`},{tag:r.operator,color:`#d4d4d4`},{tag:r.punctuation,color:`#d4d4d4`},{tag:r.variableName,color:`#9cdcfe`},{tag:r.bracket,color:`#ffd700`}]),T=a.theme({"&":{backgroundColor:`#ffffff`,color:`#1e1e1e`},".cm-content":{caretColor:`#000`},".cm-cursor":{borderLeftColor:`#000`},".cm-gutters":{backgroundColor:`#fff`,color:`#999`,border:`none`},".cm-activeLineGutter":{backgroundColor:`#e8e8e8`},".cm-activeLine":{backgroundColor:`#e8e8e8`},".cm-errorLine":{backgroundColor:`rgba(255, 0, 0, 0.1)`}}),E=d.define([{tag:r.keyword,color:`#0000ff`},{tag:r.string,color:`#a31515`},{tag:r.comment,color:`#008000`},{tag:r.number,color:`#098658`},{tag:r.operator,color:`#1e1e1e`},{tag:r.punctuation,color:`#1e1e1e`},{tag:r.variableName,color:`#001080`},{tag:r.bracket,color:`#af00db`}]),D=t.line({class:`cm-errorLine`}),O=(e,n)=>{if(!e||e<1||e>n.lines)return a.decorations.of(t.none);let r=n.line(e);return a.decorations.of(t.set([D.range(r.from)]))},k=e=>e===`dark`?[C,n(w)]:[T,n(E)],A=({value:e,onChange:t,onKeyboardSubmit:n,placeholder:r,theme:o,errorLine:d})=>{let _=(0,y.useRef)(null),v=(0,y.useRef)(null),x=(0,y.useRef)(t),C=(0,y.useRef)(n),w=(0,y.useRef)(new i),T=(0,y.useRef)(new i);return x.current=t,C.current=n,(0,y.useEffect)(()=>{if(!_.current)return;let t=w.current,n=new a({state:f.create({doc:e,extensions:[s.of([{key:`Mod-Enter`,run:()=>(C.current?.(),!0)},{key:`Mod-Shift-z`,run:h,preventDefault:!0}]),a.updateListener.of(e=>{e.docChanged&&x.current(e.state.doc.toString())}),m(),s.of([...p,...g]),u(),a.lineWrapping,t.of(k(o)),T.current.of([]),S(),l({drawRangeCursor:!0}),...r?[c(r)]:[]]}),parent:_.current});return v.current=n,n.focus(),()=>{n.destroy(),v.current=null}},[]),(0,y.useEffect)(()=>{let e=v.current;e&&e.dispatch({effects:w.current.reconfigure(k(o))})},[o]),(0,y.useEffect)(()=>{let e=v.current;e&&e.dispatch({effects:T.current.reconfigure(O(d,e.state.doc))})},[d]),(0,y.useEffect)(()=>{let t=v.current;if(!t)return;let n=t.state.doc.toString();e!==n&&t.dispatch({changes:{from:0,to:n.length,insert:e}})},[e]),(0,b.jsx)(`div`,{ref:_,className:`ttd-dialog-input ttd-dialog-input--codemirror`})};export{A as default};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./chunk-X3CZISLH-BixgQztF.js";import"./chunk-DU6HZSFF-CWlP1Dk_.js";import"./chunk-CLGD4ZFX-BfYJtJm1.js";import{n,r,t as i}from"./chunk-SVP7TREG-DdNhDOmW.js";import{t as a}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as o}from"./chunk-XHIXRSVI-BSN7JlfK.js";import{t as s}from"./mermaid-parser.core-Bpogunsh.js";var c=o().RailroadAbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=e(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=e(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=e(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=e(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{a(e,i),e.title&&i.setTitle(e.title),e.rules.map(e=>i.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{i.clear(),t.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);let r=n.value;t.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),t.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:i}},db:i,renderer:r,styles:n};export{g as diagram};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./chunk-X3CZISLH-BixgQztF.js";import"./chunk-DU6HZSFF-C-18UZkS.js";import"./chunk-CLGD4ZFX-DJiSE0gD.js";import{n,r,t as i}from"./chunk-SVP7TREG-CKqt0syj.js";import{t as a}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as o}from"./chunk-XHIXRSVI-BSN7JlfK.js";import{t as s}from"./mermaid-parser.core-mE6t1qEO.js";var c=o().RailroadAbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=e(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=e(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=e(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=e(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{a(e,i),e.title&&i.setTitle(e.title),e.rules.map(e=>i.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{i.clear(),t.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);let r=n.value;t.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),t.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:i}},db:i,renderer:r,styles:n};export{g as diagram};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-XHIXRSVI-DN_fEwws.js";import{n as t}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t as n}from"./chunk-X3CZISLH-DwWpRaN8.js";import"./chunk-O7XYJQB3-D0_ZY2za.js";import"./chunk-6AEJRKK7-DTVZj5bY.js";import{n as r,r as i,t as a}from"./chunk-GTNCS2PH-ChgkzEIi.js";import{t as o}from"./chunk-JWPE2WC7-GDilnS5Y.js";import{t as s}from"./mermaid-parser.core-DBy--Jc0.js";var c=e().RailroadAbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=t(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=t(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=t(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=t(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[ABNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram};
1
+ import{n as e}from"./chunk-YK26KJH5-DVy3MGMd.js";import{n as t}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t as n}from"./chunk-X3CZISLH-DwWpRaN8.js";import"./chunk-VPRB5NB3-BqaJfj_v.js";import"./chunk-Z6ETV63D-DOcrnz-P.js";import{n as r,r as i,t as a}from"./chunk-AW2ZBBNX-DL0KGAdi.js";import{t as o}from"./chunk-JWPE2WC7-GDilnS5Y.js";import{t as s}from"./mermaid-parser.core-R-uwU5kf.js";var c=e().RailroadAbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=t(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=t(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=t(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=t(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[ABNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram};
@@ -0,0 +1 @@
1
+ function e(){return typeof window>`u`?globalThis:window}function t({accept:t=``,multiple:n=!1}={}){return new Promise(r=>{let i=document.createElement(`input`),a=e();i.type=`file`,i.accept=t,i.multiple=n,i.style.position=`fixed`,i.style.left=`-9999px`,document.body.appendChild(i);let o=!1,s=null,c=(e=[])=>{o||(o=!0,s&&a.clearTimeout(s),a.removeEventListener(`focus`,l),i.remove(),r(Array.from(e??[])))},l=()=>{s=a.setTimeout(()=>{o||i.files?.length||c()},250)};i.addEventListener(`change`,()=>c(i.files),{once:!0}),i.addEventListener(`cancel`,()=>c(),{once:!0}),a.addEventListener(`focus`,l,{once:!0}),i.click()})}function n(t,n){let r=e();return typeof r.requestIdleCallback==`function`?r.requestIdleCallback(t,{timeout:n}):r.setTimeout(()=>t({didTimeout:!1,timeRemaining:()=>0}),1)}function r(t){if(t===null)return;let n=e();if(typeof n.cancelIdleCallback==`function`){n.cancelIdleCallback(t);return}n.clearTimeout(t)}function i(e,t,n){if(!e||!t)return!1;let r=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.bottom>=r.top-n&&i.top<=r.bottom+n}function a(t,n,{removeDelayMs:r=1e3,revokeDelayMs:i=r}={}){let a=e(),o=URL.createObjectURL(t),s=document.createElement(`a`);s.href=o,s.download=n,s.style&&(s.style.display=`none`),document.body.appendChild(s),s.click(),r>0?a.setTimeout(()=>s.remove(),r):s.remove(),a.setTimeout(()=>URL.revokeObjectURL(o),i)}function o(e=``,t=`download`){let n=String(e).match(/filename\*=UTF-8''([^;]+)/iu);if(n)try{return decodeURIComponent(n[1])}catch{return t}return String(e).match(/filename="([^"]+)"/iu)?.[1]||t}async function s(e){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}let t=document.activeElement,n=document.createElement(`textarea`);n.value=e,n.className=`clipboard-fallback`,document.body.appendChild(n),n.select();try{if(!document.execCommand(`copy`))throw Error(`Copy failed`)}finally{n.remove(),t?.focus()}}function c(e,t={}){let n={...t};return e&&(n[`X-CollabMD-Request-Id`]=String(e)),n}async function l(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.ok===!1){let r=Error(n.error||t);throw r.status=e.status,r.body=n,typeof n?.code==`string`&&(r.code=n.code),r}return n}export{a,t as c,s as i,n as l,l as n,i as o,r,o as s,c as t};
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-Dmmo5Kak.js";import{n as e}from"./chunk-6AZGARVD--pTGpDnx.js";export{e as createArchitectureServices};
1
+ import"./chunk-FOHPRMQF-DzxwRta7.js";import{n as e}from"./chunk-6AZGARVD-CnZDr4Cj.js";export{e as createArchitectureServices};
@@ -0,0 +1 @@
1
+ import"./chunk-NGNAAXSQ-DqoPQk1a.js";import{n as e}from"./chunk-24IY7LWP-flnn6SWX.js";export{e as createArchitectureServices};
@@ -1,4 +1,4 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{p as t}from"./src-XiVvaevx.js";import{t as n}from"./cytoscape.esm-EK2DW5Qr.js";import{t as r}from"./cytoscape-fcose-DE9_QRG_.js";import{n as i}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t as a}from"./chunk-X3CZISLH-DwWpRaN8.js";import{H as o,U as s,Y as c,a as l,b as u,f as d,q as f,v as p,w as m,x as h,y as g,z as _}from"./chunk-O7XYJQB3-D0_ZY2za.js";import{t as v}from"./chunk-6AEJRKK7-DTVZj5bY.js";import{t as y}from"./chunk-JWPE2WC7-GDilnS5Y.js";import{n as b}from"./mermaid-parser.core-DBy--Jc0.js";import{i as x,r as S,t as C}from"./chunk-742MDFTN-D1nh6vNv.js";import{c as w,i as T}from"./chunk-ZIGJFQKS-b8OUHKK5.js";import{n as E}from"./chunk-MBY4JIJT-DTJ4UcAm.js";var ee=e(r(),1),D={L:`left`,R:`right`,T:`top`,B:`bottom`},O={L:i(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:i(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:i(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:i(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},k={L:i((e,t)=>e-t+2,`L`),R:i((e,t)=>e-2,`R`),T:i((e,t)=>e-t+2,`T`),B:i((e,t)=>e-2,`B`)},te=i(function(e){return j(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),A=i(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),j=i(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),M=i(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),N=i(function(e,t){let n=j(e)&&M(t),r=M(e)&&j(t);return n||r},`isArchitectureDirectionXY`),P=i(function(e){let t=e[0],n=e[1],r=j(t)&&M(n),i=M(t)&&j(n);return r||i},`isArchitecturePairXY`),F=i(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),I=i(function(e,t){let n=`${e}${t}`;return F(n)?n:void 0},`getArchitectureDirectionPair`),L=i(function([e,t],n){let r=n[0],i=n[1];return j(r)?M(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:j(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ne=i(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),re=i(function(e,t){return N(e,t)?`bend`:j(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),ie=i(function(e){return e.type===`service`},`isArchitectureService`),ae=i(function(e){return e.type===`junction`},`isArchitectureJunction`),R=i((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),z=i(e=>e.data(),`edgeData`),B=i(e=>e.data(),`nodeData`),oe=d.architecture,V=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=s,this.getAccTitle=g,this.setDiagramTitle=f,this.getDiagramTitle=m,this.getAccDescription=p,this.setAccDescription=o,this.clear()}static{i(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,l()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(ie)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ae)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!A(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!A(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=re(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(R(r,a),n)}if(t.lhsId===n){let e=I(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=I(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let n=new Set,r=new Set(t.keys()),a=i(e=>{let i=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){n.add(e),r.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=i.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{n.has(e)||(i.set(e,L([c,l],t)),a.push(e))})}}return i},`BFS`),o=[];for(;r.size>0;){let e=r.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return T({...oe,...u().architecture})}getConfigField(e){return this.getConfig()[e]}},se=i((e,t)=>{y(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),H={parser:{yy:void 0},parse:i(async e=>{let t=await b(`architecture`,e);a.debug(t);let n=H.parser?.yy;if(!(n instanceof V))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(t,n)},`parse`)},ce=i(e=>`
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{p as t}from"./src-XiVvaevx.js";import{t as n}from"./cytoscape.esm-EK2DW5Qr.js";import{t as r}from"./cytoscape-fcose-DE9_QRG_.js";import{n as i}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t as a}from"./chunk-X3CZISLH-DwWpRaN8.js";import{C as o,H as s,U as c,Y as l,_ as u,a as d,b as f,f as p,q as m,v as h,y as g,z as _}from"./chunk-VPRB5NB3-BqaJfj_v.js";import{t as v}from"./chunk-Z6ETV63D-DOcrnz-P.js";import{t as y}from"./chunk-JWPE2WC7-GDilnS5Y.js";import{n as b}from"./mermaid-parser.core-R-uwU5kf.js";import{i as x,r as S,t as C}from"./chunk-HJ2JQQFS-DQX7RePR.js";import{c as w,i as T}from"./chunk-3YJQHVM4-Ctp__8EK.js";import{n as E}from"./chunk-E2ZNV5FY-D_07zfWd.js";var ee=e(r(),1),D={L:`left`,R:`right`,T:`top`,B:`bottom`},O={L:i(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:i(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:i(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:i(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},k={L:i((e,t)=>e-t+2,`L`),R:i((e,t)=>e-2,`R`),T:i((e,t)=>e-t+2,`T`),B:i((e,t)=>e-2,`B`)},te=i(function(e){return j(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),A=i(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),j=i(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),M=i(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),N=i(function(e,t){let n=j(e)&&M(t),r=M(e)&&j(t);return n||r},`isArchitectureDirectionXY`),P=i(function(e){let t=e[0],n=e[1],r=j(t)&&M(n),i=M(t)&&j(n);return r||i},`isArchitecturePairXY`),F=i(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),I=i(function(e,t){let n=`${e}${t}`;return F(n)?n:void 0},`getArchitectureDirectionPair`),L=i(function([e,t],n){let r=n[0],i=n[1];return j(r)?M(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:j(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ne=i(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),re=i(function(e,t){return N(e,t)?`bend`:j(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),ie=i(function(e){return e.type===`service`},`isArchitectureService`),ae=i(function(e){return e.type===`junction`},`isArchitectureJunction`),R=i((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),z=i(e=>e.data(),`edgeData`),B=i(e=>e.data(),`nodeData`),oe=p.architecture,V=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=c,this.getAccTitle=h,this.setDiagramTitle=m,this.getDiagramTitle=o,this.getAccDescription=u,this.setAccDescription=s,this.clear()}static{i(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,d()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(ie)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ae)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!A(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!A(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=re(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(R(r,a),n)}if(t.lhsId===n){let e=I(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=I(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let n=new Set,r=new Set(t.keys()),a=i(e=>{let i=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){n.add(e),r.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=i.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{n.has(e)||(i.set(e,L([c,l],t)),a.push(e))})}}return i},`BFS`),o=[];for(;r.size>0;){let e=r.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return T({...oe,...g().architecture})}getConfigField(e){return this.getConfig()[e]}},se=i((e,t)=>{y(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),H={parser:{yy:void 0},parse:i(async e=>{let t=await b(`architecture`,e);a.debug(t);let n=H.parser?.yy;if(!(n instanceof V))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(t,n)},`parse`)},ce=i(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
@@ -29,8 +29,8 @@ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{p as t}from"./src-XiVv
29
29
  display: -webkit-box;
30
30
  -webkit-box-orient: vertical;
31
31
  }
32
- `,`getStyles`);function U(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}i(U,`withSeededRandom`);var W=i(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,`wrapIcon`),G={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:W(`<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>`)},server:{body:W(`<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>`)},disk:{body:W(`<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>`)},internet:{body:W(`<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>`)},cloud:{body:W(`<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>`)},unknown:x,blank:{body:W(``)}}},le=i(async function(e,t,n,r){let i=n.getConfigField(`padding`),a=n.getConfigField(`iconSize`),o=a/2,s=a/6,c=s/2;await Promise.all(t.edges().map(async t=>{let{source:a,sourceDir:l,sourceArrow:u,sourceGroup:d,target:f,targetDir:p,targetArrow:m,targetGroup:g,label:_}=z(t),{x:v,y}=t[0].sourceEndpoint(),{x:b,y:x}=t[0].midpoint(),{x:S,y:C}=t[0].targetEndpoint(),T=i+4;if(d&&(j(l)?v+=l===`L`?-T:T:y+=l===`T`?-T:T+18),g&&(j(p)?S+=p===`L`?-T:T:C+=p===`T`?-T:T+18),!d&&n.getNode(a)?.type===`junction`&&(j(l)?v+=l===`L`?o:-o:y+=l===`T`?o:-o),!g&&n.getNode(f)?.type===`junction`&&(j(p)?S+=p===`L`?o:-o:C+=p===`T`?o:-o),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${v},${y} L ${b},${x} L${S},${C} `).attr(`class`,`edge`).attr(`id`,`${r}-${w(a,f,{prefix:`L`})}`),u){let e=j(l)?k[l](v,s):v-c,n=M(l)?k[l](y,s):y-c;t.insert(`polygon`).attr(`points`,O[l](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(m){let e=j(p)?k[p](S,s):S-c,n=M(p)?k[p](C,s):C-c;t.insert(`polygon`).attr(`points`,O[p](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(_){let e=N(l,p)?`XY`:j(l)?`X`:`Y`,n=0;n=e===`X`?Math.abs(v-S):e===`Y`?Math.abs(y-C)/1.5:Math.abs(v-S)/2;let r=t.append(`g`);if(await E(r,_,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},h()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+b+`, `+x+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+b+`, `+x+`) rotate(-90)`);else if(e===`XY`){let e=I(l,p);if(e&&P(e)){let t=r.node().getBoundingClientRect(),[n,i]=ne(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,`
32
+ `,`getStyles`);function U(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}i(U,`withSeededRandom`);var W=i(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,`wrapIcon`),G={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:W(`<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>`)},server:{body:W(`<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>`)},disk:{body:W(`<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>`)},internet:{body:W(`<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>`)},cloud:{body:W(`<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>`)},unknown:x,blank:{body:W(``)}}},le=i(async function(e,t,n,r){let i=n.getConfigField(`padding`),a=n.getConfigField(`iconSize`),o=a/2,s=a/6,c=s/2;await Promise.all(t.edges().map(async t=>{let{source:a,sourceDir:l,sourceArrow:u,sourceGroup:d,target:p,targetDir:m,targetArrow:h,targetGroup:g,label:_}=z(t),{x:v,y}=t[0].sourceEndpoint(),{x:b,y:x}=t[0].midpoint(),{x:S,y:C}=t[0].targetEndpoint(),T=i+4;if(d&&(j(l)?v+=l===`L`?-T:T:y+=l===`T`?-T:T+18),g&&(j(m)?S+=m===`L`?-T:T:C+=m===`T`?-T:T+18),!d&&n.getNode(a)?.type===`junction`&&(j(l)?v+=l===`L`?o:-o:y+=l===`T`?o:-o),!g&&n.getNode(p)?.type===`junction`&&(j(m)?S+=m===`L`?o:-o:C+=m===`T`?o:-o),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${v},${y} L ${b},${x} L${S},${C} `).attr(`class`,`edge`).attr(`id`,`${r}-${w(a,p,{prefix:`L`})}`),u){let e=j(l)?k[l](v,s):v-c,n=M(l)?k[l](y,s):y-c;t.insert(`polygon`).attr(`points`,O[l](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(h){let e=j(m)?k[m](S,s):S-c,n=M(m)?k[m](C,s):C-c;t.insert(`polygon`).attr(`points`,O[m](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(_){let e=N(l,m)?`XY`:j(l)?`X`:`Y`,n=0;n=e===`X`?Math.abs(v-S):e===`Y`?Math.abs(y-C)/1.5:Math.abs(v-S)/2;let r=t.append(`g`);if(await E(r,_,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},f()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+b+`, `+x+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+b+`, `+x+`) rotate(-90)`);else if(e===`XY`){let e=I(l,m);if(e&&P(e)){let t=r.node().getBoundingClientRect(),[n,i]=ne(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,`
33
33
  translate(${b}, ${x-t.height/2})
34
34
  translate(${n*a.width/2}, ${i*a.height/2})
35
35
  rotate(${-1*n*i*45}, 0, ${t.height/2})
36
- `)}}}}}))},`drawEdges`),ue=i(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,a=n.getConfigField(`fontSize`),o=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let s=B(t);if(s.type===`group`){let{h:c,w:l,x1:u,y1:d}=t.boundingBox(),f=e.append(`rect`);f.attr(`id`,`${r}-group-${s.id}`).attr(`x`,u+o).attr(`y`,d+o).attr(`width`,l).attr(`height`,c).attr(`class`,`node-bkg`);let p=e.append(`g`),m=u,g=d;if(s.icon){let e=p.append(`g`);e.html(`<g>${await C(s.icon,{height:i,width:i,fallbackPrefix:G.prefix})}</g>`),e.attr(`transform`,`translate(`+(m+o+1)+`, `+(g+o+1)+`)`),m+=i,g+=a/2-1-2}if(s.label){let e=p.append(`g`);await E(e,s.label,{useHtmlLabels:!1,width:l,classes:`architecture-service-label`},h()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(m+o+4)+`, `+(g+o+2)+`)`)}n.setElementForId(s.id,f)}}))},`drawGroups`),de=i(async function(e,t,n,r){let i=h();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await E(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let s=n.append(`g`);if(a.icon)s.html(`<g>${await C(a.icon,{height:o,width:o,fallbackPrefix:G.prefix})}</g>`);else if(a.iconText){s.html(`<g>${await C(`blank`,{height:o,width:o,fallbackPrefix:G.prefix})}</g>`);let e=s.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(_(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else s.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:c,height:l}=n.node().getBBox();a.width=c,a.height=l,e.setElementForId(a.id,n)}return 0},`drawServices`),fe=i(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`);S([{name:G.prefix,icons:G}]),n.use(ee.default);function K(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}i(K,`addServices`);function q(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}i(q,`addJunctions`);function J(e,t){t.nodes().map(t=>{let n=B(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}i(J,`positionNodes`);function Y(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}i(Y,`addGroups`);function X(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:c,rhsGroup:l,title:u}=e,d=N(e.lhsDir,e.rhsDir)?`segments`:`straight`,f={id:`${n}-${r}`,label:u,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:c,targetArrow:o,targetGroup:l,targetEndpoint:c===`L`?`0 50%`:c===`R`?`100% 50%`:c===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:f,classes:d})})}i(X,`addEdges`);function Z(e,t,n,r=[]){let a=i((e,t)=>{let r=new Map;for(let[i,a]of e.entries()){let e=`${i}`,o=0,s=[...a.entries()];if(s.length===1){r.set(e,s[0][1]);continue}for(let i=0;i<s.length-1;i++)for(let a=i+1;a<s.length;a++){let[c,l]=s[i],[u,d]=s[a];if(n.get(R(c,u))===t)r.set(e,[...r.get(e)??[],...l,...d]);else if(c==="default"||u==="default")r.set(e,[...r.get(e)??[],...l,...d]);else{let t=`${e}-${o++}`;r.set(t,l);let n=`${e}-${o++}`;r.set(n,d)}}}return r},`flattenAlignments`),[o,s]=t.map(t=>{let n=new Map,r=new Map;return t.forEach(([t,i],a)=>{let o=e.getNode(a)?.in??`default`,s=n.get(i)??new Map;n.has(i)||n.set(i,s);let c=r.get(t)??new Map;r.has(t)||r.set(t,c);for(let e of[s,c]){let t=e.get(o)??[];e.has(o)||e.set(o,t),t.push(a)}}),{horiz:[...a(n,`horizontal`).values()].filter(e=>e.length>1),vert:[...a(r,`vertical`).values()].filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),c=new Set;r.forEach(e=>e.members.forEach(e=>c.add(e)));let l=i(e=>e.filter(e=>!e.some(e=>c.has(e))),`dropOverlapping`),u=l(o),d=l(s);return r.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}i(Z,`getAlignments`);function Q(e,t,n=[]){let r=[],a=t.getConfigField(`iconSize`),o=t.getConfigField(`idealEdgeLengthMultiplier`),s=o*a,c=new Set;n.forEach(e=>{for(let t=0;t<e.members.length-1;t++){let n=e.members[t],i=e.members[t+1];c.add(`${n}|${i}`),c.add(`${i}|${n}`),e.direction===`row`?r.push({left:n,right:i,gap:s}):r.push({top:n,bottom:i,gap:s})}});let l=i(e=>`${e[0]},${e[1]}`,`posToStr`),u=i(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=new Map([...e.entries()].map(([e,t])=>[l(t),e])),n=[l([0,0])],i={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){i[e]=1;let d=t.get(e);if(d){let f=u(e);Object.entries(s).forEach(([e,s])=>{let u=l([f[0]+s[0],f[1]+s[1]]),p=t.get(u);if(p&&!i[u]){if(n.push(u),c.has(`${d}|${p}`))return;r.push({[D[e]]:p,[D[te(e)]]:d,gap:o*a})}})}}}}),r}i(Q,`getRelativeConstraints`);function $(e,r,o,s,c,{spatialMaps:l,groupAlignments:u}){return new Promise(d=>{let f=t(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),p=n({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${c.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${c.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),Y(o,p),K(e,p,c),q(r,p,c),X(s,p);let m=c.getLayoutHints(),h=Z(c,l,u,m),g=Q(l,c,m),_=c.getConfigField(`iconSize`),v=c.getConfigField(`idealEdgeLengthMultiplier`)*_,y=.5*_,b=c.getConfigField(`edgeElasticity`),x=c.getConfigField(`seed`),S=p.layout({name:`fcose`,quality:`proof`,randomize:c.getConfigField(`randomize`),nodeSeparation:c.getConfigField(`nodeSeparation`),numIter:c.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=B(t),{parent:i}=B(n);return r===i?v:y},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=B(t),{parent:i}=B(n);return r===i?b:.001},alignmentConstraint:h,relativePlacementConstraint:g});S.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:c,y:l}=t;a=(r-s+(o-n)*(s-l)/(o-c))/Math.sqrt(1+((s-l)/(o-c))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let u=Math.sqrt((c-o)**2+(l-s)**2);i/=u;let d=(c-o)*(r-s)-(l-s)*(n-o);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let f=(c-o)*(n-o)+(l-s)*(r-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1}return a=Math.abs(a)*d,i*=f,{distances:a,weights:i}}i(e,`getSegmentWeights`),p.startBatch();for(let t of Object.values(p.edges()))if(t.data?.()){let{x:n,y:r}=t.source().position(),{x:i,y:a}=t.target().position();if(n!==i&&r!==a){let n=t.sourceEndpoint(),r=t.targetEndpoint(),{sourceDir:i}=z(t),[a,o]=M(i)?[n.x,r.y]:[r.x,n.y],{weights:s,distances:c}=e(n,r,a,o);t.style(`segment-distances`,c),t.style(`segment-weights`,s)}}p.endBatch(),U(x,()=>S.run())});try{U(x,()=>S.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}p.ready(e=>{a.info(`Ready`,e),d(p)})})}i($,`layoutArchitecture`);var pe={parser:H,get db(){return new V},renderer:{draw:i(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),s=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),d=v(t),f=d.append(`g`);f.attr(`class`,`architecture-edges`);let p=d.append(`g`);p.attr(`class`,`architecture-services`);let m=d.append(`g`);m.attr(`class`,`architecture-groups`),await de(i,p,a,t),fe(i,p,o,t);let h=await $(a,o,s,l,i,u);await le(f,h,i,t),await ue(m,h,i,t),J(i,h),c(void 0,d,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:ce};export{pe as diagram};
36
+ `)}}}}}))},`drawEdges`),ue=i(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,a=n.getConfigField(`fontSize`),o=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let s=B(t);if(s.type===`group`){let{h:c,w:l,x1:u,y1:d}=t.boundingBox(),p=e.append(`rect`);p.attr(`id`,`${r}-group-${s.id}`).attr(`x`,u+o).attr(`y`,d+o).attr(`width`,l).attr(`height`,c).attr(`class`,`node-bkg`);let m=e.append(`g`),h=u,g=d;if(s.icon){let e=m.append(`g`);e.html(`<g>${await C(s.icon,{height:i,width:i,fallbackPrefix:G.prefix})}</g>`),e.attr(`transform`,`translate(`+(h+o+1)+`, `+(g+o+1)+`)`),h+=i,g+=a/2-1-2}if(s.label){let e=m.append(`g`);await E(e,s.label,{useHtmlLabels:!1,width:l,classes:`architecture-service-label`},f()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(h+o+4)+`, `+(g+o+2)+`)`)}n.setElementForId(s.id,p)}}))},`drawGroups`),de=i(async function(e,t,n,r){let i=f();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await E(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let s=n.append(`g`);if(a.icon)s.html(`<g>${await C(a.icon,{height:o,width:o,fallbackPrefix:G.prefix})}</g>`);else if(a.iconText){s.html(`<g>${await C(`blank`,{height:o,width:o,fallbackPrefix:G.prefix})}</g>`);let e=s.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(_(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else s.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:c,height:l}=n.node().getBBox();a.width=c,a.height=l,e.setElementForId(a.id,n)}return 0},`drawServices`),fe=i(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`);S([{name:G.prefix,icons:G}]),n.use(ee.default);function K(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}i(K,`addServices`);function q(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}i(q,`addJunctions`);function J(e,t){t.nodes().map(t=>{let n=B(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}i(J,`positionNodes`);function Y(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}i(Y,`addGroups`);function X(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:c,rhsGroup:l,title:u}=e,d=N(e.lhsDir,e.rhsDir)?`segments`:`straight`,f={id:`${n}-${r}`,label:u,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:c,targetArrow:o,targetGroup:l,targetEndpoint:c===`L`?`0 50%`:c===`R`?`100% 50%`:c===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:f,classes:d})})}i(X,`addEdges`);function Z(e,t,n,r=[]){let a=i((e,t)=>{let r=new Map;for(let[i,a]of e.entries()){let e=`${i}`,o=0,s=[...a.entries()];if(s.length===1){r.set(e,s[0][1]);continue}for(let i=0;i<s.length-1;i++)for(let a=i+1;a<s.length;a++){let[c,l]=s[i],[u,d]=s[a];if(n.get(R(c,u))===t)r.set(e,[...r.get(e)??[],...l,...d]);else if(c==="default"||u==="default")r.set(e,[...r.get(e)??[],...l,...d]);else{let t=`${e}-${o++}`;r.set(t,l);let n=`${e}-${o++}`;r.set(n,d)}}}return r},`flattenAlignments`),[o,s]=t.map(t=>{let n=new Map,r=new Map;return t.forEach(([t,i],a)=>{let o=e.getNode(a)?.in??`default`,s=n.get(i)??new Map;n.has(i)||n.set(i,s);let c=r.get(t)??new Map;r.has(t)||r.set(t,c);for(let e of[s,c]){let t=e.get(o)??[];e.has(o)||e.set(o,t),t.push(a)}}),{horiz:[...a(n,`horizontal`).values()].filter(e=>e.length>1),vert:[...a(r,`vertical`).values()].filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),c=new Set;r.forEach(e=>e.members.forEach(e=>c.add(e)));let l=i(e=>e.filter(e=>!e.some(e=>c.has(e))),`dropOverlapping`),u=l(o),d=l(s);return r.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}i(Z,`getAlignments`);function Q(e,t,n=[]){let r=[],a=t.getConfigField(`iconSize`),o=t.getConfigField(`idealEdgeLengthMultiplier`),s=o*a,c=new Set;n.forEach(e=>{for(let t=0;t<e.members.length-1;t++){let n=e.members[t],i=e.members[t+1];c.add(`${n}|${i}`),c.add(`${i}|${n}`),e.direction===`row`?r.push({left:n,right:i,gap:s}):r.push({top:n,bottom:i,gap:s})}});let l=i(e=>`${e[0]},${e[1]}`,`posToStr`),u=i(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=new Map([...e.entries()].map(([e,t])=>[l(t),e])),n=[l([0,0])],i={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){i[e]=1;let d=t.get(e);if(d){let f=u(e);Object.entries(s).forEach(([e,s])=>{let u=l([f[0]+s[0],f[1]+s[1]]),p=t.get(u);if(p&&!i[u]){if(n.push(u),c.has(`${d}|${p}`))return;r.push({[D[e]]:p,[D[te(e)]]:d,gap:o*a})}})}}}}),r}i(Q,`getRelativeConstraints`);function $(e,r,o,s,c,{spatialMaps:l,groupAlignments:u}){return new Promise(d=>{let f=t(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),p=n({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${c.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${c.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),Y(o,p),K(e,p,c),q(r,p,c),X(s,p);let m=c.getLayoutHints(),h=Z(c,l,u,m),g=Q(l,c,m),_=c.getConfigField(`iconSize`),v=c.getConfigField(`idealEdgeLengthMultiplier`)*_,y=.5*_,b=c.getConfigField(`edgeElasticity`),x=c.getConfigField(`seed`),S=p.layout({name:`fcose`,quality:`proof`,randomize:c.getConfigField(`randomize`),nodeSeparation:c.getConfigField(`nodeSeparation`),numIter:c.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=B(t),{parent:i}=B(n);return r===i?v:y},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=B(t),{parent:i}=B(n);return r===i?b:.001},alignmentConstraint:h,relativePlacementConstraint:g});S.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:c,y:l}=t;a=(r-s+(o-n)*(s-l)/(o-c))/Math.sqrt(1+((s-l)/(o-c))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let u=Math.sqrt((c-o)**2+(l-s)**2);i/=u;let d=(c-o)*(r-s)-(l-s)*(n-o);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let f=(c-o)*(n-o)+(l-s)*(r-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1}return a=Math.abs(a)*d,i*=f,{distances:a,weights:i}}i(e,`getSegmentWeights`),p.startBatch();for(let t of Object.values(p.edges()))if(t.data?.()){let{x:n,y:r}=t.source().position(),{x:i,y:a}=t.target().position();if(n!==i&&r!==a){let n=t.sourceEndpoint(),r=t.targetEndpoint(),{sourceDir:i}=z(t),[a,o]=M(i)?[n.x,r.y]:[r.x,n.y],{weights:s,distances:c}=e(n,r,a,o);t.style(`segment-distances`,c),t.style(`segment-weights`,s)}}p.endBatch(),U(x,()=>S.run())});try{U(x,()=>S.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}p.ready(e=>{a.info(`Ready`,e),d(p)})})}i($,`layoutArchitecture`);var pe={parser:H,get db(){return new V},renderer:{draw:i(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),s=i.getGroups(),c=i.getEdges(),u=i.getDataStructures(),d=v(t),f=d.append(`g`);f.attr(`class`,`architecture-edges`);let p=d.append(`g`);p.attr(`class`,`architecture-services`);let m=d.append(`g`);m.attr(`class`,`architecture-groups`),await de(i,p,a,t),fe(i,p,o,t);let h=await $(a,o,s,c,i,u);await le(f,h,i,t),await ue(m,h,i,t),J(i,h),l(void 0,d,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:ce};export{pe as diagram};
@@ -1,4 +1,4 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as n}from"./src-XiVvaevx.js";import{t as r}from"./chunk-X3CZISLH-BixgQztF.js";import{H as i,J as a,K as o,U as s,a as c,b as l,f as u,v as d,w as f,x as p,y as m,z as h}from"./chunk-DU6HZSFF-CWlP1Dk_.js";import{t as g}from"./chunk-CLGD4ZFX-BfYJtJm1.js";import{i as _,r as v,t as y}from"./chunk-PWAF6VOD-D_kLse-N.js";import{c as b,i as x}from"./chunk-75Z2AOVW-DitkSoSG.js";import{n as S}from"./chunk-GMAD6QVW-Bgk8qnty.js";import{t as C}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as w}from"./mermaid-parser.core-Bpogunsh.js";import{t as T}from"./cytoscape.esm-EK2DW5Qr.js";import{t as E}from"./cytoscape-fcose-DE9_QRG_.js";var ee=e(E(),1),D={L:`left`,R:`right`,T:`top`,B:`bottom`},O={L:t(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:t(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:t(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:t(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},k={L:t((e,t)=>e-t+2,`L`),R:t((e,t)=>e-2,`R`),T:t((e,t)=>e-t+2,`T`),B:t((e,t)=>e-2,`B`)},A=t(function(e){return M(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),j=t(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),M=t(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),N=t(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),P=t(function(e,t){let n=M(e)&&N(t),r=N(e)&&M(t);return n||r},`isArchitectureDirectionXY`),te=t(function(e){let t=e[0],n=e[1],r=M(t)&&N(n),i=N(t)&&M(n);return r||i},`isArchitecturePairXY`),F=t(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),I=t(function(e,t){let n=`${e}${t}`;return F(n)?n:void 0},`getArchitectureDirectionPair`),L=t(function([e,t],n){let r=n[0],i=n[1];return M(r)?N(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:M(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ne=t(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),re=t(function(e,t){return P(e,t)?`bend`:M(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),ie=t(function(e){return e.type===`service`},`isArchitectureService`),ae=t(function(e){return e.type===`junction`},`isArchitectureJunction`),R=t((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),z=t(e=>e.data(),`edgeData`),B=t(e=>e.data(),`nodeData`),oe=u.architecture,V=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=s,this.getAccTitle=m,this.setDiagramTitle=o,this.getDiagramTitle=f,this.getAccDescription=d,this.setAccDescription=i,this.clear()}static{t(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,c()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(ie)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ae)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!j(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!j(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,n=new Map;for(let[t,r]of this.nodes.entries()){let i=new Map;for(let n of r.edges){let r=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(r&&a&&r!==a){let t=re(n.lhsDir,n.rhsDir);t!==`bend`&&e.set(R(r,a),t)}if(n.lhsId===t){let e=I(n.lhsDir,n.rhsDir);e&&i.set(e,n.rhsId)}else{let e=I(n.rhsDir,n.lhsDir);e&&i.set(e,n.lhsId)}}n.set(t,i)}let r=new Set,i=new Set(n.keys()),a=t(e=>{let t=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){r.add(e),i.delete(e);let o=n.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=t.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,n)=>{r.has(e)||(t.set(e,L([c,l],n)),a.push(e))})}}return t},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:n,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return x({...oe,...l().architecture})}getConfigField(e){return this.getConfig()[e]}},se=t((e,t)=>{C(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),H={parser:{yy:void 0},parse:t(async e=>{let t=await w(`architecture`,e);r.debug(t);let n=H.parser?.yy;if(!(n instanceof V))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(t,n)},`parse`)},ce=t(e=>`
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as n}from"./src-XiVvaevx.js";import{t as r}from"./chunk-X3CZISLH-BixgQztF.js";import{H as i,J as a,K as o,U as s,a as c,b as l,f as u,v as d,w as f,x as p,y as m,z as h}from"./chunk-DU6HZSFF-C-18UZkS.js";import{t as g}from"./chunk-CLGD4ZFX-DJiSE0gD.js";import{i as _,r as v,t as y}from"./chunk-PWAF6VOD-B-AT-L2H.js";import{c as b,i as x}from"./chunk-75Z2AOVW-BRdhvVTZ.js";import{n as S}from"./chunk-GMAD6QVW-DnZH7DxV.js";import{t as C}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as w}from"./mermaid-parser.core-mE6t1qEO.js";import{t as T}from"./cytoscape.esm-EK2DW5Qr.js";import{t as E}from"./cytoscape-fcose-DE9_QRG_.js";var ee=e(E(),1),D={L:`left`,R:`right`,T:`top`,B:`bottom`},O={L:t(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:t(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:t(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:t(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},k={L:t((e,t)=>e-t+2,`L`),R:t((e,t)=>e-2,`R`),T:t((e,t)=>e-t+2,`T`),B:t((e,t)=>e-2,`B`)},A=t(function(e){return M(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),j=t(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),M=t(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),N=t(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),P=t(function(e,t){let n=M(e)&&N(t),r=N(e)&&M(t);return n||r},`isArchitectureDirectionXY`),te=t(function(e){let t=e[0],n=e[1],r=M(t)&&N(n),i=N(t)&&M(n);return r||i},`isArchitecturePairXY`),F=t(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),I=t(function(e,t){let n=`${e}${t}`;return F(n)?n:void 0},`getArchitectureDirectionPair`),L=t(function([e,t],n){let r=n[0],i=n[1];return M(r)?N(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:M(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ne=t(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),re=t(function(e,t){return P(e,t)?`bend`:M(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),ie=t(function(e){return e.type===`service`},`isArchitectureService`),ae=t(function(e){return e.type===`junction`},`isArchitectureJunction`),R=t((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),z=t(e=>e.data(),`edgeData`),B=t(e=>e.data(),`nodeData`),oe=u.architecture,V=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=s,this.getAccTitle=m,this.setDiagramTitle=o,this.getDiagramTitle=f,this.getAccDescription=d,this.setAccDescription=i,this.clear()}static{t(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,c()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(ie)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ae)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!j(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!j(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,n=new Map;for(let[t,r]of this.nodes.entries()){let i=new Map;for(let n of r.edges){let r=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(r&&a&&r!==a){let t=re(n.lhsDir,n.rhsDir);t!==`bend`&&e.set(R(r,a),t)}if(n.lhsId===t){let e=I(n.lhsDir,n.rhsDir);e&&i.set(e,n.rhsId)}else{let e=I(n.rhsDir,n.lhsDir);e&&i.set(e,n.lhsId)}}n.set(t,i)}let r=new Set,i=new Set(n.keys()),a=t(e=>{let t=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){r.add(e),i.delete(e);let o=n.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=t.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,n)=>{r.has(e)||(t.set(e,L([c,l],n)),a.push(e))})}}return t},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:n,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return x({...oe,...l().architecture})}getConfigField(e){return this.getConfig()[e]}},se=t((e,t)=>{C(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),H={parser:{yy:void 0},parse:t(async e=>{let t=await w(`architecture`,e);r.debug(t);let n=H.parser?.yy;if(!(n instanceof V))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(t,n)},`parse`)},ce=t(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
@@ -0,0 +1 @@
1
+ *,:before,:after{box-sizing:border-box;margin:0;padding:0}html{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;scroll-behavior:smooth;hanging-punctuation:first last;scroll-padding-top:var(--space-16);overscroll-behavior:none;height:100%;overflow:hidden}body{height:100%;min-height:100dvh;line-height:1.6;font-family:var(--font-body,sans-serif);font-size:var(--text-sm);color:var(--color-text);background-color:var(--color-bg);overflow:hidden}img,picture,video,canvas,svg{max-width:100%;height:auto;display:block}ul[role=list],ol[role=list]{list-style:none}input,button,textarea,select{font:inherit;color:inherit}h1,h2,h3,h4,h5,h6{font-family:var(--font-display,inherit);text-wrap:balance;line-height:1.15}p,li,figcaption{text-wrap:pretty;max-width:72ch}::selection{background:oklch(from var(--color-primary) l c h / .25);color:var(--color-text)}:focus-visible{outline:2px solid var(--color-primary);outline-offset:3px;border-radius:var(--radius-sm)}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}button{cursor:pointer;background:0 0;border:none}table{border-collapse:collapse;width:100%}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
@@ -1,9 +1,9 @@
1
- import{p as e}from"./src-XiVvaevx.js";import{c as t}from"./purify.es-go7v6Te-.js";import{t as n}from"./channel-CgcHBnmr.js";import{t as r}from"./clone-C1hp9FUh.js";import{t as i}from"./graphlib-C9Tl7QrK.js";import{n as a}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t as o}from"./chunk-X3CZISLH-DwWpRaN8.js";import{a as s,b as c,c as l,s as u,x as d}from"./chunk-O7XYJQB3-D0_ZY2za.js";import"./chunk-742MDFTN-D1nh6vNv.js";import{l as f}from"./chunk-ZIGJFQKS-b8OUHKK5.js";import"./chunk-MBY4JIJT-DTJ4UcAm.js";import{t as p}from"./chunk-5VM5RSS4-hE9rU_bl.js";import{t as m}from"./chunk-DUW6YSOI-Dgx8z5s3.js";import"./chunk-7PRAP22T-9uTvtc_-.js";import{i as h,n as g,o as _,r as v,s as y}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import"./chunk-7INBJB4K-CDmiHbaX.js";import{i as b,r as x}from"./chunk-5DYCD2WN-BKWCKnK-.js";import{a as S,c as C,i as w,l as T}from"./chunk-Z7XXMR3K-P4Vaq8hD.js";var E=(function(){var e=a(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:a(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:a(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:o,39:s,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:o,39:s,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:o},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:a(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:a(function(e){var t=this,n=[0],r=[],i=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,o.length-=e}a(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}a(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{p as e}from"./src-XiVvaevx.js";import{c as t}from"./purify.es-go7v6Te-.js";import{t as n}from"./channel-CgcHBnmr.js";import{t as r}from"./clone-C1hp9FUh.js";import{t as i}from"./graphlib-DS17s2tU.js";import{n as a}from"./chunk-Y2CYZVJY-BbRBGnmc.js";import{t as o}from"./chunk-X3CZISLH-DwWpRaN8.js";import{a as s,b as c,c as l,s as u,y as d}from"./chunk-VPRB5NB3-BqaJfj_v.js";import"./chunk-HJ2JQQFS-DQX7RePR.js";import{u as f}from"./chunk-3YJQHVM4-Ctp__8EK.js";import"./chunk-E2ZNV5FY-D_07zfWd.js";import{t as p}from"./chunk-5VM5RSS4-hE9rU_bl.js";import{t as m}from"./chunk-DUW6YSOI-Dgx8z5s3.js";import"./chunk-4EA7E6EY-bU4wRJot.js";import{i as h,n as g,o as _,r as v,s as y}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import"./chunk-XC4XBNZT-D9oehSn8.js";import{i as b,r as x}from"./chunk-DBDB3WZW-CXleNlok.js";import{a as S,c as C,i as w,l as T}from"./chunk-2BW5OAIV-CNFO1U_e.js";var E=(function(){var e=a(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:a(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:a(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:o,39:s,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:o,39:s,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:o},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:a(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:a(function(e){var t=this,n=[0],r=[],i=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,o.length-=e}a(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}a(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],i,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:a(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:a(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:a(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:a(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:a(function(){return this._more=!0,this},`more`),reject:a(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
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:a(function(e){this.unput(this.match.slice(e))},`less`),pastInput:a(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:a(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:a(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
5
  `+t+`^`},`showPosition`),test_match:a(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):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:a(function(){return this.next()||this.lex()},`lex`),begin:a(function(e){this.conditionStack.push(e)},`begin`),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:a(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:a(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:a(function(e){this.begin(e)},`pushState`),stateStackSize:a(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:a(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return a(v,`Parser`),v.prototype=_,_.Parser=v,new v})();E.parser=E;var D=E,O=new Map,k=[],A=new Map,j=`color`,M=`fill`,ee=`bgFill`,N=`,`,P=new Map,F=``,te=a(e=>u.sanitizeText(e,d()),`sanitizeText`),ne=a(function(e,t=``){let n=P.get(e);n||(n={id:e,styles:[],textStyles:[]},P.set(e,n)),t?.split(N).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(j).exec(e)){let e=t.replace(M,ee).replace(j,M);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),re=a(function(e,t=``){let n=O.get(e);t!=null&&(n.styles=t.split(N))},`addStyle2Node`),ie=a(function(e,t){e.split(`,`).forEach(function(e){let n=O.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},O.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),I=0,L=a((e,t)=>{let n=e.flat(),i=[],a=n.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of n){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&o.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=te(e.label),e.type===`classDef`){ne(e.id,e.css);continue}if(e.type===`applyClass`){ie(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&re(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(A.get(e.id)??0)+1;A.set(e.id,t),e.id=t+`-`+e.id,k.push(e)}else{e.label||=e.type===`composite`?``:e.id;let t=O.get(e.id);if(t===void 0?(e.type===`composite`&&(e.colorIndex=I++),O.set(e.id,e)):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&L(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n<t;n++){let t=r(e);t.id=t.id+`-`+n,O.set(t.id,t),i.push(t)}}else t===void 0&&i.push(e)}}t.children=i},`populateBlockDatabase`),R=[],z={id:`root`,type:`composite`,children:[],columns:-1},ae=a(()=>{o.debug(`Clear called`),s(),z={id:`root`,type:`composite`,children:[],columns:-1},O=new Map([[`root`,z]]),R=[],P=new Map,k=[],A=new Map,F=``,I=0},`clear`);function B(e){switch(o.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return o.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}a(B,`typeStr2Type`);function V(e){switch(o.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}a(V,`edgeTypeStr2Type`);function H(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}a(H,`edgeStrToEdgeData`);function U(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}a(U,`edgeStrToEdgeStartData`);function W(e){return e.includes(`==`)?`thick`:`normal`}a(W,`edgeStrToThickness`);function G(e){return e.includes(`.-`)?`dotted`:`solid`}a(G,`edgeStrToPattern`);var oe=0,se={getConfig:a(()=>c().block,`getConfig`),typeStr2Type:B,edgeTypeStr2Type:V,edgeStrToEdgeData:H,edgeStrToEdgeStartData:U,edgeStrToThickness:W,edgeStrToPattern:G,getLogger:a(()=>o,`getLogger`),getBlocksFlat:a(()=>[...O.values()],`getBlocksFlat`),getBlocks:a(()=>R||[],`getBlocks`),getEdges:a(()=>k,`getEdges`),setHierarchy:a(e=>{z.children=e,L(e,z),R=z.children},`setHierarchy`),getBlock:a(e=>O.get(e),`getBlock`),setBlock:a(e=>{O.set(e.id,e)},`setBlock`),getColumns:a(e=>{let t=O.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:a(function(){return P},`getClasses`),clear:ae,generateId:a(()=>(oe++,`id-`+Math.random().toString(36).substr(2,12)+`-`+oe),`generateId`),setDiagramId:a(e=>{F=e},`setDiagramId`),getDiagramId:a(()=>F,`getDiagramId`)},ce=a(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!h(t,r))return``;let i=_(e.look),a=v(n),o=``;for(let t=0;t<g(e.THEME_COLOR_LIMIT,r);t++){let e=r[t%r.length],s=a?`fill: ${n[t%n.length]};`:``,c=`[data-look="${i}"][data-color-id="color-${t}"]`;o+=`
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:a(function(){return this.next()||this.lex()},`lex`),begin:a(function(e){this.conditionStack.push(e)},`begin`),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:a(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:a(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:a(function(e){this.begin(e)},`pushState`),stateStackSize:a(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:a(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return a(v,`Parser`),v.prototype=_,_.Parser=v,new v})();E.parser=E;var D=E,O=new Map,k=[],A=new Map,j=`color`,M=`fill`,ee=`bgFill`,N=`,`,P=new Map,F=``,te=a(e=>u.sanitizeText(e,c()),`sanitizeText`),ne=a(function(e,t=``){let n=P.get(e);n||(n={id:e,styles:[],textStyles:[]},P.set(e,n)),t?.split(N).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(j).exec(e)){let e=t.replace(M,ee).replace(j,M);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),re=a(function(e,t=``){let n=O.get(e);t!=null&&(n.styles=t.split(N))},`addStyle2Node`),ie=a(function(e,t){e.split(`,`).forEach(function(e){let n=O.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},O.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),I=0,L=a((e,t)=>{let n=e.flat(),i=[],a=n.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of n){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&o.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=te(e.label),e.type===`classDef`){ne(e.id,e.css);continue}if(e.type===`applyClass`){ie(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&re(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(A.get(e.id)??0)+1;A.set(e.id,t),e.id=t+`-`+e.id,k.push(e)}else{e.label||=e.type===`composite`?``:e.id;let t=O.get(e.id);if(t===void 0?(e.type===`composite`&&(e.colorIndex=I++),O.set(e.id,e)):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&L(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n<t;n++){let t=r(e);t.id=t.id+`-`+n,O.set(t.id,t),i.push(t)}}else t===void 0&&i.push(e)}}t.children=i},`populateBlockDatabase`),R=[],z={id:`root`,type:`composite`,children:[],columns:-1},ae=a(()=>{o.debug(`Clear called`),s(),z={id:`root`,type:`composite`,children:[],columns:-1},O=new Map([[`root`,z]]),R=[],P=new Map,k=[],A=new Map,F=``,I=0},`clear`);function B(e){switch(o.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return o.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}a(B,`typeStr2Type`);function V(e){switch(o.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}a(V,`edgeTypeStr2Type`);function H(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}a(H,`edgeStrToEdgeData`);function U(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}a(U,`edgeStrToEdgeStartData`);function W(e){return e.includes(`==`)?`thick`:`normal`}a(W,`edgeStrToThickness`);function G(e){return e.includes(`.-`)?`dotted`:`solid`}a(G,`edgeStrToPattern`);var oe=0,se={getConfig:a(()=>d().block,`getConfig`),typeStr2Type:B,edgeTypeStr2Type:V,edgeStrToEdgeData:H,edgeStrToEdgeStartData:U,edgeStrToThickness:W,edgeStrToPattern:G,getLogger:a(()=>o,`getLogger`),getBlocksFlat:a(()=>[...O.values()],`getBlocksFlat`),getBlocks:a(()=>R||[],`getBlocks`),getEdges:a(()=>k,`getEdges`),setHierarchy:a(e=>{z.children=e,L(e,z),R=z.children},`setHierarchy`),getBlock:a(e=>O.get(e),`getBlock`),setBlock:a(e=>{O.set(e.id,e)},`setBlock`),getColumns:a(e=>{let t=O.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:a(function(){return P},`getClasses`),clear:ae,generateId:a(()=>(oe++,`id-`+Math.random().toString(36).substr(2,12)+`-`+oe),`generateId`),setDiagramId:a(e=>{F=e},`setDiagramId`),getDiagramId:a(()=>F,`getDiagramId`)},ce=a(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!h(t,r))return``;let i=_(e.look),a=v(n),o=``;for(let t=0;t<g(e.THEME_COLOR_LIMIT,r);t++){let e=r[t%r.length],s=a?`fill: ${n[t%n.length]};`:``,c=`[data-look="${i}"][data-color-id="color-${t}"]`;o+=`
7
7
 
8
8
  ${c}.node rect.composite {
9
9
  stroke: ${e};
@@ -137,4 +137,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
137
137
  fill: ${e.textColor};
138
138
  }
139
139
  ${p()}
140
- `,`getStyles`);function q(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}a(q,`calculateBlockPosition`);var ue=a(e=>{let t=0,n=0;for(let r of e.children){let{width:e,height:i,x:a,y:s}=r.size??{width:0,height:0,x:0,y:0};if(o.debug(`getMaxChildSize abc95 child:`,r.id,`width:`,e,`height:`,i,`x:`,a,`y:`,s,r.type),r.type===`space`)continue;let c=e/(r.widthInColumns??1);c>t&&(t=c),i>n&&(n=i)}return{width:t,height:n}},`getMaxChildSize`);function J(e,t,n=0,r=0,i=8){o.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,n),e?.size?.width||(e.size={width:n,height:r,x:0,y:0});let a=0,s=0;if(e.children?.length>0){for(let n of e.children)J(n,t,0,0,i);let c=ue(e);a=c.width,s=c.height,o.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,a,s);for(let t of e.children)t.size&&(o.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${a} ${s} ${JSON.stringify(t.size)}`),t.size.width=a*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=s,t.size.x=0,t.size.y=0,o.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${a} maxHeight:${s}`));for(let n of e.children)J(n,t,a,s,i);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l<u&&(d=l);let f=Math.ceil(u/d),p=d*(a+i)+i,m=f*(s+i)+i;if(p<n){o.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${p}`),p=n,m=r;let t=(n-d*i-i)/d,c=(r-f*i-i)/f;o.debug(`Size indata abc88`,e.id,`childWidth`,t,`maxWidth`,a),o.debug(`Size indata abc88`,e.id,`childHeight`,c,`maxHeight`,s),o.debug(`Size indata abc88 xSize`,d,`padding`,i);for(let n of e.children)n.size&&(n.size.width=t,n.size.height=c,n.size.x=0,n.size.y=0)}if(o.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${f} columns ${l}${e.children.length} width=${Math.max(p,e.size?.width||0)}`),p<(e?.size?.width||0)){p=e?.size?.width||0;let t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){let n=(p-t*i-i)/t;o.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,n);for(let t of e.children)t.size&&(t.size.width=n)}}e.size={width:p,height:m,x:0,y:0}}o.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}a(J,`setBlockSizes`);function Y(e,t,n=8){o.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let r=e.columns??-1;if(o.debug(`layoutBlocks columns abc95`,e.id,`=>`,r,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,a=e.children.length*i+(e.children.length-1)*n;o.debug(`widthOfChildren 88`,a,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=q(r,t),i=s.get(e)??0;n.size.height>i&&s.set(e,n.size.height);let a=n?.widthInColumns??1;r>0&&(a=Math.min(a,r-t%r)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let r of t)c.set(r,e),e+=(s.get(r)??0)+n}let l=0;o.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,d=0;for(let i of e.children){let a=e;if(!i.size)continue;let{width:f,height:p}=i.size,{px:m,py:h}=q(r,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,o.debug(`New row in layout for block`,e.id,` and child `,i.id,d)),o.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${m},${h} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${f}${n}`),a.size){let e=f/2;i.size.x=u+n+e,o.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${u} new startingPosX${i.size.x} ${e} padding=${n} width=${f} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(i?.widthInColumns??1)/2}`),u=i.size.x+e;let t=c.get(h)??0,r=s.get(h)??p;i.size.y=a.size.y-a.size.height/2+t+r/2+n,o.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${u}${n}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${f*(i?.widthInColumns??1)/2}`)}i.children&&Y(i,t,n);let g=i?.widthInColumns??1;r>0&&(g=Math.min(g,r-l%r)),l+=g,o.debug(`abc88 columnsPos`,i,l)}}o.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}a(Y,`layoutBlocks`);function X(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2<t&&(t=a-s/2),o-c/2<n&&(n=o-c/2),a+s/2>r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=X(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}a(X,`findBounds`);function de(e){let t=e.getBlock(`root`);if(!t)return;let n=d()?.block?.padding??8;J(t,e,0,0,n),Y(t,e,n),o.debug(`getBlocks`,JSON.stringify(t,null,2));let{minX:r,minY:i,maxX:a,maxY:s}=X(t),c=s-i;return{x:r,y:i,width:a-r,height:c}}a(de,`layout`);function Z(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=(r?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),o=0,s=`rect`,l;switch(r.type){case`round`:o=5,s=`rect`;break;case`composite`:o=0,s=`composite`,l=0;break;case`square`:s=`rect`;break;case`diamond`:s=`question`;break;case`hexagon`:s=`hexagon`;break;case`block_arrow`:s=`block_arrow`;break;case`odd`:s=`rect_left_inv_arrow`;break;case`lean_right`:s=`lean_right`;break;case`lean_left`:s=`lean_left`;break;case`trapezoid`:s=`trapezoid`;break;case`inv_trapezoid`:s=`inv_trapezoid`;break;case`rect_left_inv_arrow`:s=`rect_left_inv_arrow`;break;case`circle`:s=`circle`;break;case`ellipse`:s=`ellipse`;break;case`stadium`:s=`stadium`;break;case`subroutine`:s=`subroutine`;break;case`cylinder`:s=`cylinder`;break;case`group`:s=`rect`;break;case`doublecircle`:s=`doublecircle`;break;default:s=`rect`}let u=f(r?.styles??[]),d=r.label,p=r.size??{width:0,height:0,x:0,y:0},m=t.getDiagramId();return{labelStyle:u.labelStyle,shape:s,label:d,labelText:d,rx:o,ry:o,class:i,cssClasses:i,cssStyles:r?.styles??[],cssCompiledStyles:a,style:u.style,id:r.id,domId:m?`${m}-${r.id}`:r.id,isGroup:!1,directions:r.directions,width:p.width||void 0,height:p.height||void 0,wrappingWidth:p.width||1/0,x:p.x,y:p.y,positioned:n,intersect:void 0,padding:l??c()?.block?.padding??0,widthInColumns:r.widthInColumns??1,colorIndex:r.colorIndex,look:c().look}}a(Z,`getNodeFromBlock`);async function fe(e,t,n){let r=Z(t,n,!1);if(t.type===`group`)return;let i=c(),a=await x(e,r,{config:i}),o=a.node()?.getBBox()??{width:0,height:0},s=n.getBlock(r.id);s.size={width:o.width,height:o.height,x:0,y:0,node:a},n.setBlock(s),a.remove()}a(fe,`calculateBlockSize`);async function pe(e,t,n){let r=Z(t,n,!0);if(n.getBlock(r.id).type!==`space`){let n=c(),i=await x(e,r,{config:n});r.colorIndex!==void 0&&y(i,r.colorIndex,n.theme,n.themeVariables?.borderColorArray),t.intersect=r?.intersect,b(r)}}a(pe,`insertBlockPositioned`);async function Q(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await Q(e,i.children,n,r)}a(Q,`performOperations`);async function me(e,t,n){await Q(e,t,n,fe)}a(me,`calculateBlockSizes`);async function he(e,t,n){await Q(e,t,n,pe)}a(he,`insertBlocks`);async function $(e,t,n,r,a){let o=new i({multigraph:!0,compound:!0});o.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),i=r.getBlock(n.end);if(t?.size&&i?.size){let r=t.size,s=i.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=a?`${a}-${n.id}`:n.id,u=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;w(e,{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u},{},`block`,o.node(n.start),o.node(n.end),a),n.label&&(await S(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u}),T({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}a($,`insertEdges`);var ge={parser:D,db:se,renderer:{draw:a(async function(t,n,r,i){let{securityLevel:a,block:s}=c(),u=i.db;u.setDiagramId(n);let d;a===`sandbox`&&(d=e(`#i`+n));let f=e(a===`sandbox`?d.nodes()[0].contentDocument.body:`body`),p=a===`sandbox`?f.select(`[id="${n}"]`):e(`[id="${n}"]`);m(p,c()),C(p,[`point`,`circle`,`cross`],i.type,n);let h=u.getBlocks(),g=u.getBlocksFlat(),_=u.getEdges(),v=p.insert(`g`).attr(`class`,`block`);await me(v,h,u);let y=de(u);await he(v,h,u),await $(v,_,g,u,n);let b=v.node()?.getBBox(),x=b&&Number.isFinite(b.width)&&Number.isFinite(b.height)?b:y;if(x){let e=Math.max(1,Math.round(.125*(x.width/x.height))),t=x.height+e+10,n=x.width+10,{useMaxWidth:r}=s;l(p,t,n,!!r),o.debug(`Here Bounds`,y,x),p.attr(`viewBox`,`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},`draw`),getClasses:a(function(e,t){return t.db.getClasses()},`getClasses`)},styles:le};export{ge as diagram};
140
+ `,`getStyles`);function q(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}a(q,`calculateBlockPosition`);var ue=a(e=>{let t=0,n=0;for(let r of e.children){let{width:e,height:i,x:a,y:s}=r.size??{width:0,height:0,x:0,y:0};if(o.debug(`getMaxChildSize abc95 child:`,r.id,`width:`,e,`height:`,i,`x:`,a,`y:`,s,r.type),r.type===`space`)continue;let c=e/(r.widthInColumns??1);c>t&&(t=c),i>n&&(n=i)}return{width:t,height:n}},`getMaxChildSize`);function J(e,t,n=0,r=0,i=8){o.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,n),e?.size?.width||(e.size={width:n,height:r,x:0,y:0});let a=0,s=0;if(e.children?.length>0){for(let n of e.children)J(n,t,0,0,i);let c=ue(e);a=c.width,s=c.height,o.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,a,s);for(let t of e.children)t.size&&(o.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${a} ${s} ${JSON.stringify(t.size)}`),t.size.width=a*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=s,t.size.x=0,t.size.y=0,o.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${a} maxHeight:${s}`));for(let n of e.children)J(n,t,a,s,i);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l<u&&(d=l);let f=Math.ceil(u/d),p=d*(a+i)+i,m=f*(s+i)+i;if(p<n){o.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${p}`),p=n,m=r;let t=(n-d*i-i)/d,c=(r-f*i-i)/f;o.debug(`Size indata abc88`,e.id,`childWidth`,t,`maxWidth`,a),o.debug(`Size indata abc88`,e.id,`childHeight`,c,`maxHeight`,s),o.debug(`Size indata abc88 xSize`,d,`padding`,i);for(let n of e.children)n.size&&(n.size.width=t,n.size.height=c,n.size.x=0,n.size.y=0)}if(o.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${f} columns ${l}${e.children.length} width=${Math.max(p,e.size?.width||0)}`),p<(e?.size?.width||0)){p=e?.size?.width||0;let t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){let n=(p-t*i-i)/t;o.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,n);for(let t of e.children)t.size&&(t.size.width=n)}}e.size={width:p,height:m,x:0,y:0}}o.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}a(J,`setBlockSizes`);function Y(e,t,n=8){o.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let r=e.columns??-1;if(o.debug(`layoutBlocks columns abc95`,e.id,`=>`,r,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,a=e.children.length*i+(e.children.length-1)*n;o.debug(`widthOfChildren 88`,a,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=q(r,t),i=s.get(e)??0;n.size.height>i&&s.set(e,n.size.height);let a=n?.widthInColumns??1;r>0&&(a=Math.min(a,r-t%r)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let r of t)c.set(r,e),e+=(s.get(r)??0)+n}let l=0;o.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,d=0;for(let i of e.children){let a=e;if(!i.size)continue;let{width:f,height:p}=i.size,{px:m,py:h}=q(r,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,o.debug(`New row in layout for block`,e.id,` and child `,i.id,d)),o.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${m},${h} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${f}${n}`),a.size){let e=f/2;i.size.x=u+n+e,o.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${u} new startingPosX${i.size.x} ${e} padding=${n} width=${f} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(i?.widthInColumns??1)/2}`),u=i.size.x+e;let t=c.get(h)??0,r=s.get(h)??p;i.size.y=a.size.y-a.size.height/2+t+r/2+n,o.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${u}${n}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${f*(i?.widthInColumns??1)/2}`)}i.children&&Y(i,t,n);let g=i?.widthInColumns??1;r>0&&(g=Math.min(g,r-l%r)),l+=g,o.debug(`abc88 columnsPos`,i,l)}}o.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}a(Y,`layoutBlocks`);function X(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2<t&&(t=a-s/2),o-c/2<n&&(n=o-c/2),a+s/2>r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=X(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}a(X,`findBounds`);function de(e){let t=e.getBlock(`root`);if(!t)return;let n=c()?.block?.padding??8;J(t,e,0,0,n),Y(t,e,n),o.debug(`getBlocks`,JSON.stringify(t,null,2));let{minX:r,minY:i,maxX:a,maxY:s}=X(t),l=s-i;return{x:r,y:i,width:a-r,height:l}}a(de,`layout`);function Z(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=(r?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),o=0,s=`rect`,c;switch(r.type){case`round`:o=5,s=`rect`;break;case`composite`:o=0,s=`composite`,c=0;break;case`square`:s=`rect`;break;case`diamond`:s=`question`;break;case`hexagon`:s=`hexagon`;break;case`block_arrow`:s=`block_arrow`;break;case`odd`:s=`rect_left_inv_arrow`;break;case`lean_right`:s=`lean_right`;break;case`lean_left`:s=`lean_left`;break;case`trapezoid`:s=`trapezoid`;break;case`inv_trapezoid`:s=`inv_trapezoid`;break;case`rect_left_inv_arrow`:s=`rect_left_inv_arrow`;break;case`circle`:s=`circle`;break;case`ellipse`:s=`ellipse`;break;case`stadium`:s=`stadium`;break;case`subroutine`:s=`subroutine`;break;case`cylinder`:s=`cylinder`;break;case`group`:s=`rect`;break;case`doublecircle`:s=`doublecircle`;break;default:s=`rect`}let l=f(r?.styles??[]),u=r.label,p=r.size??{width:0,height:0,x:0,y:0},m=t.getDiagramId();return{labelStyle:l.labelStyle,shape:s,label:u,labelText:u,rx:o,ry:o,class:i,cssClasses:i,cssStyles:r?.styles??[],cssCompiledStyles:a,style:l.style,id:r.id,domId:m?`${m}-${r.id}`:r.id,isGroup:!1,directions:r.directions,width:p.width||void 0,height:p.height||void 0,wrappingWidth:p.width||1/0,x:p.x,y:p.y,positioned:n,intersect:void 0,padding:c??d()?.block?.padding??0,widthInColumns:r.widthInColumns??1,colorIndex:r.colorIndex,look:d().look}}a(Z,`getNodeFromBlock`);async function fe(e,t,n){let r=Z(t,n,!1);if(t.type===`group`)return;let i=d(),a=await x(e,r,{config:i}),o=a.node()?.getBBox()??{width:0,height:0},s=n.getBlock(r.id);s.size={width:o.width,height:o.height,x:0,y:0,node:a},n.setBlock(s),a.remove()}a(fe,`calculateBlockSize`);async function pe(e,t,n){let r=Z(t,n,!0);if(n.getBlock(r.id).type!==`space`){let n=d(),i=await x(e,r,{config:n});r.colorIndex!==void 0&&y(i,r.colorIndex,n.theme,n.themeVariables?.borderColorArray),t.intersect=r?.intersect,b(r)}}a(pe,`insertBlockPositioned`);async function Q(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await Q(e,i.children,n,r)}a(Q,`performOperations`);async function me(e,t,n){await Q(e,t,n,fe)}a(me,`calculateBlockSizes`);async function he(e,t,n){await Q(e,t,n,pe)}a(he,`insertBlocks`);async function $(e,t,n,r,a){let o=new i({multigraph:!0,compound:!0});o.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),i=r.getBlock(n.end);if(t?.size&&i?.size){let r=t.size,s=i.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=a?`${a}-${n.id}`:n.id,u=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;w(e,{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u},{},`block`,o.node(n.start),o.node(n.end),a),n.label&&(await S(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u}),T({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}a($,`insertEdges`);var ge={parser:D,db:se,renderer:{draw:a(async function(t,n,r,i){let{securityLevel:a,block:s}=d(),c=i.db;c.setDiagramId(n);let u;a===`sandbox`&&(u=e(`#i`+n));let f=e(a===`sandbox`?u.nodes()[0].contentDocument.body:`body`),p=a===`sandbox`?f.select(`[id="${n}"]`):e(`[id="${n}"]`);m(p,d()),C(p,[`point`,`circle`,`cross`],i.type,n);let h=c.getBlocks(),g=c.getBlocksFlat(),_=c.getEdges(),v=p.insert(`g`).attr(`class`,`block`);await me(v,h,c);let y=de(c);await he(v,h,c),await $(v,_,g,c,n);let b=v.node()?.getBBox(),x=b&&Number.isFinite(b.width)&&Number.isFinite(b.height)?b:y;if(x){let e=Math.max(1,Math.round(.125*(x.width/x.height))),t=x.height+e+10,n=x.width+10,{useMaxWidth:r}=s;l(p,t,n,!!r),o.debug(`Here Bounds`,y,x),p.attr(`viewBox`,`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},`draw`),getClasses:a(function(e,t){return t.db.getClasses()},`getClasses`)},styles:le};export{ge as diagram};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-XiVvaevx.js";import{t as n}from"./chunk-X3CZISLH-BixgQztF.js";import{c as r}from"./purify.es-go7v6Te-.js";import{t as i}from"./channel-CgcHBnmr.js";import{a,b as o,c as s,s as c,x as l}from"./chunk-DU6HZSFF-CWlP1Dk_.js";import"./chunk-P2QGCYS3-BA--DhpW.js";import"./chunk-PWAF6VOD-D_kLse-N.js";import{t as u}from"./clone-C1hp9FUh.js";import{l as d}from"./chunk-75Z2AOVW-DitkSoSG.js";import"./chunk-GMAD6QVW-Bgk8qnty.js";import"./chunk-4HAMMTFA-q0ldNVvr.js";import{i as f,r as p}from"./chunk-GVQU2GXP-CQ8cl-Uu.js";import{a as m,c as h,i as g,s as _}from"./chunk-OSK3NFVY-DqeKV_pg.js";import{t as v}from"./graphlib-C9Tl7QrK.js";import{t as y}from"./chunk-5VM5RSS4-ZNzvKenW.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-XiVvaevx.js";import{t as n}from"./chunk-X3CZISLH-BixgQztF.js";import{c as r}from"./purify.es-go7v6Te-.js";import{t as i}from"./channel-CgcHBnmr.js";import{a,b as o,c as s,s as c,x as l}from"./chunk-DU6HZSFF-C-18UZkS.js";import"./chunk-P2QGCYS3-Bfo8qS8r.js";import"./chunk-PWAF6VOD-B-AT-L2H.js";import{t as u}from"./clone-C1hp9FUh.js";import{l as d}from"./chunk-75Z2AOVW-BRdhvVTZ.js";import"./chunk-GMAD6QVW-DnZH7DxV.js";import"./chunk-4HAMMTFA-CQy6Skzw.js";import{i as f,r as p}from"./chunk-GVQU2GXP-B0Vm415C.js";import{a as m,c as h,i as g,s as _}from"./chunk-OSK3NFVY-C3JOcBao.js";import{t as v}from"./graphlib-DS17s2tU.js";import{t as y}from"./chunk-5VM5RSS4-ZNzvKenW.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(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
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`