@marimo-team/frontend 0.13.7-dev28 → 0.13.7-dev3

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 (283) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-th_i__dG.js +22 -0
  2. package/dist/assets/VegaLite-0KIipZoB.js +11 -0
  3. package/dist/assets/_baseEach-DMa5jqoU.js +1 -0
  4. package/dist/assets/_baseMap-pUcN7Rpu.js +1 -0
  5. package/dist/assets/_baseUniq-BVoEUTG_.js +1 -0
  6. package/dist/assets/_createAggregator-Djppx6_O.js +1 -0
  7. package/dist/assets/{any-language-editor-BT30OVyI.js → any-language-editor-CyITx6h-.js} +1 -3
  8. package/dist/assets/apl-CXdQSnD-.js +1 -1
  9. package/dist/assets/arc-Cuwikxov.js +1 -1
  10. package/dist/assets/architectureDiagram-IEHRJDOE-OoEkDt5O.js +1 -0
  11. package/dist/assets/asciiarmor-D5V0T9Cu.js +1 -1
  12. package/dist/assets/asn1-DWPaVWf6.js +1 -1
  13. package/dist/assets/asterisk-B46aRdXb.js +1 -1
  14. package/dist/assets/blockDiagram-JOT3LUYC-CGnlM4UU.js +1 -0
  15. package/dist/assets/brainfuck-CtZaYBKt.js +1 -1
  16. package/dist/assets/c4Diagram-VJAJSXHY-DcwqEhJp.js +1 -0
  17. package/dist/assets/channel-C3LrtOq9.js +1 -0
  18. package/dist/assets/chunk-4BMEZGHF-DOK1C4SQ.js +1 -0
  19. package/dist/assets/chunk-A2AXSNBT-tcqF3UW3.js +1 -0
  20. package/dist/assets/chunk-AEK57VVT-CMGGH9xn.js +1 -0
  21. package/dist/assets/chunk-D6G4REZN-DXlJF2Bk.js +1 -0
  22. package/dist/assets/chunk-RZ5BOZE2-COQMYHlq.js +1 -0
  23. package/dist/assets/chunk-XZIHB7SX-Bhxm0x2M.js +1 -0
  24. package/dist/assets/{circle-play-CnK7j27X.js → circle-play-DfTVgygt.js} +2 -1
  25. package/dist/assets/classDiagram-GIVACNV2-Dx1tK0j4.js +1 -0
  26. package/dist/assets/classDiagram-v2-COTLJTTW-Dx1tK0j4.js +1 -0
  27. package/dist/assets/clike-BgBwzOhw.js +1 -1
  28. package/dist/assets/clojure-DR_hEDJv.js +1 -1
  29. package/dist/assets/clone-C11ag5RZ.js +1 -0
  30. package/dist/assets/cmake-DXn5xaP-.js +1 -1
  31. package/dist/assets/cobol-stawOqaz.js +1 -1
  32. package/dist/assets/coffeescript-BTDxI-eT.js +1 -1
  33. package/dist/assets/colors-bszWmPJw.js +1 -1
  34. package/dist/assets/commonlisp-vq6DHwts.js +1 -1
  35. package/dist/assets/compile-R0u9cqWP.js +1 -0
  36. package/dist/assets/crystal-CRzZ78HM.js +1 -1
  37. package/dist/assets/css-ZjFoif2m.js +1 -1
  38. package/dist/assets/cypher-gJDei3ni.js +1 -1
  39. package/dist/assets/cytoscape.esm-bH-fs5wT.js +9 -0
  40. package/dist/assets/d-BShv7fp-.js +1 -1
  41. package/dist/assets/dagre-OKDRZEBW-CtqjM5h9.js +1 -0
  42. package/dist/assets/data-editor-Bfcrqyi2.js +1 -0
  43. package/dist/assets/diagram-SSKATNLV-DNt52Sk_.js +1 -0
  44. package/dist/assets/diagram-VNBRO52H-xUNKnAoh.js +1 -0
  45. package/dist/assets/diff-UJJ5BM9S.js +1 -1
  46. package/dist/assets/dockerfile-knGOOxt4.js +1 -1
  47. package/dist/assets/dtd-DI9Herc-.js +1 -1
  48. package/dist/assets/dylan-CHJ5qNM_.js +1 -1
  49. package/dist/assets/ebnf-B-Df8AvO.js +1 -1
  50. package/dist/assets/ecl-DPFc0Uaf.js +1 -1
  51. package/dist/assets/edit-page-NmKprqkt.js +8 -0
  52. package/dist/assets/eiffel-DR5c0IrL.js +1 -1
  53. package/dist/assets/elm-D7xaZ7Da.js +1 -1
  54. package/dist/assets/erDiagram-Q7BY3M3F-io1sgtPU.js +1 -0
  55. package/dist/assets/erlang-BuqgqA5h.js +1 -1
  56. package/dist/assets/fcl-CVaBTCzQ.js +1 -1
  57. package/dist/assets/flowDiagram-4HSFHLVR-CAcDVF45.js +1 -0
  58. package/dist/assets/forth-Dri_5nFc.js +1 -1
  59. package/dist/assets/fortran-DL7KluxX.js +1 -1
  60. package/dist/assets/ganttDiagram-APWFNJXF-CCNkQyYO.js +1 -0
  61. package/dist/assets/gas-5kEe4nk0.js +1 -1
  62. package/dist/assets/gherkin-B6X1vGSW.js +1 -1
  63. package/dist/assets/gitGraphDiagram-7IBYFJ6S-S-DIg2KO.js +1 -0
  64. package/dist/assets/graph-CPvBoehR.js +1 -0
  65. package/dist/assets/groovy-DnIzCrpZ.js +1 -1
  66. package/dist/assets/haskell-CmdsSjFB.js +1 -1
  67. package/dist/assets/haxe-D25e-2l-.js +1 -1
  68. package/dist/assets/home-page-DUROE-6l.js +7 -0
  69. package/dist/assets/http-BKJkqRj4.js +1 -1
  70. package/dist/assets/idl-pcmmZuaN.js +1 -1
  71. package/dist/assets/index-1hj486rU.js +1 -0
  72. package/dist/assets/index-33Q7xM_A.css +1 -0
  73. package/dist/assets/index-9Y5po83T.js +1 -0
  74. package/dist/assets/index-B1R-kky3.js +1 -0
  75. package/dist/assets/index-BHjEpXuR.js +1 -0
  76. package/dist/assets/index-BLyYnOxb.js +1 -0
  77. package/dist/assets/index-BVOgGu7j.js +1 -0
  78. package/dist/assets/index-Bi8fVNBD.js +1 -0
  79. package/dist/assets/index-CBRsR4hm.js +1 -0
  80. package/dist/assets/index-CBe39OqR.js +1 -0
  81. package/dist/assets/index-CCmIqGps.js +87 -0
  82. package/dist/assets/index-Cq97_EnG.js +1 -0
  83. package/dist/assets/index-Cv0v8nkj.js +1 -0
  84. package/dist/assets/index-D3r87Dua.js +1 -0
  85. package/dist/assets/index-DTd9oqZ1.js +1 -0
  86. package/dist/assets/index-DeDcyKGD.js +1 -0
  87. package/dist/assets/index-W5H1wa8v.js +1 -0
  88. package/dist/assets/index-g5NcpOqf.js +1 -0
  89. package/dist/assets/index-jkcjZbio.js +1 -0
  90. package/dist/assets/index-pCY6hO1c.js +1 -0
  91. package/dist/assets/infoDiagram-PH2N3AL5-C_3rp1aS.js +1 -0
  92. package/dist/assets/init-DLRA0X12.js +1 -1
  93. package/dist/assets/javascript-D48wDJXV.js +1 -1
  94. package/dist/assets/jinja2-DhgKlfW7.js +1 -1
  95. package/dist/assets/journeyDiagram-U35MCT3I-JTAqngR8.js +1 -0
  96. package/dist/assets/julia-DjdwvFuI.js +1 -1
  97. package/dist/assets/kanban-definition-NDS4AKOZ-CIEmg2CK.js +1 -0
  98. package/dist/assets/katex-Blph-pX_.js +1 -0
  99. package/dist/assets/layout-5_9nD7xG.js +1 -0
  100. package/dist/assets/linear-DtkRsldv.js +1 -0
  101. package/dist/assets/livescript-HO6ttBFx.js +1 -1
  102. package/dist/assets/lua-8DXOpKDz.js +1 -1
  103. package/dist/assets/mathematica-IIbmv7SK.js +1 -1
  104. package/dist/assets/mbox-DoeuZPxA.js +1 -0
  105. package/dist/assets/mermaid-Cuo5gmPJ.js +7 -0
  106. package/dist/assets/mhchem-9pkdwevO.js +1 -0
  107. package/dist/assets/min-DZ6t4OQo.js +1 -0
  108. package/dist/assets/mindmap-definition-ALO5MXBD-BIjqJBz_.js +1 -0
  109. package/dist/assets/mirc-DkvFAiy5.js +1 -1
  110. package/dist/assets/mllike-3c2dg9RT.js +1 -1
  111. package/dist/assets/modelica-DSrSSXCg.js +1 -1
  112. package/dist/assets/mscgen-B2igx18G.js +1 -1
  113. package/dist/assets/mumps-zvxmGV4l.js +1 -1
  114. package/dist/assets/nginx-B4hAVlXN.js +1 -1
  115. package/dist/assets/ntriples-FFvkTduk.js +1 -1
  116. package/dist/assets/octave-C4hdQ5Hf.js +1 -1
  117. package/dist/assets/ordinal-DDUp3AbE.js +1 -1
  118. package/dist/assets/oz-qQq7irPq.js +1 -1
  119. package/dist/assets/pascal-CafrKXZF.js +1 -1
  120. package/dist/assets/perl-tdMlh9QA.js +1 -1
  121. package/dist/assets/pieDiagram-IB7DONF6-Bgy76ci6.js +1 -0
  122. package/dist/assets/pig-CwGJVRC4.js +1 -1
  123. package/dist/assets/powershell-D1ly3AHC.js +1 -1
  124. package/dist/assets/properties-_nPj978X.js +1 -1
  125. package/dist/assets/protobuf-B4y9do6W.js +1 -1
  126. package/dist/assets/pug-_kJOm_E2.js +1 -1
  127. package/dist/assets/puppet-Bc-yJKzi.js +1 -1
  128. package/dist/assets/python-DD-Q2bae.js +1 -1
  129. package/dist/assets/q-B0kTJ4cI.js +1 -1
  130. package/dist/assets/quadrantDiagram-7GDLP6J5-DtmO_lJs.js +1 -0
  131. package/dist/assets/r-BA4EbLKE.js +1 -1
  132. package/dist/assets/radar-MK3ICKWK-CQnq_RTY.js +1 -0
  133. package/dist/assets/range-CtcPcB_L.js +1 -1
  134. package/dist/assets/react-plotly-ytz-JCC5.js +71 -0
  135. package/dist/assets/requirementDiagram-KVF5MWMF-CW5hk-fu.js +1 -0
  136. package/dist/assets/rpm-DI_rRufH.js +1 -1
  137. package/dist/assets/ruby-CR-u2WLS.js +1 -1
  138. package/dist/assets/run-page-DhpeWfS6.js +1 -0
  139. package/dist/assets/sankeyDiagram-QLVOVGJD-DMJOShtL.js +1 -0
  140. package/dist/assets/sas-Bqaci40L.js +1 -1
  141. package/dist/assets/save-worker-CQvBUha3.js +1 -0
  142. package/dist/assets/scheme-qjP0V5Ag.js +1 -1
  143. package/dist/assets/sequenceDiagram-X6HHIX6F-Cs8tv4LH.js +1 -0
  144. package/dist/assets/shell-BLav31RL.js +1 -1
  145. package/dist/assets/sieve-r025o_jW.js +1 -1
  146. package/dist/assets/simple-mode-C3vEBAcb.js +1 -1
  147. package/dist/assets/slides-component-Dfd2iboP.js +1 -0
  148. package/dist/assets/smalltalk-C7J3IyEP.js +1 -1
  149. package/dist/assets/solr-78MBEUkU.js +1 -1
  150. package/dist/assets/sortBy-BKdwAT3U.js +1 -0
  151. package/dist/assets/sparql-BRLJFz69.js +1 -1
  152. package/dist/assets/spreadsheet-CGlWr0eM.js +1 -1
  153. package/dist/assets/sql-B3SPsWL6.js +1 -1
  154. package/dist/assets/stateDiagram-DGXRK772-CvA7Y-cH.js +1 -0
  155. package/dist/assets/stateDiagram-v2-YXO3MK2T-BFZJg-21.js +1 -0
  156. package/dist/assets/step-BwsUM5iJ.js +1 -1
  157. package/dist/assets/stylus-OdhglgkO.js +1 -1
  158. package/dist/assets/swift-B_XXVlXX.js +1 -1
  159. package/dist/assets/tcl-B2fODqDH.js +1 -1
  160. package/dist/assets/terminal-DVzybcfs.css +1 -0
  161. package/dist/assets/terminal-DX8mzLZW.js +1 -0
  162. package/dist/assets/textile-BuVhTOzU.js +1 -1
  163. package/dist/assets/tiddlywiki-BgR6AEZu.js +1 -1
  164. package/dist/assets/tiki-CI-ztowC.js +1 -1
  165. package/dist/assets/time-L5VRVaeJ.js +1 -0
  166. package/dist/assets/timeline-definition-BDJGKUSR-C2OBlRUS.js +1 -0
  167. package/dist/assets/timer-DFzT7np-.js +1 -1
  168. package/dist/assets/toml-BQXy8elZ.js +1 -1
  169. package/dist/assets/tracing-MU76FYLw.js +8 -0
  170. package/dist/assets/transform-DjHZbYKP.js +1 -0
  171. package/dist/assets/tree-CfXwrtHg.js +8 -0
  172. package/dist/assets/troff-Ce85hlLp.js +1 -1
  173. package/dist/assets/ttcn-BxnYHtq8.js +1 -1
  174. package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -1
  175. package/dist/assets/turtle-BkSuIpt-.js +1 -1
  176. package/dist/assets/useMarimoWebSocket-B5Kqyjii.js +15 -0
  177. package/dist/assets/vb-BHgjm0DN.js +1 -1
  178. package/dist/assets/vbscript-Dawdd5GZ.js +1 -1
  179. package/dist/assets/vega-component-D7BFIY4g.js +1 -0
  180. package/dist/assets/velocity-BdD_26Jv.js +1 -1
  181. package/dist/assets/verilog-B4LBqg_1.js +1 -1
  182. package/dist/assets/vhdl-CWWH2SUo.js +1 -1
  183. package/dist/assets/web-vitals-rCWRSGQR.js +1 -0
  184. package/dist/assets/webidl-CGwyPRYs.js +1 -1
  185. package/dist/assets/worker-DMKWnagd.js +1 -0
  186. package/dist/assets/worker-DXe6aoib.js +1 -0
  187. package/dist/assets/xquery-CVDBqZPY.js +1 -1
  188. package/dist/assets/xychartDiagram-VJFVF3MP-CYdhGX5A.js +1 -0
  189. package/dist/assets/yacas-I8QjZlxf.js +1 -1
  190. package/dist/assets/z80-D8p3gKXp.js +1 -1
  191. package/dist/assets/zoom-COrs4lFh.js +1 -1
  192. package/dist/index.html +2 -2
  193. package/package.json +4 -5
  194. package/dist/assets/ConnectedDataExplorerComponent-DwjCyDpd.js +0 -19
  195. package/dist/assets/VegaLite-DMaHTEfB.js +0 -189
  196. package/dist/assets/_baseEach-i-4uQUxd.js +0 -1
  197. package/dist/assets/_baseMap-CyhTxrrx.js +0 -1
  198. package/dist/assets/_baseUniq-MexZlZIg.js +0 -1
  199. package/dist/assets/_createAggregator-BvXAtaIK.js +0 -1
  200. package/dist/assets/architectureDiagram-IEHRJDOE-C-S_QKtE.js +0 -36
  201. package/dist/assets/blockDiagram-JOT3LUYC-Clnzy1aA.js +0 -121
  202. package/dist/assets/c4Diagram-VJAJSXHY-3Qi_u3Mc.js +0 -10
  203. package/dist/assets/channel-fBIcpWte.js +0 -1
  204. package/dist/assets/chunk-4BMEZGHF-unHSVyj1.js +0 -1
  205. package/dist/assets/chunk-A2AXSNBT-CNLfE56-.js +0 -164
  206. package/dist/assets/chunk-AEK57VVT-DqMoS-b2.js +0 -220
  207. package/dist/assets/chunk-D6G4REZN-ybjiByEI.js +0 -1
  208. package/dist/assets/chunk-RZ5BOZE2-ZiH6z06D.js +0 -1
  209. package/dist/assets/chunk-XZIHB7SX-jzAQ_UIk.js +0 -1
  210. package/dist/assets/classDiagram-GIVACNV2-4Zm3s2PF.js +0 -1
  211. package/dist/assets/classDiagram-v2-COTLJTTW-4Zm3s2PF.js +0 -1
  212. package/dist/assets/clone-ByM6GdRQ.js +0 -1
  213. package/dist/assets/compile-DHo1Z7jM.js +0 -10
  214. package/dist/assets/cytoscape.esm-C5gjFiAL.js +0 -10
  215. package/dist/assets/dagre-OKDRZEBW-CyqdwP0X.js +0 -4
  216. package/dist/assets/data-editor-BSvxn_Cs.js +0 -142
  217. package/dist/assets/diagram-SSKATNLV-BL12RqSL.js +0 -43
  218. package/dist/assets/diagram-VNBRO52H-DZyBx6Zz.js +0 -24
  219. package/dist/assets/edit-page-BK2WDJZN.js +0 -134
  220. package/dist/assets/erDiagram-Q7BY3M3F-D0nkkMQ2.js +0 -60
  221. package/dist/assets/flowDiagram-4HSFHLVR-CPFBgZ20.js +0 -161
  222. package/dist/assets/ganttDiagram-APWFNJXF-Cv0k7Z_p.js +0 -257
  223. package/dist/assets/gitGraphDiagram-7IBYFJ6S-DpPGEpF4.js +0 -65
  224. package/dist/assets/graph-G9dOVaSB.js +0 -1
  225. package/dist/assets/home-page-VyFBXgw2.js +0 -9
  226. package/dist/assets/index-9ttlyAdL.js +0 -1
  227. package/dist/assets/index-B4Xzlyep.js +0 -1
  228. package/dist/assets/index-B6mHWnBp.js +0 -1
  229. package/dist/assets/index-B7dPzIoa.js +0 -1
  230. package/dist/assets/index-Btp0PLIa.js +0 -1
  231. package/dist/assets/index-CT7tcR4r.js +0 -19
  232. package/dist/assets/index-CVL2yaRQ.js +0 -1
  233. package/dist/assets/index-CmWGraZ_.js +0 -1
  234. package/dist/assets/index-D3HVDLxL.js +0 -1
  235. package/dist/assets/index-D73Gl-_M.js +0 -1
  236. package/dist/assets/index-DH1FEIfA.js +0 -1
  237. package/dist/assets/index-DLEe8WJ3.js +0 -1
  238. package/dist/assets/index-DMUPkki0.css +0 -1
  239. package/dist/assets/index-DNRFI4Pl.js +0 -1
  240. package/dist/assets/index-F_rn6Nre.js +0 -1
  241. package/dist/assets/index-GiJ5EBl-.js +0 -1
  242. package/dist/assets/index-Z3Y1MWON.js +0 -7
  243. package/dist/assets/index-iLYgRYZr.js +0 -1
  244. package/dist/assets/index-n1J4TdF1.js +0 -476
  245. package/dist/assets/index-xNCUj0by.js +0 -1
  246. package/dist/assets/infoDiagram-PH2N3AL5-kRJwkv16.js +0 -2
  247. package/dist/assets/journeyDiagram-U35MCT3I-CuPIVsez.js +0 -138
  248. package/dist/assets/kanban-definition-NDS4AKOZ-SgQeDM9P.js +0 -88
  249. package/dist/assets/katex-BsnJiHtx.js +0 -261
  250. package/dist/assets/layout-qvy3Y2YI.js +0 -1
  251. package/dist/assets/linear-CHmrVrm7.js +0 -1
  252. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  253. package/dist/assets/mbox-z_N2Mo3d.js +0 -1
  254. package/dist/assets/mermaid-Do4EKgGr.js +0 -152
  255. package/dist/assets/mhchem-C_nT2J_7.js +0 -1
  256. package/dist/assets/min-3inaLGSw.js +0 -1
  257. package/dist/assets/mindmap-definition-ALO5MXBD-BOisTjUR.js +0 -95
  258. package/dist/assets/pieDiagram-IB7DONF6-bJLOoa8d.js +0 -30
  259. package/dist/assets/quadrantDiagram-7GDLP6J5-CvVFRHgk.js +0 -7
  260. package/dist/assets/radar-MK3ICKWK-CLYiEoC3.js +0 -126
  261. package/dist/assets/react-plotly-D_o-Vndy.js +0 -4074
  262. package/dist/assets/requirementDiagram-KVF5MWMF-BpOZq3SI.js +0 -64
  263. package/dist/assets/run-page-wF-pSMgD.js +0 -1
  264. package/dist/assets/sankeyDiagram-QLVOVGJD-DVZ8YUzx.js +0 -10
  265. package/dist/assets/save-worker-D7xNPs7e.js +0 -1
  266. package/dist/assets/sequenceDiagram-X6HHIX6F-DWo7ZwhU.js +0 -122
  267. package/dist/assets/slides-component-4RsHJk4c.js +0 -1
  268. package/dist/assets/sortBy-BZMRGRSa.js +0 -1
  269. package/dist/assets/stateDiagram-DGXRK772-DeJ12JmC.js +0 -1
  270. package/dist/assets/stateDiagram-v2-YXO3MK2T-CCKZi1_E.js +0 -1
  271. package/dist/assets/terminal-MqT0CqiL.js +0 -9
  272. package/dist/assets/terminal-WqMRJt5Z.css +0 -1
  273. package/dist/assets/time-9Pz3EKSN.js +0 -1
  274. package/dist/assets/timeline-definition-BDJGKUSR-3glR0bsu.js +0 -61
  275. package/dist/assets/tracing-CLdrqG1z.js +0 -2
  276. package/dist/assets/transform-Cyp0GDF-.js +0 -1
  277. package/dist/assets/tree-BbBZDE78.js +0 -17
  278. package/dist/assets/useMarimoWebSocket-BzRyz6q8.js +0 -27
  279. package/dist/assets/vega-component-YvphImMT.js +0 -1
  280. package/dist/assets/web-vitals-Buym0gfC.js +0 -1
  281. package/dist/assets/worker-BWN2kUSa.js +0 -1
  282. package/dist/assets/worker-D-UG5-wL.js +0 -1
  283. package/dist/assets/xychartDiagram-VJFVF3MP-B-TozqMz.js +0 -7
