@axerity/cli 0.3.4 → 0.3.6

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 (272) hide show
  1. package/dist/client/_app/immutable/assets/0.D_9a5iYh.css +1 -0
  2. package/dist/client/_app/immutable/chunks/4WKVz0dQ2.js +8 -0
  3. package/dist/client/_app/immutable/chunks/{BxHXOXhk.js → 5Snhw0Ea.js} +1 -1
  4. package/dist/client/_app/immutable/chunks/{CU8220Uu.js → 7mNMRbyk.js} +7 -7
  5. package/dist/client/_app/immutable/chunks/8HqVteX22.js +132 -0
  6. package/dist/client/_app/immutable/chunks/B1bQHaXp2.js +1 -0
  7. package/dist/client/_app/immutable/chunks/B1vLyBkH.js +1 -0
  8. package/dist/client/_app/immutable/chunks/B38mTxN_2.js +1 -0
  9. package/dist/client/_app/immutable/chunks/B6Q2kmfG.js +1 -0
  10. package/dist/client/_app/immutable/chunks/B8df50Oe.js +1 -0
  11. package/dist/client/_app/immutable/chunks/B8pCsplA.js +4 -0
  12. package/dist/client/_app/immutable/chunks/BBJaonHc.js +7 -0
  13. package/dist/client/_app/immutable/chunks/BC0Z6JSt.js +127 -0
  14. package/dist/client/_app/immutable/chunks/BIZlbVKk.js +1 -0
  15. package/dist/client/_app/immutable/chunks/BLTdZGww.js +10 -0
  16. package/dist/client/_app/immutable/chunks/BO5quTzD2.js +1 -0
  17. package/dist/client/_app/immutable/chunks/BVDV3lUS.js +1 -0
  18. package/dist/client/_app/immutable/chunks/{D1JHp0AN.js → BYhISeFr2.js} +3 -3
  19. package/dist/client/_app/immutable/chunks/B_cUqGeH.js +2 -0
  20. package/dist/client/_app/immutable/chunks/Bb7SY-Hh.js +2 -0
  21. package/dist/client/_app/immutable/chunks/{BmELG9zI.js → BbOlTtur.js} +1 -1
  22. package/dist/client/_app/immutable/chunks/Bf-rMgGa.js +1 -0
  23. package/dist/client/_app/immutable/chunks/{CrHSbMyX.js → Bg_yhsUP.js} +1 -1
  24. package/dist/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  25. package/dist/client/_app/immutable/chunks/Bq8Occ6m.js +1 -0
  26. package/dist/client/_app/immutable/chunks/Bs-bH16d2.js +36 -0
  27. package/dist/client/_app/immutable/chunks/BtTEEMTW.js +1 -0
  28. package/dist/client/_app/immutable/chunks/{BR2ZZ_D-.js → Bu2P_wCT.js} +9 -9
  29. package/dist/client/_app/immutable/chunks/C1MWiow4.js +1 -0
  30. package/dist/client/_app/immutable/chunks/{fbLwfhmm.js → C2-00Pdo.js} +8 -8
  31. package/dist/client/_app/immutable/chunks/C2FXoa5Z.js +1 -0
  32. package/dist/client/_app/immutable/chunks/CCHqIdNO.js +3 -0
  33. package/dist/client/_app/immutable/chunks/CDyVd27m2.js +1 -0
  34. package/dist/client/_app/immutable/chunks/{CrFMGgWF.js → CF0onlHk2.js} +1 -1
  35. package/dist/client/_app/immutable/chunks/CFMX0wTB2.js +2 -0
  36. package/dist/client/_app/immutable/chunks/CGzhSlOG2.js +88 -0
  37. package/dist/client/_app/immutable/chunks/{D1OSA14p2.js → CHdTS7qa2.js} +1 -1
  38. package/dist/client/_app/immutable/chunks/{CKUCToaK2.js → CHnO8ozm.js} +6 -6
  39. package/dist/client/_app/immutable/chunks/CIA0ThW0.js +1 -0
  40. package/dist/client/_app/immutable/chunks/CIFyFl372.js +2 -0
  41. package/dist/client/_app/immutable/chunks/CK1Au-AH.js +1 -0
  42. package/dist/client/_app/immutable/chunks/CORzmJfE2.js +1 -0
  43. package/dist/client/_app/immutable/chunks/{CrvMImwA.js → CP8i6059.js} +2 -2
  44. package/dist/client/_app/immutable/chunks/CR4TeO0O.js +156 -0
  45. package/dist/client/_app/immutable/chunks/CTgm3pse.js +1 -0
  46. package/dist/client/_app/immutable/chunks/CWKhPslf.js +1 -0
  47. package/dist/client/_app/immutable/chunks/{DWEIbyGx2.js → CWiCMZki2.js} +1 -1
  48. package/dist/client/_app/immutable/chunks/CZBscxHQ2.js +1 -0
  49. package/dist/client/_app/immutable/chunks/{Vhh-h91d.js → CddkPoXu.js} +1 -1
  50. package/dist/client/_app/immutable/chunks/CfzXM2Sw.js +24 -0
  51. package/dist/client/_app/immutable/chunks/{DVnPUkm_2.js → CgljPyk-.js} +1 -1
  52. package/dist/client/_app/immutable/chunks/Chofv7Zs2.js +11 -0
  53. package/dist/client/_app/immutable/chunks/CkDjHmRi.js +1 -0
  54. package/dist/client/_app/immutable/chunks/CqddNm0P.js +24 -0
  55. package/dist/client/_app/immutable/chunks/CtlrWY5d.js +1 -0
  56. package/dist/client/_app/immutable/chunks/CuRJVwEq.js +1 -0
  57. package/dist/client/_app/immutable/chunks/Cwm_NK7g2.js +1 -0
  58. package/dist/client/_app/immutable/chunks/{KMes_wgj.js → CxArn52D.js} +6 -6
  59. package/dist/client/_app/immutable/chunks/D0XLW3Y72.js +1 -0
  60. package/dist/client/_app/immutable/chunks/D3baVd8h.js +39 -0
  61. package/dist/client/_app/immutable/chunks/{DyvOZK_m.js → D53c3C1L.js} +1 -1
  62. package/dist/client/_app/immutable/chunks/D9D9EADq2.js +1 -0
  63. package/dist/client/_app/immutable/chunks/DAEwZWEo.js +1 -0
  64. package/dist/client/_app/immutable/chunks/DEkYOWll.js +1 -0
  65. package/dist/client/_app/immutable/chunks/DJR_kvNW.js +1 -0
  66. package/dist/client/_app/immutable/chunks/DJmG1hmx.js +1 -0
  67. package/dist/client/_app/immutable/chunks/DLuFpqVZ.js +1 -0
  68. package/dist/client/_app/immutable/chunks/DMWLK-DU2.js +231 -0
  69. package/dist/client/_app/immutable/chunks/DNzq6p3w.js +161 -0
  70. package/dist/client/_app/immutable/chunks/DSoM-AhV.js +292 -0
  71. package/dist/client/_app/immutable/chunks/{B2siGgVq.js → DUiFqfXY.js} +24 -24
  72. package/dist/client/_app/immutable/chunks/DVuOupEf.js +1 -0
  73. package/dist/client/_app/immutable/chunks/DY1BZ4Qc2.js +1 -0
  74. package/dist/client/_app/immutable/chunks/DYYXZ3DX.js +1 -0
  75. package/dist/client/_app/immutable/chunks/DbGyXH9B.js +1 -0
  76. package/dist/client/_app/immutable/chunks/DbfGBa34.js +1 -0
  77. package/dist/client/_app/immutable/chunks/{h6BdjjI92.js → Djp6vQyU2.js} +2 -2
  78. package/dist/client/_app/immutable/chunks/DlkSjMNB.js +3 -0
  79. package/dist/client/_app/immutable/chunks/{CqOdyAh12.js → Dq77RFat2.js} +19 -19
  80. package/dist/client/_app/immutable/chunks/DsF7k-Jl.js +1 -0
  81. package/dist/client/_app/immutable/chunks/{Cnog5E312.js → GV4wa_W82.js} +6 -6
  82. package/dist/client/_app/immutable/chunks/H8ZPB3lI.js +1 -0
  83. package/dist/client/_app/immutable/chunks/{D8Ssgrsp2.js → KythIMN82.js} +1 -1
  84. package/dist/client/_app/immutable/chunks/LevMccfs.js +62 -0
  85. package/dist/client/_app/immutable/chunks/{lVEu-GjD.js → MzKa3KJg.js} +1 -1
  86. package/dist/client/_app/immutable/chunks/{CO67I5FU.js → NwNz5UVg2.js} +7 -7
  87. package/dist/client/_app/immutable/chunks/WMQzk859.js +30 -0
  88. package/dist/client/_app/immutable/chunks/WqY32s1D.js +1 -0
  89. package/dist/client/_app/immutable/chunks/Xcyiycol2.js +34 -0
  90. package/dist/client/_app/immutable/chunks/hAYnLAr22.js +1 -0
  91. package/dist/client/_app/immutable/chunks/iW3ggMaf.js +1 -0
  92. package/dist/client/_app/immutable/chunks/mm27JPdG.js +85 -0
  93. package/dist/client/_app/immutable/chunks/mo9pLZen2.js +1 -0
  94. package/dist/client/_app/immutable/chunks/oWq97GrB.js +106 -0
  95. package/dist/client/_app/immutable/chunks/p8FwW_Sl.js +2 -0
  96. package/dist/client/_app/immutable/chunks/pHJTmPlB.js +41 -0
  97. package/dist/client/_app/immutable/chunks/qYxEWMoP2.js +1 -0
  98. package/dist/client/_app/immutable/chunks/snDW7wxp2.js +7 -0
  99. package/dist/client/_app/immutable/chunks/tvl5MGrS.js +62 -0
  100. package/dist/client/_app/immutable/entry/{app.BkF-rBjA.js → app.CWJWi65e.js} +2 -2
  101. package/dist/client/_app/immutable/entry/start.BnjVfvzh.js +1 -0
  102. package/dist/client/_app/immutable/nodes/0.KjaOE5W4.js +1 -0
  103. package/dist/client/_app/immutable/nodes/{1.D03cx22k.js → 1.BQfw1BrI.js} +1 -1
  104. package/dist/client/_app/immutable/nodes/2.Bm2kCMEX.js +21 -0
  105. package/dist/client/_app/version.json +1 -1
  106. package/dist/env.js +9 -33
  107. package/dist/env.js.map +1 -0
  108. package/dist/handler.js +23 -1493
  109. package/dist/handler.js.map +1 -0
  110. package/dist/index.js +33 -231
  111. package/dist/index.js.map +1 -0
  112. package/dist/server/chunks/{Icon-B39GsOhr.js → chunks/Icon.js-BuPXv_NW.js} +16 -14
  113. package/dist/server/chunks/chunks/Icon.js-BuPXv_NW.js.map +1 -0
  114. package/dist/server/chunks/{content-store-CkGb0SWT.js → chunks/content-store.js-BvDwR1n-.js} +7 -5
  115. package/dist/server/chunks/chunks/content-store.js-BvDwR1n-.js.map +1 -0
  116. package/dist/server/chunks/chunks/content.js-Ck7_Is4v.js +13 -0
  117. package/dist/server/chunks/chunks/content.js-Ck7_Is4v.js.map +1 -0
  118. package/dist/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  119. package/dist/server/chunks/chunks/env.js-l0sNRNKZ.js.map +1 -0
  120. package/dist/server/chunks/chunks/exports.js-DKNfc8Xi.js +152 -0
  121. package/dist/server/chunks/chunks/exports.js-DKNfc8Xi.js.map +1 -0
  122. package/dist/server/chunks/{internal2-Cc9tn9q-.js → chunks/internal.js-CS2S4fsh.js} +2931 -3573
  123. package/dist/server/chunks/chunks/internal.js-CS2S4fsh.js.map +1 -0
  124. package/dist/server/chunks/chunks/internal2.js-DnoW9Dd1.js +475 -0
  125. package/dist/server/chunks/chunks/internal2.js-DnoW9Dd1.js.map +1 -0
  126. package/dist/server/chunks/chunks/paths.js-BmhPy-Zq.js +4 -0
  127. package/dist/server/chunks/chunks/paths.js-BmhPy-Zq.js.map +1 -0
  128. package/dist/server/chunks/chunks/routing.js-CBkoLhW9.js +215 -0
  129. package/dist/server/chunks/chunks/routing.js-CBkoLhW9.js.map +1 -0
  130. package/dist/server/chunks/{exports-BYLl3AJT.js → chunks/shared.js-DL3We7L2.js} +13 -195
  131. package/dist/server/chunks/chunks/shared.js-DL3We7L2.js.map +1 -0
  132. package/dist/server/chunks/{site-BzEriToh.js → chunks/site.js-B9j7u8c5.js} +4 -2
  133. package/dist/server/chunks/chunks/site.js-B9j7u8c5.js.map +1 -0
  134. package/dist/server/chunks/chunks/utils.js-BqOwS4Ug.js +740 -0
  135. package/dist/server/chunks/chunks/utils.js-BqOwS4Ug.js.map +1 -0
  136. package/dist/server/chunks/{_server.ts-Ct0Ll5bb.js → entries/endpoints/_...path_mdfile_/_server.ts.js-Om7bYZKj.js} +5 -3
  137. package/dist/server/chunks/entries/endpoints/_...path_mdfile_/_server.ts.js-Om7bYZKj.js.map +1 -0
  138. package/dist/server/chunks/{_server.ts-CJRyggfF.js → entries/endpoints/__manifest/_server.ts.js-DDaYEkp-.js} +6 -4
  139. package/dist/server/chunks/entries/endpoints/__manifest/_server.ts.js-DDaYEkp-.js.map +1 -0
  140. package/dist/server/chunks/{_server.ts--AQtsWl0.js → entries/endpoints/llms-full.txt/_server.ts.js-DMfWG5dX.js} +6 -4
  141. package/dist/server/chunks/entries/endpoints/llms-full.txt/_server.ts.js-DMfWG5dX.js.map +1 -0
  142. package/dist/server/chunks/{_server.ts-BWRlkeWL.js → entries/endpoints/llms.txt/_server.ts.js-DriAXFu-.js} +6 -4
  143. package/dist/server/chunks/entries/endpoints/llms.txt/_server.ts.js-DriAXFu-.js.map +1 -0
  144. package/dist/server/chunks/{_server.ts-vfrX_ASl.js → entries/endpoints/og/_...slug_/_server.ts.js-DD3q5If5.js} +6 -4
  145. package/dist/server/chunks/entries/endpoints/og/_...slug_/_server.ts.js-DD3q5If5.js.map +1 -0
  146. package/dist/server/chunks/{_server.ts-D6CFL-gk.js → entries/endpoints/rss.xml/_server.ts.js-DaeHUkNT.js} +6 -4
  147. package/dist/server/chunks/entries/endpoints/rss.xml/_server.ts.js-DaeHUkNT.js.map +1 -0
  148. package/dist/server/chunks/{_server.ts-DrcvZqTi.js → entries/endpoints/search.json/_server.ts.js-BTKtjtuB.js} +5 -3
  149. package/dist/server/chunks/entries/endpoints/search.json/_server.ts.js-BTKtjtuB.js.map +1 -0
  150. package/dist/server/chunks/{_server.ts-C1Vx_DWq.js → entries/endpoints/sitemap.xml/_server.ts.js-AjE0bYBX.js} +6 -4
  151. package/dist/server/chunks/entries/endpoints/sitemap.xml/_server.ts.js-AjE0bYBX.js.map +1 -0
  152. package/dist/server/chunks/{hooks.server-CB5GWVYz.js → entries/hooks.server.js-DgpmswzZ.js} +5 -3
  153. package/dist/server/chunks/entries/hooks.server.js-DgpmswzZ.js.map +1 -0
  154. package/dist/server/chunks/{docpage-BkHysAhp.js → entries/matchers/docpage.js-BkHysAhp.js} +1 -1
  155. package/dist/server/chunks/entries/matchers/docpage.js-BkHysAhp.js.map +1 -0
  156. package/dist/server/chunks/{mdfile-DBiwGtNY.js → entries/matchers/mdfile.js-DBiwGtNY.js} +1 -1
  157. package/dist/server/chunks/entries/matchers/mdfile.js-DBiwGtNY.js.map +1 -0
  158. package/dist/server/chunks/entries/pages/_...slug_docpage_/_page.server.ts.js-BLrxDWKB.js +31 -0
  159. package/dist/server/chunks/entries/pages/_...slug_docpage_/_page.server.ts.js-BLrxDWKB.js.map +1 -0
  160. package/dist/server/chunks/{_page.svelte-Cmr6xyfK.js → entries/pages/_...slug_docpage_/_page.svelte.js-DHsQdIPq.js} +38 -34
  161. package/dist/server/chunks/entries/pages/_...slug_docpage_/_page.svelte.js-DHsQdIPq.js.map +1 -0
  162. package/dist/server/chunks/{_error.svelte-BmM3eia-.js → entries/pages/_error.svelte.js-C5IizUHI.js} +9 -6
  163. package/dist/server/chunks/entries/pages/_error.svelte.js-C5IizUHI.js.map +1 -0
  164. package/dist/server/chunks/entries/pages/_layout.server.ts.js-BVpOfaEd.js +18 -0
  165. package/dist/server/chunks/entries/pages/_layout.server.ts.js-BVpOfaEd.js.map +1 -0
  166. package/dist/server/chunks/{_layout.svelte-DN7VDoNA.js → entries/pages/_layout.svelte.js-C9fzvWFB.js} +11 -3
  167. package/dist/server/chunks/entries/pages/_layout.svelte.js-C9fzvWFB.js.map +1 -0
  168. package/dist/server/chunks/handler-ColT39Lk.js +1206 -0
  169. package/dist/server/chunks/handler-ColT39Lk.js.map +1 -0
  170. package/dist/server/{index.js → chunks/index.js-0pMmjHBu.js} +444 -1155
  171. package/dist/server/chunks/index.js-0pMmjHBu.js.map +1 -0
  172. package/dist/server/{manifest.js → chunks/manifest.js-Du2tEIKJ.js} +16 -20
  173. package/dist/server/chunks/manifest.js-Du2tEIKJ.js.map +1 -0
  174. package/dist/server/chunks/nodes/0.js-479vKOsq.js +30 -0
  175. package/dist/server/chunks/nodes/0.js-479vKOsq.js.map +1 -0
  176. package/dist/server/chunks/nodes/1.js-BUjLAE1S.js +9 -0
  177. package/dist/server/chunks/nodes/1.js-BUjLAE1S.js.map +1 -0
  178. package/dist/server/chunks/nodes/2.js-kHx_y3-d.js +32 -0
  179. package/dist/server/chunks/nodes/2.js-kHx_y3-d.js.map +1 -0
  180. package/dist/shims.js +2 -30
  181. package/dist/shims.js.map +1 -0
  182. package/package.json +26 -26
  183. package/dist/client/_app/immutable/assets/0.CZH7ZxPr.css +0 -1
  184. package/dist/client/_app/immutable/chunks/4QUyWxRp.js +0 -1
  185. package/dist/client/_app/immutable/chunks/5brL7le7.js +0 -1
  186. package/dist/client/_app/immutable/chunks/AVywM_y2.js +0 -85
  187. package/dist/client/_app/immutable/chunks/B-2v_FHk2.js +0 -36
  188. package/dist/client/_app/immutable/chunks/B2NH8-JT.js +0 -2
  189. package/dist/client/_app/immutable/chunks/B6GEGn8a.js +0 -10
  190. package/dist/client/_app/immutable/chunks/BMrnNhEK.js +0 -1
  191. package/dist/client/_app/immutable/chunks/BPr4vZF2.js +0 -292
  192. package/dist/client/_app/immutable/chunks/B_aLYNof2.js +0 -62
  193. package/dist/client/_app/immutable/chunks/Bcl_F5Rk.js +0 -162
  194. package/dist/client/_app/immutable/chunks/Bhp_hF4I.js +0 -7
  195. package/dist/client/_app/immutable/chunks/BiwHu9iZ.js +0 -34
  196. package/dist/client/_app/immutable/chunks/BncN_SFM.js +0 -1
  197. package/dist/client/_app/immutable/chunks/BqfYRTli.js +0 -1
  198. package/dist/client/_app/immutable/chunks/Bxc19hA4.js +0 -231
  199. package/dist/client/_app/immutable/chunks/C-2ebXi62.js +0 -1
  200. package/dist/client/_app/immutable/chunks/C5YJ1yll.js +0 -1
  201. package/dist/client/_app/immutable/chunks/C9ACkxc9.js +0 -1
  202. package/dist/client/_app/immutable/chunks/C9oUh5bS.js +0 -1
  203. package/dist/client/_app/immutable/chunks/CA-FvMpm2.js +0 -1
  204. package/dist/client/_app/immutable/chunks/CB683wti.js +0 -24
  205. package/dist/client/_app/immutable/chunks/CBw-Ef8i.js +0 -1
  206. package/dist/client/_app/immutable/chunks/CDzGDeIO.js +0 -2
  207. package/dist/client/_app/immutable/chunks/CGhzzHe4.js +0 -1
  208. package/dist/client/_app/immutable/chunks/CJIjuuPI.js +0 -3
  209. package/dist/client/_app/immutable/chunks/CLAkFX7S2.js +0 -1
  210. package/dist/client/_app/immutable/chunks/CNNqHIOE.js +0 -1
  211. package/dist/client/_app/immutable/chunks/COtBc-WT.js +0 -1
  212. package/dist/client/_app/immutable/chunks/CRPRTyhe2.js +0 -43
  213. package/dist/client/_app/immutable/chunks/CVwLGEVp.js +0 -9
  214. package/dist/client/_app/immutable/chunks/CYVFLYUH2.js +0 -132
  215. package/dist/client/_app/immutable/chunks/CmhcKymT2.js +0 -4
  216. package/dist/client/_app/immutable/chunks/CnsHLsSU2.js +0 -1
  217. package/dist/client/_app/immutable/chunks/D-mF3Ymq2.js +0 -1
  218. package/dist/client/_app/immutable/chunks/DFZLNBg4.js +0 -3
  219. package/dist/client/_app/immutable/chunks/DI0aitcY.js +0 -1
  220. package/dist/client/_app/immutable/chunks/DL8TMeQv.js +0 -4
  221. package/dist/client/_app/immutable/chunks/DWR0mSia.js +0 -24
  222. package/dist/client/_app/immutable/chunks/D_bFluSV2.js +0 -1
  223. package/dist/client/_app/immutable/chunks/DlpIbxXb.js +0 -159
  224. package/dist/client/_app/immutable/chunks/Drqwbptl2.js +0 -1
  225. package/dist/client/_app/immutable/chunks/DshlDaTJ.js +0 -1
  226. package/dist/client/_app/immutable/chunks/DtVGcudl.js +0 -3
  227. package/dist/client/_app/immutable/chunks/JN-hBVZx.js +0 -1
  228. package/dist/client/_app/immutable/chunks/KQRMt0jm2.js +0 -1
  229. package/dist/client/_app/immutable/chunks/KSCXtHEz.js +0 -30
  230. package/dist/client/_app/immutable/chunks/MNRJQPsd.js +0 -124
  231. package/dist/client/_app/immutable/chunks/S_AIhi7v2.js +0 -2
  232. package/dist/client/_app/immutable/chunks/hFfQmBrk2.js +0 -1
  233. package/dist/client/_app/immutable/chunks/pO9ctS3B.js +0 -1
  234. package/dist/client/_app/immutable/chunks/qKp3hrn2.js +0 -1
  235. package/dist/client/_app/immutable/chunks/uObJDEK6.js +0 -106
  236. package/dist/client/_app/immutable/chunks/vNSaohXd.js +0 -1
  237. package/dist/client/_app/immutable/chunks/wdqFE1Ck.js +0 -1
  238. package/dist/client/_app/immutable/chunks/zl68KYpW2.js +0 -10
  239. package/dist/client/_app/immutable/entry/start.2NHd-KNf.js +0 -1
  240. package/dist/client/_app/immutable/nodes/0.Dh5-dzOP.js +0 -1
  241. package/dist/client/_app/immutable/nodes/2.T06EL3l4.js +0 -21
  242. package/dist/server/chunks/0-DX38cI4t.js +0 -40
  243. package/dist/server/chunks/0-DX38cI4t.js.map +0 -1
  244. package/dist/server/chunks/1-DtLZVIEo.js +0 -9
  245. package/dist/server/chunks/1-DtLZVIEo.js.map +0 -1
  246. package/dist/server/chunks/2-D9UarvNQ.js +0 -54
  247. package/dist/server/chunks/2-D9UarvNQ.js.map +0 -1
  248. package/dist/server/chunks/Icon-B39GsOhr.js.map +0 -1
  249. package/dist/server/chunks/_error.svelte-BmM3eia-.js.map +0 -1
  250. package/dist/server/chunks/_layout.svelte-DN7VDoNA.js.map +0 -1
  251. package/dist/server/chunks/_page.svelte-Cmr6xyfK.js.map +0 -1
  252. package/dist/server/chunks/_server.ts--AQtsWl0.js.map +0 -1
  253. package/dist/server/chunks/_server.ts-BWRlkeWL.js.map +0 -1
  254. package/dist/server/chunks/_server.ts-C1Vx_DWq.js.map +0 -1
  255. package/dist/server/chunks/_server.ts-CJRyggfF.js.map +0 -1
  256. package/dist/server/chunks/_server.ts-Ct0Ll5bb.js.map +0 -1
  257. package/dist/server/chunks/_server.ts-D6CFL-gk.js.map +0 -1
  258. package/dist/server/chunks/_server.ts-DrcvZqTi.js.map +0 -1
  259. package/dist/server/chunks/_server.ts-vfrX_ASl.js.map +0 -1
  260. package/dist/server/chunks/content-store-CkGb0SWT.js.map +0 -1
  261. package/dist/server/chunks/docpage-BkHysAhp.js.map +0 -1
  262. package/dist/server/chunks/exports-BYLl3AJT.js.map +0 -1
  263. package/dist/server/chunks/hooks.server-CB5GWVYz.js.map +0 -1
  264. package/dist/server/chunks/internal2-Cc9tn9q-.js.map +0 -1
  265. package/dist/server/chunks/mdfile-DBiwGtNY.js.map +0 -1
  266. package/dist/server/chunks/site-BzEriToh.js.map +0 -1
  267. package/dist/server/index.js.map +0 -1
  268. package/dist/server/manifest.js.map +0 -1
  269. /package/dist/client/_app/immutable/chunks/{BifhSqXX.js → BifhSqXX2.js} +0 -0
  270. /package/dist/client/_app/immutable/chunks/{C8Fc0cco.js → C8Fc0cco2.js} +0 -0
  271. /package/dist/client/_app/immutable/chunks/{CSKSodPl2.js → CSKSodPl.js} +0 -0
  272. /package/dist/client/_app/immutable/chunks/{D6jRqBbL.js → D6jRqBbL2.js} +0 -0
