@sme.up/ketchup2 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/dist/arc-CqG9Hxdf.cjs +1 -0
  2. package/dist/arc-Klgb378K.js +80 -0
  3. package/dist/architecture-YZFGNWBL-BRqToLcm.js +3 -0
  4. package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +1 -0
  5. package/dist/architectureDiagram-Q4EWVU46-JSjagcXX.cjs +36 -0
  6. package/dist/architectureDiagram-Q4EWVU46-u2vgZv3N.js +4057 -0
  7. package/dist/array-D8NZ46Ht.js +6 -0
  8. package/dist/array-Dxz0O8Q3.cjs +1 -0
  9. package/dist/assets/imageListAssets.d.ts +3 -1
  10. package/dist/assets/imageListAssets.d.ts.map +1 -1
  11. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  12. package/dist/basic-components/list/list-types.d.ts +0 -1
  13. package/dist/basic-components/list/list-types.d.ts.map +1 -1
  14. package/dist/basic-components/list/list.d.ts.map +1 -1
  15. package/dist/basic-components/notification/notification.assets.d.ts.map +1 -1
  16. package/dist/basic-components/select/select.d.ts.map +1 -1
  17. package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
  18. package/dist/blockDiagram-DXYQGD6D-BpB6_kTP.js +3033 -0
  19. package/dist/blockDiagram-DXYQGD6D-DlcDXSwH.cjs +132 -0
  20. package/dist/c4Diagram-AHTNJAMY-B5Z8nO1s.js +2961 -0
  21. package/dist/c4Diagram-AHTNJAMY-CX5IjREU.cjs +10 -0
  22. package/dist/channel-BY9Lkyz7.cjs +1 -0
  23. package/dist/channel-BqNr2cYO.js +5 -0
  24. package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +23 -0
  25. package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +1 -0
  26. package/dist/chunk-336JU56O-CuXRn1VH.cjs +1 -0
  27. package/dist/chunk-336JU56O-xKPgkG3O.js +49 -0
  28. package/dist/chunk-426QAEUC-Df31vuwu.cjs +1 -0
  29. package/dist/chunk-426QAEUC-JjFVHKYG.js +9 -0
  30. package/dist/chunk-4BX2VUAB-BW54-JWg.js +8 -0
  31. package/dist/chunk-4BX2VUAB-Qba52sxc.cjs +1 -0
  32. package/dist/chunk-4TB4RGXK-CKyHmNcP.js +3253 -0
  33. package/dist/chunk-4TB4RGXK-DdKJIFS5.cjs +206 -0
  34. package/dist/chunk-55IACEB6-Bu3k0Yz5.js +8 -0
  35. package/dist/chunk-55IACEB6-DPatBzu7.cjs +1 -0
  36. package/dist/chunk-5FUZZQ4R-2kdZJWq2.js +3638 -0
  37. package/dist/chunk-5FUZZQ4R-D_vnCbAb.cjs +62 -0
  38. package/dist/chunk-5PVQY5BW-C5U7sJAA.js +1299 -0
  39. package/dist/chunk-5PVQY5BW-CfQDYQZt.cjs +2 -0
  40. package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +1 -0
  41. package/dist/chunk-67CJDMHE-YMBkJcAO.js +23 -0
  42. package/dist/chunk-7N4EOEYR-C-GuhRgW.js +35 -0
  43. package/dist/chunk-7N4EOEYR-jNBQwvHx.cjs +1 -0
  44. package/dist/chunk-AA7GKIK3-B_ZB6dou.js +30 -0
  45. package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +1 -0
  46. package/dist/chunk-BSJP7CBP-CFzYPvgr.cjs +1 -0
  47. package/dist/chunk-BSJP7CBP-oNTXVRA7.js +82 -0
  48. package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +1 -0
  49. package/dist/chunk-CIAEETIT-XlxsAz-4.js +23 -0
  50. package/dist/chunk-D-IZpNpi.cjs +1 -0
  51. package/dist/chunk-EDXVE4YY-BZsJORf8.cjs +1 -0
  52. package/dist/chunk-EDXVE4YY-Bzf4FU3i.js +25 -0
  53. package/dist/chunk-ENJZ2VHE-BluGQPyl.js +560 -0
  54. package/dist/chunk-ENJZ2VHE-CwgVASaU.cjs +10 -0
  55. package/dist/{chunk-FMBD7UC4-C1wIcaJH.js → chunk-FMBD7UC4-CS9_r76V.cjs} +2 -6
  56. package/dist/chunk-FMBD7UC4-RRSc9jqt.js +5 -0
  57. package/dist/chunk-FOC6F5B3-DcZs851j.cjs +1 -0
  58. package/dist/chunk-FOC6F5B3-E9n6-juB.js +23 -0
  59. package/dist/chunk-ICPOFSXX-CoaJw-IT.cjs +122 -0
  60. package/dist/chunk-ICPOFSXX-Sn6LWD0k.js +3316 -0
  61. package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +94 -0
  62. package/dist/chunk-K5T4RW27-DY7TOEqa.js +16070 -0
  63. package/dist/chunk-KGLVRYIC-5OJpfQCj.js +23 -0
  64. package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +1 -0
  65. package/dist/chunk-LIHQZDEY-59I4-LWb.js +64 -0
  66. package/dist/chunk-LIHQZDEY-CrogR3nT.cjs +1 -0
  67. package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +1 -0
  68. package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +31 -0
  69. package/dist/chunk-OYMX7WX6-BCT45RPu.cjs +231 -0
  70. package/dist/chunk-OYMX7WX6-BQADsxYi.js +2014 -0
  71. package/dist/chunk-QZHKN3VN-Bx8I6l3c.js +15 -0
  72. package/dist/chunk-QZHKN3VN-CSMKL2rB.cjs +1 -0
  73. package/dist/chunk-U2HBQHQK-BZ3YFMXB.js +1879 -0
  74. package/dist/chunk-U2HBQHQK-D0AoQWxK.cjs +70 -0
  75. package/dist/chunk-WQLz0Won.js +20 -0
  76. package/dist/chunk-X2U36JSP-CY7mJR8m.js +67 -0
  77. package/dist/chunk-X2U36JSP-D1RYKjVc.cjs +1 -0
  78. package/dist/chunk-XPW4576I-BcWkx-AL.js +1146 -0
  79. package/dist/chunk-XPW4576I-D8Pp6a3j.cjs +32 -0
  80. package/dist/chunk-YZCP3GAM-9K9WNdyN.js +60 -0
  81. package/dist/chunk-YZCP3GAM-BmaAafMm.cjs +1 -0
  82. package/dist/chunk-ZZ45TVLE-AQQsnXy4.cjs +1 -0
  83. package/dist/chunk-ZZ45TVLE-CIYrdg-O.js +32 -0
  84. package/dist/classDiagram-6PBFFD2Q-B6betnLH.cjs +1 -0
  85. package/dist/classDiagram-6PBFFD2Q-XGxl_AeB.js +29 -0
  86. package/dist/classDiagram-v2-HSJHXN6E-CwayYG4G.js +29 -0
  87. package/dist/classDiagram-v2-HSJHXN6E-Dda8WDvn.cjs +1 -0
  88. package/dist/clone-Dn__H8fX.js +8 -0
  89. package/dist/clone-lShkT11Q.cjs +1 -0
  90. package/dist/components/image-list/components/image-list-command-panel.d.ts +15 -0
  91. package/dist/components/image-list/components/image-list-command-panel.d.ts.map +1 -0
  92. package/dist/components/image-list/components/image-list-command-trigger.d.ts +16 -0
  93. package/dist/components/image-list/components/image-list-command-trigger.d.ts.map +1 -0
  94. package/dist/components/image-list/components/image-list-filter-picker.d.ts +14 -0
  95. package/dist/components/image-list/components/image-list-filter-picker.d.ts.map +1 -0
  96. package/dist/components/image-list/components/image-list-h-strip.d.ts.map +1 -1
  97. package/dist/components/image-list/components/image-list-json-viewer.d.ts +11 -0
  98. package/dist/components/image-list/components/image-list-json-viewer.d.ts.map +1 -0
  99. package/dist/components/image-list/components/image-list-menu.d.ts.map +1 -1
  100. package/dist/components/image-list/components/image-list-navigation-picker.d.ts +6 -2
  101. package/dist/components/image-list/components/image-list-navigation-picker.d.ts.map +1 -1
  102. package/dist/components/image-list/components/image-list-sort-picker.d.ts +14 -0
  103. package/dist/components/image-list/components/image-list-sort-picker.d.ts.map +1 -0
  104. package/dist/components/image-list/components/image-list-v-strip.d.ts.map +1 -1
  105. package/dist/components/image-list/components/items/image-list-card-item.d.ts +5 -0
  106. package/dist/components/image-list/components/items/image-list-card-item.d.ts.map +1 -0
  107. package/dist/components/image-list/components/items/image-list-folder-item.d.ts.map +1 -1
  108. package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
  109. package/dist/components/image-list/components/menu-nav-item.d.ts.map +1 -1
  110. package/dist/components/image-list/components/navigation-modes/image-list-catalog.d.ts.map +1 -1
  111. package/dist/components/image-list/components/navigation-modes/image-list-explorer.d.ts.map +1 -1
  112. package/dist/components/image-list/components/navigation-modes/image-list-tree.d.ts.map +1 -1
  113. package/dist/components/image-list/components/strip-item.d.ts.map +1 -1
  114. package/dist/components/image-list/hooks/useCommandPickers.d.ts +13 -0
  115. package/dist/components/image-list/hooks/useCommandPickers.d.ts.map +1 -0
  116. package/dist/components/image-list/image-list-column-utils.d.ts +9 -0
  117. package/dist/components/image-list/image-list-column-utils.d.ts.map +1 -0
  118. package/dist/components/image-list/image-list-context.d.ts +5 -2
  119. package/dist/components/image-list/image-list-context.d.ts.map +1 -1
  120. package/dist/components/image-list/image-list-debug-utils.d.ts +13 -0
  121. package/dist/components/image-list/image-list-debug-utils.d.ts.map +1 -0
  122. package/dist/components/image-list/image-list-filter-context.d.ts +9 -0
  123. package/dist/components/image-list/image-list-filter-context.d.ts.map +1 -0
  124. package/dist/components/image-list/image-list-filter-utils.d.ts +12 -0
  125. package/dist/components/image-list/image-list-filter-utils.d.ts.map +1 -0
  126. package/dist/components/image-list/image-list-sort-context.d.ts +9 -0
  127. package/dist/components/image-list/image-list-sort-context.d.ts.map +1 -0
  128. package/dist/components/image-list/image-list-sort-utils.d.ts +13 -0
  129. package/dist/components/image-list/image-list-sort-utils.d.ts.map +1 -0
  130. package/dist/components/image-list/image-list-state-context.d.ts +5 -0
  131. package/dist/components/image-list/image-list-state-context.d.ts.map +1 -0
  132. package/dist/components/image-list/image-list-types.d.ts +45 -2
  133. package/dist/components/image-list/image-list-types.d.ts.map +1 -1
  134. package/dist/components/image-list/image-list-utils.d.ts +24 -1
  135. package/dist/components/image-list/image-list-utils.d.ts.map +1 -1
  136. package/dist/components/image-list/image-list.d.ts +1 -1
  137. package/dist/components/image-list/image-list.d.ts.map +1 -1
  138. package/dist/cose-bilkent-S5V4N54A-B30Rh9DR.js +2250 -0
  139. package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +1 -0
  140. package/dist/cytoscape.esm-CPjF_mSK.js +18100 -0
  141. package/dist/cytoscape.esm-CrBwLFXE.cjs +321 -0
  142. package/dist/dagre-BjnWDdkw.cjs +1 -0
  143. package/dist/dagre-DVLnxd7n.js +1606 -0
  144. package/dist/dagre-KV5264BT-BjqayRYC.js +293 -0
  145. package/dist/dagre-KV5264BT-BvInGAUC.cjs +4 -0
  146. package/dist/defaultLocale-Dcyuaxxg.js +201 -0
  147. package/dist/defaultLocale-DtzyZW63.cjs +1 -0
  148. package/dist/diagram-5BDNPKRD-Bk7depC0.js +101 -0
  149. package/dist/diagram-5BDNPKRD-D6EXksHo.cjs +10 -0
  150. package/dist/diagram-G4DWMVQ6-BkQnbCLv.js +524 -0
  151. package/dist/diagram-G4DWMVQ6-CJASbR70.cjs +24 -0
  152. package/dist/diagram-MMDJMWI5-DEt7jQx9.cjs +43 -0
  153. package/dist/diagram-MMDJMWI5-DUUVPi55.js +213 -0
  154. package/dist/diagram-TYMM5635-5auoAFCi.cjs +24 -0
  155. package/dist/diagram-TYMM5635-Cpj8wfoJ.js +133 -0
  156. package/dist/dist-BgvMZbfo.cjs +1 -0
  157. package/dist/dist-DL30VIBI.js +60 -0
  158. package/dist/erDiagram-SMLLAGMA-DVUT6TBy.cjs +85 -0
  159. package/dist/erDiagram-SMLLAGMA-D_ByPk0C.js +1700 -0
  160. package/dist/flatten-BE1bWL-7.js +40 -0
  161. package/dist/flatten-DxvYSoR8.cjs +1 -0
  162. package/dist/flowDiagram-DWJPFMVM-BWrkDnqc.js +4145 -0
  163. package/dist/flowDiagram-DWJPFMVM-BbK42NaF.cjs +162 -0
  164. package/dist/functional-components/action/action-types.d.ts +6 -1
  165. package/dist/functional-components/action/action-types.d.ts.map +1 -1
  166. package/dist/functional-components/action/action.d.ts.map +1 -1
  167. package/dist/ganttDiagram-T4ZO3ILL-DUi8jF9H.cjs +292 -0
  168. package/dist/ganttDiagram-T4ZO3ILL-LuaYkUvj.js +3077 -0
  169. package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +1 -0
  170. package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +3 -0
  171. package/dist/gitGraphDiagram-UUTBAWPF-D-tMWUQ1.cjs +106 -0
  172. package/dist/gitGraphDiagram-UUTBAWPF-DKkENwcV.js +728 -0
  173. package/dist/graphlib-Cpifseqb.js +373 -0
  174. package/dist/graphlib-HdfvGLpV.cjs +1 -0
  175. package/dist/hooks/useClickOutside.d.ts.map +1 -1
  176. package/dist/identity-KQSjemTb.cjs +1 -0
  177. package/dist/identity-g0dsMjx7.js +393 -0
  178. package/dist/info-OMHHGYJF-Bk0VWVNW.js +3 -0
  179. package/dist/info-OMHHGYJF-C8QtwF0k.cjs +1 -0
  180. package/dist/infoDiagram-42DDH7IO-CH5xHj8H.cjs +2 -0
  181. package/dist/infoDiagram-42DDH7IO-CLkQPFe0.js +19 -0
  182. package/dist/init-B2MubQrj.cjs +1 -0
  183. package/dist/init-BO60vQHJ.js +15 -0
  184. package/dist/isEmpty-CA3kJuev.cjs +1 -0
  185. package/dist/isEmpty-RwX-oIQS.js +35 -0
  186. package/dist/ishikawaDiagram-UXIWVN3A-Cl3Ivm8H.cjs +70 -0
  187. package/dist/ishikawaDiagram-UXIWVN3A-DqbVPChK.js +718 -0
  188. package/dist/journeyDiagram-VCZTEJTY-DudduR0c.js +883 -0
  189. package/dist/journeyDiagram-VCZTEJTY-XRc0J8gM.cjs +139 -0
  190. package/dist/kanban-definition-6JOO6SKY-Br87atRc.cjs +89 -0
  191. package/dist/kanban-definition-6JOO6SKY-DzEqE64J.js +973 -0
  192. package/dist/katex-Du5WiYIy.js +22000 -0
  193. package/dist/katex-SAH56fvc.cjs +257 -0
  194. package/dist/ketchup2.cjs.js +190 -1
  195. package/dist/ketchup2.css +2 -1
  196. package/dist/ketchup2.es.js +132419 -52
  197. package/dist/line-BbHmiwbs.cjs +1 -0
  198. package/dist/line-JyRBGWft.js +34 -0
  199. package/dist/linear-BsPvNLJv.js +289 -0
  200. package/dist/linear-CxHa1DsM.cjs +1 -0
  201. package/dist/mermaid-parser.core-CERDf-UG.js +69 -0
  202. package/dist/mermaid-parser.core-DHpvGOZR.cjs +3 -0
  203. package/dist/mindmap-definition-QFDTVHPH-BCq8zmLt.cjs +96 -0
  204. package/dist/mindmap-definition-QFDTVHPH-NGjPQ5SM.js +978 -0
  205. package/dist/ordinal-C-VoL0XF.js +65 -0
  206. package/dist/ordinal-Civr0hZL.cjs +1 -0
  207. package/dist/packet-4T2RLAQJ-X0BMsNFj.js +3 -0
  208. package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +1 -0
  209. package/dist/path-Civic7PQ.cjs +1 -0
  210. package/dist/path-CvfwEr8y.js +85 -0
  211. package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +3 -0
  212. package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +1 -0
  213. package/dist/pieDiagram-DEJITSTG-CK4xy0PS.cjs +30 -0
  214. package/dist/pieDiagram-DEJITSTG-DTeyzHmB.js +165 -0
  215. package/dist/quadrantDiagram-34T5L4WZ-CCcJIf91.js +1974 -0
  216. package/dist/quadrantDiagram-34T5L4WZ-D-_iiK79.cjs +7 -0
  217. package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +1 -0
  218. package/dist/radar-PYXPWWZC-DgZIW9Ah.js +3 -0
  219. package/dist/reduce-B7WW9rkU.cjs +1 -0
  220. package/dist/reduce-DNnkcf3M.js +532 -0
  221. package/dist/requirementDiagram-MS252O5E-BdOanuYe.js +2221 -0
  222. package/dist/requirementDiagram-MS252O5E-EfY029Xj.cjs +84 -0
  223. package/dist/rough.esm-1mqTSjCt.js +1352 -0
  224. package/dist/rough.esm-BLKo1fIQ.cjs +1 -0
  225. package/dist/sankeyDiagram-XADWPNL6-3jlM2UcU.cjs +10 -0
  226. package/dist/sankeyDiagram-XADWPNL6-3wviN_U4.js +920 -0
  227. package/dist/sequenceDiagram-FGHM5R23-DC8SjhFN.js +4157 -0
  228. package/dist/sequenceDiagram-FGHM5R23-lK1G3QLN.cjs +157 -0
  229. package/dist/src-BQiFKP24.js +2146 -0
  230. package/dist/src-DFxq-N5I.cjs +1 -0
  231. package/dist/stateDiagram-FHFEXIEX-DnkzFphf.js +217 -0
  232. package/dist/stateDiagram-FHFEXIEX-DsQigFuR.cjs +1 -0
  233. package/dist/stateDiagram-v2-QKLJ7IA2-2v8JiIJr.js +27 -0
  234. package/dist/stateDiagram-v2-QKLJ7IA2-UKKfWPoT.cjs +1 -0
  235. package/dist/timeline-definition-GMOUNBTQ-CBnYBWN0.js +1068 -0
  236. package/dist/timeline-definition-GMOUNBTQ-DWpngnE4.cjs +120 -0
  237. package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +1 -0
  238. package/dist/treeView-SZITEDCU-Df3xzFtO.js +3 -0
  239. package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +1 -0
  240. package/dist/treemap-W4RFUUIX-ClUtdSdn.js +3 -0
  241. package/dist/utils/translation.d.ts.map +1 -1
  242. package/dist/v4-6yr83DbP.cjs +1 -0
  243. package/dist/v4-BR71w5_q.js +33 -0
  244. package/dist/vennDiagram-DHZGUBPP-D-kj-sVU.cjs +34 -0
  245. package/dist/vennDiagram-DHZGUBPP-M-kkEkXj.js +1858 -0
  246. package/dist/wardley-RL74JXVD-BtHQbnUy.js +3 -0
  247. package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +1 -0
  248. package/dist/wardleyDiagram-NUSXRM2D-CUX1SYhw.js +578 -0
  249. package/dist/wardleyDiagram-NUSXRM2D-thoOuA_D.cjs +20 -0
  250. package/dist/xychartDiagram-5P7HB3ND-1cXRZ1bi.js +2044 -0
  251. package/dist/xychartDiagram-5P7HB3ND-BF2WmJ4-.cjs +7 -0
  252. package/package.json +31 -31
  253. package/dist/_basePickBy-CPekwY_Z.js +0 -151
  254. package/dist/_basePickBy-DDhgLyLp.cjs +0 -1
  255. package/dist/_baseUniq-CAhfZr5S.js +0 -614
  256. package/dist/_baseUniq-bLb2QO_4.cjs +0 -1
  257. package/dist/arc-CnmUepZA.cjs +0 -1
  258. package/dist/arc-Md6Ds0JZ.js +0 -83
  259. package/dist/architecture-7HQA4BMR-DLImbuCr.js +0 -6
  260. package/dist/architecture-7HQA4BMR-zD1jCFXs.cjs +0 -1
  261. package/dist/architectureDiagram-VXUJARFQ-BkTy7RJA.js +0 -4661
  262. package/dist/architectureDiagram-VXUJARFQ-Vl-ya9R6.cjs +0 -36
  263. package/dist/blockDiagram-VD42YOAC-C9AJNM79.js +0 -2256
  264. package/dist/blockDiagram-VD42YOAC-D_EmYywD.cjs +0 -122
  265. package/dist/c4Diagram-YG6GDRKO-BfwBYulK.cjs +0 -10
  266. package/dist/c4Diagram-YG6GDRKO-YW-l-SYp.js +0 -1580
  267. package/dist/channel-BGeX_R6w.cjs +0 -1
  268. package/dist/channel-lqmaHMPZ.js +0 -5
  269. package/dist/chunk-4BX2VUAB-C6nahV0u.cjs +0 -1
  270. package/dist/chunk-4BX2VUAB-UMbIiF-V.js +0 -8
  271. package/dist/chunk-55IACEB6-CH_wWg2p.js +0 -8
  272. package/dist/chunk-55IACEB6-Cxt8uWHb.cjs +0 -1
  273. package/dist/chunk-B4BG7PRW-CTNZzNh0.js +0 -1375
  274. package/dist/chunk-B4BG7PRW-ekpXKNa3.cjs +0 -165
  275. package/dist/chunk-DI55MBZ5-BrLh6Fue.js +0 -1370
  276. package/dist/chunk-DI55MBZ5-TYqUGYGr.cjs +0 -220
  277. package/dist/chunk-FMBD7UC4-D0Nmh8EL.cjs +0 -15
  278. package/dist/chunk-QN33PNHL-B91UelWj.js +0 -19
  279. package/dist/chunk-QN33PNHL-KGNgU1-8.cjs +0 -1
  280. package/dist/chunk-QZHKN3VN-IV7jnz-R.js +0 -15
  281. package/dist/chunk-QZHKN3VN-ajuovO9B.cjs +0 -1
  282. package/dist/chunk-TZMSLE5B-Bkf7U79o.cjs +0 -1
  283. package/dist/chunk-TZMSLE5B-DArsm2Pn.js +0 -64
  284. package/dist/classDiagram-2ON5EDUG-C0_Gqd5k.js +0 -16
  285. package/dist/classDiagram-2ON5EDUG-Cnous8-m.cjs +0 -1
  286. package/dist/classDiagram-v2-WZHVMYZB-C0_Gqd5k.js +0 -16
  287. package/dist/classDiagram-v2-WZHVMYZB-Cnous8-m.cjs +0 -1
  288. package/dist/clone-B_MxWhab.js +0 -8
  289. package/dist/clone-D6gFD6F-.cjs +0 -1
  290. package/dist/cose-bilkent-S5V4N54A-DHZ_jZYH.js +0 -2608
  291. package/dist/cose-bilkent-S5V4N54A-Da7jSuau.cjs +0 -1
  292. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  293. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  294. package/dist/dagre-6UL2VRFP-CI2ww-SU.js +0 -444
  295. package/dist/dagre-6UL2VRFP-qOR4yAIQ.cjs +0 -4
  296. package/dist/defaultLocale-D7EN2tov.js +0 -171
  297. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
  298. package/dist/diagram-PSM6KHXK-1g8345m3.js +0 -531
  299. package/dist/diagram-PSM6KHXK-DHWL3g5V.cjs +0 -24
  300. package/dist/diagram-QEK2KX5R-B-VP4dVY.js +0 -217
  301. package/dist/diagram-QEK2KX5R-DDWbMmAv.cjs +0 -43
  302. package/dist/diagram-S2PKOQOG-BbSGqLET.js +0 -142
  303. package/dist/diagram-S2PKOQOG-Djw9RGNh.cjs +0 -24
  304. package/dist/erDiagram-Q2GNP2WA-CxY1P4hJ.js +0 -841
  305. package/dist/erDiagram-Q2GNP2WA-Pw9i-eBN.cjs +0 -60
  306. package/dist/flowDiagram-NV44I4VS-BOr3T0H8.js +0 -1620
  307. package/dist/flowDiagram-NV44I4VS-D9VKU1cV.cjs +0 -162
  308. package/dist/ganttDiagram-JELNMOA3-B4T6J11z.js +0 -2670
  309. package/dist/ganttDiagram-JELNMOA3-C4Y4VT0h.cjs +0 -267
  310. package/dist/gitGraph-G5XIXVHT-C5QaeLIs.cjs +0 -1
  311. package/dist/gitGraph-G5XIXVHT-bOZ2ppp1.js +0 -6
  312. package/dist/gitGraphDiagram-V2S2FVAM-CteUW9ML.js +0 -699
  313. package/dist/gitGraphDiagram-V2S2FVAM-D_v6ae_z.cjs +0 -65
  314. package/dist/graph-BBPk5jyk.cjs +0 -1
  315. package/dist/graph-h6vsxKyr.js +0 -247
  316. package/dist/index-CYQM-t1d.cjs +0 -390
  317. package/dist/index-FiV1b00w.js +0 -133122
  318. package/dist/info-VBDWY6EO-BEIYBsnB.cjs +0 -1
  319. package/dist/info-VBDWY6EO-BQAW_660.js +0 -6
  320. package/dist/infoDiagram-HS3SLOUP-DMalb3kC.js +0 -24
  321. package/dist/infoDiagram-HS3SLOUP-Tepm6ygN.cjs +0 -2
  322. package/dist/init-CHZsXQcr.cjs +0 -1
  323. package/dist/init-DjUOC4st.js +0 -16
  324. package/dist/journeyDiagram-XKPGCS4Q-CzePcKne.cjs +0 -139
  325. package/dist/journeyDiagram-XKPGCS4Q-D0u-RLFV.js +0 -834
  326. package/dist/kanban-definition-3W4ZIXB7-BSCzAsMJ.js +0 -719
  327. package/dist/kanban-definition-3W4ZIXB7-DdbH9sci.cjs +0 -89
  328. package/dist/katex-C2g-EhzP.cjs +0 -261
  329. package/dist/katex-CUSbq6rG.js +0 -11692
  330. package/dist/layout-6z7-eUnZ.js +0 -1335
  331. package/dist/layout-DbcrMh5B.cjs +0 -1
  332. package/dist/linear-BKevCbhh.js +0 -259
  333. package/dist/linear-C7uVEtWW.cjs +0 -1
  334. package/dist/mermaid-parser.core-Cwy51n_e.js +0 -17907
  335. package/dist/mermaid-parser.core-DQ2yhapR.cjs +0 -160
  336. package/dist/mindmap-definition-VGOIOE7T-CcEisj0R.cjs +0 -68
  337. package/dist/mindmap-definition-VGOIOE7T-xp6GmSIx.js +0 -758
  338. package/dist/ordinal-B6-f3MAq.js +0 -61
  339. package/dist/ordinal-CagbB1m8.cjs +0 -1
  340. package/dist/packet-DYOGHKS2-BGgwnMhM.js +0 -6
  341. package/dist/packet-DYOGHKS2-BWg8qxI8.cjs +0 -1
  342. package/dist/pie-VRWISCQL-DhM8CUW4.cjs +0 -1
  343. package/dist/pie-VRWISCQL-DrWIWm7W.js +0 -6
  344. package/dist/pieDiagram-ADFJNKIX-BdvacM-Z.cjs +0 -30
  345. package/dist/pieDiagram-ADFJNKIX-D6Fa7W_r.js +0 -161
  346. package/dist/quadrantDiagram-AYHSOK5B-CHMoSBvg.js +0 -1022
  347. package/dist/quadrantDiagram-AYHSOK5B-ddq5zZEg.cjs +0 -7
  348. package/dist/radar-ZZBFDIW7-CPvW4Njh.js +0 -6
  349. package/dist/radar-ZZBFDIW7-YJK72BlV.cjs +0 -1
  350. package/dist/requirementDiagram-UZGBJVZJ-Cr9HnGVO.js +0 -850
  351. package/dist/requirementDiagram-UZGBJVZJ-NdpzVbnf.cjs +0 -64
  352. package/dist/sankeyDiagram-TZEHDZUN-3f19WwKd.js +0 -810
  353. package/dist/sankeyDiagram-TZEHDZUN-D2Hzq4Kr.cjs +0 -10
  354. package/dist/sequenceDiagram-WL72ISMW-Cu-7V--6.js +0 -2511
  355. package/dist/sequenceDiagram-WL72ISMW-Nk6vhSK9.cjs +0 -145
  356. package/dist/stateDiagram-FKZM4ZOC-BSnDKUaW.cjs +0 -1
  357. package/dist/stateDiagram-FKZM4ZOC-BleTIniP.js +0 -263
  358. package/dist/stateDiagram-v2-4FDKWEC3-7EjW078x.js +0 -16
  359. package/dist/stateDiagram-v2-4FDKWEC3-BJPzO53y.cjs +0 -1
  360. package/dist/timeline-definition-IT6M3QCI-CFTjPpKy.js +0 -795
  361. package/dist/timeline-definition-IT6M3QCI-CfaGtuF2.cjs +0 -61
  362. package/dist/treemap-GDKQZRPO-CtDdEOaj.cjs +0 -1
  363. package/dist/treemap-GDKQZRPO-DlODAdQ2.js +0 -6
  364. package/dist/xychartDiagram-PRI3JC2R-mShGv2CD.cjs +0 -7
  365. package/dist/xychartDiagram-PRI3JC2R-vEJER5zT.js +0 -1340