@@ -0,0 +1 @@
1
+ var t,e;import{_ as r,F as a,d as i,l as s,y as n,A as o,c as l,a1 as c,a2 as d,a3 as h,a4 as g,u,j as y,a5 as p,a6 as x,a7 as b,h as f}from"./mermaid-Cuo5gmPJ.js";import{c as m}from"./clone-C11ag5RZ.js";import{s as w}from"./transform-DjHZbYKP.js";import{G as k}from"./graph-CPvBoehR.js";import{c as L}from"./channel-C3LrtOq9.js";import{l as S,k as _}from"./step-BwsUM5iJ.js";import"./index-CCmIqGps.js";import"./_baseUniq-BVoEUTG_.js";import"./_baseEach-DMa5jqoU.js";import"./timer-DFzT7np-.js";var v=function(){var t=r((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[1,7],a=[1,13],i=[1,14],s=[1,15],n=[1,19],o=[1,16],l=[1,17],c=[1,18],d=[8,30],h=[8,21,28,29,30,31,32,40,44,47],g=[1,23],u=[1,24],y=[8,15,16,21,28,29,30,31,32,40,44,47],p=[8,15,16,21,27,28,29,30,31,32,40,44,47],x=[1,49],b={trace:r((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:r((function(t,e,r,a,i,s,n){var o=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[o-1]),a.setHierarchy(s[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:const e=parseInt(s[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);const i=a.edgeStrToEdgeData(s[o-1].edgeTypeStr);this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",directions:s[o].directions,arrowTypeEnd:i,arrowTypeStart:"arrow_open"},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]),a.generateId(),this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]);const n=a.generateId();this.$={id:n,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,32:n,40:o,44:l,47:c},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:a,29:i,31:s,32:n,40:o,44:l,47:c}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:n},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,32:n,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(p,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,32:n},{32:[2,14]},{17:[1,36]},t(y,[2,24]),{11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,32:n,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{39:[1,51]},{34:52,35:x,39:[2,31]},{32:[2,15]},t(p,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:r((function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)}),"parseError"),parse:r((function(t){var e=this,a=[0],i=[],s=[null],n=[],o=this.table,l="",c=0,d=0,h=n.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var p=g.yylloc;n.push(p);var x=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||g.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r((function(t){a.length=a.length-2*t,s.length=s.length-t,n.length=n.length-t}),"popStack"),r(b,"lex");for(var f,m,w,k,L,S,_,v,E={};;){if(m=a[a.length-1],this.defaultActions[m]?w=this.defaultActions[m]:(null==f&&(f=b()),w=o[m]&&o[m][f]),void 0===w||!w.length||!w[0]){var D="";for(L in v=[],o[m])this.terminals_[L]&&L>2&&v.push("'"+this.terminals_[L]+"'");D=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(D,{text:g.match,token:this.terminals_[f]||f,line:g.yylineno,loc:p,expected:v})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(w[0]){case 1:a.push(f),s.push(g.yytext),n.push(g.yylloc),a.push(w[1]),f=null,d=g.yyleng,l=g.yytext,c=g.yylineno,p=g.yylloc;break;case 2:if(S=this.productions_[w[1]][1],E.$=s[s.length-S],E._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},x&&(E._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[l,d,c,u.yy,w[1],s,n].concat(h))))return k;S&&(a=a.slice(0,-1*S*2),s=s.slice(0,-1*S),n=n.slice(0,-1*S)),a.push(this.productions_[w[1]][0]),s.push(E.$),n.push(E._$),_=o[a[a.length-2]][a[a.length-1]],a.push(_);break;case 3:return!0}}return!0}),"parse")},f=function(){return{EOF:1,parseError:r((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:r((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:r((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:r((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:r((function(){return this._more=!0,this}),"more"),reject:r((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})}),"reject"),less:r((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:r((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:r((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:r((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:r((function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1}),"test_match"),next:r((function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:r((function(){var t=this.next();return t||this.lex()}),"lex"),begin:r((function(t){this.conditionStack.push(t)}),"begin"),popState:r((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:r((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:r((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:r((function(t){this.begin(t)}),"pushState"),stateStackSize:r((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:r((function(t,e,r,a){switch(r){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 79:return"NODE_DESCR";case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}}}();function m(){this.yy={}}return b.lexer=f,r(m,"Parser"),m.prototype=b,b.Parser=m,new m}();v.parser=v;var E=v,D=new Map,$=[],T=new Map,C="color",N="fill",I=l(),B=new Map,z=r((t=>y.sanitizeText(t,I)),"sanitizeText"),R=r((function(t,e=""){let r=B.get(t);r||(r={id:t,styles:[],textStyles:[]},B.set(t,r)),null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(C).exec(t)){const t=e.replace(N,"bgFill").replace(C,N);r.textStyles.push(t)}r.styles.push(e)}))}),"addStyleClass"),O=r((function(t,e=""){const r=D.get(t);null!=e&&(r.styles=e.split(","))}),"addStyle2Node"),A=r((function(t,e){t.split(",").forEach((function(t){let r=D.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},D.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)}))}),"setCssClass"),M=r(((t,e)=>{const r=t.flat(),a=[];for(const i of r)if(i.label&&(i.label=z(i.label)),"classDef"!==i.type)if("applyClass"!==i.type)if("applyStyles"!==i.type)if("column-setting"===i.type)e.columns=i.columns??-1;else if("edge"===i.type){const t=(T.get(i.id)??0)+1;T.set(i.id,t),i.id=t+"-"+i.id,$.push(i)}else{i.label||("composite"===i.type?i.label="":i.label=i.id);const t=D.get(i.id);if(void 0===t?D.set(i.id,i):("na"!==i.type&&(t.type=i.type),i.label!==i.id&&(t.label=i.label)),i.children&&M(i.children,i),"space"===i.type){const t=i.width??1;for(let e=0;e<t;e++){const t=m(i);t.id=t.id+"-"+e,D.set(t.id,t),a.push(t)}}else void 0===t&&a.push(i)}else(null==i?void 0:i.stylesStr)&&O(i.id,null==i?void 0:i.stylesStr);else A(i.id,(null==i?void 0:i.styleClass)??"");else R(i.id,i.css);e.children=a}),"populateBlockDatabase"),P=[],Y={id:"root",type:"composite",children:[],columns:-1},W=r((()=>{s.debug("Clear called"),n(),Y={id:"root",type:"composite",children:[],columns:-1},D=new Map([["root",Y]]),P=[],B=new Map,$=[],T=new Map}),"clear");function X(t){switch(s.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return s.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function F(t){return s.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function j(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}r(X,"typeStr2Type"),r(F,"edgeTypeStr2Type"),r(j,"edgeStrToEdgeData");var H=0,U=r((()=>(H++,"id-"+Math.random().toString(36).substr(2,12)+"-"+H)),"generateId"),K=r((t=>{Y.children=t,M(t,Y),P=Y.children}),"setHierarchy"),q=r((t=>{const e=D.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1}),"getColumns"),Z=r((()=>[...D.values()]),"getBlocksFlat"),G=r((()=>P||[]),"getBlocks"),J=r((()=>$),"getEdges"),V=r((t=>D.get(t)),"getBlock"),Q=r((t=>{D.set(t.id,t)}),"setBlock"),tt=r((()=>console),"getLogger"),et=r((function(){return B}),"getClasses"),rt={getConfig:r((()=>a().block),"getConfig"),typeStr2Type:X,edgeTypeStr2Type:F,edgeStrToEdgeData:j,getLogger:tt,getBlocksFlat:Z,getBlocks:G,getEdges:J,setHierarchy:K,getBlock:V,setBlock:Q,getColumns:q,getClasses:et,clear:W,generateId:U},at=r(((t,e)=>{const r=L,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return o(a,i,s,e)}),"fade"),it=r((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${at(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${at(t.mainBkg,.5)};\n fill: ${at(t.clusterBkg,.5)};\n stroke: ${at(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles"),st=r(((t,e,r,a)=>{e.forEach((e=>{nt[e](t,r,a)}))}),"insertMarkers"),nt={extension:r(((t,e,r)=>{s.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),composition:r(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),aggregation:r(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),dependency:r(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).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")}),"dependency"),lollipop:r(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:r(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:r(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),cross:r(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),barb:r(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},ot=st,lt=(null==(e=null==(t=l())?void 0:t.block)?void 0:e.padding)??8;function ct(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}r(ct,"calculateBlockPosition");var dt=r((t=>{let e=0,r=0;for(const a of t.children){const{width:i,height:n,x:o,y:l}=a.size??{width:0,height:0,x:0,y:0};s.debug("getMaxChildSize abc95 child:",a.id,"width:",i,"height:",n,"x:",o,"y:",l,a.type),"space"!==a.type&&(i>e&&(e=i/(t.widthInColumns??1)),n>r&&(r=n))}return{width:e,height:r}}),"getMaxChildSize");function ht(t,e,r=0,a=0){var i,n,o,l,c,d,h,g,u,y,p;s.debug("setBlockSizes abc95 (start)",t.id,null==(i=null==t?void 0:t.size)?void 0:i.x,"block width =",null==t?void 0:t.size,"sieblingWidth",r),(null==(n=null==t?void 0:t.size)?void 0:n.width)||(t.size={width:r,height:a,x:0,y:0});let x=0,b=0;if((null==(o=t.children)?void 0:o.length)>0){for(const r of t.children)ht(r,e);const i=dt(t);x=i.width,b=i.height,s.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",x,b);for(const e of t.children)e.size&&(s.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${x} ${b} ${JSON.stringify(e.size)}`),e.size.width=x*(e.widthInColumns??1)+lt*((e.widthInColumns??1)-1),e.size.height=b,e.size.x=0,e.size.y=0,s.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${x} maxHeight:${b}`));for(const r of t.children)ht(r,e,x,b);const n=t.columns??-1;let o=0;for(const e of t.children)o+=e.widthInColumns??1;let g=t.children.length;n>0&&n<o&&(g=n);const u=Math.ceil(o/g);let y=g*(x+lt)+lt,p=u*(b+lt)+lt;if(y<r){s.debug(`Detected to small siebling: abc95 ${t.id} sieblingWidth ${r} sieblingHeight ${a} width ${y}`),y=r,p=a;const e=(r-g*lt-lt)/g,i=(a-u*lt-lt)/u;s.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",x),s.debug("Size indata abc88",t.id,"childHeight",i,"maxHeight",b),s.debug("Size indata abc88 xSize",g,"padding",lt);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=i,r.size.x=0,r.size.y=0)}if(s.debug(`abc95 (finale calc) ${t.id} xSize ${g} ySize ${u} columns ${n}${t.children.length} width=${Math.max(y,(null==(l=t.size)?void 0:l.width)||0)}`),y<((null==(c=null==t?void 0:t.size)?void 0:c.width)||0)){y=(null==(d=null==t?void 0:t.size)?void 0:d.width)||0;const e=n>0?Math.min(t.children.length,n):t.children.length;if(e>0){const r=(y-e*lt-lt)/e;s.debug("abc95 (growing to fit) width",t.id,y,null==(h=t.size)?void 0:h.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:y,height:p,x:0,y:0}}s.debug("setBlockSizes abc94 (done)",t.id,null==(g=null==t?void 0:t.size)?void 0:g.x,null==(u=null==t?void 0:t.size)?void 0:u.width,null==(y=null==t?void 0:t.size)?void 0:y.y,null==(p=null==t?void 0:t.size)?void 0:p.height)}function gt(t,e){var r,a,i,n,o,l,c,d,h,g,u,y,p,x,b,f,m;s.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${null==(r=null==t?void 0:t.size)?void 0:r.x} y: ${null==(a=null==t?void 0:t.size)?void 0:a.y} width: ${null==(i=null==t?void 0:t.size)?void 0:i.width}`);const w=t.columns??-1;if(s.debug("layoutBlocks columns abc95",t.id,"=>",w,t),t.children&&t.children.length>0){const e=(null==(o=null==(n=null==t?void 0:t.children[0])?void 0:n.size)?void 0:o.width)??0,r=t.children.length*e+(t.children.length-1)*lt;s.debug("widthOfChildren 88",r,"posX");let a=0;s.debug("abc91 block?.size?.x",t.id,null==(l=null==t?void 0:t.size)?void 0:l.x);let i=(null==(c=null==t?void 0:t.size)?void 0:c.x)?(null==(d=null==t?void 0:t.size)?void 0:d.x)+(-(null==(h=null==t?void 0:t.size)?void 0:h.width)/2||0):-lt,b=0;for(const n of t.children){const e=t;if(!n.size)continue;const{width:r,height:o}=n.size,{px:l,py:c}=ct(w,a);if(c!=b&&(b=c,i=(null==(g=null==t?void 0:t.size)?void 0:g.x)?(null==(u=null==t?void 0:t.size)?void 0:u.x)+(-(null==(y=null==t?void 0:t.size)?void 0:y.width)/2||0):-lt,s.debug("New row in layout for block",t.id," and child ",n.id,b)),s.debug(`abc89 layout blocks (child) id: ${n.id} Pos: ${a} (px, py) ${l},${c} (${null==(p=null==e?void 0:e.size)?void 0:p.x},${null==(x=null==e?void 0:e.size)?void 0:x.y}) parent: ${e.id} width: ${r}${lt}`),e.size){const t=r/2;n.size.x=i+lt+t,s.debug(`abc91 layout blocks (calc) px, pyid:${n.id} startingPos=X${i} new startingPosX${n.size.x} ${t} padding=${lt} width=${r} halfWidth=${t} => x:${n.size.x} y:${n.size.y} ${n.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((null==n?void 0:n.widthInColumns)??1)/2}`),i=n.size.x+t,n.size.y=e.size.y-e.size.height/2+c*(o+lt)+o/2+lt,s.debug(`abc88 layout blocks (calc) px, pyid:${n.id}startingPosX${i}${lt}${t}=>x:${n.size.x}y:${n.size.y}${n.widthInColumns}(width * (child?.w || 1)) / 2${r*((null==n?void 0:n.widthInColumns)??1)/2}`)}n.children&&gt(n),a+=(null==n?void 0:n.widthInColumns)??1,s.debug("abc88 columnsPos",n,a)}}s.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${null==(b=null==t?void 0:t.size)?void 0:b.x} y: ${null==(f=null==t?void 0:t.size)?void 0:f.y} width: ${null==(m=null==t?void 0:t.size)?void 0:m.width}`)}function ut(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:s,y:n,width:o,height:l}=t.size;s-o/2<e&&(e=s-o/2),n-l/2<r&&(r=n-l/2),s+o/2>a&&(a=s+o/2),n+l/2>i&&(i=n+l/2)}if(t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=ut(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function yt(t){const e=t.getBlock("root");if(!e)return;ht(e,t,0,0),gt(e),s.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:a,maxX:i,maxY:n}=ut(e);return{x:r,y:a,width:i-r,height:n-a}}function pt(t,e){e&&t.attr("style",e)}function xt(t){const e=w(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),a=t.label,i=t.isNode?"nodeLabel":"edgeLabel",s=r.append("span");return s.html(a),pt(s,t.labelStyle),s.attr("class",i),pt(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}r(ht,"setBlockSizes"),r(gt,"layoutBlocks"),r(ut,"findBounds"),r(yt,"layout"),r(pt,"applyStyle"),r(xt,"addHtmlLabel");var bt=r(((t,e,r,a)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),d(l().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),s.debug("vertexText"+i);return xt({isNode:a,label:p(x(i)),labelStyle:e.replace("fill:","color:")})}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let a=[];a="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const e of a){const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),r?a.setAttribute("class","title-row"):a.setAttribute("class","row"),a.textContent=e.trim(),t.appendChild(a)}return t}}),"createLabel"),ft=r(((t,e,r,a,i)=>{e.arrowTypeStart&&wt(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&wt(t,"end",e.arrowTypeEnd,r,a,i)}),"addEdgeMarkers"),mt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},wt=r(((t,e,r,a,i,n)=>{const o=mt[r];if(!o)return void s.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${n}-${o}${l})`)}),"addEdgeMarker"),kt={},Lt={},St=r(((t,e)=>{const r=l(),a=d(r.flowchart.htmlLabels),i="markdown"===e.labelType?h(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:!0},r):bt(e.label,e.labelStyle),s=t.insert("g").attr("class","edgeLabel"),n=s.insert("g").attr("class","label");n.node().appendChild(i);let o,c=i.getBBox();if(a){const t=i.children[0],e=w(i);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(n.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),kt[e.id]=s,e.width=c.width,e.height=c.height,e.startLabelLeft){const r=bt(e.startLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");o=i.node().appendChild(r);const s=r.getBBox();i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].startLeft=a,_t(o,e.startLabelLeft)}if(e.startLabelRight){const r=bt(e.startLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");o=a.node().appendChild(r),i.node().appendChild(r);const s=r.getBBox();i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].startRight=a,_t(o,e.startLabelRight)}if(e.endLabelLeft){const r=bt(e.endLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");o=i.node().appendChild(r);const s=r.getBBox();i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(r),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].endLeft=a,_t(o,e.endLabelLeft)}if(e.endLabelRight){const r=bt(e.endLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");o=i.node().appendChild(r);const s=r.getBBox();i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(r),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].endRight=a,_t(o,e.endLabelRight)}return i}),"insertEdgeLabel");function _t(t,e){l().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}r(_t,"setTerminalWidth");var vt=r(((t,e)=>{s.debug("Moving label abc88 ",t.id,t.label,kt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=l(),{subGraphTitleTotalMargin:i}=g(a);if(t.label){const a=kt[t.id];let n=t.x,o=t.y;if(r){const a=u.calcLabelPosition(r);s.debug("Moving label "+t.label+" from (",n,",",o,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(n=a.x,o=a.y)}a.attr("transform",`translate(${n}, ${o+i/2})`)}if(t.startLabelLeft){const e=Lt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=Lt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=Lt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=Lt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}}),"positionEdgeLabel"),Et=r(((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,o=t.height/2;return i>=n||s>=o}),"outsideNode"),Dt=r(((t,e,r)=>{s.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,n=Math.abs(a-r.x),o=t.width/2;let l=r.x<e.x?o-n:o+n;const c=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(a-e.x)*c){let t=r.y<e.y?e.y-c-i:i-c-e.y;l=h*t/d;const a={x:r.x<e.x?r.x+l:r.x-h+l,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===l&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),s.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${l}`,a),a}{l=r.x<e.x?e.x-o-a:a-o-e.x;let t=d*l/h,i=r.x<e.x?r.x+h-l:r.x-h+l,n=r.y<e.y?r.y+t:r.y-t;return s.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${l}`,{_x:i,_y:n}),0===l&&(i=e.x,n=e.y),0===h&&(i=e.x),0===d&&(n=e.y),{x:i,y:n}}}),"intersection"),$t=r(((t,e)=>{s.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach((t=>{if(Et(e,t)||i)a=t,i||r.push(t);else{const s=Dt(e,a,t);let n=!1;r.forEach((t=>{n=n||t.x===s.x&&t.y===s.y})),r.some((t=>t.x===s.x&&t.y===s.y))||r.push(s),i=!0}})),r}),"cutPathAtIntersect"),Tt=r((function(t,e,r,a,i,n,o){let d=r.points;s.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=n.node(e.v);var u=n.node(e.w);(null==u?void 0:u.intersect)&&(null==g?void 0:g.intersect)&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(u.intersect(d[d.length-1]))),r.toCluster&&(s.debug("to cluster abc88",a[r.toCluster]),d=$t(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(s.debug("from cluster abc88",a[r.fromCluster]),d=$t(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const y=d.filter((t=>!Number.isNaN(t.y)));let p=_;!r.curve||"graph"!==i&&"flowchart"!==i||(p=r.curve);const{x:x,y:b}=c(r),f=S().x(x).y(b).curve(p);let m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}const w=t.append("path").attr("d",f(y)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(l().flowchart.arrowMarkerAbsolute||l().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),ft(w,r,k,o,i);let L={};return h&&(L.updatedPath=d),L.originalPath=r.points,L}),"insertEdge"),Ct=r((t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e}),"expandAndDeduplicateDirections"),Nt=r(((t,e,r)=>{const a=Ct(t),i=e.height+2*r.padding,s=i/2,n=e.width+2*s+r.padding,o=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*o},{x:n-s,y:0},{x:n,y:0},{x:n,y:-i/3},{x:n+2*o,y:-i/2},{x:n,y:-2*i/3},{x:n,y:-i},{x:n-s,y:-i},{x:n/2,y:-i-2*o},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*o,y:-i/2},{x:0,y:-i/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:s,y:-i},{x:n-s,y:-i},{x:n,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-i+s},{x:0,y:-i}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-i+s},{x:n,y:-i}]:a.has("right")&&a.has("left")?[{x:s,y:0},{x:s,y:-o},{x:n-s,y:-o},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+o},{x:s,y:-i+o},{x:s,y:-i},{x:0,y:-i/2}]:a.has("up")&&a.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-i+o},{x:0,y:-i+o},{x:n/2,y:-i},{x:n,y:-i+o},{x:n-s,y:-i+o},{x:n-s,y:-o},{x:n,y:-o}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-i}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-i}]:a.has("left")&&a.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-i}]:a.has("left")&&a.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-i}]:a.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:n-s,y:-o},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+o},{x:s,y:-i+o},{x:s,y:-i+o}]:a.has("left")?[{x:s,y:0},{x:s,y:-o},{x:n-s,y:-o},{x:n-s,y:-i+o},{x:s,y:-i+o},{x:s,y:-i},{x:0,y:-i/2}]:a.has("up")?[{x:s,y:-o},{x:s,y:-i+o},{x:0,y:-i+o},{x:n/2,y:-i},{x:n,y:-i+o},{x:n-s,y:-i+o},{x:n-s,y:-o}]:a.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-i+o},{x:n-s,y:-i+o},{x:n-s,y:-o},{x:n,y:-o}]:[{x:0,y:0}]}),"getArrowPoints");function It(t,e){return t.intersect(e)}r(It,"intersectNode");var Bt=It;function zt(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,o=s-a.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);a.x<i&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<s&&(d=-d),{x:i+c,y:s+d}}r(zt,"intersectEllipse");var Rt=zt;function Ot(t,e,r){return Rt(t,e,e,r)}r(Ot,"intersectCircle");var At=Ot;function Mt(t,e,r,a){var i,s,n,o,l,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,l=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+l,u=i*a.x+n*a.y+l,!(0!==g&&0!==u&&Pt(g,u)||(s=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+o*t.y+c,h=s*e.x+o*e.y+c,0!==d&&0!==h&&Pt(d,h)||0==(y=i*o-s*n))))return p=Math.abs(y/2),{x:(x=n*c-o*l)<0?(x-p)/y:(x+p)/y,y:(x=s*l-i*c)<0?(x-p)/y:(x+p)/y}}function Pt(t,e){return t*e>0}r(Mt,"intersectLine"),r(Pt,"sameSign");var Yt=Mt,Wt=Xt;function Xt(t,e,r){var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)})):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-n,c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=Yt(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort((function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return s<l?-1:s===l?0:1})),s[0]):t}r(Xt,"intersectPolygon");var Ft={node:Bt,circle:At,ellipse:Rt,polygon:Wt,rect:r(((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,o=e.y-s,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,a=c):(n<0&&(l=-l),r=l,a=0===n?0:l*o/n),{x:i+r,y:s+a}}),"intersectRect")},jt=r((async(t,e,a,i)=>{const s=l();let n;const o=e.useHtmlLabels||d(s.flowchart.htmlLabels);n=a||"node default";const c=t.insert("g").attr("class",n).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",e.labelStyle);let u;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const y=g.node();let p;p="markdown"===e.labelType?h(g,f(x(u),s),{useHtmlLabels:o,width:e.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):y.appendChild(bt(f(x(u),s),e.labelStyle,!1,i));let b=p.getBBox();const m=e.padding/2;if(d(s.flowchart.htmlLabels)){const t=p.children[0],e=w(p),a=t.getElementsByTagName("img");if(a){const t=""===u.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map((e=>new Promise((a=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=s.fontSize?s.fontSize:window.getComputedStyle(document.body).fontSize,r=5,a=parseInt(t,10)*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";a(e)}r(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}return o?g.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):g.attr("transform","translate(0, "+-b.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:b,halfPadding:m,label:g}}),"labelHelper"),Ht=r(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds");function Ut(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}r(Ut,"insertPolygonShape");var Kt=r((async(t,e)=>{e.useHtmlLabels||l().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes,!0);s.info("Classes = ",e.classes);const n=r.insert("rect",":first-child");return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),Ht(e,n),e.intersect=function(t){return Ft.rect(e,t)},r}),"note"),qt=r((t=>t?" "+t:""),"formatClass"),Zt=r(((t,e)=>`${e||"node default"}${qt(t.classes)} ${qt(t.class)}`),"getClassesFromNode"),Gt=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),n=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];s.info("Question main (Circle)");const o=Ut(r,i,i,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return s.warn("Intersect called"),Ft.polygon(e,n,t)},r}),"question"),Jt=r(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Ft.circle(e,14,t)},r}),"choice"),Vt=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.height+e.padding,s=i/4,n=a.width+2*s+e.padding,o=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],l=Ut(r,n,i,o);return l.attr("style",e.style),Ht(e,l),e.intersect=function(t){return Ft.polygon(e,o,t)},r}),"hexagon"),Qt=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,o=Nt(e.directions,a,e),l=Ut(r,n,i,o);return l.attr("style",e.style),Ht(e,l),e.intersect=function(t){return Ft.polygon(e,o,t)},r}),"block_arrow"),te=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Ut(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"rect_left_inv_arrow"),ee=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],o=Ut(r,i,s,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"lean_right"),re=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],o=Ut(r,i,s,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"lean_left"),ae=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],o=Ut(r,i,s,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"trapezoid"),ie=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Ut(r,i,s,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"inv_trapezoid"),se=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],o=Ut(r,i,s,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"rect_right_inv_arrow"),ne=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),o=a.height+n+e.padding,l="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+n)+")");return Ht(e,c),e.intersect=function(t){const r=Ft.rect(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r}),"cylinder"),oe=r((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes+" "+e.class,!0),n=r.insert("rect",":first-child"),o=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,c=e.positioned?-o/2:-a.width/2-i,d=e.positioned?-l/2:-a.height/2-i;if(n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",o).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(de(n,e.props.borders,o,l),t.delete("borders")),t.forEach((t=>{s.warn(`Unknown node property ${t}`)}))}return Ht(e,n),e.intersect=function(t){return Ft.rect(e,t)},r}),"rect"),le=r((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes,!0),n=r.insert("rect",":first-child"),o=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,c=e.positioned?-o/2:-a.width/2-i,d=e.positioned?-l/2:-a.height/2-i;if(n.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",o).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(de(n,e.props.borders,o,l),t.delete("borders")),t.forEach((t=>{s.warn(`Unknown node property ${t}`)}))}return Ht(e,n),e.intersect=function(t){return Ft.rect(e,t)},r}),"composite"),ce=r((async(t,e)=>{const{shapeSvg:r}=await jt(t,e,"label",!0);s.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(de(a,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{s.warn(`Unknown node property ${t}`)}))}return Ht(e,a),e.intersect=function(t){return Ft.rect(e,t)},r}),"labelRect");function de(t,e,a,i){const n=[],o=r((t=>{n.push(t,0)}),"addBorder"),l=r((t=>{n.push(0,t)}),"skipBorder");e.includes("t")?(s.debug("add top border"),o(a)):l(a),e.includes("r")?(s.debug("add right border"),o(i)):l(i),e.includes("b")?(s.debug("add bottom border"),o(a)):l(a),e.includes("l")?(s.debug("add left border"),o(i)):l(i),t.attr("stroke-dasharray",n.join(" "))}r(de,"applyNodePropertyBorders");var he=r(((t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),n=a.insert("line"),o=a.insert("g").attr("class","label"),c=e.labelText.flat?e.labelText.flat():e.labelText;let h="";h="object"==typeof c?c[0]:c,s.info("Label text abc79",h,c,"object"==typeof c);const g=o.node().appendChild(bt(h,e.labelStyle,!0,!0));let u={width:0,height:0};if(d(l().flowchart.htmlLabels)){const t=g.children[0],e=w(g);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}s.info("Text 2",c);const y=c.slice(1,c.length);let p=g.getBBox();const x=o.node().appendChild(bt(y.join?y.join("<br/>"):y,e.labelStyle,!0,!0));if(d(l().flowchart.htmlLabels)){const t=x.children[0],e=w(x);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}const b=e.padding/2;return w(x).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+b+5)+")"),w(g).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-b+3)+")"),i.attr("class","outer title-state").attr("x",-u.width/2-b).attr("y",-u.height/2-b).attr("width",u.width+e.padding).attr("height",u.height+e.padding),n.attr("class","divider").attr("x1",-u.width/2-b).attr("x2",u.width/2+b).attr("y1",-u.height/2-b+p.height+b).attr("y2",-u.height/2-b+p.height+b),Ht(e,i),e.intersect=function(t){return Ft.rect(e,t)},a}),"rectWithTitle"),ge=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return Ht(e,n),e.intersect=function(t){return Ft.rect(e,t)},r}),"stadium"),ue=r((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,Zt(e,void 0),!0),n=r.insert("circle",":first-child");return n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),s.info("Circle main"),Ht(e,n),e.intersect=function(t){return s.info("Circle intersect",e,a.width/2+i,t),Ft.circle(e,a.width/2+i,t)},r}),"circle"),ye=r((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,Zt(e,void 0),!0),n=r.insert("g",":first-child"),o=n.insert("circle"),l=n.insert("circle");return n.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),s.info("DoubleCircle main"),Ht(e,o),e.intersect=function(t){return s.info("DoubleCircle intersect",e,a.width/2+i+5,t),Ft.circle(e,a.width/2+i+5,t)},r}),"doublecircle"),pe=r((async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Zt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Ut(r,i,s,n);return o.attr("style",e.style),Ht(e,o),e.intersect=function(t){return Ft.polygon(e,n,t)},r}),"subroutine"),xe=r(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ht(e,a),e.intersect=function(t){return Ft.circle(e,7,t)},r}),"start"),be=r(((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,s=10;"LR"===r&&(i=10,s=70);const n=a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return Ht(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Ft.rect(e,t)},a}),"forkJoin"),fe={rhombus:Gt,composite:le,question:Gt,rect:oe,labelRect:ce,rectWithTitle:he,choice:Jt,circle:ue,doublecircle:ye,stadium:ge,hexagon:Vt,block_arrow:Qt,rect_left_inv_arrow:te,lean_right:ee,lean_left:re,trapezoid:ae,inv_trapezoid:ie,rect_right_inv_arrow:se,cylinder:ne,start:xe,end:r(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ht(e,i),e.intersect=function(t){return Ft.circle(e,7,t)},r}),"end"),note:Kt,subroutine:pe,fork:be,join:be,class_box:r(((t,e)=>{var r;const a=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),n=s.insert("rect",":first-child"),o=s.insert("line"),c=s.insert("line");let h=0,g=4;const u=s.insert("g").attr("class","label");let y=0;const p=null==(r=e.classData.annotations)?void 0:r[0],x=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",b=u.node().appendChild(bt(x,e.labelStyle,!0,!0));let f=b.getBBox();if(d(l().flowchart.htmlLabels)){const t=b.children[0],e=w(b);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}e.classData.annotations[0]&&(g+=f.height+4,h+=f.width);let m=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&(l().flowchart.htmlLabels?m+="&lt;"+e.classData.type+"&gt;":m+="<"+e.classData.type+">");const k=u.node().appendChild(bt(m,e.labelStyle,!0,!0));w(k).attr("class","classTitle");let L=k.getBBox();if(d(l().flowchart.htmlLabels)){const t=k.children[0],e=w(k);L=t.getBoundingClientRect(),e.attr("width",L.width),e.attr("height",L.height)}g+=L.height+4,L.width>h&&(h=L.width);const S=[];e.classData.members.forEach((t=>{const r=t.getDisplayDetails();let a=r.displayText;l().flowchart.htmlLabels&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=u.node().appendChild(bt(a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let s=i.getBBox();if(d(l().flowchart.htmlLabels)){const t=i.children[0],e=w(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>h&&(h=s.width),g+=s.height+4,S.push(i)})),g+=8;const _=[];if(e.classData.methods.forEach((t=>{const r=t.getDisplayDetails();let a=r.displayText;l().flowchart.htmlLabels&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=u.node().appendChild(bt(a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let s=i.getBBox();if(d(l().flowchart.htmlLabels)){const t=i.children[0],e=w(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>h&&(h=s.width),g+=s.height+4,_.push(i)})),g+=8,p){let t=(h-f.width)/2;w(b).attr("transform","translate( "+(-1*h/2+t)+", "+-1*g/2+")"),y=f.height+4}let v=(h-L.width)/2;return w(k).attr("transform","translate( "+(-1*h/2+v)+", "+(-1*g/2+y)+")"),y+=L.height+4,o.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-g/2-a+8+y).attr("y2",-g/2-a+8+y),y+=8,S.forEach((t=>{w(t).attr("transform","translate( "+-h/2+", "+(-1*g/2+y+4)+")");const e=null==t?void 0:t.getBBox();y+=((null==e?void 0:e.height)??0)+4})),y+=8,c.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-g/2-a+8+y).attr("y2",-g/2-a+8+y),y+=8,_.forEach((t=>{w(t).attr("transform","translate( "+-h/2+", "+(-1*g/2+y)+")");const e=null==t?void 0:t.getBBox();y+=((null==e?void 0:e.height)??0)+4})),n.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-a).attr("y",-g/2-a).attr("width",h+e.padding).attr("height",g+e.padding),Ht(e,n),e.intersect=function(t){return Ft.rect(e,t)},s}),"class_box")},me={},we=r((async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===l().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await fe[e.shape](a,e,r)}else i=await fe[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),me[e.id]=a,e.haveCallback&&me[e.id].attr("class",me[e.id].attr("class")+" clickable"),a}),"insertNode"),ke=r((t=>{const e=me[t.id];s.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode");function Le(t,e,r=!1){var i,s,n;const o=t;let l="default";((null==(i=null==o?void 0:o.classes)?void 0:i.length)||0)>0&&(l=((null==o?void 0:o.classes)??[]).join(" ")),l+=" flowchart-label";let c,d=0,h="";switch(o.type){case"round":d=5,h="rect";break;case"composite":d=0,h="composite",c=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const g=b((null==o?void 0:o.styles)??[]),u=o.label,y=o.size??{width:0,height:0,x:0,y:0};return{labelStyle:g.labelStyle,shape:h,labelText:u,rx:d,ry:d,class:l,style:g.style,id:o.id,directions:o.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:r,intersect:void 0,type:o.type,padding:c??(null==(n=null==(s=a())?void 0:s.block)?void 0:n.padding)??0}}async function Se(t,e,r){const i=Le(e,0,!1);if("group"===i.type)return;const s=a(),n=await we(t,i,{config:s}),o=n.node().getBBox(),l=r.getBlock(i.id);l.size={width:o.width,height:o.height,x:0,y:0,node:n},r.setBlock(l),n.remove()}async function _e(t,e,r){const i=Le(e,0,!0);if("space"!==r.getBlock(i.id).type){const r=a();await we(t,i,{config:r}),e.intersect=null==i?void 0:i.intersect,ke(i)}}async function ve(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await ve(t,i.children,r,a)}async function Ee(t,e,r){await ve(t,e,r,Se)}async function De(t,e,r){await ve(t,e,r,_e)}async function $e(t,e,r,a,i){const s=new k({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const n of r)n.size&&s.setNode(n.id,{width:n.size.width,height:n.size.height,intersect:n.intersect});for(const n of e)if(n.start&&n.end){const e=a.getBlock(n.start),r=a.getBlock(n.end);if((null==e?void 0:e.size)&&(null==r?void 0:r.size)){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}];Tt(t,{v:n.start,w:n.end,name:n.id},{...n,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,i),n.label&&(await St(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),vt({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}r(Le,"getNodeFromBlock"),r(Se,"calculateBlockSize"),r(_e,"insertBlockPositioned"),r(ve,"performOperations"),r(Ee,"calculateBlockSizes"),r(De,"insertBlocks"),r($e,"insertEdges");var Te=r((function(t,e){return e.db.getClasses()}),"getClasses"),Ce={parser:E,db:rt,renderer:{draw:r((async function(t,e,r,n){const{securityLevel:o,block:l}=a(),c=n.db;let d;"sandbox"===o&&(d=w("#i"+e));const h=w("sandbox"===o?d.nodes()[0].contentDocument.body:"body"),g="sandbox"===o?h.select(`[id="${e}"]`):w(`[id="${e}"]`);ot(g,["point","circle","cross"],n.type,e);const u=c.getBlocks(),y=c.getBlocksFlat(),p=c.getEdges(),x=g.insert("g").attr("class","block");await Ee(x,u,c);const b=yt(c);if(await De(x,u,c),await $e(x,p,y,c,e),b){const t=b,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:n}=l;i(g,r,a,!!n),s.debug("Here Bounds",b,t),g.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}}),"draw"),getClasses:Te},styles:it};export{Ce as diagram};
@@ -1 +1 @@
1
- var o="><+-.,[]".split("");const m={name:"brainfuck",startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(n,t){if(n.eatSpace())return null;n.sol()&&(t.commentLine=!1);var e=n.next().toString();return o.indexOf(e)===-1?(t.commentLine=!0,n.eol()&&(t.commentLine=!1),"comment"):t.commentLine===!0?(n.eol()&&(t.commentLine=!1),"comment"):e==="]"||e==="["?(e==="["?t.left++:t.right++,"bracket"):e==="+"||e==="-"?"keyword":e==="<"||e===">"?"atom":e==="."||e===","?"def":void(n.eol()&&(t.commentLine=!1))}};export{m as brainfuck};
1
+ var e="><+-.,[]".split("");const t={name:"brainfuck",startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(t,n){if(t.eatSpace())return null;t.sol()&&(n.commentLine=!1);var o=t.next().toString();return-1===e.indexOf(o)?(n.commentLine=!0,t.eol()&&(n.commentLine=!1),"comment"):!0===n.commentLine?(t.eol()&&(n.commentLine=!1),"comment"):"]"===o||"["===o?("["===o?n.left++:n.right++,"bracket"):"+"===o||"-"===o?"keyword":"<"===o||">"===o?"atom":"."===o||","===o?"def":void(t.eol()&&(n.commentLine=!1))}};export{t as brainfuck};
@@ -0,0 +1 @@
1
+ var t,e;import{g as n,d as a}from"./chunk-D6G4REZN-DXlJF2Bk.js";import{_ as i,s,g as r,a as l,b as o,c as h,l as d,d as u,e as p,f as y,h as f,i as g,w as b,j as _,k as m}from"./mermaid-Cuo5gmPJ.js";import{s as x}from"./transform-DjHZbYKP.js";import"./index-CCmIqGps.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var E=function(){var t=i((function(t,e,n,a){for(n=n||{},a=t.length;a--;n[t[a]]=e);return n}),"o"),e=[1,24],n=[1,25],a=[1,26],s=[1,27],r=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],f=[1,29],g=[1,30],b=[1,31],_=[1,32],m=[1,33],x=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],O=[1,40],k=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],j=[1,50],M=[1,51],I=[1,52],L=[1,53],Y=[1,54],U=[1,55],F=[1,56],X=[1,57],z=[1,58],W=[1,59],Q=[1,60],$=[14,42],H=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[1,82],G=[1,83],K=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],nt=[12,33],at=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:i((function(t,e,n,a,i,s,r){var l=s.length-1;switch(i){case 3:a.setDirection("TB");break;case 4:a.setDirection("BT");break;case 5:a.setDirection("RL");break;case 6:a.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:a.setC4Type(s[l-3]);break;case 19:a.setTitle(s[l].substring(6)),this.$=s[l].substring(6);break;case 20:a.setAccDescription(s[l].substring(15)),this.$=s[l].substring(15);break;case 21:this.$=s[l].trim(),a.setTitle(this.$);break;case 22:case 23:this.$=s[l].trim(),a.setAccDescription(this.$);break;case 28:s[l].splice(2,0,"ENTERPRISE"),a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 29:s[l].splice(2,0,"SYSTEM"),a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 30:a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 31:s[l].splice(2,0,"CONTAINER"),a.addContainerBoundary(...s[l]),this.$=s[l];break;case 32:a.addDeploymentNode("node",...s[l]),this.$=s[l];break;case 33:a.addDeploymentNode("nodeL",...s[l]),this.$=s[l];break;case 34:a.addDeploymentNode("nodeR",...s[l]),this.$=s[l];break;case 35:a.popBoundaryParseStack();break;case 39:a.addPersonOrSystem("person",...s[l]),this.$=s[l];break;case 40:a.addPersonOrSystem("external_person",...s[l]),this.$=s[l];break;case 41:a.addPersonOrSystem("system",...s[l]),this.$=s[l];break;case 42:a.addPersonOrSystem("system_db",...s[l]),this.$=s[l];break;case 43:a.addPersonOrSystem("system_queue",...s[l]),this.$=s[l];break;case 44:a.addPersonOrSystem("external_system",...s[l]),this.$=s[l];break;case 45:a.addPersonOrSystem("external_system_db",...s[l]),this.$=s[l];break;case 46:a.addPersonOrSystem("external_system_queue",...s[l]),this.$=s[l];break;case 47:a.addContainer("container",...s[l]),this.$=s[l];break;case 48:a.addContainer("container_db",...s[l]),this.$=s[l];break;case 49:a.addContainer("container_queue",...s[l]),this.$=s[l];break;case 50:a.addContainer("external_container",...s[l]),this.$=s[l];break;case 51:a.addContainer("external_container_db",...s[l]),this.$=s[l];break;case 52:a.addContainer("external_container_queue",...s[l]),this.$=s[l];break;case 53:a.addComponent("component",...s[l]),this.$=s[l];break;case 54:a.addComponent("component_db",...s[l]),this.$=s[l];break;case 55:a.addComponent("component_queue",...s[l]),this.$=s[l];break;case 56:a.addComponent("external_component",...s[l]),this.$=s[l];break;case 57:a.addComponent("external_component_db",...s[l]),this.$=s[l];break;case 58:a.addComponent("external_component_queue",...s[l]),this.$=s[l];break;case 60:a.addRel("rel",...s[l]),this.$=s[l];break;case 61:a.addRel("birel",...s[l]),this.$=s[l];break;case 62:a.addRel("rel_u",...s[l]),this.$=s[l];break;case 63:a.addRel("rel_d",...s[l]),this.$=s[l];break;case 64:a.addRel("rel_l",...s[l]),this.$=s[l];break;case 65:a.addRel("rel_r",...s[l]),this.$=s[l];break;case 66:a.addRel("rel_b",...s[l]),this.$=s[l];break;case 67:s[l].splice(0,1),a.addRel("rel",...s[l]),this.$=s[l];break;case 68:a.updateElStyle("update_el_style",...s[l]),this.$=s[l];break;case 69:a.updateRelStyle("update_rel_style",...s[l]),this.$=s[l];break;case 70:a.updateLayoutConfig("update_layout_config",...s[l]),this.$=s[l];break;case 71:this.$=[s[l]];break;case 72:s[l].unshift(s[l-1]),this.$=s[l];break;case 73:case 75:this.$=s[l].trim();break;case 74:let t={};t[s[l-1].trim()]=s[l].trim(),this.$=t;break;case 76:this.$=""}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:a,26:s,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:70,19:20,20:21,21:22,22:e,23:n,24:a,26:s,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:71,19:20,20:21,21:22,22:e,23:n,24:a,26:s,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:72,19:20,20:21,21:22,22:e,23:n,24:a,26:s,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:73,19:20,20:21,21:22,22:e,23:n,24:a,26:s,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{14:[1,74]},t($,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t($,[2,14]),t(H,[2,16],{12:[1,76]}),t($,[2,36],{12:[1,77]}),t(q,[2,19]),t(q,[2,20]),{25:[1,78]},{27:[1,79]},t(q,[2,23]),{35:80,75:81,76:V,77:G,79:K,80:J},{35:86,75:81,76:V,77:G,79:K,80:J},{35:87,75:81,76:V,77:G,79:K,80:J},{35:88,75:81,76:V,77:G,79:K,80:J},{35:89,75:81,76:V,77:G,79:K,80:J},{35:90,75:81,76:V,77:G,79:K,80:J},{35:91,75:81,76:V,77:G,79:K,80:J},{35:92,75:81,76:V,77:G,79:K,80:J},{35:93,75:81,76:V,77:G,79:K,80:J},{35:94,75:81,76:V,77:G,79:K,80:J},{35:95,75:81,76:V,77:G,79:K,80:J},{35:96,75:81,76:V,77:G,79:K,80:J},{35:97,75:81,76:V,77:G,79:K,80:J},{35:98,75:81,76:V,77:G,79:K,80:J},{35:99,75:81,76:V,77:G,79:K,80:J},{35:100,75:81,76:V,77:G,79:K,80:J},{35:101,75:81,76:V,77:G,79:K,80:J},{35:102,75:81,76:V,77:G,79:K,80:J},{35:103,75:81,76:V,77:G,79:K,80:J},{35:104,75:81,76:V,77:G,79:K,80:J},t(Z,[2,59]),{35:105,75:81,76:V,77:G,79:K,80:J},{35:106,75:81,76:V,77:G,79:K,80:J},{35:107,75:81,76:V,77:G,79:K,80:J},{35:108,75:81,76:V,77:G,79:K,80:J},{35:109,75:81,76:V,77:G,79:K,80:J},{35:110,75:81,76:V,77:G,79:K,80:J},{35:111,75:81,76:V,77:G,79:K,80:J},{35:112,75:81,76:V,77:G,79:K,80:J},{35:113,75:81,76:V,77:G,79:K,80:J},{35:114,75:81,76:V,77:G,79:K,80:J},{35:115,75:81,76:V,77:G,79:K,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:G,79:K,80:J},{35:120,75:81,76:V,77:G,79:K,80:J},{35:121,75:81,76:V,77:G,79:K,80:J},{35:122,75:81,76:V,77:G,79:K,80:J},{35:123,75:81,76:V,77:G,79:K,80:J},{35:124,75:81,76:V,77:G,79:K,80:J},{35:125,75:81,76:V,77:G,79:K,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t($,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:n,24:a,26:s,28:r}),t($,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:a,26:s,28:r,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:f,45:g,46:b,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t(q,[2,21]),t(q,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:V,77:G,79:K,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(nt,[2,28]),t(nt,[2,29]),t(nt,[2,30]),t(nt,[2,31]),t(nt,[2,32]),t(nt,[2,33]),t(nt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t($,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(at,[2,25]),t(at,[2,26],{12:[1,138]}),t(at,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:i((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:i((function(t){var e=this,n=[0],a=[],s=[null],r=[],l=this.table,o="",c=0,h=0,d=r.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;r.push(f);var g=u.options&&u.options.ranges;function b(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),i(b,"lex");for(var _,m,x,E,S,A,C,w,O={};;){if(m=n[n.length-1],this.defaultActions[m]?x=this.defaultActions[m]:(null==_&&(_=b()),x=l[m]&&l[m][_]),void 0===x||!x.length||!x[0]){var k="";for(S in w=[],l[m])this.terminals_[S]&&S>2&&w.push("'"+this.terminals_[S]+"'");k=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(k,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:f,expected:w})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+_);switch(x[0]){case 1:n.push(_),s.push(u.yytext),r.push(u.yylloc),n.push(x[1]),_=null,h=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc;break;case 2:if(A=this.productions_[x[1]][1],O.$=s[s.length-A],O._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},g&&(O._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[o,h,c,p.yy,x[1],s,r].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),s=s.slice(0,-1*A),r=r.slice(0,-1*A)),n.push(this.productions_[x[1]][0]),s.push(O.$),r.push(O._$),C=l[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}),"parse")},st=function(){return{EOF:1,parseError:i((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:i((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:i((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:i((function(t,e){var n,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,e,n,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((n=this._input.match(this.rules[i[s]]))&&(!e||n[0].length>e[0].length)){if(e=n,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:i((function(t,e,n,a){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function rt(){this.yy={}}return it.lexer=st,i(rt,"Parser"),rt.prototype=it,it.Parser=rt,new rt}();E.parser=E;var S,A=E,C=[],w=[""],O="global",k="",T=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],v=[],R="",D=!1,N=4,P=2,B=i((function(){return S}),"getC4Type"),j=i((function(t){let e=f(t,h());S=e}),"setC4Type"),M=i((function(t,e,n,a,i,s,r,l,o){if(null==t||null==e||null==n||null==a)return;let c={};const h=v.find((t=>t.from===e&&t.to===n));if(h?c=h:v.push(c),c.type=t,c.from=e,c.to=n,c.label={text:a},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==s)c.descr={text:""};else if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]={text:e}}else c.descr={text:s};if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]=e}else c.sprite=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=st()}),"addRel"),I=i((function(t,e,n,a,i,s,r){if(null===e||null===n)return;let l={};const o=C.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,C.push(l)),l.label=null==n?{text:""}:{text:n},null==a)l.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]={text:e}}else l.descr={text:a};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.link=r;l.typeC4Shape={text:t},l.parentBoundary=O,l.wrap=st()}),"addPersonOrSystem"),L=i((function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=C.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,C.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=st(),o.typeC4Shape={text:t},o.parentBoundary=O}),"addContainer"),Y=i((function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=C.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,C.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=st(),o.typeC4Shape={text:t},o.parentBoundary=O}),"addComponent"),U=i((function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=T.find((e=>e.alias===t));if(r&&t===r.alias?s=r:(s.alias=t,T.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=O,s.wrap=st(),k=O,O=t,w.push(k)}),"addPersonOrSystemBoundary"),F=i((function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=T.find((e=>e.alias===t));if(r&&t===r.alias?s=r:(s.alias=t,T.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=O,s.wrap=st(),k=O,O=t,w.push(k)}),"addContainerBoundary"),X=i((function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=T.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,T.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.type={text:"node"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.type={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=O,o.wrap=st(),k=O,O=e,w.push(k)}),"addDeploymentNode"),z=i((function(){O=k,w.pop(),k=w.pop(),w.push(k)}),"popBoundaryParseStack"),W=i((function(t,e,n,a,i,s,r,l,o,c,h){let d=C.find((t=>t.alias===e));if(void 0!==d||(d=T.find((t=>t.alias===e)),void 0!==d)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.bgColor=n;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.fontColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shadowing=s;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shape=r;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}}),"updateElStyle"),Q=i((function(t,e,n,a,i,s,r){const l=v.find((t=>t.from===e&&t.to===n));if(void 0!==l){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.textColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(s);if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(r)}}),"updateRelStyle"),$=i((function(t,e,n){let a=N,i=P;if("object"==typeof e){const t=Object.values(e)[0];a=parseInt(t)}else a=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);a>=1&&(N=a),i>=1&&(P=i)}),"updateLayoutConfig"),H=i((function(){return N}),"getC4ShapeInRow"),q=i((function(){return P}),"getC4BoundaryInRow"),V=i((function(){return O}),"getCurrentBoundaryParse"),G=i((function(){return k}),"getParentBoundaryParse"),K=i((function(t){return null==t?C:C.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),J=i((function(t){return C.find((e=>e.alias===t))}),"getC4Shape"),Z=i((function(t){return Object.keys(K(t))}),"getC4ShapeKeys"),tt=i((function(t){return null==t?T:T.filter((e=>e.parentBoundary===t))}),"getBoundaries"),et=tt,nt=i((function(){return v}),"getRels"),at=i((function(){return R}),"getTitle"),it=i((function(t){D=t}),"setWrap"),st=i((function(){return D}),"autoWrap"),rt=i((function(){C=[],T=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],k="",O="global",w=[""],v=[],w=[""],R="",D=!1,N=4,P=2}),"clear"),lt=i((function(t){let e=f(t,h());R=e}),"setTitle"),ot={addPersonOrSystem:I,addPersonOrSystemBoundary:U,addContainer:L,addContainerBoundary:F,addComponent:Y,addDeploymentNode:X,popBoundaryParseStack:z,addRel:M,updateElStyle:W,updateRelStyle:Q,updateLayoutConfig:$,autoWrap:st,setWrap:it,getC4ShapeArray:K,getC4Shape:J,getC4ShapeKeys:Z,getBoundaries:tt,getBoundarys:et,getCurrentBoundaryParse:V,getParentBoundaryParse:G,getRels:nt,getTitle:at,getC4Type:B,getC4ShapeInRow:H,getC4BoundaryInRow:q,setAccTitle:o,getAccTitle:l,getAccDescription:r,setAccDescription:s,getConfig:i((()=>h().c4),"getConfig"),clear:rt,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:lt,setC4Type:j},ct=i((function(t,e){return a(t,e)}),"drawRect"),ht=i((function(t,e,n,a,i,s){const r=t.append("image");r.attr("width",e),r.attr("height",n),r.attr("x",a),r.attr("y",i);let l=s.startsWith("data:image/png;base64")?s:g.sanitizeUrl(s);r.attr("xlink:href",l)}),"drawImage"),dt=i(((t,e,n)=>{const a=t.append("g");let i=0;for(let s of e){let t=s.textColor?s.textColor:"#444444",e=s.lineColor?s.lineColor:"#444444",r=s.offsetX?parseInt(s.offsetX):0,l=s.offsetY?parseInt(s.offsetY):0,o="";if(0===i){let t=a.append("line");t.attr("x1",s.startPoint.x),t.attr("y1",s.startPoint.y),t.attr("x2",s.endPoint.x),t.attr("y2",s.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==s.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let t=a.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),"rel_b"!==s.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+o+"#arrowend)")}let c=n.messageFont();At(n)(s.label.text,a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+r,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+l,s.label.width,s.label.height,{fill:t},c),s.techn&&""!==s.techn.text&&(c=n.messageFont(),At(n)("["+s.techn.text+"]",a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+r,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+n.messageFontSize+5+l,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:t,"font-style":"italic"},c))}}),"drawRels"),ut=i((function(t,e,n){const a=t.append("g");let i=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",r=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};ct(a,o);let c=n.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=r,At(n)(e.label.text,a,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=n.boundaryFont(),c.fontColor=r,At(n)(e.type.text,a,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=n.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=r,At(n)(e.descr.text,a,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))}),"drawBoundary"),pt=i((function(t,e,a){var i;let s=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],l=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c=t.append("g");c.attr("class","person-man");const h=n();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=s,h.width=e.width,h.height=e.height,h.stroke=r,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},ct(c,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let d=St(a,e.typeC4Shape.text);switch(c.append("text").attr("fill",l).attr("font-family",d.fontFamily).attr("font-size",d.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":ht(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=a[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=l,At(a)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:l},u),u=a[e.typeC4Shape.text+"Font"](),u.fontColor=l,e.techn&&""!==(null==(i=e.techn)?void 0:i.text)?At(a)(e.techn.text,c,e.x,e.y+e.techn.Y,e.width,e.height,{fill:l,"font-style":"italic"},u):e.type&&""!==e.type.text&&At(a)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:l,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=a.personFont(),u.fontColor=l,At(a)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:l},u)),e.height}),"drawC4Shape"),yt=i((function(t){t.append("defs").append("symbol").attr("id","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")}),"insertDatabaseIcon"),ft=i((function(t){t.append("defs").append("symbol").attr("id","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")}),"insertComputerIcon"),gt=i((function(t){t.append("defs").append("symbol").attr("id","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")}),"insertClockIcon"),bt=i((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")}),"insertArrowHead"),_t=i((function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")}),"insertArrowEnd"),mt=i((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")}),"insertArrowFilledHead"),xt=i((function(t){t.append("defs").append("marker").attr("id","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)}),"insertDynamicNumber"),Et=i((function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")}),"insertArrowCrossHead"),St=i(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),At=function(){function t(t,e,n,i,s,r,l){a(e.append("text").attr("x",n+s/2).attr("y",i+r/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,n,i,s,r,l,o){const{fontSize:c,fontFamily:h,fontWeight:d}=o,u=t.split(_.lineBreakRegex);for(let p=0;p<u.length;p++){const t=p*c-c*(u.length-1)/2,r=e.append("text").attr("x",n+s/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",c).style("font-weight",d).style("font-family",h);r.append("tspan").attr("dy",t).text(u[p]).attr("alignment-baseline","mathematical"),a(r,l)}}function n(t,n,i,s,r,l,o,c){const h=n.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",s).attr("width",r).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,s,r,0,o,c),a(d,o)}function a(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return i(t,"byText"),i(e,"byTspan"),i(n,"byFo"),i(a,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?n:"old"===a.textPlacement?t:e}}(),Ct={drawRect:ct,drawBoundary:ut,drawC4Shape:pt,drawRels:dt,drawImage:ht,insertArrowHead:bt,insertArrowEnd:_t,insertArrowFilledHead:mt,insertDynamicNumber:xt,insertArrowCrossHead:Et,insertDatabaseIcon:yt,insertComputerIcon:ft,insertClockIcon:gt},wt=0,Ot=0,kt=4,Tt=2;E.yy=ot;var vt={},Rt=(i(t=class{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Dt(t.db.getConfig())}setData(t,e,n,a){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=a}updateVal(t,e,n,a){void 0===t[e]?t[e]=n:t[e]=a(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,a=this.nextData.starty+2*t.margin,i=a+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>kt)&&(e=this.nextData.startx+t.margin+vt.nextLinePaddingX,a=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+t.height,this.nextData.cnt=1),t.x=e,t.y=a,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Dt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},"Bounds"),t),Dt=i((function(t){p(vt,t),t.fontFamily&&(vt.personFontFamily=vt.systemFontFamily=vt.messageFontFamily=t.fontFamily),t.fontSize&&(vt.personFontSize=vt.systemFontSize=vt.messageFontSize=t.fontSize),t.fontWeight&&(vt.personFontWeight=vt.systemFontWeight=vt.messageFontWeight=t.fontWeight)}),"setConf"),Nt=i(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Pt=i((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),Bt=i((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function jt(t,e,n,a,i){if(!e[t].width)if(n)e[t].text=b(e[t].text,i,a),e[t].textLines=e[t].text.split(_.lineBreakRegex).length,e[t].width=i,e[t].height=m(e[t].text,a);else{let n=e[t].text.split(_.lineBreakRegex);e[t].textLines=n.length;let i=0;e[t].height=0,e[t].width=0;for(const s of n)e[t].width=Math.max(y(s,a),e[t].width),i=m(s,a),e[t].height=e[t].height+i}}i(jt,"calcC4ShapeTextWH");var Mt=i((function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=vt.c4ShapeMargin-35;let a=e.wrap&&vt.wrap,i=Pt(vt);i.fontSize=i.fontSize+2,i.fontWeight="bold",jt("label",e,a,i,y(e.label.text,i)),Ct.drawBoundary(t,e,vt)}),"drawBoundary"),It=i((function(t,e,n,a){let i=0;for(const s of a){i=0;const a=n[s];let r=Nt(vt,a.typeC4Shape.text);switch(r.fontSize=r.fontSize-2,a.typeC4Shape.width=y("«"+a.typeC4Shape.text+"»",r),a.typeC4Shape.height=r.fontSize+2,a.typeC4Shape.Y=vt.c4ShapePadding,i=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=i,i=a.image.Y+a.image.height}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=i,i=a.image.Y+a.image.height);let l=a.wrap&&vt.wrap,o=vt.width-2*vt.c4ShapePadding,c=Nt(vt,a.typeC4Shape.text);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",jt("label",a,l,c,o),a.label.Y=i+8,i=a.label.Y+a.label.height,a.type&&""!==a.type.text){a.type.text="["+a.type.text+"]",jt("type",a,l,Nt(vt,a.typeC4Shape.text),o),a.type.Y=i+5,i=a.type.Y+a.type.height}else if(a.techn&&""!==a.techn.text){a.techn.text="["+a.techn.text+"]",jt("techn",a,l,Nt(vt,a.techn.text),o),a.techn.Y=i+5,i=a.techn.Y+a.techn.height}let h=i,d=a.label.width;if(a.descr&&""!==a.descr.text){jt("descr",a,l,Nt(vt,a.typeC4Shape.text),o),a.descr.Y=i+20,i=a.descr.Y+a.descr.height,d=Math.max(a.label.width,a.descr.width),h=i-5*a.descr.textLines}d+=vt.c4ShapePadding,a.width=Math.max(a.width||vt.width,d,vt.width),a.height=Math.max(a.height||vt.height,h,vt.height),a.margin=a.margin||vt.c4ShapeMargin,t.insert(a),Ct.drawC4Shape(e,a,vt)}t.bumpLastMargin(vt.c4ShapeMargin)}),"drawC4ShapeArray"),Lt=(i(e=class{constructor(t,e){this.x=t,this.y=e}},"Point"),e),Yt=i((function(t,e){let n=t.x,a=t.y,i=e.x,s=e.y,r=n+t.width/2,l=a+t.height/2,o=Math.abs(n-i),c=Math.abs(a-s),h=c/o,d=t.height/t.width,u=null;return a==s&&n<i?u=new Lt(n+t.width,l):a==s&&n>i?u=new Lt(n,l):n==i&&a<s?u=new Lt(r,a+t.height):n==i&&a>s&&(u=new Lt(r,a)),n>i&&a<s?u=d>=h?new Lt(n,l+h*t.width/2):new Lt(r-o/c*t.height/2,a+t.height):n<i&&a<s?u=d>=h?new Lt(n+t.width,l+h*t.width/2):new Lt(r+o/c*t.height/2,a+t.height):n<i&&a>s?u=d>=h?new Lt(n+t.width,l-h*t.width/2):new Lt(r+t.height/2*o/c,a):n>i&&a>s&&(u=d>=h?new Lt(n,l-t.width/2*h):new Lt(r-t.height/2*o/c,a)),u}),"getIntersectPoint"),Ut=i((function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let a=Yt(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:a,endPoint:Yt(e,n)}}),"getIntersectPoints"),Ft=i((function(t,e,n,a){let i=0;for(let s of e){i+=1;let t=s.wrap&&vt.wrap,e=Bt(vt);"C4Dynamic"===a.db.getC4Type()&&(s.label.text=i+": "+s.label.text);let r=y(s.label.text,e);jt("label",s,t,e,r),s.techn&&""!==s.techn.text&&(r=y(s.techn.text,e),jt("techn",s,t,e,r)),s.descr&&""!==s.descr.text&&(r=y(s.descr.text,e),jt("descr",s,t,e,r));let l=n(s.from),o=n(s.to),c=Ut(l,o);s.startPoint=c.startPoint,s.endPoint=c.endPoint}Ct.drawRels(t,e,vt)}),"drawRels");function Xt(t,e,n,a,i){let s=new Rt(i);s.data.widthLimit=n.data.widthLimit/Math.min(Tt,a.length);for(let[r,l]of a.entries()){let a=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=a,a=l.image.Y+l.image.height);let o=l.wrap&&vt.wrap,c=Pt(vt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",jt("label",l,o,c,s.data.widthLimit),l.label.Y=a+8,a=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",jt("type",l,o,Pt(vt),s.data.widthLimit),l.type.Y=a+5,a=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=Pt(vt);t.fontSize=t.fontSize-2,jt("descr",l,o,t,s.data.widthLimit),l.descr.Y=a+20,a=l.descr.Y+l.descr.height}if(0==r||r%Tt==0){let t=n.data.startx+vt.diagramMarginX,e=n.data.stopy+vt.diagramMarginY+a;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+vt.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&It(s,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&Xt(t,e,s,u,i),"global"!==l.alias&&Mt(t,l,s),n.data.stopy=Math.max(s.data.stopy+vt.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+vt.c4ShapeMargin,n.data.stopx),wt=Math.max(wt,n.data.stopx),Ot=Math.max(Ot,n.data.stopy)}}i(Xt,"drawInsideBoundary");var zt={drawPersonOrSystemArray:It,drawBoundary:Mt,setConf:Dt,draw:i((function(t,e,n,a){vt=h().c4;const i=h().securityLevel;let s;"sandbox"===i&&(s=x("#i"+e));const r=x("sandbox"===i?s.nodes()[0].contentDocument.body:"body");let l=a.db;a.db.setWrap(vt.wrap),kt=l.getC4ShapeInRow(),Tt=l.getC4BoundaryInRow(),d.debug(`C:${JSON.stringify(vt,null,2)}`);const o="sandbox"===i?r.select(`[id="${e}"]`):x(`[id="${e}"]`);Ct.insertComputerIcon(o),Ct.insertDatabaseIcon(o),Ct.insertClockIcon(o);let c=new Rt(a);c.setData(vt.diagramMarginX,vt.diagramMarginX,vt.diagramMarginY,vt.diagramMarginY),c.data.widthLimit=screen.availWidth,wt=vt.diagramMarginX,Ot=vt.diagramMarginY;const p=a.db.getTitle();Xt(o,"",c,a.db.getBoundarys(""),a),Ct.insertArrowHead(o),Ct.insertArrowEnd(o),Ct.insertArrowCrossHead(o),Ct.insertArrowFilledHead(o),Ft(o,a.db.getRels(),a.db.getC4Shape,a),c.data.stopx=wt,c.data.stopy=Ot;const y=c.data;let f=y.stopy-y.starty+2*vt.diagramMarginY;const g=y.stopx-y.startx+2*vt.diagramMarginX;p&&o.append("text").text(p).attr("x",(y.stopx-y.startx)/2-4*vt.diagramMarginX).attr("y",y.starty+vt.diagramMarginY),u(o,f,g,vt.useMaxWidth);const b=p?60:0;o.attr("viewBox",y.startx-vt.diagramMarginX+" -"+(vt.diagramMarginY+b)+" "+g+" "+(f+b)),d.debug("models:",y)}),"draw")},Wt={parser:A,db:ot,renderer:zt,styles:i((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),init:i((({c4:t,wrap:e})=>{zt.setConf(t),ot.setWrap(e)}),"init")};export{Wt as diagram};
@@ -0,0 +1 @@
1
+ import{U as a,C as r}from"./mermaid-Cuo5gmPJ.js";const s=(s,o)=>a.lang.round(r.parse(s)[o]);export{s as c};
@@ -0,0 +1 @@
1
+ import{_ as c}from"./mermaid-Cuo5gmPJ.js";function l(c,l){var t,e,a;c.accDescr&&(null==(t=l.setAccDescription)||t.call(l,c.accDescr)),c.accTitle&&(null==(e=l.setAccTitle)||e.call(l,c.accTitle)),c.title&&(null==(a=l.setDiagramTitle)||a.call(l,c.title))}c(l,"populateCommonDb");export{l as p};
@@ -0,0 +1 @@
1
+ var t,e;import{g as s,s as i}from"./chunk-RZ5BOZE2-COQMYHlq.js";import{_ as n,l as a,c as r,o as u,r as l,u as o,b as c,a as h,s as p,g as d,p as A,q as y,j as C,y as m,x as g,h as b,Q as E}from"./mermaid-Cuo5gmPJ.js";import{s as T}from"./transform-DjHZbYKP.js";var f=function(){var t=n((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[1,18],s=[1,19],i=[1,20],a=[1,41],r=[1,42],u=[1,26],l=[1,24],o=[1,25],c=[1,32],h=[1,33],p=[1,34],d=[1,45],A=[1,35],y=[1,36],C=[1,37],m=[1,38],g=[1,27],b=[1,28],E=[1,29],T=[1,30],f=[1,31],k=[1,44],F=[1,46],D=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],L=[1,59],$=[1,60],x=[1,61],I=[1,62],O=[1,63],v=[1,64],w=[1,8,9,41],R=[1,76],P=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],M=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],G=[13,58,84,99,101,102],U=[13,58,71,72,84,99,101,102],z=[13,58,66,67,68,69,70,84,99,101,102],K=[1,98],Y=[1,115],j=[1,107],W=[1,113],Q=[1,108],X=[1,109],q=[1,110],H=[1,111],V=[1,112],Z=[1,114],J=[22,58,59,80,84,85,86,87,88,89],tt=[1,8,9,39,41,44],et=[1,8,9,22],st=[1,143],it=[1,8,9,59],nt=[1,8,9,22,58,59,80,84,85,86,87,88,89],at={trace:n((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:n((function(t,e,s,i,n,a,r){var u=a.length-1;switch(n){case 8:this.$=a[u-1];break;case 9:case 12:case 14:this.$=a[u];break;case 10:case 13:this.$=a[u-2]+"."+a[u];break;case 11:case 15:case 95:this.$=a[u-1]+a[u];break;case 16:case 17:this.$=a[u-1]+"~"+a[u]+"~";break;case 18:i.addRelation(a[u]);break;case 19:a[u-1].title=i.cleanupLabel(a[u]),i.addRelation(a[u-1]);break;case 30:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 31:case 32:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 33:i.addClassesToNamespace(a[u-3],a[u-1]);break;case 34:i.addClassesToNamespace(a[u-4],a[u-1]);break;case 35:this.$=a[u],i.addNamespace(a[u]);break;case 36:case 46:case 59:case 92:this.$=[a[u]];break;case 37:this.$=[a[u-1]];break;case 38:a[u].unshift(a[u-2]),this.$=a[u];break;case 40:i.setCssClass(a[u-2],a[u]);break;case 41:i.addMembers(a[u-3],a[u-1]);break;case 42:i.setCssClass(a[u-5],a[u-3]),i.addMembers(a[u-5],a[u-1]);break;case 43:this.$=a[u],i.addClass(a[u]);break;case 44:this.$=a[u-1],i.addClass(a[u-1]),i.setClassLabel(a[u-1],a[u]);break;case 45:i.addAnnotation(a[u],a[u-2]);break;case 47:a[u].push(a[u-1]),this.$=a[u];break;case 48:case 50:case 51:break;case 49:i.addMember(a[u-1],i.cleanupLabel(a[u]));break;case 52:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 54:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 55:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 56:i.addNote(a[u],a[u-1]);break;case 57:i.addNote(a[u]);break;case 58:this.$=a[u-2],i.defineClass(a[u-1],a[u]);break;case 60:this.$=a[u-2].concat([a[u]]);break;case 61:i.setDirection("TB");break;case 62:i.setDirection("BT");break;case 63:i.setDirection("RL");break;case 64:i.setDirection("LR");break;case 65:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 66:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 67:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 69:this.$=i.relationType.AGGREGATION;break;case 70:this.$=i.relationType.EXTENSION;break;case 71:this.$=i.relationType.COMPOSITION;break;case 72:this.$=i.relationType.DEPENDENCY;break;case 73:this.$=i.relationType.LOLLIPOP;break;case 74:this.$=i.lineType.LINE;break;case 75:this.$=i.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[u-2],i.setClickEvent(a[u-1],a[u]);break;case 77:case 83:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 78:this.$=a[u-2],i.setLink(a[u-1],a[u]);break;case 79:this.$=a[u-3],i.setLink(a[u-2],a[u-1],a[u]);break;case 80:this.$=a[u-3],i.setLink(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 81:this.$=a[u-4],i.setLink(a[u-3],a[u-2],a[u]),i.setTooltip(a[u-3],a[u-1]);break;case 84:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 85:this.$=a[u-4],i.setClickEvent(a[u-3],a[u-2],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 86:this.$=a[u-3],i.setLink(a[u-2],a[u]);break;case 87:this.$=a[u-4],i.setLink(a[u-3],a[u-1],a[u]);break;case 88:this.$=a[u-4],i.setLink(a[u-3],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 89:this.$=a[u-5],i.setLink(a[u-4],a[u-2],a[u]),i.setTooltip(a[u-4],a[u-1]);break;case 90:this.$=a[u-2],i.setCssStyle(a[u-1],a[u]);break;case 91:i.setCssClass(a[u-1],a[u]);break;case 93:a[u-2].push(a[u]),this.$=a[u-2]}}),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:a,43:23,46:r,47:u,49:l,50:o,52:c,54:h,55:p,58:d,60:A,61:y,62:C,63:m,73:g,74:b,76:E,80:T,81:f,84:k,99:F,101:D,102:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,18],{22:[1,50]}),t(S,[2,20]),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),{34:[1,51]},{36:[1,52]},t(S,[2,32]),t(S,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:N,67:L,68:$,69:x,70:I,71:O,72:v}),{39:[1,65]},t(w,[2,39],{39:[1,67],44:[1,66]}),t(S,[2,50]),t(S,[2,51]),{16:68,58:d,84:k,99:F,101:D},{16:39,18:69,19:40,58:d,84:k,99:F,101:D,102:B},{16:39,18:70,19:40,58:d,84:k,99:F,101:D,102:B},{16:39,18:71,19:40,58:d,84:k,99:F,101:D,102:B},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:k,99:F,101:D,102:B},{13:R,53:75},{56:77,58:[1,78]},t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),t(S,[2,64]),t(P,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:k,99:F,101:D,102:B}),t(P,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:k,99:F,101:D},{16:39,18:85,19:40,58:d,84:k,99:F,101:D,102:B},t(M,[2,118]),t(M,[2,119]),t(M,[2,120]),t(M,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:s,37:i,42:a,46:r,47:u,49:l,50:o,52:c,54:h,55:p,58:d,60:A,61:y,62:C,63:m,73:g,74:b,76:E,80:T,81:f,84:k,99:F,101:D,102:B}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:a,43:23,46:r,47:u,49:l,50:o,52:c,54:h,55:p,58:d,60:A,61:y,62:C,63:m,73:g,74:b,76:E,80:T,81:f,84:k,99:F,101:D,102:B},t(S,[2,19]),t(S,[2,30]),t(S,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:k,99:F,101:D,102:B},{51:90,64:56,65:57,66:N,67:L,68:$,69:x,70:I,71:O,72:v},t(S,[2,49]),{65:91,71:O,72:v},t(G,[2,68],{64:92,66:N,67:L,68:$,69:x,70:I}),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(z,[2,74]),t(z,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:d,84:k,99:F,101:D},{45:97,49:K},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:Y,57:104,58:j,80:W,82:105,83:106,84:Q,85:X,86:q,87:H,88:V,89:Z},{58:[1,116]},{13:R,53:117},t(S,[2,57]),t(S,[2,123]),{22:Y,57:118,58:j,59:[1,119],80:W,82:105,83:106,84:Q,85:X,86:q,87:H,88:V,89:Z},t(J,[2,59]),{16:39,18:120,19:40,58:d,84:k,99:F,101:D,102:B},t(P,[2,15]),t(P,[2,16]),t(P,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:k,99:F,101:D},t(tt,[2,43],{11:123,12:[1,124]}),t(_,[2,7]),{9:[1,125]},t(et,[2,52]),{16:39,18:126,19:40,58:d,84:k,99:F,101:D,102:B},{13:[1,128],16:39,18:127,19:40,58:d,84:k,99:F,101:D,102:B},t(G,[2,67],{64:129,66:N,67:L,68:$,69:x,70:I}),t(G,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},t(w,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:K},{16:39,18:136,19:40,58:d,84:k,99:F,101:D,102:B},t(S,[2,76],{13:[1,137]}),t(S,[2,78],{13:[1,139],75:[1,138]}),t(S,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(S,[2,90],{59:st}),t(it,[2,92],{83:144,22:Y,58:j,80:W,84:Q,85:X,86:q,87:H,88:V,89:Z}),t(nt,[2,94]),t(nt,[2,96]),t(nt,[2,97]),t(nt,[2,98]),t(nt,[2,99]),t(nt,[2,100]),t(nt,[2,101]),t(nt,[2,102]),t(nt,[2,103]),t(nt,[2,104]),t(S,[2,91]),t(S,[2,56]),t(S,[2,58],{59:st}),{58:[1,145]},t(P,[2,13]),{15:146,16:84,58:d,84:k,99:F,101:D},{39:[2,11]},t(tt,[2,44]),{13:[1,147]},{1:[2,4]},t(et,[2,54]),t(et,[2,53]),{16:39,18:148,19:40,58:d,84:k,99:F,101:D,102:B},t(G,[2,65]),t(S,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:K},t(w,[2,41]),{41:[2,47]},t(S,[2,45]),t(S,[2,77]),t(S,[2,79]),t(S,[2,80],{75:[1,152]}),t(S,[2,83]),t(S,[2,84],{13:[1,153]}),t(S,[2,86],{13:[1,155],75:[1,154]}),{22:Y,58:j,80:W,82:156,83:106,84:Q,85:X,86:q,87:H,88:V,89:Z},t(nt,[2,95]),t(J,[2,60]),{39:[2,10]},{14:[1,157]},t(et,[2,55]),t(S,[2,34]),{41:[2,38]},{41:[1,158]},t(S,[2,81]),t(S,[2,85]),t(S,[2,87]),t(S,[2,88],{75:[1,159]}),t(it,[2,93],{83:144,22:Y,58:j,80:W,84:Q,85:X,86:q,87:H,88:V,89:Z}),t(tt,[2,8]),t(w,[2,42]),t(S,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:n((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:n((function(t){var e=this,s=[0],i=[],a=[null],r=[],u=this.table,l="",o=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(d.yy[A]=this.yy[A]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;r.push(y);var C=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,n((function(t){s.length=s.length-2*t,a.length=a.length-t,r.length=r.length-t}),"popStack"),n(m,"lex");for(var g,b,E,T,f,k,F,D,B={};;){if(b=s[s.length-1],this.defaultActions[b]?E=this.defaultActions[b]:(null==g&&(g=m()),E=u[b]&&u[b][g]),void 0===E||!E.length||!E[0]){var _="";for(f in D=[],u[b])this.terminals_[f]&&f>2&&D.push("'"+this.terminals_[f]+"'");_=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:y,expected:D})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(E[0]){case 1:s.push(g),a.push(p.yytext),r.push(p.yylloc),s.push(E[1]),g=null,c=p.yyleng,l=p.yytext,o=p.yylineno,y=p.yylloc;break;case 2:if(k=this.productions_[E[1]][1],B.$=a[a.length-k],B._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},C&&(B._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(T=this.performAction.apply(B,[l,c,o,d.yy,E[1],a,r].concat(h))))return T;k&&(s=s.slice(0,-1*k*2),a=a.slice(0,-1*k),r=r.slice(0,-1*k)),s.push(this.productions_[E[1]][0]),a.push(B.$),r.push(B._$),F=u[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0}),"parse")},rt=function(){return{EOF:1,parseError:n((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:n((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:n((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:n((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:n((function(){return this._more=!0,this}),"more"),reject:n((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})}),"reject"),less:n((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:n((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:n((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:n((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:n((function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:n((function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((s=this._input.match(this.rules[n[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:n((function(){var t=this.next();return t||this.lex()}),"lex"),begin:n((function(t){this.conditionStack.push(t)}),"begin"),popState:n((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:n((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:n((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:n((function(t){this.begin(t)}),"pushState"),stateStackSize:n((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:n((function(t,e,s,i){switch(s){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 23:return 78;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 75;case 68:case 69:return 67;case 70:case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:case 85:return 88;case 86:return 89;case 87:case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:case 96:return 87;case 97:return 9}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function ut(){this.yy={}}return at.lexer=rt,n(ut,"Parser"),ut.prototype=at,at.Parser=ut,new ut}();f.parser=f;var k=f,F=["#","+","~","-",""],D=(n(t=class{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=b(t,r());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+E(this.id);"method"===this.memberType&&(t+=`(${E(this.parameters.trim())})`,this.returnType&&(t+=" : "+E(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(F.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);F.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${E(this.id)}${"method"===this.memberType?`(${E(this.parameters)})${this.returnType?" : "+E(this.returnType):""}`:""}`;this.text=s.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},"ClassMember"),t),B="classId-",_=0,S=n((t=>C.sanitizeText(t,r())),"sanitizeText"),N=(n(e=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=n((t=>{let e=T(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=T("body").append("div").attr("class","mermaidTooltip").style("opacity",0));T(t).select("svg").selectAll("g.node").on("mouseover",(t=>{const s=T(t.currentTarget);if(null===s.attr("title"))return;const i=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0)})).on("mouseout",(t=>{e.transition().duration(500).style("opacity",0);T(t.currentTarget).classed("hover",!1)}))}),"setupToolTips"),this.direction="TB",this.setAccTitle=c,this.getAccTitle=h,this.setAccDescription=p,this.getAccDescription=d,this.setDiagramTitle=A,this.getDiagramTitle=y,this.getConfig=n((()=>r().class),"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(t){const e=C.sanitizeText(t,r());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=S(t[0]),s=S(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=C.sanitizeText(t,r());e&&(e=S(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=C.sanitizeText(t,r()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=C.sanitizeText(s,r());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`&lt;${i}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:B+n+"-"+_}),_++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}lookUpDomId(t){const e=C.sanitizeText(t,r());if(this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",m()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){a.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=C.sanitizeText(t.relationTitle1.trim(),r()),t.relationTitle2=C.sanitizeText(t.relationTitle2.trim(),r()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(S(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new D(t,"method")):t&&i.members.push(new D(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>this.addMember(t,e))))}addNote(t,e){const s={id:`note${this.notes.length}`,class:e,text:t};this.notes.push(s)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),S(t.trim())}setCssClass(t,e){t.split(",").forEach((t=>{let s=t;/\d/.exec(t[0])&&(s=B+s);const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)}))}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach((e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)})),this.classes.forEach((t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap((t=>t.split(","))))}))}}setTooltip(t,e){t.split(",").forEach((t=>{void 0!==e&&(this.classes.get(t).tooltip=S(e))}))}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=r();t.split(",").forEach((t=>{let n=t;/\d/.exec(t[0])&&(n=B+n);const a=this.classes.get(n);a&&(a.link=o.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?S(s):"_blank")})),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach((t=>{this.setClickFunc(t,e,s),this.classes.get(t).haveCallback=!0})),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=C.sanitizeText(t,r());if("loose"!==r().securityLevel)return;if(void 0===e)return;const n=i;if(this.classes.has(n)){const t=this.lookUpDomId(n);let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),this.functions.push((()=>{const s=document.querySelector(`[id="${t}"]`);null!==s&&s.addEventListener("click",(()=>{o.runFunc(e,...i)}),!1)}))}}bindFunctions(t){this.functions.forEach((e=>{e(t)}))}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:B+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(const s of e){const{className:e}=this.splitClassNameAndType(s);this.classes.get(e).parent=t,this.namespaces.get(t).classes.set(e,this.classes.get(e))}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){var t;const e=[],s=[],i=r();for(const a of this.namespaces.keys()){const t=this.namespaces.get(a);if(t){const s={id:t.id,label:t.id,isGroup:!0,padding:i.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:i.look};e.push(s)}}for(const a of this.classes.keys()){const t=this.classes.get(a);if(t){const s=t;s.parentId=t.parent,s.look=i.look,e.push(s)}}let n=0;for(const a of this.notes){n++;const r={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:i.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${i.themeVariables.noteBkgColor}`,`stroke: ${i.themeVariables.noteBorderColor}`],look:i.look};e.push(r);const u=(null==(t=this.classes.get(a.class))?void 0:t.id)??"";if(u){const t={id:`edgeNote${n}`,start:a.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:i.look};s.push(t)}}for(const a of this.interfaces){const t={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:i.look};e.push(t)}n=0;for(const a of this.relations){n++;const t={id:g(a.id1,a.id2,{prefix:"id",counter:n}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:"none"===a.relationTitle1?"":a.relationTitle1,endLabelLeft:"none"===a.relationTitle2?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:1==a.relation.lineType?"dashed":"solid",look:i.look};s.push(t)}return{nodes:e,edges:s,other:{},config:i,direction:this.getDirection()}}},"ClassDB"),e),L=n((t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles"),$=n(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s}),"getDir"),x={getClasses:n((function(t,e){return e.db.getClasses()}),"getClasses"),draw:n((async function(t,e,n,c){a.info("REF0:"),a.info("Drawing class diagram (v3)",e);const{securityLevel:h,state:p,layout:d}=r(),A=c.db.getData(),y=s(e,h);A.type=c.type,A.layoutAlgorithm=u(d),A.nodeSpacing=(null==p?void 0:p.nodeSpacing)||50,A.rankSpacing=(null==p?void 0:p.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=e,await l(A,y);o.insertTitle(y,"classDiagramTitleText",(null==p?void 0:p.titleTopMargin)??25,c.db.getDiagramTitle()),i(y,8,"classDiagram",(null==p?void 0:p.useMaxWidth)??!0)}),"draw"),getDir:$};export{N as C,k as a,x as c,L as s};