@@ -1,9 +1,9 @@
1
- import{g as e,h as t,p as n}from"./pO9ctS3B.js";import{$ as r,H as i,K as a,M as o,U as s,a as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./MNRJQPsd.js";import{c as h,g}from"./CDzGDeIO.js";import{t as _}from"./D1OSA14p2.js";import{t as v}from"./CnsHLsSU2.js";import{t as y}from"./D_bFluSV2.js";import{t as b}from"./D-mF3Ymq2.js";import{r as x,t as S}from"./S_AIhi7v2.js";var C=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:t(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,classLiteralName:17,DOT:18,className: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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`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:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(L,[2,133]),e(L,[2,134]),e(L,[2,135]),e(L,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(D,[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,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,64]),{67:93,73:P,74:ee},e(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(z,[2,84]),e(z,[2,85]),e(z,[2,86]),e(z,[2,87]),e(z,[2,88]),e(ne,[2,89]),e(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},e(F,[2,72]),e(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},e(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{11:127,12:ie,39:[2,36]},e(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(X,[2,10]),e(ae,[2,55],{11:131,12:ie}),e(D,[2,7]),{9:[1,132]},e(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:oe}),e(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,109]),e(Q,[2,111]),e(Q,[2,112]),e(Q,[2,113]),e(Q,[2,114]),e(Q,[2,115]),e(Q,[2,116]),e(Q,[2,117]),e(Q,[2,118]),e(Q,[2,119]),e(O,[2,106]),e(F,[2,71]),e(O,[2,73],{61:oe}),{60:[1,155]},e(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(X,[2,12]),e(ae,[2,56]),{1:[2,4]},e(Z,[2,69]),e(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(R,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},e(F,[2,49]),{41:[2,62]},e(F,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,110]),e(re,[2,75]),{14:[1,170]},e(X,[2,11]),e(Z,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(ae,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(O,[2,104]),e(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./DsF7k-Jl.js";import{m as t,p as n}from"./iW3ggMaf.js";import{$ as r,H as i,K as a,M as o,U as s,a as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./BC0Z6JSt.js";import{c as h,g}from"./CFMX0wTB2.js";import{t as _}from"./CHdTS7qa2.js";import{t as v}from"./B38mTxN_2.js";import{t as y}from"./D9D9EADq2.js";import{t as b}from"./Bf-rMgGa.js";import{r as x,t as S}from"./p8FwW_Sl.js";var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:e(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,classLiteralName:17,DOT:18,className: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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`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:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},t(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(L,[2,133]),t(L,[2,134]),t(L,[2,135]),t(L,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[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,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},t(O,[2,64]),{67:93,73:P,74:ee},t(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(z,[2,84]),t(z,[2,85]),t(z,[2,86]),t(z,[2,87]),t(z,[2,88]),t(ne,[2,89]),t(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},t(F,[2,72]),t(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},t(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(I,[2,16]),t(I,[2,17]),t(I,[2,18]),{11:127,12:ie,39:[2,36]},t(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(X,[2,10]),t(ae,[2,55],{11:131,12:ie}),t(D,[2,7]),{9:[1,132]},t(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(F,[2,48],{39:[1,142]}),{41:[1,143]},t(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:oe}),t(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(Q,[2,109]),t(Q,[2,111]),t(Q,[2,112]),t(Q,[2,113]),t(Q,[2,114]),t(Q,[2,115]),t(Q,[2,116]),t(Q,[2,117]),t(Q,[2,118]),t(Q,[2,119]),t(O,[2,106]),t(F,[2,71]),t(O,[2,73],{61:oe}),{60:[1,155]},t(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(X,[2,12]),t(ae,[2,56]),{1:[2,4]},t(Z,[2,69]),t(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(R,[2,80]),t(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},t(F,[2,49]),{41:[2,62]},t(F,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},t(Q,[2,110]),t(re,[2,75]),{14:[1,170]},t(X,[2,11]),t(Z,[2,70]),t(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(ae,[2,8]),t(F,[2,51]),{41:[1,175]},t(F,[2,54]),t(O,[2,104]),t(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
- Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={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:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
- `+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,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))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(function(e,t,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5: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:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return`EDGE_STATE`;case 18:this.begin(`callback_name`);break;case 19:this.popState();break;case 20:this.popState(),this.begin(`callback_args`);break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return`STR`;case 26:this.begin(`string`);break;case 27:return 82;case 28:return 57;case 29:return this.begin(`namespace`),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin(`namespace-body`),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return`EOF_IN_STRUCT`;case 36:return 8;case 37:break;case 38:return`EDGE_STATE`;case 39:return this.begin(`class`),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin(`class-body`),39;case 44:return this.popState(),41;case 45:return`EOF_IN_STRUCT`;case 46:return`EDGE_STATE`;case 47:return`OPEN_IN_STRUCT`;case 48:break;case 49:return`MEMBER`;case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return`GENERICTYPE`;case 61:this.begin(`generic`);break;case 62:this.popState();break;case 63:return`BQUOTE_STR`;case 64:this.begin(`bqstring`);break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return`PLUS`;case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return`EQUALS`;case 89:return`EQUALS`;case 90:return 60;case 91:return 12;case 92:return 14;case 93:return`PUNCTUATION`;case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98: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,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}}})();function $(){this.yy={}}return t($,`Parser`),$.prototype=ce,ce.Parser=$,new $})();C.parser=C;var w=C,T=[`#`,`+`,`~`,`-`,``],E=class{static{t(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=m(e,f());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+o(this.id);this.memberType===`method`&&(e+=`(${o(this.parameters.trim())})`,this.returnType&&(e+=` : `+o(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(T.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);T.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${o(this.id)}${this.memberType===`method`?`(${o(this.parameters)})${this.returnType?` : `+o(this.returnType):``}`:``}`;this.text=n.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``}}},D=`classId-`,O=0,k=t(e=>l.sanitizeText(e,f()),`sanitizeText`),A=class o{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=t(e=>{let t=v();n(e).select(`svg`).selectAll(`g`).filter(function(){return n(this).attr(`title`)!==null}).on(`mouseover`,e=>{let i=n(e.currentTarget),a=i.attr(`title`);if(!a)return;let o=e.currentTarget.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.html(r.sanitize(a)).style(`left`,`${window.scrollX+o.left+o.width/2}px`).style(`top`,`${window.scrollY+o.bottom+4}px`),i.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=s,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=a,this.getDiagramTitle=d,this.getConfig=t(()=>f().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.popNamespace=this.popNamespace.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)}static{t(this,`ClassDB`)}splitClassNameAndType(e){let t=l.sanitizeText(e,f()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=k(e[0]),n=k(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=l.sanitizeText(e,f());t&&=k(t);let{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=t,this.classes.get(r).text=`${t}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:``}`}addClass(e){let t=l.sanitizeText(e,f()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=l.sanitizeText(n,f());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`&lt;${r}&gt;`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:D+i+`-`+O}),O++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=l.sanitizeText(e,f());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.direction=`TB`,c()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(t){e.debug(`Adding relation: `+JSON.stringify(t));let n=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!n.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!n.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=l.sanitizeText(t.relationTitle1.trim(),f()),t.relationTitle2=l.sanitizeText(t.relationTitle2.trim(),f()),this.relations.push(t)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push(k(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new E(e,`method`)):e&&r.members.push(new E(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),k(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=D+n);let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{t!==void 0&&(this.classes.get(e).tooltip=k(t))})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let r=f();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=D+i);let a=this.classes.get(i);a&&(a.link=g.formatUrl(t,r),r.securityLevel===`sandbox`?a.linkTarget=`_top`:typeof n==`string`?a.linkTarget=k(n):a.linkTarget=`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n),this.classes.get(e).haveCallback=!0}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let r=l.sanitizeText(e,f());if(f().securityLevel!==`loose`||t===void 0)return;let i=r;if(this.classes.has(i)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<e.length;t++){let n=e[t].trim();n.startsWith(`"`)&&n.endsWith(`"`)&&(n=n.substr(1,n.length-2)),e[t]=n}}e.length===0&&e.push(i),this.functions.push(()=>{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e<t.length;e++)n[e]=`${n[e-1]}.${t[e]}`;return n}createNamespaceNode(e,t,n,r=!1){return{id:e,label:t,classes:new Map,notes:new Map,children:new Map,domId:D+e+`-`+ this.namespaceCounter++,parent:n,explicit:r}}linkParentChild(e,t){let n=this.namespaces.get(e),r=this.namespaces.get(t);!n||!r||(n.children.has(t)||n.children.set(t,r),r.parent??=e)}addNamespace(e,t){let n=o.resolveQualifiedId(e,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){let e=this.namespaces.get(n);return e.explicit=!0,t&&(e.label=t),n}let r=n.split(`.`),i=o.getAncestorIds(n);for(let e=0;e<i.length;e++){let n=i[e],a=e>0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(!(!t||!n))for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){let e=[],t=[],n=f(),r=n.class?.hierarchicalNamespaces??!0;for(let t of this.namespaces.values()){if(!r&&!t.explicit)continue;let i={id:t.id,label:r?t.label:t.id,isGroup:!0,padding:n.class.padding??16,shape:`rect`,cssStyles:[],look:n.look,parentId:r?t.parent:void 0};e.push(i)}for(let t of this.classes.values()){let i=r?t.parent:this.resolveExplicitAncestor(t.parent),a={...t,type:void 0,isGroup:!1,parentId:i,look:n.look};e.push(a)}for(let i of this.notes.values()){let a=r?i.parent:this.resolveExplicitAncestor(i.parent),o={id:i.id,label:i.text,isGroup:!1,shape:`note`,padding:n.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:a,labelType:`markdown`};e.push(o);let s=this.classes.get(i.class)?.id;if(s){let e={id:`edgeNote${i.index}`,start:i.id,end:s,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:n.look};t.push(e)}}for(let t of this.interfaces){let r={id:t.id,label:t.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:n.look};e.push(r)}let i=0;for(let e of this.relations){i++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:i}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.getDirection()}}},j=t(e=>`g.classGroup text {
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,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))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5: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:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return`EDGE_STATE`;case 18:this.begin(`callback_name`);break;case 19:this.popState();break;case 20:this.popState(),this.begin(`callback_args`);break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return`STR`;case 26:this.begin(`string`);break;case 27:return 82;case 28:return 57;case 29:return this.begin(`namespace`),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin(`namespace-body`),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return`EOF_IN_STRUCT`;case 36:return 8;case 37:break;case 38:return`EDGE_STATE`;case 39:return this.begin(`class`),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin(`class-body`),39;case 44:return this.popState(),41;case 45:return`EOF_IN_STRUCT`;case 46:return`EDGE_STATE`;case 47:return`OPEN_IN_STRUCT`;case 48:break;case 49:return`MEMBER`;case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return`GENERICTYPE`;case 61:this.begin(`generic`);break;case 62:this.popState();break;case 63:return`BQUOTE_STR`;case 64:this.begin(`bqstring`);break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return`PLUS`;case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return`EQUALS`;case 89:return`EQUALS`;case 90:return 60;case 91:return 12;case 92:return 14;case 93:return`PUNCTUATION`;case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98: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,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}}})();function $(){this.yy={}}return e($,`Parser`),$.prototype=ce,ce.Parser=$,new $})();C.parser=C;var w=C,T=[`#`,`+`,`~`,`-`,``],E=class{static{e(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=m(e,f());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+o(this.id);this.memberType===`method`&&(e+=`(${o(this.parameters.trim())})`,this.returnType&&(e+=` : `+o(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(T.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);T.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${o(this.id)}${this.memberType===`method`?`(${o(this.parameters)})${this.returnType?` : `+o(this.returnType):``}`:``}`;this.text=n.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``}}},D=`classId-`,O=0,k=e(e=>l.sanitizeText(e,f()),`sanitizeText`),A=class o{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=e(e=>{let t=v();n(e).select(`svg`).selectAll(`g`).filter(function(){return n(this).attr(`title`)!==null}).on(`mouseover`,e=>{let i=n(e.currentTarget),a=i.attr(`title`);if(!a)return;let o=e.currentTarget.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.html(r.sanitize(a)).style(`left`,`${window.scrollX+o.left+o.width/2}px`).style(`top`,`${window.scrollY+o.bottom+4}px`),i.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=s,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=a,this.getDiagramTitle=d,this.getConfig=e(()=>f().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.popNamespace=this.popNamespace.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)}static{e(this,`ClassDB`)}splitClassNameAndType(e){let t=l.sanitizeText(e,f()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=k(e[0]),n=k(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=l.sanitizeText(e,f());t&&=k(t);let{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=t,this.classes.get(r).text=`${t}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:``}`}addClass(e){let t=l.sanitizeText(e,f()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=l.sanitizeText(n,f());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`&lt;${r}&gt;`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:D+i+`-`+O}),O++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=l.sanitizeText(e,f());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.direction=`TB`,c()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(e){t.debug(`Adding relation: `+JSON.stringify(e));let n=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!n.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!n.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=l.sanitizeText(e.relationTitle1.trim(),f()),e.relationTitle2=l.sanitizeText(e.relationTitle2.trim(),f()),this.relations.push(e)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push(k(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new E(e,`method`)):e&&r.members.push(new E(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),k(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=D+n),n=this.splitClassNameAndType(n).className;let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{if(t!==void 0){let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);r&&(r.tooltip=k(t))}})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let r=f();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=D+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=g.formatUrl(t,r),r.securityLevel===`sandbox`?a.linkTarget=`_top`:typeof n==`string`?a.linkTarget=k(n):a.linkTarget=`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n);let r=this.splitClassNameAndType(e).className,i=this.classes.get(r);i&&(i.haveCallback=!0)}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let r=l.sanitizeText(e,f());if(f().securityLevel!==`loose`||t===void 0)return;let i=this.splitClassNameAndType(r).className;if(this.classes.has(i)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<e.length;t++){let n=e[t].trim();n.startsWith(`"`)&&n.endsWith(`"`)&&(n=n.substr(1,n.length-2)),e[t]=n}}e.length===0&&e.push(i),this.functions.push(()=>{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e<t.length;e++)n[e]=`${n[e-1]}.${t[e]}`;return n}createNamespaceNode(e,t,n,r=!1){return{id:e,label:t,classes:new Map,notes:new Map,children:new Map,domId:D+e+`-`+this.namespaceCounter++,parent:n,explicit:r}}linkParentChild(e,t){let n=this.namespaces.get(e),r=this.namespaces.get(t);!n||!r||(n.children.has(t)||n.children.set(t,r),r.parent??=e)}addNamespace(e,t){let n=o.resolveQualifiedId(e,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){let e=this.namespaces.get(n);return e.explicit=!0,t&&(e.label=t),n}let r=n.split(`.`),i=o.getAncestorIds(n);for(let e=0;e<i.length;e++){let n=i[e],a=e>0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(!(!t||!n))for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){let e=[],t=[],n=f(),r=n.class?.hierarchicalNamespaces??!0;for(let t of this.namespaces.values()){if(!r&&!t.explicit)continue;let i={id:t.id,label:r?t.label:t.id,isGroup:!0,padding:n.class.padding??16,shape:`rect`,cssStyles:[],look:n.look,parentId:r?t.parent:void 0};e.push(i)}for(let t of this.classes.values()){let i=r?t.parent:this.resolveExplicitAncestor(t.parent),a={...t,type:void 0,isGroup:!1,parentId:i,look:n.look};e.push(a)}for(let i of this.notes.values()){let a=r?i.parent:this.resolveExplicitAncestor(i.parent),o={id:i.id,label:i.text,isGroup:!1,shape:`note`,padding:n.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:a,labelType:`markdown`};e.push(o);let s=this.classes.get(i.class)?.id;if(s){let e={id:`edgeNote${i.index}`,start:i.id,end:s,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:n.look};t.push(e)}}for(let t of this.interfaces){let r={id:t.id,label:t.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:n.look};e.push(r)}let i=0;for(let e of this.relations){i++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:i}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.getDirection()}}},j=e(e=>`g.classGroup text {
7
7
  fill: ${e.nodeBorder||e.classText};
8
8
  stroke: none;
9
9
  font-family: ${e.fontFamily};
@@ -203,4 +203,4 @@ g.classGroup line {
203
203
  text-align: center;
204
204
  }
205
205
  ${_()}
206
- `,`getStyles`),M={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(t,n,r,i){e.info(`REF0:`),e.info(`Drawing class diagram (v3)`,n);let{securityLevel:a,state:o,layout:s}=f();i.db.setDiagramId(n);let c=i.db.getData(),l=y(n,a);c.type=i.type,c.layoutAlgorithm=S(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],c.diagramId=n,await x(c,l),g.insertTitle(l,`classDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),b(l,8,`classDiagram`,o?.useMaxWidth??!0)},`draw`),getDir:t((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)};export{j as i,w as n,M as r,A as t};
206
+ `,`getStyles`),M={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing class diagram (v3)`,n);let{securityLevel:a,state:o,layout:s}=f();i.db.setDiagramId(n);let c=i.db.getData(),l=y(n,a);c.type=i.type,c.layoutAlgorithm=S(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],c.diagramId=n,await x(c,l),g.insertTitle(l,`classDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),b(l,8,`classDiagram`,o?.useMaxWidth??!0)},`draw`),getDir:e((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)};export{j as i,w as n,M as r,A as t};
@@ -0,0 +1 @@
1
+ import{t as e,u as t}from"./BBJaonHc.js";import{n}from"./DsF7k-Jl.js";import{m as r}from"./iW3ggMaf.js";import"./BC0Z6JSt.js";import"./qYxEWMoP2.js";import{n as i,r as a,t as o}from"./CGzhSlOG2.js";import{t as s}from"./KythIMN82.js";var c=t().RailroadPeg.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=n(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=n(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=n(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=n(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:n(t=>{o.clear(),r.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new e(n);let i=n.value;r.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),r.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/_app/immutable/chunks/CuRJVwEq.js","/_app/immutable/chunks/DsF7k-Jl.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./CCHqIdNO.js";import{n as t}from"./DsF7k-Jl.js";import{m as n}from"./iW3ggMaf.js";import{b as r,x as i}from"./BC0Z6JSt.js";import{g as a}from"./CFMX0wTB2.js";import"./hAYnLAr22.js";import"./Dq77RFat2.js";import{r as o}from"./CWiCMZki2.js";import{n as s}from"./D0XLW3Y72.js";import{t as c}from"./B8gBHxth2.js";import{n as l}from"./CZBscxHQ2.js";import"./CgljPyk-.js";import{a as u,c as d,i as f,n as p,t as m}from"./LevMccfs.js";import{a as h,i as g,n as _,r as v,s as y,t as b}from"./BLTdZGww.js";async function x(t,n){let r=new c({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=t.insert(`g`).attr(`class`,`root`),l=s.insert(`g`).attr(`class`,`clusters`),d=s.insert(`g`).attr(`class`,`edges edgePath`),f=s.insert(`g`).attr(`class`,`edgeLabels`),p=s.insert(`g`).attr(`class`,`nodes`),m=new Map,h=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)r.setNode(e.id,{...e});else{if(h){let t=await u(p,e,{config:o,dir:e.dir}),n=t.node()?.getBBox()??{width:0,height:0};m.set(e.id,t),e.width=n.width,e.height=n.height}r.setNode(e.id,{...e})}}));for(let e of a)r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./CuRJVwEq.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]),import.meta.url);r(t,n)}return{graph:r,groups:{clusters:l,edgePaths:d,edgeLabels:f,nodes:p,rootGroups:s},nodeElements:m}}t(x,`createGraphWithElements`);var S=5,C=1e-5,w=1e-6;function T(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}t(T,`buildSegmentList`);function E(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(c===0)return null;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c;return d<=w||d>=1-w||f<=w||f>=1-w?null:{point:{x:e.x+d*i,y:e.y+d*a},tA:d,tB:f}}t(E,`segmentIntersection`);function D(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}t(D,`isHorizontalSeg`);function O(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=T(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=T(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=E(a.a,a.b,s.a,s.b);if(!o)continue;let c=D(a);c!==D(s)&&c?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}t(O,`findEdgeIntersections`);function k(e){return`${Math.round(e*1e3)/1e3}`}t(k,`fmt`);function A(e){return`${k(e.x)},${k(e.y)}`}t(A,`pointToString`);function j(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}t(j,`getArcSweepFlag`);var ee=.001;function te(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&o[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&o[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}t(te,`applyMarkerOffsets`);function M(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${A(s)}`];return i===`arc`?l.push(`A${k(e.r)},${k(e.r)} 0 0 ${r} ${A(c)}`):l.push(`M${A(c)}`),l}t(M,`emitJump`);function ne(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,c=Math.hypot(i,a),l=Math.hypot(o,s);if(c<C||l<C)return null;let u=i/c,d=a/c,f=o/l,p=s/l,m=u*f+d*p,h=Math.acos(Math.max(-1,Math.min(1,m)));if(h<C||Math.abs(Math.PI-h)<C)return null;let g=Math.min(r/Math.sin(h/2),c/2,l/2);return{startX:t.x-u*g,startY:t.y-d*g,endX:t.x+f*g,endY:t.y+p*g,ctrlX:t.x,ctrlY:t.y,cutLen:g}}t(ne,`computeRoundedCorner`);function N(e,t,n){let r=e.points;if(r.length<2)return``;let i=te(r,e),a=e.curve===`rounded`,o=T(i),s=new Map;for(let e of t){let t=o[e.segIndex];if(!t)continue;let r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=s.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*r,r:n.jumpRadius}),s.set(e.segIndex,i)}let c=[`M${A(i[0])}`];for(let e=0;e<o.length;e++){let t=o[e],r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),l=r===0?0:(t.b.x-t.a.x)/r,u=r===0?0:(t.b.y-t.a.y)/r,d=j(t),f=0;if(a&&e>0){let t=ne(i[e-1],i[e],i[e+1]??i[e],S);t&&(f=t.cutLen)}let p=r,m=null;a&&e<o.length-1&&(m=ne(i[e],i[e+1],i[e+2]??i[e+1],S),m&&(p=r-m.cutLen));let h=[...s.get(e)??[]].sort((e,t)=>e.t-t.t);for(let e of h)e.r=Math.min(e.r,e.d-f,p-e.d);for(let e=0;e<h.length-1;e++){let t=h[e+1].d-h[e].d;if(h[e].r+h[e+1].r>t){let n=t/2;h[e].r=Math.min(h[e].r,n),h[e+1].r=Math.min(h[e+1].r,n)}}for(let e of h)e.r<ee||c.push(...M(e,l,u,d,n.jumpStyle));a&&m?(c.push(`L${k(m.startX)},${k(m.startY)}`),c.push(`Q${k(m.ctrlX)},${k(m.ctrlY)} ${k(m.endX)},${k(m.endY)}`)):c.push(`L${A(t.b)}`)}return c.join(` `)}t(N,`rewriteEdgePath`);function re(e){return/^[\d\s+,.LMelm-]*$/.test(e)}t(re,`isStraightPath`);function P(e){return e?e===`linear`||e===`rounded`||e===`step`||e===`stepBefore`||e===`stepAfter`:!0}t(P,`curveSupportsLineHops`);function ie(e){if(!e)return null;try{let t=typeof atob==`function`?atob(e):Buffer.from(e,`base64`).toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&typeof e.x==`number`&&typeof e.y==`number`&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}t(ie,`decodeDataPoints`);function ae(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=ie(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=O(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!P(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!re(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=N(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}t(ae,`applyLineJumpsToSvg`);async function oe(e,t){for(let n of e.nodes)n.isGroup?await f(t.clusters,n):d(n);let n=new Map;for(let t of e.nodes)t?.id&&n.set(t.id,t);for(let r of e.edges){let i=r.start?n.get(r.start)??{}:{},a=r.end?n.get(r.end)??{}:{},o=v(t.edgePaths,{...r},{},e.type,i,a,e.diagramId);r.label&&await g(t.rootGroups,r),r.label&&se(r,o)}let r=e.config?.swimlane?.lineHops;if(r!==!1){let n=r===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));ae(t.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}}t(oe,`adjustLayout`);function se(e,t){let i=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:o}=s({flowchart:r().flowchart??{}});if(e.label){let r=_.get(e.id),s=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t&&(s=r.x,c=r.y)}r.attr(`transform`,`translate(${s}, ${c+o/2})`)}if(e?.startLabelLeft){let t=y.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=y.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=y.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=y.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t(se,`positionEdgeLabel`);var ce=`__swimlane_default__`,le=21,ue=20;function de(e){return Math.max(e.padding??ue,ue)}t(de,`topLaneHorizontalPadding`);function fe(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(le,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}t(fe,`assignTopLaneTitleRect`);function pe(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===ce);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:ce,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=ce}t(pe,`prepareLayoutForSwimlanes`);function F(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}t(F,`toGraphView`);function I(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*de(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*de(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e<l-1;e++)t.push(s[e+1]-s[e]);let n=Array(l);n[0]=0;for(let e=0;e<l-1;e++)n[e+1]=2*t[e]-n[e];let r=0,i=1/0;for(let e=0;e<l;e++){let t=c[e];e%2==0?r=Math.max(r,t-n[e]):i=Math.min(i,n[e]-t)}let a=r;a=r<=i?(r+i)/2:r;for(let t=0;t<l;t++){let r=n[t]+(t%2==0?a:-a),i=Math.max(c[t],r);e.set(o[t],i)}}for(let t of d){let n=e.get(t.id);n!=null&&(t.width=n),fe(t)}}}}}t(I,`writeBackToLayoutData`);var me=`[EdgeLabelNodes]`;function he(e){let t=[],r=[],i=new Map;for(let t of e.nodes)i.set(t.id,t);for(let a of e.edges){if(!a.label||a.label.length===0||a.isLayoutOnly||a.labelNodeId)continue;let e=a.start?i.get(a.start):void 0,o=a.end?i.get(a.end):void 0;if(!e||!o){n.warn(me,`Edge ${a.id} has missing source or target node`);continue}let s=`edge-label-${a.start}-${a.end}-${a.id}`,c=e.parentId===o.parentId?e.parentId:o.parentId,l={id:s,label:a.label,edgeStart:a.start??``,edgeEnd:a.end??``,shape:`labelRect`,width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:c,isGroup:!1,labelStyle:Array.isArray(a.labelStyle)?a.labelStyle[0]:a.labelStyle??``,...e.dir?{dir:e.dir}:{}};t.push(l),a.labelNodeId=s,a.label=void 0,a.text=void 0;let u={id:`${a.id}-to-label`,start:a.start,end:s,type:`normal`,isLayoutOnly:!0},d={id:`${a.id}-from-label`,start:s,end:a.end,type:`normal`,isLayoutOnly:!0};r.push(u,d)}let a=[...e.nodes,...t],o=[...e.edges,...r];return{...e,nodes:a,edges:o}}t(he,`createEdgeLabelNodes`);var L=.001;function ge(e){let t=e.x??0,n=e.y??0,r=e.width??0,i=e.height??0;return r>0&&i>0?{cx:t,cy:n,rect:Ee(t,n,r,i)}:void 0}t(ge,`measuredNodeRect`);function _e(e){if(e.isGroup)return;let t=ge(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}t(_e,`nodeBoundsInfoFor`);function R(e,t,n=L){return Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<n}t(R,`samePoint`);function z(e,t,n=L){return Math.abs(e.x-t.x)<n}t(z,`sameX`);function B(e,t,n=L){return Math.abs(e.y-t.y)<n}t(B,`sameY`);function V(e,t,n=L){return B(e,t,n)&&Math.abs(e.x-t.x)>n}t(V,`isHorizontalSegment`);function H(e,t,n=L){return z(e,t,n)&&Math.abs(e.y-t.y)>n}t(H,`isVerticalSegment`);function U(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}t(U,`overlapLength`);function ve(e,t,n=L){return e.horizontal&&t.horizontal&&B(e.a,t.a,n)?U(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&z(e.a,t.a,n)?U(e.a.y,e.b.y,t.a.y,t.b.y):0}t(ve,`sameAxisSegmentOverlapLength`);function ye(e,t=L){let n=[];for(let r=0;r<e.length-1;r++){let i=e[r],a=e[r+1],o=V(i,a,t),s=H(i,a,t);(o||s)&&n.push({index:r,a:i,b:a,horizontal:o,vertical:s})}return n}t(ye,`orthogonalSegmentsForPoints`);function W(e,t=L){let n=ye(e,t),r=0;for(let e=1;e<n.length;e++)n[e-1].horizontal!==n[e].horizontal&&r++;return r}t(W,`countOrthogonalBends`);function G(e,t=L){let n=[];for(let r of e){let e=n.length>0?n[n.length-1]:void 0;(!e||!R(e,r,t))&&n.push({x:r.x,y:r.y})}return n}t(G,`dedupeConsecutivePoints`);function be(e,t=L){if(!e||e.length!==4)return;let[n,r,i,a]=e;return V(n,r,t)&&H(r,i,t)&&V(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:H(n,r,t)&&V(r,i,t)&&H(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}t(be,`classifyThreeSegmentRoute`);function xe(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&i<n.right+r&&s>n.top-r&&o<n.bottom+r}t(xe,`segmentBoundsOverlapRect`);function Se(e,t,n=0){return e.x>t.left+n&&e.x<t.right-n&&e.y>t.top+n&&e.y<t.bottom-n}t(Se,`pointInsideRect`);function Ce(e,t){return e.left<=t.left&&e.right>=t.right&&e.top<=t.top&&e.bottom>=t.bottom}t(Ce,`rectContainsRect`);function we(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}t(we,`rectsOverlap`);function Te(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}t(Te,`inflateRect`);function Ee(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}t(Ee,`rectFromCenterSize`);function K(e){return ge(e)?.rect}t(K,`rectOfNodeBounds`);function De(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}t(De,`portForRectSide`);function Oe(e,t,n,r,i,a=L){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.x<n.x||t===`left`&&r===`right`&&e.x>n.x){if(B(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(B(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(z(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.y<n.y||t===`top`&&r===`bottom`&&e.y>n.y))return;if(z(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.x<e.x,a=r===`top`&&e.y<n.y||r===`bottom`&&e.y>n.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.y<e.y,l=r===`left`&&e.x<n.x||r===`right`&&e.x>n.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}t(Oe,`buildOrthogonalPortPath`);function ke(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}t(ke,`buildSameSideTrackPath`);function Ae(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=_e(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}t(Ae,`collectRealNodeBounds`);function je(e){let t=[],n=[];for(let r of e){let e=_e(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}t(je,`collectNodeRectEntries`);function Me(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...Ee(e,i,a,o)})}return n}t(Me,`collectLayoutNodeRects`);function Ne(e,t,n=L){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)<n,collinearY:Math.abs(a.cy-o.cy)<n}}t(Ne,`getNodePairGeometry`);function q(e,t,n,r=[],i=0){for(let a of n)if(!r.includes(a.id)&&xe(e,t,a.rect,-i))return!0;return!1}t(q,`segmentHitsAnyRect`);function Pe(e,t,n,r,i=L,a=1e-6){let o=B(e,t,i),s=z(e,t,i),c=B(n,r,i),l=z(n,r,i);if(o&&c||s&&l||!(o||s)||!(c||l))return!1;let u=o?{a:e,b:t}:{a:n,b:r},d=s?{a:e,b:t}:{a:n,b:r},f=u.a.y,p=Math.min(u.a.x,u.b.x),m=Math.max(u.a.x,u.b.x),h=d.a.x,g=Math.min(d.a.y,d.b.y),_=Math.max(d.a.y,d.b.y);if(h<p||h>m||f<g||f>_)return!1;let v=Math.abs(h-u.a.x)<a&&Math.abs(f-u.a.y)<a||Math.abs(h-u.b.x)<a&&Math.abs(f-u.b.y)<a,y=Math.abs(h-d.a.x)<a&&Math.abs(f-d.a.y)<a||Math.abs(h-d.b.x)<a&&Math.abs(f-d.b.y)<a;return!(v&&y)}t(Pe,`orthogonalSegmentsCross`);function Fe(e,t,n,r,i=L){let a=B(e,t,i),o=z(e,t,i),s=B(n,r,i),c=z(n,r,i);return o&&c&&z(e,n,i)?U(e.y,t.y,n.y,r.y)>i:a&&s&&B(e,n,i)?U(e.x,t.x,n.x,r.x)>i:!1}t(Fe,`sameAxisSegmentsOverlap`);function Ie(e,t,n,r,{epsilon:i=L,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;r<n.length-1;r++){let o=n[r],s=n[r+1];if(!(a&&R(o,s,i))&&(Pe(e,t,o,s,i)||Fe(e,t,o,s,i)))return!0}}return!1}t(Ie,`segmentConflictsWithAnyEdge`);function Le(e,t,n,r,i=L){let a=B(e,t,i),o=z(e,t,i),s=B(n,r,i),c=z(n,r,i);if(!(a&&c||o&&s))return!1;let l=a?{a:e,b:t}:{a:n,b:r},u=a?{a:n,b:r}:{a:e,b:t},d=l.a.y,f=Math.min(l.a.x,l.b.x),p=Math.max(l.a.x,l.b.x),m=u.a.x,h=Math.min(u.a.y,u.b.y),g=Math.max(u.a.y,u.b.y);return m>f+i&&m<p-i&&d>h+i&&d<g-i}t(Le,`orthogonalSegmentsStrictlyCross`);function Re(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return e>r+L&&e<i-L}t(Re,`strictlyBetween`);function ze(e,t,n){return z(e,t)&&z(t,n)?Re(t.y,e.y,n.y):B(e,t)&&B(t,n)?Re(t.x,e.x,n.x):!1}t(ze,`isCollinearIntermediate`);function Be(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=n[n.length-1],a=e[r],o=r+1<e.length?e[r+1]:void 0;if(i&&o){if(R(i,o)){r++,t=!0;continue}if(ze(i,a,o)){t=!0;continue}}n.push(a)}return{points:n,changed:t}}t(Be,`simplifyPolylineOnce`);function Ve(e){let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n];if(!z(r,i)&&!B(r,i)){let e=t.length>=2?t[t.length-2]:void 0,n=e&&z(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!R(t,e))&&n.push(e)}return n}t(Ve,`orthogonalizePolyline`);function He(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=Be(t);if(t=e.points,!e.changed)break}return t}t(He,`simplifyPolyline`);var J=.001,Ue=.5,We=4;function Ge(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length<n)return;let i=r.start?t.get(r.start):void 0,a=r.end?t.get(r.end):void 0;return{edge:r,points:r.points,srcRect:i?K(i):void 0,dstRect:a?K(a):void 0}}t(Ge,`endpointContextFor`);function Ke(e,t,n){if(B(e,t,J))return{x:e.x<n.left?n.left:n.right,y:e.y};if(z(e,t,J)){let t=e.y<n.top?n.top:n.bottom;return{x:e.x,y:t}}return{x:Math.min(n.right,Math.max(n.left,e.x)),y:Math.min(n.bottom,Math.max(n.top,e.y))}}t(Ke,`segmentEnterPoint`);function qe(e,t,n){let r=n?1:-1,i=n?0:e.length-1;for(;i>=0&&i<e.length&&Se(e[i],t,Ue);)i+=r;if(i<0||i>=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ke(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}t(qe,`clipEndpoint`);function Je(e,t){for(let n of e){let e=Ge(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=qe(r,e.srcRect,!0)),e.dstRect&&(r=qe(r,e.dstRect,!1)),r=He(Ve(r)),r=at(r,e.srcRect,e.dstRect),e.edge.points=He(Ve(r))}}t(Je,`clipEdgeEndpointsToNodeBoundaries`);function Ye(e,t,n,r=!1){if(B(e,t,J)){if(t.y<n.top-J||t.y>n.bottom+J)return t;if(r){if(e.x<n.left-J)return{x:n.left,y:e.y};if(e.x>n.right+J)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(z(e,t,J)){if(t.x<n.left-J||t.x>n.right+J)return t;if(r){if(e.y<n.top-J)return{x:e.x,y:n.top};if(e.y>n.bottom+J)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}t(Ye,`snapEndpointToBoundary`);function Xe(e,t,n){let r=e[t];for(let i=t+n;i>=0&&i<e.length;i+=n){let t=e[i];if(!R(t,r,J))return t}return e[t+n]}t(Xe,`firstDistinctAdjacent`);function Ze(e,t){let n=e+We,r=t-We;return n<=r?{lo:n,hi:r}:{lo:(e+t)/2,hi:(e+t)/2}}t(Ze,`cornerClearanceRange`);function Qe(e,t,n){let{lo:r,hi:i}=Ze(t,n);return Math.min(i,Math.max(r,e))}t(Qe,`clampToCornerClearance`);function $e(e){let t=Math.max(...e.map(e=>e.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}t($e,`intersectRanges`);function et(e,t){return t===`left`||t===`right`?Ze(e.top,e.bottom):Ze(e.left,e.right)}t(et,`clearanceRangeForSide`);function tt(e,t,n){let r=e.y>=n.top-J&&e.y<=n.bottom+J,i=e.x>=n.left-J&&e.x<=n.right+J;if(B(e,t,J)&&r){if(Math.abs(e.x-n.left)<J)return`left`;if(Math.abs(e.x-n.right)<J)return`right`}if(z(e,t,J)&&i){if(Math.abs(e.y-n.top)<J)return`top`;if(Math.abs(e.y-n.bottom)<J)return`bottom`}}t(tt,`terminalSideForSegment`);function nt(e){return e===`left`||e===`right`}t(nt,`isHorizontalSide`);function rt(e,t,n,r,i){let a=[],o=n?tt(e,t,n):void 0,s=r?tt(t,e,r):void 0;return n&&o&&nt(o)===i&&a.push(et(n,o)),r&&s&&nt(s)===i&&a.push(et(r,s)),a.length>0?$e(a):void 0}t(rt,`straightClearanceRange`);function it(e,t,n,r,i){let a=rt(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)<J))return i?[{x:e.x,y:s},{x:t.x,y:s}]:[{x:s,y:e.y},{x:s,y:t.y}]}t(it,`clearStraightEndpointCornerAxis`);function at(e,t,n){if(e.length!==2)return e;let[r,i]=e;return B(r,i,J)?it(r,i,t,n,!0)??e:z(r,i,J)?it(r,i,t,n,!1)??e:e}t(at,`clearStraightEndpointCornerConnections`);function ot(e,t,n){return nt(n)?{x:e.x,y:Qe(e.y,t.top,t.bottom)}:{x:Qe(e.x,t.left,t.right),y:e.y}}t(ot,`cornerClearedEndpoint`);function st(e,t,n,r,i,a){let o=e.map(e=>({...e}));for(let s=t;s>=0&&s<e.length;s+=n){let t=e[s];if(a&&!B(t,r,J)||!a&&!z(t,r,J))break;a?o[s].y=i.y:o[s].x=i.x}return o}t(st,`moveCollinearEndpointRun`);function ct(e,t,n){if(e.length<2)return e;let r=n?0:e.length-1,i=n?1:-1,a=e[r],o=Xe(e,r,i);if(!o)return e;let s=tt(a,o,t);if(!s)return e;let c=nt(s),l=ot(a,t,s);return R(a,l,J)?e:st(e,r,i,a,l,c)}t(ct,`clearEndpointCornerConnection`);function lt(e,t,n){let r=Math.min(e.x,t.x)>=n.left-J&&Math.max(e.x,t.x)<=n.right+J,i=Math.min(e.y,t.y)>=n.top-J&&Math.max(e.y,t.y)<=n.bottom+J;if(Math.abs(e.y-n.top)<J&&Math.abs(t.y-n.top)<J&&r)return`top`;if(Math.abs(e.y-n.bottom)<J&&Math.abs(t.y-n.bottom)<J&&r)return`bottom`;if(Math.abs(e.x-n.left)<J&&Math.abs(t.x-n.left)<J&&i)return`left`;if(Math.abs(e.x-n.right)<J&&Math.abs(t.x-n.right)<J&&i)return`right`}t(lt,`borderSideForSegment`);function ut(e,t,n,r){switch(e){case`top`:return z(t,n,J)&&n.y<r.top-J;case`bottom`:return z(t,n,J)&&n.y>r.bottom+J;case`left`:return B(t,n,J)&&n.x<r.left-J;case`right`:return B(t,n,J)&&n.x>r.right+J}}t(ut,`leavesOutward`);function dt(e,t,n){if(e.length<3)return e;if(n){let n=lt(e[0],e[1],t);return n&&ut(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=lt(e[r-1],e[r],t);return i&&ut(i,e[r-1],e[r-2],t)?e.slice(0,r):e}t(dt,`collapseOwnBorderStub`);function ft(e,t,n){let r=e;if(t){let e=Xe(r,0,1);if(e){let n=Ye(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=dt(r,t,!0)}if(n){let e=r.length-1,t=Xe(r,e,-1);if(t){let i=Ye(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=dt(r,n,!1)}let i=at(r,t,n);return i!==r||r.length===2?i:(t&&(r=ct(r,t,!0)),n&&(r=ct(r,n,!1)),r)}t(ft,`snapAndCollapseEndpoints`);function pt(e,t){for(let n of e){let e=Ge(n,t,2);if(!e)continue;let r=ft(G(e.points,J),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}t(pt,`prepareEdgeEndpointsForRenderer`);function mt(e){return new Map(e.map(e=>[e.id,e]))}t(mt,`buildNodeMap`);function ht(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}t(ht,`resolveTopLevelGroupId`);function gt(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}t(gt,`groupDepth`);function _t(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}t(_t,`boundsForChildren`);function vt(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}t(vt,`applyGroupBounds`);function yt(e){let t=mt(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>gt(n,t)-gt(e,t));for(let t of n){let n=_t(e.filter(e=>e.parentId===t.id));n&&vt(t,n)}}t(yt,`recomputeNestedGroupBounds`);function bt(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=t(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}t(bt,`mirrorAxis`);function xt(e){return(e.nodes??[]).some(e=>!e.isGroup)?bt(e,`y`):!0}t(xt,`applyBtDirectionTransform`);function St(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t<a&&(a=t),n<o&&(o=n)}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let s=0,c=0;for(let e of i)s+=e.width??0,c+=e.height??0;let l=s/i.length,u=c/i.length,d=u>0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}yt(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&bt(e,`x`),!0;let p=mt(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=ht(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=_t(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;e<g.length;e++){let t=g[e],n,r;if(n=e===0?t.contentTop-C:(g[e-1].contentBottom+t.contentTop)/2,e===g.length-1)r=t.contentBottom+C;else{let n=g[e+1];r=(t.contentBottom+n.contentTop)/2}let i=Math.max(0,r-n),a=(n+r)/2;t.lane.x=S,t.lane.y=a,t.lane.width=b,t.lane.height=i,t.lane.swimlaneContentTop=t.contentTop,t.lane.groupTitleRect={left:x,right:x+36,top:n,bottom:r}}return t===`RL`&&bt(e,`x`),!0}t(St,`applyLrDirectionTransform`);var Ct=1e-6,wt=8,Tt=[0,wt,-wt,2*wt,-2*wt];function Et(e,t){let{nodeInfoById:n,realNodeRects:r}=Ae(t);for(let t of e){if(t.isLayoutOnly)continue;let i=t.points;if(!i||i.length<4)continue;let a=be(G(i,Ct),Ct);if(!a)continue;let{p3:o}=a,s=a.kind===`HVH`,c=Ne(t,n,Ct);if(!c)continue;let{srcId:l,dstId:u,srcInfo:d,dstInfo:f,collinearX:p,collinearY:m}=c;if(p||m)continue;let h,g=d.rect;for(let n of Tt){let i,a,c;if(s){let e=f.cy>d.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+Ct||t>=g.right-Ct)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+Ct||t>=g.bottom-Ct)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=R(i,a,Ct),m=R(a,c,Ct);if(p&&m||!p&&q(i,a,r,[l],1)||!m&&q(a,c,r,[u],1))continue;let _=!p&&Ie(i,a,e,t,{epsilon:Ct,skipDegenerateOther:!0}),v=!m&&Ie(a,c,e,t,{epsilon:Ct,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}t(Et,`portSwapToLShape`);function Dt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=je(n.values());for(let o of e){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=G(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h<r)continue;let g=d.x-f.x,_=d.y-f.y;if(Math.hypot(g,_)<r)continue;let v=V(d,u,r),y=H(d,u,r),b=V(f,d,r),x=H(f,d,r);if(!(v&&x||y&&b))continue;let S=o.end,C=o.start,w=S?n.get(S):void 0;if(!w)continue;let T=w.x??0,E=w.y??0,D=K(w);if(!D)continue;let O,k;if(x){let e=_<0;O={x:T,y:f.y},k={x:T,y:e?D.bottom:D.top}}else{let e=g>0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(q(O,k,i,S?[S]:[],-2)||q(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&Se(O,t,2))continue}let A=t((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e<c.length-1;e++)j.add(A(c[e],c[e+1]));let ee=t((t,n)=>{for(let i of e){if(i===o||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i<e.length-1;i++){let a=e[i],o=e[i+1];if(!j.has(A(a,o))&&Le(t,n,a,o,r))return!0}}return!1},`segmentCrossesOtherEdge`);if(ee(O,k))continue;if(l-3>=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(q(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e<te.length-1;e++){let s=te[e],c=te[e+1],l=Math.hypot(c.x-s.x,c.y-s.y),u=B(s,c,r),d=z(s,c,r);(u&&l>=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}t(Dt,`collapseShortTerminalStub`);var Y=.001,X=8,Z=ye,Ot=t((e,t)=>z(e,t,Y)||B(e,t,Y),`orthogonallyAligned`);function kt(e,n){let r=t((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=t((e,t)=>{let i=G(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(Ot(l,u)&&(d=l),z(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(B(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=t((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&z(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&B(e.boundary,t.boundary,1),`sameTerminalFace`),s=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=X&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=t((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n<X)return!1;let r=e.rect.bottom-e.rect.top;return n<r||n>2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=t((e,n)=>{let r=G(e.edge.points??[]);if(r.length<2)return;let i=e.orientation===`V`?{x:e.boundary.x+n,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+n},a=e.orientation===`V`?{x:e.railEnd.x+n,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+n};if(!t(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?B(i,e.boundary,Y)&&i.x>=e.rect.left+1&&i.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?z(i,e.boundary,Y)&&i.y>=e.rect.top+1&&i.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=r.length>1&&R(r[1],e.railEnd,Y),n=r.slice(t?2:1),o=n[0];return o&&!Ot(o,a)?void 0:[i,a,...n]}let o=r.length>1&&R(r[r.length-2],e.railEnd,Y),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!Ot(c,a)))return[...s,a,i]},`shiftedCandidate`),u=t(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return B(f,p,Y)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||z(f,p,Y)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e<t.length&&!n;e++)for(let r=e+1;r<t.length&&!n;r++){let a=t[e],o=t[r];if(a.edge===o.edge||!(s(a,o)||c(a,o)))continue;let f=!s(a,o),p=[a,o].sort((e,t)=>{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of p){for(let r of d){let a=l(e,r);if(!a)continue;let o=i({...e.edge,points:a},e.atStart);if(!(!o||t.some(t=>t.edge!==e.edge&&(s(o,t)||f&&c(o,t))))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}t(kt,`separateSharedRenderedTerminalLanes`);function At(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=t((t,n)=>{let a=t.start,o=t.end,s=Z(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of Z(G(e)))if(ve(t,n,.5)>=X||Le(t.a,t.b,n.a,n.b,Y))return!1}}return!0},`candidateIsSafe`),o=t((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&z(n,a,Y)&&z(n,o,Y)&&z(r,i,Y)&&(r.x-n.x)*(a.x-i.x)<0,c=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&B(n,a,Y)&&B(n,o,Y)&&B(r,i,Y)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return G([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&H(o,l)&&z(n,o,Y)&&z(n,l,Y)&&z(i,a,Y)&&(i.x-r.x)*(o.x-a.x)<0,d=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&V(o,l)&&B(n,o,Y)&&B(n,l,Y)&&B(i,a,Y)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return G([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=G(n.points??[]);for(let r=0;r<=e.length-5;r++){let i=o(e,r);if(!(!i||!a(n,i))){n.points=i,t=!0;break}}if(t)break}if(!t)return}}t(At,`collapseRedundantRectangularDoglegs`);function jt(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=t((e,t)=>{let n=0;for(let r=0;r<a.length;r++){let i=Z(o(a[r],e,t));for(let s=r+1;s<a.length;s++){let r=Z(o(a[s],e,t));for(let e of i)for(let t of r)Le(e.a,e.b,t.a,t.b,Y)&&n++}}return n},`strictCrossingCount`),c=t(e=>{let t=Z(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?U(t.a.x,t.b.x,r.left,r.right)>=X&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:U(t.a.y,t.b.y,r.top,r.bottom)>=X&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=t((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=He(G(r));return Z(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=t((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Z(t);if(l.length!==t.length-1)return!1;for(let e of l)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Z(o(t)))if(ve(e,n,.5)>=X)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}t(jt,`liftObstacleHuggingSameSideRails`);function Mt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s<c))return{node:e,rect:i}},`topLaneTitleFor`),a=t((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=G(t.points??[]);for(let t of Z(e))for(let e of o)a(t,e.rect)&&(s=Math.max(s,e.rect.bottom-t.a.y+4))}if(!(s<=Y))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}t(Mt,`liftTopLaneTitleBandsAboveRails`);function Nt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o<a))return{node:e,rect:t}},`leftLaneTitleFor`),a=t((e,t)=>{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+Y||n>=t.right-Y?!1:U(e.a.y,e.b.y,t.top,t.bottom)>=X},`verticalSegmentIntersectsTitle`),o=t((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let t of e){if(t.isLayoutOnly)continue;let e=G(t.points??[]);for(let t of Z(e))for(let e of s)if(a(t,e.rect))c=Math.max(c,e.rect.right-t.a.x+4);else if(o(t,e.rect)){let n=Math.min(t.a.x,t.b.x);c=Math.max(c,e.rect.right-n+4)}}if(!(c<=Y))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}t(Nt,`shiftLeftLaneTitleBandsLeftOfRails`);function Pt(e,n){let{realNodeRects:r}=je(n.values()),i=e.filter(e=>!e.isLayoutOnly),a=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),o=t((e=new Map)=>{let t=0;for(let n=0;n<i.length;n++){let r=Z(a(i[n],e));for(let o=n+1;o<i.length;o++){let n=Z(a(i[o],e));for(let e of r)for(let r of n)Le(e.a,e.b,r.a,r.b,Y)&&t++}}return t},`crossingCount`),s=t((e=new Map)=>i.reduce((t,n)=>t+W(a(n,e)),0),`totalBends`),c=t(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!V(n,r,Y)&&!H(n,r,Y)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=t((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(V(r,i,Y))o={x:i.x,y:t.tailStart.y};else if(H(r,i,Y))o={x:t.tailStart.x,y:i.y};else return;let s=He(G([r,i,o,t.tailStart,t.terminal]));return Z(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=t((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Z(t))for(let t of Z(a(r,n)))if(ve(e,t,.5)>=X)return!0}return!1},`pathHasSharedTrack`),f=t((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=t(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a<t.length;a++)for(let u=a+1;u<t.length;u++){let d=t[a],p=t[u],m=c(d),h=c(p);if(!m||!h)continue;let g=l(d,h),_=l(p,m);if(!g||!_)continue;let v=new Map([[d,g],[p,_]]);if(!f(d,g,v)||!f(p,_,v))continue;let y=o(v),b=s(v);y>=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}t(Pt,`swapDestinationTerminalTailsToReduceCrossings`);function Ft(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),s=t((e=new Map)=>{let t=0;for(let n=0;n<a.length;n++){let r=Z(o(a[n],e));for(let i=n+1;i<a.length;i++){let n=Z(o(a[i],e));for(let e of r)for(let r of n)Le(e.a,e.b,r.a,r.b,Y)&&t++}}return t},`strictCrossingCount`),c=t((e=new Map)=>a.reduce((t,n)=>t+W(o(n,e)),0),`totalBends`),l=t(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=t((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=i<a-Y?`left`:i>o+Y?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=i<a-Y?`top`:i>o+Y?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=t(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Z(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=t((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&U(e.min,e.max,t.min,t.max)>=X,`railsInteract`),p=t(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=t(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord)<Y)||t.push(n.coord);for(;t.length<e.length;){let n=Math.min(...t),r=Math.max(...t),i=e[0].side;t.push(i===`left`||i===`top`?n-12*(e.length-t.length):r+12*(e.length-t.length))}return t},`uniqueCoordsFor`),h=t(e=>{let n=e.map(e=>e.coord),r=m(e),i=[];if(e.length<=6){let a=Array(r.length).fill(!1),o=[],s=t(()=>{if(o.length===e.length){o.some((e,t)=>Math.abs(e-n[t])>=Y)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++){let r=[...n];[r[e],r[t]]=[r[t],r[e]],i.push(r)}return i},`coordinateAssignmentsFor`),g=t((e,t)=>{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=He(G(t));if(Z(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=t(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Z(n))if(q(t.a,t.b,r,e,-2)||q(t.a,t.b,i,[],-2))return!1}for(let t=0;t<a.length;t++){let n=a[t],r=e.has(n),i=Z(o(n,e));for(let n=t+1;n<a.length;n++){let t=a[n];if(!r&&!e.has(t))continue;let s=Z(o(t,e));for(let e of i)for(let t of s)if(ve(e,t,.5)>=X)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}t(Ft,`reassignCrossingExternalRailChannels`);function It(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=t(e=>Z(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=t((e,t)=>{let n=0;for(let r=0;r<a.length;r++){let i=Z(o(a[r],e,t));for(let s=r+1;s<a.length;s++){let r=Z(o(a[s],e,t));for(let e of i)for(let t of r)Le(e.a,e.b,t.a,t.b,Y)&&n++}}return n},`strictCrossingCount`),l=t((e,t)=>{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&U(e.a.x,e.b.x,t.left,t.right)>=X}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&U(e.a.y,e.b.y,t.top,t.bottom)>=X}return!1},`segmentRunsAlongRectBorder`),u=t(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=t((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=V(n,r,Y)&&H(r,i,Y)&&V(i,a,Y),s=H(n,r,Y)&&V(r,i,Y)&&H(i,a,Y);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=z(n,a,Y)||B(n,a,Y)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>He(G(e))).filter(e=>{if(Z(e).length!==e.length-1||!e.some(e=>R(e,a,Y)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=t((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Z(t))if(q(e.a,e.b,r,s,-2)||q(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Z(t))for(let t of Z(o(n)))if(ve(e,t,.5)>=X)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=W(a,Y),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=W(h,Y),o=s(h);if(!(a<p||a===p&&o<m-Y)||!f(u,h,e))continue;let d=c(u,h);d>r||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}t(It,`shortcutRedundantOrthogonalJogs`);function Lt(e,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=e.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=t(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),f=t((e,t)=>{let n=0;for(let r of e)for(let e of t)Le(r.a,r.b,e.a,e.b,Y)&&n++;return n},`crossingCountBetweenSegments`),p=t((e,t)=>f(Z(e),Z(t)),`crossingCountBetweenPaths`),m=t((e=new Map)=>{let n=0,r=[],i=new Set,a=[],o=t(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let t=0;t<c.length;t++){let i=c[t],a=d(i,e);for(let s=t+1;s<c.length;s++){let t=c[s],l=p(a,d(t,e));l>0&&(n+=l,r.push({first:i,second:t,count:l}),o(i),o(t))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=t((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e<c.length;e++){let r=c[e],a=n.has(r),o=d(r,t);for(let r=e+1;r<c.length;r++){let e=c[r];!a&&!n.has(e)||(i+=p(o,d(e,t)))}}return e.count-r+i},`crossingCountWithReplacements`),g=t(e=>{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=t(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=t(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=t((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=t(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=t(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=t((e=new Map)=>c.reduce((t,n)=>t+W(d(n,e)),0),`totalBends`),C=t((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=t((e,t,n=new Map)=>{let r=Z(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Z(d(t,n)))if(ve(e,r,.5)>=X)return!0}return!1},`pathHasSegmentConflict`),T=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=t((e,t)=>{let n=He(G(t));Z(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=t(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=t((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=t((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ke(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=t((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=t((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=t(e=>{let t=new Set;return e.map(e=>G(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=t((e,t,n,r)=>{let i=[],a=Oe(e,t,n,r,20,Y);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=De(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),re=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=De(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),P=t(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=G(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return H(o,s,Y)?N(c,o,s,r):V(o,s,Y)&&re(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),ie=t(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=De(r,e);for(let n of o)s.push(...ne(t,e,De(a,n),n))}return s.push(...P(e)),s},`candidatePathsFor`),ae=t(()=>new Map(c.map(e=>[e,Z(d(e))])),`currentSegmentsByEdge`),oe=t((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Z(d(i));t.some(e=>a.some(t=>ve(e,t,.5)>=X))&&r.add(i)}return r},`sharedTrackConflictsFor`),se=t((e,t,n,r)=>{let i=new Set;return ie(e).map(e=>He(G(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Z(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Z(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:W(i,Y),totalBends:W(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:oe(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ce=t((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Z(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),le=t((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ue=t((e,t)=>e.segments.some(e=>t.segments.some(t=>ve(e,t,.5)>=X)),`candidatesShareTrack`),de=t((e,t,n,r)=>le(t,n.edge)&&le(r,e.edge)&&!ue(t,r),`pairCandidatesAreCompatible`),fe=t((e,t,n,r,i)=>{let a=ce(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),pe=t((e,t)=>e.crossings<t.crossings||e.crossings===t.crossings&&(e.bends<t.bends||e.bends===t.bends&&e.length<t.length),`pairScoreIsBetter`),F=t((e,t,n,r)=>{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!de(t,r,n,a))continue;let o=fe(e,t,r,n,a);o&&pe(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),I=t(e=>{let t=S(),n=C(),r=ae(),i=b(e),a=new Map(c.map(e=>[e,W(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=se(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e<r.length;e++){let t=r[e];for(let i=e+1;i<r.length;i++){let e=r[i];!n.has(t.edge)&&!n.has(e.edge)||(u=F(f,t,e,u))}}}return u.replacements.size>0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=W(d(o),Y);for(let c of ie(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=W(c,Y);l||u||(d<t||d===t&&f<s)&&(d>i||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=I(e);if(!o)return;for(let[e,t]of o)e.points=t}}t(Lt,`resolveRenderedOrthogonalCrossings`);var Rt=.001,zt=8;function Bt(e,n){let{nodeInfoById:r,realNodeRects:i}=Ae(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=t((e,t,n,r)=>{let i=[],a=Oe(e,t,n,r,20,Rt);return a&&i.push(a),t===r&&i.push(ke(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=t((e,t)=>{for(let n=0;n<e.length-1;n++){let r=e[n],a=e[n+1];if(q(r,a,i,t,1))return!0}return!1},`pathHitsNode`),l=t((t,n,r=!1)=>{let i=0,a=ye(t,Rt),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,c=t.end;if(!r&&o&&s&&(e===o||e===s||c===o||c===s))continue;let l=t.points;if(!(!l||l.length<2))for(let e of a)for(let t of ye(l,Rt)){if(Pe(e.a,e.b,t.a,t.b,Rt,Rt)){i++;continue}ve(e,t,Rt)>=zt&&i++}}return i},`pathConflictCount`),u=t((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r<s&&(o=`bottom`,s=r),i<s&&(o=`left`,s=i),a<s&&(o=`right`,s=a),o},`nearestSideOfRect`),d=new Map,f=t((e,t,n)=>{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let n=t.id??``,i=t.start,a=t.end;if(i){let t=r.get(i);t&&f(i,u(e[0],t),n)}if(a){let t=r.get(a);t&&f(a,u(e[e.length-1],t),n)}}let p=t((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let n=W(e,Rt);if(n<4)continue;let i=t.start,o=t.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=t.id??``,_=l(e,t,!0),v=l(e,t),y,b=_,x=n;for(let e of a){if(p(i,e,g))continue;let n=De(m,e);for(let r of a){if(p(o,r,g))continue;let a=De(h,r);for(let u of s(n,e,a,r)){if(c(u,[i,o]))continue;let e=W(u,Rt);if(_>0){let n=l(u,t,!0);if(n>b||n===b&&e>=x)continue;b=n,x=e,y=u;continue}l(u,t)>v||e<x&&(x=e,y=u)}}}if(y){t.points=y;let e=d.get(i);e&&d.set(i,e.filter(e=>e.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}t(Bt,`simplifyDetouredEdges`);var Q=.001,Vt=10,Ht=7;function Ut(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)<Q)){if(Math.abs(s)<=Q){let e=i.x+Math.sign(o)*Vt;return{left:Math.min(i.x,e),right:Math.max(i.x,e),top:i.y-Ht,bottom:i.y+Ht}}if(Math.abs(o)<=Q){let e=i.y+Math.sign(s)*Vt;return{left:i.x-Ht,right:i.x+Ht,top:Math.min(i.y,e),bottom:Math.max(i.y,e)}}return{left:Math.min(i.x,a.x),right:Math.max(i.x,a.x),top:Math.min(i.y,a.y),bottom:Math.max(i.y,a.y)}}}t(Ut,`markerClearanceRectFor`);function Wt(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),top:Math.min(e.top,e.bottom),bottom:Math.max(e.top,e.bottom)}}t(Wt,`normalizeRect`);function Gt(e,t){let n=G(t);return[Ut(n,!0),Ut(n,!1)].some(t=>t&&we(e,Wt(t)))}t(Gt,`labelOverlapsOwnMarker`);function Kt(e,n){let r=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let n=0;n<e.length-1;n++)r.push({edgeId:t.id,p1:e[n],p2:e[n+1]})}let i=[],a=[];for(let e of n.values()){let t=e.isGroup,n=e.parentId;if(t&&!n){let t=K(e);t&&a.push({id:e.id,rect:t});continue}if(t||e.isEdgeLabel)continue;let r=K(e);r&&i.push({nodeId:e.id,rect:r})}let o=t((e,t)=>{let n=Te(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&we(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=t((e,t)=>{let n=Te(t,3);for(let t of r)if(t.edgeId!==e&&xe(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=t((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=t(e=>{for(let{id:t,rect:n}of a)if(Ce(n,e))return t},`findContainingLane`),d=t((e,t)=>l.some(n=>n.labelId!==e&&we(t,n.rect)),`overlapsPlacedLabel`);for(let r of e){if(r.isLayoutOnly)continue;let e=r.labelNodeId;if(!e)continue;let i=n.get(e);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e<f.length-1;e++){let t=f[e],n=f[e+1],r=Math.abs(t.x-n.x),i=Math.abs(t.y-n.y);r<Q&&i<Q||r>=Q&&i>=Q||h.push({idx:e,length:r+i,orientation:r>=Q?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx<h.length-1):h,_=g.length>0?g:h,v=p>=m?`horizontal`:`vertical`,y=t(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=t((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=t((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=t((e,t)=>e.midX>=t.left-Q&&e.midX<=t.right+Q&&e.midY>=t.top-Q&&e.midY<=t.bottom+Q,`pointInsideRectInclusive`),E=t(e=>{let t=Ee(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=Ee(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=t((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=t((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+Q<n)return!1}if(e===x){let r=f[e.idx+1];if(D(e,t,r)+Q<n)return!1}return!0},`labelClearsTerminalEndpoints`),k=t(t=>{let n=y(t);for(let t of n)for(let n of S){let i=C(t,n);if(!O(t,i))continue;let a=E(i);if(a&&!Gt(a.rect,f)&&!d(e,a.rect)&&!c(e,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=t((t,n,i=!1)=>{let a=y(t);for(let t of a){let a={midX:t.midX,midY:t.midY};if(n&&!O(t,a))continue;let c=E(a);if(c&&!Gt(c.rect,f)&&!d(e,c.rect)&&!o(e,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.length<h.length?k(h):void 0)??A(h,!0)??A(h,!1)??A(h,!1,!0);if(j){i.x=j.anchor.midX,i.y=j.anchor.midY,i.parentId=j.laneId;let t=Ee(j.anchor.midX,j.anchor.midY,p,m),n=l.findIndex(t=>t.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}t(Kt,`anchorLabelsToPolyline`);var qt=1e-6,Jt=8/2,Yt=3;function Xt(e,t){return e<t?`${e}::${t}`:`${t}::${e}`}t(Xt,`pairKey`);function Zt(e,n){let{nodeInfoById:r,realNodeRects:i}=Ae(n),a=new Map;for(let e of n){let t=e.id;if(!e.isGroup&&e.isEdgeLabel){a.set(t,{w:e.width??0,h:e.height??0});continue}}let o=t((n,r,i,o)=>{let s=Xt(r,i),c=0,l=t(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,r=t.end;!e||!r||Xt(e,r)===s&&l(t.labelNodeId)}return c>0?c+Yt:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let n=t.points;if(!be(n,qt))continue;let a=Ne(t,r,qt);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(q(p,m,i,[s,c],1))continue;let h=o(t,s,c,d?`x`:`y`),g=h>Jt?h:Jt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!q(r,a,i,[s,c],1)&&!Ie(r,a,e,t,{epsilon:qt})){t.points=[r,a];break}}}}t(Zt,`straightenCollinearSiblingDetours`);function Qt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=je(n.values()),o=t((e,t)=>ye(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=t(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...o(n,G(e)))}return t},`allSegments`),c=t((e,t)=>e.horizontal&&t.horizontal?U(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?U(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=t((t,n)=>{let s=t.start,l=t.end,u=o(t,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=t.labelNodeId?[t.labelNodeId]:[];for(let e of u)if(q(e.a,e.b,i,d,-2)||q(e.a,e.b,a,f,-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of u)for(let i of o(n,G(e)))if(c(t,i)||Le(t.a,t.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=t((e,t)=>{let n=G(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=t((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=t(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=t((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return G([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=t((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return G([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=t((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;n<e.length&&!t;n++)for(let r=n+1;r<e.length&&!t;r++){let i=e[n],a=e[r];if(i.edge===a.edge||!c(i,a))continue;let o=[i,a].filter(e=>e.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}t(Qt,`nudgeSharedInteriorSubpaths`);function $t(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}t($t,`segmentsIntersect`);function en(e){let t=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!t.length)return i;let a=Me(t),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n<t.length-1;n++)if(xe(t[n],t[n+1],e,-1)){i.push({type:`edge-node-overlap`,edgeId:c,targetId:e.nodeId,detail:`segment ${n} passes through node "${e.nodeId}"`});break}}for(let e=0;e<t.length-1;e++)o.push({edgeId:c,start:n,end:r,p1:t[e],p2:t[e+1]})}let s=new Set;for(let e=0;e<o.length;e++)for(let t=e+1;t<o.length;t++){let n=o[e],r=o[t];if(n.edgeId!==r.edgeId&&!(n.start===r.start||n.start===r.end||n.end===r.start||n.end===r.end)&&$t(n.p1,n.p2,r.p1,r.p2)){let e=n.edgeId<r.edgeId?`${n.edgeId}|${r.edgeId}`:`${r.edgeId}|${n.edgeId}`;s.has(e)||(s.add(e),i.push({type:`edge-edge-crossing`,edgeId:n.edgeId,targetId:r.edgeId,detail:`edges "${n.edgeId}" and "${r.edgeId}" cross`}))}}if(i.length>0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,t=i.filter(e=>e.type===`edge-edge-crossing`).length;n.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${t} edge crossing(s)`);for(let e of i)n.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}t(en,`validateSwimlanesLayout`);function tn(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!St(e,n)||n===`BT`&&a.length>0&&!xt(e))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=He(Ve(t)))}Bt(i,r),Zt(i,r),Et(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Kt(i,o),Je(i,o),Dt(i,o),Qt(i,o),kt(i,o),At(i,o),jt(i,o),Pt(i,o);let s=t(()=>{Lt(i,o),Ft(i,o),It(i,o),Kt(i,o),pt(i,o),jt(i,o),Kt(i,o),pt(i,o)},`finalizeRenderedEdges`);s(),Qt(i,o),s(),Mt(i,o),Nt(i,o),Mt(i,o),Nt(i,o)}t(tn,`postProcessSwimlaneLayout`);function nn(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}t(nn,`normalizeGraph`);function rn(e,t){return e.edges.filter(e=>e.dst===t)}t(rn,`incoming`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}t(an,`buildSuccessorMap`);function on(e){let t=an(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}t(on,`buildSortedSuccessorMap`);function sn(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}t(sn,`buildInDegreeMap`);function cn(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}t(cn,`sortedZeroInDegreeNodes`);function ln(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}t(ln,`buildPredecessorSuccessorMaps`);function un(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}t(un,`buildLayersFromRanks`);function dn(e){let t=sn(e),n=cn(t),r=[],i=on(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e<n.length&&n[e]<r;)e++;n.splice(e,0,r)}}return r.length===e.nodes.length?r:null}t(dn,`topoSortIfAcyclic`);function fn(e){let t=new Map,n=0;for(let r of e)t.set(r,n),n++;return t}t(fn,`buildLayerIndex`);function pn(e){let n=Array(e.length),r=t((t,i)=>{if(i-t<=1)return 0;let a=t+i>>1,o=r(t,a)+r(a,i),s=t,c=a,l=t;for(;s<a||c<i;)c>=i||s<a&&e[s]<=e[c]?n[l++]=e[s++]:(n[l++]=e[c++],o+=a-s);for(let r=t;r<i;r++)e[r]=n[r];return o},`count`);return r(0,e.length)}t(pn,`countInversions`);function mn(e){let n=nn(e),r=new Map;for(let e of n.nodes)r.set(e,[]);for(let e of n.edges)r.get(e.src).push(e);for(let e of r.values())e.sort((e,t)=>e.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=t(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}t(mn,`removeCycles_DFS`);function hn(e){let n=new Map,r=t(t=>{if(n.has(t))return n.get(t);let i=e.nodeById.get(t);if(!i)return n.set(t,null),null;let a=i.parentId;if(!a)return n.set(t,null),null;let o=r(a)??a;return n.set(t,o),o},`resolve`);for(let t of e.nodes)r(t);return n}t(hn,`buildTopLaneMap`);function gn(e){let t=hn(e);return e=>t.get(e)??null}t(gn,`createTopLaneResolver`);function _n(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}t(_n,`buildTopLaneOrder`);function vn(e,t){let n=_n(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}t(vn,`resolveTopLaneOrder`);var yn={EPSILON:1e-6},bn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},xn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Sn(e,n){let r=nn(e),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=ln(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=dn(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=Cn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=wn(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=Tn(m),g=En(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=t(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}t(Sn,`buildDrivingTree`);function Cn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}t(Cn,`chooseParent`);function wn(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}t(wn,`buildAdjacency`);function Tn(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}t(Tn,`assignComponents`);function En(e){let n=new Map,r=new Map,i=[],a=[],o=0,s=t((t,c)=>{n.set(t,++o),r.set(t,o);for(let l of e.get(t)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(t)??0)&&(i.push([t,l]),r.set(t,Math.min(r.get(t)??o,n.get(l)??o))):(i.push([t,l]),s(l,t),r.set(t,Math.min(r.get(t)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(t)??0)&&a.push(Dn(t,l,i,a.length))))},`visit`);for(let t of e.keys())n.has(t)||s(t,null);return a}t(En,`computeBlocks`);function Dn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}t(Dn,`popBlock`);function On(e,n,r){let i=[...e.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e<o;e++)f[0][e]=s[e];for(let e=1;e<d;e++)for(let t=0;t<o;t++){let n=f[e-1][t];f[e][t]=n===-1?-1:f[e-1][n]}let p=t((e,t)=>{if(e===-1||t===-1)return-1;c[e]<c[t]&&([e,t]=[t,e]);let n=c[e]-c[t];for(let t=0;t<d;t++)if(n>>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let t of e.edges){let e=t.src,r=t.dst,i=n[e],o=n[r];if(i==null||o==null||(i>o&&([e,r]=[r,e],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(e),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e<o;e++)u.set(e,(u.get(e)??0)+1)}let h=new Map,g=t((e,t)=>{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=t(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}t(On,`computeSubtreeCrossCounts`);function kn(e,n,r){let i=new Map,a=t(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(An(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let t of e)a(t);return i}t(kn,`annotateMinimumLayers`);function An(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}t(An,`compareByRankThenId`);function jn(e,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=t(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let t of e)c(t);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}t(jn,`emitNodesInTreeOrder`);function Mn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}t(Mn,`deduplicateLayers`);function Nn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}t(Nn,`createChildOrderer`);function Pn(e,t,n){let r=Sn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=On(e,t,r),s=[...a].sort(An(t)),c=Nn(i,t,o,kn(s,i,t)),l=jn(s,e.nodes,t,c);return l=Mn(l),l}t(Pn,`buildMultitreeLayerOrder`);function Fn(e,t,n){let r=new Set(e),i=new Set(t),a=fn(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return pn(o)}t(Fn,`countCrossingsBetweenAdjacent`);function In(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t<c;t++)r.push({id:`${e.id}@${t}`,src:a,dst:o,ref:e.ref})}let i=0;for(let t=0;t+1<e.length;t++)i+=Fn(e[t],e[t+1],r);return i}t(In,`totalCrossings`);function Ln(e,t){let n={...t},{preds:r}=ln(e),i=gn(e),a=In(Pn(e,n,i),e.edges,n),o=bn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let t=0;t<o;t++){let t=!1,o=[...e.nodes].sort((e,t)=>(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=In(Pn(e,n,i),e.edges,n);u<a?(a=u,t=!0):n[s]=l}if(!t)break}return n}t(Ln,`optimizeRanksByCrossings`);function Rn(e,t){let n=gn(e),r=[...e.nodes].sort((e,n)=>(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}t(Rn,`adjustCrossLaneSources`);function zn(e,t){let n=nn(e),r=dn(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=gn(n),o=Object.create(null);for(let e of r){let r=rn(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r?!0:n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=Ln(n,o)),t?.ignoreCrossLaneEdges&&Rn(n,o),{layers:Pn(n,o,a),rankOf:o,dummy:new Set}}t(zn,`assignLayers_LongestPath`);function Bn(e,n){let r=nn(e),i={...zn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=gn(r),{preds:o,succs:s}=ln(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=dn(r)??[...r.nodes],l=[...c].reverse(),u=t((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=bn.GRAVITY_ITERATIONS,f=t(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=u(n,Math.round((a+c)/2));l!==i[n]&&(i[n]=l,t=!0)}return t},`relaxOrder`);for(let e=0;e<d;e++){let e=f(c),t=f(l);if(!e&&!t)break}for(let e of c){let t=0;for(let n of o.get(e)??[])t=Math.max(t,(i[n]??0)+1);(i[e]??0)<t&&(i[e]=t)}for(let e of l){let t=s.get(e)??[];if(t.length>0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:un(r,c,i),rankOf:i,dummy:new Set}}t(Bn,`assignLayers_Gravity`);function Vn(e){let t=sn(e),n=on(e),r=cn(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}t(Vn,`topoSortByGenerationIfAcyclic`);function Hn(e,n){let r=nn(e),i=n?.direction===`LR`?Vn(r)??[...r.nodes].sort():dn(r)??[...r.nodes].sort(),a=gn(r),o=t(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=t((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=rn(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:un(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}t(Hn,`assignLayers_LaneAwareCompact`);function Un(e,n){let r=nn(n),{rankOf:i}=e,a=e.layers.map(e=>[...e]),o=new Set(e.dummy?[...e.dummy]:[]),s=0,c=new Map(r.nodeById),l=t(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i<n;i++,a++){let t=l(i);d.push({id:`${e.id}#${a}`,src:r,dst:t,weight:e.weight,ref:e.ref}),r=t}let a=n-t-2;d.push({id:`${e.id}#${Math.max(a+1,0)}`,src:r,dst:e.dst,weight:e.weight,ref:e.ref})}let f={nodes:[...r.nodes,...[...o].filter(e=>!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}t(Un,`makeProperLayering`);function Wn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}t(Wn,`median`);function Gn(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}t(Gn,`barycenter`);function Kn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}t(Kn,`neighborPositionsFor`);function qn(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}t(qn,`currentOrderTieBreak`);function Jn(e,t,n){let r=new Set(e),i=new Set(t),a=fn(e),o=fn(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),pn(s.map(e=>e.v))}t(Jn,`countCrossingsBetweenAdjacent`);function Yn(e,t,n){return[...e].sort((e,r)=>{let i=Wn(t.get(e)??[]),a=Wn(t.get(r)??[]);return i===a?qn(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}t(Yn,`sortByHeuristic`);function Xn(e,t,n,r,i,a){let o=fn(e),s=fn(t),c=Kn(t,o,n,r);if(!i||!a||a.length===0)return Yn(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=Yn(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=Yn(d,c,s);for(let t of e){let e=Gn(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(e<Gn(c.get(r)??[])){n=t;break}}u.splice(n,0,t)}}return u}t(Xn,`reorderLayer`);function Zn(e,n,r,i,a){let o=[...n],s=new Set(e),c=new Set(n),l=i?new Set(i):null,u=r.filter(e=>s.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=t(t=>{let n=Jn(e,t,u);return d&&i&&(n+=Jn(t,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1<o.length;e++){if(p&&p.get(o[e])!==p.get(o[e+1]))continue;let t=h;[o[e],o[e+1]]=[o[e+1],o[e]];let n=f(o);n<t?(h=n,m=!0):[o[e],o[e+1]]=[o[e+1],o[e]]}}return o}t(Zn,`transposeImprove`);function Qn(e,t,n){let r=e.layers.map(e=>[...e]),i=t.edges,a=gn(t),o=vn(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e<r.length;e++)r[e]=Xn(r[e-1],r[e],i,`down`,a,o),r[e]=Zn(r[e-1],r[e],i,r[e+1],a);for(let e=r.length-2;e>=0;e--)r[e]=Xn(r[e+1],r[e],i,`up`,a,o),r[e]=Zn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}t(Qn,`orderLayers`);function $n(e,n,r){let i=r?.layerGap??xn.DEFAULT_LAYER_GAP,a=r?.nodeGap??xn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=t(e=>n.nodeById.get(e),`getNode`),p=t(e=>f(e)?.width??0,`getWidth`),m=t(e=>f(e)?.height??0,`getHeight`),h=gn(n),g=vn(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1<l.length;e++){let t=l[e].reduce((e,t)=>Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;n<S.length;n++){let r=S[n],i=e[n]??0,a=t+i/2;w.set(r,a),t+=i,n<S.length-1&&(t+=o)}}let T=0;for(let[e,t]of l.entries()){let n=_[e]??0,r=new Map;for(let e of t){let t=h(e),n=r.get(t)??[];n.push(e),r.set(t,n)}for(let e of S){let t=r.get(e)??[];if(t.length===0)continue;let i=w.get(e);if(t.length===1){let e=t[0];u[e]=i,d[e]=T+n/2}else{let e=t.map(e=>p(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}t($n,`assignCoordinates`);var er=8;function tr(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}t(tr,`hashString`);function nr(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}t(nr,`mulberry32`);function rr(e,t){let n=[...e],r=nr(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}t(rr,`deterministicShuffle`);function ir(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}t(ir,`sourceDistance`);function ar(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}t(ar,`laneArrangementCost`);function or(e){let t=_n(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=gn(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}t(or,`buildWeightedLaneEdges`);function sr(e,t,n){let r=[...e],i=ar(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&o<s;){a=!1,o++;for(let e=0;e+1<r.length;e++){[r[e],r[e+1]]=[r[e+1],r[e]];let n=ar(r,t);n<i?(i=n,a=!0):[r[e],r[e+1]]=[r[e+1],r[e]]}}return{order:r,cost:i,sourceDistance:ir(r,n)}}t(sr,`greedySwitch`);function cr(e,t){return e.cost===t.cost?e.sourceDistance<t.sourceDistance:e.cost<t.cost}t(cr,`isBetterCandidate`);function lr(e,t,n){let r=[...t].sort((e,t)=>e.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return tr(`${e.join(`|`)}#${r}#${n}`)}t(lr,`seedForRestart`);function ur(e,t={}){let n=_n(e);if(n.length<2)return n;let r=or(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=sr(n,r,i),o=Math.max(0,t.restarts??er);for(let e=0;e<o;e++){let t=sr(rr(n,lr(n,r,e)),r,i);cr(t,a)&&(a=t)}return a.order}t(ur,`optimizeTopLaneOrder`);function dr(e,t){let n=t?.ignoreCrossLaneEdges??!0,r=t?.optimizeRanksByCrossings??!0,i=nn(e),a=t?.automaticLaneOrdering?ur(i,{restarts:er}):void 0,o=mn(i),s=o.acyclic,{layering:c,graphWithDummies:l}=Un(n?Hn(s,{compactSingleInput:t?.compactSingleInput??bn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:t?.direction}):Bn(s,{compactSingleInput:t?.compactSingleInput??bn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:r}),s),u=Qn(c,l,{laneOrder:a}),d=$n(u,l,{layerGap:t?.layerGap,nodeGap:t?.nodeGap,direction:t?.direction,laneOrder:a});return{acyclic:s,reversed:o.reversed,layering:c,ordered:u,coordinates:d}}t(dr,`sugiyamaLayout`);var $=yn.EPSILON,fr=8,pr=15,mr=15,hr=25,gr=20,_r=10;function vr(e,t,n){let r=e.x??0,i=e.y??0,a=t.x-r,o=t.y-i,s=Math.abs(a),c=Math.abs(o);return s<$&&c<$?n:c>$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}t(vr,`chooseOrthogonalSide`);function yr(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}t(yr,`sharedLineEndpointCoord`);function br(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}t(br,`pointOnLine`);function xr(e,n){let r=e.nodes??[],i=e.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let e of u){let n={id:e.id},i=t(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(e)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=fr;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=t((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=t((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=t((e,t,n)=>p(e,vr(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=t((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coord<i||t.pipe.coord>o||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coord<i||t.pipe.coord>o||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=t((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minY<e.y&&c.maxY>e.y&&c.maxX>i&&c.minX<a:c.minX<e.x&&c.maxX>e.x&&c.maxY>o&&c.minY<s)},`isSegmentBlocked`),S=new Map,C=new Map;for(let e of a)!e.start||!e.end||e.start===e.end||(C.set(e.start,(C.get(e.start)??0)+1),C.set(e.end,(C.get(e.end)??0)+1));let w=t((e,t)=>vr(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=t((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t<e.length;t++){let n=e[t],r=D(n),i=k.get(A(n.srcId,n.srcSide))??0,a=k.get(A(n.srcId,r))??0;a>=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=t(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=t(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=t((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=t((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),re=t((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of b){let n=a[e];if(g[e]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=re(e,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+gr:s.y-gr:v.x=s.x>(r.x??0)?s.x+gr:s.x-gr,T?b.y=u.y>(i.y??0)?u.y+gr:u.y-gr:b.x=u.x>(i.x??0)?u.x+gr:u.x-gr;let E=t((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.x<n.maxX&&e.y>n.minY&&e.y<n.maxY)return{inside:!0,obstacle:n};return{inside:!1}},`isPointInObstacle`),D=t((e,t,n,r,i)=>{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+pr:r.minX-pr,y:i?r.maxY+mr:r.minY-mr,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+pr:r.minX-pr,y:o?r.maxY+mr:r.minY-mr,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+gr):Math.max(e.maxY+2,s.y-gr);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+gr):Math.max(e.maxX+2,s.x-gr);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let t=pr,r=Math.abs(v.x-b.x)<t,i=Math.abs(v.y-b.y)<t,a=te.get(`${e}:src`)!==void 0||te.get(`${e}:dst`)!==void 0,o=(S.get(`${n.start??``}:${p}:src`)?.length??0)+(S.get(`${n.start??``}:${p}:dst`)?.length??0),c=(S.get(`${n.end??``}:${m}:src`)?.length??0)+(S.get(`${n.end??``}:${m}:dst`)?.length??0),l=o>1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(e);let t=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${t}-${r.toFixed(0)}-${e}`,orientation:t,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:e,segmentIndex:0,orientation:t,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,P=Math.min(v.y,b.y)-50,ie=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minX<n&&e.maxX>t&&e.minY<i&&e.maxY>r&&(M=Math.min(M,e.minX-hr),N=Math.max(N,e.maxX+hr),P=Math.min(P,e.minY-hr),ie=Math.max(ie,e.maxY+hr))}for(let e of d){if(e.maxX<M||e.minX>N||e.maxY<P||e.minY>ie)continue;let t=pr;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=mr;f(`vertical`,e.minX-n,P,ie),f(`vertical`,e.maxX+n,P,ie)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let ae=c.filter(e=>e.orientation===`horizontal`&&e.coord>=P&&e.coord<=ie),oe=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),se=t((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),ce=se(v.x,v.y),le=se(b.x,b.y),ue=new Map,de=new Map,fe=new Map,pe=new Set,F=[];ue.set(ce,0),fe.set(ce,`n`),F.push({key:ce,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),pe.add(ce);let I=[],me=t((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),he={x:b.x,y:v.y},L=me(v,he),ge=me(he,b),_e=L||ge,R={x:v.x,y:b.y},z=me(v,R),B=me(R,b);if(_e?z||B||(I=Math.abs(v.x-b.x)<$?[v,b]:[v,R,b]):I=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,he,b],I.length===0)for(;F.length>0;){F.sort((e,t)=>e.f-t.f);let t=F.shift();if(pe.delete(t.key),t.key===le){let e=le,t=b;for(I=[t];de.has(e);){let n=de.get(e);I.unshift(n),t=n,e=se(n.x,n.y)}break}let r=t.pt.x,i=t.pt.y,a=oe.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=ae.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o<a.length-1&&l.push({x:a[o+1].coord,y:i}),c>0&&l.push({x:r,y:s[c-1].coord}),c>=0&&c<s.length-1&&l.push({x:r,y:s[c+1].coord});for(let a of l){let o=Math.min(r,a.x),s=Math.max(r,a.x),c=Math.min(i,a.y),l=Math.max(i,a.y);if(d.some(e=>e.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minX<r&&e.maxX>r&&e.maxY>c&&e.minY<l:e.minY<i&&e.maxY>i&&e.maxX>o&&e.minX<s))continue;let u=se(a.x,a.y),f=Math.abs(a.x-r)+Math.abs(a.y-i),p=y(e,t.pt,a),m=0,h=b.x-v.x,g=b.y-v.y,_=a.x-r,x=a.y-i;(g>10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=fe.get(t.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(ue.get(t.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(ue.get(u)??1/0))if(de.set(u,t.pt),ue.set(u,E),fe.set(u,w),!pe.has(u))F.push({key:u,f:E+D,pt:a}),pe.add(u);else{let e=F.findIndex(e=>e.key===u);e!==-1&&(F[e].f=E+D)}}}if(I.length===0&&(I=[v,{x:v.x,y:b.y},b]),I.length>4){let e=I[0],n=I[I.length-1],r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),a=Math.min(e.y,n.y),o=Math.max(e.y,n.y);for(let e of I)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(e.x,n.x),c=r<Math.min(e.x,n.x);if(l){let t=mr;if(s){let r=Math.max(e.x,n.x),a=Math.min(e.y,n.y),o=Math.max(e.y,n.y),s=d.filter(e=>e.minX<r&&e.maxX>r&&e.minY<o&&e.maxY>a);if(s.length>0){let r=Math.max(e.x,n.x);for(let e of s){let n=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let i=n+e.visualXHalfExtent+t;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minX<Math.min(e.x,n.x)+t&&r.minY<Math.max(e.y,n.y)&&r.maxY>Math.min(e.y,n.y));if(i.length>0){let a=Math.min(e.x,n.x);for(let e of i){let n=(e.minX+e.maxX)/2-e.visualXHalfExtent-t;a=Math.min(a,n)}r=a}}}let u=t(t=>{let r=n.y>e.y,i=d.filter(t=>{let r=Math.min(e.x,n.x)<t.maxX&&Math.max(e.x,n.x)>t.minX,i=Math.min(e.y,n.y)<t.maxY&&Math.max(e.y,n.y)>t.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minX<t&&e.maxX>t);e.length>0&&(a=e)}if(a.length===0)return n.y;let o=pr;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(e<n.y-$)return e}else{let e=Math.min(...a.map(e=>e.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=t(t=>{let r=u(t),i={x:t,y:e.y},a={x:t,y:r},o={x:n.x,y:r},s=me(e,i),c=me(i,a),l=me(a,o),d=r===n.y?!1:me(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[e,i,a,n]:[e,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(I=p)}let V=[s,...O,...I,...j.reverse(),u];if(V.length>=3){let e=V[V.length-1],t=V[V.length-2],n=V[V.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&V.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&V.splice(-2,1)}}let H=[V[0]];for(let e=1;e<V.length-1;e++){if(e===1){H.push(V[e]);continue}let t=H[H.length-1],n=V[e],r=V[e+1];if(Math.abs(t.y-n.y)<$&&Math.abs(n.y-r.y)<$){if(n.x>t.x!=r.x>n.x){H.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){H.push(n);continue}continue}H.push(n)}H.push(V[V.length-1]);for(let t=0;t<H.length-1;t++){let n=H[t],r=H[t+1],i=Math.abs(n.x-r.x)<$?`vertical`:`horizontal`,a=i===`vertical`?n.x:n.y,o=i===`vertical`?Math.min(n.y,r.y):Math.min(n.x,r.x),s=i===`vertical`?Math.max(n.y,r.y):Math.max(n.x,r.x),c=f(i,a,o,s),l={edgeIndex:e,segmentIndex:t,orientation:i,pipe:c,trackIndex:0,from:o,to:s};h.push(l),g[e].push(h.length-1),c.tracks[0]||(c.tracks[0]={index:0,coord:c.coord,segments:[]}),c.tracks[0].segments.push({edgeIndex:e,segmentIndex:t,from:o,to:s})}}let P=t((e,t)=>e.from<t.to&&t.from<e.to,`segmentsOverlap`),ie=t((e,t,n,r)=>{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&P(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&P(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),ae=t(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),oe=t((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),se=t((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&oe(n,t)}},`moveSegmentChainToTrack`),ce=t(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n<t.length-1&&r.push(h[t[n+1]]),r},`getAdjacentSegmentsAlongEdge`),le=t((e,t)=>{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coord<n.to&&n.pipe.coord>r.from&&n.pipe.coord<r.to},`haveAnyCrossing`),ue=t((e,t)=>{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&P(e,t)))return n.index;return-1},`findAvailableTrack`),de=t((e,t)=>{if(e.trackIndex===t.trackIndex)return P(e,t);let n=ce(e),r=ce(t);return n.some(e=>r.some(t=>le(e,t)))},`segmentsConflict`),fe=t((e,t,n)=>{if(ie(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ue(e.pipe,t);n(t,r===-1?ae(e.pipe):r)},`resolveTrackConflict`),pe=t(e=>{let t=0;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++){let i=e[n],a=e[r];i.pipe===a.pipe&&de(i,a)&&(t++,fe(i,a,se))}return t},`resolveHandleConflicts`),F=new Map,I=t(e=>{if(F.has(e))return F.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return F.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;e<t.length;e++){let i=h[t[e]];if(i.orientation===`horizontal`){let e=i.from,t=i.to;r=Math.abs(e-n)>Math.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return F.set(e,a),a},`getDestInfo`),me=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=t(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let t of n.values()){t.sort((e,t)=>{let n=I(e),i=I(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=t.map(e=>h[g[e][0]]);e+=pe(n)}return e},`fixSourceHandleCrossings`),he=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((e,n)=>{let r=t(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(e),a=r(n);return Math.abs(i-a)>.1?i-a:e-n});let n=r.map(e=>h[g[e][g[e].length-1]]);e+=pe(n)}return e},`fixTargetHandleCrossings`),L=t(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],a=n[r];de(i,a)&&(e++,fe(i,a,oe))}}return e},`fixPipeCrossings`),ge=0;for(;ge<10;){let e=0;if(e+=me(),e+=he(),e+=L(),e===0)break;ge++}let _e=new Map;for(let e of c){let n=[];e.tracks.forEach(e=>{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;i<n.length;i++){let a=n[i];a.from<t?(e.push(a),t=Math.max(t,a.to)):(r.push(e),e=[a],t=a.to)}r.push(e)}for(let n of r){let r=new Set;n.forEach(e=>r.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=I(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=t((t,r)=>{n.filter(e=>e.trackIndex===t).forEach(t=>{let n=_.has(t.edgeIndex)?e.coord:r;_e.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of a)l++,c(t,e.coord-l*_r);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let t of s){if(u===0)c(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(t,e.coord+n*r*_r*.5)}u++}let d=0;for(let t of o)d++,c(t,e.coord+d*_r)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=re(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=_e.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e<s.length;e++){let t=s[e],n=r[r.length-1],i=t.orient===`vertical`?n.y:n.x,a=t.orient===`vertical`?n.x:n.y,o=s[e+1],c=e<s.length-1;if(Math.abs(a-t.coord)>$&&r.push(br(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:yr(t,o);r.push(br(t,e),br(o,e))}else(e===0||e===s.length-2)&&r.push(br(t,yr(t,o)));else if(c)r.push(br(t,o.coord));else{let e=Math.abs(t.from-i)<Math.abs(t.to-i)?t.to:t.from;r.push(br(t,e))}}let c=r[r.length-1];(Math.abs(c.x-a.x)>$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e<r.length;e++){let t=r[e],n=l[l.length-1];(Math.abs(t.x-n.x)>$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let R=t((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.x<o||e.x>s||e.y<c||e.y>l)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(e[0]=R(e[0],i)),a&&(e[e.length-1]=R(e[e.length-1],a))}return e}t(xr,`routeEdgesOrthogonal`);function Sr(e){return e.direction??`TB`}t(Sr,`getSwimlaneDirection`);function Cr(e){let t=F(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=Sr(e),{ordered:c,coordinates:l}=dr(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});I(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;xr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return tn(e,s),en(e),s}t(Cr,`runSwimlaneLayoutCore`);async function wr(e,t){let n=t.select(`g`);h(n,e.markers,e.type,e.diagramId),p(),b(),m(),l(),pe(e);let r=he(e);e.nodes=r.nodes,e.edges=r.edges;let{groups:i}=await x(n,e);Cr(e),await oe(e,i)}t(wr,`render`);export{wr as render};
@@ -0,0 +1 @@
1
+ import"./DNzq6p3w.js";import{o as e}from"./BBJaonHc.js";export{e as createTreemapServices};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./BWPyau1x.js";import{t as n}from"./BifhSqXX2.js";import{rt as r}from"./CFMX0wTB2.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};