@@ -0,0 +1,4157 @@
1
+ import { B as e, C as t, D as n, L as r, P as i, U as a, V as o, W as s, _ as c, a as l, b as u, c as d, i as f, k as p, r as m, s as h, v as g, y as _ } from "./chunk-ICPOFSXX-Sn6LWD0k.js";
2
+ import { g as v, h as y, p as b } from "./src-BQiFKP24.js";
3
+ import { t as x } from "./dist-DL30VIBI.js";
4
+ import { f as S, h as C } from "./chunk-5PVQY5BW-C5U7sJAA.js";
5
+ import { n as w, t as T } from "./chunk-XPW4576I-BcWkx-AL.js";
6
+ import { a as E, c as D, i as O, n as k, r as A, s as j } from "./chunk-YZCP3GAM-9K9WNdyN.js";
7
+ import { t as M } from "./chunk-QZHKN3VN-Bx8I6l3c.js";
8
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.mjs
9
+ var N = x(), P = (function() {
10
+ var e = /* @__PURE__ */ y(function(e, t, n, r) {
11
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
12
+ return n;
13
+ }, "o"), t = [1, 2], n = [1, 3], r = [1, 4], i = [2, 4], a = [1, 9], o = [1, 11], s = [1, 12], c = [1, 14], l = [1, 15], u = [1, 17], d = [1, 18], f = [1, 19], p = [1, 25], m = [1, 26], h = [1, 27], g = [1, 28], _ = [1, 29], v = [1, 30], b = [1, 31], x = [1, 32], S = [1, 33], C = [1, 34], w = [1, 35], T = [1, 36], E = [1, 37], D = [1, 38], O = [1, 39], k = [1, 40], A = [1, 42], j = [1, 43], M = [1, 44], N = [1, 45], P = [1, 46], F = [1, 47], I = [
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
+ ], L = [1, 74], ee = [1, 80], R = [1, 81], te = [1, 82], ne = [1, 83], z = [1, 84], B = [1, 85], V = [1, 86], re = [1, 87], H = [1, 88], U = [1, 89], W = [1, 90], ie = [1, 91], ae = [1, 92], oe = [1, 93], G = [1, 94], se = [1, 95], K = [1, 96], ce = [1, 97], le = [1, 98], ue = [1, 99], de = [1, 100], fe = [1, 101], pe = [1, 102], me = [1, 103], he = [1, 104], ge = [1, 105], _e = [2, 78], ve = [
50
+ 4,
51
+ 5,
52
+ 17,
53
+ 51,
54
+ 53,
55
+ 54
56
+ ], ye = [
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
+ ], be = [
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
+ ], xe = [
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
+ ], Ce = [5, 52], q = [
188
+ 70,
189
+ 71,
190
+ 72,
191
+ 73
192
+ ], J = [1, 151], we = {
193
+ trace: /* @__PURE__ */ y(function() {}, "trace"),
194
+ yy: {},
195
+ symbols_: {
196
+ error: 2,
197
+ start: 3,
198
+ SPACE: 4,
199
+ NEWLINE: 5,
200
+ SD: 6,
201
+ document: 7,
202
+ line: 8,
203
+ statement: 9,
204
+ INVALID: 10,
205
+ box_section: 11,
206
+ box_line: 12,
207
+ participant_statement: 13,
208
+ create: 14,
209
+ box: 15,
210
+ restOfLine: 16,
211
+ end: 17,
212
+ signal: 18,
213
+ autonumber: 19,
214
+ NUM: 20,
215
+ off: 21,
216
+ activate: 22,
217
+ actor: 23,
218
+ deactivate: 24,
219
+ note_statement: 25,
220
+ links_statement: 26,
221
+ link_statement: 27,
222
+ properties_statement: 28,
223
+ details_statement: 29,
224
+ title: 30,
225
+ legacy_title: 31,
226
+ acc_title: 32,
227
+ acc_title_value: 33,
228
+ acc_descr: 34,
229
+ acc_descr_value: 35,
230
+ acc_descr_multiline_value: 36,
231
+ loop: 37,
232
+ rect: 38,
233
+ opt: 39,
234
+ alt: 40,
235
+ else_sections: 41,
236
+ par: 42,
237
+ par_sections: 43,
238
+ par_over: 44,
239
+ critical: 45,
240
+ option_sections: 46,
241
+ break: 47,
242
+ option: 48,
243
+ and: 49,
244
+ else: 50,
245
+ participant: 51,
246
+ AS: 52,
247
+ participant_actor: 53,
248
+ destroy: 54,
249
+ actor_with_config: 55,
250
+ note: 56,
251
+ placement: 57,
252
+ text2: 58,
253
+ over: 59,
254
+ actor_pair: 60,
255
+ links: 61,
256
+ link: 62,
257
+ properties: 63,
258
+ details: 64,
259
+ spaceList: 65,
260
+ ",": 66,
261
+ left_of: 67,
262
+ right_of: 68,
263
+ signaltype: 69,
264
+ "+": 70,
265
+ "-": 71,
266
+ "()": 72,
267
+ ACTOR: 73,
268
+ config_object: 74,
269
+ CONFIG_START: 75,
270
+ CONFIG_CONTENT: 76,
271
+ CONFIG_END: 77,
272
+ SOLID_OPEN_ARROW: 78,
273
+ DOTTED_OPEN_ARROW: 79,
274
+ SOLID_ARROW: 80,
275
+ SOLID_ARROW_TOP: 81,
276
+ SOLID_ARROW_BOTTOM: 82,
277
+ STICK_ARROW_TOP: 83,
278
+ STICK_ARROW_BOTTOM: 84,
279
+ SOLID_ARROW_TOP_DOTTED: 85,
280
+ SOLID_ARROW_BOTTOM_DOTTED: 86,
281
+ STICK_ARROW_TOP_DOTTED: 87,
282
+ STICK_ARROW_BOTTOM_DOTTED: 88,
283
+ SOLID_ARROW_TOP_REVERSE: 89,
284
+ SOLID_ARROW_BOTTOM_REVERSE: 90,
285
+ STICK_ARROW_TOP_REVERSE: 91,
286
+ STICK_ARROW_BOTTOM_REVERSE: 92,
287
+ SOLID_ARROW_TOP_REVERSE_DOTTED: 93,
288
+ SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 94,
289
+ STICK_ARROW_TOP_REVERSE_DOTTED: 95,
290
+ STICK_ARROW_BOTTOM_REVERSE_DOTTED: 96,
291
+ BIDIRECTIONAL_SOLID_ARROW: 97,
292
+ DOTTED_ARROW: 98,
293
+ BIDIRECTIONAL_DOTTED_ARROW: 99,
294
+ SOLID_CROSS: 100,
295
+ DOTTED_CROSS: 101,
296
+ SOLID_POINT: 102,
297
+ DOTTED_POINT: 103,
298
+ TXT: 104,
299
+ $accept: 0,
300
+ $end: 1
301
+ },
302
+ terminals_: {
303
+ 2: "error",
304
+ 4: "SPACE",
305
+ 5: "NEWLINE",
306
+ 6: "SD",
307
+ 10: "INVALID",
308
+ 14: "create",
309
+ 15: "box",
310
+ 16: "restOfLine",
311
+ 17: "end",
312
+ 19: "autonumber",
313
+ 20: "NUM",
314
+ 21: "off",
315
+ 22: "activate",
316
+ 24: "deactivate",
317
+ 30: "title",
318
+ 31: "legacy_title",
319
+ 32: "acc_title",
320
+ 33: "acc_title_value",
321
+ 34: "acc_descr",
322
+ 35: "acc_descr_value",
323
+ 36: "acc_descr_multiline_value",
324
+ 37: "loop",
325
+ 38: "rect",
326
+ 39: "opt",
327
+ 40: "alt",
328
+ 42: "par",
329
+ 44: "par_over",
330
+ 45: "critical",
331
+ 47: "break",
332
+ 48: "option",
333
+ 49: "and",
334
+ 50: "else",
335
+ 51: "participant",
336
+ 52: "AS",
337
+ 53: "participant_actor",
338
+ 54: "destroy",
339
+ 56: "note",
340
+ 59: "over",
341
+ 61: "links",
342
+ 62: "link",
343
+ 63: "properties",
344
+ 64: "details",
345
+ 66: ",",
346
+ 67: "left_of",
347
+ 68: "right_of",
348
+ 70: "+",
349
+ 71: "-",
350
+ 72: "()",
351
+ 73: "ACTOR",
352
+ 75: "CONFIG_START",
353
+ 76: "CONFIG_CONTENT",
354
+ 77: "CONFIG_END",
355
+ 78: "SOLID_OPEN_ARROW",
356
+ 79: "DOTTED_OPEN_ARROW",
357
+ 80: "SOLID_ARROW",
358
+ 81: "SOLID_ARROW_TOP",
359
+ 82: "SOLID_ARROW_BOTTOM",
360
+ 83: "STICK_ARROW_TOP",
361
+ 84: "STICK_ARROW_BOTTOM",
362
+ 85: "SOLID_ARROW_TOP_DOTTED",
363
+ 86: "SOLID_ARROW_BOTTOM_DOTTED",
364
+ 87: "STICK_ARROW_TOP_DOTTED",
365
+ 88: "STICK_ARROW_BOTTOM_DOTTED",
366
+ 89: "SOLID_ARROW_TOP_REVERSE",
367
+ 90: "SOLID_ARROW_BOTTOM_REVERSE",
368
+ 91: "STICK_ARROW_TOP_REVERSE",
369
+ 92: "STICK_ARROW_BOTTOM_REVERSE",
370
+ 93: "SOLID_ARROW_TOP_REVERSE_DOTTED",
371
+ 94: "SOLID_ARROW_BOTTOM_REVERSE_DOTTED",
372
+ 95: "STICK_ARROW_TOP_REVERSE_DOTTED",
373
+ 96: "STICK_ARROW_BOTTOM_REVERSE_DOTTED",
374
+ 97: "BIDIRECTIONAL_SOLID_ARROW",
375
+ 98: "DOTTED_ARROW",
376
+ 99: "BIDIRECTIONAL_DOTTED_ARROW",
377
+ 100: "SOLID_CROSS",
378
+ 101: "DOTTED_CROSS",
379
+ 102: "SOLID_POINT",
380
+ 103: "DOTTED_POINT",
381
+ 104: "TXT"
382
+ },
383
+ productions_: [
384
+ 0,
385
+ [3, 2],
386
+ [3, 2],
387
+ [3, 2],
388
+ [7, 0],
389
+ [7, 2],
390
+ [8, 2],
391
+ [8, 1],
392
+ [8, 1],
393
+ [8, 1],
394
+ [11, 0],
395
+ [11, 2],
396
+ [12, 2],
397
+ [12, 1],
398
+ [12, 1],
399
+ [9, 1],
400
+ [9, 2],
401
+ [9, 4],
402
+ [9, 2],
403
+ [9, 4],
404
+ [9, 3],
405
+ [9, 3],
406
+ [9, 2],
407
+ [9, 3],
408
+ [9, 3],
409
+ [9, 2],
410
+ [9, 2],
411
+ [9, 2],
412
+ [9, 2],
413
+ [9, 2],
414
+ [9, 1],
415
+ [9, 1],
416
+ [9, 2],
417
+ [9, 2],
418
+ [9, 1],
419
+ [9, 4],
420
+ [9, 4],
421
+ [9, 4],
422
+ [9, 4],
423
+ [9, 4],
424
+ [9, 4],
425
+ [9, 4],
426
+ [9, 4],
427
+ [46, 1],
428
+ [46, 4],
429
+ [43, 1],
430
+ [43, 4],
431
+ [41, 1],
432
+ [41, 4],
433
+ [13, 5],
434
+ [13, 3],
435
+ [13, 5],
436
+ [13, 3],
437
+ [13, 3],
438
+ [13, 5],
439
+ [13, 3],
440
+ [13, 5],
441
+ [13, 3],
442
+ [25, 4],
443
+ [25, 4],
444
+ [26, 3],
445
+ [27, 3],
446
+ [28, 3],
447
+ [29, 3],
448
+ [65, 2],
449
+ [65, 1],
450
+ [60, 3],
451
+ [60, 1],
452
+ [57, 1],
453
+ [57, 1],
454
+ [18, 5],
455
+ [18, 5],
456
+ [18, 5],
457
+ [18, 5],
458
+ [18, 6],
459
+ [18, 4],
460
+ [55, 2],
461
+ [74, 3],
462
+ [23, 1],
463
+ [69, 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
+ [58, 1]
490
+ ],
491
+ performAction: /* @__PURE__ */ y(function(e, t, n, r, i, a, o) {
492
+ var s = a.length - 1;
493
+ switch (i) {
494
+ case 3: return r.apply(a[s]), a[s];
495
+ case 4:
496
+ case 10:
497
+ this.$ = [];
498
+ break;
499
+ case 5:
500
+ case 11:
501
+ a[s - 1].push(a[s]), this.$ = a[s - 1];
502
+ break;
503
+ case 6:
504
+ case 7:
505
+ case 12:
506
+ case 13:
507
+ this.$ = a[s];
508
+ break;
509
+ case 8:
510
+ case 9:
511
+ case 14:
512
+ this.$ = [];
513
+ break;
514
+ case 16:
515
+ a[s].type = "createParticipant", this.$ = a[s];
516
+ break;
517
+ case 17:
518
+ a[s - 1].unshift({
519
+ type: "boxStart",
520
+ boxData: r.parseBoxData(a[s - 2])
521
+ }), a[s - 1].push({
522
+ type: "boxEnd",
523
+ boxText: a[s - 2]
524
+ }), this.$ = a[s - 1];
525
+ break;
526
+ case 19:
527
+ this.$ = {
528
+ type: "sequenceIndex",
529
+ sequenceIndex: Number(a[s - 2]),
530
+ sequenceIndexStep: Number(a[s - 1]),
531
+ sequenceVisible: !0,
532
+ signalType: r.LINETYPE.AUTONUMBER
533
+ };
534
+ break;
535
+ case 20:
536
+ this.$ = {
537
+ type: "sequenceIndex",
538
+ sequenceIndex: Number(a[s - 1]),
539
+ sequenceIndexStep: 1,
540
+ sequenceVisible: !0,
541
+ signalType: r.LINETYPE.AUTONUMBER
542
+ };
543
+ break;
544
+ case 21:
545
+ this.$ = {
546
+ type: "sequenceIndex",
547
+ sequenceVisible: !1,
548
+ signalType: r.LINETYPE.AUTONUMBER
549
+ };
550
+ break;
551
+ case 22:
552
+ this.$ = {
553
+ type: "sequenceIndex",
554
+ sequenceVisible: !0,
555
+ signalType: r.LINETYPE.AUTONUMBER
556
+ };
557
+ break;
558
+ case 23:
559
+ this.$ = {
560
+ type: "activeStart",
561
+ signalType: r.LINETYPE.ACTIVE_START,
562
+ actor: a[s - 1].actor
563
+ };
564
+ break;
565
+ case 24:
566
+ this.$ = {
567
+ type: "activeEnd",
568
+ signalType: r.LINETYPE.ACTIVE_END,
569
+ actor: a[s - 1].actor
570
+ };
571
+ break;
572
+ case 30:
573
+ r.setDiagramTitle(a[s].substring(6)), this.$ = a[s].substring(6);
574
+ break;
575
+ case 31:
576
+ r.setDiagramTitle(a[s].substring(7)), this.$ = a[s].substring(7);
577
+ break;
578
+ case 32:
579
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
580
+ break;
581
+ case 33:
582
+ case 34:
583
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
584
+ break;
585
+ case 35:
586
+ a[s - 1].unshift({
587
+ type: "loopStart",
588
+ loopText: r.parseMessage(a[s - 2]),
589
+ signalType: r.LINETYPE.LOOP_START
590
+ }), a[s - 1].push({
591
+ type: "loopEnd",
592
+ loopText: a[s - 2],
593
+ signalType: r.LINETYPE.LOOP_END
594
+ }), this.$ = a[s - 1];
595
+ break;
596
+ case 36:
597
+ a[s - 1].unshift({
598
+ type: "rectStart",
599
+ color: r.parseMessage(a[s - 2]),
600
+ signalType: r.LINETYPE.RECT_START
601
+ }), a[s - 1].push({
602
+ type: "rectEnd",
603
+ color: r.parseMessage(a[s - 2]),
604
+ signalType: r.LINETYPE.RECT_END
605
+ }), this.$ = a[s - 1];
606
+ break;
607
+ case 37:
608
+ a[s - 1].unshift({
609
+ type: "optStart",
610
+ optText: r.parseMessage(a[s - 2]),
611
+ signalType: r.LINETYPE.OPT_START
612
+ }), a[s - 1].push({
613
+ type: "optEnd",
614
+ optText: r.parseMessage(a[s - 2]),
615
+ signalType: r.LINETYPE.OPT_END
616
+ }), this.$ = a[s - 1];
617
+ break;
618
+ case 38:
619
+ a[s - 1].unshift({
620
+ type: "altStart",
621
+ altText: r.parseMessage(a[s - 2]),
622
+ signalType: r.LINETYPE.ALT_START
623
+ }), a[s - 1].push({
624
+ type: "altEnd",
625
+ signalType: r.LINETYPE.ALT_END
626
+ }), this.$ = a[s - 1];
627
+ break;
628
+ case 39:
629
+ a[s - 1].unshift({
630
+ type: "parStart",
631
+ parText: r.parseMessage(a[s - 2]),
632
+ signalType: r.LINETYPE.PAR_START
633
+ }), a[s - 1].push({
634
+ type: "parEnd",
635
+ signalType: r.LINETYPE.PAR_END
636
+ }), this.$ = a[s - 1];
637
+ break;
638
+ case 40:
639
+ a[s - 1].unshift({
640
+ type: "parStart",
641
+ parText: r.parseMessage(a[s - 2]),
642
+ signalType: r.LINETYPE.PAR_OVER_START
643
+ }), a[s - 1].push({
644
+ type: "parEnd",
645
+ signalType: r.LINETYPE.PAR_END
646
+ }), this.$ = a[s - 1];
647
+ break;
648
+ case 41:
649
+ a[s - 1].unshift({
650
+ type: "criticalStart",
651
+ criticalText: r.parseMessage(a[s - 2]),
652
+ signalType: r.LINETYPE.CRITICAL_START
653
+ }), a[s - 1].push({
654
+ type: "criticalEnd",
655
+ signalType: r.LINETYPE.CRITICAL_END
656
+ }), this.$ = a[s - 1];
657
+ break;
658
+ case 42:
659
+ a[s - 1].unshift({
660
+ type: "breakStart",
661
+ breakText: r.parseMessage(a[s - 2]),
662
+ signalType: r.LINETYPE.BREAK_START
663
+ }), a[s - 1].push({
664
+ type: "breakEnd",
665
+ optText: r.parseMessage(a[s - 2]),
666
+ signalType: r.LINETYPE.BREAK_END
667
+ }), this.$ = a[s - 1];
668
+ break;
669
+ case 44:
670
+ this.$ = a[s - 3].concat([{
671
+ type: "option",
672
+ optionText: r.parseMessage(a[s - 1]),
673
+ signalType: r.LINETYPE.CRITICAL_OPTION
674
+ }, a[s]]);
675
+ break;
676
+ case 46:
677
+ this.$ = a[s - 3].concat([{
678
+ type: "and",
679
+ parText: r.parseMessage(a[s - 1]),
680
+ signalType: r.LINETYPE.PAR_AND
681
+ }, a[s]]);
682
+ break;
683
+ case 48:
684
+ this.$ = a[s - 3].concat([{
685
+ type: "else",
686
+ altText: r.parseMessage(a[s - 1]),
687
+ signalType: r.LINETYPE.ALT_ELSE
688
+ }, a[s]]);
689
+ break;
690
+ case 49:
691
+ a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
692
+ break;
693
+ case 50:
694
+ a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
695
+ break;
696
+ case 51:
697
+ a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
698
+ break;
699
+ case 52:
700
+ case 57:
701
+ a[s - 1].draw = "actor", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
702
+ break;
703
+ case 53:
704
+ a[s - 1].type = "destroyParticipant", this.$ = a[s - 1];
705
+ break;
706
+ case 54:
707
+ a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
708
+ break;
709
+ case 55:
710
+ a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
711
+ break;
712
+ case 56:
713
+ a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
714
+ break;
715
+ case 58:
716
+ this.$ = [a[s - 1], {
717
+ type: "addNote",
718
+ placement: a[s - 2],
719
+ actor: a[s - 1].actor,
720
+ text: a[s]
721
+ }];
722
+ break;
723
+ case 59:
724
+ a[s - 2] = [].concat(a[s - 1], a[s - 1]).slice(0, 2), a[s - 2][0] = a[s - 2][0].actor, a[s - 2][1] = a[s - 2][1].actor, this.$ = [a[s - 1], {
725
+ type: "addNote",
726
+ placement: r.PLACEMENT.OVER,
727
+ actor: a[s - 2].slice(0, 2),
728
+ text: a[s]
729
+ }];
730
+ break;
731
+ case 60:
732
+ this.$ = [a[s - 1], {
733
+ type: "addLinks",
734
+ actor: a[s - 1].actor,
735
+ text: a[s]
736
+ }];
737
+ break;
738
+ case 61:
739
+ this.$ = [a[s - 1], {
740
+ type: "addALink",
741
+ actor: a[s - 1].actor,
742
+ text: a[s]
743
+ }];
744
+ break;
745
+ case 62:
746
+ this.$ = [a[s - 1], {
747
+ type: "addProperties",
748
+ actor: a[s - 1].actor,
749
+ text: a[s]
750
+ }];
751
+ break;
752
+ case 63:
753
+ this.$ = [a[s - 1], {
754
+ type: "addDetails",
755
+ actor: a[s - 1].actor,
756
+ text: a[s]
757
+ }];
758
+ break;
759
+ case 66:
760
+ this.$ = [a[s - 2], a[s]];
761
+ break;
762
+ case 67:
763
+ this.$ = a[s];
764
+ break;
765
+ case 68:
766
+ this.$ = r.PLACEMENT.LEFTOF;
767
+ break;
768
+ case 69:
769
+ this.$ = r.PLACEMENT.RIGHTOF;
770
+ break;
771
+ case 70:
772
+ this.$ = [
773
+ a[s - 4],
774
+ a[s - 1],
775
+ {
776
+ type: "addMessage",
777
+ from: a[s - 4].actor,
778
+ to: a[s - 1].actor,
779
+ signalType: a[s - 3],
780
+ msg: a[s],
781
+ activate: !0
782
+ },
783
+ {
784
+ type: "activeStart",
785
+ signalType: r.LINETYPE.ACTIVE_START,
786
+ actor: a[s - 1].actor
787
+ }
788
+ ];
789
+ break;
790
+ case 71:
791
+ this.$ = [
792
+ a[s - 4],
793
+ a[s - 1],
794
+ {
795
+ type: "addMessage",
796
+ from: a[s - 4].actor,
797
+ to: a[s - 1].actor,
798
+ signalType: a[s - 3],
799
+ msg: a[s]
800
+ },
801
+ {
802
+ type: "activeEnd",
803
+ signalType: r.LINETYPE.ACTIVE_END,
804
+ actor: a[s - 4].actor
805
+ }
806
+ ];
807
+ break;
808
+ case 72:
809
+ this.$ = [
810
+ a[s - 4],
811
+ a[s - 1],
812
+ {
813
+ type: "addMessage",
814
+ from: a[s - 4].actor,
815
+ to: a[s - 1].actor,
816
+ signalType: a[s - 3],
817
+ msg: a[s],
818
+ activate: !0,
819
+ centralConnection: r.LINETYPE.CENTRAL_CONNECTION
820
+ },
821
+ {
822
+ type: "centralConnection",
823
+ signalType: r.LINETYPE.CENTRAL_CONNECTION,
824
+ actor: a[s - 1].actor
825
+ }
826
+ ];
827
+ break;
828
+ case 73:
829
+ this.$ = [
830
+ a[s - 4],
831
+ a[s - 1],
832
+ {
833
+ type: "addMessage",
834
+ from: a[s - 4].actor,
835
+ to: a[s - 1].actor,
836
+ signalType: a[s - 2],
837
+ msg: a[s],
838
+ activate: !1,
839
+ centralConnection: r.LINETYPE.CENTRAL_CONNECTION_REVERSE
840
+ },
841
+ {
842
+ type: "centralConnectionReverse",
843
+ signalType: r.LINETYPE.CENTRAL_CONNECTION_REVERSE,
844
+ actor: a[s - 4].actor
845
+ }
846
+ ];
847
+ break;
848
+ case 74:
849
+ this.$ = [
850
+ a[s - 5],
851
+ a[s - 1],
852
+ {
853
+ type: "addMessage",
854
+ from: a[s - 5].actor,
855
+ to: a[s - 1].actor,
856
+ signalType: a[s - 3],
857
+ msg: a[s],
858
+ activate: !0,
859
+ centralConnection: r.LINETYPE.CENTRAL_CONNECTION_DUAL
860
+ },
861
+ {
862
+ type: "centralConnection",
863
+ signalType: r.LINETYPE.CENTRAL_CONNECTION,
864
+ actor: a[s - 1].actor
865
+ },
866
+ {
867
+ type: "centralConnectionReverse",
868
+ signalType: r.LINETYPE.CENTRAL_CONNECTION_REVERSE,
869
+ actor: a[s - 5].actor
870
+ }
871
+ ];
872
+ break;
873
+ case 75:
874
+ this.$ = [
875
+ a[s - 3],
876
+ a[s - 1],
877
+ {
878
+ type: "addMessage",
879
+ from: a[s - 3].actor,
880
+ to: a[s - 1].actor,
881
+ signalType: a[s - 2],
882
+ msg: a[s]
883
+ }
884
+ ];
885
+ break;
886
+ case 76:
887
+ this.$ = {
888
+ type: "addParticipant",
889
+ actor: a[s - 1],
890
+ config: a[s]
891
+ };
892
+ break;
893
+ case 77:
894
+ this.$ = a[s - 1].trim();
895
+ break;
896
+ case 78:
897
+ this.$ = {
898
+ type: "addParticipant",
899
+ actor: a[s]
900
+ };
901
+ break;
902
+ case 79:
903
+ this.$ = r.LINETYPE.SOLID_OPEN;
904
+ break;
905
+ case 80:
906
+ this.$ = r.LINETYPE.DOTTED_OPEN;
907
+ break;
908
+ case 81:
909
+ this.$ = r.LINETYPE.SOLID;
910
+ break;
911
+ case 82:
912
+ this.$ = r.LINETYPE.SOLID_TOP;
913
+ break;
914
+ case 83:
915
+ this.$ = r.LINETYPE.SOLID_BOTTOM;
916
+ break;
917
+ case 84:
918
+ this.$ = r.LINETYPE.STICK_TOP;
919
+ break;
920
+ case 85:
921
+ this.$ = r.LINETYPE.STICK_BOTTOM;
922
+ break;
923
+ case 86:
924
+ this.$ = r.LINETYPE.SOLID_TOP_DOTTED;
925
+ break;
926
+ case 87:
927
+ this.$ = r.LINETYPE.SOLID_BOTTOM_DOTTED;
928
+ break;
929
+ case 88:
930
+ this.$ = r.LINETYPE.STICK_TOP_DOTTED;
931
+ break;
932
+ case 89:
933
+ this.$ = r.LINETYPE.STICK_BOTTOM_DOTTED;
934
+ break;
935
+ case 90:
936
+ this.$ = r.LINETYPE.SOLID_ARROW_TOP_REVERSE;
937
+ break;
938
+ case 91:
939
+ this.$ = r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;
940
+ break;
941
+ case 92:
942
+ this.$ = r.LINETYPE.STICK_ARROW_TOP_REVERSE;
943
+ break;
944
+ case 93:
945
+ this.$ = r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;
946
+ break;
947
+ case 94:
948
+ this.$ = r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;
949
+ break;
950
+ case 95:
951
+ this.$ = r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;
952
+ break;
953
+ case 96:
954
+ this.$ = r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;
955
+ break;
956
+ case 97:
957
+ this.$ = r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;
958
+ break;
959
+ case 98:
960
+ this.$ = r.LINETYPE.BIDIRECTIONAL_SOLID;
961
+ break;
962
+ case 99:
963
+ this.$ = r.LINETYPE.DOTTED;
964
+ break;
965
+ case 100:
966
+ this.$ = r.LINETYPE.BIDIRECTIONAL_DOTTED;
967
+ break;
968
+ case 101:
969
+ this.$ = r.LINETYPE.SOLID_CROSS;
970
+ break;
971
+ case 102:
972
+ this.$ = r.LINETYPE.DOTTED_CROSS;
973
+ break;
974
+ case 103:
975
+ this.$ = r.LINETYPE.SOLID_POINT;
976
+ break;
977
+ case 104:
978
+ this.$ = r.LINETYPE.DOTTED_POINT;
979
+ break;
980
+ case 105:
981
+ this.$ = r.parseMessage(a[s].trim().substring(1));
982
+ break;
983
+ }
984
+ }, "anonymous"),
985
+ table: [
986
+ {
987
+ 3: 1,
988
+ 4: t,
989
+ 5: n,
990
+ 6: r
991
+ },
992
+ { 1: [3] },
993
+ {
994
+ 3: 5,
995
+ 4: t,
996
+ 5: n,
997
+ 6: r
998
+ },
999
+ {
1000
+ 3: 6,
1001
+ 4: t,
1002
+ 5: n,
1003
+ 6: r
1004
+ },
1005
+ e([
1006
+ 1,
1007
+ 4,
1008
+ 5,
1009
+ 10,
1010
+ 14,
1011
+ 15,
1012
+ 19,
1013
+ 22,
1014
+ 24,
1015
+ 30,
1016
+ 31,
1017
+ 32,
1018
+ 34,
1019
+ 36,
1020
+ 37,
1021
+ 38,
1022
+ 39,
1023
+ 40,
1024
+ 42,
1025
+ 44,
1026
+ 45,
1027
+ 47,
1028
+ 51,
1029
+ 53,
1030
+ 54,
1031
+ 56,
1032
+ 61,
1033
+ 62,
1034
+ 63,
1035
+ 64,
1036
+ 73
1037
+ ], i, { 7: 7 }),
1038
+ { 1: [2, 1] },
1039
+ { 1: [2, 2] },
1040
+ {
1041
+ 1: [2, 3],
1042
+ 4: a,
1043
+ 5: o,
1044
+ 8: 8,
1045
+ 9: 10,
1046
+ 10: s,
1047
+ 13: 13,
1048
+ 14: c,
1049
+ 15: l,
1050
+ 18: 16,
1051
+ 19: u,
1052
+ 22: d,
1053
+ 23: 41,
1054
+ 24: f,
1055
+ 25: 20,
1056
+ 26: 21,
1057
+ 27: 22,
1058
+ 28: 23,
1059
+ 29: 24,
1060
+ 30: p,
1061
+ 31: m,
1062
+ 32: h,
1063
+ 34: g,
1064
+ 36: _,
1065
+ 37: v,
1066
+ 38: b,
1067
+ 39: x,
1068
+ 40: S,
1069
+ 42: C,
1070
+ 44: w,
1071
+ 45: T,
1072
+ 47: E,
1073
+ 51: D,
1074
+ 53: O,
1075
+ 54: k,
1076
+ 56: A,
1077
+ 61: j,
1078
+ 62: M,
1079
+ 63: N,
1080
+ 64: P,
1081
+ 73: F
1082
+ },
1083
+ e(I, [2, 5]),
1084
+ {
1085
+ 9: 48,
1086
+ 13: 13,
1087
+ 14: c,
1088
+ 15: l,
1089
+ 18: 16,
1090
+ 19: u,
1091
+ 22: d,
1092
+ 23: 41,
1093
+ 24: f,
1094
+ 25: 20,
1095
+ 26: 21,
1096
+ 27: 22,
1097
+ 28: 23,
1098
+ 29: 24,
1099
+ 30: p,
1100
+ 31: m,
1101
+ 32: h,
1102
+ 34: g,
1103
+ 36: _,
1104
+ 37: v,
1105
+ 38: b,
1106
+ 39: x,
1107
+ 40: S,
1108
+ 42: C,
1109
+ 44: w,
1110
+ 45: T,
1111
+ 47: E,
1112
+ 51: D,
1113
+ 53: O,
1114
+ 54: k,
1115
+ 56: A,
1116
+ 61: j,
1117
+ 62: M,
1118
+ 63: N,
1119
+ 64: P,
1120
+ 73: F
1121
+ },
1122
+ e(I, [2, 7]),
1123
+ e(I, [2, 8]),
1124
+ e(I, [2, 9]),
1125
+ e(I, [2, 15]),
1126
+ {
1127
+ 13: 49,
1128
+ 51: D,
1129
+ 53: O,
1130
+ 54: k
1131
+ },
1132
+ { 16: [1, 50] },
1133
+ { 5: [1, 51] },
1134
+ {
1135
+ 5: [1, 54],
1136
+ 20: [1, 52],
1137
+ 21: [1, 53]
1138
+ },
1139
+ {
1140
+ 23: 55,
1141
+ 73: F
1142
+ },
1143
+ {
1144
+ 23: 56,
1145
+ 73: F
1146
+ },
1147
+ { 5: [1, 57] },
1148
+ { 5: [1, 58] },
1149
+ { 5: [1, 59] },
1150
+ { 5: [1, 60] },
1151
+ { 5: [1, 61] },
1152
+ e(I, [2, 30]),
1153
+ e(I, [2, 31]),
1154
+ { 33: [1, 62] },
1155
+ { 35: [1, 63] },
1156
+ e(I, [2, 34]),
1157
+ { 16: [1, 64] },
1158
+ { 16: [1, 65] },
1159
+ { 16: [1, 66] },
1160
+ { 16: [1, 67] },
1161
+ { 16: [1, 68] },
1162
+ { 16: [1, 69] },
1163
+ { 16: [1, 70] },
1164
+ { 16: [1, 71] },
1165
+ {
1166
+ 23: 72,
1167
+ 55: 73,
1168
+ 73: L
1169
+ },
1170
+ {
1171
+ 23: 75,
1172
+ 55: 76,
1173
+ 73: L
1174
+ },
1175
+ {
1176
+ 23: 77,
1177
+ 73: F
1178
+ },
1179
+ {
1180
+ 69: 78,
1181
+ 72: [1, 79],
1182
+ 78: ee,
1183
+ 79: R,
1184
+ 80: te,
1185
+ 81: ne,
1186
+ 82: z,
1187
+ 83: B,
1188
+ 84: V,
1189
+ 85: re,
1190
+ 86: H,
1191
+ 87: U,
1192
+ 88: W,
1193
+ 89: ie,
1194
+ 90: ae,
1195
+ 91: oe,
1196
+ 92: G,
1197
+ 93: se,
1198
+ 94: K,
1199
+ 95: ce,
1200
+ 96: le,
1201
+ 97: ue,
1202
+ 98: de,
1203
+ 99: fe,
1204
+ 100: pe,
1205
+ 101: me,
1206
+ 102: he,
1207
+ 103: ge
1208
+ },
1209
+ {
1210
+ 57: 106,
1211
+ 59: [1, 107],
1212
+ 67: [1, 108],
1213
+ 68: [1, 109]
1214
+ },
1215
+ {
1216
+ 23: 110,
1217
+ 73: F
1218
+ },
1219
+ {
1220
+ 23: 111,
1221
+ 73: F
1222
+ },
1223
+ {
1224
+ 23: 112,
1225
+ 73: F
1226
+ },
1227
+ {
1228
+ 23: 113,
1229
+ 73: F
1230
+ },
1231
+ e([
1232
+ 5,
1233
+ 66,
1234
+ 72,
1235
+ 78,
1236
+ 79,
1237
+ 80,
1238
+ 81,
1239
+ 82,
1240
+ 83,
1241
+ 84,
1242
+ 85,
1243
+ 86,
1244
+ 87,
1245
+ 88,
1246
+ 89,
1247
+ 90,
1248
+ 91,
1249
+ 92,
1250
+ 93,
1251
+ 94,
1252
+ 95,
1253
+ 96,
1254
+ 97,
1255
+ 98,
1256
+ 99,
1257
+ 100,
1258
+ 101,
1259
+ 102,
1260
+ 103,
1261
+ 104
1262
+ ], _e),
1263
+ e(I, [2, 6]),
1264
+ e(I, [2, 16]),
1265
+ e(ve, [2, 10], { 11: 114 }),
1266
+ e(I, [2, 18]),
1267
+ {
1268
+ 5: [1, 116],
1269
+ 20: [1, 115]
1270
+ },
1271
+ { 5: [1, 117] },
1272
+ e(I, [2, 22]),
1273
+ { 5: [1, 118] },
1274
+ { 5: [1, 119] },
1275
+ e(I, [2, 25]),
1276
+ e(I, [2, 26]),
1277
+ e(I, [2, 27]),
1278
+ e(I, [2, 28]),
1279
+ e(I, [2, 29]),
1280
+ e(I, [2, 32]),
1281
+ e(I, [2, 33]),
1282
+ e(ye, i, { 7: 120 }),
1283
+ e(ye, i, { 7: 121 }),
1284
+ e(ye, i, { 7: 122 }),
1285
+ e(be, i, {
1286
+ 41: 123,
1287
+ 7: 124
1288
+ }),
1289
+ e(xe, i, {
1290
+ 43: 125,
1291
+ 7: 126
1292
+ }),
1293
+ e(xe, i, {
1294
+ 7: 126,
1295
+ 43: 127
1296
+ }),
1297
+ e(Se, i, {
1298
+ 46: 128,
1299
+ 7: 129
1300
+ }),
1301
+ e(ye, i, { 7: 130 }),
1302
+ {
1303
+ 5: [1, 132],
1304
+ 52: [1, 131]
1305
+ },
1306
+ {
1307
+ 5: [1, 134],
1308
+ 52: [1, 133]
1309
+ },
1310
+ e(Ce, _e, {
1311
+ 74: 135,
1312
+ 75: [1, 136]
1313
+ }),
1314
+ {
1315
+ 5: [1, 138],
1316
+ 52: [1, 137]
1317
+ },
1318
+ {
1319
+ 5: [1, 140],
1320
+ 52: [1, 139]
1321
+ },
1322
+ { 5: [1, 141] },
1323
+ {
1324
+ 23: 145,
1325
+ 70: [1, 142],
1326
+ 71: [1, 143],
1327
+ 72: [1, 144],
1328
+ 73: F
1329
+ },
1330
+ {
1331
+ 69: 146,
1332
+ 78: ee,
1333
+ 79: R,
1334
+ 80: te,
1335
+ 81: ne,
1336
+ 82: z,
1337
+ 83: B,
1338
+ 84: V,
1339
+ 85: re,
1340
+ 86: H,
1341
+ 87: U,
1342
+ 88: W,
1343
+ 89: ie,
1344
+ 90: ae,
1345
+ 91: oe,
1346
+ 92: G,
1347
+ 93: se,
1348
+ 94: K,
1349
+ 95: ce,
1350
+ 96: le,
1351
+ 97: ue,
1352
+ 98: de,
1353
+ 99: fe,
1354
+ 100: pe,
1355
+ 101: me,
1356
+ 102: he,
1357
+ 103: ge
1358
+ },
1359
+ e(q, [2, 79]),
1360
+ e(q, [2, 80]),
1361
+ e(q, [2, 81]),
1362
+ e(q, [2, 82]),
1363
+ e(q, [2, 83]),
1364
+ e(q, [2, 84]),
1365
+ e(q, [2, 85]),
1366
+ e(q, [2, 86]),
1367
+ e(q, [2, 87]),
1368
+ e(q, [2, 88]),
1369
+ e(q, [2, 89]),
1370
+ e(q, [2, 90]),
1371
+ e(q, [2, 91]),
1372
+ e(q, [2, 92]),
1373
+ e(q, [2, 93]),
1374
+ e(q, [2, 94]),
1375
+ e(q, [2, 95]),
1376
+ e(q, [2, 96]),
1377
+ e(q, [2, 97]),
1378
+ e(q, [2, 98]),
1379
+ e(q, [2, 99]),
1380
+ e(q, [2, 100]),
1381
+ e(q, [2, 101]),
1382
+ e(q, [2, 102]),
1383
+ e(q, [2, 103]),
1384
+ e(q, [2, 104]),
1385
+ {
1386
+ 23: 147,
1387
+ 73: F
1388
+ },
1389
+ {
1390
+ 23: 149,
1391
+ 60: 148,
1392
+ 73: F
1393
+ },
1394
+ { 73: [2, 68] },
1395
+ { 73: [2, 69] },
1396
+ {
1397
+ 58: 150,
1398
+ 104: J
1399
+ },
1400
+ {
1401
+ 58: 152,
1402
+ 104: J
1403
+ },
1404
+ {
1405
+ 58: 153,
1406
+ 104: J
1407
+ },
1408
+ {
1409
+ 58: 154,
1410
+ 104: J
1411
+ },
1412
+ {
1413
+ 4: [1, 157],
1414
+ 5: [1, 159],
1415
+ 12: 156,
1416
+ 13: 158,
1417
+ 17: [1, 155],
1418
+ 51: D,
1419
+ 53: O,
1420
+ 54: k
1421
+ },
1422
+ { 5: [1, 160] },
1423
+ e(I, [2, 20]),
1424
+ e(I, [2, 21]),
1425
+ e(I, [2, 23]),
1426
+ e(I, [2, 24]),
1427
+ {
1428
+ 4: a,
1429
+ 5: o,
1430
+ 8: 8,
1431
+ 9: 10,
1432
+ 10: s,
1433
+ 13: 13,
1434
+ 14: c,
1435
+ 15: l,
1436
+ 17: [1, 161],
1437
+ 18: 16,
1438
+ 19: u,
1439
+ 22: d,
1440
+ 23: 41,
1441
+ 24: f,
1442
+ 25: 20,
1443
+ 26: 21,
1444
+ 27: 22,
1445
+ 28: 23,
1446
+ 29: 24,
1447
+ 30: p,
1448
+ 31: m,
1449
+ 32: h,
1450
+ 34: g,
1451
+ 36: _,
1452
+ 37: v,
1453
+ 38: b,
1454
+ 39: x,
1455
+ 40: S,
1456
+ 42: C,
1457
+ 44: w,
1458
+ 45: T,
1459
+ 47: E,
1460
+ 51: D,
1461
+ 53: O,
1462
+ 54: k,
1463
+ 56: A,
1464
+ 61: j,
1465
+ 62: M,
1466
+ 63: N,
1467
+ 64: P,
1468
+ 73: F
1469
+ },
1470
+ {
1471
+ 4: a,
1472
+ 5: o,
1473
+ 8: 8,
1474
+ 9: 10,
1475
+ 10: s,
1476
+ 13: 13,
1477
+ 14: c,
1478
+ 15: l,
1479
+ 17: [1, 162],
1480
+ 18: 16,
1481
+ 19: u,
1482
+ 22: d,
1483
+ 23: 41,
1484
+ 24: f,
1485
+ 25: 20,
1486
+ 26: 21,
1487
+ 27: 22,
1488
+ 28: 23,
1489
+ 29: 24,
1490
+ 30: p,
1491
+ 31: m,
1492
+ 32: h,
1493
+ 34: g,
1494
+ 36: _,
1495
+ 37: v,
1496
+ 38: b,
1497
+ 39: x,
1498
+ 40: S,
1499
+ 42: C,
1500
+ 44: w,
1501
+ 45: T,
1502
+ 47: E,
1503
+ 51: D,
1504
+ 53: O,
1505
+ 54: k,
1506
+ 56: A,
1507
+ 61: j,
1508
+ 62: M,
1509
+ 63: N,
1510
+ 64: P,
1511
+ 73: F
1512
+ },
1513
+ {
1514
+ 4: a,
1515
+ 5: o,
1516
+ 8: 8,
1517
+ 9: 10,
1518
+ 10: s,
1519
+ 13: 13,
1520
+ 14: c,
1521
+ 15: l,
1522
+ 17: [1, 163],
1523
+ 18: 16,
1524
+ 19: u,
1525
+ 22: d,
1526
+ 23: 41,
1527
+ 24: f,
1528
+ 25: 20,
1529
+ 26: 21,
1530
+ 27: 22,
1531
+ 28: 23,
1532
+ 29: 24,
1533
+ 30: p,
1534
+ 31: m,
1535
+ 32: h,
1536
+ 34: g,
1537
+ 36: _,
1538
+ 37: v,
1539
+ 38: b,
1540
+ 39: x,
1541
+ 40: S,
1542
+ 42: C,
1543
+ 44: w,
1544
+ 45: T,
1545
+ 47: E,
1546
+ 51: D,
1547
+ 53: O,
1548
+ 54: k,
1549
+ 56: A,
1550
+ 61: j,
1551
+ 62: M,
1552
+ 63: N,
1553
+ 64: P,
1554
+ 73: F
1555
+ },
1556
+ { 17: [1, 164] },
1557
+ {
1558
+ 4: a,
1559
+ 5: o,
1560
+ 8: 8,
1561
+ 9: 10,
1562
+ 10: s,
1563
+ 13: 13,
1564
+ 14: c,
1565
+ 15: l,
1566
+ 17: [2, 47],
1567
+ 18: 16,
1568
+ 19: u,
1569
+ 22: d,
1570
+ 23: 41,
1571
+ 24: f,
1572
+ 25: 20,
1573
+ 26: 21,
1574
+ 27: 22,
1575
+ 28: 23,
1576
+ 29: 24,
1577
+ 30: p,
1578
+ 31: m,
1579
+ 32: h,
1580
+ 34: g,
1581
+ 36: _,
1582
+ 37: v,
1583
+ 38: b,
1584
+ 39: x,
1585
+ 40: S,
1586
+ 42: C,
1587
+ 44: w,
1588
+ 45: T,
1589
+ 47: E,
1590
+ 50: [1, 165],
1591
+ 51: D,
1592
+ 53: O,
1593
+ 54: k,
1594
+ 56: A,
1595
+ 61: j,
1596
+ 62: M,
1597
+ 63: N,
1598
+ 64: P,
1599
+ 73: F
1600
+ },
1601
+ { 17: [1, 166] },
1602
+ {
1603
+ 4: a,
1604
+ 5: o,
1605
+ 8: 8,
1606
+ 9: 10,
1607
+ 10: s,
1608
+ 13: 13,
1609
+ 14: c,
1610
+ 15: l,
1611
+ 17: [2, 45],
1612
+ 18: 16,
1613
+ 19: u,
1614
+ 22: d,
1615
+ 23: 41,
1616
+ 24: f,
1617
+ 25: 20,
1618
+ 26: 21,
1619
+ 27: 22,
1620
+ 28: 23,
1621
+ 29: 24,
1622
+ 30: p,
1623
+ 31: m,
1624
+ 32: h,
1625
+ 34: g,
1626
+ 36: _,
1627
+ 37: v,
1628
+ 38: b,
1629
+ 39: x,
1630
+ 40: S,
1631
+ 42: C,
1632
+ 44: w,
1633
+ 45: T,
1634
+ 47: E,
1635
+ 49: [1, 167],
1636
+ 51: D,
1637
+ 53: O,
1638
+ 54: k,
1639
+ 56: A,
1640
+ 61: j,
1641
+ 62: M,
1642
+ 63: N,
1643
+ 64: P,
1644
+ 73: F
1645
+ },
1646
+ { 17: [1, 168] },
1647
+ { 17: [1, 169] },
1648
+ {
1649
+ 4: a,
1650
+ 5: o,
1651
+ 8: 8,
1652
+ 9: 10,
1653
+ 10: s,
1654
+ 13: 13,
1655
+ 14: c,
1656
+ 15: l,
1657
+ 17: [2, 43],
1658
+ 18: 16,
1659
+ 19: u,
1660
+ 22: d,
1661
+ 23: 41,
1662
+ 24: f,
1663
+ 25: 20,
1664
+ 26: 21,
1665
+ 27: 22,
1666
+ 28: 23,
1667
+ 29: 24,
1668
+ 30: p,
1669
+ 31: m,
1670
+ 32: h,
1671
+ 34: g,
1672
+ 36: _,
1673
+ 37: v,
1674
+ 38: b,
1675
+ 39: x,
1676
+ 40: S,
1677
+ 42: C,
1678
+ 44: w,
1679
+ 45: T,
1680
+ 47: E,
1681
+ 48: [1, 170],
1682
+ 51: D,
1683
+ 53: O,
1684
+ 54: k,
1685
+ 56: A,
1686
+ 61: j,
1687
+ 62: M,
1688
+ 63: N,
1689
+ 64: P,
1690
+ 73: F
1691
+ },
1692
+ {
1693
+ 4: a,
1694
+ 5: o,
1695
+ 8: 8,
1696
+ 9: 10,
1697
+ 10: s,
1698
+ 13: 13,
1699
+ 14: c,
1700
+ 15: l,
1701
+ 17: [1, 171],
1702
+ 18: 16,
1703
+ 19: u,
1704
+ 22: d,
1705
+ 23: 41,
1706
+ 24: f,
1707
+ 25: 20,
1708
+ 26: 21,
1709
+ 27: 22,
1710
+ 28: 23,
1711
+ 29: 24,
1712
+ 30: p,
1713
+ 31: m,
1714
+ 32: h,
1715
+ 34: g,
1716
+ 36: _,
1717
+ 37: v,
1718
+ 38: b,
1719
+ 39: x,
1720
+ 40: S,
1721
+ 42: C,
1722
+ 44: w,
1723
+ 45: T,
1724
+ 47: E,
1725
+ 51: D,
1726
+ 53: O,
1727
+ 54: k,
1728
+ 56: A,
1729
+ 61: j,
1730
+ 62: M,
1731
+ 63: N,
1732
+ 64: P,
1733
+ 73: F
1734
+ },
1735
+ { 16: [1, 172] },
1736
+ e(I, [2, 50]),
1737
+ { 16: [1, 173] },
1738
+ e(I, [2, 55]),
1739
+ e(Ce, [2, 76]),
1740
+ { 76: [1, 174] },
1741
+ { 16: [1, 175] },
1742
+ e(I, [2, 52]),
1743
+ { 16: [1, 176] },
1744
+ e(I, [2, 57]),
1745
+ e(I, [2, 53]),
1746
+ {
1747
+ 23: 177,
1748
+ 73: F
1749
+ },
1750
+ {
1751
+ 23: 178,
1752
+ 73: F
1753
+ },
1754
+ {
1755
+ 23: 179,
1756
+ 73: F
1757
+ },
1758
+ {
1759
+ 58: 180,
1760
+ 104: J
1761
+ },
1762
+ {
1763
+ 23: 181,
1764
+ 72: [1, 182],
1765
+ 73: F
1766
+ },
1767
+ {
1768
+ 58: 183,
1769
+ 104: J
1770
+ },
1771
+ {
1772
+ 58: 184,
1773
+ 104: J
1774
+ },
1775
+ {
1776
+ 66: [1, 185],
1777
+ 104: [2, 67]
1778
+ },
1779
+ { 5: [2, 60] },
1780
+ { 5: [2, 105] },
1781
+ { 5: [2, 61] },
1782
+ { 5: [2, 62] },
1783
+ { 5: [2, 63] },
1784
+ e(I, [2, 17]),
1785
+ e(ve, [2, 11]),
1786
+ {
1787
+ 13: 186,
1788
+ 51: D,
1789
+ 53: O,
1790
+ 54: k
1791
+ },
1792
+ e(ve, [2, 13]),
1793
+ e(ve, [2, 14]),
1794
+ e(I, [2, 19]),
1795
+ e(I, [2, 35]),
1796
+ e(I, [2, 36]),
1797
+ e(I, [2, 37]),
1798
+ e(I, [2, 38]),
1799
+ { 16: [1, 187] },
1800
+ e(I, [2, 39]),
1801
+ { 16: [1, 188] },
1802
+ e(I, [2, 40]),
1803
+ e(I, [2, 41]),
1804
+ { 16: [1, 189] },
1805
+ e(I, [2, 42]),
1806
+ { 5: [1, 190] },
1807
+ { 5: [1, 191] },
1808
+ { 77: [1, 192] },
1809
+ { 5: [1, 193] },
1810
+ { 5: [1, 194] },
1811
+ {
1812
+ 58: 195,
1813
+ 104: J
1814
+ },
1815
+ {
1816
+ 58: 196,
1817
+ 104: J
1818
+ },
1819
+ {
1820
+ 58: 197,
1821
+ 104: J
1822
+ },
1823
+ { 5: [2, 75] },
1824
+ {
1825
+ 58: 198,
1826
+ 104: J
1827
+ },
1828
+ {
1829
+ 23: 199,
1830
+ 73: F
1831
+ },
1832
+ { 5: [2, 58] },
1833
+ { 5: [2, 59] },
1834
+ {
1835
+ 23: 200,
1836
+ 73: F
1837
+ },
1838
+ e(ve, [2, 12]),
1839
+ e(be, i, {
1840
+ 7: 124,
1841
+ 41: 201
1842
+ }),
1843
+ e(xe, i, {
1844
+ 7: 126,
1845
+ 43: 202
1846
+ }),
1847
+ e(Se, i, {
1848
+ 7: 129,
1849
+ 46: 203
1850
+ }),
1851
+ e(I, [2, 49]),
1852
+ e(I, [2, 54]),
1853
+ e(Ce, [2, 77]),
1854
+ e(I, [2, 51]),
1855
+ e(I, [2, 56]),
1856
+ { 5: [2, 70] },
1857
+ { 5: [2, 71] },
1858
+ { 5: [2, 72] },
1859
+ { 5: [2, 73] },
1860
+ {
1861
+ 58: 204,
1862
+ 104: J
1863
+ },
1864
+ { 104: [2, 66] },
1865
+ { 17: [2, 48] },
1866
+ { 17: [2, 46] },
1867
+ { 17: [2, 44] },
1868
+ { 5: [2, 74] }
1869
+ ],
1870
+ defaultActions: {
1871
+ 5: [2, 1],
1872
+ 6: [2, 2],
1873
+ 108: [2, 68],
1874
+ 109: [2, 69],
1875
+ 150: [2, 60],
1876
+ 151: [2, 105],
1877
+ 152: [2, 61],
1878
+ 153: [2, 62],
1879
+ 154: [2, 63],
1880
+ 180: [2, 75],
1881
+ 183: [2, 58],
1882
+ 184: [2, 59],
1883
+ 195: [2, 70],
1884
+ 196: [2, 71],
1885
+ 197: [2, 72],
1886
+ 198: [2, 73],
1887
+ 200: [2, 66],
1888
+ 201: [2, 48],
1889
+ 202: [2, 46],
1890
+ 203: [2, 44],
1891
+ 204: [2, 74]
1892
+ },
1893
+ parseError: /* @__PURE__ */ y(function(e, t) {
1894
+ if (t.recoverable) this.trace(e);
1895
+ else {
1896
+ var n = Error(e);
1897
+ throw n.hash = t, n;
1898
+ }
1899
+ }, "parseError"),
1900
+ parse: /* @__PURE__ */ y(function(e) {
1901
+ var t = this, n = [0], r = [], i = [null], a = [], o = this.table, s = "", c = 0, l = 0, u = 0, d = 2, f = 1, p = a.slice.call(arguments, 1), m = Object.create(this.lexer), h = { yy: {} };
1902
+ for (var g in this.yy) Object.prototype.hasOwnProperty.call(this.yy, g) && (h.yy[g] = this.yy[g]);
1903
+ m.setInput(e, h.yy), h.yy.lexer = m, h.yy.parser = this, m.yylloc === void 0 && (m.yylloc = {});
1904
+ var _ = m.yylloc;
1905
+ a.push(_);
1906
+ var v = m.options && m.options.ranges;
1907
+ typeof h.yy.parseError == "function" ? this.parseError = h.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1908
+ function b(e) {
1909
+ n.length -= 2 * e, i.length -= e, a.length -= e;
1910
+ }
1911
+ y(b, "popStack");
1912
+ function x() {
1913
+ var e = r.pop() || m.lex() || f;
1914
+ return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
1915
+ }
1916
+ y(x, "lex");
1917
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
1918
+ if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = o[w] && o[w][S]), T === void 0 || !T.length || !T[0]) {
1919
+ var M = "";
1920
+ for (O in j = [], o[w]) this.terminals_[O] && O > d && j.push("'" + this.terminals_[O] + "'");
1921
+ M = m.showPosition ? "Parse error on line " + (c + 1) + ":\n" + m.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (c + 1) + ": Unexpected " + (S == f ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
1922
+ text: m.match,
1923
+ token: this.terminals_[S] || S,
1924
+ line: m.yylineno,
1925
+ loc: _,
1926
+ expected: j
1927
+ });
1928
+ }
1929
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1930
+ switch (T[0]) {
1931
+ case 1:
1932
+ n.push(S), i.push(m.yytext), a.push(m.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (l = m.yyleng, s = m.yytext, c = m.yylineno, _ = m.yylloc, u > 0 && u--);
1933
+ break;
1934
+ case 2:
1935
+ if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
1936
+ first_line: a[a.length - (k || 1)].first_line,
1937
+ last_line: a[a.length - 1].last_line,
1938
+ first_column: a[a.length - (k || 1)].first_column,
1939
+ last_column: a[a.length - 1].last_column
1940
+ }, v && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
1941
+ s,
1942
+ l,
1943
+ c,
1944
+ h.yy,
1945
+ T[1],
1946
+ i,
1947
+ a
1948
+ ].concat(p)), E !== void 0) return E;
1949
+ k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), a = a.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), a.push(D._$), A = o[n[n.length - 2]][n[n.length - 1]], n.push(A);
1950
+ break;
1951
+ case 3: return !0;
1952
+ }
1953
+ }
1954
+ return !0;
1955
+ }, "parse")
1956
+ };
1957
+ we.lexer = /* @__PURE__ */ (function() {
1958
+ return {
1959
+ EOF: 1,
1960
+ parseError: /* @__PURE__ */ y(function(e, t) {
1961
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
1962
+ else throw Error(e);
1963
+ }, "parseError"),
1964
+ setInput: /* @__PURE__ */ y(function(e, t) {
1965
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1966
+ first_line: 1,
1967
+ first_column: 0,
1968
+ last_line: 1,
1969
+ last_column: 0
1970
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1971
+ }, "setInput"),
1972
+ input: /* @__PURE__ */ y(function() {
1973
+ var e = this._input[0];
1974
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
1975
+ }, "input"),
1976
+ unput: /* @__PURE__ */ y(function(e) {
1977
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
1978
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
1979
+ var r = this.match.split(/(?:\r\n?|\n)/g);
1980
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
1981
+ var i = this.yylloc.range;
1982
+ return this.yylloc = {
1983
+ first_line: this.yylloc.first_line,
1984
+ last_line: this.yylineno + 1,
1985
+ first_column: this.yylloc.first_column,
1986
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
1987
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
1988
+ }, "unput"),
1989
+ more: /* @__PURE__ */ y(function() {
1990
+ return this._more = !0, this;
1991
+ }, "more"),
1992
+ reject: /* @__PURE__ */ y(function() {
1993
+ if (this.options.backtrack_lexer) this._backtrack = !0;
1994
+ 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).\n" + this.showPosition(), {
1995
+ text: "",
1996
+ token: null,
1997
+ line: this.yylineno
1998
+ });
1999
+ return this;
2000
+ }, "reject"),
2001
+ less: /* @__PURE__ */ y(function(e) {
2002
+ this.unput(this.match.slice(e));
2003
+ }, "less"),
2004
+ pastInput: /* @__PURE__ */ y(function() {
2005
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
2006
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
2007
+ }, "pastInput"),
2008
+ upcomingInput: /* @__PURE__ */ y(function() {
2009
+ var e = this.match;
2010
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
2011
+ }, "upcomingInput"),
2012
+ showPosition: /* @__PURE__ */ y(function() {
2013
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
2014
+ return e + this.upcomingInput() + "\n" + t + "^";
2015
+ }, "showPosition"),
2016
+ test_match: /* @__PURE__ */ y(function(e, t) {
2017
+ var n, r, i;
2018
+ if (this.options.backtrack_lexer && (i = {
2019
+ yylineno: this.yylineno,
2020
+ yylloc: {
2021
+ first_line: this.yylloc.first_line,
2022
+ last_line: this.last_line,
2023
+ first_column: this.yylloc.first_column,
2024
+ last_column: this.yylloc.last_column
2025
+ },
2026
+ yytext: this.yytext,
2027
+ match: this.match,
2028
+ matches: this.matches,
2029
+ matched: this.matched,
2030
+ yyleng: this.yyleng,
2031
+ offset: this.offset,
2032
+ _more: this._more,
2033
+ _input: this._input,
2034
+ yy: this.yy,
2035
+ conditionStack: this.conditionStack.slice(0),
2036
+ done: this.done
2037
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
2038
+ first_line: this.yylloc.last_line,
2039
+ last_line: this.yylineno + 1,
2040
+ first_column: this.yylloc.last_column,
2041
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
2042
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
2043
+ if (this._backtrack) {
2044
+ for (var a in i) this[a] = i[a];
2045
+ return !1;
2046
+ }
2047
+ return !1;
2048
+ }, "test_match"),
2049
+ next: /* @__PURE__ */ y(function() {
2050
+ if (this.done) return this.EOF;
2051
+ this._input || (this.done = !0);
2052
+ var e, t, n, r;
2053
+ this._more || (this.yytext = "", this.match = "");
2054
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
2055
+ if (t = n, r = a, this.options.backtrack_lexer) {
2056
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
2057
+ if (this._backtrack) {
2058
+ t = !1;
2059
+ continue;
2060
+ } else return !1;
2061
+ } else if (!this.options.flex) break;
2062
+ }
2063
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
2064
+ text: "",
2065
+ token: null,
2066
+ line: this.yylineno
2067
+ });
2068
+ }, "next"),
2069
+ lex: /* @__PURE__ */ y(function() {
2070
+ return this.next() || this.lex();
2071
+ }, "lex"),
2072
+ begin: /* @__PURE__ */ y(function(e) {
2073
+ this.conditionStack.push(e);
2074
+ }, "begin"),
2075
+ popState: /* @__PURE__ */ y(function() {
2076
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2077
+ }, "popState"),
2078
+ _currentRules: /* @__PURE__ */ y(function() {
2079
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2080
+ }, "_currentRules"),
2081
+ topState: /* @__PURE__ */ y(function(e) {
2082
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
2083
+ }, "topState"),
2084
+ pushState: /* @__PURE__ */ y(function(e) {
2085
+ this.begin(e);
2086
+ }, "pushState"),
2087
+ stateStackSize: /* @__PURE__ */ y(function() {
2088
+ return this.conditionStack.length;
2089
+ }, "stateStackSize"),
2090
+ options: { "case-insensitive": !0 },
2091
+ performAction: /* @__PURE__ */ y(function(e, t, n, r) {
2092
+ switch (n) {
2093
+ case 0: return 5;
2094
+ case 1: break;
2095
+ case 2: break;
2096
+ case 3: break;
2097
+ case 4: break;
2098
+ case 5: break;
2099
+ case 6: return 20;
2100
+ case 7: return this.begin("CONFIG"), 75;
2101
+ case 8: return 76;
2102
+ case 9: return this.popState(), this.begin("ALIAS"), 77;
2103
+ case 10: return this.popState(), this.popState(), 77;
2104
+ case 11: return t.yytext = t.yytext.trim(), 73;
2105
+ case 12: return t.yytext = t.yytext.trim(), this.begin("ALIAS"), 73;
2106
+ case 13: return t.yytext = t.yytext.trim(), this.popState(), 73;
2107
+ case 14: return this.popState(), 10;
2108
+ case 15: return t.yytext = t.yytext.trim(), this.popState(), 10;
2109
+ case 16: return this.begin("LINE"), 15;
2110
+ case 17: return this.begin("ID"), 51;
2111
+ case 18: return this.begin("ID"), 53;
2112
+ case 19: return 14;
2113
+ case 20: return this.begin("ID"), 54;
2114
+ case 21: return this.popState(), this.popState(), this.begin("LINE"), 52;
2115
+ case 22: return this.popState(), this.popState(), 5;
2116
+ case 23: return this.begin("LINE"), 37;
2117
+ case 24: return this.begin("LINE"), 38;
2118
+ case 25: return this.begin("LINE"), 39;
2119
+ case 26: return this.begin("LINE"), 40;
2120
+ case 27: return this.begin("LINE"), 50;
2121
+ case 28: return this.begin("LINE"), 42;
2122
+ case 29: return this.begin("LINE"), 44;
2123
+ case 30: return this.begin("LINE"), 49;
2124
+ case 31: return this.begin("LINE"), 45;
2125
+ case 32: return this.begin("LINE"), 48;
2126
+ case 33: return this.begin("LINE"), 47;
2127
+ case 34: return this.popState(), 16;
2128
+ case 35: return 17;
2129
+ case 36: return 67;
2130
+ case 37: return 68;
2131
+ case 38: return 61;
2132
+ case 39: return 62;
2133
+ case 40: return 63;
2134
+ case 41: return 64;
2135
+ case 42: return 59;
2136
+ case 43: return 56;
2137
+ case 44: return this.begin("ID"), 22;
2138
+ case 45: return this.begin("ID"), 24;
2139
+ case 46: return 30;
2140
+ case 47: return 31;
2141
+ case 48: return this.begin("acc_title"), 32;
2142
+ case 49: return this.popState(), "acc_title_value";
2143
+ case 50: return this.begin("acc_descr"), 34;
2144
+ case 51: return this.popState(), "acc_descr_value";
2145
+ case 52:
2146
+ this.begin("acc_descr_multiline");
2147
+ break;
2148
+ case 53:
2149
+ this.popState();
2150
+ break;
2151
+ case 54: return "acc_descr_multiline_value";
2152
+ case 55: return 6;
2153
+ case 56: return 19;
2154
+ case 57: return 21;
2155
+ case 58: return 66;
2156
+ case 59: return 5;
2157
+ case 60: return t.yytext = t.yytext.trim(), 73;
2158
+ case 61: return 80;
2159
+ case 62: return 97;
2160
+ case 63: return 98;
2161
+ case 64: return 99;
2162
+ case 65: return 78;
2163
+ case 66: return 79;
2164
+ case 67: return 100;
2165
+ case 68: return 101;
2166
+ case 69: return 102;
2167
+ case 70: return 103;
2168
+ case 71: return 85;
2169
+ case 72: return 86;
2170
+ case 73: return 87;
2171
+ case 74: return 88;
2172
+ case 75: return 93;
2173
+ case 76: return 94;
2174
+ case 77: return 95;
2175
+ case 78: return 96;
2176
+ case 79: return 81;
2177
+ case 80: return 82;
2178
+ case 81: return 83;
2179
+ case 82: return 84;
2180
+ case 83: return 89;
2181
+ case 84: return 90;
2182
+ case 85: return 91;
2183
+ case 86: return 92;
2184
+ case 87: return 104;
2185
+ case 88: return 104;
2186
+ case 89: return 70;
2187
+ case 90: return 71;
2188
+ case 91: return 72;
2189
+ case 92: return 5;
2190
+ case 93: return 10;
2191
+ }
2192
+ }, "anonymous"),
2193
+ rules: [
2194
+ /^(?:[\n]+)/i,
2195
+ /^(?:\s+)/i,
2196
+ /^(?:((?!\n)\s)+)/i,
2197
+ /^(?:#[^\n]*)/i,
2198
+ /^(?:%(?!\{)[^\n]*)/i,
2199
+ /^(?:[^\}]%%[^\n]*)/i,
2200
+ /^(?:[0-9]+(?=[ \n]+))/i,
2201
+ /^(?:@\{)/i,
2202
+ /^(?:[^\}]+)/i,
2203
+ /^(?:\}(?=\s+as\s))/i,
2204
+ /^(?:\})/i,
2205
+ /^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,
2206
+ /^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,
2207
+ /^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,
2208
+ /^(?:[^<>:\n,;@]*<[^\n]*)/i,
2209
+ /^(?:[^\n]+)/i,
2210
+ /^(?:box\b)/i,
2211
+ /^(?:participant\b)/i,
2212
+ /^(?:actor\b)/i,
2213
+ /^(?:create\b)/i,
2214
+ /^(?:destroy\b)/i,
2215
+ /^(?:as\b)/i,
2216
+ /^(?:(?:))/i,
2217
+ /^(?:loop\b)/i,
2218
+ /^(?:rect\b)/i,
2219
+ /^(?:opt\b)/i,
2220
+ /^(?:alt\b)/i,
2221
+ /^(?:else\b)/i,
2222
+ /^(?:par\b)/i,
2223
+ /^(?:par_over\b)/i,
2224
+ /^(?:and\b)/i,
2225
+ /^(?:critical\b)/i,
2226
+ /^(?:option\b)/i,
2227
+ /^(?:break\b)/i,
2228
+ /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,
2229
+ /^(?:end\b)/i,
2230
+ /^(?:left of\b)/i,
2231
+ /^(?:right of\b)/i,
2232
+ /^(?:links\b)/i,
2233
+ /^(?:link\b)/i,
2234
+ /^(?:properties\b)/i,
2235
+ /^(?:details\b)/i,
2236
+ /^(?:over\b)/i,
2237
+ /^(?:note\b)/i,
2238
+ /^(?:activate\b)/i,
2239
+ /^(?:deactivate\b)/i,
2240
+ /^(?:title\s[^#\n;]+)/i,
2241
+ /^(?:title:\s[^#\n;]+)/i,
2242
+ /^(?:accTitle\s*:\s*)/i,
2243
+ /^(?:(?!\n||)*[^\n]*)/i,
2244
+ /^(?:accDescr\s*:\s*)/i,
2245
+ /^(?:(?!\n||)*[^\n]*)/i,
2246
+ /^(?:accDescr\s*\{\s*)/i,
2247
+ /^(?:[\}])/i,
2248
+ /^(?:[^\}]*)/i,
2249
+ /^(?:sequenceDiagram\b)/i,
2250
+ /^(?:autonumber\b)/i,
2251
+ /^(?:off\b)/i,
2252
+ /^(?:,)/i,
2253
+ /^(?:;)/i,
2254
+ /^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,
2255
+ /^(?:->>)/i,
2256
+ /^(?:<<->>)/i,
2257
+ /^(?:-->>)/i,
2258
+ /^(?:<<-->>)/i,
2259
+ /^(?:->)/i,
2260
+ /^(?:-->)/i,
2261
+ /^(?:-[x])/i,
2262
+ /^(?:--[x])/i,
2263
+ /^(?:-[\)])/i,
2264
+ /^(?:--[\)])/i,
2265
+ /^(?:--\|\\)/i,
2266
+ /^(?:--\|\/)/i,
2267
+ /^(?:--\\\\)/i,
2268
+ /^(?:--\/\/)/i,
2269
+ /^(?:\/\|--)/i,
2270
+ /^(?:\\\|--)/i,
2271
+ /^(?:\/\/--)/i,
2272
+ /^(?:\\\\--)/i,
2273
+ /^(?:-\|\\)/i,
2274
+ /^(?:-\|\/)/i,
2275
+ /^(?:-\\\\)/i,
2276
+ /^(?:-\/\/)/i,
2277
+ /^(?:\/\|-)/i,
2278
+ /^(?:\\\|-)/i,
2279
+ /^(?:\/\/-)/i,
2280
+ /^(?:\\\\-)/i,
2281
+ /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,
2282
+ /^(?::)/i,
2283
+ /^(?:\+)/i,
2284
+ /^(?:-)/i,
2285
+ /^(?:\(\))/i,
2286
+ /^(?:$)/i,
2287
+ /^(?:.)/i
2288
+ ],
2289
+ conditions: {
2290
+ acc_descr_multiline: {
2291
+ rules: [53, 54],
2292
+ inclusive: !1
2293
+ },
2294
+ acc_descr: {
2295
+ rules: [51],
2296
+ inclusive: !1
2297
+ },
2298
+ acc_title: {
2299
+ rules: [49],
2300
+ inclusive: !1
2301
+ },
2302
+ ID: {
2303
+ rules: [
2304
+ 2,
2305
+ 3,
2306
+ 7,
2307
+ 11,
2308
+ 12,
2309
+ 13,
2310
+ 14,
2311
+ 15
2312
+ ],
2313
+ inclusive: !1
2314
+ },
2315
+ ALIAS: {
2316
+ rules: [
2317
+ 2,
2318
+ 3,
2319
+ 21,
2320
+ 22
2321
+ ],
2322
+ inclusive: !1
2323
+ },
2324
+ LINE: {
2325
+ rules: [
2326
+ 2,
2327
+ 3,
2328
+ 34
2329
+ ],
2330
+ inclusive: !1
2331
+ },
2332
+ CONFIG: {
2333
+ rules: [
2334
+ 8,
2335
+ 9,
2336
+ 10
2337
+ ],
2338
+ inclusive: !1
2339
+ },
2340
+ CONFIG_DATA: {
2341
+ rules: [],
2342
+ inclusive: !1
2343
+ },
2344
+ INITIAL: {
2345
+ rules: [
2346
+ 0,
2347
+ 1,
2348
+ 3,
2349
+ 4,
2350
+ 5,
2351
+ 6,
2352
+ 16,
2353
+ 17,
2354
+ 18,
2355
+ 19,
2356
+ 20,
2357
+ 23,
2358
+ 24,
2359
+ 25,
2360
+ 26,
2361
+ 27,
2362
+ 28,
2363
+ 29,
2364
+ 30,
2365
+ 31,
2366
+ 32,
2367
+ 33,
2368
+ 35,
2369
+ 36,
2370
+ 37,
2371
+ 38,
2372
+ 39,
2373
+ 40,
2374
+ 41,
2375
+ 42,
2376
+ 43,
2377
+ 44,
2378
+ 45,
2379
+ 46,
2380
+ 47,
2381
+ 48,
2382
+ 50,
2383
+ 52,
2384
+ 55,
2385
+ 56,
2386
+ 57,
2387
+ 58,
2388
+ 59,
2389
+ 60,
2390
+ 61,
2391
+ 62,
2392
+ 63,
2393
+ 64,
2394
+ 65,
2395
+ 66,
2396
+ 67,
2397
+ 68,
2398
+ 69,
2399
+ 70,
2400
+ 71,
2401
+ 72,
2402
+ 73,
2403
+ 74,
2404
+ 75,
2405
+ 76,
2406
+ 77,
2407
+ 78,
2408
+ 79,
2409
+ 80,
2410
+ 81,
2411
+ 82,
2412
+ 83,
2413
+ 84,
2414
+ 85,
2415
+ 86,
2416
+ 87,
2417
+ 88,
2418
+ 89,
2419
+ 90,
2420
+ 91,
2421
+ 92,
2422
+ 93
2423
+ ],
2424
+ inclusive: !0
2425
+ }
2426
+ }
2427
+ };
2428
+ })();
2429
+ function Te() {
2430
+ this.yy = {};
2431
+ }
2432
+ return y(Te, "Parser"), Te.prototype = we, we.Parser = Te, new Te();
2433
+ })();
2434
+ P.parser = P;
2435
+ var F = P, I = {
2436
+ SOLID: 0,
2437
+ DOTTED: 1,
2438
+ NOTE: 2,
2439
+ SOLID_CROSS: 3,
2440
+ DOTTED_CROSS: 4,
2441
+ SOLID_OPEN: 5,
2442
+ DOTTED_OPEN: 6,
2443
+ LOOP_START: 10,
2444
+ LOOP_END: 11,
2445
+ ALT_START: 12,
2446
+ ALT_ELSE: 13,
2447
+ ALT_END: 14,
2448
+ OPT_START: 15,
2449
+ OPT_END: 16,
2450
+ ACTIVE_START: 17,
2451
+ ACTIVE_END: 18,
2452
+ PAR_START: 19,
2453
+ PAR_AND: 20,
2454
+ PAR_END: 21,
2455
+ RECT_START: 22,
2456
+ RECT_END: 23,
2457
+ SOLID_POINT: 24,
2458
+ DOTTED_POINT: 25,
2459
+ AUTONUMBER: 26,
2460
+ CRITICAL_START: 27,
2461
+ CRITICAL_OPTION: 28,
2462
+ CRITICAL_END: 29,
2463
+ BREAK_START: 30,
2464
+ BREAK_END: 31,
2465
+ PAR_OVER_START: 32,
2466
+ BIDIRECTIONAL_SOLID: 33,
2467
+ BIDIRECTIONAL_DOTTED: 34,
2468
+ SOLID_TOP: 41,
2469
+ SOLID_BOTTOM: 42,
2470
+ STICK_TOP: 43,
2471
+ STICK_BOTTOM: 44,
2472
+ SOLID_ARROW_TOP_REVERSE: 45,
2473
+ SOLID_ARROW_BOTTOM_REVERSE: 46,
2474
+ STICK_ARROW_TOP_REVERSE: 47,
2475
+ STICK_ARROW_BOTTOM_REVERSE: 48,
2476
+ SOLID_TOP_DOTTED: 51,
2477
+ SOLID_BOTTOM_DOTTED: 52,
2478
+ STICK_TOP_DOTTED: 53,
2479
+ STICK_BOTTOM_DOTTED: 54,
2480
+ SOLID_ARROW_TOP_REVERSE_DOTTED: 55,
2481
+ SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 56,
2482
+ STICK_ARROW_TOP_REVERSE_DOTTED: 57,
2483
+ STICK_ARROW_BOTTOM_REVERSE_DOTTED: 58,
2484
+ CENTRAL_CONNECTION: 59,
2485
+ CENTRAL_CONNECTION_REVERSE: 60,
2486
+ CENTRAL_CONNECTION_DUAL: 61
2487
+ }, L = {
2488
+ FILLED: 0,
2489
+ OPEN: 1
2490
+ }, ee = {
2491
+ LEFTOF: 0,
2492
+ RIGHTOF: 1,
2493
+ OVER: 2
2494
+ }, R = {
2495
+ ACTOR: "actor",
2496
+ BOUNDARY: "boundary",
2497
+ COLLECTIONS: "collections",
2498
+ CONTROL: "control",
2499
+ DATABASE: "database",
2500
+ ENTITY: "entity",
2501
+ PARTICIPANT: "participant",
2502
+ QUEUE: "queue"
2503
+ }, te = class {
2504
+ constructor() {
2505
+ this.state = new M(() => ({
2506
+ prevActor: void 0,
2507
+ actors: /* @__PURE__ */ new Map(),
2508
+ createdActors: /* @__PURE__ */ new Map(),
2509
+ destroyedActors: /* @__PURE__ */ new Map(),
2510
+ boxes: [],
2511
+ messages: [],
2512
+ notes: [],
2513
+ sequenceNumbersEnabled: !1,
2514
+ wrapEnabled: void 0,
2515
+ currentBox: void 0,
2516
+ lastCreated: void 0,
2517
+ lastDestroyed: void 0
2518
+ })), this.setAccTitle = o, this.setAccDescription = e, this.setDiagramTitle = s, this.getAccTitle = g, this.getAccDescription = c, this.getDiagramTitle = t, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(u().wrap), this.LINETYPE = I, this.ARROWTYPE = L, this.PLACEMENT = ee;
2519
+ }
2520
+ static {
2521
+ y(this, "SequenceDB");
2522
+ }
2523
+ addBox(e) {
2524
+ this.state.records.boxes.push({
2525
+ name: e.text,
2526
+ wrap: e.wrap ?? this.autoWrap(),
2527
+ fill: e.color,
2528
+ actorKeys: []
2529
+ }), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
2530
+ }
2531
+ addActor(e, t, n, r, i) {
2532
+ let a = this.state.records.currentBox, o;
2533
+ if (i !== void 0) {
2534
+ let e;
2535
+ e = i.includes("\n") ? i + "\n" : "{\n" + i + "\n}", o = w(e, { schema: T });
2536
+ }
2537
+ r = o?.type ?? r, o?.alias && (!n || n.text === t) && (n = {
2538
+ text: o.alias,
2539
+ wrap: n?.wrap,
2540
+ type: r
2541
+ });
2542
+ let s = this.state.records.actors.get(e);
2543
+ if (s) {
2544
+ if (this.state.records.currentBox && s.box && this.state.records.currentBox !== s.box) throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);
2545
+ if (a = s.box ? s.box : this.state.records.currentBox, s.box = a, s && t === s.name && n == null) return;
2546
+ }
2547
+ if (n?.text ?? (n = {
2548
+ text: t,
2549
+ type: r
2550
+ }), (r == null || n.text == null) && (n = {
2551
+ text: t,
2552
+ type: r
2553
+ }), this.state.records.actors.set(e, {
2554
+ box: a,
2555
+ name: t,
2556
+ description: n.text,
2557
+ wrap: n.wrap ?? this.autoWrap(),
2558
+ prevActor: this.state.records.prevActor,
2559
+ links: {},
2560
+ properties: {},
2561
+ actorCnt: null,
2562
+ rectData: null,
2563
+ type: r ?? "participant"
2564
+ }), this.state.records.prevActor) {
2565
+ let t = this.state.records.actors.get(this.state.records.prevActor);
2566
+ t && (t.nextActor = e);
2567
+ }
2568
+ this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(e), this.state.records.prevActor = e;
2569
+ }
2570
+ activationCount(e) {
2571
+ let t, n = 0;
2572
+ if (!e) return 0;
2573
+ for (t = 0; t < this.state.records.messages.length; t++) this.state.records.messages[t].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[t].from === e && n++, this.state.records.messages[t].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[t].from === e && n--;
2574
+ return n;
2575
+ }
2576
+ addMessage(e, t, n, r) {
2577
+ this.state.records.messages.push({
2578
+ id: this.state.records.messages.length.toString(),
2579
+ from: e,
2580
+ to: t,
2581
+ message: n.text,
2582
+ wrap: n.wrap ?? this.autoWrap(),
2583
+ answer: r
2584
+ });
2585
+ }
2586
+ addSignal(e, t, n, r, i = !1, a) {
2587
+ if (r === this.LINETYPE.ACTIVE_END && this.activationCount(e ?? "") < 1) {
2588
+ let t = /* @__PURE__ */ Error("Trying to inactivate an inactive participant (" + e + ")");
2589
+ throw t.hash = {
2590
+ text: "->>-",
2591
+ token: "->>-",
2592
+ line: "1",
2593
+ loc: {
2594
+ first_line: 1,
2595
+ last_line: 1,
2596
+ first_column: 1,
2597
+ last_column: 1
2598
+ },
2599
+ expected: ["'ACTIVE_PARTICIPANT'"]
2600
+ }, t;
2601
+ }
2602
+ return this.state.records.messages.push({
2603
+ id: this.state.records.messages.length.toString(),
2604
+ from: e,
2605
+ to: t,
2606
+ message: n?.text ?? "",
2607
+ wrap: n?.wrap ?? this.autoWrap(),
2608
+ type: r,
2609
+ activate: i,
2610
+ centralConnection: a ?? 0
2611
+ }), !0;
2612
+ }
2613
+ hasAtLeastOneBox() {
2614
+ return this.state.records.boxes.length > 0;
2615
+ }
2616
+ hasAtLeastOneBoxWithTitle() {
2617
+ return this.state.records.boxes.some((e) => e.name);
2618
+ }
2619
+ getMessages() {
2620
+ return this.state.records.messages;
2621
+ }
2622
+ getBoxes() {
2623
+ return this.state.records.boxes;
2624
+ }
2625
+ getActors() {
2626
+ return this.state.records.actors;
2627
+ }
2628
+ getCreatedActors() {
2629
+ return this.state.records.createdActors;
2630
+ }
2631
+ getDestroyedActors() {
2632
+ return this.state.records.destroyedActors;
2633
+ }
2634
+ getActor(e) {
2635
+ return this.state.records.actors.get(e);
2636
+ }
2637
+ getActorKeys() {
2638
+ return [...this.state.records.actors.keys()];
2639
+ }
2640
+ enableSequenceNumbers() {
2641
+ this.state.records.sequenceNumbersEnabled = !0;
2642
+ }
2643
+ disableSequenceNumbers() {
2644
+ this.state.records.sequenceNumbersEnabled = !1;
2645
+ }
2646
+ showSequenceNumbers() {
2647
+ return this.state.records.sequenceNumbersEnabled;
2648
+ }
2649
+ setWrap(e) {
2650
+ this.state.records.wrapEnabled = e;
2651
+ }
2652
+ extractWrap(e) {
2653
+ if (e === void 0) return {};
2654
+ e = e.trim();
2655
+ let t = /^:?wrap:/.exec(e) === null ? /^:?nowrap:/.exec(e) === null ? void 0 : !1 : !0;
2656
+ return {
2657
+ cleanedText: (t === void 0 ? e : e.replace(/^:?(?:no)?wrap:/, "")).trim(),
2658
+ wrap: t
2659
+ };
2660
+ }
2661
+ autoWrap() {
2662
+ return this.state.records.wrapEnabled === void 0 ? u().sequence?.wrap ?? !1 : this.state.records.wrapEnabled;
2663
+ }
2664
+ clear() {
2665
+ this.state.reset(), l();
2666
+ }
2667
+ parseMessage(e) {
2668
+ let t = e.trim(), { wrap: n, cleanedText: r } = this.extractWrap(t), i = {
2669
+ text: r,
2670
+ wrap: n
2671
+ };
2672
+ return v.debug(`parseMessage: ${JSON.stringify(i)}`), i;
2673
+ }
2674
+ parseBoxData(e) {
2675
+ let t = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e), n = t?.[1] ? t[1].trim() : "transparent", i = t?.[2] ? t[2].trim() : void 0;
2676
+ if (window?.CSS) window.CSS.supports("color", n) || (n = "transparent", i = e.trim());
2677
+ else {
2678
+ let t = new Option().style;
2679
+ t.color = n, t.color !== n && (n = "transparent", i = e.trim());
2680
+ }
2681
+ let { wrap: a, cleanedText: o } = this.extractWrap(i);
2682
+ return {
2683
+ text: o ? r(o, u()) : void 0,
2684
+ color: n,
2685
+ wrap: a
2686
+ };
2687
+ }
2688
+ addNote(e, t, n) {
2689
+ let r = {
2690
+ actor: e,
2691
+ placement: t,
2692
+ message: n.text,
2693
+ wrap: n.wrap ?? this.autoWrap()
2694
+ }, i = [].concat(e, e);
2695
+ this.state.records.notes.push(r), this.state.records.messages.push({
2696
+ id: this.state.records.messages.length.toString(),
2697
+ from: i[0],
2698
+ to: i[1],
2699
+ message: n.text,
2700
+ wrap: n.wrap ?? this.autoWrap(),
2701
+ type: this.LINETYPE.NOTE,
2702
+ placement: t
2703
+ });
2704
+ }
2705
+ addLinks(e, t) {
2706
+ let n = this.getActor(e);
2707
+ try {
2708
+ let e = r(t.text, u());
2709
+ e = e.replace(/&equals;/g, "="), e = e.replace(/&amp;/g, "&");
2710
+ let i = JSON.parse(e);
2711
+ this.insertLinks(n, i);
2712
+ } catch (e) {
2713
+ v.error("error while parsing actor link text", e);
2714
+ }
2715
+ }
2716
+ addALink(e, t) {
2717
+ let n = this.getActor(e);
2718
+ try {
2719
+ let e = {}, i = r(t.text, u()), a = i.indexOf("@");
2720
+ i = i.replace(/&equals;/g, "="), i = i.replace(/&amp;/g, "&");
2721
+ let o = i.slice(0, a - 1).trim();
2722
+ e[o] = i.slice(a + 1).trim(), this.insertLinks(n, e);
2723
+ } catch (e) {
2724
+ v.error("error while parsing actor link text", e);
2725
+ }
2726
+ }
2727
+ insertLinks(e, t) {
2728
+ if (e.links == null) e.links = t;
2729
+ else for (let n in t) e.links[n] = t[n];
2730
+ }
2731
+ addProperties(e, t) {
2732
+ let n = this.getActor(e);
2733
+ try {
2734
+ let e = r(t.text, u()), i = JSON.parse(e);
2735
+ this.insertProperties(n, i);
2736
+ } catch (e) {
2737
+ v.error("error while parsing actor properties text", e);
2738
+ }
2739
+ }
2740
+ insertProperties(e, t) {
2741
+ if (e.properties == null) e.properties = t;
2742
+ else for (let n in t) e.properties[n] = t[n];
2743
+ }
2744
+ boxEnd() {
2745
+ this.state.records.currentBox = void 0;
2746
+ }
2747
+ addDetails(e, t) {
2748
+ let n = this.getActor(e), r = document.getElementById(t.text);
2749
+ try {
2750
+ let e = r.innerHTML, t = JSON.parse(e);
2751
+ t.properties && this.insertProperties(n, t.properties), t.links && this.insertLinks(n, t.links);
2752
+ } catch (e) {
2753
+ v.error("error while parsing actor details text", e);
2754
+ }
2755
+ }
2756
+ getActorProperty(e, t) {
2757
+ if (e?.properties !== void 0) return e.properties[t];
2758
+ }
2759
+ apply(e) {
2760
+ if (Array.isArray(e)) e.forEach((e) => {
2761
+ this.apply(e);
2762
+ });
2763
+ else switch (e.type) {
2764
+ case "sequenceIndex":
2765
+ this.state.records.messages.push({
2766
+ id: this.state.records.messages.length.toString(),
2767
+ from: void 0,
2768
+ to: void 0,
2769
+ message: {
2770
+ start: e.sequenceIndex,
2771
+ step: e.sequenceIndexStep,
2772
+ visible: e.sequenceVisible
2773
+ },
2774
+ wrap: !1,
2775
+ type: e.signalType
2776
+ });
2777
+ break;
2778
+ case "addParticipant":
2779
+ this.addActor(e.actor, e.actor, e.description, e.draw, e.config);
2780
+ break;
2781
+ case "createParticipant":
2782
+ if (this.state.records.actors.has(e.actor)) throw 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");
2783
+ 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);
2784
+ break;
2785
+ case "destroyParticipant":
2786
+ this.state.records.lastDestroyed = e.actor, this.state.records.destroyedActors.set(e.actor, this.state.records.messages.length);
2787
+ break;
2788
+ case "activeStart":
2789
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2790
+ break;
2791
+ case "centralConnection":
2792
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2793
+ break;
2794
+ case "centralConnectionReverse":
2795
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2796
+ break;
2797
+ case "activeEnd":
2798
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2799
+ break;
2800
+ case "addNote":
2801
+ this.addNote(e.actor, e.placement, e.text);
2802
+ break;
2803
+ case "addLinks":
2804
+ this.addLinks(e.actor, e.text);
2805
+ break;
2806
+ case "addALink":
2807
+ this.addALink(e.actor, e.text);
2808
+ break;
2809
+ case "addProperties":
2810
+ this.addProperties(e.actor, e.text);
2811
+ break;
2812
+ case "addDetails":
2813
+ this.addDetails(e.actor, e.text);
2814
+ break;
2815
+ case "addMessage":
2816
+ if (this.state.records.lastCreated) {
2817
+ if (e.to !== this.state.records.lastCreated) throw Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
2818
+ this.state.records.lastCreated = void 0;
2819
+ } else if (this.state.records.lastDestroyed) {
2820
+ if (e.to !== this.state.records.lastDestroyed && e.from !== this.state.records.lastDestroyed) throw Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
2821
+ this.state.records.lastDestroyed = void 0;
2822
+ }
2823
+ this.addSignal(e.from, e.to, e.msg, e.signalType, e.activate, e.centralConnection);
2824
+ break;
2825
+ case "boxStart":
2826
+ this.addBox(e.boxData);
2827
+ break;
2828
+ case "boxEnd":
2829
+ this.boxEnd();
2830
+ break;
2831
+ case "loopStart":
2832
+ this.addSignal(void 0, void 0, e.loopText, e.signalType);
2833
+ break;
2834
+ case "loopEnd":
2835
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2836
+ break;
2837
+ case "rectStart":
2838
+ this.addSignal(void 0, void 0, e.color, e.signalType);
2839
+ break;
2840
+ case "rectEnd":
2841
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2842
+ break;
2843
+ case "optStart":
2844
+ this.addSignal(void 0, void 0, e.optText, e.signalType);
2845
+ break;
2846
+ case "optEnd":
2847
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2848
+ break;
2849
+ case "altStart":
2850
+ this.addSignal(void 0, void 0, e.altText, e.signalType);
2851
+ break;
2852
+ case "else":
2853
+ this.addSignal(void 0, void 0, e.altText, e.signalType);
2854
+ break;
2855
+ case "altEnd":
2856
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2857
+ break;
2858
+ case "setAccTitle":
2859
+ o(e.text);
2860
+ break;
2861
+ case "parStart":
2862
+ this.addSignal(void 0, void 0, e.parText, e.signalType);
2863
+ break;
2864
+ case "and":
2865
+ this.addSignal(void 0, void 0, e.parText, e.signalType);
2866
+ break;
2867
+ case "parEnd":
2868
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2869
+ break;
2870
+ case "criticalStart":
2871
+ this.addSignal(void 0, void 0, e.criticalText, e.signalType);
2872
+ break;
2873
+ case "option":
2874
+ this.addSignal(void 0, void 0, e.optionText, e.signalType);
2875
+ break;
2876
+ case "criticalEnd":
2877
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2878
+ break;
2879
+ case "breakStart":
2880
+ this.addSignal(void 0, void 0, e.breakText, e.signalType);
2881
+ break;
2882
+ case "breakEnd":
2883
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2884
+ break;
2885
+ }
2886
+ }
2887
+ getConfig() {
2888
+ return u().sequence;
2889
+ }
2890
+ }, ne = /* @__PURE__ */ y((e) => {
2891
+ let t = e.dropShadow ?? "none", { look: n } = u();
2892
+ return `.actor {
2893
+ stroke: ${e.actorBorder};
2894
+ fill: ${e.actorBkg};
2895
+ stroke-width: ${e.strokeWidth ?? 1};
2896
+ }
2897
+
2898
+ rect.actor.outer-path[data-look="neo"] {
2899
+ filter: ${t};
2900
+ }
2901
+
2902
+ rect.note[data-look="neo"] {
2903
+ stroke:${e.noteBorderColor};
2904
+ fill:${e.noteBkgColor};
2905
+ filter: ${t};
2906
+ }
2907
+
2908
+ text.actor > tspan {
2909
+ fill: ${e.actorTextColor};
2910
+ stroke: none;
2911
+ }
2912
+
2913
+ .actor-line {
2914
+ stroke: ${e.actorLineColor};
2915
+ }
2916
+
2917
+ .innerArc {
2918
+ stroke-width: 1.5;
2919
+ stroke-dasharray: none;
2920
+ }
2921
+
2922
+ .messageLine0 {
2923
+ stroke-width: 1.5;
2924
+ stroke-dasharray: none;
2925
+ stroke: ${e.signalColor};
2926
+ }
2927
+
2928
+ .messageLine1 {
2929
+ stroke-width: 1.5;
2930
+ stroke-dasharray: 2, 2;
2931
+ stroke: ${e.signalColor};
2932
+ }
2933
+
2934
+ [id$="-arrowhead"] path {
2935
+ fill: ${e.signalColor};
2936
+ stroke: ${e.signalColor};
2937
+ }
2938
+
2939
+ .sequenceNumber {
2940
+ fill: ${e.sequenceNumberColor};
2941
+ }
2942
+
2943
+ [id$="-sequencenumber"] {
2944
+ fill: ${e.signalColor};
2945
+ }
2946
+
2947
+ [id$="-crosshead"] path {
2948
+ fill: ${e.signalColor};
2949
+ stroke: ${e.signalColor};
2950
+ }
2951
+
2952
+ .messageText {
2953
+ fill: ${e.signalTextColor};
2954
+ stroke: none;
2955
+ }
2956
+
2957
+ .labelBox {
2958
+ stroke: ${e.labelBoxBorderColor};
2959
+ fill: ${e.labelBoxBkgColor};
2960
+ filter: ${n === "neo" ? t : "none"};
2961
+ }
2962
+
2963
+ .labelText, .labelText > tspan {
2964
+ fill: ${e.labelTextColor};
2965
+ stroke: none;
2966
+ }
2967
+
2968
+ .loopText, .loopText > tspan {
2969
+ fill: ${e.loopTextColor};
2970
+ stroke: none;
2971
+ }
2972
+
2973
+ .loopLine {
2974
+ stroke-width: 2px;
2975
+ stroke-dasharray: 2, 2;
2976
+ stroke: ${e.labelBoxBorderColor};
2977
+ fill: ${e.labelBoxBorderColor};
2978
+ }
2979
+
2980
+ .note {
2981
+ //stroke: #decc93;
2982
+ stroke: ${e.noteBorderColor};
2983
+ fill: ${e.noteBkgColor};
2984
+ }
2985
+
2986
+ .noteText, .noteText > tspan {
2987
+ fill: ${e.noteTextColor};
2988
+ stroke: none;
2989
+ ${e.noteFontWeight ? `font-weight: ${e.noteFontWeight};` : ""}
2990
+ }
2991
+
2992
+ .activation0 {
2993
+ fill: ${e.activationBkgColor};
2994
+ stroke: ${e.activationBorderColor};
2995
+ }
2996
+
2997
+ .activation1 {
2998
+ fill: ${e.activationBkgColor};
2999
+ stroke: ${e.activationBorderColor};
3000
+ }
3001
+
3002
+ .activation2 {
3003
+ fill: ${e.activationBkgColor};
3004
+ stroke: ${e.activationBorderColor};
3005
+ }
3006
+
3007
+ .actorPopupMenu {
3008
+ position: absolute;
3009
+ }
3010
+
3011
+ .actorPopupMenuPanel {
3012
+ position: absolute;
3013
+ fill: ${e.actorBkg};
3014
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
3015
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
3016
+ }
3017
+ .actor-man circle, line {
3018
+ fill: ${e.actorBkg};
3019
+ stroke-width: 2px;
3020
+ }
3021
+
3022
+ g rect.rect {
3023
+ filter: ${t};
3024
+ stroke: ${e.nodeBorder};
3025
+ }
3026
+ `;
3027
+ }, "getStyles"), z = 36, B = "actor-top", V = "actor-bottom", re = "actor-box", H = "actor-man", U = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), W = /* @__PURE__ */ y(function(e, t) {
3028
+ let n = E(e, t);
3029
+ return _().look === "neo" && n.attr("data-look", "neo"), n;
3030
+ }, "drawRect"), ie = /* @__PURE__ */ y(function(e, t, n, r, i) {
3031
+ if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0) return {
3032
+ height: 0,
3033
+ width: 0
3034
+ };
3035
+ let a = t.links, o = t.actorCnt, s = t.rectData;
3036
+ var c = "none";
3037
+ i && (c = "block !important");
3038
+ let l = e.append("g");
3039
+ l.attr("id", "actor" + o + "_popup"), l.attr("class", "actorPopupMenu"), l.attr("display", c);
3040
+ var u = "";
3041
+ s.class !== void 0 && (u = " " + s.class);
3042
+ let d = s.width > n ? s.width : n, f = l.append("rect");
3043
+ if (f.attr("class", "actorPopupMenuPanel" + u), f.attr("x", s.x), f.attr("y", s.height), f.attr("fill", s.fill), f.attr("stroke", s.stroke), f.attr("width", d), f.attr("height", s.height), f.attr("rx", s.rx), f.attr("ry", s.ry), a != null) {
3044
+ var p = 20;
3045
+ for (let e in a) {
3046
+ var m = l.append("a"), h = (0, N.sanitizeUrl)(a[e]);
3047
+ m.attr("xlink:href", h), m.attr("target", "_blank"), je(r)(e, m, s.x + 10, s.height + p, d, 20, { class: "actor" }, r), p += 30;
3048
+ }
3049
+ }
3050
+ return f.attr("height", p), {
3051
+ height: s.height + p,
3052
+ width: d
3053
+ };
3054
+ }, "drawPopup"), ae = /* @__PURE__ */ y(function(e) {
3055
+ return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
3056
+ }, "popupMenuToggle"), oe = /* @__PURE__ */ y(async function(e, t, n = null) {
3057
+ let r = e.append("foreignObject"), a = await i(t.text, _()), o = r.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();
3058
+ if (r.attr("height", Math.round(o.height)).attr("width", Math.round(o.width)), t.class === "noteText") {
3059
+ let n = e.node().firstChild;
3060
+ n.setAttribute("height", o.height + 2 * t.textMargin);
3061
+ let i = n.getBBox();
3062
+ r.attr("x", Math.round(i.x + i.width / 2 - o.width / 2)).attr("y", Math.round(i.y + i.height / 2 - o.height / 2));
3063
+ } else if (n) {
3064
+ let { startx: e, stopx: i, starty: a } = n;
3065
+ if (e > i) {
3066
+ let t = e;
3067
+ e = i, i = t;
3068
+ }
3069
+ r.attr("x", Math.round(e + Math.abs(e - i) / 2 - o.width / 2)), t.class === "loopText" ? r.attr("y", Math.round(a)) : r.attr("y", Math.round(a - o.height));
3070
+ }
3071
+ return [r];
3072
+ }, "drawKatex"), G = /* @__PURE__ */ y(function(e, t) {
3073
+ let n = 0, r = 0, i = t.text.split(h.lineBreakRegex), [a, o] = S(t.fontSize), s = [], c = 0, l = /* @__PURE__ */ y(() => t.y, "yfunc");
3074
+ if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0) switch (t.valign) {
3075
+ case "top":
3076
+ case "start":
3077
+ l = /* @__PURE__ */ y(() => Math.round(t.y + t.textMargin), "yfunc");
3078
+ break;
3079
+ case "middle":
3080
+ case "center":
3081
+ l = /* @__PURE__ */ y(() => Math.round(t.y + (n + r + t.textMargin) / 2), "yfunc");
3082
+ break;
3083
+ case "bottom":
3084
+ case "end":
3085
+ l = /* @__PURE__ */ y(() => Math.round(t.y + (n + r + 2 * t.textMargin) - t.textMargin), "yfunc");
3086
+ break;
3087
+ }
3088
+ if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0) switch (t.anchor) {
3089
+ case "left":
3090
+ case "start":
3091
+ t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3092
+ break;
3093
+ case "middle":
3094
+ case "center":
3095
+ t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3096
+ break;
3097
+ case "right":
3098
+ case "end":
3099
+ t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3100
+ break;
3101
+ }
3102
+ for (let [u, d] of i.entries()) {
3103
+ t.textMargin !== void 0 && t.textMargin === 0 && a !== void 0 && (c = u * a);
3104
+ let i = e.append("text");
3105
+ i.attr("x", t.x), i.attr("y", l()), t.anchor !== void 0 && i.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && i.style("font-family", t.fontFamily), o !== void 0 && i.style("font-size", o), t.fontWeight !== void 0 && i.style("font-weight", t.fontWeight), t.fill !== void 0 && i.attr("fill", t.fill), t.class !== void 0 && i.attr("class", t.class), t.dy === void 0 ? c !== 0 && i.attr("dy", c) : i.attr("dy", t.dy);
3106
+ let f = d || "​";
3107
+ if (t.tspan) {
3108
+ let e = i.append("tspan");
3109
+ e.attr("x", t.x), t.fill !== void 0 && e.attr("fill", t.fill), e.text(f);
3110
+ } else i.text(f);
3111
+ t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (r += (i._groups || i)[0][0].getBBox().height, n = r), s.push(i);
3112
+ }
3113
+ return s;
3114
+ }, "drawText"), se = /* @__PURE__ */ y(function(e, t) {
3115
+ function n(e, t, n, r, i) {
3116
+ return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
3117
+ }
3118
+ y(n, "genPoints");
3119
+ let r = e.append("polygon");
3120
+ return r.attr("points", n(t.x, t.y, t.width, t.height, 7)), r.attr("class", "labelBox"), t.y += t.height / 2, G(e, t), r;
3121
+ }, "drawLabel"), K = -1, ce = /* @__PURE__ */ y((e, t, n, r) => {
3122
+ e.select && n.forEach((n) => {
3123
+ let i = t.get(n), a = e.select("#actor" + i.actorCnt);
3124
+ !r.mirrorActors && i.stopy ? a.attr("y2", i.stopy + i.height / 2) : r.mirrorActors && a.attr("y2", i.stopy);
3125
+ });
3126
+ }, "fixLifeLineHeights"), le = /* @__PURE__ */ y(function(e, t, n, r, i) {
3127
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + t.height, { look: c, theme: l, themeVariables: u } = n, { bkgColorArray: d, borderColorArray: f } = u, m = e.append("g").lower();
3128
+ var h = m;
3129
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && h.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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), h = m.append("g"), t.actorCnt = K, t.links != null && h.attr("id", "root-" + K), c === "neo" && h.attr("data-look", "neo"));
3130
+ let g = j();
3131
+ var _ = "actor";
3132
+ t.properties?.class ? _ = t.properties.class : g.fill = "#eaeaea", r ? _ += ` ${V}` : _ += ` ${B}`, g.x = t.x, g.y = a, g.width = t.width, g.height = t.height, g.class = _, g.rx = 3, g.ry = 3, g.name = t.name, c === "neo" && (g.rx = 6, g.ry = 6);
3133
+ let v = W(h, g), y = i.get(t.name) ?? 0;
3134
+ if (U.has(l) && (v.style("stroke", f[y % f.length]), v.style("fill", d[y % f.length])), c === "neo" && v.attr("filter", "url(#drop-shadow)"), t.rectData = g, t.properties?.icon) {
3135
+ let e = t.properties.icon.trim();
3136
+ e.charAt(0) === "@" ? A(h, g.x + g.width - 20, g.y + 10, e.substr(1)) : O(h, g.x + g.width - 20, g.y + 10, e);
3137
+ }
3138
+ r || (h.attr("data-et", "participant"), h.attr("data-type", "participant"), h.attr("data-id", t.name)), Y(n, p(t.description))(t.description, h, g.x, g.y, g.width, g.height, { class: `actor ${re}` }, n);
3139
+ let b = t.height;
3140
+ if (v.node) {
3141
+ let e = v.node().getBBox();
3142
+ t.height = e.height, b = e.height;
3143
+ }
3144
+ return b;
3145
+ }, "drawActorTypeParticipant"), ue = /* @__PURE__ */ y(function(e, t, n, r, i) {
3146
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + t.height, { look: c, theme: l, themeVariables: u } = n, { bkgColorArray: d, borderColorArray: f } = u, m = e.append("g").lower();
3147
+ var h = m;
3148
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && h.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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), h = m.append("g"), t.actorCnt = K, t.links != null && h.attr("id", "root-" + K), c === "neo" && h.attr("data-look", "neo"));
3149
+ let g = j();
3150
+ var _ = "actor";
3151
+ t.properties?.class ? _ = t.properties.class : g.fill = "#eaeaea", r ? _ += ` ${V}` : _ += ` ${B}`, g.x = t.x, g.y = a, g.width = t.width, g.height = t.height, g.class = _, g.name = t.name;
3152
+ let v = {
3153
+ ...g,
3154
+ x: g.x + -6,
3155
+ y: g.y + 6,
3156
+ class: "actor"
3157
+ }, y = W(h, g), b = W(h, v);
3158
+ t.rectData = g, c === "neo" && h.attr("filter", "url(#drop-shadow)");
3159
+ let x = i.get(t.name) ?? 0;
3160
+ if (U.has(l) && (y.style("stroke", f[x % f.length]), y.style("fill", d[x % f.length]), b.style("stroke", f[x % f.length]), b.style("fill", d[x % f.length])), t.properties?.icon) {
3161
+ let e = t.properties.icon.trim();
3162
+ e.charAt(0) === "@" ? A(h, g.x + g.width - 20, g.y + 10, e.substr(1)) : O(h, g.x + g.width - 20, g.y + 10, e);
3163
+ }
3164
+ Y(n, p(t.description))(t.description, h, g.x - 6, g.y + 6, g.width, g.height, { class: `actor ${re}` }, n);
3165
+ let S = t.height;
3166
+ if (y.node) {
3167
+ let e = y.node().getBBox();
3168
+ t.height = e.height, S = e.height;
3169
+ }
3170
+ return r || (h.attr("data-et", "participant"), h.attr("data-type", "collections"), h.attr("data-id", t.name)), S;
3171
+ }, "drawActorTypeCollections"), de = /* @__PURE__ */ y(function(e, t, n, r, i) {
3172
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + t.height, { look: c, theme: l, themeVariables: u } = n, { bkgColorArray: d, borderColorArray: f } = u, m = e.append("g").lower(), h = m;
3173
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && h.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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), h = m.append("g"), t.actorCnt = K, t.links != null && h.attr("id", "root-" + K), c === "neo" && h.attr("data-look", "neo"));
3174
+ let g = j(), _ = "actor";
3175
+ t.properties?.class ? _ = t.properties.class : g.fill = "#eaeaea", r ? _ += ` ${V}` : _ += ` ${B}`, h.attr("class", _), g.x = t.x, g.y = a, g.width = t.width, g.height = t.height, g.name = t.name;
3176
+ let v = g.height / 2, y = v / (2.5 + g.height / 50), b = h.append("g"), x = h.append("g"), S = `M ${g.x},${g.y + v}
3177
+ a ${y},${v} 0 0 0 0,${g.height}
3178
+ h ${g.width - 2 * y}
3179
+ a ${y},${v} 0 0 0 0,-${g.height}
3180
+ Z
3181
+ `;
3182
+ b.append("path").attr("d", S), x.append("path").attr("d", `M ${g.x},${g.y + v}
3183
+ a ${y},${v} 0 0 0 0,${g.height}`), b.attr("transform", `translate(${y}, ${-(g.height / 2)})`), x.attr("transform", `translate(${g.width - y}, ${-g.height / 2})`), t.rectData = g, c === "neo" && b.attr("filter", "url(#drop-shadow)");
3184
+ let C = i.get(t.name) ?? 0;
3185
+ if (U.has(l) && (b.style("stroke", f[C % f.length]), b.style("fill", d[C % f.length]), x.style("stroke", f[C % f.length]), x.style("fill", d[C % f.length])), t.properties?.icon) {
3186
+ let e = t.properties.icon.trim(), n = g.x + g.width - 20, r = g.y + 10;
3187
+ e.charAt(0) === "@" ? A(h, n, r, e.substr(1)) : O(h, n, r, e);
3188
+ }
3189
+ Y(n, p(t.description))(t.description, h, g.x, g.y, g.width, g.height, { class: `actor ${re}` }, n);
3190
+ let w = t.height, T = b.select("path:last-child");
3191
+ if (T.node()) {
3192
+ let e = T.node().getBBox();
3193
+ t.height = e.height, w = e.height;
3194
+ }
3195
+ return r || (h.attr("data-et", "participant"), h.attr("data-type", "queue"), h.attr("data-id", t.name)), w;
3196
+ }, "drawActorTypeQueue"), fe = /* @__PURE__ */ y(function(e, t, n, r, i, a) {
3197
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + 75, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: m, actorBorder: h, actorBkg: g } = d, _ = e.append("g").lower();
3198
+ r || (K++, _.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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 = K);
3199
+ let v = e.append("g"), y = H;
3200
+ r ? y += ` ${V}` : y += ` ${B}`, v.attr("class", y), v.attr("name", t.name);
3201
+ let b = j();
3202
+ b.x = t.x, b.y = o, b.fill = "#eaeaea", b.width = t.width, b.height = t.height, b.class = "actor";
3203
+ let x = t.x + t.width / 2, S = o + 32;
3204
+ v.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"), v.append("circle").attr("cx", x).attr("cy", S).attr("r", 22).attr("filter", `${l === "neo" ? "url(#drop-shadow)" : ""}`), v.append("line").attr("marker-end", "url(#" + i + "-filled-head-control)").attr("transform", `translate(${x}, ${S - 22})`);
3205
+ let C = a.get(t.name) ?? 0;
3206
+ return U.has(u) ? (v.style("stroke", m[C % m.length]), v.style("fill", f[C % m.length])) : (v.style("stroke", h), v.style("fill", g)), t.height = v.node().getBBox().height + 2 * (n?.sequence?.labelBoxHeight ?? 0), Y(n, p(t.description))(t.description, v, b.x, b.y + 22 + (r ? 5 : 12), b.width, b.height, { class: `actor ${H}` }, n), r || (v.attr("data-et", "participant"), v.attr("data-type", "control"), v.attr("data-id", t.name)), t.height;
3207
+ }, "drawActorTypeControl"), pe = /* @__PURE__ */ y(function(e, t, n, r, i) {
3208
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + 75, { look: c, theme: l, themeVariables: u } = n, { bkgColorArray: d, borderColorArray: f } = u, m = e.append("g").lower(), h = e.append("g"), g = "actor";
3209
+ r ? g += ` ${V}` : g += ` ${B}`, h.attr("class", g), h.attr("name", t.name);
3210
+ let _ = j();
3211
+ _.x = t.x, _.y = a, _.fill = "#eaeaea", _.width = t.width, _.height = t.height, _.class = "actor";
3212
+ let v = t.x + t.width / 2, y = a + (r ? 10 : 25);
3213
+ h.append("circle").attr("cx", v).attr("cy", y).attr("r", 22).attr("width", t.width).attr("height", t.height), h.append("line").attr("x1", v - 22).attr("x2", v + 22).attr("y1", y + 22).attr("y2", y + 22).attr("stroke-width", 2), c === "neo" && h.attr("filter", "url(#drop-shadow)");
3214
+ let b = i.get(t.name) ?? 0;
3215
+ return U.has(l) && (h.style("stroke", f[b % f.length]), h.style("fill", d[b % f.length])), t.height = h.node().getBBox().height + (n?.sequence?.labelBoxHeight ?? 0), r || (K++, m.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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 = K), Y(n, p(t.description))(t.description, h, _.x, _.y + (r ? 15 : 30), _.width, _.height, { class: `actor ${H}` }, n), r ? h.attr("transform", "translate(0, 22)") : (h.attr("transform", `translate(0, ${22 / 2 - 5})`), h.attr("data-et", "participant"), h.attr("data-type", "entity"), h.attr("data-id", t.name)), t.height;
3216
+ }, "drawActorTypeEntity"), me = /* @__PURE__ */ y(function(e, t, n, r, i) {
3217
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + t.height + 2 * n.boxTextMargin, { theme: c, themeVariables: l, look: u } = n, { bkgColorArray: d, borderColorArray: f, actorBorder: m } = l, h = e.append("g").lower(), g = h;
3218
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && g.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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), g = h.append("g"), t.actorCnt = K, t.links != null && g.attr("id", "root-" + K), u === "neo" && g.attr("data-look", "neo"));
3219
+ let _ = j(), v = "actor";
3220
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", r ? v += ` ${V}` : v += ` ${B}`, _.x = t.x, _.y = a, _.width = t.width, _.height = t.height, _.class = v, _.name = t.name, _.x = t.x, _.y = a;
3221
+ let y = _.width / 3, b = _.width / 3, x = y / 2, S = x / (2.5 + y / 50), C = g.append("g");
3222
+ C.attr("class", v);
3223
+ let w = `
3224
+ M ${_.x},${_.y + S}
3225
+ a ${x},${S} 0 0 0 ${y},0
3226
+ a ${x},${S} 0 0 0 -${y},0
3227
+ l 0,${b - 2 * S}
3228
+ a ${x},${S} 0 0 0 ${y},0
3229
+ l 0,-${b - 2 * S}
3230
+ `;
3231
+ C.append("path").attr("d", w), u === "neo" && C.attr("filter", "url(#drop-shadow)");
3232
+ let T = i.get(t.name) ?? 0;
3233
+ U.has(c) ? (C.style("stroke", f[T % f.length]), C.style("fill", d[T % f.length])) : C.style("stroke", m), C.attr("transform", `translate(${y}, ${S})`), t.rectData = _, Y(n, p(t.description))(t.description, g, _.x, _.y + 35, _.width, _.height, { class: `actor ${re}` }, n);
3234
+ let E = C.select("path:last-child");
3235
+ return E.node() && (t.height = E.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0)), r || (g.attr("data-et", "participant"), g.attr("data-type", "database"), g.attr("data-id", t.name)), t.height;
3236
+ }, "drawActorTypeDatabase"), he = /* @__PURE__ */ y(function(e, t, n, r, i) {
3237
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + 80, c = e.append("g").lower(), { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: m, actorBorder: h } = d;
3238
+ r || (K++, c.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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 = K);
3239
+ let g = e.append("g"), _ = H;
3240
+ r ? _ += ` ${V}` : _ += ` ${B}`, g.attr("class", _), g.attr("name", t.name);
3241
+ let v = j();
3242
+ v.x = t.x, v.y = a, v.fill = "#eaeaea", v.width = t.width, v.height = t.height, v.class = "actor", g.append("line").attr("id", "actor-man-torso" + K).attr("x1", t.x + t.width / 2 - 22 * 2.5).attr("y1", a + 12).attr("x2", t.x + t.width / 2 - 15).attr("y2", a + 12), g.append("line").attr("id", "actor-man-arms" + K).attr("x1", t.x + t.width / 2 - 22 * 2.5).attr("y1", a + 2).attr("x2", t.x + t.width / 2 - 22 * 2.5).attr("y2", a + 22), g.append("circle").attr("cx", t.x + t.width / 2).attr("cy", a + 12).attr("r", 22), l === "neo" && g.attr("filter", "url(#drop-shadow)");
3243
+ let y = i.get(t.name) ?? 0;
3244
+ return U.has(u) ? (g.style("stroke", m[y % m.length]), g.style("fill", f[y % m.length])) : g.style("stroke", h), t.height = g.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0), Y(n, p(t.description))(t.description, g, v.x, v.y + 15, v.width, v.height, { class: `actor ${H}` }, n), g.attr("transform", "translate(0,21)"), r || (g.attr("data-et", "participant"), g.attr("data-type", "boundary"), g.attr("data-id", t.name)), t.height;
3245
+ }, "drawActorTypeBoundary"), ge = /* @__PURE__ */ y(function(e, t, n, r, i) {
3246
+ let a = r ? t.stopy : t.starty, o = t.x + t.width / 2, s = a + 80, { look: c, theme: l, themeVariables: u } = n, { bkgColorArray: d, borderColorArray: f, actorBorder: m } = u, h = e.append("g").lower();
3247
+ r || (K++, h.append("line").attr("id", "actor" + K).attr("x1", o).attr("y1", s).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 = K);
3248
+ let g = e.append("g"), _ = H;
3249
+ r ? _ += ` ${V}` : _ += ` ${B}`, g.attr("class", _), g.attr("name", t.name), r || g.attr("data-et", "participant").attr("data-type", "actor").attr("data-id", t.name);
3250
+ let v = c === "neo" ? .5 : 1, y = c === "neo" ? a + (1 - v) * 30 : a;
3251
+ g.append("line").attr("id", "actor-man-torso" + K).attr("x1", o).attr("y1", y + 25 * v).attr("x2", o).attr("y2", y + 45 * v), g.append("line").attr("id", "actor-man-arms" + K).attr("x1", o - z / 2 * v).attr("y1", y + 33 * v).attr("x2", o + z / 2 * v).attr("y2", y + 33 * v), g.append("line").attr("x1", o - z / 2 * v).attr("y1", y + 60 * v).attr("x2", o).attr("y2", y + 45 * v), g.append("line").attr("x1", o).attr("y1", y + 45 * v).attr("x2", o + (z / 2 - 2) * v).attr("y2", y + 60 * v);
3252
+ let b = g.append("circle");
3253
+ b.attr("cx", t.x + t.width / 2), b.attr("cy", y + 10 * v), b.attr("r", 15 * v), b.attr("width", t.width * v), b.attr("height", t.height * v), t.height = g.node().getBBox().height;
3254
+ let x = j();
3255
+ x.x = t.x, x.y = y, x.fill = "#eaeaea", x.width = t.width, x.height = t.height / v, x.class = "actor", x.rx = 3, x.ry = 3;
3256
+ let S = i.get(t.name) ?? 0;
3257
+ return U.has(l) ? (g.style("stroke", f[S % f.length]), g.style("fill", d[S % f.length])) : g.style("stroke", m), Y(n, p(t.description))(t.description, g, x.x, y + 35 * v - (c === "neo" ? 10 : 0), x.width, x.height, { class: `actor ${H}` }, n), t.height;
3258
+ }, "drawActorTypeActor"), _e = /* @__PURE__ */ y(async function(e, t, n, r, i, a, o) {
3259
+ let s = o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]));
3260
+ switch (t.type) {
3261
+ case "actor": return await ge(e, t, n, r, s);
3262
+ case "participant": return await le(e, t, n, r, s);
3263
+ case "boundary": return await he(e, t, n, r, s);
3264
+ case "control": return await fe(e, t, n, r, i, s);
3265
+ case "entity": return await pe(e, t, n, r, s);
3266
+ case "database": return await me(e, t, n, r, s);
3267
+ case "collections": return await ue(e, t, n, r, s);
3268
+ case "queue": return await de(e, t, n, r, s);
3269
+ }
3270
+ }, "drawActor"), ve = /* @__PURE__ */ y(function(e, t, n) {
3271
+ let r = e.append("g");
3272
+ Se(r, t), t.name && Y(n)(t.name, r, t.x, t.y + n.boxTextMargin + (t.textMaxHeight || 0) / 2, t.width, 0, { class: "text" }, n), r.lower();
3273
+ }, "drawBox"), ye = /* @__PURE__ */ y(function(e) {
3274
+ return e.append("g");
3275
+ }, "anchorElement"), be = /* @__PURE__ */ y(function(e, t, n, r, i, a, o) {
3276
+ let { theme: s, themeVariables: c } = r, { bkgColorArray: l, borderColorArray: u, mainBkg: d } = c, f = j(), p = t.anchored, m = t.actor;
3277
+ f.x = t.startx, f.y = t.starty, f.class = "activation" + i % 3, f.width = t.stopx - t.startx, f.height = n - t.starty;
3278
+ let h = W(p, f), g = (o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]))).get(m) ?? 0;
3279
+ U.has(s) && (h.style("stroke", u[g % u.length]), h.style("fill", l[g % u.length] ?? d));
3280
+ }, "drawActivation"), xe = /* @__PURE__ */ y(async function(e, t, n, r, i) {
3281
+ let { boxMargin: a, boxTextMargin: o, labelBoxHeight: s, labelBoxWidth: c, messageFontFamily: l, messageFontSize: u, messageFontWeight: d } = r, f = e.append("g").attr("data-et", "control-structure").attr("data-id", "i" + i.id), m = /* @__PURE__ */ y(function(e, t, n, r) {
3282
+ return f.append("line").attr("x1", e).attr("y1", t).attr("x2", n).attr("y2", r).attr("class", "loopLine");
3283
+ }, "drawLoopLine");
3284
+ m(t.startx, t.starty, t.stopx, t.starty), m(t.stopx, t.starty, t.stopx, t.stopy), m(t.startx, t.stopy, t.stopx, t.stopy), m(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(e) {
3285
+ m(t.startx, e.y, t.stopx, e.y).style("stroke-dasharray", "3, 3");
3286
+ });
3287
+ let h = D();
3288
+ h.text = n, h.x = t.startx, h.y = t.starty, h.fontFamily = l, h.fontSize = u, h.fontWeight = d, h.anchor = "middle", h.valign = "middle", h.tspan = !1, h.width = Math.max(c ?? 0, 50), h.height = s + (r.look === "neo" ? 15 : 0) || 20, h.textMargin = o, h.class = "labelText", se(f, h), h = ke(), h.text = t.title, h.x = t.startx + c / 2 + (t.stopx - t.startx) / 2, h.y = t.starty + a + o, h.anchor = "middle", h.valign = "middle", h.textMargin = o, h.class = "loopText", h.fontFamily = l, h.fontSize = u, h.fontWeight = d, h.wrap = !0;
3289
+ let g = p(h.text) ? await oe(f, h, t) : G(f, h);
3290
+ if (t.sectionTitles !== void 0) {
3291
+ for (let [e, n] of Object.entries(t.sectionTitles)) if (n.message) {
3292
+ h.text = n.message, h.x = t.startx + (t.stopx - t.startx) / 2, h.y = t.sections[e].y + a + o, h.class = "loopText", h.anchor = "middle", h.valign = "middle", h.tspan = !1, h.fontFamily = l, h.fontSize = u, h.fontWeight = d, h.wrap = t.wrap, p(h.text) ? (t.starty = t.sections[e].y, await oe(f, h, t)) : G(f, h);
3293
+ let r = Math.round(g.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3294
+ t.sections[e].height += r - (a + o);
3295
+ }
3296
+ }
3297
+ return t.height = Math.round(t.stopy - t.starty), f;
3298
+ }, "drawLoop"), Se = /* @__PURE__ */ y(function(e, t) {
3299
+ k(e, t);
3300
+ }, "drawBackgroundRect"), Ce = /* @__PURE__ */ y(function(e, t) {
3301
+ 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");
3302
+ }, "insertDatabaseIcon"), q = /* @__PURE__ */ y(function(e, t) {
3303
+ 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");
3304
+ }, "insertComputerIcon"), J = /* @__PURE__ */ y(function(e, t) {
3305
+ 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");
3306
+ }, "insertClockIcon"), we = /* @__PURE__ */ y(function(e, t) {
3307
+ 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");
3308
+ }, "insertArrowHead"), Te = /* @__PURE__ */ y(function(e, t) {
3309
+ 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");
3310
+ }, "insertArrowFilledHead"), Ee = /* @__PURE__ */ y(function(e, t) {
3311
+ 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);
3312
+ }, "insertSequenceNumber"), De = /* @__PURE__ */ y(function(e, t) {
3313
+ 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");
3314
+ }, "insertArrowCrossHead"), Oe = /* @__PURE__ */ y(function(e, t) {
3315
+ let { theme: n } = t;
3316
+ 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", `${n === "redux" || n === "redux-color" ? "#000000" : "#FFFFFF"}`);
3317
+ }, "insertDropShadow"), ke = /* @__PURE__ */ y(function() {
3318
+ return {
3319
+ x: 0,
3320
+ y: 0,
3321
+ fill: void 0,
3322
+ anchor: void 0,
3323
+ style: "#666",
3324
+ width: void 0,
3325
+ height: void 0,
3326
+ textMargin: 0,
3327
+ rx: 0,
3328
+ ry: 0,
3329
+ tspan: !0,
3330
+ valign: void 0
3331
+ };
3332
+ }, "getTextObj"), Ae = /* @__PURE__ */ y(function() {
3333
+ return {
3334
+ x: 0,
3335
+ y: 0,
3336
+ fill: "#EDF2AE",
3337
+ stroke: "#666",
3338
+ width: 100,
3339
+ anchor: "start",
3340
+ height: 100,
3341
+ rx: 0,
3342
+ ry: 0
3343
+ };
3344
+ }, "getNoteRect"), Y = /* @__PURE__ */ (function() {
3345
+ function e(e, t, n, r, i, o, s) {
3346
+ a(t.append("text").attr("x", n + i / 2).attr("y", r + o / 2 + 5).style("text-anchor", "middle").text(e), s);
3347
+ }
3348
+ y(e, "byText");
3349
+ function t(e, t, n, r, i, o, s, c) {
3350
+ let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, [f, p] = S(l), m = e.split(h.lineBreakRegex);
3351
+ for (let e = 0; e < m.length; e++) {
3352
+ let c = e * f - f * (m.length - 1) / 2, l = t.append("text").attr("x", n + i / 2).attr("y", r).style("text-anchor", "middle").style("font-size", p).style("font-weight", d).style("font-family", u);
3353
+ l.append("tspan").attr("x", n + i / 2).attr("dy", c).text(m[e]), l.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(l, s);
3354
+ }
3355
+ }
3356
+ y(t, "byTspan");
3357
+ function n(e, n, r, i, o, s, c, l) {
3358
+ let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", i).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3359
+ d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, i, o, s, c, l), a(d, c);
3360
+ }
3361
+ y(n, "byFo");
3362
+ async function r(e, n, r, o, s, c, l, u) {
3363
+ let d = await f(e, _()), p = n.append("switch"), m = p.append("foreignObject").attr("x", r + s / 2 - d.width / 2).attr("y", o + c / 2 - d.height / 2).attr("width", d.width).attr("height", d.height).append("xhtml:div").style("height", "100%").style("width", "100%");
3364
+ m.append("div").style("text-align", "center").style("vertical-align", "middle").html(await i(e, _())), t(e, p, r, o, s, c, l, u), a(m, l);
3365
+ }
3366
+ y(r, "byKatex");
3367
+ function a(e, t) {
3368
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3369
+ }
3370
+ return y(a, "_setTextAttrs"), function(i, a = !1) {
3371
+ return a ? r : i.textPlacement === "fo" ? n : i.textPlacement === "old" ? e : t;
3372
+ };
3373
+ })(), je = /* @__PURE__ */ (function() {
3374
+ function e(e, t, n, i, a, o, s) {
3375
+ r(t.append("text").attr("x", n).attr("y", i).style("text-anchor", "start").text(e), s);
3376
+ }
3377
+ y(e, "byText");
3378
+ function t(e, t, n, i, a, o, s, c) {
3379
+ let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, f = e.split(h.lineBreakRegex);
3380
+ for (let e = 0; e < f.length; e++) {
3381
+ let a = e * l - l * (f.length - 1) / 2, c = t.append("text").attr("x", n).attr("y", i).style("text-anchor", "start").style("font-size", l).style("font-weight", d).style("font-family", u);
3382
+ c.append("tspan").attr("x", n).attr("dy", a).text(f[e]), c.attr("y", i + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), r(c, s);
3383
+ }
3384
+ }
3385
+ y(t, "byTspan");
3386
+ function n(e, n, i, a, o, s, c, l) {
3387
+ let u = n.append("switch"), d = u.append("foreignObject").attr("x", i).attr("y", a).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3388
+ d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, i, a, o, s, c, l), r(d, c);
3389
+ }
3390
+ y(n, "byFo");
3391
+ function r(e, t) {
3392
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3393
+ }
3394
+ return y(r, "_setTextAttrs"), function(r) {
3395
+ return r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
3396
+ };
3397
+ })(), X = {
3398
+ drawRect: W,
3399
+ drawText: G,
3400
+ drawLabel: se,
3401
+ drawActor: _e,
3402
+ drawBox: ve,
3403
+ drawPopup: ie,
3404
+ anchorElement: ye,
3405
+ drawActivation: be,
3406
+ drawLoop: xe,
3407
+ drawBackgroundRect: Se,
3408
+ insertArrowHead: we,
3409
+ insertArrowFilledHead: Te,
3410
+ insertSequenceNumber: Ee,
3411
+ insertArrowCrossHead: De,
3412
+ insertDatabaseIcon: Ce,
3413
+ insertComputerIcon: q,
3414
+ insertClockIcon: J,
3415
+ getTextObj: ke,
3416
+ getNoteRect: Ae,
3417
+ fixLifeLineHeights: ce,
3418
+ sanitizeUrl: N.sanitizeUrl,
3419
+ insertDropShadow: Oe,
3420
+ insertSolidTopArrowHead: /* @__PURE__ */ y(function(e, t) {
3421
+ 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");
3422
+ }, "insertSolidTopArrowHead"),
3423
+ insertSolidBottomArrowHead: /* @__PURE__ */ y(function(e, t) {
3424
+ e.append("defs").append("marker").attr("id", t + "-solidBottomArrowHead").attr("refX", 7.9).attr("refY", .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");
3425
+ }, "insertSolidBottomArrowHead"),
3426
+ insertStickTopArrowHead: /* @__PURE__ */ y(function(e, t) {
3427
+ 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");
3428
+ }, "insertStickTopArrowHead"),
3429
+ insertStickBottomArrowHead: /* @__PURE__ */ y(function(e, t) {
3430
+ 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");
3431
+ }, "insertStickBottomArrowHead")
3432
+ }, Z = {}, Q = {
3433
+ data: {
3434
+ startx: void 0,
3435
+ stopx: void 0,
3436
+ starty: void 0,
3437
+ stopy: void 0
3438
+ },
3439
+ verticalPos: 0,
3440
+ sequenceItems: [],
3441
+ activations: [],
3442
+ models: {
3443
+ getHeight: /* @__PURE__ */ y(function() {
3444
+ 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));
3445
+ }, "getHeight"),
3446
+ clear: /* @__PURE__ */ y(function() {
3447
+ this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
3448
+ }, "clear"),
3449
+ addBox: /* @__PURE__ */ y(function(e) {
3450
+ this.boxes.push(e);
3451
+ }, "addBox"),
3452
+ addActor: /* @__PURE__ */ y(function(e) {
3453
+ this.actors.push(e);
3454
+ }, "addActor"),
3455
+ addLoop: /* @__PURE__ */ y(function(e) {
3456
+ this.loops.push(e);
3457
+ }, "addLoop"),
3458
+ addMessage: /* @__PURE__ */ y(function(e) {
3459
+ this.messages.push(e);
3460
+ }, "addMessage"),
3461
+ addNote: /* @__PURE__ */ y(function(e) {
3462
+ this.notes.push(e);
3463
+ }, "addNote"),
3464
+ lastActor: /* @__PURE__ */ y(function() {
3465
+ return this.actors[this.actors.length - 1];
3466
+ }, "lastActor"),
3467
+ lastLoop: /* @__PURE__ */ y(function() {
3468
+ return this.loops[this.loops.length - 1];
3469
+ }, "lastLoop"),
3470
+ lastMessage: /* @__PURE__ */ y(function() {
3471
+ return this.messages[this.messages.length - 1];
3472
+ }, "lastMessage"),
3473
+ lastNote: /* @__PURE__ */ y(function() {
3474
+ return this.notes[this.notes.length - 1];
3475
+ }, "lastNote"),
3476
+ actors: [],
3477
+ boxes: [],
3478
+ loops: [],
3479
+ messages: [],
3480
+ notes: []
3481
+ },
3482
+ init: /* @__PURE__ */ y(function() {
3483
+ this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
3484
+ startx: void 0,
3485
+ stopx: void 0,
3486
+ starty: void 0,
3487
+ stopy: void 0
3488
+ }, this.verticalPos = 0, He(u());
3489
+ }, "init"),
3490
+ updateVal: /* @__PURE__ */ y(function(e, t, n, r) {
3491
+ e[t] === void 0 ? e[t] = n : e[t] = r(n, e[t]);
3492
+ }, "updateVal"),
3493
+ updateBounds: /* @__PURE__ */ y(function(e, t, n, r) {
3494
+ let i = this, a = 0;
3495
+ function o(o) {
3496
+ return /* @__PURE__ */ y(function(s) {
3497
+ a++;
3498
+ let c = i.sequenceItems.length - a + 1;
3499
+ i.updateVal(s, "starty", t - c * Z.boxMargin, Math.min), i.updateVal(s, "stopy", r + c * Z.boxMargin, Math.max), i.updateVal(Q.data, "startx", e - c * Z.boxMargin, Math.min), i.updateVal(Q.data, "stopx", n + c * Z.boxMargin, Math.max), o !== "activation" && (i.updateVal(s, "startx", e - c * Z.boxMargin, Math.min), i.updateVal(s, "stopx", n + c * Z.boxMargin, Math.max), i.updateVal(Q.data, "starty", t - c * Z.boxMargin, Math.min), i.updateVal(Q.data, "stopy", r + c * Z.boxMargin, Math.max));
3500
+ }, "updateItemBounds");
3501
+ }
3502
+ y(o, "updateFn"), this.sequenceItems.forEach(o()), this.activations.forEach(o("activation"));
3503
+ }, "updateBounds"),
3504
+ insert: /* @__PURE__ */ y(function(e, t, n, r) {
3505
+ let i = h.getMin(e, n), a = h.getMax(e, n), o = h.getMin(t, r), s = h.getMax(t, r);
3506
+ this.updateVal(Q.data, "startx", i, Math.min), this.updateVal(Q.data, "starty", o, Math.min), this.updateVal(Q.data, "stopx", a, Math.max), this.updateVal(Q.data, "stopy", s, Math.max), this.updateBounds(i, o, a, s);
3507
+ }, "insert"),
3508
+ newActivation: /* @__PURE__ */ y(function(e, t, n) {
3509
+ let r = n.get(e.from), i = Ue(e.from).length || 0, a = r.x + r.width / 2 + (i - 1) * Z.activationWidth / 2;
3510
+ this.activations.push({
3511
+ startx: a,
3512
+ starty: this.verticalPos + 2,
3513
+ stopx: a + Z.activationWidth,
3514
+ stopy: void 0,
3515
+ actor: e.from,
3516
+ anchored: X.anchorElement(t)
3517
+ });
3518
+ }, "newActivation"),
3519
+ endActivation: /* @__PURE__ */ y(function(e) {
3520
+ let t = this.activations.map(function(e) {
3521
+ return e.actor;
3522
+ }).lastIndexOf(e.from);
3523
+ return this.activations.splice(t, 1)[0];
3524
+ }, "endActivation"),
3525
+ createLoop: /* @__PURE__ */ y(function(e = {
3526
+ message: void 0,
3527
+ wrap: !1,
3528
+ width: void 0
3529
+ }, t) {
3530
+ return {
3531
+ startx: void 0,
3532
+ starty: this.verticalPos,
3533
+ stopx: void 0,
3534
+ stopy: void 0,
3535
+ title: e.message,
3536
+ wrap: e.wrap,
3537
+ width: e.width,
3538
+ height: 0,
3539
+ fill: t
3540
+ };
3541
+ }, "createLoop"),
3542
+ newLoop: /* @__PURE__ */ y(function(e = {
3543
+ message: void 0,
3544
+ wrap: !1,
3545
+ width: void 0
3546
+ }, t) {
3547
+ this.sequenceItems.push(this.createLoop(e, t));
3548
+ }, "newLoop"),
3549
+ endLoop: /* @__PURE__ */ y(function() {
3550
+ return this.sequenceItems.pop();
3551
+ }, "endLoop"),
3552
+ isLoopOverlap: /* @__PURE__ */ y(function() {
3553
+ return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
3554
+ }, "isLoopOverlap"),
3555
+ addSectionToLoop: /* @__PURE__ */ y(function(e) {
3556
+ let t = this.sequenceItems.pop();
3557
+ t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({
3558
+ y: Q.getVerticalPos(),
3559
+ height: 0
3560
+ }), t.sectionTitles.push(e), this.sequenceItems.push(t);
3561
+ }, "addSectionToLoop"),
3562
+ saveVerticalPos: /* @__PURE__ */ y(function() {
3563
+ this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
3564
+ }, "saveVerticalPos"),
3565
+ resetVerticalPos: /* @__PURE__ */ y(function() {
3566
+ this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
3567
+ }, "resetVerticalPos"),
3568
+ bumpVerticalPos: /* @__PURE__ */ y(function(e) {
3569
+ this.verticalPos += e, this.data.stopy = h.getMax(this.data.stopy, this.verticalPos);
3570
+ }, "bumpVerticalPos"),
3571
+ getVerticalPos: /* @__PURE__ */ y(function() {
3572
+ return this.verticalPos;
3573
+ }, "getVerticalPos"),
3574
+ getBounds: /* @__PURE__ */ y(function() {
3575
+ return {
3576
+ bounds: this.data,
3577
+ models: this.models
3578
+ };
3579
+ }, "getBounds")
3580
+ }, Me = /* @__PURE__ */ y(async function(e, t, n) {
3581
+ Q.bumpVerticalPos(Z.boxMargin), t.height = Z.boxMargin, t.starty = Q.getVerticalPos();
3582
+ let r = j();
3583
+ r.x = t.startx, r.y = t.starty, r.width = t.width || Z.width, r.class = "note";
3584
+ let i = e.append("g");
3585
+ i.attr("data-et", "note"), i.attr("data-id", "i" + n);
3586
+ let a = X.drawRect(i, r), o = D();
3587
+ o.x = t.startx, o.y = t.starty, o.width = r.width, o.dy = "1em", o.text = t.message, o.class = "noteText", o.fontFamily = Z.noteFontFamily, o.fontSize = Z.noteFontSize, o.fontWeight = Z.noteFontWeight, o.anchor = Z.noteAlign, o.textMargin = Z.noteMargin, o.valign = "center";
3588
+ let s = p(o.text) ? await oe(i, o) : G(i, o), c = Math.round(s.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3589
+ a.attr("height", c + 2 * Z.noteMargin), t.height += c + 2 * Z.noteMargin, Q.bumpVerticalPos(c + 2 * Z.noteMargin), t.stopy = t.starty + c + 2 * Z.noteMargin, t.stopx = t.startx + r.width, Q.insert(t.startx, t.starty, t.stopx, t.stopy), Q.models.addNote(t);
3590
+ }, "drawNote"), Ne = /* @__PURE__ */ y(function(e, t, n, r, i, a, o) {
3591
+ let s = r.db.getActors(), c = s.get(t.from), l = s.get(t.to), u = n.sequenceVisible, d = c.x + c.width / 2, f = l.x + l.width / 2, p = d <= f, m = tt(t, r), h = e.append("g"), g = 16.5, _ = /* @__PURE__ */ y((e, t) => {
3592
+ let n = e ? g : -g;
3593
+ return t ? -n : n;
3594
+ }, "getCircleOffset"), v = /* @__PURE__ */ y((e) => {
3595
+ h.append("circle").attr("cx", e).attr("cy", o).attr("r", 5).attr("width", 10).attr("height", 10);
3596
+ }, "drawCircle"), { CENTRAL_CONNECTION: b, CENTRAL_CONNECTION_REVERSE: x, CENTRAL_CONNECTION_DUAL: S } = r.db.LINETYPE;
3597
+ if (u) switch (t.centralConnection) {
3598
+ case b:
3599
+ m && (f += _(p, !0));
3600
+ break;
3601
+ case x:
3602
+ m || (d += _(p, !1));
3603
+ break;
3604
+ case S:
3605
+ m ? f += _(p, !0) : d += _(p, !1);
3606
+ break;
3607
+ }
3608
+ switch (t.centralConnection) {
3609
+ case b:
3610
+ v(f);
3611
+ break;
3612
+ case x:
3613
+ v(d);
3614
+ break;
3615
+ case S:
3616
+ v(d), v(f);
3617
+ break;
3618
+ }
3619
+ }, "drawCentralConnection"), Pe = /* @__PURE__ */ y((e) => ({
3620
+ fontFamily: e.messageFontFamily,
3621
+ fontSize: e.messageFontSize,
3622
+ fontWeight: e.messageFontWeight
3623
+ }), "messageFont"), Fe = /* @__PURE__ */ y((e) => ({
3624
+ fontFamily: e.noteFontFamily,
3625
+ fontSize: e.noteFontSize,
3626
+ fontWeight: e.noteFontWeight
3627
+ }), "noteFont"), Ie = /* @__PURE__ */ y((e) => ({
3628
+ fontFamily: e.actorFontFamily,
3629
+ fontSize: e.actorFontSize,
3630
+ fontWeight: e.actorFontWeight
3631
+ }), "actorFont");
3632
+ async function Le(e, t) {
3633
+ Q.bumpVerticalPos(10);
3634
+ let { startx: n, stopx: r, message: i } = t, a = h.splitBreaks(i).length, o = p(i), s = o ? await f(i, u()) : C.calculateTextDimensions(i, Pe(Z));
3635
+ if (!o) {
3636
+ let e = s.height / a;
3637
+ t.height += e, Q.bumpVerticalPos(e);
3638
+ }
3639
+ let c, l = s.height - 10, d = s.width;
3640
+ if (n === r) {
3641
+ c = Q.getVerticalPos() + l, Z.rightAngles || (l += Z.boxMargin, c = Q.getVerticalPos() + l), l += 30;
3642
+ let e = h.getMax(d / 2, Z.width / 2);
3643
+ Q.insert(n - e, Q.getVerticalPos() - 10 + l, r + e, Q.getVerticalPos() + 30 + l);
3644
+ } else l += Z.boxMargin, c = Q.getVerticalPos() + l, Q.insert(n, c - 10, r, c);
3645
+ return Q.bumpVerticalPos(l), t.height += l, t.stopy = t.starty + t.height, Q.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), c;
3646
+ }
3647
+ y(Le, "boundMessage");
3648
+ var Re = /* @__PURE__ */ y(async function(e, t, r, i, a, o) {
3649
+ let { startx: s, stopx: c, starty: l, message: u, type: d, sequenceIndex: f, sequenceVisible: m } = t, g = C.calculateTextDimensions(u, Pe(Z)), _ = D();
3650
+ _.x = s, _.y = l + 10, _.width = c - s, _.class = "messageText", _.dy = "1em", _.text = u, _.fontFamily = Z.messageFontFamily, _.fontSize = Z.messageFontSize, _.fontWeight = Z.messageFontWeight, _.anchor = Z.messageAlign, _.valign = "center", _.textMargin = Z.wrapPadding, _.tspan = !1, p(_.text) ? await oe(e, _, {
3651
+ startx: s,
3652
+ stopx: c,
3653
+ starty: r
3654
+ }) : G(e, _);
3655
+ let v = g.width, y;
3656
+ if (s === c) {
3657
+ let n = m || Z.showSequenceNumbers, o = tt(a, i), l = nt(a, i), u = s + (n && (o || l) ? 10 : 0);
3658
+ y = Z.rightAngles ? e.append("path").attr("d", `M ${u},${r} H ${s + h.getMax(Z.width / 2, v / 2)} V ${r + 25} H ${s}`) : e.append("path").attr("d", "M " + u + "," + r + " C " + (u + 60) + "," + (r - 10) + " " + (s + 60) + "," + (r + 30) + " " + s + "," + (r + 20)), $e(a, i) && Ne(e, a, t, i, s, c, r);
3659
+ } else y = e.append("line"), y.attr("x1", s), y.attr("y1", r), y.attr("x2", c), y.attr("y2", r), $e(a, i) && Ne(e, a, t, i, s, c, r);
3660
+ d === i.db.LINETYPE.DOTTED || d === i.db.LINETYPE.DOTTED_CROSS || d === i.db.LINETYPE.DOTTED_POINT || d === i.db.LINETYPE.DOTTED_OPEN || d === i.db.LINETYPE.BIDIRECTIONAL_DOTTED || d === i.db.LINETYPE.SOLID_TOP_DOTTED || d === i.db.LINETYPE.SOLID_BOTTOM_DOTTED || d === i.db.LINETYPE.STICK_TOP_DOTTED || d === i.db.LINETYPE.STICK_BOTTOM_DOTTED || d === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || d === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || d === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || d === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED ? (y.style("stroke-dasharray", "3, 3"), y.attr("class", "messageLine1")) : y.attr("class", "messageLine0"), y.attr("data-et", "message"), y.attr("data-id", "i" + t.id), y.attr("data-from", t.from), y.attr("data-to", t.to);
3661
+ let b = "";
3662
+ if (Z.arrowMarkerAbsolute && (b = n(!0)), y.attr("stroke-width", 2), y.attr("stroke", "none"), y.style("fill", "none"), (d === i.db.LINETYPE.SOLID_TOP || d === i.db.LINETYPE.SOLID_TOP_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-solidTopArrowHead)"), (d === i.db.LINETYPE.SOLID_BOTTOM || d === i.db.LINETYPE.SOLID_BOTTOM_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-solidBottomArrowHead)"), (d === i.db.LINETYPE.STICK_TOP || d === i.db.LINETYPE.STICK_TOP_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-stickTopArrowHead)"), (d === i.db.LINETYPE.STICK_BOTTOM || d === i.db.LINETYPE.STICK_BOTTOM_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-stickBottomArrowHead)"), (d === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || d === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-solidBottomArrowHead)"), (d === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || d === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-solidTopArrowHead)"), (d === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE || d === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-stickBottomArrowHead)"), (d === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || d === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-stickTopArrowHead)"), (d === i.db.LINETYPE.SOLID || d === i.db.LINETYPE.DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-arrowhead)"), (d === i.db.LINETYPE.BIDIRECTIONAL_SOLID || d === i.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (y.attr("marker-start", "url(" + b + "#" + o + "-arrowhead)"), y.attr("marker-end", "url(" + b + "#" + o + "-arrowhead)")), (d === i.db.LINETYPE.SOLID_POINT || d === i.db.LINETYPE.DOTTED_POINT) && y.attr("marker-end", "url(" + b + "#" + o + "-filled-head)"), (d === i.db.LINETYPE.SOLID_CROSS || d === i.db.LINETYPE.DOTTED_CROSS) && y.attr("marker-end", "url(" + b + "#" + o + "-crosshead)"), m || Z.showSequenceNumbers) {
3663
+ let n = d === i.db.LINETYPE.BIDIRECTIONAL_SOLID || d === i.db.LINETYPE.BIDIRECTIONAL_DOTTED, l = d === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || d === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || d === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || d === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || d === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE || d === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || d === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || d === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED, u = $e(a, i), p = s, m = c;
3664
+ n ? (s < c ? p = s + 12 : (p = s - 6 + (u ? -5 : 0), p += a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_DUAL || a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), y.attr("x1", p)) : l ? (c > s ? m = c - 12 : (m = c - 6, p += a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_DUAL || a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), m += u ? 15 : 0, y.attr("x2", m), y.attr("x1", p)) : y.attr("x1", s + 6);
3665
+ let h = 0, g = s === c, _ = s <= c;
3666
+ h = g ? t.fromBounds + 1 : l ? _ ? t.toBounds - 1 : t.fromBounds + 1 : _ ? t.fromBounds + 1 : t.toBounds - 1, e.append("line").attr("x1", h).attr("y1", r).attr("x2", h).attr("y2", r).attr("stroke-width", 0).attr("marker-start", "url(" + b + "#" + o + "-sequencenumber)"), e.append("text").attr("x", h).attr("y", r + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(f);
3667
+ }
3668
+ }, "drawMessage"), ze = /* @__PURE__ */ y(function(e, t, n, r, i, a, o) {
3669
+ let s = 0, c = 0, l, u = 0;
3670
+ for (let e of r) {
3671
+ let r = t.get(e), a = r.box;
3672
+ l && l != a && (o || Q.models.addBox(l), c += Z.boxMargin + l.margin), a && a != l && (o || (a.x = s + c, a.y = i), c += a.margin), r.width = h.getMax(r.width || Z.width, Z.width), r.height = h.getMax(r.height || Z.height, Z.height), r.margin = r.margin || Z.actorMargin, u = h.getMax(u, r.height), n.get(r.name) && (c += r.width / 2), r.x = s + c, r.starty = Q.getVerticalPos(), Q.insert(r.x, i, r.x + r.width, r.height), s += r.width + c, r.box && (r.box.width = s + a.margin - r.box.x), c = r.margin, l = r.box, Q.models.addActor(r);
3673
+ }
3674
+ l && !o && Q.models.addBox(l), Q.bumpVerticalPos(u);
3675
+ }, "addActorRenderingData"), Be = /* @__PURE__ */ y(async function(e, t, n, r, i, a, o) {
3676
+ if (r) {
3677
+ let r = 0;
3678
+ Q.bumpVerticalPos(Z.boxMargin * 2);
3679
+ for (let s of n) {
3680
+ let n = t.get(s);
3681
+ n.stopy ||= Q.getVerticalPos();
3682
+ let c = await X.drawActor(e, n, Z, !0, i, a, o);
3683
+ r = h.getMax(r, c);
3684
+ }
3685
+ Q.bumpVerticalPos(r + Z.boxMargin);
3686
+ } else for (let r of n) {
3687
+ let n = t.get(r);
3688
+ await X.drawActor(e, n, Z, !1, i, a, o);
3689
+ }
3690
+ }, "drawActors"), Ve = /* @__PURE__ */ y(function(e, t, n, r) {
3691
+ let i = 0, a = 0;
3692
+ for (let o of n) {
3693
+ let n = t.get(o), s = Je(n), c = X.drawPopup(e, n, s, Z, Z.forceMenus, r);
3694
+ c.height > i && (i = c.height), c.width + n.x > a && (a = c.width + n.x);
3695
+ }
3696
+ return {
3697
+ maxHeight: i,
3698
+ maxWidth: a
3699
+ };
3700
+ }, "drawActorsPopup"), He = /* @__PURE__ */ y(function(e) {
3701
+ m(Z, e), e.fontFamily && (Z.actorFontFamily = Z.noteFontFamily = Z.messageFontFamily = e.fontFamily), e.fontSize && (Z.actorFontSize = Z.noteFontSize = Z.messageFontSize = e.fontSize), e.fontWeight && (Z.actorFontWeight = Z.noteFontWeight = Z.messageFontWeight = e.fontWeight);
3702
+ }, "setConf"), Ue = /* @__PURE__ */ y(function(e) {
3703
+ return Q.activations.filter(function(t) {
3704
+ return t.actor === e;
3705
+ });
3706
+ }, "actorActivations"), We = /* @__PURE__ */ y(function(e, t) {
3707
+ let n = t.get(e), r = Ue(e);
3708
+ return [r.reduce(function(e, t) {
3709
+ return h.getMin(e, t.startx);
3710
+ }, n.x + n.width / 2 - 1), r.reduce(function(e, t) {
3711
+ return h.getMax(e, t.stopx);
3712
+ }, n.x + n.width / 2 + 1)];
3713
+ }, "activationBounds");
3714
+ function $(e, t, n, r, i) {
3715
+ Q.bumpVerticalPos(n);
3716
+ let a = r;
3717
+ if (t.id && t.message && e[t.id]) {
3718
+ let n = e[t.id].width, i = Pe(Z);
3719
+ t.message = C.wrapLabel(`[${t.message}]`, n - 2 * Z.wrapPadding, i), t.width = n, t.wrap = !0;
3720
+ let o = C.calculateTextDimensions(t.message, i), s = h.getMax(o.height, Z.labelBoxHeight);
3721
+ a = r + s, v.debug(`${s} - ${t.message}`);
3722
+ }
3723
+ i(t), Q.bumpVerticalPos(a);
3724
+ }
3725
+ y($, "adjustLoopHeightForWrap");
3726
+ function Ge(e, t, n, r, i, a, o) {
3727
+ function s(n, r) {
3728
+ n.x < i.get(e.from).x ? (Q.insert(t.stopx - r, t.starty, t.startx, t.stopy + n.height / 2 + Z.noteMargin), t.stopx += r) : (Q.insert(t.startx, t.starty, t.stopx + r, t.stopy + n.height / 2 + Z.noteMargin), t.stopx -= r);
3729
+ }
3730
+ y(s, "receiverAdjustment");
3731
+ function c(n, r) {
3732
+ n.x < i.get(e.to).x ? (Q.insert(t.startx - r, t.starty, t.stopx, t.stopy + n.height / 2 + Z.noteMargin), t.startx += r) : (Q.insert(t.stopx, t.starty, t.startx + r, t.stopy + n.height / 2 + Z.noteMargin), t.startx -= r);
3733
+ }
3734
+ y(c, "senderAdjustment");
3735
+ let l = [
3736
+ R.ACTOR,
3737
+ R.CONTROL,
3738
+ R.ENTITY,
3739
+ R.DATABASE
3740
+ ];
3741
+ if (a.get(e.to) == r) {
3742
+ let t = i.get(e.to);
3743
+ s(t, l.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.starty = n - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3744
+ } else if (o.get(e.from) == r) {
3745
+ let t = i.get(e.from);
3746
+ Z.mirrorActors && c(t, l.includes(t.type) ? z / 2 : t.width / 2), t.stopy = n - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3747
+ } else if (o.get(e.to) == r) {
3748
+ let t = i.get(e.to);
3749
+ Z.mirrorActors && s(t, l.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.stopy = n - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3750
+ }
3751
+ }
3752
+ y(Ge, "adjustCreatedDestroyedData");
3753
+ var Ke = /* @__PURE__ */ y(async function(e, t, n, r) {
3754
+ let { securityLevel: i, sequence: a, look: o } = u();
3755
+ Z = a;
3756
+ let s;
3757
+ i === "sandbox" && (s = b("#i" + t));
3758
+ let c = b(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? s.nodes()[0].contentDocument : document;
3759
+ Q.init(), v.debug(r.db);
3760
+ let f = i === "sandbox" ? c.select(`[id="${t}"]`) : b(`[id="${t}"]`), p = r.db.getActors(), m = r.db.getCreatedActors(), h = r.db.getDestroyedActors(), g = r.db.getBoxes(), _ = r.db.getActorKeys(), x = r.db.getMessages(), S = r.db.getDiagramTitle(), C = r.db.hasAtLeastOneBox(), w = r.db.hasAtLeastOneBoxWithTitle(), T = await qe(p, x, r);
3761
+ if (Z.height = await Ye(p, T, g), X.insertComputerIcon(f, t), X.insertDatabaseIcon(f, t), X.insertClockIcon(f, t), C && (Q.bumpVerticalPos(Z.boxMargin), w && Q.bumpVerticalPos(g[0].textMaxHeight)), Z.hideUnusedParticipants === !0) {
3762
+ let e = /* @__PURE__ */ new Set();
3763
+ x.forEach((t) => {
3764
+ e.add(t.from), e.add(t.to);
3765
+ }), _ = _.filter((t) => e.has(t));
3766
+ }
3767
+ let E = new Map(_.map((e, t) => [p.get(e)?.name ?? e, t]));
3768
+ ze(f, p, m, _, 0, x, !1);
3769
+ let D = await it(x, p, T, r);
3770
+ X.insertArrowHead(f, t), X.insertArrowCrossHead(f, t), X.insertArrowFilledHead(f, t), X.insertSequenceNumber(f, t), X.insertSolidTopArrowHead(f, t), X.insertSolidBottomArrowHead(f, t), X.insertStickTopArrowHead(f, t), X.insertStickBottomArrowHead(f, t), o === "neo" && X.insertDropShadow(f, Z);
3771
+ function O(e, t) {
3772
+ let n = Q.endActivation(e);
3773
+ n.starty + 18 > t && (n.starty = t - 6, t += 12), X.drawActivation(f, n, t, Z, Ue(e.from).length, r, E), Q.insert(n.startx, t - 10, n.stopx, t);
3774
+ }
3775
+ y(O, "activeEnd");
3776
+ let k = 1, A = 1, j = [], M = [], N = 0;
3777
+ for (let e of x) {
3778
+ let t, n, i;
3779
+ switch (e.type) {
3780
+ case r.db.LINETYPE.NOTE:
3781
+ Q.resetVerticalPos(), n = e.noteModel, await Me(f, n, e.id);
3782
+ break;
3783
+ case r.db.LINETYPE.ACTIVE_START:
3784
+ Q.newActivation(e, f, p);
3785
+ break;
3786
+ case r.db.LINETYPE.CENTRAL_CONNECTION:
3787
+ Q.newActivation(e, f, p);
3788
+ break;
3789
+ case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:
3790
+ Q.newActivation(e, f, p);
3791
+ break;
3792
+ case r.db.LINETYPE.ACTIVE_END:
3793
+ O(e, Q.getVerticalPos());
3794
+ break;
3795
+ case r.db.LINETYPE.LOOP_START:
3796
+ $(D, e, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3797
+ break;
3798
+ case r.db.LINETYPE.LOOP_END:
3799
+ t = Q.endLoop(), await X.drawLoop(f, t, "loop", Z, e), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos()), Q.models.addLoop(t);
3800
+ break;
3801
+ case r.db.LINETYPE.RECT_START:
3802
+ $(D, e, Z.boxMargin, Z.boxMargin, (e) => Q.newLoop(void 0, e.message));
3803
+ break;
3804
+ case r.db.LINETYPE.RECT_END:
3805
+ t = Q.endLoop(), M.push(t), Q.models.addLoop(t), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos());
3806
+ break;
3807
+ case r.db.LINETYPE.OPT_START:
3808
+ $(D, e, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3809
+ break;
3810
+ case r.db.LINETYPE.OPT_END:
3811
+ t = Q.endLoop(), await X.drawLoop(f, t, "opt", Z, e), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos()), Q.models.addLoop(t);
3812
+ break;
3813
+ case r.db.LINETYPE.ALT_START:
3814
+ $(D, e, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3815
+ break;
3816
+ case r.db.LINETYPE.ALT_ELSE:
3817
+ $(D, e, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3818
+ break;
3819
+ case r.db.LINETYPE.ALT_END:
3820
+ t = Q.endLoop(), await X.drawLoop(f, t, "alt", Z, e), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos()), Q.models.addLoop(t);
3821
+ break;
3822
+ case r.db.LINETYPE.PAR_START:
3823
+ case r.db.LINETYPE.PAR_OVER_START:
3824
+ $(D, e, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e)), Q.saveVerticalPos();
3825
+ break;
3826
+ case r.db.LINETYPE.PAR_AND:
3827
+ $(D, e, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3828
+ break;
3829
+ case r.db.LINETYPE.PAR_END:
3830
+ t = Q.endLoop(), await X.drawLoop(f, t, "par", Z, e), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos()), Q.models.addLoop(t);
3831
+ break;
3832
+ case r.db.LINETYPE.AUTONUMBER:
3833
+ k = e.message.start || k, A = e.message.step || A, e.message.visible ? r.db.enableSequenceNumbers() : r.db.disableSequenceNumbers();
3834
+ break;
3835
+ case r.db.LINETYPE.CRITICAL_START:
3836
+ $(D, e, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3837
+ break;
3838
+ case r.db.LINETYPE.CRITICAL_OPTION:
3839
+ $(D, e, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3840
+ break;
3841
+ case r.db.LINETYPE.CRITICAL_END:
3842
+ t = Q.endLoop(), await X.drawLoop(f, t, "critical", Z, e), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos()), Q.models.addLoop(t);
3843
+ break;
3844
+ case r.db.LINETYPE.BREAK_START:
3845
+ $(D, e, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3846
+ break;
3847
+ case r.db.LINETYPE.BREAK_END:
3848
+ t = Q.endLoop(), await X.drawLoop(f, t, "break", Z, e), Q.bumpVerticalPos(t.stopy - Q.getVerticalPos()), Q.models.addLoop(t);
3849
+ break;
3850
+ default: try {
3851
+ i = e.msgModel, i.starty = Q.getVerticalPos(), i.sequenceIndex = k, i.sequenceVisible = r.db.showSequenceNumbers(), i.id = e.id, i.from = e.from, i.to = e.to;
3852
+ let t = await Le(f, i);
3853
+ Ge(e, i, t, N, p, m, h), j.push({
3854
+ messageModel: i,
3855
+ lineStartY: t,
3856
+ msg: e
3857
+ }), Q.models.addMessage(i);
3858
+ } catch (e) {
3859
+ v.error("error while drawing message", e);
3860
+ }
3861
+ }
3862
+ [
3863
+ r.db.LINETYPE.SOLID_OPEN,
3864
+ r.db.LINETYPE.DOTTED_OPEN,
3865
+ r.db.LINETYPE.SOLID,
3866
+ r.db.LINETYPE.SOLID_TOP,
3867
+ r.db.LINETYPE.SOLID_BOTTOM,
3868
+ r.db.LINETYPE.STICK_TOP,
3869
+ r.db.LINETYPE.STICK_BOTTOM,
3870
+ r.db.LINETYPE.SOLID_TOP_DOTTED,
3871
+ r.db.LINETYPE.SOLID_BOTTOM_DOTTED,
3872
+ r.db.LINETYPE.STICK_TOP_DOTTED,
3873
+ r.db.LINETYPE.STICK_BOTTOM_DOTTED,
3874
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
3875
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
3876
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
3877
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
3878
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
3879
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
3880
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
3881
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
3882
+ r.db.LINETYPE.DOTTED,
3883
+ r.db.LINETYPE.SOLID_CROSS,
3884
+ r.db.LINETYPE.DOTTED_CROSS,
3885
+ r.db.LINETYPE.SOLID_POINT,
3886
+ r.db.LINETYPE.DOTTED_POINT,
3887
+ r.db.LINETYPE.BIDIRECTIONAL_SOLID,
3888
+ r.db.LINETYPE.BIDIRECTIONAL_DOTTED
3889
+ ].includes(e.type) && (k += A), N++;
3890
+ }
3891
+ v.debug("createdActors", m), v.debug("destroyedActors", h), await Be(f, p, _, !1, t, r, E);
3892
+ for (let e of j) await Re(f, e.messageModel, e.lineStartY, r, e.msg, t);
3893
+ Z.mirrorActors && await Be(f, p, _, !0, t, r, E), M.forEach((e) => X.drawBackgroundRect(f, e)), ce(f, p, _, Z);
3894
+ for (let e of Q.models.boxes) {
3895
+ e.height = Q.getVerticalPos() - e.y, Q.insert(e.x, e.y, e.x + e.width, e.height);
3896
+ let t = Z.boxMargin * 2;
3897
+ e.startx = e.x - t, e.starty = e.y - t * .25, e.stopx = e.startx + e.width + 2 * t, e.stopy = e.starty + e.height + t * .75, e.stroke = "rgb(0,0,0, 0.5)", X.drawBox(f, e, Z);
3898
+ }
3899
+ C && Q.bumpVerticalPos(Z.boxMargin);
3900
+ let P = Ve(f, p, _, l), { bounds: F } = Q.getBounds();
3901
+ F.startx === void 0 && (F.startx = 0), F.starty === void 0 && (F.starty = 0), F.stopx === void 0 && (F.stopx = 0), F.stopy === void 0 && (F.stopy = 0);
3902
+ let I = F.stopy - F.starty;
3903
+ I < P.maxHeight && (I = P.maxHeight);
3904
+ let L = I + 2 * Z.diagramMarginY;
3905
+ Z.mirrorActors && (L = L - Z.boxMargin + Z.bottomMarginAdj);
3906
+ let ee = F.stopx - F.startx;
3907
+ ee < P.maxWidth && (ee = P.maxWidth);
3908
+ let R = ee + 2 * Z.diagramMarginX;
3909
+ S && f.append("text").text(S).attr("x", (F.stopx - F.startx) / 2 - 2 * Z.diagramMarginX).attr("y", -25), d(f, L, R, Z.useMaxWidth);
3910
+ let te = S ? 40 : 0, ne = p.size && o === "neo" ? 30 : 0;
3911
+ f.attr("viewBox", F.startx - Z.diagramMarginX + " -" + (Z.diagramMarginY + te) + " " + R + " " + (L + te + ne)), v.debug("models:", Q.models);
3912
+ }, "draw");
3913
+ async function qe(e, t, n) {
3914
+ let r = {};
3915
+ for (let i of t) if (e.get(i.to) && e.get(i.from)) {
3916
+ let t = e.get(i.to);
3917
+ if (i.placement === n.db.PLACEMENT.LEFTOF && !t.prevActor || i.placement === n.db.PLACEMENT.RIGHTOF && !t.nextActor) continue;
3918
+ let a = i.placement !== void 0, o = !a, s = a ? Fe(Z) : Pe(Z), c = i.wrap ? C.wrapLabel(i.message, Z.width - 2 * Z.wrapPadding, s) : i.message, l = (p(c) ? await f(i.message, u()) : C.calculateTextDimensions(c, s)).width + 2 * Z.wrapPadding;
3919
+ o && i.from === t.nextActor ? r[i.to] = h.getMax(r[i.to] || 0, l) : o && i.from === t.prevActor ? r[i.from] = h.getMax(r[i.from] || 0, l) : o && i.from === i.to ? (r[i.from] = h.getMax(r[i.from] || 0, l / 2), r[i.to] = h.getMax(r[i.to] || 0, l / 2)) : i.placement === n.db.PLACEMENT.RIGHTOF ? r[i.from] = h.getMax(r[i.from] || 0, l) : i.placement === n.db.PLACEMENT.LEFTOF ? r[t.prevActor] = h.getMax(r[t.prevActor] || 0, l) : i.placement === n.db.PLACEMENT.OVER && (t.prevActor && (r[t.prevActor] = h.getMax(r[t.prevActor] || 0, l / 2)), t.nextActor && (r[i.from] = h.getMax(r[i.from] || 0, l / 2)));
3920
+ }
3921
+ return v.debug("maxMessageWidthPerActor:", r), r;
3922
+ }
3923
+ y(qe, "getMaxMessageWidthPerActor");
3924
+ var Je = /* @__PURE__ */ y(function(e) {
3925
+ let t = 0, n = Ie(Z);
3926
+ for (let r in e.links) {
3927
+ let e = C.calculateTextDimensions(r, n).width + 2 * Z.wrapPadding + 2 * Z.boxMargin;
3928
+ t < e && (t = e);
3929
+ }
3930
+ return t;
3931
+ }, "getRequiredPopupWidth");
3932
+ async function Ye(e, t, n) {
3933
+ let r = 0;
3934
+ for (let t of e.keys()) {
3935
+ let n = e.get(t);
3936
+ n.wrap && (n.description = C.wrapLabel(n.description, Z.width - 2 * Z.wrapPadding, Ie(Z)));
3937
+ let i = p(n.description) ? await f(n.description, u()) : C.calculateTextDimensions(n.description, Ie(Z));
3938
+ n.width = n.wrap ? Z.width : h.getMax(Z.width, i.width + 2 * Z.wrapPadding), n.height = n.wrap ? h.getMax(i.height, Z.height) : Z.height, r = h.getMax(r, n.height);
3939
+ }
3940
+ for (let n in t) {
3941
+ let r = e.get(n);
3942
+ if (!r) continue;
3943
+ let i = e.get(r.nextActor);
3944
+ if (!i) {
3945
+ let e = t[n] + Z.actorMargin - r.width / 2;
3946
+ r.margin = h.getMax(e, Z.actorMargin);
3947
+ continue;
3948
+ }
3949
+ let a = t[n] + Z.actorMargin - r.width / 2 - i.width / 2;
3950
+ r.margin = h.getMax(a, Z.actorMargin);
3951
+ }
3952
+ let i = 0;
3953
+ return n.forEach((t) => {
3954
+ let n = Pe(Z), r = t.actorKeys.reduce((t, n) => t += e.get(n).width + (e.get(n).margin || 0), 0), a = Z.boxMargin * 8;
3955
+ r += a, r -= 2 * Z.boxTextMargin, t.wrap && (t.name = C.wrapLabel(t.name, r - 2 * Z.wrapPadding, n));
3956
+ let o = C.calculateTextDimensions(t.name, n);
3957
+ i = h.getMax(o.height, i);
3958
+ let s = h.getMax(r, o.width + 2 * Z.wrapPadding);
3959
+ if (t.margin = Z.boxTextMargin, r < s) {
3960
+ let e = (s - r) / 2;
3961
+ t.margin += e;
3962
+ }
3963
+ }), n.forEach((e) => e.textMaxHeight = i), h.getMax(r, Z.height);
3964
+ }
3965
+ y(Ye, "calculateActorMargins");
3966
+ var Xe = /* @__PURE__ */ y(async function(e, t, n) {
3967
+ let r = t.get(e.from), i = t.get(e.to), a = r.x, o = i.x, s = e.wrap && e.message, c = p(e.message) ? await f(e.message, u()) : C.calculateTextDimensions(s ? C.wrapLabel(e.message, Z.width, Fe(Z)) : e.message, Fe(Z)), l = {
3968
+ width: s ? Z.width : h.getMax(Z.width, c.width + 2 * Z.noteMargin),
3969
+ height: 0,
3970
+ startx: r.x,
3971
+ stopx: 0,
3972
+ starty: 0,
3973
+ stopy: 0,
3974
+ message: e.message
3975
+ };
3976
+ return e.placement === n.db.PLACEMENT.RIGHTOF ? (l.width = s ? h.getMax(Z.width, c.width) : h.getMax(r.width / 2 + i.width / 2, c.width + 2 * Z.noteMargin), l.startx = a + (r.width + Z.actorMargin) / 2) : e.placement === n.db.PLACEMENT.LEFTOF ? (l.width = s ? h.getMax(Z.width, c.width + 2 * Z.noteMargin) : h.getMax(r.width / 2 + i.width / 2, c.width + 2 * Z.noteMargin), l.startx = a - l.width + (r.width - Z.actorMargin) / 2) : e.to === e.from ? (c = C.calculateTextDimensions(s ? C.wrapLabel(e.message, h.getMax(Z.width, r.width), Fe(Z)) : e.message, Fe(Z)), l.width = s ? h.getMax(Z.width, r.width) : h.getMax(r.width, Z.width, c.width + 2 * Z.noteMargin), l.startx = a + (r.width - l.width) / 2) : (l.width = Math.abs(a + r.width / 2 - (o + i.width / 2)) + Z.actorMargin, l.startx = a < o ? a + r.width / 2 - Z.actorMargin / 2 : o + i.width / 2 - Z.actorMargin / 2), s && (l.message = C.wrapLabel(e.message, l.width - 2 * Z.wrapPadding, Fe(Z))), v.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${e.message}]`), l;
3977
+ }, "buildNoteModel"), Ze = 4, Qe = 6, $e = /* @__PURE__ */ y(function(e, t) {
3978
+ let { CENTRAL_CONNECTION: n, CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i } = t.db.LINETYPE;
3979
+ return [
3980
+ n,
3981
+ r,
3982
+ i
3983
+ ].includes(e.centralConnection);
3984
+ }, "hasCentralConnection"), et = /* @__PURE__ */ y(function(e, t, n) {
3985
+ let { CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i, BIDIRECTIONAL_SOLID: a, BIDIRECTIONAL_DOTTED: o } = t.db.LINETYPE, s = 0;
3986
+ return (e.centralConnection === r || e.centralConnection === i) && (s += Ze), (e.centralConnection === r || e.centralConnection === i) && (e.type === a || e.type === o) && (s += n ? 0 : -Qe), s;
3987
+ }, "calculateCentralConnectionOffset"), tt = /* @__PURE__ */ y(function(e, t) {
3988
+ let { SOLID_ARROW_TOP_REVERSE: n, SOLID_ARROW_TOP_REVERSE_DOTTED: r, SOLID_ARROW_BOTTOM_REVERSE: i, SOLID_ARROW_BOTTOM_REVERSE_DOTTED: a, STICK_ARROW_TOP_REVERSE: o, STICK_ARROW_TOP_REVERSE_DOTTED: s, STICK_ARROW_BOTTOM_REVERSE: c, STICK_ARROW_BOTTOM_REVERSE_DOTTED: l } = t.db.LINETYPE;
3989
+ return [
3990
+ n,
3991
+ r,
3992
+ i,
3993
+ a,
3994
+ o,
3995
+ s,
3996
+ c,
3997
+ l
3998
+ ].includes(e.type);
3999
+ }, "isReverseArrowType"), nt = /* @__PURE__ */ y(function(e, t) {
4000
+ let { BIDIRECTIONAL_SOLID: n, BIDIRECTIONAL_DOTTED: r } = t.db.LINETYPE;
4001
+ return [n, r].includes(e.type);
4002
+ }, "isBidirectionalArrowType"), rt = /* @__PURE__ */ y(function(e, t, n) {
4003
+ let { look: r } = u();
4004
+ if (![
4005
+ n.db.LINETYPE.SOLID_OPEN,
4006
+ n.db.LINETYPE.DOTTED_OPEN,
4007
+ n.db.LINETYPE.SOLID,
4008
+ n.db.LINETYPE.SOLID_TOP,
4009
+ n.db.LINETYPE.SOLID_BOTTOM,
4010
+ n.db.LINETYPE.STICK_TOP,
4011
+ n.db.LINETYPE.STICK_BOTTOM,
4012
+ n.db.LINETYPE.SOLID_TOP_DOTTED,
4013
+ n.db.LINETYPE.SOLID_BOTTOM_DOTTED,
4014
+ n.db.LINETYPE.STICK_TOP_DOTTED,
4015
+ n.db.LINETYPE.STICK_BOTTOM_DOTTED,
4016
+ n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4017
+ n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
4018
+ n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4019
+ n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4020
+ n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4021
+ n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4022
+ n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4023
+ n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4024
+ n.db.LINETYPE.DOTTED,
4025
+ n.db.LINETYPE.SOLID_CROSS,
4026
+ n.db.LINETYPE.DOTTED_CROSS,
4027
+ n.db.LINETYPE.SOLID_POINT,
4028
+ n.db.LINETYPE.DOTTED_POINT,
4029
+ n.db.LINETYPE.BIDIRECTIONAL_SOLID,
4030
+ n.db.LINETYPE.BIDIRECTIONAL_DOTTED
4031
+ ].includes(e.type)) return {};
4032
+ let [i, a] = We(e.from, t), [o, s] = We(e.to, t), c = i <= o, l = c ? a : i, d = c ? o : s;
4033
+ r === "neo" && (e.type !== n.db.LINETYPE.SOLID_OPEN && (d += c ? -3 : 3), (e.type === n.db.LINETYPE.BIDIRECTIONAL_SOLID || e.type === n.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (l += c ? 3 : -3)), l += et(e, n, c);
4034
+ let f = Math.abs(o - s) > 2, p = /* @__PURE__ */ y((e) => c ? -e : e, "adjustValue");
4035
+ e.from === e.to ? d = l : (e.activate && !f && (d += p(Z.activationWidth / 2 - 1)), [
4036
+ n.db.LINETYPE.SOLID_OPEN,
4037
+ n.db.LINETYPE.DOTTED_OPEN,
4038
+ n.db.LINETYPE.STICK_TOP,
4039
+ n.db.LINETYPE.STICK_BOTTOM,
4040
+ n.db.LINETYPE.STICK_TOP_DOTTED,
4041
+ n.db.LINETYPE.STICK_BOTTOM_DOTTED,
4042
+ n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4043
+ n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4044
+ n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4045
+ n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4046
+ n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4047
+ n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4048
+ n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4049
+ n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4050
+ ].includes(e.type) || (d += p(3)), [
4051
+ n.db.LINETYPE.BIDIRECTIONAL_SOLID,
4052
+ n.db.LINETYPE.BIDIRECTIONAL_DOTTED,
4053
+ n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4054
+ n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4055
+ n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4056
+ n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4057
+ ].includes(e.type) && (l -= p(3)));
4058
+ let m = [
4059
+ i,
4060
+ a,
4061
+ o,
4062
+ s
4063
+ ], g = Math.abs(l - d);
4064
+ e.wrap && e.message && (e.message = C.wrapLabel(e.message, h.getMax(g + 2 * Z.wrapPadding, Z.width), Pe(Z)));
4065
+ let _ = C.calculateTextDimensions(e.message, Pe(Z));
4066
+ return {
4067
+ width: h.getMax(e.wrap ? 0 : _.width + 2 * Z.wrapPadding, g + 2 * Z.wrapPadding, Z.width),
4068
+ height: 0,
4069
+ startx: l,
4070
+ stopx: d,
4071
+ starty: 0,
4072
+ stopy: 0,
4073
+ message: e.message,
4074
+ type: e.type,
4075
+ wrap: e.wrap,
4076
+ fromBounds: Math.min.apply(null, m),
4077
+ toBounds: Math.max.apply(null, m)
4078
+ };
4079
+ }, "buildMessageModel"), it = /* @__PURE__ */ y(async function(e, t, n, r) {
4080
+ let i = {}, a = [], o, s, c;
4081
+ for (let n of e) {
4082
+ switch (n.type) {
4083
+ case r.db.LINETYPE.LOOP_START:
4084
+ case r.db.LINETYPE.ALT_START:
4085
+ case r.db.LINETYPE.OPT_START:
4086
+ case r.db.LINETYPE.PAR_START:
4087
+ case r.db.LINETYPE.PAR_OVER_START:
4088
+ case r.db.LINETYPE.CRITICAL_START:
4089
+ case r.db.LINETYPE.BREAK_START:
4090
+ a.push({
4091
+ id: n.id,
4092
+ msg: n.message,
4093
+ from: 2 ** 53 - 1,
4094
+ to: -(2 ** 53 - 1),
4095
+ width: 0
4096
+ });
4097
+ break;
4098
+ case r.db.LINETYPE.ALT_ELSE:
4099
+ case r.db.LINETYPE.PAR_AND:
4100
+ case r.db.LINETYPE.CRITICAL_OPTION:
4101
+ n.message && (o = a.pop(), i[o.id] = o, i[n.id] = o, a.push(o));
4102
+ break;
4103
+ case r.db.LINETYPE.LOOP_END:
4104
+ case r.db.LINETYPE.ALT_END:
4105
+ case r.db.LINETYPE.OPT_END:
4106
+ case r.db.LINETYPE.PAR_END:
4107
+ case r.db.LINETYPE.CRITICAL_END:
4108
+ case r.db.LINETYPE.BREAK_END:
4109
+ o = a.pop(), i[o.id] = o;
4110
+ break;
4111
+ case r.db.LINETYPE.ACTIVE_START:
4112
+ {
4113
+ let e = t.get(n.from ? n.from : n.to.actor), r = Ue(n.from ? n.from : n.to.actor).length, i = e.x + e.width / 2 + (r - 1) * Z.activationWidth / 2, a = {
4114
+ startx: i,
4115
+ stopx: i + Z.activationWidth,
4116
+ actor: n.from,
4117
+ enabled: !0
4118
+ };
4119
+ Q.activations.push(a);
4120
+ }
4121
+ break;
4122
+ case r.db.LINETYPE.ACTIVE_END:
4123
+ {
4124
+ let e = Q.activations.map((e) => e.actor).lastIndexOf(n.from);
4125
+ Q.activations.splice(e, 1).splice(0, 1);
4126
+ }
4127
+ break;
4128
+ }
4129
+ n.placement === void 0 ? (c = rt(n, t, r), n.msgModel = c, c.startx && c.stopx && a.length > 0 && a.forEach((e) => {
4130
+ if (o = e, c.startx === c.stopx) {
4131
+ let e = t.get(n.from), r = t.get(n.to);
4132
+ o.from = h.getMin(e.x - c.width / 2, e.x - e.width / 2, o.from), o.to = h.getMax(r.x + c.width / 2, r.x + e.width / 2, o.to), o.width = h.getMax(o.width, Math.abs(o.to - o.from)) - Z.labelBoxWidth;
4133
+ } else o.from = h.getMin(c.startx, o.from), o.to = h.getMax(c.stopx, o.to), o.width = h.getMax(o.width, c.width) - Z.labelBoxWidth;
4134
+ })) : (s = await Xe(n, t, r), n.noteModel = s, a.forEach((e) => {
4135
+ o = e, o.from = h.getMin(o.from, s.startx), o.to = h.getMax(o.to, s.startx + s.width), o.width = h.getMax(o.width, Math.abs(o.from - o.to)) - Z.labelBoxWidth;
4136
+ }));
4137
+ }
4138
+ return Q.activations = [], v.debug("Loop type widths:", i), i;
4139
+ }, "calculateLoopBounds"), at = {
4140
+ parser: F,
4141
+ get db() {
4142
+ return new te();
4143
+ },
4144
+ renderer: {
4145
+ bounds: Q,
4146
+ drawActors: Be,
4147
+ drawActorsPopup: Ve,
4148
+ setConf: He,
4149
+ draw: Ke
4150
+ },
4151
+ styles: ne,
4152
+ init: /* @__PURE__ */ y((e) => {
4153
+ e.sequence ||= {}, e.wrap && (e.sequence.wrap = e.wrap, a({ sequence: { wrap: e.wrap } }));
4154
+ }, "init")
4155
+ };
4156
+ //#endregion
4157
+ export { at as diagram };