lookatstudy-mobile 0.37.2 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/model-catalog.json +9025 -0
  2. package/package.json +1 -1
  3. package/server.cjs +1075 -564
  4. package/web/assets/{CanvasStage-By84li0a.js → CanvasStage-vallbGco.js} +1 -1
  5. package/web/assets/{CommandPalette-DJpv5YLk.js → CommandPalette-Kyu6mhyt.js} +1 -1
  6. package/web/assets/{CompanionBotLab-BrjON5X5.js → CompanionBotLab-DHmGbQJd.js} +1 -1
  7. package/web/assets/{CourseSearchPanel-Dp-83TJq.js → CourseSearchPanel-CrpFIaU8.js} +2 -2
  8. package/web/assets/{ExamView-BiWyQCTQ.js → ExamView-BBwDRS1g.js} +1 -1
  9. package/web/assets/{MermaidArtifact-C-9JGr1S.js → MermaidArtifact-x5kLLb52.js} +3 -3
  10. package/web/assets/ModelManagerModal-CHz1i5v2.js +6 -0
  11. package/web/assets/{PersonalProfileModal-Bberh-21.js → PersonalProfileModal-DJdHOMH9.js} +2 -2
  12. package/web/assets/{ReviewPanel-D52vKY80.js → ReviewPanel-BJhoJAOK.js} +1 -1
  13. package/web/assets/SettingsView-COw_GSOo.js +15 -0
  14. package/web/assets/Toggle-Bkokw_WS.js +1 -0
  15. package/web/assets/{VoicePanel-Df6DgExP.js → VoicePanel-DPrlBZ48.js} +1 -1
  16. package/web/assets/{abnfDiagram-VCTEODGH-xWn5W_Em.js → abnfDiagram-VCTEODGH-DXAHXtdM.js} +1 -1
  17. package/web/assets/{abnfDiagram-VCTEODGH-ODA7YWAP-GEEhu7or.js → abnfDiagram-VCTEODGH-ODA7YWAP-BdHlSP1w.js} +1 -1
  18. package/web/assets/api-web-BhgWWd1h.js +1 -0
  19. package/web/assets/{architectureDiagram-5GKGNRK7-C4PU3XN7-JmOGh5LH.js → architectureDiagram-5GKGNRK7-C4PU3XN7-B4RCVI81.js} +1 -1
  20. package/web/assets/{architectureDiagram-5GKGNRK7-CvI35bTW.js → architectureDiagram-5GKGNRK7-DViQRgRS.js} +1 -1
  21. package/web/assets/{blockDiagram-I7D4REHJ-BMKUeuF0.js → blockDiagram-I7D4REHJ-Bm4Jv7XO.js} +1 -1
  22. package/web/assets/{blockDiagram-NRAW4CY4-UMJ6PMQQ-Dv4-Yiui.js → blockDiagram-NRAW4CY4-UMJ6PMQQ-dOUZFc-F.js} +1 -1
  23. package/web/assets/{c4Diagram-7LVT6UL2-DNalANVV.js → c4Diagram-7LVT6UL2-Cn_bbm4P.js} +1 -1
  24. package/web/assets/{c4Diagram-UCG6FXSJ-75X3U2P3-BMz228D6.js → c4Diagram-UCG6FXSJ-75X3U2P3-DgytixUD.js} +1 -1
  25. package/web/assets/channel-D_-re5YU.js +1 -0
  26. package/web/assets/{chunk-2Q5K7J3B-M3FYrmxX.js → chunk-2Q5K7J3B-hNQuZg4_.js} +1 -1
  27. package/web/assets/{chunk-5VM5RSS4-nbGREPjw.js → chunk-5VM5RSS4-DwAMOseZ.js} +1 -1
  28. package/web/assets/{chunk-7XDTSPCN-rYhyRTOx.js → chunk-7XDTSPCN-COFFwjaS.js} +1 -1
  29. package/web/assets/{chunk-CTNIYPP6-BgXYMFW5.js → chunk-CTNIYPP6-B3zyRQW8.js} +1 -1
  30. package/web/assets/{chunk-CXNFBKHE-CkmFhBAk.js → chunk-CXNFBKHE-C91q6lvg.js} +1 -1
  31. package/web/assets/{chunk-F27PBJKO-CAqAYmMM.js → chunk-F27PBJKO-ia4EagnF.js} +1 -1
  32. package/web/assets/{chunk-IMKFNOWR-pDBbu4GI.js → chunk-IMKFNOWR-vd22BhM5.js} +1 -1
  33. package/web/assets/{chunk-ISA7TJRJ-CHl4BhBt.js → chunk-ISA7TJRJ-BReqmCMw.js} +1 -1
  34. package/web/assets/{chunk-JWPE2WC7-DSVI_4gB.js → chunk-JWPE2WC7-Cjsal04r.js} +1 -1
  35. package/web/assets/{chunk-LV3HUYFY-Doco33ZI.js → chunk-LV3HUYFY-D2A9VNi8.js} +1 -1
  36. package/web/assets/{chunk-M3IUQBOH-RTAJkyza.js → chunk-M3IUQBOH-DZWUYlu1.js} +1 -1
  37. package/web/assets/{chunk-NDIOYS4C-DcWvuy8G.js → chunk-NDIOYS4C-Cg_gB3IQ.js} +1 -1
  38. package/web/assets/{chunk-POPQ4Y6H-yjjWWA8X.js → chunk-POPQ4Y6H-CpFBYm4R.js} +1 -1
  39. package/web/assets/{chunk-RE4WF27V-C32wZGPA.js → chunk-RE4WF27V-DJhALSJZ.js} +1 -1
  40. package/web/assets/{chunk-SVP7TREG-BdekvWAw.js → chunk-SVP7TREG-CLk3nYlu.js} +1 -1
  41. package/web/assets/{chunk-TICWLB2K-Cz68TTKA.js → chunk-TICWLB2K-CAAm7rEI.js} +1 -1
  42. package/web/assets/{chunk-VII2H2IX-fTD7U-xL.js → chunk-VII2H2IX-D9ZFtXPz.js} +1 -1
  43. package/web/assets/{chunk-X5GNSKZ3-16RMlpb5.js → chunk-X5GNSKZ3-BRpQXOuk.js} +1 -1
  44. package/web/assets/{chunk-XCWWM2C3-CO-wuQPY.js → chunk-XCWWM2C3-CGZOunzF.js} +1 -1
  45. package/web/assets/{chunk-XXDRQBXY-DPkBKESf.js → chunk-XXDRQBXY-IwMJhHxA.js} +1 -1
  46. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-DsXVuA3q.js +1 -0
  47. package/web/assets/classDiagram-ZZMXUADV-mIT3v2vU.js +1 -0
  48. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-DsXVuA3q.js +1 -0
  49. package/web/assets/classDiagram-v2-VYDZK3BY-mIT3v2vU.js +1 -0
  50. package/web/assets/{core-CQhot3Yw.js → core-KfkXlXB0.js} +1 -1
  51. package/web/assets/{cose-bilkent-JH36ORCC-NQkKxkmm.js → cose-bilkent-JH36ORCC-CvvDvDJy.js} +1 -1
  52. package/web/assets/{cose-bilkent-JH36ORCC-OB24KH3T-71WGRXpy.js → cose-bilkent-JH36ORCC-OB24KH3T-C0vuvt-a.js} +1 -1
  53. package/web/assets/{cynefin-OW5HDTMX-Ycd8yaFB.js → cynefin-OW5HDTMX-BnU7sKRp.js} +1 -1
  54. package/web/assets/{cynefin-OW5HDTMX-GVF3BKWE-wLMpc-W6.js → cynefin-OW5HDTMX-GVF3BKWE-C0Fp61PQ.js} +1 -1
  55. package/web/assets/{cynefinDiagram-5FMLGOSQ-qdatKGJp.js → cynefinDiagram-5FMLGOSQ-Ci7ijXRa.js} +1 -1
  56. package/web/assets/{cynefinDiagram-5FMLGOSQ-H3WIRU3N-BqUnto1I.js → cynefinDiagram-5FMLGOSQ-H3WIRU3N-BG1dQkD8.js} +1 -1
  57. package/web/assets/{dagre-3AP2YEHR-DCERTXHT-DU7hl9mL.js → dagre-3AP2YEHR-DCERTXHT-SRdJ45ZG.js} +1 -1
  58. package/web/assets/{dagre-GXQ25YYZ-DXBvPLCC.js → dagre-GXQ25YYZ-a6zLLMCL.js} +1 -1
  59. package/web/assets/{diagram-S7CK7UJ4-CJndlA9d.js → diagram-S7CK7UJ4-DwGQoHs5.js} +1 -1
  60. package/web/assets/{diagram-S7CK7UJ4-MULGZGEL-ChZOJtIr.js → diagram-S7CK7UJ4-MULGZGEL-DFbcMEGe.js} +1 -1
  61. package/web/assets/{diagram-UQ7AKVKN-ByEgUbMO.js → diagram-UQ7AKVKN-DObuhRvP.js} +1 -1
  62. package/web/assets/{diagram-UQ7AKVKN-YQBY353J-CBg1xAIv.js → diagram-UQ7AKVKN-YQBY353J-f7iJnEEP.js} +1 -1
  63. package/web/assets/{diagram-VSXAHHWV-DG9QiDXM.js → diagram-VSXAHHWV-Ctso7LL9.js} +1 -1
  64. package/web/assets/{diagram-VSXAHHWV-WLNH2ELY-BmmwN3nm.js → diagram-VSXAHHWV-WLNH2ELY-DwsW9ccQ.js} +1 -1
  65. package/web/assets/{diagram-VX7I27RA-D5I8_1IH.js → diagram-VX7I27RA-B1-W9xu6.js} +1 -1
  66. package/web/assets/{diagram-VX7I27RA-XW6YQV5G-BpJ1XA39.js → diagram-VX7I27RA-XW6YQV5G-DckTcRvE.js} +1 -1
  67. package/web/assets/{diagram-Z3DM3KII-BgBYUzLO.js → diagram-Z3DM3KII-CvmndeRP.js} +1 -1
  68. package/web/assets/{diagram-Z3DM3KII-HG7RF65D-DvYaKe9o.js → diagram-Z3DM3KII-HG7RF65D-Cg1XNNOC.js} +1 -1
  69. package/web/assets/{ebnfDiagram-PWID7BFC-BvljgvDM.js → ebnfDiagram-PWID7BFC-Cs9GSL14.js} +1 -1
  70. package/web/assets/{ebnfDiagram-PWID7BFC-OKY4VHYD-Cnq_rs5C.js → ebnfDiagram-PWID7BFC-OKY4VHYD-C0q6BGVW.js} +1 -1
  71. package/web/assets/{elk.bundled-DuC4qO17.js → elk.bundled-Cez1bZui.js} +1 -1
  72. package/web/assets/{erDiagram-RLTQ6QDP-CuGCxm27.js → erDiagram-RLTQ6QDP-CvYV5Bmu.js} +1 -1
  73. package/web/assets/{erDiagram-SSCWMZ5O-PIPKOIK7-DWea4HYD.js → erDiagram-SSCWMZ5O-PIPKOIK7-Di0McTkf.js} +1 -1
  74. package/web/assets/{flowDiagram-A5DVABFB-2Z4AVO5R-Bt5oLSB0.js → flowDiagram-A5DVABFB-2Z4AVO5R-C_7fHJVS.js} +1 -1
  75. package/web/assets/{flowDiagram-HODETNUW-ChwXi3ep.js → flowDiagram-HODETNUW-CEwpjqJR.js} +1 -1
  76. package/web/assets/{ganttDiagram-EL5Y4UJY-Cip61aQW.js → ganttDiagram-EL5Y4UJY-Bjj2P85p.js} +1 -1
  77. package/web/assets/{ganttDiagram-EL5Y4UJY-JZNG7GOG-DIt3-EPi.js → ganttDiagram-EL5Y4UJY-JZNG7GOG-BWxHKrFA.js} +1 -1
  78. package/web/assets/{gitGraphDiagram-WWUBYQGX-DMWMLL3G-CsyX4tkZ.js → gitGraphDiagram-WWUBYQGX-DMWMLL3G-D4hn_rGb.js} +1 -1
  79. package/web/assets/{gitGraphDiagram-WWUBYQGX-BGE_KKwm.js → gitGraphDiagram-WWUBYQGX-DhH7fsJW.js} +1 -1
  80. package/web/assets/index-CS4Wtfwl.css +1 -0
  81. package/web/assets/{index-D3SI1A7X.js → index-DcWGv1Ix.js} +2 -2
  82. package/web/assets/{index-48coRDBX.js → index-eHVYJyBS.js} +4 -4
  83. package/web/assets/{index-CatQea2M.js → index-nwyPdk23.js} +1 -1
  84. package/web/assets/{infoDiagram-27XIBGKW-CHFCryER.js → infoDiagram-27XIBGKW-DDm2aahL.js} +1 -1
  85. package/web/assets/{infoDiagram-RXCK75RN-HANS5KVC-ocLW6L6_.js → infoDiagram-RXCK75RN-HANS5KVC-CwBcehVD.js} +1 -1
  86. package/web/assets/{ishikawaDiagram-5VMMS53U-7GCIT7WU-BUo_yhnm.js → ishikawaDiagram-5VMMS53U-7GCIT7WU-CBAcnlnt.js} +1 -1
  87. package/web/assets/{ishikawaDiagram-5VMMS53U-Bhg1TVZJ.js → ishikawaDiagram-5VMMS53U-BViel9G3.js} +1 -1
  88. package/web/assets/{journeyDiagram-3NMN7TZE-C3OfUgiV.js → journeyDiagram-3NMN7TZE-CO3lCO75.js} +1 -1
  89. package/web/assets/{journeyDiagram-EYS64GPL-OAPELBT7-DQESZnLZ.js → journeyDiagram-EYS64GPL-OAPELBT7-sBJrBBzK.js} +1 -1
  90. package/web/assets/{kanban-definition-3QL26DDD-I7RKWQQY-BF-ZXqR5.js → kanban-definition-3QL26DDD-I7RKWQQY-hit6oZsH.js} +1 -1
  91. package/web/assets/{kanban-definition-UXKFOSKX-CSI_GcJW.js → kanban-definition-UXKFOSKX-CKgCw87L.js} +1 -1
  92. package/web/assets/{katex-N6JRN4PM-CxrguQd-.js → katex-N6JRN4PM-D81co42V.js} +1 -1
  93. package/web/assets/{layout-CDbDCQeb.js → layout-Gnf9u57J.js} +1 -1
  94. package/web/assets/{main-jV_OilRs.js → main-C7vIrKEC.js} +120 -120
  95. package/web/assets/{mermaid-layout-elk.core-B1-o2tyd.js → mermaid-layout-elk.core-DfOj66Qv.js} +2 -2
  96. package/web/assets/{mermaid.core-37_hzSNp.js → mermaid.core-B8uFE6gu.js} +5 -5
  97. package/web/assets/{mindmap-definition-FBJOCRG2-KIYZG64Y-rppk7mo-.js → mindmap-definition-FBJOCRG2-KIYZG64Y-DdU7WsWK.js} +1 -1
  98. package/web/assets/{mindmap-definition-YA3MSWOX-BUzaoDCs.js → mindmap-definition-YA3MSWOX-Dlr3j6bz.js} +1 -1
  99. package/web/assets/{pegDiagram-XKGWAZYB-CQPL5MMj.js → pegDiagram-XKGWAZYB-DUukoOjY.js} +1 -1
  100. package/web/assets/{pegDiagram-XKGWAZYB-OIP57N6J-CngQPdjr.js → pegDiagram-XKGWAZYB-OIP57N6J-ClyIfOjy.js} +1 -1
  101. package/web/assets/{pet-xGooCXVY.js → pet-7_82JHov.js} +1 -1
  102. package/web/assets/{pieDiagram-E7YTZNPT-2UOTW327-DkHaDPtZ.js → pieDiagram-E7YTZNPT-2UOTW327-CXr_-LKy.js} +1 -1
  103. package/web/assets/{pieDiagram-E7YTZNPT-BDTdqFkm.js → pieDiagram-E7YTZNPT-BoX73GVV.js} +1 -1
  104. package/web/assets/{quadrantDiagram-AXDQQJYC-SN3ASJJK-KFKnY5SQ.js → quadrantDiagram-AXDQQJYC-SN3ASJJK-BfJPVLX8.js} +1 -1
  105. package/web/assets/{quadrantDiagram-AXDQQJYC-CXFhoJ1v.js → quadrantDiagram-AXDQQJYC-fWVY4hSA.js} +1 -1
  106. package/web/assets/{railroadDiagram-O6MQD6OU-34742W6X-BMHll5kZ.js → railroadDiagram-O6MQD6OU-34742W6X-LEvRYv_-.js} +1 -1
  107. package/web/assets/{railroadDiagram-O6MQD6OU-DdZMZ3P-.js → railroadDiagram-O6MQD6OU-BtJHgxH_.js} +1 -1
  108. package/web/assets/{render-O7CIS3YK-BUZqrLRp.js → render-O7CIS3YK-DU3B_ERD.js} +7 -7
  109. package/web/assets/{requirementDiagram-BXWQKSXE-WrY_I6-V.js → requirementDiagram-BXWQKSXE-DeBI9tYJ.js} +1 -1
  110. package/web/assets/{requirementDiagram-EFPCY7ZU-NGAFFSMB-CmLM20oA.js → requirementDiagram-EFPCY7ZU-NGAFFSMB-DDu5KaVc.js} +1 -1
  111. package/web/assets/{rotate-ccw-DZE_kYZu.js → rotate-ccw-DHjeGlQd.js} +1 -1
  112. package/web/assets/{sankeyDiagram-P5KCCOFB-3D3M4XPB-RJsf4h9t.js → sankeyDiagram-P5KCCOFB-3D3M4XPB-CuAwPvR9.js} +1 -1
  113. package/web/assets/{sankeyDiagram-P5KCCOFB-Bjyi_fcC.js → sankeyDiagram-P5KCCOFB-Cn7EgJJg.js} +1 -1
  114. package/web/assets/{sequenceDiagram-WJ2MYXX4-Co6SKGyz.js → sequenceDiagram-WJ2MYXX4-Cc4unhAQ.js} +1 -1
  115. package/web/assets/{sequenceDiagram-WJ2MYXX4-Q2IOPB4R-B5nuUy2h.js → sequenceDiagram-WJ2MYXX4-Q2IOPB4R-Bhw9XiPP.js} +1 -1
  116. package/web/assets/{sizeCapture-INFHLROL-CF0_wtm2.js → sizeCapture-INFHLROL-D5ATuvis.js} +1 -1
  117. package/web/assets/{sizeCapture-X5ZJPWSS-PSGVOMYM-xWY2H6Me.js → sizeCapture-X5ZJPWSS-PSGVOMYM-pk47pQ9r.js} +1 -1
  118. package/web/assets/{stateDiagram-D77RDMKH-5V-346Qd.js → stateDiagram-D77RDMKH-CQSVKJos.js} +1 -1
  119. package/web/assets/{stateDiagram-HBIQ2CUA-4M2S6MAN-B6gqxipM.js → stateDiagram-HBIQ2CUA-4M2S6MAN-CtK20myG.js} +1 -1
  120. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-z3Zfnb5n.js +1 -0
  121. package/web/assets/stateDiagram-v2-MP3YSRHH-BEw4hFwV.js +1 -0
  122. package/web/assets/{swimlanes-42K2YHIH-D9gzHPsn.js → swimlanes-42K2YHIH-C_TtTWTU.js} +1 -1
  123. package/web/assets/{swimlanes-XN3QIQJK-N6N2CCQ6-rlPeyqTj.js → swimlanes-XN3QIQJK-N6N2CCQ6-BcUMswQj.js} +1 -1
  124. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-D6SdGCA2.js +8 -0
  125. package/web/assets/swimlanesDiagram-VR7AAH4N-BCgYwpZp.js +8 -0
  126. package/web/assets/{timeline-definition-24CTP7MA-B2GfJfmd.js → timeline-definition-24CTP7MA-DUWrxPBR.js} +1 -1
  127. package/web/assets/{timeline-definition-24CTP7MA-KN7RSRVM-CKXP2kGU.js → timeline-definition-24CTP7MA-KN7RSRVM-guNGP5k9.js} +1 -1
  128. package/web/assets/{vennDiagram-4TSXK5OY-AKJ7LXAN-CybCMyEX.js → vennDiagram-4TSXK5OY-AKJ7LXAN-CqrpJGZz.js} +1 -1
  129. package/web/assets/{vennDiagram-4TSXK5OY-DkP-OS8t.js → vennDiagram-4TSXK5OY-DpAMU-X3.js} +1 -1
  130. package/web/assets/{wardleyDiagram-VM6X3IG4-3B6A3BN5-BdgAi1Gp.js → wardleyDiagram-VM6X3IG4-3B6A3BN5-CvLFmNdB.js} +1 -1
  131. package/web/assets/{wardleyDiagram-VM6X3IG4-DvRT9ehw.js → wardleyDiagram-VM6X3IG4-CwLky2tH.js} +1 -1
  132. package/web/assets/{xychartDiagram-S5SC5T6Z-D0gQ0QKw.js → xychartDiagram-S5SC5T6Z-C0uS7jlH.js} +1 -1
  133. package/web/assets/{xychartDiagram-S5SC5T6Z-OBDNV6WG-23Q1AKCq.js → xychartDiagram-S5SC5T6Z-OBDNV6WG-DUua3NqS.js} +1 -1
  134. package/web/index.html +3 -3
  135. package/web/pet.html +3 -3
  136. package/web/assets/SettingsView-BE8J-BR5.js +0 -20
  137. package/web/assets/api-web-ChIPnpHO.js +0 -1
  138. package/web/assets/channel-BsRXIHWg.js +0 -1
  139. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-BwnHfZhN.js +0 -1
  140. package/web/assets/classDiagram-ZZMXUADV-BBeyyi3H.js +0 -1
  141. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-BwnHfZhN.js +0 -1
  142. package/web/assets/classDiagram-v2-VYDZK3BY-BBeyyi3H.js +0 -1
  143. package/web/assets/index-EInfxfl9.css +0 -1
  144. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-DnphY6WO.js +0 -1
  145. package/web/assets/stateDiagram-v2-MP3YSRHH-DKtXGidN.js +0 -1
  146. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-8pA5lT4C.js +0 -8
  147. package/web/assets/swimlanesDiagram-VR7AAH4N-B7BbPyRn.js +0 -8
  148. /package/web/assets/{index-C9fscARj.js → index-jKxnKPxh.js} +0 -0
