lookatstudy-mobile 0.22.0 → 0.22.1

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 (142) hide show
  1. package/package.json +1 -1
  2. package/server.cjs +2491 -1406
  3. package/web/assets/CanvasStage--cO-dGou.js +11 -0
  4. package/web/assets/CommandPalette-B9yujZKA.js +6 -0
  5. package/web/assets/CourseSearchPanel-C7Mz8cwp.js +6 -0
  6. package/web/assets/ExamView-CxgAmCWD.js +11 -0
  7. package/web/assets/MindmapView-D2NywTY1.js +4 -0
  8. package/web/assets/ReviewPanel-CLOe8uSS.js +1 -0
  9. package/web/assets/SettingsView-Crx4fWxj.js +7 -0
  10. package/web/assets/VoicePanel-B9o8PTlU.js +11 -0
  11. package/web/assets/{abnfDiagram-N423BO3Z-BqeMquUh.js → abnfDiagram-N423BO3Z-DlR3JtCi.js} +1 -1
  12. package/web/assets/{abnfDiagram-VCTEODGH-ODA7YWAP-BuesB7xR.js → abnfDiagram-VCTEODGH-ODA7YWAP-Cc60_NCH.js} +1 -1
  13. package/web/assets/{architectureDiagram-5GKGNRK7-C4PU3XN7-0sZWP2Gt.js → architectureDiagram-5GKGNRK7-C4PU3XN7-DxA8-TH0.js} +1 -1
  14. package/web/assets/{architectureDiagram-T3A2C74G-BUX7eVzV.js → architectureDiagram-T3A2C74G-b87f0Zfh.js} +1 -1
  15. package/web/assets/arrow-right-B_6KkCJV.js +6 -0
  16. package/web/assets/{blockDiagram-NRAW4CY4-UMJ6PMQQ-DMEi53vA.js → blockDiagram-NRAW4CY4-UMJ6PMQQ-DujiZmu6.js} +1 -1
  17. package/web/assets/{blockDiagram-VBNYF7ZC-CquWGiud.js → blockDiagram-VBNYF7ZC-BVvgfsGF.js} +1 -1
  18. package/web/assets/{c4Diagram-5PPSVZJV-DwhWxb7s.js → c4Diagram-5PPSVZJV-5YSQGEVW.js} +1 -1
  19. package/web/assets/{c4Diagram-UCG6FXSJ-75X3U2P3-Cw6KuLDN.js → c4Diagram-UCG6FXSJ-75X3U2P3-DOEKYDP0.js} +1 -1
  20. package/web/assets/channel-CWI530Vq.js +1 -0
  21. package/web/assets/{chunk-2GRJ4B5K-CzGtEVrd.js → chunk-2GRJ4B5K-7x3UypsR.js} +1 -1
  22. package/web/assets/{chunk-2Q5K7J3B-svQDV2bG.js → chunk-2Q5K7J3B-5RQfakW9.js} +1 -1
  23. package/web/assets/{chunk-5RXB4S5H-CkBumCja.js → chunk-5RXB4S5H-CX91mO_w.js} +1 -1
  24. package/web/assets/{chunk-5VM5RSS4-DmqVK3OP.js → chunk-5VM5RSS4-DhfIWqOK.js} +1 -1
  25. package/web/assets/{chunk-6Q2QTUOP-j-yShG78.js → chunk-6Q2QTUOP-DyBMkImn.js} +1 -1
  26. package/web/assets/{chunk-7XDTSPCN-BF54U_Qe.js → chunk-7XDTSPCN-l_wcpmq6.js} +1 -1
  27. package/web/assets/{chunk-CTNIYPP6-BLGT5nzg.js → chunk-CTNIYPP6-Bej-ifE4.js} +1 -1
  28. package/web/assets/{chunk-CXNFBKHE-CHtCVUVZ.js → chunk-CXNFBKHE-BymXgi-y.js} +1 -1
  29. package/web/assets/{chunk-GF5L2VYU-HY4EUgWS.js → chunk-GF5L2VYU-DeTnv5Qk.js} +1 -1
  30. package/web/assets/{chunk-ISA7TJRJ-AUc9mrxX.js → chunk-ISA7TJRJ-CFmR6SoA.js} +1 -1
  31. package/web/assets/{chunk-JWPE2WC7-DmzvUH3q.js → chunk-JWPE2WC7-BU-fMtWi.js} +1 -1
  32. package/web/assets/{chunk-KBJHAD2P-C3HnMhHX.js → chunk-KBJHAD2P-BjlTMp1m.js} +1 -1
  33. package/web/assets/{chunk-LV3HUYFY-D3kDosNp.js → chunk-LV3HUYFY-riE_n54k.js} +1 -1
  34. package/web/assets/{chunk-M3IUQBOH-CMBqYbjd.js → chunk-M3IUQBOH-DYx0J19K.js} +1 -1
  35. package/web/assets/{chunk-NDIOYS4C-D4XcxlS5.js → chunk-NDIOYS4C-D34dHdEf.js} +1 -1
  36. package/web/assets/{chunk-RE4WF27V-ANjTafEs.js → chunk-RE4WF27V-qx7CV25O.js} +1 -1
  37. package/web/assets/{chunk-RYQCIY6F-CV9wg8xs.js → chunk-RYQCIY6F-AqdEeieF.js} +1 -1
  38. package/web/assets/{chunk-VII2H2IX-DK2MWM1y.js → chunk-VII2H2IX-CzkbeZYY.js} +1 -1
  39. package/web/assets/{chunk-X5GNSKZ3-YRz76YFi.js → chunk-X5GNSKZ3-DVqvzTCj.js} +1 -1
  40. package/web/assets/{chunk-XCWWM2C3-CSRjUbE8.js → chunk-XCWWM2C3-BJLKBAh0.js} +1 -1
  41. package/web/assets/{chunk-XXDRQBXY-j9X99vQo.js → chunk-XXDRQBXY-Nz1f1JPS.js} +1 -1
  42. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K---3y6DiQ.js +1 -0
  43. package/web/assets/classDiagram-JCYQIIEL-CKDJ6TE8.js +1 -0
  44. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2---3y6DiQ.js +1 -0
  45. package/web/assets/classDiagram-v2-OCEON4UE-CKDJ6TE8.js +1 -0
  46. package/web/assets/{core-Drxo65nc.js → core-5AezUpt1.js} +4 -4
  47. package/web/assets/{cose-bilkent-JH36ORCC-CN6Mp4ds.js → cose-bilkent-JH36ORCC-Bwf1adzB.js} +1 -1
  48. package/web/assets/{cose-bilkent-JH36ORCC-OB24KH3T-Bvxs1RhI.js → cose-bilkent-JH36ORCC-OB24KH3T-B46Ih9E8.js} +1 -1
  49. package/web/assets/{cynefin-OW5HDTMX-GVF3BKWE-BVXFZGhi.js → cynefin-OW5HDTMX-GVF3BKWE-DcR0n-8p.js} +1 -1
  50. package/web/assets/{cynefin-VYW2F7L2-CBHvDLlv.js → cynefin-VYW2F7L2-BtjjXqMe.js} +1 -1
  51. package/web/assets/{cynefinDiagram-5FMLGOSQ-H3WIRU3N-CM4Mj-Vd.js → cynefinDiagram-5FMLGOSQ-H3WIRU3N-CecBQ3WS.js} +1 -1
  52. package/web/assets/{cynefinDiagram-MW4NZA55-aMzbAFWs.js → cynefinDiagram-MW4NZA55-CeLD6_7i.js} +1 -1
  53. package/web/assets/{dagre-3AP2YEHR-DCERTXHT-BMVGWTPf.js → dagre-3AP2YEHR-DCERTXHT-I_531Mm0.js} +1 -1
  54. package/web/assets/{dagre-VZM6K2ZE-DhQcrBKB.js → dagre-VZM6K2ZE-BYSfxtKs.js} +1 -1
  55. package/web/assets/{diagram-7IWD3JNH-neTaugq1.js → diagram-7IWD3JNH-CfUUB3zT.js} +1 -1
  56. package/web/assets/{diagram-B4RE2ZJO-D9KmoYBV.js → diagram-B4RE2ZJO-B4h2KVGE.js} +1 -1
  57. package/web/assets/{diagram-LBJQPF4R-9J-F2MVE.js → diagram-LBJQPF4R-BycPUMao.js} +1 -1
  58. package/web/assets/{diagram-Q27KOJAE-Dz9KITJh.js → diagram-Q27KOJAE-nUmmLOWc.js} +1 -1
  59. package/web/assets/{diagram-S7CK7UJ4-MULGZGEL-r3BljA8e.js → diagram-S7CK7UJ4-MULGZGEL-YmP_5pu9.js} +1 -1
  60. package/web/assets/{diagram-UB23O5K3-BA5gPgQ7.js → diagram-UB23O5K3-AbqPe_Lw.js} +1 -1
  61. package/web/assets/{diagram-UQ7AKVKN-YQBY353J-IIvT6Y42.js → diagram-UQ7AKVKN-YQBY353J-CSBHhT_p.js} +1 -1
  62. package/web/assets/{diagram-VSXAHHWV-WLNH2ELY-BMCz6ope.js → diagram-VSXAHHWV-WLNH2ELY-BIWRzcG_.js} +1 -1
  63. package/web/assets/{diagram-VX7I27RA-XW6YQV5G-Z3lYjMVR.js → diagram-VX7I27RA-XW6YQV5G-DOIsDS0u.js} +1 -1
  64. package/web/assets/{diagram-Z3DM3KII-HG7RF65D-CsLqhzUJ.js → diagram-Z3DM3KII-HG7RF65D-CL_RkrR1.js} +1 -1
  65. package/web/assets/{ebnfDiagram-BXEA7PRR-BoUlG0c_.js → ebnfDiagram-BXEA7PRR-CiCY0Nb_.js} +1 -1
  66. package/web/assets/{ebnfDiagram-PWID7BFC-OKY4VHYD-CgMcEf9P.js → ebnfDiagram-PWID7BFC-OKY4VHYD-30_W7bxy.js} +1 -1
  67. package/web/assets/{elk.bundled-DjGexDyy.js → elk.bundled-CoJK8Y5o.js} +1 -1
  68. package/web/assets/{erDiagram-JOGREHBK-DV_Tzdk0.js → erDiagram-JOGREHBK-CiMrd6Dm.js} +1 -1
  69. package/web/assets/{erDiagram-SSCWMZ5O-PIPKOIK7-Ct9t5yN5.js → erDiagram-SSCWMZ5O-PIPKOIK7-DR-Xlax4.js} +1 -1
  70. package/web/assets/{flowDiagram-A5DVABFB-2Z4AVO5R-C4iDReFc.js → flowDiagram-A5DVABFB-2Z4AVO5R-Bm2DnZWS.js} +1 -1
  71. package/web/assets/{flowDiagram-UKHOOZJN-DvQGnBrF.js → flowDiagram-UKHOOZJN-DlA7YU9i.js} +1 -1
  72. package/web/assets/{ganttDiagram-EL5Y4UJY-JZNG7GOG-BPWBTDqB.js → ganttDiagram-EL5Y4UJY-JZNG7GOG-CycOiHbj.js} +1 -1
  73. package/web/assets/{ganttDiagram-PKOTCBZU-7gjvaw6I.js → ganttDiagram-PKOTCBZU-BT4d6R51.js} +1 -1
  74. package/web/assets/{gitGraphDiagram-DS77QQ5N-B54T3l5T.js → gitGraphDiagram-DS77QQ5N-DyUz04eh.js} +1 -1
  75. package/web/assets/{gitGraphDiagram-WWUBYQGX-DMWMLL3G-CmG0_dMg.js → gitGraphDiagram-WWUBYQGX-DMWMLL3G-Cp635UIu.js} +1 -1
  76. package/web/assets/{index-yzG6be5R.js → index-8JL6mw1y.js} +1 -1
  77. package/web/assets/index-BSXjRLsf.js +259 -0
  78. package/web/assets/{index-B6q9ygFx.js → index-C5s4t4ce.js} +2 -2
  79. package/web/assets/index-ClPJ1xdX.js +21 -0
  80. package/web/assets/index-D619gSoN.js +5 -0
  81. package/web/assets/{index-Cz8nGS3-.css → index-c6Br465X.css} +1 -1
  82. package/web/assets/{infoDiagram-6WML65LV-BJSGxY2D.js → infoDiagram-6WML65LV-rj50EKNC.js} +1 -1
  83. package/web/assets/{infoDiagram-RXCK75RN-HANS5KVC-Cz3Y1Unl.js → infoDiagram-RXCK75RN-HANS5KVC-BHovTPxo.js} +1 -1
  84. package/web/assets/{ishikawaDiagram-5VMMS53U-7GCIT7WU-BT6MsYfb.js → ishikawaDiagram-5VMMS53U-7GCIT7WU-B0aX9dg0.js} +1 -1
  85. package/web/assets/{ishikawaDiagram-WSZJBQD7-BsYCRLYP.js → ishikawaDiagram-WSZJBQD7-Cs68VzMS.js} +1 -1
  86. package/web/assets/{journeyDiagram-EYS64GPL-OAPELBT7-Bx1wxARt.js → journeyDiagram-EYS64GPL-OAPELBT7-BaF1Okyl.js} +1 -1
  87. package/web/assets/{journeyDiagram-NVQOT4AX-DkJv2QF6.js → journeyDiagram-NVQOT4AX-CxamcAfg.js} +1 -1
  88. package/web/assets/{kanban-definition-27J2QSJJ-BCWiZznF.js → kanban-definition-27J2QSJJ-CqkEoxuc.js} +1 -1
  89. package/web/assets/{kanban-definition-3QL26DDD-I7RKWQQY-uHjeKCG_.js → kanban-definition-3QL26DDD-I7RKWQQY-KQq8LJIu.js} +1 -1
  90. package/web/assets/{katex-N6JRN4PM-D4hrRJKq.js → katex-N6JRN4PM-BRgAOu7M.js} +1 -1
  91. package/web/assets/main-BBu4fQk-.js +457 -0
  92. package/web/assets/{mermaid-layout-elk.core-C4McJve2.js → mermaid-layout-elk.core-CS6tfHSb.js} +2 -2
  93. package/web/assets/{mermaid.core-CmjrekXI.js → mermaid.core-D_Bznvdr.js} +4 -4
  94. package/web/assets/{mindmap-definition-FAOFIHXS-PIVNjK20.js → mindmap-definition-FAOFIHXS-h9YeSHf4.js} +1 -1
  95. package/web/assets/{mindmap-definition-FBJOCRG2-KIYZG64Y-C8ko7Fkc.js → mindmap-definition-FBJOCRG2-KIYZG64Y-DT9Y6a9o.js} +1 -1
  96. package/web/assets/{pegDiagram-VL7TDLO6-D0oejFBc.js → pegDiagram-VL7TDLO6-C--Hsstu.js} +1 -1
  97. package/web/assets/{pegDiagram-XKGWAZYB-OIP57N6J-Cqs1jeYc.js → pegDiagram-XKGWAZYB-OIP57N6J-CXtA7B8B.js} +1 -1
  98. package/web/assets/{pet-CZ36ImJS.js → pet-BWlfq4I-.js} +1 -1
  99. package/web/assets/{pieDiagram-7S7Q4E2Y-CdvhM-aN.js → pieDiagram-7S7Q4E2Y-CVnsOokB.js} +1 -1
  100. package/web/assets/{pieDiagram-E7YTZNPT-2UOTW327-BMlCBlPI.js → pieDiagram-E7YTZNPT-2UOTW327-DkYfAF2K.js} +1 -1
  101. package/web/assets/{quadrantDiagram-AXDQQJYC-SN3ASJJK-CEEgxhrf.js → quadrantDiagram-AXDQQJYC-SN3ASJJK-B3grZeFo.js} +1 -1
  102. package/web/assets/{quadrantDiagram-CIZ2JOQS-BrKm5erH.js → quadrantDiagram-CIZ2JOQS-i1yx34JH.js} +1 -1
  103. package/web/assets/{railroadDiagram-AXF67PYL-CJudf8AD.js → railroadDiagram-AXF67PYL-DJuiGlbf.js} +1 -1
  104. package/web/assets/{railroadDiagram-O6MQD6OU-34742W6X-C8RacTGn.js → railroadDiagram-O6MQD6OU-34742W6X-up2Y0ZV_.js} +1 -1
  105. package/web/assets/{render-O7CIS3YK-BtRzL6gS.js → render-O7CIS3YK-Dn1e27o_.js} +7 -7
  106. package/web/assets/{requirementDiagram-EFPCY7ZU-NGAFFSMB-CTXLwcL9.js → requirementDiagram-EFPCY7ZU-NGAFFSMB-BI_BSQB1.js} +1 -1
  107. package/web/assets/{requirementDiagram-LRYGKXZP-mS__tKrf.js → requirementDiagram-LRYGKXZP-nFTGE1MQ.js} +1 -1
  108. package/web/assets/rotate-ccw-nkiipcxH.js +6 -0
  109. package/web/assets/{sankeyDiagram-P5KCCOFB-3D3M4XPB-DyuDtBvQ.js → sankeyDiagram-P5KCCOFB-3D3M4XPB-Bqf3rmL6.js} +1 -1
  110. package/web/assets/{sankeyDiagram-W5VNT64P-COKGPXfA.js → sankeyDiagram-W5VNT64P-BIhgGHwI.js} +1 -1
  111. package/web/assets/{sequenceDiagram-SI44F4Z6-CNMY38eS.js → sequenceDiagram-SI44F4Z6-BASko1ED.js} +1 -1
  112. package/web/assets/{sequenceDiagram-WJ2MYXX4-Q2IOPB4R-_u4WjXk1.js → sequenceDiagram-WJ2MYXX4-Q2IOPB4R-BiNVA6gm.js} +1 -1
  113. package/web/assets/{sizeCapture-X5ZJPWSS-DWdLSp6i.js → sizeCapture-X5ZJPWSS-CGWs4y9a.js} +1 -1
  114. package/web/assets/{sizeCapture-X5ZJPWSS-PSGVOMYM-Cs-f36Xi.js → sizeCapture-X5ZJPWSS-PSGVOMYM-TxBOTj1p.js} +1 -1
  115. package/web/assets/{stateDiagram-HBIQ2CUA-4M2S6MAN-D3Vb1Yoi.js → stateDiagram-HBIQ2CUA-4M2S6MAN-BdhmANKG.js} +1 -1
  116. package/web/assets/{stateDiagram-OKZ733FA-DWpXAgAW.js → stateDiagram-OKZ733FA-CkUDyLVf.js} +1 -1
  117. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-DLoWKuNC.js +1 -0
  118. package/web/assets/stateDiagram-v2-UEYNNEHI-C4uNy_P4.js +1 -0
  119. package/web/assets/{swimlanes-SLNWSIFB--qlM3PH1.js → swimlanes-SLNWSIFB-CZxwkAvO.js} +2 -2
  120. package/web/assets/{swimlanes-XN3QIQJK-N6N2CCQ6-Dq7F7g7w.js → swimlanes-XN3QIQJK-N6N2CCQ6-Zac8KNFb.js} +1 -1
  121. package/web/assets/swimlanesDiagram-ULZ7WXOC-Ch9trOTe.js +8 -0
  122. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-DBYYfTTt.js +8 -0
  123. package/web/assets/{timeline-definition-24CTP7MA-KN7RSRVM-BRP9kk4o.js → timeline-definition-24CTP7MA-KN7RSRVM-DCu4MVvb.js} +1 -1
  124. package/web/assets/{timeline-definition-Z64GVDOM-CGIURnLx.js → timeline-definition-Z64GVDOM-DEFnQeMY.js} +1 -1
  125. package/web/assets/{vennDiagram-4TSXK5OY-AKJ7LXAN-Row28BrM.js → vennDiagram-4TSXK5OY-AKJ7LXAN-Bi1vBY1O.js} +1 -1
  126. package/web/assets/{vennDiagram-T6HMQDX7-CCAqbOji.js → vennDiagram-T6HMQDX7-Wls_-1IU.js} +1 -1
  127. package/web/assets/{wardleyDiagram-T6FBY63Y-BsHQ7eqA.js → wardleyDiagram-T6FBY63Y-BSjNiv26.js} +1 -1
  128. package/web/assets/{wardleyDiagram-VM6X3IG4-3B6A3BN5-DBcNZZDs.js → wardleyDiagram-VM6X3IG4-3B6A3BN5-BWtS3yVZ.js} +1 -1
  129. package/web/assets/{xychartDiagram-ELKLHX3M-Bdjq4REQ.js → xychartDiagram-ELKLHX3M-B5qgODUp.js} +1 -1
  130. package/web/assets/{xychartDiagram-S5SC5T6Z-OBDNV6WG-ClGm8SGz.js → xychartDiagram-S5SC5T6Z-OBDNV6WG-j0XdC2zd.js} +1 -1
  131. package/web/index.html +4 -4
  132. package/web/pet.html +3 -3
  133. package/web/assets/channel-BTMwuCXz.js +0 -1
  134. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-D00H1X9p.js +0 -1
  135. package/web/assets/classDiagram-JCYQIIEL-ClQHMNoR.js +0 -1
  136. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-D00H1X9p.js +0 -1
  137. package/web/assets/classDiagram-v2-OCEON4UE-ClQHMNoR.js +0 -1
  138. package/web/assets/main-B239_4z1.js +0 -796
  139. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-C6PXffxU.js +0 -1
  140. package/web/assets/stateDiagram-v2-UEYNNEHI-D3rCYZ7F.js +0 -1
  141. package/web/assets/swimlanesDiagram-ULZ7WXOC-C2JzshU-.js +0 -8
  142. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-C1mY3FR0.js +0 -8
