ranui 0.2.0-alpha.7 → 0.2.1-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  5. package/dist/arc-D25LhgTs.cjs +1 -0
  6. package/dist/arc-DRPGof21.js +82 -0
  7. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  11. package/dist/array-By5736M5.js +7 -0
  12. package/dist/array-C3cbN3GY.cjs +1 -0
  13. package/dist/arrow-down-Bi5kqUrX.js +12 -0
  14. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  15. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  16. package/dist/builder.d.ts +4 -4
  17. package/dist/builder.js +39 -30
  18. package/dist/builtin-BkM0LLof.js +416 -0
  19. package/dist/button-D0zcnKnG.js +117 -0
  20. package/dist/button.js +1 -1
  21. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  22. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  23. package/dist/{card-BVvXX6KM.js → card-CygMndQS.js} +2 -2
  24. package/dist/card.js +1 -1
  25. package/dist/channel-C9WSNwcS.cjs +1 -0
  26. package/dist/channel-k5-UxdcV.js +5 -0
  27. package/dist/{checkbox-BtoX9X2Z.js → checkbox-D5om9aJO.js} +10 -10
  28. package/dist/checkbox.js +1 -1
  29. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  30. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  31. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  32. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  33. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  34. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  35. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  36. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  37. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  38. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  39. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  40. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  41. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  42. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  43. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  44. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  45. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  46. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  47. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  48. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  49. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  50. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  51. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  52. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  53. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  54. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  55. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  56. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  57. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  58. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  59. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  60. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  61. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  62. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  63. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  64. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  65. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  66. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  67. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  68. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  69. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  70. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  71. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  72. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  73. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  74. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  75. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  76. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  77. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  78. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  79. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  80. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  81. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  82. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  83. package/dist/{colorpicker-Dukms7ET.js → colorpicker-qWnaTlYX.js} +9 -10
  84. package/dist/colorpicker.js +1 -1
  85. package/dist/components/colorpicker/index.d.ts +3 -3
  86. package/dist/components/glass/index.d.ts +52 -0
  87. package/dist/components/icon/builtin.d.ts +9 -0
  88. package/dist/components/icon/core-icons.d.ts +13 -0
  89. package/dist/components/icon/index.d.ts +8 -0
  90. package/dist/components/mermaid/index.d.ts +52 -0
  91. package/dist/components/modal/index.d.ts +9 -0
  92. package/dist/components/route/index.d.ts +10 -4
  93. package/dist/components/router/index.d.ts +3 -0
  94. package/dist/content-Rry-U6ir.js +39 -0
  95. package/dist/content.js +5 -0
  96. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  97. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  98. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  99. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  100. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  101. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  102. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  103. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  104. package/dist/dagre-D1-W1tt6.cjs +1 -0
  105. package/dist/dagre-D8GLTwuf.js +1578 -0
  106. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  107. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  108. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  109. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  110. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  111. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  112. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  113. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  114. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  115. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  116. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  117. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  118. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  119. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  120. package/dist/dist-C0Fwsvsq.js +70 -0
  121. package/dist/dist-C20XxSsP.cjs +1 -0
  122. package/dist/{dropdown-BYS1Trdu.js → dropdown-DzdAR1nI.js} +4 -4
  123. package/dist/dropdown.js +1 -1
  124. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  125. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  126. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  127. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  128. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  129. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  130. package/dist/factory-BkvRcCOx.js +482 -0
  131. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  132. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  133. package/dist/{form-BsB5JhS4.js → form-CUJpeQ7Q.js} +5 -5
  134. package/dist/form.js +1 -1
  135. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  136. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  137. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  138. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  139. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  140. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  141. package/dist/glass-Bj1Zf8Hy.js +115 -0
  142. package/dist/glass.js +5 -0
  143. package/dist/graphlib-CCKThIKP.js +1104 -0
  144. package/dist/graphlib-Du-578Js.cjs +1 -0
  145. package/dist/{icon-pfolda2m.js → icon-CtlZJISZ.js} +110 -21
  146. package/dist/icon.js +4 -3
  147. package/dist/icons.js +5 -0
  148. package/dist/iife/button.iife.js +1 -1
  149. package/dist/iife/card.iife.js +1 -1
  150. package/dist/iife/checkbox.iife.js +1 -1
  151. package/dist/iife/colorpicker.iife.js +2 -2
  152. package/dist/iife/content.iife.js +1 -0
  153. package/dist/iife/dropdown.iife.js +1 -1
  154. package/dist/iife/form.iife.js +1 -1
  155. package/dist/iife/glass.iife.js +1 -0
  156. package/dist/iife/icon.iife.js +1 -1
  157. package/dist/iife/image.iife.js +1 -1
  158. package/dist/iife/input.iife.js +1 -1
  159. package/dist/iife/loading.iife.js +1 -1
  160. package/dist/iife/math.iife.js +14 -14
  161. package/dist/iife/mermaid.iife.js +3535 -0
  162. package/dist/iife/message.iife.js +1 -1
  163. package/dist/iife/modal.iife.js +1 -1
  164. package/dist/iife/player.iife.js +8 -8
  165. package/dist/iife/popover.iife.js +1 -1
  166. package/dist/iife/progress.iife.js +1 -1
  167. package/dist/iife/radar.iife.js +1 -1
  168. package/dist/iife/route.iife.js +1 -1
  169. package/dist/iife/router.iife.js +1 -1
  170. package/dist/iife/scratch.iife.js +1 -1
  171. package/dist/iife/section.iife.js +1 -1
  172. package/dist/iife/select.iife.js +2 -2
  173. package/dist/iife/skeleton.iife.js +1 -1
  174. package/dist/iife/tab.iife.js +1 -1
  175. package/dist/iife/tabpane.iife.js +1 -1
  176. package/dist/{image-BXpKQ9sU.js → image-ILZNlaGc.js} +4 -4
  177. package/dist/image.js +1 -1
  178. package/dist/index.cjs +257 -23
  179. package/dist/index.d.ts +11 -1
  180. package/dist/index.iife.js +3842 -74
  181. package/dist/index.js +86 -78
  182. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  183. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  184. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  185. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  186. package/dist/init-1VpIn1S3.js +16 -0
  187. package/dist/init-CbDwVtpO.cjs +1 -0
  188. package/dist/{input-BMMM60e6.js → input-CDH6zY9I.js} +6 -6
  189. package/dist/input.js +1 -1
  190. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  191. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  192. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  193. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  194. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  195. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  196. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  197. package/dist/katex-Pg2EqTH0.js +23485 -0
  198. package/dist/line-BIPmUVxO.js +33 -0
  199. package/dist/line-CAB5QHC6.cjs +1 -0
  200. package/dist/linear-B2AM4ZBe.js +259 -0
  201. package/dist/linear-CSAfNEpl.cjs +1 -0
  202. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  203. package/dist/link.js +1 -1
  204. package/dist/{loading-BScjyeVm.js → loading-DJWGih1g.js} +4 -4
  205. package/dist/loading.js +1 -1
  206. package/dist/map-BC2bk_rV.cjs +1 -0
  207. package/dist/map-DMSWkcq6.js +208 -0
  208. package/dist/{math-IjzOAwnA.js → math-DRmkEDSQ.js} +4 -4
  209. package/dist/math.js +1 -1
  210. package/dist/mermaid-CMhm7npE.js +261 -0
  211. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  212. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  213. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  214. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  215. package/dist/mermaid.js +5 -0
  216. package/dist/{message-CLpuP8HY.js → message-BpYJBvYn.js} +36 -51
  217. package/dist/message.js +1 -1
  218. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  219. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  220. package/dist/{modal-DOTpABRe.js → modal-BeQlDYDP.js} +40 -24
  221. package/dist/modal.js +1 -1
  222. package/dist/ordinal-BMN81JG2.js +64 -0
  223. package/dist/ordinal-BplLHIij.cjs +1 -0
  224. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  225. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  226. package/dist/path-Bja5PoYn.js +82 -0
  227. package/dist/path-DmfWsuKi.cjs +1 -0
  228. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  229. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  230. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  231. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  232. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  233. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  234. package/dist/{player-5olrw-qB.js → player-CQ4e3Yeo.js} +196 -195
  235. package/dist/player.js +1 -1
  236. package/dist/{popover-DRUQjdPs.js → popover-eZMnL1F3.js} +22 -54
  237. package/dist/popover.js +1 -1
  238. package/dist/{progress-BIEXYYd2.js → progress-DyHgW4Ep.js} +5 -5
  239. package/dist/progress.js +1 -1
  240. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  241. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  242. package/dist/{radar-DAF95_Mj.js → radar-D21Rccap.js} +5 -5
  243. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  244. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  245. package/dist/radar.js +1 -1
  246. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  247. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  248. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  249. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  250. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  251. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  252. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  253. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  254. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  255. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  256. package/dist/ranui.css +1 -1
  257. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  258. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  259. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  260. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  261. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  262. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  263. package/dist/route-pR5P4ann.js +116 -0
  264. package/dist/route.js +1 -1
  265. package/dist/{router-B9rCrWXm.js → router-CewzSH7O.js} +23 -18
  266. package/dist/router.js +1 -1
  267. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  268. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  269. package/dist/{scratch-QlPyy1f4.js → scratch-BFVsgl-7.js} +2 -2
  270. package/dist/scratch.js +1 -1
  271. package/dist/{section-D0qMm9KM.js → section-DSPCsIxv.js} +2 -2
  272. package/dist/section.js +1 -1
  273. package/dist/{select-aAaWoveE.js → select-B58nMfB1.js} +16 -23
  274. package/dist/select.js +1 -1
  275. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  276. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  277. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  278. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  279. package/dist/{skeleton-CFqQmKyt.js → skeleton-DoHYMsTn.js} +5 -5
  280. package/dist/skeleton.js +1 -1
  281. package/dist/src-C9EhKhbk.cjs +1 -0
  282. package/dist/src-DtRLxcYO.js +2104 -0
  283. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  284. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  285. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  286. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  287. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  288. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  289. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  290. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  291. package/dist/{tab-CiF2YPck.js → tab-BRPdZ9Ws.js} +5 -5
  292. package/dist/tab.js +1 -1
  293. package/dist/{tabpane-B-m3xwqu.js → tabpane-Owf72hw_.js} +5 -5
  294. package/dist/tabpane.js +1 -1
  295. package/dist/test/unit/icon.builtin.test.d.ts +1 -0
  296. package/dist/test/unit/utils.colorpicker.reconnect.test.d.ts +1 -0
  297. package/dist/test/unit/utils.route.lazy.test.d.ts +1 -0
  298. package/dist/test/unit/utils.router.match.test.d.ts +1 -0
  299. package/dist/test/unit/utils.signal.owner.test.d.ts +1 -0
  300. package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
  301. package/dist/theme-switch.js +1 -1
  302. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  303. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  304. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  305. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  306. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  307. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  308. package/dist/utils/builder/core.d.ts +153 -16
  309. package/dist/utils/builder/factory.d.ts +1 -1
  310. package/dist/utils/builder/index.d.ts +3 -3
  311. package/dist/utils/builder/signal.d.ts +93 -64
  312. package/dist/utils/router/index.d.ts +13 -3
  313. package/dist/utils/router.js +95 -54
  314. package/dist/utils/theme.d.ts +1 -1
  315. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  316. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  317. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  318. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  319. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  320. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  321. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  322. package/dist/warning-circle-fill-Cz0qu7AH.js +23 -0
  323. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  324. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  325. package/docs/BUILDER.md +383 -0
  326. package/docs/COMPONENTS.md +21 -3
  327. package/package.json +31 -3
  328. package/dist/button-Be_uHDZG.js +0 -117
  329. package/dist/factory-BdsO0dEW.js +0 -165
  330. package/dist/route-MQZpn2BP.js +0 -88
  331. package/dist/signal-CSSZxlK5.js +0 -57