@@ -1 +1 @@
1
- import{s as R,a as W,S as N}from"./chunk-IMKFNOWR-pDBbu4GI.js";import{_ as f,c as t,l as S,d as P,S as _,j as z,O as U,y as C}from"./mermaid.core-37_hzSNp.js";import{s as H,l as F,n as O}from"./transform-Bd_a5eGM.js";import{l as J}from"./layout-CDbDCQeb.js";import"./chunk-XXDRQBXY-DPkBKESf.js";import"./chunk-POPQ4Y6H-yjjWWA8X.js";import"./chunk-F27PBJKO-CAqAYmMM.js";import"./main-jV_OilRs.js";import"./index-C9fscARj.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=F().x(function(s){return s.x}).y(function(s){return s.y}).curve(O),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=U(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=C.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},pt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{pt as diagram};
1
+ import{s as R,a as W,S as N}from"./chunk-IMKFNOWR-vd22BhM5.js";import{_ as f,c as t,l as S,d as P,S as _,j as z,O as U,y as C}from"./mermaid.core-B8uFE6gu.js";import{s as H,l as F,n as O}from"./transform-Bd_a5eGM.js";import{l as J}from"./layout-Gnf9u57J.js";import"./chunk-XXDRQBXY-IwMJhHxA.js";import"./chunk-POPQ4Y6H-CpFBYm4R.js";import"./chunk-F27PBJKO-ia4EagnF.js";import"./main-C7vIrKEC.js";import"./index-jKxnKPxh.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=F().x(function(s){return s.x}).y(function(s){return s.y}).curve(O),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=U(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=C.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},pt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{pt as diagram};
@@ -1 +1 @@
1
- import{s as P,a as R,S as N}from"./chunk-M3IUQBOH-RTAJkyza.js";import{l as W}from"./chunk-CTNIYPP6-BgXYMFW5.js";import{_ as f,c as t,l as S,d as _,T as U,i as z,P as C,z as F}from"./render-O7CIS3YK-BUZqrLRp.js";import{s as T,l as O,n as J}from"./transform-Bd_a5eGM.js";import"./chunk-LV3HUYFY-Doco33ZI.js";import"./chunk-NDIOYS4C-DcWvuy8G.js";import"./chunk-ISA7TJRJ-CHl4BhBt.js";import"./mermaid-layout-elk.core-B1-o2tyd.js";import"./main-jV_OilRs.js";import"./index-C9fscARj.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,H={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=T("#i"+i));const p=n==="sandbox"?T(l.nodes()[0].contentDocument.body):T("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;_(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new U({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,H[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),W(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(H[r]?H[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ut={parser:R,get db(){return new N(1)},renderer:it,styles:P,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ut as diagram};
1
+ import{s as P,a as R,S as N}from"./chunk-M3IUQBOH-DZWUYlu1.js";import{l as W}from"./chunk-CTNIYPP6-B3zyRQW8.js";import{_ as f,c as t,l as S,d as _,T as U,i as z,P as C,z as F}from"./render-O7CIS3YK-DU3B_ERD.js";import{s as T,l as O,n as J}from"./transform-Bd_a5eGM.js";import"./chunk-LV3HUYFY-D2A9VNi8.js";import"./chunk-NDIOYS4C-Cg_gB3IQ.js";import"./chunk-ISA7TJRJ-BReqmCMw.js";import"./mermaid-layout-elk.core-DfOj66Qv.js";import"./main-C7vIrKEC.js";import"./index-jKxnKPxh.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),p=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,H={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=T("#i"+i));const p=n==="sandbox"?T(l.nodes()[0].contentDocument.body):T("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;_(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,p)=>{const a=new U({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,H[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),W(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(H[r]?H[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ut={parser:R,get db(){return new N(1)},renderer:it,styles:P,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ut as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as i}from"./chunk-M3IUQBOH-DZWUYlu1.js";import{_ as s}from"./render-O7CIS3YK-DU3B_ERD.js";import"./transform-Bd_a5eGM.js";import"./chunk-LV3HUYFY-D2A9VNi8.js";import"./chunk-NDIOYS4C-Cg_gB3IQ.js";import"./chunk-ISA7TJRJ-BReqmCMw.js";import"./mermaid-layout-elk.core-DfOj66Qv.js";import"./main-C7vIrKEC.js";import"./index-jKxnKPxh.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var g={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{g as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as s}from"./chunk-IMKFNOWR-vd22BhM5.js";import{_ as i}from"./mermaid.core-B8uFE6gu.js";import"./transform-Bd_a5eGM.js";import"./chunk-XXDRQBXY-IwMJhHxA.js";import"./chunk-POPQ4Y6H-CpFBYm4R.js";import"./chunk-F27PBJKO-ia4EagnF.js";import"./main-C7vIrKEC.js";import"./index-jKxnKPxh.js";var b={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{b as diagram};