@@ -1 +1 @@
1
- import{s as P,a as R,S as N}from"./chunk-M3IUQBOH-CMBqYbjd.js";import{l as W}from"./chunk-CTNIYPP6-BLGT5nzg.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-BtRzL6gS.js";import{s as T}from"./transform-CzGDKG_M.js";import"./chunk-LV3HUYFY-D3kDosNp.js";import{l as O,j as J}from"./step-SI6FXFD6.js";import"./chunk-NDIOYS4C-D4XcxlS5.js";import"./chunk-ISA7TJRJ-AUc9mrxX.js";import"./mermaid-layout-elk.core-C4McJve2.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.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,h=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(h,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=h.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(),h=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,h);g===h&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>h&&(o=(h-g)/2+c),Math.abs(a-B.x)<c&&x>h&&(o=a-(x-h)/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<=h&&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 h=e.replace(/\r\n/g,"<br/>");h=h.replace(/\n/g,"<br/>");const a=h.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=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),h=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),h.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 p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=p.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=p.node().getBBox().height,S.info("Title height",o,x)),B.push(p)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((p,w)=>p.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 h=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=h.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,h,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,h)=>{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=h.db.getStates(),g=h.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let p;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=G(u.doc,w,u.id,!c,n,l,h);{w=$(w,u,c);let E=w.node().getBBox();p.width=E.width,p.height=E.height+b.padding/2,H[u.id]={y:b.compositTitleSize}}}else p=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(p.id+"-note",E),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",E)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}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(p=>{const w=p.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)),p.setAttribute("x1",0-M+8),p.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},ft={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{ft as diagram};
1
+ import{s as P,a as R,S as N}from"./chunk-M3IUQBOH-DYx0J19K.js";import{l as W}from"./chunk-CTNIYPP6-Bej-ifE4.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-Dn1e27o_.js";import{s as T}from"./transform-CzGDKG_M.js";import"./chunk-LV3HUYFY-riE_n54k.js";import{l as O,j as J}from"./step-SI6FXFD6.js";import"./chunk-NDIOYS4C-D34dHdEf.js";import"./chunk-ISA7TJRJ-CFmR6SoA.js";import"./mermaid-layout-elk.core-CS6tfHSb.js";import"./main-BBu4fQk-.js";import"./index-C5s4t4ce.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,h=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(h,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=h.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(),h=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,h);g===h&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>h&&(o=(h-g)/2+c),Math.abs(a-B.x)<c&&x>h&&(o=a-(x-h)/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<=h&&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 h=e.replace(/\r\n/g,"<br/>");h=h.replace(/\n/g,"<br/>");const a=h.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=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),h=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),h.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 p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=p.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=p.node().getBBox().height,S.info("Title height",o,x)),B.push(p)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((p,w)=>p.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 h=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=h.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");G(m,x,void 0,!1,h,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,h)=>{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=h.db.getStates(),g=h.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let p;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=G(u.doc,w,u.id,!c,n,l,h);{w=$(w,u,c);let E=w.node().getBBox();p.width=E.width,p.height=E.height+b.padding/2,H[u.id]={y:b.compositTitleSize}}}else p=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(p.id+"-note",E),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",E)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}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(p=>{const w=p.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)),p.setAttribute("x1",0-M+8),p.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},ft={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{ft as diagram};
@@ -1 +1 @@
1
- import{s as R,a as W,S as N}from"./chunk-5RXB4S5H-CkBumCja.js";import{_ as f,c as t,l as S,d as P,j as z,N as _,x as U}from"./mermaid.core-CmjrekXI.js";import{s as H}from"./transform-CzGDKG_M.js";import{G as C}from"./graph-C9eacEi8.js";import{l as F}from"./layout-DEXfKzaS.js";import{l as O,j as J}from"./step-SI6FXFD6.js";import"./chunk-XXDRQBXY-j9X99vQo.js";import"./chunk-KBJHAD2P-C3HnMhHX.js";import"./chunk-2GRJ4B5K-CzGtEVrd.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./map-Czzmt4hB.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,h=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(h,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=h.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(),h=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,h);g===h&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>h&&(o=(h-g)/2+c),Math.abs(a-B.x)<c&&x>h&&(o=a-(x-h)/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<=h&&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 h=e.replace(/\r\n/g,"<br/>");h=h.replace(/\n/g,"<br/>");const a=h.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"),G=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),h=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=_(!0)),h.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}=U.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 p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=p.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=p.node().getBBox().height,S.info("Title height",o,x)),B.push(p)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((p,w)=>p.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)}G++},"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 h=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=h.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,h,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"),A=f((e,i,d,c,n,l,h)=>{const a=new C({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=h.db.getStates(),g=h.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let p;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=A(u.doc,w,u.id,!c,n,l,h);{w=$(w,u,c);let E=w.node().getBBox();p.width=E.width,p.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else p=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(p.id+"-note",E),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",E)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}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)}),F(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(p=>{const w=p.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)),p.setAttribute("x1",0-M+8),p.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},ft={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{ft as diagram};
1
+ import{s as R,a as W,S as N}from"./chunk-5RXB4S5H-CX91mO_w.js";import{_ as f,c as t,l as S,d as P,j as z,N as _,x as U}from"./mermaid.core-D_Bznvdr.js";import{s as H}from"./transform-CzGDKG_M.js";import{G as C}from"./graph-C9eacEi8.js";import{l as F}from"./layout-DEXfKzaS.js";import{l as O,j as J}from"./step-SI6FXFD6.js";import"./chunk-XXDRQBXY-Nz1f1JPS.js";import"./chunk-KBJHAD2P-BjlTMp1m.js";import"./chunk-2GRJ4B5K-7x3UypsR.js";import"./main-BBu4fQk-.js";import"./index-C5s4t4ce.js";import"./map-Czzmt4hB.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,h=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(h,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=h.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(),h=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,h);g===h&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>h&&(o=(h-g)/2+c),Math.abs(a-B.x)<c&&x>h&&(o=a-(x-h)/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<=h&&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 h=e.replace(/\r\n/g,"<br/>");h=h.replace(/\n/g,"<br/>");const a=h.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"),G=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),h=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=_(!0)),h.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}=U.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 p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=p.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=p.node().getBBox().height,S.info("Title height",o,x)),B.push(p)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((p,w)=>p.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)}G++},"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 h=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=h.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,h,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"),A=f((e,i,d,c,n,l,h)=>{const a=new C({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=h.db.getStates(),g=h.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let p;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=A(u.doc,w,u.id,!c,n,l,h);{w=$(w,u,c);let E=w.node().getBBox();p.width=E.width,p.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else p=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(p.id+"-note",E),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",E)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}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)}),F(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(p=>{const w=p.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)),p.setAttribute("x1",0-M+8),p.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},ft={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{ft as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as i}from"./chunk-M3IUQBOH-DYx0J19K.js";import{_ as o}from"./render-O7CIS3YK-Dn1e27o_.js";import"./transform-CzGDKG_M.js";import"./chunk-LV3HUYFY-riE_n54k.js";import"./chunk-NDIOYS4C-D34dHdEf.js";import"./chunk-ISA7TJRJ-CFmR6SoA.js";import"./mermaid-layout-elk.core-CS6tfHSb.js";import"./main-BBu4fQk-.js";import"./index-C5s4t4ce.js";import"./step-SI6FXFD6.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var w={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:o(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{w as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as i}from"./chunk-5RXB4S5H-CX91mO_w.js";import{_ as s}from"./mermaid.core-D_Bznvdr.js";import"./transform-CzGDKG_M.js";import"./chunk-XXDRQBXY-Nz1f1JPS.js";import"./chunk-KBJHAD2P-BjlTMp1m.js";import"./chunk-2GRJ4B5K-7x3UypsR.js";import"./main-BBu4fQk-.js";import"./index-C5s4t4ce.js";import"./step-SI6FXFD6.js";var f={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{f as diagram};