@@ -0,0 +1,4326 @@
1
+ import { n as g } from "./chunk-Y2CYZVJY-0JxdZxki.js";
2
+ import { m as st, p as Vt } from "./src-DtRLxcYO.js";
3
+ import { A as $, F as Be, G as er, H as rr, K as ar, O as sr, U as Ce, a as ir, b as Kt, c as nr, i as Pt, r as or, s as N, v as cr, w as lr, x as tt, y as hr, z as Yt } from "./chunk-WYO6CB5R-DDHkKowO.js";
4
+ import { t as dr } from "./dist-C0Fwsvsq.js";
5
+ import { g as Z, p as Ve } from "./chunk-ICXQ74PX-DR8rL-xF.js";
6
+ import { a as Tr, c as se, i as ie, n as pr, r as ne, s as Tt } from "./chunk-32BRIVSS-jAuAwMVV.js";
7
+ import { t as Er } from "./chunk-2Q5K7J3B-DlFVJRAn.js";
8
+ import { n as ur, t as fr } from "./chunk-ZIRB5QZD-C7OH2FI2.js";
9
+ var Ye = dr(), ee = (function() {
10
+ var e = /* @__PURE__ */ g(function(S, v, M, B) {
11
+ for (M = M || {}, B = S.length; B--; M[S[B]] = v) ;
12
+ return M;
13
+ }, "o"), t = [1, 2], a = [1, 3], r = [1, 4], i = [2, 4], n = [1, 9], s = [1, 11], o = [1, 12], u = [1, 14], T = [1, 15], h = [1, 17], x = [1, 18], E = [1, 19], L = [1, 25], p = [1, 26], _ = [1, 27], f = [1, 28], I = [1, 29], O = [1, 30], b = [1, 31], A = [1, 32], P = [1, 33], k = [1, 34], C = [1, 35], W = [1, 36], K = [1, 37], U = [1, 38], G = [1, 39], J = [1, 40], nt = [1, 42], et = [1, 43], z = [1, 44], it = [1, 45], rt = [1, 46], Y = [1, 47], D = [
14
+ 1,
15
+ 4,
16
+ 5,
17
+ 10,
18
+ 14,
19
+ 15,
20
+ 17,
21
+ 19,
22
+ 22,
23
+ 24,
24
+ 30,
25
+ 31,
26
+ 32,
27
+ 34,
28
+ 36,
29
+ 37,
30
+ 38,
31
+ 39,
32
+ 40,
33
+ 42,
34
+ 44,
35
+ 45,
36
+ 47,
37
+ 48,
38
+ 49,
39
+ 50,
40
+ 51,
41
+ 53,
42
+ 54,
43
+ 56,
44
+ 61,
45
+ 62,
46
+ 63,
47
+ 64,
48
+ 73
49
+ ], At = [1, 74], kt = [1, 80], m = [1, 81], w = [1, 82], ht = [1, 83], at = [1, 84], F = [1, 85], Ot = [1, 86], oe = [1, 87], ce = [1, 88], le = [1, 89], he = [1, 90], de = [1, 91], Te = [1, 92], pe = [1, 93], Ee = [1, 94], ue = [1, 95], fe = [1, 96], _e = [1, 97], ge = [1, 98], xe = [1, 99], Ie = [1, 100], ye = [1, 101], Re = [1, 102], Oe = [1, 103], Le = [1, 104], be = [1, 105], me = [2, 78], St = [
50
+ 4,
51
+ 5,
52
+ 17,
53
+ 51,
54
+ 53,
55
+ 54
56
+ ], Dt = [
57
+ 4,
58
+ 5,
59
+ 10,
60
+ 14,
61
+ 15,
62
+ 17,
63
+ 19,
64
+ 22,
65
+ 24,
66
+ 30,
67
+ 31,
68
+ 32,
69
+ 34,
70
+ 36,
71
+ 37,
72
+ 38,
73
+ 39,
74
+ 40,
75
+ 42,
76
+ 44,
77
+ 45,
78
+ 47,
79
+ 51,
80
+ 53,
81
+ 54,
82
+ 56,
83
+ 61,
84
+ 62,
85
+ 63,
86
+ 64,
87
+ 73
88
+ ], Ae = [
89
+ 4,
90
+ 5,
91
+ 10,
92
+ 14,
93
+ 15,
94
+ 17,
95
+ 19,
96
+ 22,
97
+ 24,
98
+ 30,
99
+ 31,
100
+ 32,
101
+ 34,
102
+ 36,
103
+ 37,
104
+ 38,
105
+ 39,
106
+ 40,
107
+ 42,
108
+ 44,
109
+ 45,
110
+ 47,
111
+ 50,
112
+ 51,
113
+ 53,
114
+ 54,
115
+ 56,
116
+ 61,
117
+ 62,
118
+ 63,
119
+ 64,
120
+ 73
121
+ ], Ut = [
122
+ 4,
123
+ 5,
124
+ 10,
125
+ 14,
126
+ 15,
127
+ 17,
128
+ 19,
129
+ 22,
130
+ 24,
131
+ 30,
132
+ 31,
133
+ 32,
134
+ 34,
135
+ 36,
136
+ 37,
137
+ 38,
138
+ 39,
139
+ 40,
140
+ 42,
141
+ 44,
142
+ 45,
143
+ 47,
144
+ 49,
145
+ 51,
146
+ 53,
147
+ 54,
148
+ 56,
149
+ 61,
150
+ 62,
151
+ 63,
152
+ 64,
153
+ 73
154
+ ], Se = [
155
+ 4,
156
+ 5,
157
+ 10,
158
+ 14,
159
+ 15,
160
+ 17,
161
+ 19,
162
+ 22,
163
+ 24,
164
+ 30,
165
+ 31,
166
+ 32,
167
+ 34,
168
+ 36,
169
+ 37,
170
+ 38,
171
+ 39,
172
+ 40,
173
+ 42,
174
+ 44,
175
+ 45,
176
+ 47,
177
+ 48,
178
+ 51,
179
+ 53,
180
+ 54,
181
+ 56,
182
+ 61,
183
+ 62,
184
+ 63,
185
+ 64,
186
+ 73
187
+ ], Gt = [5, 52], q = [
188
+ 70,
189
+ 71,
190
+ 72,
191
+ 73
192
+ ], ot = [1, 151], Xt = {
193
+ trace: /* @__PURE__ */ g(function() {
194
+ }, "trace"),
195
+ yy: {},
196
+ symbols_: {
197
+ error: 2,
198
+ start: 3,
199
+ SPACE: 4,
200
+ NEWLINE: 5,
201
+ SD: 6,
202
+ document: 7,
203
+ line: 8,
204
+ statement: 9,
205
+ INVALID: 10,
206
+ box_section: 11,
207
+ box_line: 12,
208
+ participant_statement: 13,
209
+ create: 14,
210
+ box: 15,
211
+ restOfLine: 16,
212
+ end: 17,
213
+ signal: 18,
214
+ autonumber: 19,
215
+ NUM: 20,
216
+ off: 21,
217
+ activate: 22,
218
+ actor: 23,
219
+ deactivate: 24,
220
+ note_statement: 25,
221
+ links_statement: 26,
222
+ link_statement: 27,
223
+ properties_statement: 28,
224
+ details_statement: 29,
225
+ title: 30,
226
+ legacy_title: 31,
227
+ acc_title: 32,
228
+ acc_title_value: 33,
229
+ acc_descr: 34,
230
+ acc_descr_value: 35,
231
+ acc_descr_multiline_value: 36,
232
+ loop: 37,
233
+ rect: 38,
234
+ opt: 39,
235
+ alt: 40,
236
+ else_sections: 41,
237
+ par: 42,
238
+ par_sections: 43,
239
+ par_over: 44,
240
+ critical: 45,
241
+ option_sections: 46,
242
+ break: 47,
243
+ option: 48,
244
+ and: 49,
245
+ else: 50,
246
+ participant: 51,
247
+ AS: 52,
248
+ participant_actor: 53,
249
+ destroy: 54,
250
+ actor_with_config: 55,
251
+ note: 56,
252
+ placement: 57,
253
+ text2: 58,
254
+ over: 59,
255
+ actor_pair: 60,
256
+ links: 61,
257
+ link: 62,
258
+ properties: 63,
259
+ details: 64,
260
+ spaceList: 65,
261
+ ",": 66,
262
+ left_of: 67,
263
+ right_of: 68,
264
+ signaltype: 69,
265
+ "+": 70,
266
+ "-": 71,
267
+ "()": 72,
268
+ ACTOR: 73,
269
+ config_object: 74,
270
+ CONFIG_START: 75,
271
+ CONFIG_CONTENT: 76,
272
+ CONFIG_END: 77,
273
+ SOLID_OPEN_ARROW: 78,
274
+ DOTTED_OPEN_ARROW: 79,
275
+ SOLID_ARROW: 80,
276
+ SOLID_ARROW_TOP: 81,
277
+ SOLID_ARROW_BOTTOM: 82,
278
+ STICK_ARROW_TOP: 83,
279
+ STICK_ARROW_BOTTOM: 84,
280
+ SOLID_ARROW_TOP_DOTTED: 85,
281
+ SOLID_ARROW_BOTTOM_DOTTED: 86,
282
+ STICK_ARROW_TOP_DOTTED: 87,
283
+ STICK_ARROW_BOTTOM_DOTTED: 88,
284
+ SOLID_ARROW_TOP_REVERSE: 89,
285
+ SOLID_ARROW_BOTTOM_REVERSE: 90,
286
+ STICK_ARROW_TOP_REVERSE: 91,
287
+ STICK_ARROW_BOTTOM_REVERSE: 92,
288
+ SOLID_ARROW_TOP_REVERSE_DOTTED: 93,
289
+ SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 94,
290
+ STICK_ARROW_TOP_REVERSE_DOTTED: 95,
291
+ STICK_ARROW_BOTTOM_REVERSE_DOTTED: 96,
292
+ BIDIRECTIONAL_SOLID_ARROW: 97,
293
+ DOTTED_ARROW: 98,
294
+ BIDIRECTIONAL_DOTTED_ARROW: 99,
295
+ SOLID_CROSS: 100,
296
+ DOTTED_CROSS: 101,
297
+ SOLID_POINT: 102,
298
+ DOTTED_POINT: 103,
299
+ TXT: 104,
300
+ $accept: 0,
301
+ $end: 1
302
+ },
303
+ terminals_: {
304
+ 2: "error",
305
+ 4: "SPACE",
306
+ 5: "NEWLINE",
307
+ 6: "SD",
308
+ 10: "INVALID",
309
+ 14: "create",
310
+ 15: "box",
311
+ 16: "restOfLine",
312
+ 17: "end",
313
+ 19: "autonumber",
314
+ 20: "NUM",
315
+ 21: "off",
316
+ 22: "activate",
317
+ 24: "deactivate",
318
+ 30: "title",
319
+ 31: "legacy_title",
320
+ 32: "acc_title",
321
+ 33: "acc_title_value",
322
+ 34: "acc_descr",
323
+ 35: "acc_descr_value",
324
+ 36: "acc_descr_multiline_value",
325
+ 37: "loop",
326
+ 38: "rect",
327
+ 39: "opt",
328
+ 40: "alt",
329
+ 42: "par",
330
+ 44: "par_over",
331
+ 45: "critical",
332
+ 47: "break",
333
+ 48: "option",
334
+ 49: "and",
335
+ 50: "else",
336
+ 51: "participant",
337
+ 52: "AS",
338
+ 53: "participant_actor",
339
+ 54: "destroy",
340
+ 56: "note",
341
+ 59: "over",
342
+ 61: "links",
343
+ 62: "link",
344
+ 63: "properties",
345
+ 64: "details",
346
+ 66: ",",
347
+ 67: "left_of",
348
+ 68: "right_of",
349
+ 70: "+",
350
+ 71: "-",
351
+ 72: "()",
352
+ 73: "ACTOR",
353
+ 75: "CONFIG_START",
354
+ 76: "CONFIG_CONTENT",
355
+ 77: "CONFIG_END",
356
+ 78: "SOLID_OPEN_ARROW",
357
+ 79: "DOTTED_OPEN_ARROW",
358
+ 80: "SOLID_ARROW",
359
+ 81: "SOLID_ARROW_TOP",
360
+ 82: "SOLID_ARROW_BOTTOM",
361
+ 83: "STICK_ARROW_TOP",
362
+ 84: "STICK_ARROW_BOTTOM",
363
+ 85: "SOLID_ARROW_TOP_DOTTED",
364
+ 86: "SOLID_ARROW_BOTTOM_DOTTED",
365
+ 87: "STICK_ARROW_TOP_DOTTED",
366
+ 88: "STICK_ARROW_BOTTOM_DOTTED",
367
+ 89: "SOLID_ARROW_TOP_REVERSE",
368
+ 90: "SOLID_ARROW_BOTTOM_REVERSE",
369
+ 91: "STICK_ARROW_TOP_REVERSE",
370
+ 92: "STICK_ARROW_BOTTOM_REVERSE",
371
+ 93: "SOLID_ARROW_TOP_REVERSE_DOTTED",
372
+ 94: "SOLID_ARROW_BOTTOM_REVERSE_DOTTED",
373
+ 95: "STICK_ARROW_TOP_REVERSE_DOTTED",
374
+ 96: "STICK_ARROW_BOTTOM_REVERSE_DOTTED",
375
+ 97: "BIDIRECTIONAL_SOLID_ARROW",
376
+ 98: "DOTTED_ARROW",
377
+ 99: "BIDIRECTIONAL_DOTTED_ARROW",
378
+ 100: "SOLID_CROSS",
379
+ 101: "DOTTED_CROSS",
380
+ 102: "SOLID_POINT",
381
+ 103: "DOTTED_POINT",
382
+ 104: "TXT"
383
+ },
384
+ productions_: [
385
+ 0,
386
+ [3, 2],
387
+ [3, 2],
388
+ [3, 2],
389
+ [7, 0],
390
+ [7, 2],
391
+ [8, 2],
392
+ [8, 1],
393
+ [8, 1],
394
+ [8, 1],
395
+ [11, 0],
396
+ [11, 2],
397
+ [12, 2],
398
+ [12, 1],
399
+ [12, 1],
400
+ [9, 1],
401
+ [9, 2],
402
+ [9, 4],
403
+ [9, 2],
404
+ [9, 4],
405
+ [9, 3],
406
+ [9, 3],
407
+ [9, 2],
408
+ [9, 3],
409
+ [9, 3],
410
+ [9, 2],
411
+ [9, 2],
412
+ [9, 2],
413
+ [9, 2],
414
+ [9, 2],
415
+ [9, 1],
416
+ [9, 1],
417
+ [9, 2],
418
+ [9, 2],
419
+ [9, 1],
420
+ [9, 4],
421
+ [9, 4],
422
+ [9, 4],
423
+ [9, 4],
424
+ [9, 4],
425
+ [9, 4],
426
+ [9, 4],
427
+ [9, 4],
428
+ [46, 1],
429
+ [46, 4],
430
+ [43, 1],
431
+ [43, 4],
432
+ [41, 1],
433
+ [41, 4],
434
+ [13, 5],
435
+ [13, 3],
436
+ [13, 5],
437
+ [13, 3],
438
+ [13, 3],
439
+ [13, 5],
440
+ [13, 3],
441
+ [13, 5],
442
+ [13, 3],
443
+ [25, 4],
444
+ [25, 4],
445
+ [26, 3],
446
+ [27, 3],
447
+ [28, 3],
448
+ [29, 3],
449
+ [65, 2],
450
+ [65, 1],
451
+ [60, 3],
452
+ [60, 1],
453
+ [57, 1],
454
+ [57, 1],
455
+ [18, 5],
456
+ [18, 5],
457
+ [18, 5],
458
+ [18, 5],
459
+ [18, 6],
460
+ [18, 4],
461
+ [55, 2],
462
+ [74, 3],
463
+ [23, 1],
464
+ [69, 1],
465
+ [69, 1],
466
+ [69, 1],
467
+ [69, 1],
468
+ [69, 1],
469
+ [69, 1],
470
+ [69, 1],
471
+ [69, 1],
472
+ [69, 1],
473
+ [69, 1],
474
+ [69, 1],
475
+ [69, 1],
476
+ [69, 1],
477
+ [69, 1],
478
+ [69, 1],
479
+ [69, 1],
480
+ [69, 1],
481
+ [69, 1],
482
+ [69, 1],
483
+ [69, 1],
484
+ [69, 1],
485
+ [69, 1],
486
+ [69, 1],
487
+ [69, 1],
488
+ [69, 1],
489
+ [69, 1],
490
+ [58, 1]
491
+ ],
492
+ performAction: /* @__PURE__ */ g(function(v, M, B, y, X, c, Nt) {
493
+ var d = c.length - 1;
494
+ switch (X) {
495
+ case 3:
496
+ return y.apply(c[d]), c[d];
497
+ case 4:
498
+ case 10:
499
+ this.$ = [];
500
+ break;
501
+ case 5:
502
+ case 11:
503
+ c[d - 1].push(c[d]), this.$ = c[d - 1];
504
+ break;
505
+ case 6:
506
+ case 7:
507
+ case 12:
508
+ case 13:
509
+ this.$ = c[d];
510
+ break;
511
+ case 8:
512
+ case 9:
513
+ case 14:
514
+ this.$ = [];
515
+ break;
516
+ case 16:
517
+ c[d].type = "createParticipant", this.$ = c[d];
518
+ break;
519
+ case 17:
520
+ c[d - 1].unshift({
521
+ type: "boxStart",
522
+ boxData: y.parseBoxData(c[d - 2])
523
+ }), c[d - 1].push({
524
+ type: "boxEnd",
525
+ boxText: c[d - 2]
526
+ }), this.$ = c[d - 1];
527
+ break;
528
+ case 19:
529
+ this.$ = {
530
+ type: "sequenceIndex",
531
+ sequenceIndex: Number(c[d - 2]),
532
+ sequenceIndexStep: Number(c[d - 1]),
533
+ sequenceVisible: !0,
534
+ signalType: y.LINETYPE.AUTONUMBER
535
+ };
536
+ break;
537
+ case 20:
538
+ this.$ = {
539
+ type: "sequenceIndex",
540
+ sequenceIndex: Number(c[d - 1]),
541
+ sequenceIndexStep: 1,
542
+ sequenceVisible: !0,
543
+ signalType: y.LINETYPE.AUTONUMBER
544
+ };
545
+ break;
546
+ case 21:
547
+ this.$ = {
548
+ type: "sequenceIndex",
549
+ sequenceVisible: !1,
550
+ signalType: y.LINETYPE.AUTONUMBER
551
+ };
552
+ break;
553
+ case 22:
554
+ this.$ = {
555
+ type: "sequenceIndex",
556
+ sequenceVisible: !0,
557
+ signalType: y.LINETYPE.AUTONUMBER
558
+ };
559
+ break;
560
+ case 23:
561
+ this.$ = {
562
+ type: "activeStart",
563
+ signalType: y.LINETYPE.ACTIVE_START,
564
+ actor: c[d - 1].actor
565
+ };
566
+ break;
567
+ case 24:
568
+ this.$ = {
569
+ type: "activeEnd",
570
+ signalType: y.LINETYPE.ACTIVE_END,
571
+ actor: c[d - 1].actor
572
+ };
573
+ break;
574
+ case 30:
575
+ y.setDiagramTitle(c[d].substring(6)), this.$ = c[d].substring(6);
576
+ break;
577
+ case 31:
578
+ y.setDiagramTitle(c[d].substring(7)), this.$ = c[d].substring(7);
579
+ break;
580
+ case 32:
581
+ this.$ = c[d].trim(), y.setAccTitle(this.$);
582
+ break;
583
+ case 33:
584
+ case 34:
585
+ this.$ = c[d].trim(), y.setAccDescription(this.$);
586
+ break;
587
+ case 35:
588
+ c[d - 1].unshift({
589
+ type: "loopStart",
590
+ loopText: y.parseMessage(c[d - 2]),
591
+ signalType: y.LINETYPE.LOOP_START
592
+ }), c[d - 1].push({
593
+ type: "loopEnd",
594
+ loopText: c[d - 2],
595
+ signalType: y.LINETYPE.LOOP_END
596
+ }), this.$ = c[d - 1];
597
+ break;
598
+ case 36:
599
+ c[d - 1].unshift({
600
+ type: "rectStart",
601
+ color: y.parseMessage(c[d - 2]),
602
+ signalType: y.LINETYPE.RECT_START
603
+ }), c[d - 1].push({
604
+ type: "rectEnd",
605
+ color: y.parseMessage(c[d - 2]),
606
+ signalType: y.LINETYPE.RECT_END
607
+ }), this.$ = c[d - 1];
608
+ break;
609
+ case 37:
610
+ c[d - 1].unshift({
611
+ type: "optStart",
612
+ optText: y.parseMessage(c[d - 2]),
613
+ signalType: y.LINETYPE.OPT_START
614
+ }), c[d - 1].push({
615
+ type: "optEnd",
616
+ optText: y.parseMessage(c[d - 2]),
617
+ signalType: y.LINETYPE.OPT_END
618
+ }), this.$ = c[d - 1];
619
+ break;
620
+ case 38:
621
+ c[d - 1].unshift({
622
+ type: "altStart",
623
+ altText: y.parseMessage(c[d - 2]),
624
+ signalType: y.LINETYPE.ALT_START
625
+ }), c[d - 1].push({
626
+ type: "altEnd",
627
+ signalType: y.LINETYPE.ALT_END
628
+ }), this.$ = c[d - 1];
629
+ break;
630
+ case 39:
631
+ c[d - 1].unshift({
632
+ type: "parStart",
633
+ parText: y.parseMessage(c[d - 2]),
634
+ signalType: y.LINETYPE.PAR_START
635
+ }), c[d - 1].push({
636
+ type: "parEnd",
637
+ signalType: y.LINETYPE.PAR_END
638
+ }), this.$ = c[d - 1];
639
+ break;
640
+ case 40:
641
+ c[d - 1].unshift({
642
+ type: "parStart",
643
+ parText: y.parseMessage(c[d - 2]),
644
+ signalType: y.LINETYPE.PAR_OVER_START
645
+ }), c[d - 1].push({
646
+ type: "parEnd",
647
+ signalType: y.LINETYPE.PAR_END
648
+ }), this.$ = c[d - 1];
649
+ break;
650
+ case 41:
651
+ c[d - 1].unshift({
652
+ type: "criticalStart",
653
+ criticalText: y.parseMessage(c[d - 2]),
654
+ signalType: y.LINETYPE.CRITICAL_START
655
+ }), c[d - 1].push({
656
+ type: "criticalEnd",
657
+ signalType: y.LINETYPE.CRITICAL_END
658
+ }), this.$ = c[d - 1];
659
+ break;
660
+ case 42:
661
+ c[d - 1].unshift({
662
+ type: "breakStart",
663
+ breakText: y.parseMessage(c[d - 2]),
664
+ signalType: y.LINETYPE.BREAK_START
665
+ }), c[d - 1].push({
666
+ type: "breakEnd",
667
+ optText: y.parseMessage(c[d - 2]),
668
+ signalType: y.LINETYPE.BREAK_END
669
+ }), this.$ = c[d - 1];
670
+ break;
671
+ case 44:
672
+ this.$ = c[d - 3].concat([{
673
+ type: "option",
674
+ optionText: y.parseMessage(c[d - 1]),
675
+ signalType: y.LINETYPE.CRITICAL_OPTION
676
+ }, c[d]]);
677
+ break;
678
+ case 46:
679
+ this.$ = c[d - 3].concat([{
680
+ type: "and",
681
+ parText: y.parseMessage(c[d - 1]),
682
+ signalType: y.LINETYPE.PAR_AND
683
+ }, c[d]]);
684
+ break;
685
+ case 48:
686
+ this.$ = c[d - 3].concat([{
687
+ type: "else",
688
+ altText: y.parseMessage(c[d - 1]),
689
+ signalType: y.LINETYPE.ALT_ELSE
690
+ }, c[d]]);
691
+ break;
692
+ case 49:
693
+ c[d - 3].draw = "participant", c[d - 3].type = "addParticipant", c[d - 3].description = y.parseMessage(c[d - 1]), this.$ = c[d - 3];
694
+ break;
695
+ case 50:
696
+ c[d - 1].draw = "participant", c[d - 1].type = "addParticipant", this.$ = c[d - 1];
697
+ break;
698
+ case 51:
699
+ c[d - 3].draw = "actor", c[d - 3].type = "addParticipant", c[d - 3].description = y.parseMessage(c[d - 1]), this.$ = c[d - 3];
700
+ break;
701
+ case 52:
702
+ case 57:
703
+ c[d - 1].draw = "actor", c[d - 1].type = "addParticipant", this.$ = c[d - 1];
704
+ break;
705
+ case 53:
706
+ c[d - 1].type = "destroyParticipant", this.$ = c[d - 1];
707
+ break;
708
+ case 54:
709
+ c[d - 3].draw = "participant", c[d - 3].type = "addParticipant", c[d - 3].description = y.parseMessage(c[d - 1]), this.$ = c[d - 3];
710
+ break;
711
+ case 55:
712
+ c[d - 1].draw = "participant", c[d - 1].type = "addParticipant", this.$ = c[d - 1];
713
+ break;
714
+ case 56:
715
+ c[d - 3].draw = "actor", c[d - 3].type = "addParticipant", c[d - 3].description = y.parseMessage(c[d - 1]), this.$ = c[d - 3];
716
+ break;
717
+ case 58:
718
+ this.$ = [c[d - 1], {
719
+ type: "addNote",
720
+ placement: c[d - 2],
721
+ actor: c[d - 1].actor,
722
+ text: c[d]
723
+ }];
724
+ break;
725
+ case 59:
726
+ c[d - 2] = [].concat(c[d - 1], c[d - 1]).slice(0, 2), c[d - 2][0] = c[d - 2][0].actor, c[d - 2][1] = c[d - 2][1].actor, this.$ = [c[d - 1], {
727
+ type: "addNote",
728
+ placement: y.PLACEMENT.OVER,
729
+ actor: c[d - 2].slice(0, 2),
730
+ text: c[d]
731
+ }];
732
+ break;
733
+ case 60:
734
+ this.$ = [c[d - 1], {
735
+ type: "addLinks",
736
+ actor: c[d - 1].actor,
737
+ text: c[d]
738
+ }];
739
+ break;
740
+ case 61:
741
+ this.$ = [c[d - 1], {
742
+ type: "addALink",
743
+ actor: c[d - 1].actor,
744
+ text: c[d]
745
+ }];
746
+ break;
747
+ case 62:
748
+ this.$ = [c[d - 1], {
749
+ type: "addProperties",
750
+ actor: c[d - 1].actor,
751
+ text: c[d]
752
+ }];
753
+ break;
754
+ case 63:
755
+ this.$ = [c[d - 1], {
756
+ type: "addDetails",
757
+ actor: c[d - 1].actor,
758
+ text: c[d]
759
+ }];
760
+ break;
761
+ case 66:
762
+ this.$ = [c[d - 2], c[d]];
763
+ break;
764
+ case 67:
765
+ this.$ = c[d];
766
+ break;
767
+ case 68:
768
+ this.$ = y.PLACEMENT.LEFTOF;
769
+ break;
770
+ case 69:
771
+ this.$ = y.PLACEMENT.RIGHTOF;
772
+ break;
773
+ case 70:
774
+ this.$ = [
775
+ c[d - 4],
776
+ c[d - 1],
777
+ {
778
+ type: "addMessage",
779
+ from: c[d - 4].actor,
780
+ to: c[d - 1].actor,
781
+ signalType: c[d - 3],
782
+ msg: c[d],
783
+ activate: !0
784
+ },
785
+ {
786
+ type: "activeStart",
787
+ signalType: y.LINETYPE.ACTIVE_START,
788
+ actor: c[d - 1].actor
789
+ }
790
+ ];
791
+ break;
792
+ case 71:
793
+ this.$ = [
794
+ c[d - 4],
795
+ c[d - 1],
796
+ {
797
+ type: "addMessage",
798
+ from: c[d - 4].actor,
799
+ to: c[d - 1].actor,
800
+ signalType: c[d - 3],
801
+ msg: c[d]
802
+ },
803
+ {
804
+ type: "activeEnd",
805
+ signalType: y.LINETYPE.ACTIVE_END,
806
+ actor: c[d - 4].actor
807
+ }
808
+ ];
809
+ break;
810
+ case 72:
811
+ this.$ = [
812
+ c[d - 4],
813
+ c[d - 1],
814
+ {
815
+ type: "addMessage",
816
+ from: c[d - 4].actor,
817
+ to: c[d - 1].actor,
818
+ signalType: c[d - 3],
819
+ msg: c[d],
820
+ activate: !0,
821
+ centralConnection: y.LINETYPE.CENTRAL_CONNECTION
822
+ },
823
+ {
824
+ type: "centralConnection",
825
+ signalType: y.LINETYPE.CENTRAL_CONNECTION,
826
+ actor: c[d - 1].actor
827
+ }
828
+ ];
829
+ break;
830
+ case 73:
831
+ this.$ = [
832
+ c[d - 4],
833
+ c[d - 1],
834
+ {
835
+ type: "addMessage",
836
+ from: c[d - 4].actor,
837
+ to: c[d - 1].actor,
838
+ signalType: c[d - 2],
839
+ msg: c[d],
840
+ activate: !1,
841
+ centralConnection: y.LINETYPE.CENTRAL_CONNECTION_REVERSE
842
+ },
843
+ {
844
+ type: "centralConnectionReverse",
845
+ signalType: y.LINETYPE.CENTRAL_CONNECTION_REVERSE,
846
+ actor: c[d - 4].actor
847
+ }
848
+ ];
849
+ break;
850
+ case 74:
851
+ this.$ = [
852
+ c[d - 5],
853
+ c[d - 1],
854
+ {
855
+ type: "addMessage",
856
+ from: c[d - 5].actor,
857
+ to: c[d - 1].actor,
858
+ signalType: c[d - 3],
859
+ msg: c[d],
860
+ activate: !0,
861
+ centralConnection: y.LINETYPE.CENTRAL_CONNECTION_DUAL
862
+ },
863
+ {
864
+ type: "centralConnection",
865
+ signalType: y.LINETYPE.CENTRAL_CONNECTION,
866
+ actor: c[d - 1].actor
867
+ },
868
+ {
869
+ type: "centralConnectionReverse",
870
+ signalType: y.LINETYPE.CENTRAL_CONNECTION_REVERSE,
871
+ actor: c[d - 5].actor
872
+ }
873
+ ];
874
+ break;
875
+ case 75:
876
+ this.$ = [
877
+ c[d - 3],
878
+ c[d - 1],
879
+ {
880
+ type: "addMessage",
881
+ from: c[d - 3].actor,
882
+ to: c[d - 1].actor,
883
+ signalType: c[d - 2],
884
+ msg: c[d]
885
+ }
886
+ ];
887
+ break;
888
+ case 76:
889
+ this.$ = {
890
+ type: "addParticipant",
891
+ actor: c[d - 1],
892
+ config: c[d]
893
+ };
894
+ break;
895
+ case 77:
896
+ this.$ = c[d - 1].trim();
897
+ break;
898
+ case 78:
899
+ this.$ = {
900
+ type: "addParticipant",
901
+ actor: c[d]
902
+ };
903
+ break;
904
+ case 79:
905
+ this.$ = y.LINETYPE.SOLID_OPEN;
906
+ break;
907
+ case 80:
908
+ this.$ = y.LINETYPE.DOTTED_OPEN;
909
+ break;
910
+ case 81:
911
+ this.$ = y.LINETYPE.SOLID;
912
+ break;
913
+ case 82:
914
+ this.$ = y.LINETYPE.SOLID_TOP;
915
+ break;
916
+ case 83:
917
+ this.$ = y.LINETYPE.SOLID_BOTTOM;
918
+ break;
919
+ case 84:
920
+ this.$ = y.LINETYPE.STICK_TOP;
921
+ break;
922
+ case 85:
923
+ this.$ = y.LINETYPE.STICK_BOTTOM;
924
+ break;
925
+ case 86:
926
+ this.$ = y.LINETYPE.SOLID_TOP_DOTTED;
927
+ break;
928
+ case 87:
929
+ this.$ = y.LINETYPE.SOLID_BOTTOM_DOTTED;
930
+ break;
931
+ case 88:
932
+ this.$ = y.LINETYPE.STICK_TOP_DOTTED;
933
+ break;
934
+ case 89:
935
+ this.$ = y.LINETYPE.STICK_BOTTOM_DOTTED;
936
+ break;
937
+ case 90:
938
+ this.$ = y.LINETYPE.SOLID_ARROW_TOP_REVERSE;
939
+ break;
940
+ case 91:
941
+ this.$ = y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;
942
+ break;
943
+ case 92:
944
+ this.$ = y.LINETYPE.STICK_ARROW_TOP_REVERSE;
945
+ break;
946
+ case 93:
947
+ this.$ = y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;
948
+ break;
949
+ case 94:
950
+ this.$ = y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;
951
+ break;
952
+ case 95:
953
+ this.$ = y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;
954
+ break;
955
+ case 96:
956
+ this.$ = y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;
957
+ break;
958
+ case 97:
959
+ this.$ = y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;
960
+ break;
961
+ case 98:
962
+ this.$ = y.LINETYPE.BIDIRECTIONAL_SOLID;
963
+ break;
964
+ case 99:
965
+ this.$ = y.LINETYPE.DOTTED;
966
+ break;
967
+ case 100:
968
+ this.$ = y.LINETYPE.BIDIRECTIONAL_DOTTED;
969
+ break;
970
+ case 101:
971
+ this.$ = y.LINETYPE.SOLID_CROSS;
972
+ break;
973
+ case 102:
974
+ this.$ = y.LINETYPE.DOTTED_CROSS;
975
+ break;
976
+ case 103:
977
+ this.$ = y.LINETYPE.SOLID_POINT;
978
+ break;
979
+ case 104:
980
+ this.$ = y.LINETYPE.DOTTED_POINT;
981
+ break;
982
+ case 105:
983
+ this.$ = y.parseMessage(c[d].trim().substring(1));
984
+ break;
985
+ }
986
+ }, "anonymous"),
987
+ table: [
988
+ {
989
+ 3: 1,
990
+ 4: t,
991
+ 5: a,
992
+ 6: r
993
+ },
994
+ { 1: [3] },
995
+ {
996
+ 3: 5,
997
+ 4: t,
998
+ 5: a,
999
+ 6: r
1000
+ },
1001
+ {
1002
+ 3: 6,
1003
+ 4: t,
1004
+ 5: a,
1005
+ 6: r
1006
+ },
1007
+ e([
1008
+ 1,
1009
+ 4,
1010
+ 5,
1011
+ 10,
1012
+ 14,
1013
+ 15,
1014
+ 19,
1015
+ 22,
1016
+ 24,
1017
+ 30,
1018
+ 31,
1019
+ 32,
1020
+ 34,
1021
+ 36,
1022
+ 37,
1023
+ 38,
1024
+ 39,
1025
+ 40,
1026
+ 42,
1027
+ 44,
1028
+ 45,
1029
+ 47,
1030
+ 51,
1031
+ 53,
1032
+ 54,
1033
+ 56,
1034
+ 61,
1035
+ 62,
1036
+ 63,
1037
+ 64,
1038
+ 73
1039
+ ], i, { 7: 7 }),
1040
+ { 1: [2, 1] },
1041
+ { 1: [2, 2] },
1042
+ {
1043
+ 1: [2, 3],
1044
+ 4: n,
1045
+ 5: s,
1046
+ 8: 8,
1047
+ 9: 10,
1048
+ 10: o,
1049
+ 13: 13,
1050
+ 14: u,
1051
+ 15: T,
1052
+ 18: 16,
1053
+ 19: h,
1054
+ 22: x,
1055
+ 23: 41,
1056
+ 24: E,
1057
+ 25: 20,
1058
+ 26: 21,
1059
+ 27: 22,
1060
+ 28: 23,
1061
+ 29: 24,
1062
+ 30: L,
1063
+ 31: p,
1064
+ 32: _,
1065
+ 34: f,
1066
+ 36: I,
1067
+ 37: O,
1068
+ 38: b,
1069
+ 39: A,
1070
+ 40: P,
1071
+ 42: k,
1072
+ 44: C,
1073
+ 45: W,
1074
+ 47: K,
1075
+ 51: U,
1076
+ 53: G,
1077
+ 54: J,
1078
+ 56: nt,
1079
+ 61: et,
1080
+ 62: z,
1081
+ 63: it,
1082
+ 64: rt,
1083
+ 73: Y
1084
+ },
1085
+ e(D, [2, 5]),
1086
+ {
1087
+ 9: 48,
1088
+ 13: 13,
1089
+ 14: u,
1090
+ 15: T,
1091
+ 18: 16,
1092
+ 19: h,
1093
+ 22: x,
1094
+ 23: 41,
1095
+ 24: E,
1096
+ 25: 20,
1097
+ 26: 21,
1098
+ 27: 22,
1099
+ 28: 23,
1100
+ 29: 24,
1101
+ 30: L,
1102
+ 31: p,
1103
+ 32: _,
1104
+ 34: f,
1105
+ 36: I,
1106
+ 37: O,
1107
+ 38: b,
1108
+ 39: A,
1109
+ 40: P,
1110
+ 42: k,
1111
+ 44: C,
1112
+ 45: W,
1113
+ 47: K,
1114
+ 51: U,
1115
+ 53: G,
1116
+ 54: J,
1117
+ 56: nt,
1118
+ 61: et,
1119
+ 62: z,
1120
+ 63: it,
1121
+ 64: rt,
1122
+ 73: Y
1123
+ },
1124
+ e(D, [2, 7]),
1125
+ e(D, [2, 8]),
1126
+ e(D, [2, 9]),
1127
+ e(D, [2, 15]),
1128
+ {
1129
+ 13: 49,
1130
+ 51: U,
1131
+ 53: G,
1132
+ 54: J
1133
+ },
1134
+ { 16: [1, 50] },
1135
+ { 5: [1, 51] },
1136
+ {
1137
+ 5: [1, 54],
1138
+ 20: [1, 52],
1139
+ 21: [1, 53]
1140
+ },
1141
+ {
1142
+ 23: 55,
1143
+ 73: Y
1144
+ },
1145
+ {
1146
+ 23: 56,
1147
+ 73: Y
1148
+ },
1149
+ { 5: [1, 57] },
1150
+ { 5: [1, 58] },
1151
+ { 5: [1, 59] },
1152
+ { 5: [1, 60] },
1153
+ { 5: [1, 61] },
1154
+ e(D, [2, 30]),
1155
+ e(D, [2, 31]),
1156
+ { 33: [1, 62] },
1157
+ { 35: [1, 63] },
1158
+ e(D, [2, 34]),
1159
+ { 16: [1, 64] },
1160
+ { 16: [1, 65] },
1161
+ { 16: [1, 66] },
1162
+ { 16: [1, 67] },
1163
+ { 16: [1, 68] },
1164
+ { 16: [1, 69] },
1165
+ { 16: [1, 70] },
1166
+ { 16: [1, 71] },
1167
+ {
1168
+ 23: 72,
1169
+ 55: 73,
1170
+ 73: At
1171
+ },
1172
+ {
1173
+ 23: 75,
1174
+ 55: 76,
1175
+ 73: At
1176
+ },
1177
+ {
1178
+ 23: 77,
1179
+ 73: Y
1180
+ },
1181
+ {
1182
+ 69: 78,
1183
+ 72: [1, 79],
1184
+ 78: kt,
1185
+ 79: m,
1186
+ 80: w,
1187
+ 81: ht,
1188
+ 82: at,
1189
+ 83: F,
1190
+ 84: Ot,
1191
+ 85: oe,
1192
+ 86: ce,
1193
+ 87: le,
1194
+ 88: he,
1195
+ 89: de,
1196
+ 90: Te,
1197
+ 91: pe,
1198
+ 92: Ee,
1199
+ 93: ue,
1200
+ 94: fe,
1201
+ 95: _e,
1202
+ 96: ge,
1203
+ 97: xe,
1204
+ 98: Ie,
1205
+ 99: ye,
1206
+ 100: Re,
1207
+ 101: Oe,
1208
+ 102: Le,
1209
+ 103: be
1210
+ },
1211
+ {
1212
+ 57: 106,
1213
+ 59: [1, 107],
1214
+ 67: [1, 108],
1215
+ 68: [1, 109]
1216
+ },
1217
+ {
1218
+ 23: 110,
1219
+ 73: Y
1220
+ },
1221
+ {
1222
+ 23: 111,
1223
+ 73: Y
1224
+ },
1225
+ {
1226
+ 23: 112,
1227
+ 73: Y
1228
+ },
1229
+ {
1230
+ 23: 113,
1231
+ 73: Y
1232
+ },
1233
+ e([
1234
+ 5,
1235
+ 66,
1236
+ 72,
1237
+ 78,
1238
+ 79,
1239
+ 80,
1240
+ 81,
1241
+ 82,
1242
+ 83,
1243
+ 84,
1244
+ 85,
1245
+ 86,
1246
+ 87,
1247
+ 88,
1248
+ 89,
1249
+ 90,
1250
+ 91,
1251
+ 92,
1252
+ 93,
1253
+ 94,
1254
+ 95,
1255
+ 96,
1256
+ 97,
1257
+ 98,
1258
+ 99,
1259
+ 100,
1260
+ 101,
1261
+ 102,
1262
+ 103,
1263
+ 104
1264
+ ], me),
1265
+ e(D, [2, 6]),
1266
+ e(D, [2, 16]),
1267
+ e(St, [2, 10], { 11: 114 }),
1268
+ e(D, [2, 18]),
1269
+ {
1270
+ 5: [1, 116],
1271
+ 20: [1, 115]
1272
+ },
1273
+ { 5: [1, 117] },
1274
+ e(D, [2, 22]),
1275
+ { 5: [1, 118] },
1276
+ { 5: [1, 119] },
1277
+ e(D, [2, 25]),
1278
+ e(D, [2, 26]),
1279
+ e(D, [2, 27]),
1280
+ e(D, [2, 28]),
1281
+ e(D, [2, 29]),
1282
+ e(D, [2, 32]),
1283
+ e(D, [2, 33]),
1284
+ e(Dt, i, { 7: 120 }),
1285
+ e(Dt, i, { 7: 121 }),
1286
+ e(Dt, i, { 7: 122 }),
1287
+ e(Ae, i, {
1288
+ 41: 123,
1289
+ 7: 124
1290
+ }),
1291
+ e(Ut, i, {
1292
+ 43: 125,
1293
+ 7: 126
1294
+ }),
1295
+ e(Ut, i, {
1296
+ 7: 126,
1297
+ 43: 127
1298
+ }),
1299
+ e(Se, i, {
1300
+ 46: 128,
1301
+ 7: 129
1302
+ }),
1303
+ e(Dt, i, { 7: 130 }),
1304
+ {
1305
+ 5: [1, 132],
1306
+ 52: [1, 131]
1307
+ },
1308
+ {
1309
+ 5: [1, 134],
1310
+ 52: [1, 133]
1311
+ },
1312
+ e(Gt, me, {
1313
+ 74: 135,
1314
+ 75: [1, 136]
1315
+ }),
1316
+ {
1317
+ 5: [1, 138],
1318
+ 52: [1, 137]
1319
+ },
1320
+ {
1321
+ 5: [1, 140],
1322
+ 52: [1, 139]
1323
+ },
1324
+ { 5: [1, 141] },
1325
+ {
1326
+ 23: 145,
1327
+ 70: [1, 142],
1328
+ 71: [1, 143],
1329
+ 72: [1, 144],
1330
+ 73: Y
1331
+ },
1332
+ {
1333
+ 69: 146,
1334
+ 78: kt,
1335
+ 79: m,
1336
+ 80: w,
1337
+ 81: ht,
1338
+ 82: at,
1339
+ 83: F,
1340
+ 84: Ot,
1341
+ 85: oe,
1342
+ 86: ce,
1343
+ 87: le,
1344
+ 88: he,
1345
+ 89: de,
1346
+ 90: Te,
1347
+ 91: pe,
1348
+ 92: Ee,
1349
+ 93: ue,
1350
+ 94: fe,
1351
+ 95: _e,
1352
+ 96: ge,
1353
+ 97: xe,
1354
+ 98: Ie,
1355
+ 99: ye,
1356
+ 100: Re,
1357
+ 101: Oe,
1358
+ 102: Le,
1359
+ 103: be
1360
+ },
1361
+ e(q, [2, 79]),
1362
+ e(q, [2, 80]),
1363
+ e(q, [2, 81]),
1364
+ e(q, [2, 82]),
1365
+ e(q, [2, 83]),
1366
+ e(q, [2, 84]),
1367
+ e(q, [2, 85]),
1368
+ e(q, [2, 86]),
1369
+ e(q, [2, 87]),
1370
+ e(q, [2, 88]),
1371
+ e(q, [2, 89]),
1372
+ e(q, [2, 90]),
1373
+ e(q, [2, 91]),
1374
+ e(q, [2, 92]),
1375
+ e(q, [2, 93]),
1376
+ e(q, [2, 94]),
1377
+ e(q, [2, 95]),
1378
+ e(q, [2, 96]),
1379
+ e(q, [2, 97]),
1380
+ e(q, [2, 98]),
1381
+ e(q, [2, 99]),
1382
+ e(q, [2, 100]),
1383
+ e(q, [2, 101]),
1384
+ e(q, [2, 102]),
1385
+ e(q, [2, 103]),
1386
+ e(q, [2, 104]),
1387
+ {
1388
+ 23: 147,
1389
+ 73: Y
1390
+ },
1391
+ {
1392
+ 23: 149,
1393
+ 60: 148,
1394
+ 73: Y
1395
+ },
1396
+ { 73: [2, 68] },
1397
+ { 73: [2, 69] },
1398
+ {
1399
+ 58: 150,
1400
+ 104: ot
1401
+ },
1402
+ {
1403
+ 58: 152,
1404
+ 104: ot
1405
+ },
1406
+ {
1407
+ 58: 153,
1408
+ 104: ot
1409
+ },
1410
+ {
1411
+ 58: 154,
1412
+ 104: ot
1413
+ },
1414
+ {
1415
+ 4: [1, 157],
1416
+ 5: [1, 159],
1417
+ 12: 156,
1418
+ 13: 158,
1419
+ 17: [1, 155],
1420
+ 51: U,
1421
+ 53: G,
1422
+ 54: J
1423
+ },
1424
+ { 5: [1, 160] },
1425
+ e(D, [2, 20]),
1426
+ e(D, [2, 21]),
1427
+ e(D, [2, 23]),
1428
+ e(D, [2, 24]),
1429
+ {
1430
+ 4: n,
1431
+ 5: s,
1432
+ 8: 8,
1433
+ 9: 10,
1434
+ 10: o,
1435
+ 13: 13,
1436
+ 14: u,
1437
+ 15: T,
1438
+ 17: [1, 161],
1439
+ 18: 16,
1440
+ 19: h,
1441
+ 22: x,
1442
+ 23: 41,
1443
+ 24: E,
1444
+ 25: 20,
1445
+ 26: 21,
1446
+ 27: 22,
1447
+ 28: 23,
1448
+ 29: 24,
1449
+ 30: L,
1450
+ 31: p,
1451
+ 32: _,
1452
+ 34: f,
1453
+ 36: I,
1454
+ 37: O,
1455
+ 38: b,
1456
+ 39: A,
1457
+ 40: P,
1458
+ 42: k,
1459
+ 44: C,
1460
+ 45: W,
1461
+ 47: K,
1462
+ 51: U,
1463
+ 53: G,
1464
+ 54: J,
1465
+ 56: nt,
1466
+ 61: et,
1467
+ 62: z,
1468
+ 63: it,
1469
+ 64: rt,
1470
+ 73: Y
1471
+ },
1472
+ {
1473
+ 4: n,
1474
+ 5: s,
1475
+ 8: 8,
1476
+ 9: 10,
1477
+ 10: o,
1478
+ 13: 13,
1479
+ 14: u,
1480
+ 15: T,
1481
+ 17: [1, 162],
1482
+ 18: 16,
1483
+ 19: h,
1484
+ 22: x,
1485
+ 23: 41,
1486
+ 24: E,
1487
+ 25: 20,
1488
+ 26: 21,
1489
+ 27: 22,
1490
+ 28: 23,
1491
+ 29: 24,
1492
+ 30: L,
1493
+ 31: p,
1494
+ 32: _,
1495
+ 34: f,
1496
+ 36: I,
1497
+ 37: O,
1498
+ 38: b,
1499
+ 39: A,
1500
+ 40: P,
1501
+ 42: k,
1502
+ 44: C,
1503
+ 45: W,
1504
+ 47: K,
1505
+ 51: U,
1506
+ 53: G,
1507
+ 54: J,
1508
+ 56: nt,
1509
+ 61: et,
1510
+ 62: z,
1511
+ 63: it,
1512
+ 64: rt,
1513
+ 73: Y
1514
+ },
1515
+ {
1516
+ 4: n,
1517
+ 5: s,
1518
+ 8: 8,
1519
+ 9: 10,
1520
+ 10: o,
1521
+ 13: 13,
1522
+ 14: u,
1523
+ 15: T,
1524
+ 17: [1, 163],
1525
+ 18: 16,
1526
+ 19: h,
1527
+ 22: x,
1528
+ 23: 41,
1529
+ 24: E,
1530
+ 25: 20,
1531
+ 26: 21,
1532
+ 27: 22,
1533
+ 28: 23,
1534
+ 29: 24,
1535
+ 30: L,
1536
+ 31: p,
1537
+ 32: _,
1538
+ 34: f,
1539
+ 36: I,
1540
+ 37: O,
1541
+ 38: b,
1542
+ 39: A,
1543
+ 40: P,
1544
+ 42: k,
1545
+ 44: C,
1546
+ 45: W,
1547
+ 47: K,
1548
+ 51: U,
1549
+ 53: G,
1550
+ 54: J,
1551
+ 56: nt,
1552
+ 61: et,
1553
+ 62: z,
1554
+ 63: it,
1555
+ 64: rt,
1556
+ 73: Y
1557
+ },
1558
+ { 17: [1, 164] },
1559
+ {
1560
+ 4: n,
1561
+ 5: s,
1562
+ 8: 8,
1563
+ 9: 10,
1564
+ 10: o,
1565
+ 13: 13,
1566
+ 14: u,
1567
+ 15: T,
1568
+ 17: [2, 47],
1569
+ 18: 16,
1570
+ 19: h,
1571
+ 22: x,
1572
+ 23: 41,
1573
+ 24: E,
1574
+ 25: 20,
1575
+ 26: 21,
1576
+ 27: 22,
1577
+ 28: 23,
1578
+ 29: 24,
1579
+ 30: L,
1580
+ 31: p,
1581
+ 32: _,
1582
+ 34: f,
1583
+ 36: I,
1584
+ 37: O,
1585
+ 38: b,
1586
+ 39: A,
1587
+ 40: P,
1588
+ 42: k,
1589
+ 44: C,
1590
+ 45: W,
1591
+ 47: K,
1592
+ 50: [1, 165],
1593
+ 51: U,
1594
+ 53: G,
1595
+ 54: J,
1596
+ 56: nt,
1597
+ 61: et,
1598
+ 62: z,
1599
+ 63: it,
1600
+ 64: rt,
1601
+ 73: Y
1602
+ },
1603
+ { 17: [1, 166] },
1604
+ {
1605
+ 4: n,
1606
+ 5: s,
1607
+ 8: 8,
1608
+ 9: 10,
1609
+ 10: o,
1610
+ 13: 13,
1611
+ 14: u,
1612
+ 15: T,
1613
+ 17: [2, 45],
1614
+ 18: 16,
1615
+ 19: h,
1616
+ 22: x,
1617
+ 23: 41,
1618
+ 24: E,
1619
+ 25: 20,
1620
+ 26: 21,
1621
+ 27: 22,
1622
+ 28: 23,
1623
+ 29: 24,
1624
+ 30: L,
1625
+ 31: p,
1626
+ 32: _,
1627
+ 34: f,
1628
+ 36: I,
1629
+ 37: O,
1630
+ 38: b,
1631
+ 39: A,
1632
+ 40: P,
1633
+ 42: k,
1634
+ 44: C,
1635
+ 45: W,
1636
+ 47: K,
1637
+ 49: [1, 167],
1638
+ 51: U,
1639
+ 53: G,
1640
+ 54: J,
1641
+ 56: nt,
1642
+ 61: et,
1643
+ 62: z,
1644
+ 63: it,
1645
+ 64: rt,
1646
+ 73: Y
1647
+ },
1648
+ { 17: [1, 168] },
1649
+ { 17: [1, 169] },
1650
+ {
1651
+ 4: n,
1652
+ 5: s,
1653
+ 8: 8,
1654
+ 9: 10,
1655
+ 10: o,
1656
+ 13: 13,
1657
+ 14: u,
1658
+ 15: T,
1659
+ 17: [2, 43],
1660
+ 18: 16,
1661
+ 19: h,
1662
+ 22: x,
1663
+ 23: 41,
1664
+ 24: E,
1665
+ 25: 20,
1666
+ 26: 21,
1667
+ 27: 22,
1668
+ 28: 23,
1669
+ 29: 24,
1670
+ 30: L,
1671
+ 31: p,
1672
+ 32: _,
1673
+ 34: f,
1674
+ 36: I,
1675
+ 37: O,
1676
+ 38: b,
1677
+ 39: A,
1678
+ 40: P,
1679
+ 42: k,
1680
+ 44: C,
1681
+ 45: W,
1682
+ 47: K,
1683
+ 48: [1, 170],
1684
+ 51: U,
1685
+ 53: G,
1686
+ 54: J,
1687
+ 56: nt,
1688
+ 61: et,
1689
+ 62: z,
1690
+ 63: it,
1691
+ 64: rt,
1692
+ 73: Y
1693
+ },
1694
+ {
1695
+ 4: n,
1696
+ 5: s,
1697
+ 8: 8,
1698
+ 9: 10,
1699
+ 10: o,
1700
+ 13: 13,
1701
+ 14: u,
1702
+ 15: T,
1703
+ 17: [1, 171],
1704
+ 18: 16,
1705
+ 19: h,
1706
+ 22: x,
1707
+ 23: 41,
1708
+ 24: E,
1709
+ 25: 20,
1710
+ 26: 21,
1711
+ 27: 22,
1712
+ 28: 23,
1713
+ 29: 24,
1714
+ 30: L,
1715
+ 31: p,
1716
+ 32: _,
1717
+ 34: f,
1718
+ 36: I,
1719
+ 37: O,
1720
+ 38: b,
1721
+ 39: A,
1722
+ 40: P,
1723
+ 42: k,
1724
+ 44: C,
1725
+ 45: W,
1726
+ 47: K,
1727
+ 51: U,
1728
+ 53: G,
1729
+ 54: J,
1730
+ 56: nt,
1731
+ 61: et,
1732
+ 62: z,
1733
+ 63: it,
1734
+ 64: rt,
1735
+ 73: Y
1736
+ },
1737
+ { 16: [1, 172] },
1738
+ e(D, [2, 50]),
1739
+ { 16: [1, 173] },
1740
+ e(D, [2, 55]),
1741
+ e(Gt, [2, 76]),
1742
+ { 76: [1, 174] },
1743
+ { 16: [1, 175] },
1744
+ e(D, [2, 52]),
1745
+ { 16: [1, 176] },
1746
+ e(D, [2, 57]),
1747
+ e(D, [2, 53]),
1748
+ {
1749
+ 23: 177,
1750
+ 73: Y
1751
+ },
1752
+ {
1753
+ 23: 178,
1754
+ 73: Y
1755
+ },
1756
+ {
1757
+ 23: 179,
1758
+ 73: Y
1759
+ },
1760
+ {
1761
+ 58: 180,
1762
+ 104: ot
1763
+ },
1764
+ {
1765
+ 23: 181,
1766
+ 72: [1, 182],
1767
+ 73: Y
1768
+ },
1769
+ {
1770
+ 58: 183,
1771
+ 104: ot
1772
+ },
1773
+ {
1774
+ 58: 184,
1775
+ 104: ot
1776
+ },
1777
+ {
1778
+ 66: [1, 185],
1779
+ 104: [2, 67]
1780
+ },
1781
+ { 5: [2, 60] },
1782
+ { 5: [2, 105] },
1783
+ { 5: [2, 61] },
1784
+ { 5: [2, 62] },
1785
+ { 5: [2, 63] },
1786
+ e(D, [2, 17]),
1787
+ e(St, [2, 11]),
1788
+ {
1789
+ 13: 186,
1790
+ 51: U,
1791
+ 53: G,
1792
+ 54: J
1793
+ },
1794
+ e(St, [2, 13]),
1795
+ e(St, [2, 14]),
1796
+ e(D, [2, 19]),
1797
+ e(D, [2, 35]),
1798
+ e(D, [2, 36]),
1799
+ e(D, [2, 37]),
1800
+ e(D, [2, 38]),
1801
+ { 16: [1, 187] },
1802
+ e(D, [2, 39]),
1803
+ { 16: [1, 188] },
1804
+ e(D, [2, 40]),
1805
+ e(D, [2, 41]),
1806
+ { 16: [1, 189] },
1807
+ e(D, [2, 42]),
1808
+ { 5: [1, 190] },
1809
+ { 5: [1, 191] },
1810
+ { 77: [1, 192] },
1811
+ { 5: [1, 193] },
1812
+ { 5: [1, 194] },
1813
+ {
1814
+ 58: 195,
1815
+ 104: ot
1816
+ },
1817
+ {
1818
+ 58: 196,
1819
+ 104: ot
1820
+ },
1821
+ {
1822
+ 58: 197,
1823
+ 104: ot
1824
+ },
1825
+ { 5: [2, 75] },
1826
+ {
1827
+ 58: 198,
1828
+ 104: ot
1829
+ },
1830
+ {
1831
+ 23: 199,
1832
+ 73: Y
1833
+ },
1834
+ { 5: [2, 58] },
1835
+ { 5: [2, 59] },
1836
+ {
1837
+ 23: 200,
1838
+ 73: Y
1839
+ },
1840
+ e(St, [2, 12]),
1841
+ e(Ae, i, {
1842
+ 7: 124,
1843
+ 41: 201
1844
+ }),
1845
+ e(Ut, i, {
1846
+ 7: 126,
1847
+ 43: 202
1848
+ }),
1849
+ e(Se, i, {
1850
+ 7: 129,
1851
+ 46: 203
1852
+ }),
1853
+ e(D, [2, 49]),
1854
+ e(D, [2, 54]),
1855
+ e(Gt, [2, 77]),
1856
+ e(D, [2, 51]),
1857
+ e(D, [2, 56]),
1858
+ { 5: [2, 70] },
1859
+ { 5: [2, 71] },
1860
+ { 5: [2, 72] },
1861
+ { 5: [2, 73] },
1862
+ {
1863
+ 58: 204,
1864
+ 104: ot
1865
+ },
1866
+ { 104: [2, 66] },
1867
+ { 17: [2, 48] },
1868
+ { 17: [2, 46] },
1869
+ { 17: [2, 44] },
1870
+ { 5: [2, 74] }
1871
+ ],
1872
+ defaultActions: {
1873
+ 5: [2, 1],
1874
+ 6: [2, 2],
1875
+ 108: [2, 68],
1876
+ 109: [2, 69],
1877
+ 150: [2, 60],
1878
+ 151: [2, 105],
1879
+ 152: [2, 61],
1880
+ 153: [2, 62],
1881
+ 154: [2, 63],
1882
+ 180: [2, 75],
1883
+ 183: [2, 58],
1884
+ 184: [2, 59],
1885
+ 195: [2, 70],
1886
+ 196: [2, 71],
1887
+ 197: [2, 72],
1888
+ 198: [2, 73],
1889
+ 200: [2, 66],
1890
+ 201: [2, 48],
1891
+ 202: [2, 46],
1892
+ 203: [2, 44],
1893
+ 204: [2, 74]
1894
+ },
1895
+ parseError: /* @__PURE__ */ g(function(v, M) {
1896
+ if (M.recoverable) this.trace(v);
1897
+ else {
1898
+ var B = new Error(v);
1899
+ throw B.hash = M, B;
1900
+ }
1901
+ }, "parseError"),
1902
+ parse: /* @__PURE__ */ g(function(v) {
1903
+ var M = this, B = [0], y = [], X = [null], c = [], Nt = this.table, d = "", vt = 0, Ne = 0, we = 0, Ze = 2, Pe = 1, $e = c.slice.call(arguments, 1), Q = Object.create(this.lexer), gt = { yy: {} };
1904
+ for (var Jt in this.yy) Object.prototype.hasOwnProperty.call(this.yy, Jt) && (gt.yy[Jt] = this.yy[Jt]);
1905
+ Q.setInput(v, gt.yy), gt.yy.lexer = Q, gt.yy.parser = this, typeof Q.yylloc > "u" && (Q.yylloc = {});
1906
+ var Qt = Q.yylloc;
1907
+ c.push(Qt);
1908
+ var je = Q.options && Q.options.ranges;
1909
+ typeof gt.yy.parseError == "function" ? this.parseError = gt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1910
+ function tr(lt) {
1911
+ B.length = B.length - 2 * lt, X.length = X.length - lt, c.length = c.length - lt;
1912
+ }
1913
+ g(tr, "popStack");
1914
+ function ke() {
1915
+ var lt = y.pop() || Q.lex() || Pe;
1916
+ return typeof lt != "number" && (lt instanceof Array && (y = lt, lt = y.pop()), lt = M.symbols_[lt] || lt), lt;
1917
+ }
1918
+ g(ke, "lex");
1919
+ for (var j, Zt, xt, ct, $t, Lt = {}, Mt, pt, De, Bt; ; ) {
1920
+ if (xt = B[B.length - 1], this.defaultActions[xt] ? ct = this.defaultActions[xt] : ((j === null || typeof j > "u") && (j = ke()), ct = Nt[xt] && Nt[xt][j]), typeof ct > "u" || !ct.length || !ct[0]) {
1921
+ var jt = "";
1922
+ Bt = [];
1923
+ for (Mt in Nt[xt]) this.terminals_[Mt] && Mt > Ze && Bt.push("'" + this.terminals_[Mt] + "'");
1924
+ Q.showPosition ? jt = "Parse error on line " + (vt + 1) + `:
1925
+ ` + Q.showPosition() + `
1926
+ Expecting ` + Bt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : jt = "Parse error on line " + (vt + 1) + ": Unexpected " + (j == Pe ? "end of input" : "'" + (this.terminals_[j] || j) + "'"), this.parseError(jt, {
1927
+ text: Q.match,
1928
+ token: this.terminals_[j] || j,
1929
+ line: Q.yylineno,
1930
+ loc: Qt,
1931
+ expected: Bt
1932
+ });
1933
+ }
1934
+ if (ct[0] instanceof Array && ct.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + xt + ", token: " + j);
1935
+ switch (ct[0]) {
1936
+ case 1:
1937
+ B.push(j), X.push(Q.yytext), c.push(Q.yylloc), B.push(ct[1]), j = null, Zt ? (j = Zt, Zt = null) : (Ne = Q.yyleng, d = Q.yytext, vt = Q.yylineno, Qt = Q.yylloc, we > 0 && we--);
1938
+ break;
1939
+ case 2:
1940
+ if (pt = this.productions_[ct[1]][1], Lt.$ = X[X.length - pt], Lt._$ = {
1941
+ first_line: c[c.length - (pt || 1)].first_line,
1942
+ last_line: c[c.length - 1].last_line,
1943
+ first_column: c[c.length - (pt || 1)].first_column,
1944
+ last_column: c[c.length - 1].last_column
1945
+ }, je && (Lt._$.range = [c[c.length - (pt || 1)].range[0], c[c.length - 1].range[1]]), $t = this.performAction.apply(Lt, [
1946
+ d,
1947
+ Ne,
1948
+ vt,
1949
+ gt.yy,
1950
+ ct[1],
1951
+ X,
1952
+ c
1953
+ ].concat($e)), typeof $t < "u") return $t;
1954
+ pt && (B = B.slice(0, -1 * pt * 2), X = X.slice(0, -1 * pt), c = c.slice(0, -1 * pt)), B.push(this.productions_[ct[1]][0]), X.push(Lt.$), c.push(Lt._$), De = Nt[B[B.length - 2]][B[B.length - 1]], B.push(De);
1955
+ break;
1956
+ case 3:
1957
+ return !0;
1958
+ }
1959
+ }
1960
+ return !0;
1961
+ }, "parse")
1962
+ };
1963
+ Xt.lexer = /* @__PURE__ */ (function() {
1964
+ return {
1965
+ EOF: 1,
1966
+ parseError: /* @__PURE__ */ g(function(v, M) {
1967
+ if (this.yy.parser) this.yy.parser.parseError(v, M);
1968
+ else throw new Error(v);
1969
+ }, "parseError"),
1970
+ setInput: /* @__PURE__ */ g(function(S, v) {
1971
+ return this.yy = v || this.yy || {}, this._input = S, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1972
+ first_line: 1,
1973
+ first_column: 0,
1974
+ last_line: 1,
1975
+ last_column: 0
1976
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1977
+ }, "setInput"),
1978
+ input: /* @__PURE__ */ g(function() {
1979
+ var S = this._input[0];
1980
+ return this.yytext += S, this.yyleng++, this.offset++, this.match += S, this.matched += S, S.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), S;
1981
+ }, "input"),
1982
+ unput: /* @__PURE__ */ g(function(S) {
1983
+ var v = S.length, M = S.split(/(?:\r\n?|\n)/g);
1984
+ this._input = S + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - v), this.offset -= v;
1985
+ var B = this.match.split(/(?:\r\n?|\n)/g);
1986
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), M.length - 1 && (this.yylineno -= M.length - 1);
1987
+ var y = this.yylloc.range;
1988
+ return this.yylloc = {
1989
+ first_line: this.yylloc.first_line,
1990
+ last_line: this.yylineno + 1,
1991
+ first_column: this.yylloc.first_column,
1992
+ last_column: M ? (M.length === B.length ? this.yylloc.first_column : 0) + B[B.length - M.length].length - M[0].length : this.yylloc.first_column - v
1993
+ }, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - v]), this.yyleng = this.yytext.length, this;
1994
+ }, "unput"),
1995
+ more: /* @__PURE__ */ g(function() {
1996
+ return this._more = !0, this;
1997
+ }, "more"),
1998
+ reject: /* @__PURE__ */ g(function() {
1999
+ if (this.options.backtrack_lexer) this._backtrack = !0;
2000
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
2001
+ ` + this.showPosition(), {
2002
+ text: "",
2003
+ token: null,
2004
+ line: this.yylineno
2005
+ });
2006
+ return this;
2007
+ }, "reject"),
2008
+ less: /* @__PURE__ */ g(function(S) {
2009
+ this.unput(this.match.slice(S));
2010
+ }, "less"),
2011
+ pastInput: /* @__PURE__ */ g(function() {
2012
+ var S = this.matched.substr(0, this.matched.length - this.match.length);
2013
+ return (S.length > 20 ? "..." : "") + S.substr(-20).replace(/\n/g, "");
2014
+ }, "pastInput"),
2015
+ upcomingInput: /* @__PURE__ */ g(function() {
2016
+ var S = this.match;
2017
+ return S.length < 20 && (S += this._input.substr(0, 20 - S.length)), (S.substr(0, 20) + (S.length > 20 ? "..." : "")).replace(/\n/g, "");
2018
+ }, "upcomingInput"),
2019
+ showPosition: /* @__PURE__ */ g(function() {
2020
+ var S = this.pastInput(), v = new Array(S.length + 1).join("-");
2021
+ return S + this.upcomingInput() + `
2022
+ ` + v + "^";
2023
+ }, "showPosition"),
2024
+ test_match: /* @__PURE__ */ g(function(S, v) {
2025
+ var M, B, y;
2026
+ if (this.options.backtrack_lexer && (y = {
2027
+ yylineno: this.yylineno,
2028
+ yylloc: {
2029
+ first_line: this.yylloc.first_line,
2030
+ last_line: this.last_line,
2031
+ first_column: this.yylloc.first_column,
2032
+ last_column: this.yylloc.last_column
2033
+ },
2034
+ yytext: this.yytext,
2035
+ match: this.match,
2036
+ matches: this.matches,
2037
+ matched: this.matched,
2038
+ yyleng: this.yyleng,
2039
+ offset: this.offset,
2040
+ _more: this._more,
2041
+ _input: this._input,
2042
+ yy: this.yy,
2043
+ conditionStack: this.conditionStack.slice(0),
2044
+ done: this.done
2045
+ }, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), B = S[0].match(/(?:\r\n?|\n).*/g), B && (this.yylineno += B.length), this.yylloc = {
2046
+ first_line: this.yylloc.last_line,
2047
+ last_line: this.yylineno + 1,
2048
+ first_column: this.yylloc.last_column,
2049
+ last_column: B ? B[B.length - 1].length - B[B.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + S[0].length
2050
+ }, this.yytext += S[0], this.match += S[0], this.matches = S, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(S[0].length), this.matched += S[0], M = this.performAction.call(this, this.yy, this, v, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), M) return M;
2051
+ if (this._backtrack) {
2052
+ for (var X in y) this[X] = y[X];
2053
+ return !1;
2054
+ }
2055
+ return !1;
2056
+ }, "test_match"),
2057
+ next: /* @__PURE__ */ g(function() {
2058
+ if (this.done) return this.EOF;
2059
+ this._input || (this.done = !0);
2060
+ var S, v, M, B;
2061
+ this._more || (this.yytext = "", this.match = "");
2062
+ for (var y = this._currentRules(), X = 0; X < y.length; X++)
2063
+ if (M = this._input.match(this.rules[y[X]]), M && (!v || M[0].length > v[0].length)) {
2064
+ if (v = M, B = X, this.options.backtrack_lexer) {
2065
+ if (S = this.test_match(M, y[X]), S !== !1) return S;
2066
+ if (this._backtrack) {
2067
+ v = !1;
2068
+ continue;
2069
+ } else return !1;
2070
+ } else if (!this.options.flex) break;
2071
+ }
2072
+ return v ? (S = this.test_match(v, y[B]), S !== !1 ? S : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
2073
+ ` + this.showPosition(), {
2074
+ text: "",
2075
+ token: null,
2076
+ line: this.yylineno
2077
+ });
2078
+ }, "next"),
2079
+ lex: /* @__PURE__ */ g(function() {
2080
+ var v = this.next();
2081
+ return v || this.lex();
2082
+ }, "lex"),
2083
+ begin: /* @__PURE__ */ g(function(v) {
2084
+ this.conditionStack.push(v);
2085
+ }, "begin"),
2086
+ popState: /* @__PURE__ */ g(function() {
2087
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2088
+ }, "popState"),
2089
+ _currentRules: /* @__PURE__ */ g(function() {
2090
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2091
+ }, "_currentRules"),
2092
+ topState: /* @__PURE__ */ g(function(v) {
2093
+ return v = this.conditionStack.length - 1 - Math.abs(v || 0), v >= 0 ? this.conditionStack[v] : "INITIAL";
2094
+ }, "topState"),
2095
+ pushState: /* @__PURE__ */ g(function(v) {
2096
+ this.begin(v);
2097
+ }, "pushState"),
2098
+ stateStackSize: /* @__PURE__ */ g(function() {
2099
+ return this.conditionStack.length;
2100
+ }, "stateStackSize"),
2101
+ options: { "case-insensitive": !0 },
2102
+ performAction: /* @__PURE__ */ g(function(v, M, B, y) {
2103
+ switch (B) {
2104
+ case 0:
2105
+ return 5;
2106
+ case 1:
2107
+ break;
2108
+ case 2:
2109
+ break;
2110
+ case 3:
2111
+ break;
2112
+ case 4:
2113
+ break;
2114
+ case 5:
2115
+ break;
2116
+ case 6:
2117
+ return 20;
2118
+ case 7:
2119
+ return this.begin("CONFIG"), 75;
2120
+ case 8:
2121
+ return 76;
2122
+ case 9:
2123
+ return this.popState(), this.begin("ALIAS"), 77;
2124
+ case 10:
2125
+ return this.popState(), this.popState(), 77;
2126
+ case 11:
2127
+ return M.yytext = M.yytext.trim(), 73;
2128
+ case 12:
2129
+ return M.yytext = M.yytext.trim(), this.begin("ALIAS"), 73;
2130
+ case 13:
2131
+ return M.yytext = M.yytext.trim(), this.popState(), 73;
2132
+ case 14:
2133
+ return this.popState(), 10;
2134
+ case 15:
2135
+ return M.yytext = M.yytext.trim(), this.popState(), 10;
2136
+ case 16:
2137
+ return this.begin("LINE"), 15;
2138
+ case 17:
2139
+ return this.begin("ID"), 51;
2140
+ case 18:
2141
+ return this.begin("ID"), 53;
2142
+ case 19:
2143
+ return 14;
2144
+ case 20:
2145
+ return this.begin("ID"), 54;
2146
+ case 21:
2147
+ return this.popState(), this.popState(), this.begin("LINE"), 52;
2148
+ case 22:
2149
+ return this.popState(), this.popState(), 5;
2150
+ case 23:
2151
+ return this.begin("LINE"), 37;
2152
+ case 24:
2153
+ return this.begin("LINE"), 38;
2154
+ case 25:
2155
+ return this.begin("LINE"), 39;
2156
+ case 26:
2157
+ return this.begin("LINE"), 40;
2158
+ case 27:
2159
+ return this.begin("LINE"), 50;
2160
+ case 28:
2161
+ return this.begin("LINE"), 42;
2162
+ case 29:
2163
+ return this.begin("LINE"), 44;
2164
+ case 30:
2165
+ return this.begin("LINE"), 49;
2166
+ case 31:
2167
+ return this.begin("LINE"), 45;
2168
+ case 32:
2169
+ return this.begin("LINE"), 48;
2170
+ case 33:
2171
+ return this.begin("LINE"), 47;
2172
+ case 34:
2173
+ return this.popState(), 16;
2174
+ case 35:
2175
+ return 17;
2176
+ case 36:
2177
+ return 67;
2178
+ case 37:
2179
+ return 68;
2180
+ case 38:
2181
+ return 61;
2182
+ case 39:
2183
+ return 62;
2184
+ case 40:
2185
+ return 63;
2186
+ case 41:
2187
+ return 64;
2188
+ case 42:
2189
+ return 59;
2190
+ case 43:
2191
+ return 56;
2192
+ case 44:
2193
+ return this.begin("ID"), 22;
2194
+ case 45:
2195
+ return this.begin("ID"), 24;
2196
+ case 46:
2197
+ return 30;
2198
+ case 47:
2199
+ return 31;
2200
+ case 48:
2201
+ return this.begin("acc_title"), 32;
2202
+ case 49:
2203
+ return this.popState(), "acc_title_value";
2204
+ case 50:
2205
+ return this.begin("acc_descr"), 34;
2206
+ case 51:
2207
+ return this.popState(), "acc_descr_value";
2208
+ case 52:
2209
+ this.begin("acc_descr_multiline");
2210
+ break;
2211
+ case 53:
2212
+ this.popState();
2213
+ break;
2214
+ case 54:
2215
+ return "acc_descr_multiline_value";
2216
+ case 55:
2217
+ return 6;
2218
+ case 56:
2219
+ return 19;
2220
+ case 57:
2221
+ return 21;
2222
+ case 58:
2223
+ return 66;
2224
+ case 59:
2225
+ return 5;
2226
+ case 60:
2227
+ return M.yytext = M.yytext.trim(), 73;
2228
+ case 61:
2229
+ return 80;
2230
+ case 62:
2231
+ return 97;
2232
+ case 63:
2233
+ return 98;
2234
+ case 64:
2235
+ return 99;
2236
+ case 65:
2237
+ return 78;
2238
+ case 66:
2239
+ return 79;
2240
+ case 67:
2241
+ return 100;
2242
+ case 68:
2243
+ return 101;
2244
+ case 69:
2245
+ return 102;
2246
+ case 70:
2247
+ return 103;
2248
+ case 71:
2249
+ return 85;
2250
+ case 72:
2251
+ return 86;
2252
+ case 73:
2253
+ return 87;
2254
+ case 74:
2255
+ return 88;
2256
+ case 75:
2257
+ return 93;
2258
+ case 76:
2259
+ return 94;
2260
+ case 77:
2261
+ return 95;
2262
+ case 78:
2263
+ return 96;
2264
+ case 79:
2265
+ return 81;
2266
+ case 80:
2267
+ return 82;
2268
+ case 81:
2269
+ return 83;
2270
+ case 82:
2271
+ return 84;
2272
+ case 83:
2273
+ return 89;
2274
+ case 84:
2275
+ return 90;
2276
+ case 85:
2277
+ return 91;
2278
+ case 86:
2279
+ return 92;
2280
+ case 87:
2281
+ return 104;
2282
+ case 88:
2283
+ return 104;
2284
+ case 89:
2285
+ return 70;
2286
+ case 90:
2287
+ return 71;
2288
+ case 91:
2289
+ return 72;
2290
+ case 92:
2291
+ return 5;
2292
+ case 93:
2293
+ return 10;
2294
+ }
2295
+ }, "anonymous"),
2296
+ rules: [
2297
+ /^(?:[\n]+)/i,
2298
+ /^(?:\s+)/i,
2299
+ /^(?:((?!\n)\s)+)/i,
2300
+ /^(?:#[^\n]*)/i,
2301
+ /^(?:%(?!\{)[^\n]*)/i,
2302
+ /^(?:[^\}]%%[^\n]*)/i,
2303
+ /^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,
2304
+ /^(?:@\{)/i,
2305
+ /^(?:[^\}]+)/i,
2306
+ /^(?:\}(?=\s+as\s))/i,
2307
+ /^(?:\})/i,
2308
+ /^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,
2309
+ /^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,
2310
+ /^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,
2311
+ /^(?:[^<>:\n,;@]*<[^\n]*)/i,
2312
+ /^(?:[^\n]+)/i,
2313
+ /^(?:box\b)/i,
2314
+ /^(?:participant\b)/i,
2315
+ /^(?:actor\b)/i,
2316
+ /^(?:create\b)/i,
2317
+ /^(?:destroy\b)/i,
2318
+ /^(?:as\b)/i,
2319
+ /^(?:(?:))/i,
2320
+ /^(?:loop\b)/i,
2321
+ /^(?:rect\b)/i,
2322
+ /^(?:opt\b)/i,
2323
+ /^(?:alt\b)/i,
2324
+ /^(?:else\b)/i,
2325
+ /^(?:par\b)/i,
2326
+ /^(?:par_over\b)/i,
2327
+ /^(?:and\b)/i,
2328
+ /^(?:critical\b)/i,
2329
+ /^(?:option\b)/i,
2330
+ /^(?:break\b)/i,
2331
+ /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,
2332
+ /^(?:end\b)/i,
2333
+ /^(?:left of\b)/i,
2334
+ /^(?:right of\b)/i,
2335
+ /^(?:links\b)/i,
2336
+ /^(?:link\b)/i,
2337
+ /^(?:properties\b)/i,
2338
+ /^(?:details\b)/i,
2339
+ /^(?:over\b)/i,
2340
+ /^(?:note\b)/i,
2341
+ /^(?:activate\b)/i,
2342
+ /^(?:deactivate\b)/i,
2343
+ /^(?:title\s[^#\n;]+)/i,
2344
+ /^(?:title:\s[^#\n;]+)/i,
2345
+ /^(?:accTitle\s*:\s*)/i,
2346
+ /^(?:(?!\n||)*[^\n]*)/i,
2347
+ /^(?:accDescr\s*:\s*)/i,
2348
+ /^(?:(?!\n||)*[^\n]*)/i,
2349
+ /^(?:accDescr\s*\{\s*)/i,
2350
+ /^(?:[\}])/i,
2351
+ /^(?:[^\}]*)/i,
2352
+ /^(?:sequenceDiagram\b)/i,
2353
+ /^(?:autonumber\b)/i,
2354
+ /^(?:off\b)/i,
2355
+ /^(?:,)/i,
2356
+ /^(?:;)/i,
2357
+ /^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,
2358
+ /^(?:->>)/i,
2359
+ /^(?:<<->>)/i,
2360
+ /^(?:-->>)/i,
2361
+ /^(?:<<-->>)/i,
2362
+ /^(?:->)/i,
2363
+ /^(?:-->)/i,
2364
+ /^(?:-[x])/i,
2365
+ /^(?:--[x])/i,
2366
+ /^(?:-[\)])/i,
2367
+ /^(?:--[\)])/i,
2368
+ /^(?:--\|\\)/i,
2369
+ /^(?:--\|\/)/i,
2370
+ /^(?:--\\\\)/i,
2371
+ /^(?:--\/\/)/i,
2372
+ /^(?:\/\|--)/i,
2373
+ /^(?:\\\|--)/i,
2374
+ /^(?:\/\/--)/i,
2375
+ /^(?:\\\\--)/i,
2376
+ /^(?:-\|\\)/i,
2377
+ /^(?:-\|\/)/i,
2378
+ /^(?:-\\\\)/i,
2379
+ /^(?:-\/\/)/i,
2380
+ /^(?:\/\|-)/i,
2381
+ /^(?:\\\|-)/i,
2382
+ /^(?:\/\/-)/i,
2383
+ /^(?:\\\\-)/i,
2384
+ /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,
2385
+ /^(?::)/i,
2386
+ /^(?:\+)/i,
2387
+ /^(?:-)/i,
2388
+ /^(?:\(\))/i,
2389
+ /^(?:$)/i,
2390
+ /^(?:.)/i
2391
+ ],
2392
+ conditions: {
2393
+ acc_descr_multiline: {
2394
+ rules: [53, 54],
2395
+ inclusive: !1
2396
+ },
2397
+ acc_descr: {
2398
+ rules: [51],
2399
+ inclusive: !1
2400
+ },
2401
+ acc_title: {
2402
+ rules: [49],
2403
+ inclusive: !1
2404
+ },
2405
+ ID: {
2406
+ rules: [
2407
+ 2,
2408
+ 3,
2409
+ 7,
2410
+ 11,
2411
+ 12,
2412
+ 13,
2413
+ 14,
2414
+ 15
2415
+ ],
2416
+ inclusive: !1
2417
+ },
2418
+ ALIAS: {
2419
+ rules: [
2420
+ 2,
2421
+ 3,
2422
+ 21,
2423
+ 22
2424
+ ],
2425
+ inclusive: !1
2426
+ },
2427
+ LINE: {
2428
+ rules: [
2429
+ 2,
2430
+ 3,
2431
+ 34
2432
+ ],
2433
+ inclusive: !1
2434
+ },
2435
+ CONFIG: {
2436
+ rules: [
2437
+ 8,
2438
+ 9,
2439
+ 10
2440
+ ],
2441
+ inclusive: !1
2442
+ },
2443
+ CONFIG_DATA: {
2444
+ rules: [],
2445
+ inclusive: !1
2446
+ },
2447
+ INITIAL: {
2448
+ rules: [
2449
+ 0,
2450
+ 1,
2451
+ 3,
2452
+ 4,
2453
+ 5,
2454
+ 6,
2455
+ 16,
2456
+ 17,
2457
+ 18,
2458
+ 19,
2459
+ 20,
2460
+ 23,
2461
+ 24,
2462
+ 25,
2463
+ 26,
2464
+ 27,
2465
+ 28,
2466
+ 29,
2467
+ 30,
2468
+ 31,
2469
+ 32,
2470
+ 33,
2471
+ 35,
2472
+ 36,
2473
+ 37,
2474
+ 38,
2475
+ 39,
2476
+ 40,
2477
+ 41,
2478
+ 42,
2479
+ 43,
2480
+ 44,
2481
+ 45,
2482
+ 46,
2483
+ 47,
2484
+ 48,
2485
+ 50,
2486
+ 52,
2487
+ 55,
2488
+ 56,
2489
+ 57,
2490
+ 58,
2491
+ 59,
2492
+ 60,
2493
+ 61,
2494
+ 62,
2495
+ 63,
2496
+ 64,
2497
+ 65,
2498
+ 66,
2499
+ 67,
2500
+ 68,
2501
+ 69,
2502
+ 70,
2503
+ 71,
2504
+ 72,
2505
+ 73,
2506
+ 74,
2507
+ 75,
2508
+ 76,
2509
+ 77,
2510
+ 78,
2511
+ 79,
2512
+ 80,
2513
+ 81,
2514
+ 82,
2515
+ 83,
2516
+ 84,
2517
+ 85,
2518
+ 86,
2519
+ 87,
2520
+ 88,
2521
+ 89,
2522
+ 90,
2523
+ 91,
2524
+ 92,
2525
+ 93
2526
+ ],
2527
+ inclusive: !0
2528
+ }
2529
+ }
2530
+ };
2531
+ })();
2532
+ function Ct() {
2533
+ this.yy = {};
2534
+ }
2535
+ return g(Ct, "Parser"), Ct.prototype = Xt, Xt.Parser = Ct, new Ct();
2536
+ })();
2537
+ ee.parser = ee;
2538
+ var _r = ee, gr = {
2539
+ SOLID: 0,
2540
+ DOTTED: 1,
2541
+ NOTE: 2,
2542
+ SOLID_CROSS: 3,
2543
+ DOTTED_CROSS: 4,
2544
+ SOLID_OPEN: 5,
2545
+ DOTTED_OPEN: 6,
2546
+ LOOP_START: 10,
2547
+ LOOP_END: 11,
2548
+ ALT_START: 12,
2549
+ ALT_ELSE: 13,
2550
+ ALT_END: 14,
2551
+ OPT_START: 15,
2552
+ OPT_END: 16,
2553
+ ACTIVE_START: 17,
2554
+ ACTIVE_END: 18,
2555
+ PAR_START: 19,
2556
+ PAR_AND: 20,
2557
+ PAR_END: 21,
2558
+ RECT_START: 22,
2559
+ RECT_END: 23,
2560
+ SOLID_POINT: 24,
2561
+ DOTTED_POINT: 25,
2562
+ AUTONUMBER: 26,
2563
+ CRITICAL_START: 27,
2564
+ CRITICAL_OPTION: 28,
2565
+ CRITICAL_END: 29,
2566
+ BREAK_START: 30,
2567
+ BREAK_END: 31,
2568
+ PAR_OVER_START: 32,
2569
+ BIDIRECTIONAL_SOLID: 33,
2570
+ BIDIRECTIONAL_DOTTED: 34,
2571
+ SOLID_TOP: 41,
2572
+ SOLID_BOTTOM: 42,
2573
+ STICK_TOP: 43,
2574
+ STICK_BOTTOM: 44,
2575
+ SOLID_ARROW_TOP_REVERSE: 45,
2576
+ SOLID_ARROW_BOTTOM_REVERSE: 46,
2577
+ STICK_ARROW_TOP_REVERSE: 47,
2578
+ STICK_ARROW_BOTTOM_REVERSE: 48,
2579
+ SOLID_TOP_DOTTED: 51,
2580
+ SOLID_BOTTOM_DOTTED: 52,
2581
+ STICK_TOP_DOTTED: 53,
2582
+ STICK_BOTTOM_DOTTED: 54,
2583
+ SOLID_ARROW_TOP_REVERSE_DOTTED: 55,
2584
+ SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 56,
2585
+ STICK_ARROW_TOP_REVERSE_DOTTED: 57,
2586
+ STICK_ARROW_BOTTOM_REVERSE_DOTTED: 58,
2587
+ CENTRAL_CONNECTION: 59,
2588
+ CENTRAL_CONNECTION_REVERSE: 60,
2589
+ CENTRAL_CONNECTION_DUAL: 61
2590
+ }, xr = {
2591
+ FILLED: 0,
2592
+ OPEN: 1
2593
+ }, Ir = {
2594
+ LEFTOF: 0,
2595
+ RIGHTOF: 1,
2596
+ OVER: 2
2597
+ }, Wt = {
2598
+ ACTOR: "actor",
2599
+ BOUNDARY: "boundary",
2600
+ COLLECTIONS: "collections",
2601
+ CONTROL: "control",
2602
+ DATABASE: "database",
2603
+ ENTITY: "entity",
2604
+ PARTICIPANT: "participant",
2605
+ QUEUE: "queue"
2606
+ }, yr = class {
2607
+ constructor() {
2608
+ this.state = new Er(() => ({
2609
+ prevActor: void 0,
2610
+ actors: /* @__PURE__ */ new Map(),
2611
+ createdActors: /* @__PURE__ */ new Map(),
2612
+ destroyedActors: /* @__PURE__ */ new Map(),
2613
+ boxes: [],
2614
+ messages: [],
2615
+ notes: [],
2616
+ sequenceNumbersEnabled: !1,
2617
+ wrapEnabled: void 0,
2618
+ currentBox: void 0,
2619
+ lastCreated: void 0,
2620
+ lastDestroyed: void 0
2621
+ })), this.setAccTitle = Ce, this.setAccDescription = rr, this.setDiagramTitle = ar, this.getAccTitle = hr, this.getAccDescription = cr, this.getDiagramTitle = lr, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(tt().wrap), this.LINETYPE = gr, this.ARROWTYPE = xr, this.PLACEMENT = Ir;
2622
+ }
2623
+ static {
2624
+ g(this, "SequenceDB");
2625
+ }
2626
+ addBox(e) {
2627
+ this.state.records.boxes.push({
2628
+ name: e.text,
2629
+ wrap: e.wrap ?? this.autoWrap(),
2630
+ fill: e.color,
2631
+ actorKeys: []
2632
+ }), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
2633
+ }
2634
+ addActor(e, t, a, r, i) {
2635
+ let n = this.state.records.currentBox, s;
2636
+ if (i !== void 0) {
2637
+ let u;
2638
+ i.includes(`
2639
+ `) ? u = i + `
2640
+ ` : u = `{
2641
+ ` + i + `
2642
+ }`, s = ur(u, { schema: fr });
2643
+ }
2644
+ r = s?.type ?? r, s?.alias && (!a || a.text === t) && (a = {
2645
+ text: s.alias,
2646
+ wrap: a?.wrap,
2647
+ type: r
2648
+ });
2649
+ const o = this.state.records.actors.get(e);
2650
+ if (o) {
2651
+ if (this.state.records.currentBox && o.box && this.state.records.currentBox !== o.box) throw new Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);
2652
+ if (n = o.box ? o.box : this.state.records.currentBox, o.box = n, o && t === o.name && a == null) return;
2653
+ }
2654
+ if (a?.text == null && (a = {
2655
+ text: t,
2656
+ type: r
2657
+ }), (r == null || a.text == null) && (a = {
2658
+ text: t,
2659
+ type: r
2660
+ }), this.state.records.actors.set(e, {
2661
+ box: n,
2662
+ name: t,
2663
+ description: a.text,
2664
+ wrap: a.wrap ?? this.autoWrap(),
2665
+ prevActor: this.state.records.prevActor,
2666
+ links: {},
2667
+ properties: {},
2668
+ actorCnt: null,
2669
+ rectData: null,
2670
+ type: r ?? "participant"
2671
+ }), this.state.records.prevActor) {
2672
+ const u = this.state.records.actors.get(this.state.records.prevActor);
2673
+ u && (u.nextActor = e);
2674
+ }
2675
+ this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(e), this.state.records.prevActor = e;
2676
+ }
2677
+ activationCount(e) {
2678
+ let t, a = 0;
2679
+ if (!e) return 0;
2680
+ for (t = 0; t < this.state.records.messages.length; t++)
2681
+ this.state.records.messages[t].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[t].from === e && a++, this.state.records.messages[t].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[t].from === e && a--;
2682
+ return a;
2683
+ }
2684
+ addMessage(e, t, a, r) {
2685
+ this.state.records.messages.push({
2686
+ id: this.state.records.messages.length.toString(),
2687
+ from: e,
2688
+ to: t,
2689
+ message: a.text,
2690
+ wrap: a.wrap ?? this.autoWrap(),
2691
+ answer: r
2692
+ });
2693
+ }
2694
+ addSignal(e, t, a, r, i = !1, n) {
2695
+ if (r === this.LINETYPE.ACTIVE_END && this.activationCount(e ?? "") < 1) {
2696
+ const s = /* @__PURE__ */ new Error("Trying to inactivate an inactive participant (" + e + ")");
2697
+ throw s.hash = {
2698
+ text: "->>-",
2699
+ token: "->>-",
2700
+ line: "1",
2701
+ loc: {
2702
+ first_line: 1,
2703
+ last_line: 1,
2704
+ first_column: 1,
2705
+ last_column: 1
2706
+ },
2707
+ expected: ["'ACTIVE_PARTICIPANT'"]
2708
+ }, s;
2709
+ }
2710
+ return this.state.records.messages.push({
2711
+ id: this.state.records.messages.length.toString(),
2712
+ from: e,
2713
+ to: t,
2714
+ message: a?.text ?? "",
2715
+ wrap: a?.wrap ?? this.autoWrap(),
2716
+ type: r,
2717
+ activate: i,
2718
+ centralConnection: n ?? 0
2719
+ }), !0;
2720
+ }
2721
+ hasAtLeastOneBox() {
2722
+ return this.state.records.boxes.length > 0;
2723
+ }
2724
+ hasAtLeastOneBoxWithTitle() {
2725
+ return this.state.records.boxes.some((e) => e.name);
2726
+ }
2727
+ getMessages() {
2728
+ return this.state.records.messages;
2729
+ }
2730
+ getBoxes() {
2731
+ return this.state.records.boxes;
2732
+ }
2733
+ getActors() {
2734
+ return this.state.records.actors;
2735
+ }
2736
+ getCreatedActors() {
2737
+ return this.state.records.createdActors;
2738
+ }
2739
+ getDestroyedActors() {
2740
+ return this.state.records.destroyedActors;
2741
+ }
2742
+ getActor(e) {
2743
+ return this.state.records.actors.get(e);
2744
+ }
2745
+ getActorKeys() {
2746
+ return [...this.state.records.actors.keys()];
2747
+ }
2748
+ enableSequenceNumbers() {
2749
+ this.state.records.sequenceNumbersEnabled = !0;
2750
+ }
2751
+ disableSequenceNumbers() {
2752
+ this.state.records.sequenceNumbersEnabled = !1;
2753
+ }
2754
+ showSequenceNumbers() {
2755
+ return this.state.records.sequenceNumbersEnabled;
2756
+ }
2757
+ setWrap(e) {
2758
+ this.state.records.wrapEnabled = e;
2759
+ }
2760
+ extractWrap(e) {
2761
+ if (e === void 0) return {};
2762
+ e = e.trim();
2763
+ const t = /^:?wrap:/.exec(e) !== null ? !0 : /^:?nowrap:/.exec(e) !== null ? !1 : void 0;
2764
+ return {
2765
+ cleanedText: (t === void 0 ? e : e.replace(/^:?(?:no)?wrap:/, "")).trim(),
2766
+ wrap: t
2767
+ };
2768
+ }
2769
+ autoWrap() {
2770
+ return this.state.records.wrapEnabled !== void 0 ? this.state.records.wrapEnabled : tt().sequence?.wrap ?? !1;
2771
+ }
2772
+ clear() {
2773
+ this.state.reset(), ir();
2774
+ }
2775
+ parseMessage(e) {
2776
+ const t = e.trim(), { wrap: a, cleanedText: r } = this.extractWrap(t), i = {
2777
+ text: r,
2778
+ wrap: a
2779
+ };
2780
+ return st.debug(`parseMessage: ${JSON.stringify(i)}`), i;
2781
+ }
2782
+ parseBoxData(e) {
2783
+ const t = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e);
2784
+ let a = t?.[1] ? t[1].trim() : "transparent", r = t?.[2] ? t[2].trim() : void 0;
2785
+ if (window?.CSS)
2786
+ window.CSS.supports("color", a) || (a = "transparent", r = e.trim());
2787
+ else {
2788
+ const s = new Option().style;
2789
+ s.color = a, s.color !== a && (a = "transparent", r = e.trim());
2790
+ }
2791
+ const { wrap: i, cleanedText: n } = this.extractWrap(r);
2792
+ return {
2793
+ text: n ? Yt(n, tt()) : void 0,
2794
+ color: a,
2795
+ wrap: i
2796
+ };
2797
+ }
2798
+ addNote(e, t, a) {
2799
+ const r = {
2800
+ actor: e,
2801
+ placement: t,
2802
+ message: a.text,
2803
+ wrap: a.wrap ?? this.autoWrap()
2804
+ }, i = [].concat(e, e);
2805
+ this.state.records.notes.push(r), this.state.records.messages.push({
2806
+ id: this.state.records.messages.length.toString(),
2807
+ from: i[0],
2808
+ to: i[1],
2809
+ message: a.text,
2810
+ wrap: a.wrap ?? this.autoWrap(),
2811
+ type: this.LINETYPE.NOTE,
2812
+ placement: t
2813
+ });
2814
+ }
2815
+ addLinks(e, t) {
2816
+ const a = this.getActor(e);
2817
+ try {
2818
+ let r = Yt(t.text, tt());
2819
+ r = r.replace(/&equals;/g, "="), r = r.replace(/&amp;/g, "&");
2820
+ const i = JSON.parse(r);
2821
+ this.insertLinks(a, i);
2822
+ } catch (r) {
2823
+ st.error("error while parsing actor link text", r);
2824
+ }
2825
+ }
2826
+ addALink(e, t) {
2827
+ const a = this.getActor(e);
2828
+ try {
2829
+ const r = {};
2830
+ let i = Yt(t.text, tt());
2831
+ const n = i.indexOf("@");
2832
+ i = i.replace(/&equals;/g, "="), i = i.replace(/&amp;/g, "&");
2833
+ const s = i.slice(0, n - 1).trim();
2834
+ r[s] = i.slice(n + 1).trim(), this.insertLinks(a, r);
2835
+ } catch (r) {
2836
+ st.error("error while parsing actor link text", r);
2837
+ }
2838
+ }
2839
+ insertLinks(e, t) {
2840
+ if (e.links == null) e.links = t;
2841
+ else for (const a in t) e.links[a] = t[a];
2842
+ }
2843
+ addProperties(e, t) {
2844
+ const a = this.getActor(e);
2845
+ try {
2846
+ const r = Yt(t.text, tt()), i = JSON.parse(r);
2847
+ this.insertProperties(a, i);
2848
+ } catch (r) {
2849
+ st.error("error while parsing actor properties text", r);
2850
+ }
2851
+ }
2852
+ insertProperties(e, t) {
2853
+ if (e.properties == null) e.properties = t;
2854
+ else for (const a in t) e.properties[a] = t[a];
2855
+ }
2856
+ boxEnd() {
2857
+ this.state.records.currentBox = void 0;
2858
+ }
2859
+ addDetails(e, t) {
2860
+ const a = this.getActor(e), r = document.getElementById(t.text);
2861
+ try {
2862
+ const i = r.innerHTML, n = JSON.parse(i);
2863
+ n.properties && this.insertProperties(a, n.properties), n.links && this.insertLinks(a, n.links);
2864
+ } catch (i) {
2865
+ st.error("error while parsing actor details text", i);
2866
+ }
2867
+ }
2868
+ getActorProperty(e, t) {
2869
+ if (e?.properties !== void 0) return e.properties[t];
2870
+ }
2871
+ apply(e) {
2872
+ if (Array.isArray(e)) e.forEach((t) => {
2873
+ this.apply(t);
2874
+ });
2875
+ else switch (e.type) {
2876
+ case "sequenceIndex":
2877
+ this.state.records.messages.push({
2878
+ id: this.state.records.messages.length.toString(),
2879
+ from: void 0,
2880
+ to: void 0,
2881
+ message: {
2882
+ start: e.sequenceIndex,
2883
+ step: e.sequenceIndexStep,
2884
+ visible: e.sequenceVisible
2885
+ },
2886
+ wrap: !1,
2887
+ type: e.signalType
2888
+ });
2889
+ break;
2890
+ case "addParticipant":
2891
+ this.addActor(e.actor, e.actor, e.description, e.draw, e.config);
2892
+ break;
2893
+ case "createParticipant":
2894
+ if (this.state.records.actors.has(e.actor)) throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");
2895
+ this.state.records.lastCreated = e.actor, this.addActor(e.actor, e.actor, e.description, e.draw, e.config), this.state.records.createdActors.set(e.actor, this.state.records.messages.length);
2896
+ break;
2897
+ case "destroyParticipant":
2898
+ this.state.records.lastDestroyed = e.actor, this.state.records.destroyedActors.set(e.actor, this.state.records.messages.length);
2899
+ break;
2900
+ case "activeStart":
2901
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2902
+ break;
2903
+ case "centralConnection":
2904
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2905
+ break;
2906
+ case "centralConnectionReverse":
2907
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2908
+ break;
2909
+ case "activeEnd":
2910
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2911
+ break;
2912
+ case "addNote":
2913
+ this.addNote(e.actor, e.placement, e.text);
2914
+ break;
2915
+ case "addLinks":
2916
+ this.addLinks(e.actor, e.text);
2917
+ break;
2918
+ case "addALink":
2919
+ this.addALink(e.actor, e.text);
2920
+ break;
2921
+ case "addProperties":
2922
+ this.addProperties(e.actor, e.text);
2923
+ break;
2924
+ case "addDetails":
2925
+ this.addDetails(e.actor, e.text);
2926
+ break;
2927
+ case "addMessage":
2928
+ if (this.state.records.lastCreated) {
2929
+ if (e.to !== this.state.records.lastCreated) throw new Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
2930
+ this.state.records.lastCreated = void 0;
2931
+ } else if (this.state.records.lastDestroyed) {
2932
+ if (e.to !== this.state.records.lastDestroyed && e.from !== this.state.records.lastDestroyed) throw new Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
2933
+ this.state.records.lastDestroyed = void 0;
2934
+ }
2935
+ this.addSignal(e.from, e.to, e.msg, e.signalType, e.activate, e.centralConnection);
2936
+ break;
2937
+ case "boxStart":
2938
+ this.addBox(e.boxData);
2939
+ break;
2940
+ case "boxEnd":
2941
+ this.boxEnd();
2942
+ break;
2943
+ case "loopStart":
2944
+ this.addSignal(void 0, void 0, e.loopText, e.signalType);
2945
+ break;
2946
+ case "loopEnd":
2947
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2948
+ break;
2949
+ case "rectStart":
2950
+ this.addSignal(void 0, void 0, e.color, e.signalType);
2951
+ break;
2952
+ case "rectEnd":
2953
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2954
+ break;
2955
+ case "optStart":
2956
+ this.addSignal(void 0, void 0, e.optText, e.signalType);
2957
+ break;
2958
+ case "optEnd":
2959
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2960
+ break;
2961
+ case "altStart":
2962
+ this.addSignal(void 0, void 0, e.altText, e.signalType);
2963
+ break;
2964
+ case "else":
2965
+ this.addSignal(void 0, void 0, e.altText, e.signalType);
2966
+ break;
2967
+ case "altEnd":
2968
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2969
+ break;
2970
+ case "setAccTitle":
2971
+ Ce(e.text);
2972
+ break;
2973
+ case "parStart":
2974
+ this.addSignal(void 0, void 0, e.parText, e.signalType);
2975
+ break;
2976
+ case "and":
2977
+ this.addSignal(void 0, void 0, e.parText, e.signalType);
2978
+ break;
2979
+ case "parEnd":
2980
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2981
+ break;
2982
+ case "criticalStart":
2983
+ this.addSignal(void 0, void 0, e.criticalText, e.signalType);
2984
+ break;
2985
+ case "option":
2986
+ this.addSignal(void 0, void 0, e.optionText, e.signalType);
2987
+ break;
2988
+ case "criticalEnd":
2989
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2990
+ break;
2991
+ case "breakStart":
2992
+ this.addSignal(void 0, void 0, e.breakText, e.signalType);
2993
+ break;
2994
+ case "breakEnd":
2995
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2996
+ break;
2997
+ }
2998
+ }
2999
+ getConfig() {
3000
+ return tt().sequence;
3001
+ }
3002
+ }, Rr = /* @__PURE__ */ g((e) => {
3003
+ const t = e.dropShadow ?? "none", { look: a } = tt();
3004
+ return `.actor {
3005
+ stroke: ${e.actorBorder};
3006
+ fill: ${e.actorBkg};
3007
+ stroke-width: ${e.strokeWidth ?? 1};
3008
+ }
3009
+
3010
+ rect.actor.outer-path[data-look="neo"] {
3011
+ filter: ${t};
3012
+ }
3013
+
3014
+ rect.note[data-look="neo"] {
3015
+ stroke:${e.noteBorderColor};
3016
+ fill:${e.noteBkgColor};
3017
+ filter: ${t};
3018
+ }
3019
+
3020
+ text.actor > tspan {
3021
+ fill: ${e.actorTextColor};
3022
+ stroke: none;
3023
+ }
3024
+
3025
+ .actor-line {
3026
+ stroke: ${e.actorLineColor};
3027
+ }
3028
+
3029
+ .innerArc {
3030
+ stroke-width: 1.5;
3031
+ stroke-dasharray: none;
3032
+ }
3033
+
3034
+ .messageLine0 {
3035
+ stroke-width: 1.5;
3036
+ stroke-dasharray: none;
3037
+ stroke: ${e.signalColor};
3038
+ }
3039
+
3040
+ .messageLine1 {
3041
+ stroke-width: 1.5;
3042
+ stroke-dasharray: 2, 2;
3043
+ stroke: ${e.signalColor};
3044
+ }
3045
+
3046
+ [id$="-arrowhead"] path {
3047
+ fill: ${e.signalColor};
3048
+ stroke: ${e.signalColor};
3049
+ }
3050
+
3051
+ .sequenceNumber {
3052
+ fill: ${e.sequenceNumberColor};
3053
+ }
3054
+
3055
+ [id$="-sequencenumber"] {
3056
+ fill: ${e.signalColor};
3057
+ }
3058
+
3059
+ [id$="-crosshead"] path {
3060
+ fill: ${e.signalColor};
3061
+ stroke: ${e.signalColor};
3062
+ }
3063
+
3064
+ .messageText {
3065
+ fill: ${e.signalTextColor};
3066
+ stroke: none;
3067
+ }
3068
+
3069
+ .labelBox {
3070
+ stroke: ${e.labelBoxBorderColor};
3071
+ fill: ${e.labelBoxBkgColor};
3072
+ filter: ${a === "neo" ? t : "none"};
3073
+ }
3074
+
3075
+ .labelText, .labelText > tspan {
3076
+ fill: ${e.labelTextColor};
3077
+ stroke: none;
3078
+ }
3079
+
3080
+ .loopText, .loopText > tspan {
3081
+ fill: ${e.loopTextColor};
3082
+ stroke: none;
3083
+ }
3084
+
3085
+ .sectionTitle, .sectionTitle > tspan {
3086
+ fill: ${e.loopTextColor};
3087
+ stroke: none;
3088
+ }
3089
+
3090
+ .loopLine {
3091
+ stroke-width: 2px;
3092
+ stroke-dasharray: 2, 2;
3093
+ stroke: ${e.labelBoxBorderColor};
3094
+ fill: ${e.labelBoxBorderColor};
3095
+ }
3096
+
3097
+ .note {
3098
+ //stroke: #decc93;
3099
+ stroke: ${e.noteBorderColor};
3100
+ fill: ${e.noteBkgColor};
3101
+ }
3102
+
3103
+ .noteText, .noteText > tspan {
3104
+ fill: ${e.noteTextColor};
3105
+ stroke: none;
3106
+ ${e.noteFontWeight ? `font-weight: ${e.noteFontWeight};` : ""}
3107
+ }
3108
+
3109
+ .activation0 {
3110
+ fill: ${e.activationBkgColor};
3111
+ stroke: ${e.activationBorderColor};
3112
+ }
3113
+
3114
+ .activation1 {
3115
+ fill: ${e.activationBkgColor};
3116
+ stroke: ${e.activationBorderColor};
3117
+ }
3118
+
3119
+ .activation2 {
3120
+ fill: ${e.activationBkgColor};
3121
+ stroke: ${e.activationBorderColor};
3122
+ }
3123
+
3124
+ .actorPopupMenu {
3125
+ position: absolute;
3126
+ }
3127
+
3128
+ .actorPopupMenuPanel {
3129
+ position: absolute;
3130
+ fill: ${e.actorBkg};
3131
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
3132
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
3133
+ }
3134
+ .actor-man circle, line {
3135
+ fill: ${e.actorBkg};
3136
+ stroke-width: 2px;
3137
+ }
3138
+
3139
+ g rect.rect {
3140
+ filter: ${t};
3141
+ stroke: ${e.nodeBorder};
3142
+ }
3143
+ `;
3144
+ }, "getStyles"), It = 36, ft = "actor-top", _t = "actor-bottom", qt = "actor-box", yt = "actor-man", Et = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), wt = /* @__PURE__ */ g(function(e, t) {
3145
+ const a = Tr(e, t);
3146
+ return Kt().look === "neo" && a.attr("data-look", "neo"), a;
3147
+ }, "drawRect"), Or = /* @__PURE__ */ g(function(e, t, a, r, i) {
3148
+ if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0) return {
3149
+ height: 0,
3150
+ width: 0
3151
+ };
3152
+ const n = t.links, s = t.actorCnt, o = t.rectData;
3153
+ var u = "none";
3154
+ i && (u = "block !important");
3155
+ const T = e.append("g");
3156
+ T.attr("id", "actor" + s + "_popup"), T.attr("class", "actorPopupMenu"), T.attr("display", u);
3157
+ var h = "";
3158
+ o.class !== void 0 && (h = " " + o.class);
3159
+ let x = o.width > a ? o.width : a;
3160
+ const E = T.append("rect");
3161
+ if (E.attr("class", "actorPopupMenuPanel" + h), E.attr("x", o.x), E.attr("y", o.height), E.attr("fill", o.fill), E.attr("stroke", o.stroke), E.attr("width", x), E.attr("height", o.height), E.attr("rx", o.rx), E.attr("ry", o.ry), n != null) {
3162
+ var L = 20;
3163
+ for (let f in n) {
3164
+ var p = T.append("a"), _ = (0, Ye.sanitizeUrl)(n[f]);
3165
+ p.attr("xlink:href", _), p.attr("target", "_blank"), Ur(r)(f, p, o.x + 10, o.height + L, x, 20, { class: "actor" }, r), L += 30;
3166
+ }
3167
+ }
3168
+ return E.attr("height", L), {
3169
+ height: o.height + L,
3170
+ width: x
3171
+ };
3172
+ }, "drawPopup"), Ht = /* @__PURE__ */ g(function(e) {
3173
+ return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
3174
+ }, "popupMenuToggle"), Ft = /* @__PURE__ */ g(async function(e, t, a = null) {
3175
+ let r = e.append("foreignObject");
3176
+ const i = await Be(t.text, Kt()), n = r.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
3177
+ if (r.attr("height", Math.round(n.height)).attr("width", Math.round(n.width)), t.class === "noteText") {
3178
+ const s = e.node().firstChild;
3179
+ s.setAttribute("height", n.height + 2 * t.textMargin);
3180
+ const o = s.getBBox();
3181
+ r.attr("x", Math.round(o.x + o.width / 2 - n.width / 2)).attr("y", Math.round(o.y + o.height / 2 - n.height / 2));
3182
+ } else if (a) {
3183
+ let { startx: s, stopx: o, starty: u } = a;
3184
+ if (s > o) {
3185
+ const T = s;
3186
+ s = o, o = T;
3187
+ }
3188
+ r.attr("x", Math.round(s + Math.abs(s - o) / 2 - n.width / 2)), t.class === "loopText" ? r.attr("y", Math.round(u)) : r.attr("y", Math.round(u - n.height));
3189
+ }
3190
+ return [r];
3191
+ }, "drawKatex"), mt = /* @__PURE__ */ g(function(e, t) {
3192
+ let a = 0, r = 0;
3193
+ const i = t.text.split(N.lineBreakRegex), [n, s] = Ve(t.fontSize);
3194
+ let o = [], u = 0, T = /* @__PURE__ */ g(() => t.y, "yfunc");
3195
+ if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0) switch (t.valign) {
3196
+ case "top":
3197
+ case "start":
3198
+ T = /* @__PURE__ */ g(() => Math.round(t.y + t.textMargin), "yfunc");
3199
+ break;
3200
+ case "middle":
3201
+ case "center":
3202
+ T = /* @__PURE__ */ g(() => Math.round(t.y + (a + r + t.textMargin) / 2), "yfunc");
3203
+ break;
3204
+ case "bottom":
3205
+ case "end":
3206
+ T = /* @__PURE__ */ g(() => Math.round(t.y + (a + r + 2 * t.textMargin) - t.textMargin), "yfunc");
3207
+ break;
3208
+ }
3209
+ if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0) switch (t.anchor) {
3210
+ case "left":
3211
+ case "start":
3212
+ t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3213
+ break;
3214
+ case "middle":
3215
+ case "center":
3216
+ t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3217
+ break;
3218
+ case "right":
3219
+ case "end":
3220
+ t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3221
+ break;
3222
+ }
3223
+ for (let [h, x] of i.entries()) {
3224
+ t.textMargin !== void 0 && t.textMargin === 0 && n !== void 0 && (u = h * n);
3225
+ const E = e.append("text");
3226
+ E.attr("x", t.x), E.attr("y", T()), t.anchor !== void 0 && E.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && E.style("font-family", t.fontFamily), s !== void 0 && E.style("font-size", s), t.fontWeight !== void 0 && E.style("font-weight", t.fontWeight), t.fill !== void 0 && E.attr("fill", t.fill), t.class !== void 0 && E.attr("class", t.class), t.dy !== void 0 ? E.attr("dy", t.dy) : u !== 0 && E.attr("dy", u);
3227
+ const L = x || "​";
3228
+ if (t.tspan) {
3229
+ const p = E.append("tspan");
3230
+ p.attr("x", t.x), t.fill !== void 0 && p.attr("fill", t.fill), p.text(L);
3231
+ } else E.text(L);
3232
+ t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (r += (E._groups || E)[0][0].getBBox().height, a = r), o.push(E);
3233
+ }
3234
+ return o;
3235
+ }, "drawText"), We = /* @__PURE__ */ g(function(e, t) {
3236
+ function a(i, n, s, o, u) {
3237
+ return i + "," + n + " " + (i + s) + "," + n + " " + (i + s) + "," + (n + o - u) + " " + (i + s - u * 1.2) + "," + (n + o) + " " + i + "," + (n + o);
3238
+ }
3239
+ g(a, "genPoints");
3240
+ const r = e.append("polygon");
3241
+ return r.attr("points", a(t.x, t.y, t.width, t.height, 7)), r.attr("class", "labelBox"), t.y = t.y + t.height / 2, mt(e, t), r;
3242
+ }, "drawLabel"), V = -1, Ke = /* @__PURE__ */ g((e, t, a, r) => {
3243
+ e.select && a.forEach((i) => {
3244
+ const n = t.get(i), s = e.select("#actor" + n.actorCnt);
3245
+ !r.mirrorActors && n.stopy ? s.attr("y2", n.stopy + n.height / 2) : r.mirrorActors && s.attr("y2", n.stopy);
3246
+ });
3247
+ }, "fixLifeLineHeights"), Lr = /* @__PURE__ */ g(function(e, t, a, r, i) {
3248
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + t.height, { look: u, theme: T, themeVariables: h } = a, { bkgColorArray: x, borderColorArray: E } = h, L = e.append("g").lower();
3249
+ var p = L;
3250
+ r || (V++, Object.keys(t.links || {}).length && !a.forceMenus && p.attr("onclick", Ht(`actor${V}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), p = L.append("g"), t.actorCnt = V, t.links != null && p.attr("id", "root-" + V), u === "neo" && p.attr("data-look", "neo"));
3251
+ const _ = Tt();
3252
+ var f = "actor";
3253
+ t.properties?.class ? f = t.properties.class : _.fill = "#eaeaea", r ? f += ` ${_t}` : f += ` ${ft}`, _.x = t.x, _.y = n, _.width = t.width, _.height = t.height, _.class = f, _.rx = 3, _.ry = 3, _.name = t.name, u === "neo" && (_.rx = 6, _.ry = 6);
3254
+ const I = wt(p, _), O = i.get(t.name) ?? 0;
3255
+ if (Et.has(T) && (I.style("stroke", E[O % E.length]), I.style("fill", x[O % E.length])), u === "neo" && I.attr("filter", "url(#drop-shadow)"), t.rectData = _, t.properties?.icon) {
3256
+ const A = t.properties.icon.trim();
3257
+ A.charAt(0) === "@" ? ne(p, _.x + _.width - 20, _.y + 10, A.substr(1)) : ie(p, _.x + _.width - 20, _.y + 10, A);
3258
+ }
3259
+ r || (p.attr("data-et", "participant"), p.attr("data-type", "participant"), p.attr("data-id", t.name)), ut(a, $(t.description))(t.description, p, _.x, _.y, _.width, _.height, { class: `actor ${qt}` }, a);
3260
+ let b = t.height;
3261
+ if (I.node) {
3262
+ const A = I.node().getBBox();
3263
+ t.height = A.height, b = A.height;
3264
+ }
3265
+ return b;
3266
+ }, "drawActorTypeParticipant"), br = /* @__PURE__ */ g(function(e, t, a, r, i) {
3267
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + t.height, { look: u, theme: T, themeVariables: h } = a, { bkgColorArray: x, borderColorArray: E } = h, L = e.append("g").lower();
3268
+ var p = L;
3269
+ r || (V++, Object.keys(t.links || {}).length && !a.forceMenus && p.attr("onclick", Ht(`actor${V}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), p = L.append("g"), t.actorCnt = V, t.links != null && p.attr("id", "root-" + V), u === "neo" && p.attr("data-look", "neo"));
3270
+ const _ = Tt();
3271
+ var f = "actor";
3272
+ t.properties?.class ? f = t.properties.class : _.fill = "#eaeaea", r ? f += ` ${_t}` : f += ` ${ft}`, _.x = t.x, _.y = n, _.width = t.width, _.height = t.height, _.class = f, _.name = t.name;
3273
+ const I = 6, O = {
3274
+ ..._,
3275
+ x: _.x + -6,
3276
+ y: _.y + 6,
3277
+ class: "actor"
3278
+ }, b = wt(p, _), A = wt(p, O);
3279
+ t.rectData = _, u === "neo" && p.attr("filter", "url(#drop-shadow)");
3280
+ const P = i.get(t.name) ?? 0;
3281
+ if (Et.has(T) && (b.style("stroke", E[P % E.length]), b.style("fill", x[P % E.length]), A.style("stroke", E[P % E.length]), A.style("fill", x[P % E.length])), t.properties?.icon) {
3282
+ const C = t.properties.icon.trim();
3283
+ C.charAt(0) === "@" ? ne(p, _.x + _.width - 20, _.y + 10, C.substr(1)) : ie(p, _.x + _.width - 20, _.y + 10, C);
3284
+ }
3285
+ ut(a, $(t.description))(t.description, p, _.x - I, _.y + I, _.width, _.height, { class: `actor ${qt}` }, a);
3286
+ let k = t.height;
3287
+ if (b.node) {
3288
+ const C = b.node().getBBox();
3289
+ t.height = C.height, k = C.height;
3290
+ }
3291
+ return r || (p.attr("data-et", "participant"), p.attr("data-type", "collections"), p.attr("data-id", t.name)), k;
3292
+ }, "drawActorTypeCollections"), mr = /* @__PURE__ */ g(function(e, t, a, r, i) {
3293
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + t.height, { look: u, theme: T, themeVariables: h } = a, { bkgColorArray: x, borderColorArray: E } = h, L = e.append("g").lower();
3294
+ let p = L;
3295
+ r || (V++, Object.keys(t.links || {}).length && !a.forceMenus && p.attr("onclick", Ht(`actor${V}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), p = L.append("g"), t.actorCnt = V, t.links != null && p.attr("id", "root-" + V), u === "neo" && p.attr("data-look", "neo"));
3296
+ const _ = Tt();
3297
+ let f = "actor";
3298
+ t.properties?.class ? f = t.properties.class : _.fill = "#eaeaea", r ? f += ` ${_t}` : f += ` ${ft}`, p.attr("class", f), _.x = t.x, _.y = n, _.width = t.width, _.height = t.height, _.name = t.name;
3299
+ const I = _.height / 2, O = I / (2.5 + _.height / 50), b = p.append("g"), A = p.append("g"), P = `M ${_.x},${_.y + I}
3300
+ a ${O},${I} 0 0 0 0,${_.height}
3301
+ h ${_.width - 2 * O}
3302
+ a ${O},${I} 0 0 0 0,-${_.height}
3303
+ Z
3304
+ `;
3305
+ b.append("path").attr("d", P), A.append("path").attr("d", `M ${_.x},${_.y + I}
3306
+ a ${O},${I} 0 0 0 0,${_.height}`), b.attr("transform", `translate(${O}, ${-(_.height / 2)})`), A.attr("transform", `translate(${_.width - O}, ${-_.height / 2})`), t.rectData = _, u === "neo" && b.attr("filter", "url(#drop-shadow)");
3307
+ const k = i.get(t.name) ?? 0;
3308
+ if (Et.has(T) && (b.style("stroke", E[k % E.length]), b.style("fill", x[k % E.length]), A.style("stroke", E[k % E.length]), A.style("fill", x[k % E.length])), t.properties?.icon) {
3309
+ const K = t.properties.icon.trim(), U = _.x + _.width - 20, G = _.y + 10;
3310
+ K.charAt(0) === "@" ? ne(p, U, G, K.substr(1)) : ie(p, U, G, K);
3311
+ }
3312
+ ut(a, $(t.description))(t.description, p, _.x, _.y, _.width, _.height, { class: `actor ${qt}` }, a);
3313
+ let C = t.height;
3314
+ const W = b.select("path:last-child");
3315
+ if (W.node()) {
3316
+ const K = W.node().getBBox();
3317
+ t.height = K.height, C = K.height;
3318
+ }
3319
+ return r || (p.attr("data-et", "participant"), p.attr("data-type", "queue"), p.attr("data-id", t.name)), C;
3320
+ }, "drawActorTypeQueue"), Ar = /* @__PURE__ */ g(function(e, t, a, r, i, n) {
3321
+ const s = r ? t.stopy : t.starty, o = t.x + t.width / 2, u = s + 75, { look: T, theme: h, themeVariables: x } = a, { bkgColorArray: E, borderColorArray: L, actorBorder: p, actorBkg: _ } = x, f = e.append("g").lower();
3322
+ r || (V++, f.append("line").attr("id", "actor" + V).attr("x1", o).attr("y1", u).attr("x2", o).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = V);
3323
+ const I = e.append("g");
3324
+ let O = yt;
3325
+ r ? O += ` ${_t}` : O += ` ${ft}`, I.attr("class", O), I.attr("name", t.name);
3326
+ const b = Tt();
3327
+ b.x = t.x, b.y = s, b.fill = "#eaeaea", b.width = t.width, b.height = t.height, b.class = "actor";
3328
+ const A = t.x + t.width / 2, P = s + 32, k = 22;
3329
+ I.append("defs").append("marker").attr("id", i + "-filled-head-control").attr("refX", 11).attr("refY", 5.8).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "172.5").attr("stroke-width", 1.2).append("path").attr("d", "M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"), I.append("circle").attr("cx", A).attr("cy", P).attr("r", k).attr("filter", `${T === "neo" ? "url(#drop-shadow)" : ""}`), I.append("line").attr("marker-end", "url(#" + i + "-filled-head-control)").attr("transform", `translate(${A}, ${P - k})`);
3330
+ const C = n.get(t.name) ?? 0;
3331
+ return Et.has(h) ? (I.style("stroke", L[C % L.length]), I.style("fill", E[C % L.length])) : (I.style("stroke", p), I.style("fill", _)), t.height = I.node().getBBox().height + 2 * (a?.sequence?.labelBoxHeight ?? 0), ut(a, $(t.description))(t.description, I, b.x, b.y + k + (r ? 5 : 12), b.width, b.height, { class: `actor ${yt}` }, a), r || (I.attr("data-et", "participant"), I.attr("data-type", "control"), I.attr("data-id", t.name)), t.height;
3332
+ }, "drawActorTypeControl"), Sr = /* @__PURE__ */ g(function(e, t, a, r, i) {
3333
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + 75, { look: u, theme: T, themeVariables: h } = a, { bkgColorArray: x, borderColorArray: E } = h, L = e.append("g").lower(), p = e.append("g");
3334
+ let _ = "actor";
3335
+ r ? _ += ` ${_t}` : _ += ` ${ft}`, p.attr("class", _), p.attr("name", t.name);
3336
+ const f = Tt();
3337
+ f.x = t.x, f.y = n, f.fill = "#eaeaea", f.width = t.width, f.height = t.height, f.class = "actor";
3338
+ const I = t.x + t.width / 2, O = n + (r ? 10 : 25), b = 22;
3339
+ p.append("circle").attr("cx", I).attr("cy", O).attr("r", b).attr("width", t.width).attr("height", t.height), p.append("line").attr("x1", I - b).attr("x2", I + b).attr("y1", O + b).attr("y2", O + b).attr("stroke-width", 2), u === "neo" && p.attr("filter", "url(#drop-shadow)");
3340
+ const A = i.get(t.name) ?? 0;
3341
+ return Et.has(T) && (p.style("stroke", E[A % E.length]), p.style("fill", x[A % E.length])), t.height = p.node().getBBox().height + (a?.sequence?.labelBoxHeight ?? 0), r || (V++, L.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = V), ut(a, $(t.description))(t.description, p, f.x, f.y + (r ? 15 : 30), f.width, f.height, { class: `actor ${yt}` }, a), r ? p.attr("transform", `translate(0, ${b})`) : (p.attr("transform", `translate(0, ${b / 2 - 5})`), p.attr("data-et", "participant"), p.attr("data-type", "entity"), p.attr("data-id", t.name)), t.height;
3342
+ }, "drawActorTypeEntity"), Nr = /* @__PURE__ */ g(function(e, t, a, r, i) {
3343
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + t.height + 2 * a.boxTextMargin, { theme: u, themeVariables: T, look: h } = a, { bkgColorArray: x, borderColorArray: E, actorBorder: L } = T, p = e.append("g").lower();
3344
+ let _ = p;
3345
+ r || (V++, Object.keys(t.links || {}).length && !a.forceMenus && _.attr("onclick", Ht(`actor${V}_popup`)).attr("cursor", "pointer"), _.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), _ = p.append("g"), t.actorCnt = V, t.links != null && _.attr("id", "root-" + V), h === "neo" && _.attr("data-look", "neo"));
3346
+ const f = Tt();
3347
+ let I = "actor";
3348
+ t.properties?.class ? I = t.properties.class : f.fill = "#eaeaea", r ? I += ` ${_t}` : I += ` ${ft}`, f.x = t.x, f.y = n, f.width = t.width, f.height = t.height, f.class = I, f.name = t.name, f.x = t.x, f.y = n;
3349
+ const O = f.width / 3, b = f.width / 3, A = O / 2, P = A / (2.5 + O / 50), k = _.append("g");
3350
+ k.attr("class", I);
3351
+ const C = `
3352
+ M ${f.x},${f.y + P}
3353
+ a ${A},${P} 0 0 0 ${O},0
3354
+ a ${A},${P} 0 0 0 -${O},0
3355
+ l 0,${b - 2 * P}
3356
+ a ${A},${P} 0 0 0 ${O},0
3357
+ l 0,-${b - 2 * P}
3358
+ `;
3359
+ k.append("path").attr("d", C), h === "neo" && k.attr("filter", "url(#drop-shadow)");
3360
+ const W = i.get(t.name) ?? 0;
3361
+ Et.has(u) ? (k.style("stroke", E[W % E.length]), k.style("fill", x[W % E.length])) : k.style("stroke", L), k.attr("transform", `translate(${O}, ${P})`), t.rectData = f, ut(a, $(t.description))(t.description, _, f.x, f.y + 35, f.width, f.height, { class: `actor ${qt}` }, a);
3362
+ const K = k.select("path:last-child");
3363
+ return K.node() && (t.height = K.node().getBBox().height + (a.sequence.labelBoxHeight ?? 0)), r || (_.attr("data-et", "participant"), _.attr("data-type", "database"), _.attr("data-id", t.name)), t.height;
3364
+ }, "drawActorTypeDatabase"), wr = /* @__PURE__ */ g(function(e, t, a, r, i) {
3365
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + 80, u = 22, T = e.append("g").lower(), { look: h, theme: x, themeVariables: E } = a, { bkgColorArray: L, borderColorArray: p, actorBorder: _ } = E;
3366
+ r || (V++, T.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = V);
3367
+ const f = e.append("g");
3368
+ let I = yt;
3369
+ r ? I += ` ${_t}` : I += ` ${ft}`, f.attr("class", I), f.attr("name", t.name);
3370
+ const O = Tt();
3371
+ O.x = t.x, O.y = n, O.fill = "#eaeaea", O.width = t.width, O.height = t.height, O.class = "actor", f.append("line").attr("id", "actor-man-torso" + V).attr("x1", t.x + t.width / 2 - u * 2.5).attr("y1", n + 12).attr("x2", t.x + t.width / 2 - 15).attr("y2", n + 12), f.append("line").attr("id", "actor-man-arms" + V).attr("x1", t.x + t.width / 2 - u * 2.5).attr("y1", n + 2).attr("x2", t.x + t.width / 2 - u * 2.5).attr("y2", n + 22), f.append("circle").attr("cx", t.x + t.width / 2).attr("cy", n + 12).attr("r", u), h === "neo" && f.attr("filter", "url(#drop-shadow)");
3372
+ const b = i.get(t.name) ?? 0;
3373
+ return Et.has(x) ? (f.style("stroke", p[b % p.length]), f.style("fill", L[b % p.length])) : f.style("stroke", _), t.height = f.node().getBBox().height + (a.sequence.labelBoxHeight ?? 0), ut(a, $(t.description))(t.description, f, O.x, O.y + 15, O.width, O.height, { class: `actor ${yt}` }, a), f.attr("transform", "translate(0,21)"), r || (f.attr("data-et", "participant"), f.attr("data-type", "boundary"), f.attr("data-id", t.name)), t.height;
3374
+ }, "drawActorTypeBoundary"), Pr = /* @__PURE__ */ g(function(e, t, a, r, i) {
3375
+ const n = r ? t.stopy : t.starty, s = t.x + t.width / 2, o = n + 80, { look: u, theme: T, themeVariables: h } = a, { bkgColorArray: x, borderColorArray: E, actorBorder: L } = h, p = e.append("g").lower();
3376
+ r || (V++, p.append("line").attr("id", "actor" + V).attr("x1", s).attr("y1", o).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = V);
3377
+ const _ = e.append("g");
3378
+ let f = yt;
3379
+ r ? f += ` ${_t}` : f += ` ${ft}`, _.attr("class", f), _.attr("name", t.name), r || _.attr("data-et", "participant").attr("data-type", "actor").attr("data-id", t.name);
3380
+ const I = u === "neo" ? 0.5 : 1, O = u === "neo" ? n + (1 - I) * 30 : n;
3381
+ _.append("line").attr("id", "actor-man-torso" + V).attr("x1", s).attr("y1", O + 25 * I).attr("x2", s).attr("y2", O + 45 * I), _.append("line").attr("id", "actor-man-arms" + V).attr("x1", s - It / 2 * I).attr("y1", O + 33 * I).attr("x2", s + It / 2 * I).attr("y2", O + 33 * I), _.append("line").attr("x1", s - It / 2 * I).attr("y1", O + 60 * I).attr("x2", s).attr("y2", O + 45 * I), _.append("line").attr("x1", s).attr("y1", O + 45 * I).attr("x2", s + (It / 2 - 2) * I).attr("y2", O + 60 * I);
3382
+ const b = _.append("circle");
3383
+ b.attr("cx", t.x + t.width / 2), b.attr("cy", O + 10 * I), b.attr("r", 15 * I), b.attr("width", t.width * I), b.attr("height", t.height * I), t.height = _.node().getBBox().height;
3384
+ const A = Tt();
3385
+ A.x = t.x, A.y = O, A.fill = "#eaeaea", A.width = t.width, A.height = t.height / I, A.class = "actor", A.rx = 3, A.ry = 3;
3386
+ const P = i.get(t.name) ?? 0;
3387
+ return Et.has(T) ? (_.style("stroke", E[P % E.length]), _.style("fill", x[P % E.length])) : _.style("stroke", L), ut(a, $(t.description))(t.description, _, A.x, O + 35 * I - (u === "neo" ? 10 : 0), A.width, A.height, { class: `actor ${yt}` }, a), t.height;
3388
+ }, "drawActorTypeActor"), kr = /* @__PURE__ */ g(async function(e, t, a, r, i, n, s) {
3389
+ const o = s ?? new Map([...n.db.getActors().values()].map((u, T) => [u.name, T]));
3390
+ switch (t.type) {
3391
+ case "actor":
3392
+ return await Pr(e, t, a, r, o);
3393
+ case "participant":
3394
+ return await Lr(e, t, a, r, o);
3395
+ case "boundary":
3396
+ return await wr(e, t, a, r, o);
3397
+ case "control":
3398
+ return await Ar(e, t, a, r, i, o);
3399
+ case "entity":
3400
+ return await Sr(e, t, a, r, o);
3401
+ case "database":
3402
+ return await Nr(e, t, a, r, o);
3403
+ case "collections":
3404
+ return await br(e, t, a, r, o);
3405
+ case "queue":
3406
+ return await mr(e, t, a, r, o);
3407
+ }
3408
+ }, "drawActor"), Dr = /* @__PURE__ */ g(function(e, t, a) {
3409
+ const r = e.append("g");
3410
+ Fe(r, t), t.name && ut(a)(t.name, r, t.x, t.y + a.boxTextMargin + (t.textMaxHeight || 0) / 2, t.width, 0, { class: "text" }, a), r.lower();
3411
+ }, "drawBox"), Cr = /* @__PURE__ */ g(function(e) {
3412
+ return e.append("g");
3413
+ }, "anchorElement"), vr = /* @__PURE__ */ g(function(e, t, a, r, i, n, s) {
3414
+ const { theme: o, themeVariables: u } = r, { bkgColorArray: T, borderColorArray: h, mainBkg: x } = u, E = Tt(), L = t.anchored, p = t.actor;
3415
+ E.x = t.startx, E.y = t.starty, E.class = "activation" + i % 3, E.width = t.stopx - t.startx, E.height = a - t.starty;
3416
+ const _ = wt(L, E), f = (s ?? new Map([...n.db.getActors().values()].map((I, O) => [I.name, O]))).get(p) ?? 0;
3417
+ Et.has(o) && (_.style("stroke", h[f % h.length]), _.style("fill", T[f % h.length] ?? x));
3418
+ }, "drawActivation"), Mr = /* @__PURE__ */ g(async function(e, t, a, r, i) {
3419
+ const { boxMargin: n, boxTextMargin: s, labelBoxHeight: o, labelBoxWidth: u, messageFontFamily: T, messageFontSize: h, messageFontWeight: x } = r, E = e.append("g").attr("data-et", "control-structure").attr("data-id", "i" + i.id), L = /* @__PURE__ */ g(function(f, I, O, b) {
3420
+ return E.append("line").attr("x1", f).attr("y1", I).attr("x2", O).attr("y2", b).attr("class", "loopLine");
3421
+ }, "drawLoopLine");
3422
+ L(t.startx, t.starty, t.stopx, t.starty), L(t.stopx, t.starty, t.stopx, t.stopy), L(t.startx, t.stopy, t.stopx, t.stopy), L(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(f) {
3423
+ L(t.startx, f.y, t.stopx, f.y).style("stroke-dasharray", "3, 3");
3424
+ });
3425
+ let p = se();
3426
+ p.text = a, p.x = t.startx, p.y = t.starty, p.fontFamily = T, p.fontSize = h, p.fontWeight = x, p.anchor = "middle", p.valign = "middle", p.tspan = !1, p.width = Math.max(u ?? 0, 50), p.height = o + (r.look === "neo" ? 15 : 0) || 20, p.textMargin = s, p.class = "labelText", We(E, p), p = qe(), p.text = t.title, p.x = t.startx + u / 2 + (t.stopx - t.startx) / 2, p.y = t.starty + n + s, p.anchor = "middle", p.valign = "middle", p.textMargin = s, p.class = "loopText", p.fontFamily = T, p.fontSize = h, p.fontWeight = x, p.wrap = !0;
3427
+ let _ = $(p.text) ? await Ft(E, p, t) : mt(E, p);
3428
+ if (t.sectionTitles !== void 0) {
3429
+ for (const [f, I] of Object.entries(t.sectionTitles)) if (I.message) {
3430
+ p.text = I.message, p.x = t.startx + (t.stopx - t.startx) / 2, p.y = t.sections[f].y + n + s, p.class = "sectionTitle", p.anchor = "middle", p.valign = "middle", p.tspan = !1, p.fontFamily = T, p.fontSize = h, p.fontWeight = x, p.wrap = t.wrap, $(p.text) ? (t.starty = t.sections[f].y, await Ft(E, p, t)) : mt(E, p);
3431
+ let O = Math.round(_.map((b) => (b._groups || b)[0][0].getBBox().height).reduce((b, A) => b + A));
3432
+ t.sections[f].height += O - (n + s);
3433
+ }
3434
+ }
3435
+ return t.height = Math.round(t.stopy - t.starty), E;
3436
+ }, "drawLoop"), Fe = /* @__PURE__ */ g(function(e, t) {
3437
+ pr(e, t);
3438
+ }, "drawBackgroundRect"), Br = /* @__PURE__ */ g(function(e, t) {
3439
+ e.append("defs").append("symbol").attr("id", t + "-database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z");
3440
+ }, "insertDatabaseIcon"), Vr = /* @__PURE__ */ g(function(e, t) {
3441
+ e.append("defs").append("symbol").attr("id", t + "-computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z");
3442
+ }, "insertComputerIcon"), Yr = /* @__PURE__ */ g(function(e, t) {
3443
+ e.append("defs").append("symbol").attr("id", t + "-clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z");
3444
+ }, "insertClockIcon"), Wr = /* @__PURE__ */ g(function(e, t) {
3445
+ e.append("defs").append("marker").attr("id", t + "-arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M -1 0 L 10 5 L 0 10 z");
3446
+ }, "insertArrowHead"), Kr = /* @__PURE__ */ g(function(e, t) {
3447
+ e.append("defs").append("marker").attr("id", t + "-filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
3448
+ }, "insertArrowFilledHead"), Fr = /* @__PURE__ */ g(function(e, t) {
3449
+ e.append("defs").append("marker").attr("id", t + "-sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
3450
+ }, "insertSequenceNumber"), qr = /* @__PURE__ */ g(function(e, t) {
3451
+ e.append("defs").append("marker").attr("id", t + "-crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
3452
+ }, "insertArrowCrossHead"), Hr = /* @__PURE__ */ g(function(e, t) {
3453
+ const { theme: a } = t;
3454
+ e.append("defs").append("filter").attr("id", "drop-shadow").attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", `${a === "redux" || a === "redux-color" ? "#000000" : "#FFFFFF"}`);
3455
+ }, "insertDropShadow"), qe = /* @__PURE__ */ g(function() {
3456
+ return {
3457
+ x: 0,
3458
+ y: 0,
3459
+ fill: void 0,
3460
+ anchor: void 0,
3461
+ style: "#666",
3462
+ width: void 0,
3463
+ height: void 0,
3464
+ textMargin: 0,
3465
+ rx: 0,
3466
+ ry: 0,
3467
+ tspan: !0,
3468
+ valign: void 0
3469
+ };
3470
+ }, "getTextObj"), zr = /* @__PURE__ */ g(function() {
3471
+ return {
3472
+ x: 0,
3473
+ y: 0,
3474
+ fill: "#EDF2AE",
3475
+ stroke: "#666",
3476
+ width: 100,
3477
+ anchor: "start",
3478
+ height: 100,
3479
+ rx: 0,
3480
+ ry: 0
3481
+ };
3482
+ }, "getNoteRect"), ut = /* @__PURE__ */ (function() {
3483
+ function e(n, s, o, u, T, h, x) {
3484
+ i(s.append("text").attr("x", o + T / 2).attr("y", u + h / 2 + 5).style("text-anchor", "middle").text(n), x);
3485
+ }
3486
+ g(e, "byText");
3487
+ function t(n, s, o, u, T, h, x, E) {
3488
+ const { actorFontSize: L, actorFontFamily: p, actorFontWeight: _ } = E, [f, I] = Ve(L), O = n.split(N.lineBreakRegex);
3489
+ for (let b = 0; b < O.length; b++) {
3490
+ const A = b * f - f * (O.length - 1) / 2, P = s.append("text").attr("x", o + T / 2).attr("y", u).style("text-anchor", "middle").style("font-size", I).style("font-weight", _).style("font-family", p);
3491
+ P.append("tspan").attr("x", o + T / 2).attr("dy", A).text(O[b]), P.attr("y", u + h / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(P, x);
3492
+ }
3493
+ }
3494
+ g(t, "byTspan");
3495
+ function a(n, s, o, u, T, h, x, E) {
3496
+ const L = s.append("switch"), p = L.append("foreignObject").attr("x", o).attr("y", u).attr("width", T).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3497
+ p.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), t(n, L, o, u, T, h, x, E), i(p, x);
3498
+ }
3499
+ g(a, "byFo");
3500
+ async function r(n, s, o, u, T, h, x, E) {
3501
+ const L = await Pt(n, Kt()), p = s.append("switch"), _ = p.append("foreignObject").attr("x", o + T / 2 - L.width / 2).attr("y", u + h / 2 - L.height / 2).attr("width", L.width).attr("height", L.height).append("xhtml:div").style("height", "100%").style("width", "100%");
3502
+ _.append("div").style("text-align", "center").style("vertical-align", "middle").html(await Be(n, Kt())), t(n, p, o, u, T, h, x, E), i(_, x);
3503
+ }
3504
+ g(r, "byKatex");
3505
+ function i(n, s) {
3506
+ for (const o in s) s.hasOwnProperty(o) && n.attr(o, s[o]);
3507
+ }
3508
+ return g(i, "_setTextAttrs"), function(n, s = !1) {
3509
+ return s ? r : n.textPlacement === "fo" ? a : n.textPlacement === "old" ? e : t;
3510
+ };
3511
+ })(), Ur = /* @__PURE__ */ (function() {
3512
+ function e(i, n, s, o, u, T, h) {
3513
+ r(n.append("text").attr("x", s).attr("y", o).style("text-anchor", "start").text(i), h);
3514
+ }
3515
+ g(e, "byText");
3516
+ function t(i, n, s, o, u, T, h, x) {
3517
+ const { actorFontSize: E, actorFontFamily: L, actorFontWeight: p } = x, _ = i.split(N.lineBreakRegex);
3518
+ for (let f = 0; f < _.length; f++) {
3519
+ const I = f * E - E * (_.length - 1) / 2, O = n.append("text").attr("x", s).attr("y", o).style("text-anchor", "start").style("font-size", E).style("font-weight", p).style("font-family", L);
3520
+ O.append("tspan").attr("x", s).attr("dy", I).text(_[f]), O.attr("y", o + T / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), r(O, h);
3521
+ }
3522
+ }
3523
+ g(t, "byTspan");
3524
+ function a(i, n, s, o, u, T, h, x) {
3525
+ const E = n.append("switch"), L = E.append("foreignObject").attr("x", s).attr("y", o).attr("width", u).attr("height", T).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3526
+ L.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, E, s, o, u, T, h, x), r(L, h);
3527
+ }
3528
+ g(a, "byFo");
3529
+ function r(i, n) {
3530
+ for (const s in n) n.hasOwnProperty(s) && i.attr(s, n[s]);
3531
+ }
3532
+ return g(r, "_setTextAttrs"), function(i) {
3533
+ return i.textPlacement === "fo" ? a : i.textPlacement === "old" ? e : t;
3534
+ };
3535
+ })(), H = {
3536
+ drawRect: wt,
3537
+ drawText: mt,
3538
+ drawLabel: We,
3539
+ drawActor: kr,
3540
+ drawBox: Dr,
3541
+ drawPopup: Or,
3542
+ anchorElement: Cr,
3543
+ drawActivation: vr,
3544
+ drawLoop: Mr,
3545
+ drawBackgroundRect: Fe,
3546
+ insertArrowHead: Wr,
3547
+ insertArrowFilledHead: Kr,
3548
+ insertSequenceNumber: Fr,
3549
+ insertArrowCrossHead: qr,
3550
+ insertDatabaseIcon: Br,
3551
+ insertComputerIcon: Vr,
3552
+ insertClockIcon: Yr,
3553
+ getTextObj: qe,
3554
+ getNoteRect: zr,
3555
+ fixLifeLineHeights: Ke,
3556
+ sanitizeUrl: Ye.sanitizeUrl,
3557
+ insertDropShadow: Hr,
3558
+ insertSolidTopArrowHead: /* @__PURE__ */ g(function(e, t) {
3559
+ e.append("defs").append("marker").attr("id", t + "-solidTopArrowHead").attr("refX", 7.9).attr("refY", 7.25).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 8 L 0 8 z");
3560
+ }, "insertSolidTopArrowHead"),
3561
+ insertSolidBottomArrowHead: /* @__PURE__ */ g(function(e, t) {
3562
+ e.append("defs").append("marker").attr("id", t + "-solidBottomArrowHead").attr("refX", 7.9).attr("refY", 0.75).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 0 L 0 8 z");
3563
+ }, "insertSolidBottomArrowHead"),
3564
+ insertStickTopArrowHead: /* @__PURE__ */ g(function(e, t) {
3565
+ e.append("defs").append("marker").attr("id", t + "-stickTopArrowHead").attr("refX", 7.5).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 7 7").attr("stroke", "black").attr("stroke-width", 1.5).attr("fill", "none");
3566
+ }, "insertStickTopArrowHead"),
3567
+ insertStickBottomArrowHead: /* @__PURE__ */ g(function(e, t) {
3568
+ e.append("defs").append("marker").attr("id", t + "-stickBottomArrowHead").attr("refX", 7.5).attr("refY", 0).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 7 L 7 0").attr("stroke", "black").attr("stroke-width", 1.5).attr("fill", "none");
3569
+ }, "insertStickBottomArrowHead")
3570
+ }, l = {}, R = {
3571
+ data: {
3572
+ startx: void 0,
3573
+ stopx: void 0,
3574
+ starty: void 0,
3575
+ stopy: void 0
3576
+ },
3577
+ verticalPos: 0,
3578
+ sequenceItems: [],
3579
+ activations: [],
3580
+ models: {
3581
+ getHeight: /* @__PURE__ */ g(function() {
3582
+ return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map((e) => e.height || 0)) + (this.loops.length === 0 ? 0 : this.loops.map((e) => e.height || 0).reduce((e, t) => e + t)) + (this.messages.length === 0 ? 0 : this.messages.map((e) => e.height || 0).reduce((e, t) => e + t)) + (this.notes.length === 0 ? 0 : this.notes.map((e) => e.height || 0).reduce((e, t) => e + t));
3583
+ }, "getHeight"),
3584
+ clear: /* @__PURE__ */ g(function() {
3585
+ this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
3586
+ }, "clear"),
3587
+ addBox: /* @__PURE__ */ g(function(e) {
3588
+ this.boxes.push(e);
3589
+ }, "addBox"),
3590
+ addActor: /* @__PURE__ */ g(function(e) {
3591
+ this.actors.push(e);
3592
+ }, "addActor"),
3593
+ addLoop: /* @__PURE__ */ g(function(e) {
3594
+ this.loops.push(e);
3595
+ }, "addLoop"),
3596
+ addMessage: /* @__PURE__ */ g(function(e) {
3597
+ this.messages.push(e);
3598
+ }, "addMessage"),
3599
+ addNote: /* @__PURE__ */ g(function(e) {
3600
+ this.notes.push(e);
3601
+ }, "addNote"),
3602
+ lastActor: /* @__PURE__ */ g(function() {
3603
+ return this.actors[this.actors.length - 1];
3604
+ }, "lastActor"),
3605
+ lastLoop: /* @__PURE__ */ g(function() {
3606
+ return this.loops[this.loops.length - 1];
3607
+ }, "lastLoop"),
3608
+ lastMessage: /* @__PURE__ */ g(function() {
3609
+ return this.messages[this.messages.length - 1];
3610
+ }, "lastMessage"),
3611
+ lastNote: /* @__PURE__ */ g(function() {
3612
+ return this.notes[this.notes.length - 1];
3613
+ }, "lastNote"),
3614
+ actors: [],
3615
+ boxes: [],
3616
+ loops: [],
3617
+ messages: [],
3618
+ notes: []
3619
+ },
3620
+ init: /* @__PURE__ */ g(function() {
3621
+ this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
3622
+ startx: void 0,
3623
+ stopx: void 0,
3624
+ starty: void 0,
3625
+ stopy: void 0
3626
+ }, this.verticalPos = 0, Ue(tt());
3627
+ }, "init"),
3628
+ updateVal: /* @__PURE__ */ g(function(e, t, a, r) {
3629
+ e[t] === void 0 ? e[t] = a : e[t] = r(a, e[t]);
3630
+ }, "updateVal"),
3631
+ updateBounds: /* @__PURE__ */ g(function(e, t, a, r) {
3632
+ const i = this;
3633
+ let n = 0;
3634
+ function s(o) {
3635
+ return /* @__PURE__ */ g(function(T) {
3636
+ n++;
3637
+ const h = i.sequenceItems.length - n + 1;
3638
+ i.updateVal(T, "starty", t - h * l.boxMargin, Math.min), i.updateVal(T, "stopy", r + h * l.boxMargin, Math.max), i.updateVal(R.data, "startx", e - h * l.boxMargin, Math.min), i.updateVal(R.data, "stopx", a + h * l.boxMargin, Math.max), o !== "activation" && (i.updateVal(T, "startx", e - h * l.boxMargin, Math.min), i.updateVal(T, "stopx", a + h * l.boxMargin, Math.max), i.updateVal(R.data, "starty", t - h * l.boxMargin, Math.min), i.updateVal(R.data, "stopy", r + h * l.boxMargin, Math.max));
3639
+ }, "updateItemBounds");
3640
+ }
3641
+ g(s, "updateFn"), this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
3642
+ }, "updateBounds"),
3643
+ insert: /* @__PURE__ */ g(function(e, t, a, r) {
3644
+ const i = N.getMin(e, a), n = N.getMax(e, a), s = N.getMin(t, r), o = N.getMax(t, r);
3645
+ this.updateVal(R.data, "startx", i, Math.min), this.updateVal(R.data, "starty", s, Math.min), this.updateVal(R.data, "stopx", n, Math.max), this.updateVal(R.data, "stopy", o, Math.max), this.updateBounds(i, s, n, o);
3646
+ }, "insert"),
3647
+ newActivation: /* @__PURE__ */ g(function(e, t, a) {
3648
+ const r = a.get(e.from), i = zt(e.from).length || 0, n = r.x + r.width / 2 + (i - 1) * l.activationWidth / 2;
3649
+ this.activations.push({
3650
+ startx: n,
3651
+ starty: this.verticalPos + 2,
3652
+ stopx: n + l.activationWidth,
3653
+ stopy: void 0,
3654
+ actor: e.from,
3655
+ anchored: H.anchorElement(t)
3656
+ });
3657
+ }, "newActivation"),
3658
+ endActivation: /* @__PURE__ */ g(function(e) {
3659
+ const t = this.activations.map(function(a) {
3660
+ return a.actor;
3661
+ }).lastIndexOf(e.from);
3662
+ return this.activations.splice(t, 1)[0];
3663
+ }, "endActivation"),
3664
+ createLoop: /* @__PURE__ */ g(function(e = {
3665
+ message: void 0,
3666
+ wrap: !1,
3667
+ width: void 0
3668
+ }, t) {
3669
+ return {
3670
+ startx: void 0,
3671
+ starty: this.verticalPos,
3672
+ stopx: void 0,
3673
+ stopy: void 0,
3674
+ title: e.message,
3675
+ wrap: e.wrap,
3676
+ width: e.width,
3677
+ height: 0,
3678
+ fill: t
3679
+ };
3680
+ }, "createLoop"),
3681
+ newLoop: /* @__PURE__ */ g(function(e = {
3682
+ message: void 0,
3683
+ wrap: !1,
3684
+ width: void 0
3685
+ }, t) {
3686
+ this.sequenceItems.push(this.createLoop(e, t));
3687
+ }, "newLoop"),
3688
+ endLoop: /* @__PURE__ */ g(function() {
3689
+ return this.sequenceItems.pop();
3690
+ }, "endLoop"),
3691
+ isLoopOverlap: /* @__PURE__ */ g(function() {
3692
+ return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
3693
+ }, "isLoopOverlap"),
3694
+ addSectionToLoop: /* @__PURE__ */ g(function(e) {
3695
+ const t = this.sequenceItems.pop();
3696
+ t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({
3697
+ y: R.getVerticalPos(),
3698
+ height: 0
3699
+ }), t.sectionTitles.push(e), this.sequenceItems.push(t);
3700
+ }, "addSectionToLoop"),
3701
+ saveVerticalPos: /* @__PURE__ */ g(function() {
3702
+ this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
3703
+ }, "saveVerticalPos"),
3704
+ resetVerticalPos: /* @__PURE__ */ g(function() {
3705
+ this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
3706
+ }, "resetVerticalPos"),
3707
+ bumpVerticalPos: /* @__PURE__ */ g(function(e) {
3708
+ this.verticalPos = this.verticalPos + e, this.data.stopy = N.getMax(this.data.stopy, this.verticalPos);
3709
+ }, "bumpVerticalPos"),
3710
+ getVerticalPos: /* @__PURE__ */ g(function() {
3711
+ return this.verticalPos;
3712
+ }, "getVerticalPos"),
3713
+ getBounds: /* @__PURE__ */ g(function() {
3714
+ return {
3715
+ bounds: this.data,
3716
+ models: this.models
3717
+ };
3718
+ }, "getBounds")
3719
+ }, Gr = /* @__PURE__ */ g(async function(e, t, a) {
3720
+ R.bumpVerticalPos(l.boxMargin), t.height = l.boxMargin, t.starty = R.getVerticalPos();
3721
+ const r = Tt();
3722
+ r.x = t.startx, r.y = t.starty, r.width = t.width || l.width, r.class = "note";
3723
+ const i = e.append("g");
3724
+ i.attr("data-et", "note"), i.attr("data-id", "i" + a);
3725
+ const n = H.drawRect(i, r), s = se();
3726
+ s.x = t.startx, s.y = t.starty, s.width = r.width, s.dy = "1em", s.text = t.message, s.class = "noteText", s.fontFamily = l.noteFontFamily, s.fontSize = l.noteFontSize, s.fontWeight = l.noteFontWeight, s.anchor = l.noteAlign, s.textMargin = l.noteMargin, s.valign = "center";
3727
+ const o = $(s.text) ? await Ft(i, s) : mt(i, s), u = Math.round(o.map((T) => (T._groups || T)[0][0].getBBox().height).reduce((T, h) => T + h));
3728
+ n.attr("height", u + 2 * l.noteMargin), t.height += u + 2 * l.noteMargin, R.bumpVerticalPos(u + 2 * l.noteMargin), t.stopy = t.starty + u + 2 * l.noteMargin, t.stopx = t.startx + r.width, R.insert(t.startx, t.starty, t.stopx, t.stopy), R.models.addNote(t);
3729
+ }, "drawNote"), ve = /* @__PURE__ */ g(function(e, t, a, r, i, n, s) {
3730
+ const o = r.db.getActors(), u = o.get(t.from), T = o.get(t.to), h = a.sequenceVisible;
3731
+ let x = u.x + u.width / 2, E = T.x + T.width / 2;
3732
+ const L = x <= E, p = Qe(t, r), _ = e.append("g"), f = 16.5, I = /* @__PURE__ */ g((k, C) => {
3733
+ const W = k ? f : -16.5;
3734
+ return C ? -W : W;
3735
+ }, "getCircleOffset"), O = /* @__PURE__ */ g((k) => {
3736
+ _.append("circle").attr("cx", k).attr("cy", s).attr("r", 5).attr("width", 10).attr("height", 10);
3737
+ }, "drawCircle"), { CENTRAL_CONNECTION: b, CENTRAL_CONNECTION_REVERSE: A, CENTRAL_CONNECTION_DUAL: P } = r.db.LINETYPE;
3738
+ if (h) switch (t.centralConnection) {
3739
+ case b:
3740
+ p && (E += I(L, !0));
3741
+ break;
3742
+ case A:
3743
+ p || (x += I(L, !1));
3744
+ break;
3745
+ case P:
3746
+ p ? E += I(L, !0) : x += I(L, !1);
3747
+ break;
3748
+ }
3749
+ switch (t.centralConnection) {
3750
+ case b:
3751
+ O(E);
3752
+ break;
3753
+ case A:
3754
+ O(x);
3755
+ break;
3756
+ case P:
3757
+ O(x), O(E);
3758
+ break;
3759
+ }
3760
+ }, "drawCentralConnection"), Rt = /* @__PURE__ */ g((e) => ({
3761
+ fontFamily: e.messageFontFamily,
3762
+ fontSize: e.messageFontSize,
3763
+ fontWeight: e.messageFontWeight
3764
+ }), "messageFont"), bt = /* @__PURE__ */ g((e) => ({
3765
+ fontFamily: e.noteFontFamily,
3766
+ fontSize: e.noteFontSize,
3767
+ fontWeight: e.noteFontWeight
3768
+ }), "noteFont"), re = /* @__PURE__ */ g((e) => ({
3769
+ fontFamily: e.actorFontFamily,
3770
+ fontSize: e.actorFontSize,
3771
+ fontWeight: e.actorFontWeight
3772
+ }), "actorFont");
3773
+ async function He(e, t) {
3774
+ R.bumpVerticalPos(10);
3775
+ const { startx: a, stopx: r, message: i } = t, n = N.splitBreaks(i).length, s = $(i), o = s ? await Pt(i, tt()) : Z.calculateTextDimensions(i, Rt(l));
3776
+ if (!s) {
3777
+ const x = o.height / n;
3778
+ t.height += x, R.bumpVerticalPos(x);
3779
+ }
3780
+ let u, T = o.height - 10;
3781
+ const h = o.width;
3782
+ if (a === r) {
3783
+ u = R.getVerticalPos() + T, l.rightAngles || (T += l.boxMargin, u = R.getVerticalPos() + T), T += 30;
3784
+ const x = N.getMax(h / 2, l.width / 2);
3785
+ R.insert(a - x, R.getVerticalPos() - 10 + T, r + x, R.getVerticalPos() + 30 + T);
3786
+ } else
3787
+ T += l.boxMargin, u = R.getVerticalPos() + T, R.insert(a, u - 10, r, u);
3788
+ return R.bumpVerticalPos(T), t.height += T, t.stopy = t.starty + t.height, R.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), u;
3789
+ }
3790
+ g(He, "boundMessage");
3791
+ var Xr = /* @__PURE__ */ g(async function(e, t, a, r, i, n) {
3792
+ const { startx: s, stopx: o, starty: u, message: T, type: h, sequenceIndex: x, sequenceVisible: E } = t, L = Z.calculateTextDimensions(T, Rt(l)), p = se();
3793
+ p.x = Math.min(s, o), p.y = u + 10, p.width = Math.abs(o - s), p.class = "messageText", p.dy = "1em", p.text = T, p.fontFamily = l.messageFontFamily, p.fontSize = l.messageFontSize, p.fontWeight = l.messageFontWeight, p.anchor = l.messageAlign, p.valign = "center", p.textMargin = l.wrapPadding, p.tspan = !1, $(p.text) ? await Ft(e, p, {
3794
+ startx: s,
3795
+ stopx: o,
3796
+ starty: a
3797
+ }) : mt(e, p);
3798
+ const _ = L.width;
3799
+ let f;
3800
+ if (s === o) {
3801
+ const O = E || l.showSequenceNumbers, b = Qe(i, r), A = ra(i, r), P = s + (O && (b || A) ? 10 : 0);
3802
+ l.rightAngles ? f = e.append("path").attr("d", `M ${P},${a} H ${s + N.getMax(l.width / 2, _ / 2)} V ${a + 25} H ${s}`) : f = e.append("path").attr("d", "M " + P + "," + a + " C " + (P + 60) + "," + (a - 10) + " " + (s + 60) + "," + (a + 30) + " " + s + "," + (a + 20)), te(i, r) && ve(e, i, t, r, s, o, a);
3803
+ } else
3804
+ f = e.append("line"), f.attr("x1", s), f.attr("y1", a), f.attr("x2", o), f.attr("y2", a), te(i, r) && ve(e, i, t, r, s, o, a);
3805
+ h === r.db.LINETYPE.DOTTED || h === r.db.LINETYPE.DOTTED_CROSS || h === r.db.LINETYPE.DOTTED_POINT || h === r.db.LINETYPE.DOTTED_OPEN || h === r.db.LINETYPE.BIDIRECTIONAL_DOTTED || h === r.db.LINETYPE.SOLID_TOP_DOTTED || h === r.db.LINETYPE.SOLID_BOTTOM_DOTTED || h === r.db.LINETYPE.STICK_TOP_DOTTED || h === r.db.LINETYPE.STICK_BOTTOM_DOTTED || h === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || h === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || h === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || h === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED ? (f.style("stroke-dasharray", "3, 3"), f.attr("class", "messageLine1")) : f.attr("class", "messageLine0"), f.attr("data-et", "message"), f.attr("data-id", "i" + t.id), f.attr("data-from", t.from), f.attr("data-to", t.to);
3806
+ let I = "";
3807
+ if (l.arrowMarkerAbsolute && (I = sr(!0)), f.attr("stroke-width", 2), f.attr("stroke", "none"), f.style("fill", "none"), (h === r.db.LINETYPE.SOLID_TOP || h === r.db.LINETYPE.SOLID_TOP_DOTTED) && f.attr("marker-end", "url(" + I + "#" + n + "-solidTopArrowHead)"), (h === r.db.LINETYPE.SOLID_BOTTOM || h === r.db.LINETYPE.SOLID_BOTTOM_DOTTED) && f.attr("marker-end", "url(" + I + "#" + n + "-solidBottomArrowHead)"), (h === r.db.LINETYPE.STICK_TOP || h === r.db.LINETYPE.STICK_TOP_DOTTED) && f.attr("marker-end", "url(" + I + "#" + n + "-stickTopArrowHead)"), (h === r.db.LINETYPE.STICK_BOTTOM || h === r.db.LINETYPE.STICK_BOTTOM_DOTTED) && f.attr("marker-end", "url(" + I + "#" + n + "-stickBottomArrowHead)"), (h === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || h === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED) && f.attr("marker-start", "url(" + I + "#" + n + "-solidBottomArrowHead)"), (h === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || h === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED) && f.attr("marker-start", "url(" + I + "#" + n + "-solidTopArrowHead)"), (h === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE || h === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED) && f.attr("marker-start", "url(" + I + "#" + n + "-stickBottomArrowHead)"), (h === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || h === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED) && f.attr("marker-start", "url(" + I + "#" + n + "-stickTopArrowHead)"), (h === r.db.LINETYPE.SOLID || h === r.db.LINETYPE.DOTTED) && f.attr("marker-end", "url(" + I + "#" + n + "-arrowhead)"), (h === r.db.LINETYPE.BIDIRECTIONAL_SOLID || h === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (f.attr("marker-start", "url(" + I + "#" + n + "-arrowhead)"), f.attr("marker-end", "url(" + I + "#" + n + "-arrowhead)")), (h === r.db.LINETYPE.SOLID_POINT || h === r.db.LINETYPE.DOTTED_POINT) && f.attr("marker-end", "url(" + I + "#" + n + "-filled-head)"), (h === r.db.LINETYPE.SOLID_CROSS || h === r.db.LINETYPE.DOTTED_CROSS) && f.attr("marker-end", "url(" + I + "#" + n + "-crosshead)"), E || l.showSequenceNumbers) {
3808
+ const O = h === r.db.LINETYPE.BIDIRECTIONAL_SOLID || h === r.db.LINETYPE.BIDIRECTIONAL_DOTTED, b = h === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || h === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || h === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || h === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || h === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE || h === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || h === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || h === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED, A = 6, P = te(i, r);
3809
+ let k = s, C = o;
3810
+ O ? (s < o ? k = s + A * 2 : (k = s - A + (P ? -5 : 0), k += i?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_DUAL || i?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), f.attr("x1", k)) : b ? (o > s ? C = o - 2 * A : (C = o - A, k += i?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_DUAL || i?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), C += P ? 15 : 0, f.attr("x2", C), f.attr("x1", k)) : f.attr("x1", s + A);
3811
+ let W = 0;
3812
+ const K = s === o, U = s <= o;
3813
+ K ? W = t.fromBounds + 1 : b ? W = U ? t.toBounds - 1 : t.fromBounds + 1 : W = U ? t.fromBounds + 1 : t.toBounds - 1;
3814
+ let G = "12px";
3815
+ const J = x.toString().length;
3816
+ J > 5 ? G = "7px" : J > 3 && (G = "9px"), e.append("line").attr("x1", W).attr("y1", a).attr("x2", W).attr("y2", a).attr("stroke-width", 0).attr("marker-start", "url(" + I + "#" + n + "-sequencenumber)"), e.append("text").attr("x", W).attr("y", a + 4).attr("font-family", "sans-serif").attr("font-size", G).attr("text-anchor", "middle").attr("class", "sequenceNumber").text(x);
3817
+ }
3818
+ }, "drawMessage"), Jr = /* @__PURE__ */ g(function(e, t, a, r, i, n, s) {
3819
+ let o = 0, u = 0, T, h = 0;
3820
+ for (const x of r) {
3821
+ const E = t.get(x), L = E.box;
3822
+ T && T != L && (s || R.models.addBox(T), u += l.boxMargin + T.margin), L && L != T && (s || (L.x = o + u, L.y = i), u += L.margin), E.width = N.getMax(E.width || l.width, l.width), E.height = N.getMax(E.height || l.height, l.height), E.margin = E.margin || l.actorMargin, h = N.getMax(h, E.height), a.get(E.name) && (u += E.width / 2), E.x = o + u, E.starty = R.getVerticalPos(), R.insert(E.x, i, E.x + E.width, E.height), o += E.width + u, E.box && (E.box.width = o + L.margin - E.box.x), u = E.margin, T = E.box, R.models.addActor(E);
3823
+ }
3824
+ T && !s && R.models.addBox(T), R.bumpVerticalPos(h);
3825
+ }, "addActorRenderingData"), ae = /* @__PURE__ */ g(async function(e, t, a, r, i, n, s) {
3826
+ if (r) {
3827
+ let o = 0;
3828
+ R.bumpVerticalPos(l.boxMargin * 2);
3829
+ for (const u of a) {
3830
+ const T = t.get(u);
3831
+ T.stopy || (T.stopy = R.getVerticalPos());
3832
+ const h = await H.drawActor(e, T, l, !0, i, n, s);
3833
+ o = N.getMax(o, h);
3834
+ }
3835
+ R.bumpVerticalPos(o + l.boxMargin);
3836
+ } else
3837
+ for (const o of a) {
3838
+ const u = t.get(o);
3839
+ await H.drawActor(e, u, l, !1, i, n, s);
3840
+ }
3841
+ }, "drawActors"), ze = /* @__PURE__ */ g(function(e, t, a, r) {
3842
+ let i = 0, n = 0;
3843
+ for (const s of a) {
3844
+ const o = t.get(s), u = Zr(o), T = H.drawPopup(e, o, u, l, l.forceMenus, r);
3845
+ T.height > i && (i = T.height), T.width + o.x > n && (n = T.width + o.x);
3846
+ }
3847
+ return {
3848
+ maxHeight: i,
3849
+ maxWidth: n
3850
+ };
3851
+ }, "drawActorsPopup"), Ue = /* @__PURE__ */ g(function(e) {
3852
+ or(l, e), e.fontFamily && (l.actorFontFamily = l.noteFontFamily = l.messageFontFamily = e.fontFamily), e.fontSize && (l.actorFontSize = l.noteFontSize = l.messageFontSize = e.fontSize), e.fontWeight && (l.actorFontWeight = l.noteFontWeight = l.messageFontWeight = e.fontWeight);
3853
+ }, "setConf"), zt = /* @__PURE__ */ g(function(e) {
3854
+ return R.activations.filter(function(t) {
3855
+ return t.actor === e;
3856
+ });
3857
+ }, "actorActivations"), Me = /* @__PURE__ */ g(function(e, t) {
3858
+ const a = t.get(e), r = zt(e);
3859
+ return [r.reduce(function(i, n) {
3860
+ return N.getMin(i, n.startx);
3861
+ }, a.x + a.width / 2 - 1), r.reduce(function(i, n) {
3862
+ return N.getMax(i, n.stopx);
3863
+ }, a.x + a.width / 2 + 1)];
3864
+ }, "activationBounds");
3865
+ function dt(e, t, a, r, i) {
3866
+ R.bumpVerticalPos(a);
3867
+ let n = r;
3868
+ if (t.id && t.message && e[t.id]) {
3869
+ const s = e[t.id].width, o = Rt(l);
3870
+ t.message = Z.wrapLabel(`[${t.message}]`, s - 2 * l.wrapPadding, o), t.width = s, t.wrap = !0;
3871
+ const u = Z.calculateTextDimensions(t.message, o), T = N.getMax(u.height, l.labelBoxHeight);
3872
+ n = r + T, st.debug(`${T} - ${t.message}`);
3873
+ }
3874
+ i(t), R.bumpVerticalPos(n);
3875
+ }
3876
+ g(dt, "adjustLoopHeightForWrap");
3877
+ function Ge(e, t, a, r, i, n, s) {
3878
+ function o(h, x) {
3879
+ h.x < i.get(e.from).x ? (R.insert(t.stopx - x, t.starty, t.startx, t.stopy + h.height / 2 + l.noteMargin), t.stopx = t.stopx + x) : (R.insert(t.startx, t.starty, t.stopx + x, t.stopy + h.height / 2 + l.noteMargin), t.stopx = t.stopx - x);
3880
+ }
3881
+ g(o, "receiverAdjustment");
3882
+ function u(h, x) {
3883
+ h.x < i.get(e.to).x ? (R.insert(t.startx - x, t.starty, t.stopx, t.stopy + h.height / 2 + l.noteMargin), t.startx = t.startx + x) : (R.insert(t.stopx, t.starty, t.startx + x, t.stopy + h.height / 2 + l.noteMargin), t.startx = t.startx - x);
3884
+ }
3885
+ g(u, "senderAdjustment");
3886
+ const T = [
3887
+ Wt.ACTOR,
3888
+ Wt.CONTROL,
3889
+ Wt.ENTITY,
3890
+ Wt.DATABASE
3891
+ ];
3892
+ if (n.get(e.to) == r) {
3893
+ const h = i.get(e.to);
3894
+ o(h, T.includes(h.type) ? It / 2 + 3 : h.width / 2 + 3), h.starty = a - h.height / 2, R.bumpVerticalPos(h.height / 2);
3895
+ } else if (s.get(e.from) == r) {
3896
+ const h = i.get(e.from);
3897
+ l.mirrorActors && u(h, T.includes(h.type) ? It / 2 : h.width / 2), h.stopy = a - h.height / 2, R.bumpVerticalPos(h.height / 2);
3898
+ } else if (s.get(e.to) == r) {
3899
+ const h = i.get(e.to);
3900
+ l.mirrorActors && o(h, T.includes(h.type) ? It / 2 + 3 : h.width / 2 + 3), h.stopy = a - h.height / 2, R.bumpVerticalPos(h.height / 2);
3901
+ }
3902
+ }
3903
+ g(Ge, "adjustCreatedDestroyedData");
3904
+ var Qr = /* @__PURE__ */ g(async function(e, t, a, r) {
3905
+ const { securityLevel: i, sequence: n, look: s, themeVariables: o } = tt();
3906
+ l = n;
3907
+ let u;
3908
+ i === "sandbox" && (u = Vt("#i" + t));
3909
+ const T = i === "sandbox" ? Vt(u.nodes()[0].contentDocument.body) : Vt("body"), h = i === "sandbox" ? u.nodes()[0].contentDocument : document;
3910
+ R.init(), st.debug(r.db);
3911
+ const x = i === "sandbox" ? T.select(`[id="${t}"]`) : Vt(`[id="${t}"]`), E = r.db.getActors(), L = r.db.getCreatedActors(), p = r.db.getDestroyedActors(), _ = r.db.getBoxes();
3912
+ let f = r.db.getActorKeys();
3913
+ const I = r.db.getMessages(), O = r.db.getDiagramTitle(), b = r.db.hasAtLeastOneBox(), A = r.db.hasAtLeastOneBoxWithTitle(), P = await Xe(E, I, r);
3914
+ if (l.height = await Je(E, P, _), H.insertComputerIcon(x, t), H.insertDatabaseIcon(x, t), H.insertClockIcon(x, t), b && (R.bumpVerticalPos(l.boxMargin), A && R.bumpVerticalPos(_[0].textMaxHeight)), l.hideUnusedParticipants === !0) {
3915
+ const m = /* @__PURE__ */ new Set();
3916
+ I.forEach((w) => {
3917
+ m.add(w.from), m.add(w.to);
3918
+ }), f = f.filter((w) => m.has(w));
3919
+ }
3920
+ const k = new Map(f.map((m, w) => [E.get(m)?.name ?? m, w]));
3921
+ Jr(x, E, L, f, 0, I, !1);
3922
+ const C = await sa(I, E, P, r);
3923
+ H.insertArrowHead(x, t), H.insertArrowCrossHead(x, t), H.insertArrowFilledHead(x, t), H.insertSequenceNumber(x, t), H.insertSolidTopArrowHead(x, t), H.insertSolidBottomArrowHead(x, t), H.insertStickTopArrowHead(x, t), H.insertStickBottomArrowHead(x, t), s === "neo" && H.insertDropShadow(x, l);
3924
+ function W(m, w) {
3925
+ const ht = R.endActivation(m);
3926
+ ht.starty + 18 > w && (ht.starty = w - 6, w += 12), H.drawActivation(x, ht, w, l, zt(m.from).length, r, k), R.insert(ht.startx, w - 10, ht.stopx, w);
3927
+ }
3928
+ g(W, "activeEnd");
3929
+ let K = 1, U = 1;
3930
+ const G = [], J = [];
3931
+ let nt = 0;
3932
+ for (const m of I) {
3933
+ let w, ht, at;
3934
+ switch (m.type) {
3935
+ case r.db.LINETYPE.NOTE:
3936
+ R.resetVerticalPos(), ht = m.noteModel, await Gr(x, ht, m.id);
3937
+ break;
3938
+ case r.db.LINETYPE.ACTIVE_START:
3939
+ R.newActivation(m, x, E);
3940
+ break;
3941
+ case r.db.LINETYPE.CENTRAL_CONNECTION:
3942
+ R.newActivation(m, x, E);
3943
+ break;
3944
+ case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:
3945
+ R.newActivation(m, x, E);
3946
+ break;
3947
+ case r.db.LINETYPE.ACTIVE_END:
3948
+ W(m, R.getVerticalPos());
3949
+ break;
3950
+ case r.db.LINETYPE.LOOP_START:
3951
+ dt(C, m, l.boxMargin, l.boxMargin + l.boxTextMargin, (F) => R.newLoop(F));
3952
+ break;
3953
+ case r.db.LINETYPE.LOOP_END:
3954
+ w = R.endLoop(), await H.drawLoop(x, w, "loop", l, m), R.bumpVerticalPos(w.stopy - R.getVerticalPos()), R.models.addLoop(w);
3955
+ break;
3956
+ case r.db.LINETYPE.RECT_START:
3957
+ dt(C, m, l.boxMargin, l.boxMargin, (F) => {
3958
+ let Ot = F.message;
3959
+ Ot || (Ot = o?.rectBkgColor || o?.actorBkg || "rgba(128, 128, 128, 0.5)"), R.newLoop(void 0, Ot);
3960
+ });
3961
+ break;
3962
+ case r.db.LINETYPE.RECT_END:
3963
+ w = R.endLoop(), J.push(w), R.models.addLoop(w), R.bumpVerticalPos(w.stopy - R.getVerticalPos());
3964
+ break;
3965
+ case r.db.LINETYPE.OPT_START:
3966
+ dt(C, m, l.boxMargin, l.boxMargin + l.boxTextMargin, (F) => R.newLoop(F));
3967
+ break;
3968
+ case r.db.LINETYPE.OPT_END:
3969
+ w = R.endLoop(), await H.drawLoop(x, w, "opt", l, m), R.bumpVerticalPos(w.stopy - R.getVerticalPos()), R.models.addLoop(w);
3970
+ break;
3971
+ case r.db.LINETYPE.ALT_START:
3972
+ dt(C, m, l.boxMargin, l.boxMargin + l.boxTextMargin, (F) => R.newLoop(F));
3973
+ break;
3974
+ case r.db.LINETYPE.ALT_ELSE:
3975
+ dt(C, m, l.boxMargin + l.boxTextMargin, l.boxMargin, (F) => R.addSectionToLoop(F));
3976
+ break;
3977
+ case r.db.LINETYPE.ALT_END:
3978
+ w = R.endLoop(), await H.drawLoop(x, w, "alt", l, m), R.bumpVerticalPos(w.stopy - R.getVerticalPos()), R.models.addLoop(w);
3979
+ break;
3980
+ case r.db.LINETYPE.PAR_START:
3981
+ case r.db.LINETYPE.PAR_OVER_START:
3982
+ dt(C, m, l.boxMargin, l.boxMargin + l.boxTextMargin, (F) => R.newLoop(F)), R.saveVerticalPos();
3983
+ break;
3984
+ case r.db.LINETYPE.PAR_AND:
3985
+ dt(C, m, l.boxMargin + l.boxTextMargin, l.boxMargin, (F) => R.addSectionToLoop(F));
3986
+ break;
3987
+ case r.db.LINETYPE.PAR_END:
3988
+ w = R.endLoop(), await H.drawLoop(x, w, "par", l, m), R.bumpVerticalPos(w.stopy - R.getVerticalPos()), R.models.addLoop(w);
3989
+ break;
3990
+ case r.db.LINETYPE.AUTONUMBER:
3991
+ K = m.message.start || K, U = m.message.step || U, m.message.visible ? r.db.enableSequenceNumbers() : r.db.disableSequenceNumbers();
3992
+ break;
3993
+ case r.db.LINETYPE.CRITICAL_START:
3994
+ dt(C, m, l.boxMargin, l.boxMargin + l.boxTextMargin, (F) => R.newLoop(F));
3995
+ break;
3996
+ case r.db.LINETYPE.CRITICAL_OPTION:
3997
+ dt(C, m, l.boxMargin + l.boxTextMargin, l.boxMargin, (F) => R.addSectionToLoop(F));
3998
+ break;
3999
+ case r.db.LINETYPE.CRITICAL_END:
4000
+ w = R.endLoop(), await H.drawLoop(x, w, "critical", l, m), R.bumpVerticalPos(w.stopy - R.getVerticalPos()), R.models.addLoop(w);
4001
+ break;
4002
+ case r.db.LINETYPE.BREAK_START:
4003
+ dt(C, m, l.boxMargin, l.boxMargin + l.boxTextMargin, (F) => R.newLoop(F));
4004
+ break;
4005
+ case r.db.LINETYPE.BREAK_END:
4006
+ w = R.endLoop(), await H.drawLoop(x, w, "break", l, m), R.bumpVerticalPos(w.stopy - R.getVerticalPos()), R.models.addLoop(w);
4007
+ break;
4008
+ default:
4009
+ try {
4010
+ at = m.msgModel, at.starty = R.getVerticalPos(), at.sequenceIndex = K, at.sequenceVisible = r.db.showSequenceNumbers(), at.id = m.id, at.from = m.from, at.to = m.to;
4011
+ const F = await He(x, at);
4012
+ Ge(m, at, F, nt, E, L, p), G.push({
4013
+ messageModel: at,
4014
+ lineStartY: F,
4015
+ msg: m
4016
+ }), R.models.addMessage(at);
4017
+ } catch (F) {
4018
+ st.error("error while drawing message", F);
4019
+ }
4020
+ }
4021
+ [
4022
+ r.db.LINETYPE.SOLID_OPEN,
4023
+ r.db.LINETYPE.DOTTED_OPEN,
4024
+ r.db.LINETYPE.SOLID,
4025
+ r.db.LINETYPE.SOLID_TOP,
4026
+ r.db.LINETYPE.SOLID_BOTTOM,
4027
+ r.db.LINETYPE.STICK_TOP,
4028
+ r.db.LINETYPE.STICK_BOTTOM,
4029
+ r.db.LINETYPE.SOLID_TOP_DOTTED,
4030
+ r.db.LINETYPE.SOLID_BOTTOM_DOTTED,
4031
+ r.db.LINETYPE.STICK_TOP_DOTTED,
4032
+ r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4033
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4034
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
4035
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4036
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4037
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4038
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4039
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4040
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4041
+ r.db.LINETYPE.DOTTED,
4042
+ r.db.LINETYPE.SOLID_CROSS,
4043
+ r.db.LINETYPE.DOTTED_CROSS,
4044
+ r.db.LINETYPE.SOLID_POINT,
4045
+ r.db.LINETYPE.DOTTED_POINT,
4046
+ r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4047
+ r.db.LINETYPE.BIDIRECTIONAL_DOTTED
4048
+ ].includes(m.type) && (K = Math.round((K + U) * 100) / 100), nt++;
4049
+ }
4050
+ st.debug("createdActors", L), st.debug("destroyedActors", p), await ae(x, E, f, !1, t, r, k);
4051
+ for (const m of G) await Xr(x, m.messageModel, m.lineStartY, r, m.msg, t);
4052
+ l.mirrorActors && await ae(x, E, f, !0, t, r, k), J.forEach((m) => H.drawBackgroundRect(x, m)), Ke(x, E, f, l);
4053
+ for (const m of R.models.boxes) {
4054
+ m.height = R.getVerticalPos() - m.y, R.insert(m.x, m.y, m.x + m.width, m.height);
4055
+ const w = l.boxMargin * 2;
4056
+ m.startx = m.x - w, m.starty = m.y - w * 0.25, m.stopx = m.startx + m.width + 2 * w, m.stopy = m.starty + m.height + w * 0.75, m.stroke = "rgb(0,0,0, 0.5)", H.drawBox(x, m, l);
4057
+ }
4058
+ b && R.bumpVerticalPos(l.boxMargin);
4059
+ const et = ze(x, E, f, h), { bounds: z } = R.getBounds();
4060
+ z.startx === void 0 && (z.startx = 0), z.starty === void 0 && (z.starty = 0), z.stopx === void 0 && (z.stopx = 0), z.stopy === void 0 && (z.stopy = 0);
4061
+ let it = z.stopy - z.starty;
4062
+ it < et.maxHeight && (it = et.maxHeight);
4063
+ let rt = it + 2 * l.diagramMarginY;
4064
+ l.mirrorActors && (rt = rt - l.boxMargin + l.bottomMarginAdj);
4065
+ let Y = z.stopx - z.startx;
4066
+ Y < et.maxWidth && (Y = et.maxWidth);
4067
+ const D = Y + 2 * l.diagramMarginX;
4068
+ O && x.append("text").text(O).attr("x", (z.stopx - z.startx) / 2 - 2 * l.diagramMarginX).attr("y", -25), nr(x, rt, D, l.useMaxWidth);
4069
+ const At = O ? 40 : 0, kt = E.size && s === "neo" ? 30 : 0;
4070
+ x.attr("viewBox", z.startx - l.diagramMarginX + " -" + (l.diagramMarginY + At) + " " + D + " " + (rt + At + kt)), st.debug("models:", R.models);
4071
+ }, "draw");
4072
+ async function Xe(e, t, a) {
4073
+ const r = {};
4074
+ for (const i of t) if (e.get(i.to) && e.get(i.from)) {
4075
+ const n = e.get(i.to);
4076
+ if (i.placement === a.db.PLACEMENT.LEFTOF && !n.prevActor || i.placement === a.db.PLACEMENT.RIGHTOF && !n.nextActor) continue;
4077
+ const s = i.placement !== void 0, o = !s, u = s ? bt(l) : Rt(l), T = i.wrap ? Z.wrapLabel(i.message, l.width - 2 * l.wrapPadding, u) : i.message, h = ($(T) ? await Pt(i.message, tt()) : Z.calculateTextDimensions(T, u)).width + 2 * l.wrapPadding;
4078
+ o && i.from === n.nextActor ? r[i.to] = N.getMax(r[i.to] || 0, h) : o && i.from === n.prevActor ? r[i.from] = N.getMax(r[i.from] || 0, h) : o && i.from === i.to ? (r[i.from] = N.getMax(r[i.from] || 0, h / 2), r[i.to] = N.getMax(r[i.to] || 0, h / 2)) : i.placement === a.db.PLACEMENT.RIGHTOF ? r[i.from] = N.getMax(r[i.from] || 0, h) : i.placement === a.db.PLACEMENT.LEFTOF ? r[n.prevActor] = N.getMax(r[n.prevActor] || 0, h) : i.placement === a.db.PLACEMENT.OVER && (n.prevActor && (r[n.prevActor] = N.getMax(r[n.prevActor] || 0, h / 2)), n.nextActor && (r[i.from] = N.getMax(r[i.from] || 0, h / 2)));
4079
+ }
4080
+ return st.debug("maxMessageWidthPerActor:", r), r;
4081
+ }
4082
+ g(Xe, "getMaxMessageWidthPerActor");
4083
+ var Zr = /* @__PURE__ */ g(function(e) {
4084
+ let t = 0;
4085
+ const a = re(l);
4086
+ for (const r in e.links) {
4087
+ const i = Z.calculateTextDimensions(r, a).width + 2 * l.wrapPadding + 2 * l.boxMargin;
4088
+ t < i && (t = i);
4089
+ }
4090
+ return t;
4091
+ }, "getRequiredPopupWidth");
4092
+ async function Je(e, t, a) {
4093
+ let r = 0;
4094
+ for (const n of e.keys()) {
4095
+ const s = e.get(n);
4096
+ s.wrap && (s.description = Z.wrapLabel(s.description, l.width - 2 * l.wrapPadding, re(l)));
4097
+ const o = $(s.description) ? await Pt(s.description, tt()) : Z.calculateTextDimensions(s.description, re(l));
4098
+ s.width = s.wrap ? l.width : N.getMax(l.width, o.width + 2 * l.wrapPadding), s.height = s.wrap ? N.getMax(o.height, l.height) : l.height, r = N.getMax(r, s.height);
4099
+ }
4100
+ for (const n in t) {
4101
+ const s = e.get(n);
4102
+ if (!s) continue;
4103
+ const o = e.get(s.nextActor);
4104
+ if (!o) {
4105
+ const T = t[n] + l.actorMargin - s.width / 2;
4106
+ s.margin = N.getMax(T, l.actorMargin);
4107
+ continue;
4108
+ }
4109
+ const u = t[n] + l.actorMargin - s.width / 2 - o.width / 2;
4110
+ s.margin = N.getMax(u, l.actorMargin);
4111
+ }
4112
+ let i = 0;
4113
+ return a.forEach((n) => {
4114
+ const s = Rt(l);
4115
+ let o = n.actorKeys.reduce((x, E) => x += e.get(E).width + (e.get(E).margin || 0), 0);
4116
+ const u = l.boxMargin * 8;
4117
+ o += u, o -= 2 * l.boxTextMargin, n.wrap && (n.name = Z.wrapLabel(n.name, o - 2 * l.wrapPadding, s));
4118
+ const T = Z.calculateTextDimensions(n.name, s);
4119
+ i = N.getMax(T.height, i);
4120
+ const h = N.getMax(o, T.width + 2 * l.wrapPadding);
4121
+ if (n.margin = l.boxTextMargin, o < h) {
4122
+ const x = (h - o) / 2;
4123
+ n.margin += x;
4124
+ }
4125
+ }), a.forEach((n) => n.textMaxHeight = i), N.getMax(r, l.height);
4126
+ }
4127
+ g(Je, "calculateActorMargins");
4128
+ var $r = /* @__PURE__ */ g(async function(e, t, a) {
4129
+ const r = t.get(e.from), i = t.get(e.to), n = r.x, s = i.x, o = e.wrap && e.message;
4130
+ let u = $(e.message) ? await Pt(e.message, tt()) : Z.calculateTextDimensions(o ? Z.wrapLabel(e.message, l.width, bt(l)) : e.message, bt(l));
4131
+ const T = {
4132
+ width: o ? l.width : N.getMax(l.width, u.width + 2 * l.noteMargin),
4133
+ height: 0,
4134
+ startx: r.x,
4135
+ stopx: 0,
4136
+ starty: 0,
4137
+ stopy: 0,
4138
+ message: e.message
4139
+ };
4140
+ return e.placement === a.db.PLACEMENT.RIGHTOF ? (T.width = o ? N.getMax(l.width, u.width) : N.getMax(r.width / 2 + i.width / 2, u.width + 2 * l.noteMargin), T.startx = n + (r.width + l.actorMargin) / 2) : e.placement === a.db.PLACEMENT.LEFTOF ? (T.width = o ? N.getMax(l.width, u.width + 2 * l.noteMargin) : N.getMax(r.width / 2 + i.width / 2, u.width + 2 * l.noteMargin), T.startx = n - T.width + (r.width - l.actorMargin) / 2) : e.to === e.from ? (u = Z.calculateTextDimensions(o ? Z.wrapLabel(e.message, N.getMax(l.width, r.width), bt(l)) : e.message, bt(l)), T.width = o ? N.getMax(l.width, r.width) : N.getMax(r.width, l.width, u.width + 2 * l.noteMargin), T.startx = n + (r.width - T.width) / 2) : (T.width = Math.abs(n + r.width / 2 - (s + i.width / 2)) + l.actorMargin, T.startx = n < s ? n + r.width / 2 - l.actorMargin / 2 : s + i.width / 2 - l.actorMargin / 2), o && (T.message = Z.wrapLabel(e.message, T.width - 2 * l.wrapPadding, bt(l))), st.debug(`NM:[${T.startx},${T.stopx},${T.starty},${T.stopy}:${T.width},${T.height}=${e.message}]`), T;
4141
+ }, "buildNoteModel"), jr = 4, ta = 6, te = /* @__PURE__ */ g(function(e, t) {
4142
+ const { CENTRAL_CONNECTION: a, CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i } = t.db.LINETYPE;
4143
+ return [
4144
+ a,
4145
+ r,
4146
+ i
4147
+ ].includes(e.centralConnection);
4148
+ }, "hasCentralConnection"), ea = /* @__PURE__ */ g(function(e, t, a) {
4149
+ const { CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i, BIDIRECTIONAL_SOLID: n, BIDIRECTIONAL_DOTTED: s } = t.db.LINETYPE;
4150
+ let o = 0;
4151
+ return (e.centralConnection === r || e.centralConnection === i) && (o += jr), (e.centralConnection === r || e.centralConnection === i) && (e.type === n || e.type === s) && (o += a ? 0 : -ta), o;
4152
+ }, "calculateCentralConnectionOffset"), Qe = /* @__PURE__ */ g(function(e, t) {
4153
+ const { SOLID_ARROW_TOP_REVERSE: a, SOLID_ARROW_TOP_REVERSE_DOTTED: r, SOLID_ARROW_BOTTOM_REVERSE: i, SOLID_ARROW_BOTTOM_REVERSE_DOTTED: n, STICK_ARROW_TOP_REVERSE: s, STICK_ARROW_TOP_REVERSE_DOTTED: o, STICK_ARROW_BOTTOM_REVERSE: u, STICK_ARROW_BOTTOM_REVERSE_DOTTED: T } = t.db.LINETYPE;
4154
+ return [
4155
+ a,
4156
+ r,
4157
+ i,
4158
+ n,
4159
+ s,
4160
+ o,
4161
+ u,
4162
+ T
4163
+ ].includes(e.type);
4164
+ }, "isReverseArrowType"), ra = /* @__PURE__ */ g(function(e, t) {
4165
+ const { BIDIRECTIONAL_SOLID: a, BIDIRECTIONAL_DOTTED: r } = t.db.LINETYPE;
4166
+ return [a, r].includes(e.type);
4167
+ }, "isBidirectionalArrowType"), aa = /* @__PURE__ */ g(function(e, t, a) {
4168
+ const { look: r } = tt();
4169
+ if (![
4170
+ a.db.LINETYPE.SOLID_OPEN,
4171
+ a.db.LINETYPE.DOTTED_OPEN,
4172
+ a.db.LINETYPE.SOLID,
4173
+ a.db.LINETYPE.SOLID_TOP,
4174
+ a.db.LINETYPE.SOLID_BOTTOM,
4175
+ a.db.LINETYPE.STICK_TOP,
4176
+ a.db.LINETYPE.STICK_BOTTOM,
4177
+ a.db.LINETYPE.SOLID_TOP_DOTTED,
4178
+ a.db.LINETYPE.SOLID_BOTTOM_DOTTED,
4179
+ a.db.LINETYPE.STICK_TOP_DOTTED,
4180
+ a.db.LINETYPE.STICK_BOTTOM_DOTTED,
4181
+ a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4182
+ a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
4183
+ a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4184
+ a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4185
+ a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4186
+ a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4187
+ a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4188
+ a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4189
+ a.db.LINETYPE.DOTTED,
4190
+ a.db.LINETYPE.SOLID_CROSS,
4191
+ a.db.LINETYPE.DOTTED_CROSS,
4192
+ a.db.LINETYPE.SOLID_POINT,
4193
+ a.db.LINETYPE.DOTTED_POINT,
4194
+ a.db.LINETYPE.BIDIRECTIONAL_SOLID,
4195
+ a.db.LINETYPE.BIDIRECTIONAL_DOTTED
4196
+ ].includes(e.type)) return {};
4197
+ const [i, n] = Me(e.from, t), [s, o] = Me(e.to, t), u = i <= s;
4198
+ let T = u ? n : i, h = u ? s : o;
4199
+ r === "neo" && (e.type !== a.db.LINETYPE.SOLID_OPEN && (h += u ? -3 : 3), (e.type === a.db.LINETYPE.BIDIRECTIONAL_SOLID || e.type === a.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (T += u ? 3 : -3)), T += ea(e, a, u);
4200
+ const x = Math.abs(s - o) > 2, E = /* @__PURE__ */ g((f) => u ? -f : f, "adjustValue");
4201
+ e.from === e.to ? h = T : (e.activate && !x && (h += E(l.activationWidth / 2 - 1)), [
4202
+ a.db.LINETYPE.SOLID_OPEN,
4203
+ a.db.LINETYPE.DOTTED_OPEN,
4204
+ a.db.LINETYPE.STICK_TOP,
4205
+ a.db.LINETYPE.STICK_BOTTOM,
4206
+ a.db.LINETYPE.STICK_TOP_DOTTED,
4207
+ a.db.LINETYPE.STICK_BOTTOM_DOTTED,
4208
+ a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4209
+ a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4210
+ a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4211
+ a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4212
+ a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4213
+ a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4214
+ a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4215
+ a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4216
+ ].includes(e.type) || (h += E(3)), [
4217
+ a.db.LINETYPE.BIDIRECTIONAL_SOLID,
4218
+ a.db.LINETYPE.BIDIRECTIONAL_DOTTED,
4219
+ a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4220
+ a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4221
+ a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4222
+ a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4223
+ ].includes(e.type) && (T -= E(3)));
4224
+ const L = [
4225
+ i,
4226
+ n,
4227
+ s,
4228
+ o
4229
+ ], p = Math.abs(T - h);
4230
+ e.wrap && e.message && (e.message = Z.wrapLabel(e.message, N.getMax(p + 2 * l.wrapPadding, l.width), Rt(l)));
4231
+ const _ = Z.calculateTextDimensions(e.message, Rt(l));
4232
+ return {
4233
+ width: N.getMax(e.wrap ? 0 : _.width + 2 * l.wrapPadding, p + 2 * l.wrapPadding, l.width),
4234
+ height: 0,
4235
+ startx: T,
4236
+ stopx: h,
4237
+ starty: 0,
4238
+ stopy: 0,
4239
+ message: e.message,
4240
+ type: e.type,
4241
+ wrap: e.wrap,
4242
+ fromBounds: Math.min.apply(null, L),
4243
+ toBounds: Math.max.apply(null, L)
4244
+ };
4245
+ }, "buildMessageModel"), sa = /* @__PURE__ */ g(async function(e, t, a, r) {
4246
+ const i = {}, n = [];
4247
+ let s, o, u;
4248
+ for (const T of e) {
4249
+ switch (T.type) {
4250
+ case r.db.LINETYPE.LOOP_START:
4251
+ case r.db.LINETYPE.ALT_START:
4252
+ case r.db.LINETYPE.OPT_START:
4253
+ case r.db.LINETYPE.PAR_START:
4254
+ case r.db.LINETYPE.PAR_OVER_START:
4255
+ case r.db.LINETYPE.CRITICAL_START:
4256
+ case r.db.LINETYPE.BREAK_START:
4257
+ n.push({
4258
+ id: T.id,
4259
+ msg: T.message,
4260
+ from: Number.MAX_SAFE_INTEGER,
4261
+ to: Number.MIN_SAFE_INTEGER,
4262
+ width: 0
4263
+ });
4264
+ break;
4265
+ case r.db.LINETYPE.ALT_ELSE:
4266
+ case r.db.LINETYPE.PAR_AND:
4267
+ case r.db.LINETYPE.CRITICAL_OPTION:
4268
+ T.message && (s = n.pop(), i[s.id] = s, i[T.id] = s, n.push(s));
4269
+ break;
4270
+ case r.db.LINETYPE.LOOP_END:
4271
+ case r.db.LINETYPE.ALT_END:
4272
+ case r.db.LINETYPE.OPT_END:
4273
+ case r.db.LINETYPE.PAR_END:
4274
+ case r.db.LINETYPE.CRITICAL_END:
4275
+ case r.db.LINETYPE.BREAK_END:
4276
+ s = n.pop(), i[s.id] = s;
4277
+ break;
4278
+ case r.db.LINETYPE.ACTIVE_START:
4279
+ {
4280
+ const h = t.get(T.from ? T.from : T.to.actor), x = zt(T.from ? T.from : T.to.actor).length, E = h.x + h.width / 2 + (x - 1) * l.activationWidth / 2, L = {
4281
+ startx: E,
4282
+ stopx: E + l.activationWidth,
4283
+ actor: T.from,
4284
+ enabled: !0
4285
+ };
4286
+ R.activations.push(L);
4287
+ }
4288
+ break;
4289
+ case r.db.LINETYPE.ACTIVE_END:
4290
+ {
4291
+ const h = R.activations.map((x) => x.actor).lastIndexOf(T.from);
4292
+ R.activations.splice(h, 1).splice(0, 1);
4293
+ }
4294
+ break;
4295
+ }
4296
+ T.placement !== void 0 ? (o = await $r(T, t, r), T.noteModel = o, n.forEach((h) => {
4297
+ s = h, s.from = N.getMin(s.from, o.startx), s.to = N.getMax(s.to, o.startx + o.width), s.width = N.getMax(s.width, Math.abs(s.from - s.to)) - l.labelBoxWidth;
4298
+ })) : (u = aa(T, t, r), T.msgModel = u, u.startx && u.stopx && n.length > 0 && n.forEach((h) => {
4299
+ if (s = h, u.startx === u.stopx) {
4300
+ const x = t.get(T.from), E = t.get(T.to);
4301
+ s.from = N.getMin(x.x - u.width / 2, x.x - x.width / 2, s.from), s.to = N.getMax(E.x + u.width / 2, E.x + x.width / 2, s.to), s.width = N.getMax(s.width, Math.abs(s.to - s.from)) - l.labelBoxWidth;
4302
+ } else
4303
+ s.from = N.getMin(u.startx, s.from), s.to = N.getMax(u.stopx, s.to), s.width = N.getMax(s.width, u.width) - l.labelBoxWidth;
4304
+ }));
4305
+ }
4306
+ return R.activations = [], st.debug("Loop type widths:", i), i;
4307
+ }, "calculateLoopBounds"), pa = {
4308
+ parser: _r,
4309
+ get db() {
4310
+ return new yr();
4311
+ },
4312
+ renderer: {
4313
+ bounds: R,
4314
+ drawActors: ae,
4315
+ drawActorsPopup: ze,
4316
+ setConf: Ue,
4317
+ draw: Qr
4318
+ },
4319
+ styles: Rr,
4320
+ init: /* @__PURE__ */ g((e) => {
4321
+ e.sequence || (e.sequence = {}), e.wrap && (e.sequence.wrap = e.wrap, er({ sequence: { wrap: e.wrap } }));
4322
+ }, "init")
4323
+ };
4324
+ export {
4325
+ pa as diagram
4326
+ };