@kabmo-labs/kabmo 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +601 -557
  3. package/dist/client/static/js/{Body-9h5hd351.js → Body-pd3nt4xa.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-s05k1q18.js → CsvGrid-eksmqv8f.js} +2 -2
  5. package/dist/client/static/js/{DocxView-x6sjw5ht.js → DocxView-xfx1kt8x.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-jashn8sf.js → DrawioView-2xyqg9bv.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-eygzgtyc.js → HtmlPreview-ps3f0aa5.js} +1 -1
  8. package/dist/client/static/js/ImageView-7vse3k6x.js +1 -0
  9. package/dist/client/static/js/{LayoutWrapper-tag0qpts.js → LayoutWrapper-qdp83fps.js} +2 -2
  10. package/dist/client/static/js/MergeDiffView-hzsccppq.js +1 -0
  11. package/dist/client/static/js/Modal-zw9x5b6f.js +60 -0
  12. package/dist/client/static/js/{PdfView-syhjmyqf.js → PdfView-8fp08jym.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-2r1grxxs.js → SessionsView-qmgg03fv.js} +1 -1
  14. package/dist/client/static/js/{SheetView-26r0e506.js → SheetView-g7mstjdp.js} +22 -22
  15. package/dist/client/static/js/{SvgPreview-2fk85jzz.js → SvgPreview-wsv4h6c6.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-fdka7pxr.js → abnfDiagram-O67JEVCF-1kgm1049.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +1 -0
  18. package/dist/client/static/js/architectureDiagram-NJMV4G6O-mtm210rw.js +36 -0
  19. package/dist/client/static/js/{astro-rn2bvwpm.js → astro-dszrfwwn.js} +1 -1
  20. package/dist/client/static/js/bash-z5pe89pt.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-vpcmd3vx.js → blockDiagram-BEXU5L5S-s474vn2w.js} +8 -8
  22. package/dist/client/static/js/c-fy0fysfw.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-1rgpdnbq.js → c4Diagram-YGBWAQC7-s68v6tc8.js} +3 -3
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fbsejvb9.js → classDiagram-v2-NBCMYWYE-291va3yk.js} +10 -10
  25. package/dist/client/static/js/cose-bilkent-JH36ORCC-0zg7crdw.js +1 -0
  26. package/dist/client/static/js/cpp-wam8dze6.js +1 -0
  27. package/dist/client/static/js/css-ke51m4kc.js +1 -0
  28. package/dist/client/static/js/css-yryw442h.js +1 -0
  29. package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +1 -0
  30. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-7ta5vbrw.js → cynefinDiagram-VND7K2PF-4gnmn3yc.js} +2 -2
  31. package/dist/client/static/js/{dagre-6A5THRUB-b8gtt32x.js → dagre-6A5THRUB-nxmj6bkg.js} +2 -2
  32. package/dist/client/static/js/{diagram-22UHCM2B-7emepy7h.js → diagram-22UHCM2B-3171dabw.js} +25 -25
  33. package/dist/client/static/js/{diagram-3UASUU5V-06nptkzc.js → diagram-3UASUU5V-9h1pd6h8.js} +2 -2
  34. package/dist/client/static/js/{diagram-ATOU4E4O-t113exk3.js → diagram-ATOU4E4O-ywfrbd6m.js} +3 -3
  35. package/dist/client/static/js/{diagram-CDSNMT55-pyj3x97y.js → diagram-CDSNMT55-t87b4wbk.js} +3 -3
  36. package/dist/client/static/js/{diagram-MLGK6HIB-183sgpjh.js → diagram-MLGK6HIB-bzv52p97.js} +2 -2
  37. package/dist/client/static/js/{diagram-MPIPVDR6-fmbj4hcx.js → diagram-MPIPVDR6-8f66rp0a.js} +2 -2
  38. package/dist/client/static/js/{dockerfile-qay672za.js → dockerfile-z3v0km9v.js} +1 -1
  39. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-eafvfws2.js → ebnfDiagram-ZINNZB2B-3y4w2j6t.js} +1 -1
  40. package/dist/client/static/js/{elixir-t8bep87c.js → elixir-c701n0qg.js} +1 -1
  41. package/dist/client/static/js/{elk-276RUBZZ-573f1vfs.js → elk-276RUBZZ-d9d23jch.js} +1 -1
  42. package/dist/client/static/js/{erDiagram-OPXOYQCR-4z1r88ej.js → erDiagram-OPXOYQCR-w4z3501c.js} +12 -12
  43. package/dist/client/static/js/{erlang-261km7r1.js → erlang-cpw5s1f9.js} +1 -1
  44. package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +1 -0
  45. package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +1 -0
  46. package/dist/client/static/js/ganttDiagram-FUAMR5RP-7wcxk4bm.js +292 -0
  47. package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +1 -0
  48. package/dist/client/static/js/gitGraphDiagram-X574FWY7-sdh1hsb1.js +106 -0
  49. package/dist/client/static/js/graphql-0yv8dc1v.js +1 -0
  50. package/dist/client/static/js/html-zk3m0az9.js +1 -0
  51. package/dist/client/static/js/{index-c3whkrwa.js → index-09ap9ncj.js} +30 -30
  52. package/dist/client/static/js/index-0ff2x5g9.js +1 -0
  53. package/dist/client/static/js/{index-gg910gpv.js → index-0q39ajgh.js} +2 -2
  54. package/dist/client/static/js/{index-tb35a328.js → index-144aknp3.js} +2 -2
  55. package/dist/client/static/js/index-17jy16v3.js +314 -0
  56. package/dist/client/static/js/{index-j37m7pn9.js → index-1adfks1n.js} +1 -1
  57. package/dist/client/static/js/{index-4dnc1kys.js → index-1d8v3bvm.js} +2 -2
  58. package/dist/client/static/js/index-1dx4dqzy.js +4 -0
  59. package/dist/client/static/js/{index-a4636gt1.js → index-1ec33b1j.js} +2 -2
  60. package/dist/client/static/js/{index-gr8sqjpz.js → index-1jx4nt2f.js} +1 -1
  61. package/dist/client/static/js/{index-80fjn77c.js → index-1kjgdyfk.js} +2 -2
  62. package/dist/client/static/js/{index-h8hjcdj1.js → index-1vfej0gk.js} +2 -2
  63. package/dist/client/static/js/{index-wbsvg1d9.js → index-2g1ey1c9.js} +2 -2
  64. package/dist/client/static/js/{index-bmaktvm2.js → index-3rhk4apq.js} +1 -1
  65. package/dist/client/static/js/{index-2yzt8h3d.js → index-4vaxdt8a.js} +2 -2
  66. package/dist/client/static/js/{index-fbg5vhhw.js → index-4z3qtazf.js} +2 -2
  67. package/dist/client/static/js/{index-taev57jw.js → index-56319bht.js} +2 -2
  68. package/dist/client/static/js/{index-yg083mk0.js → index-5qwgexg6.js} +6 -6
  69. package/dist/client/static/js/index-779rptb2.js +1 -0
  70. package/dist/client/static/js/{index-4z5ram7g.js → index-7jdz4jr4.js} +2 -2
  71. package/dist/client/static/js/{index-2bf0txsp.js → index-7xn7gxgw.js} +2 -2
  72. package/dist/client/static/js/{index-ykc14gez.js → index-8fk7h2me.js} +5 -5
  73. package/dist/client/static/js/{index-dh060b7r.js → index-971stdh4.js} +2 -2
  74. package/dist/client/static/js/{index-t522tpxt.js → index-9jrej3ht.js} +3 -3
  75. package/dist/client/static/js/index-9ydvkxz1.css +1 -0
  76. package/dist/client/static/js/{index-473hk8nb.js → index-ajdzvegm.js} +9 -9
  77. package/dist/client/static/js/{index-nzvte8s5.js → index-ajqmcds5.js} +2 -2
  78. package/dist/client/static/js/{index-5p8dwr4y.js → index-ap6hv7s7.js} +1 -1
  79. package/dist/client/static/js/{index-0857zpr0.js → index-aqqj4xxy.js} +2 -2
  80. package/dist/client/static/js/index-bczhbk01.js +2 -0
  81. package/dist/client/static/js/{index-z6y8j93w.js → index-bggz63br.js} +7 -7
  82. package/dist/client/static/js/{index-qwxawph7.js → index-c2mqr5fh.js} +2 -2
  83. package/dist/client/static/js/{index-4ccs971z.js → index-cm8pa783.js} +2 -2
  84. package/dist/client/static/js/{index-7rmps91t.js → index-dgkpbrdr.js} +2 -2
  85. package/dist/client/static/js/{index-epzvftkq.js → index-e471eprg.js} +1 -1
  86. package/dist/client/static/js/{index-14dgbjsm.js → index-evvmkk2f.js} +1 -1
  87. package/dist/client/static/js/{index-rz0tz4hg.js → index-frhxbqhg.js} +1 -1
  88. package/dist/client/static/js/{index-1p880x6e.js → index-gcgsjd3c.js} +2 -2
  89. package/dist/client/static/js/{index-s5vegk6q.js → index-grkacfv3.js} +2 -2
  90. package/dist/client/static/js/{index-7ff9scbm.js → index-gws4prmg.js} +2 -2
  91. package/dist/client/static/js/index-hqhz4eam.js +1 -0
  92. package/dist/client/static/js/{index-pv4z2mp2.js → index-jr6q69r3.js} +181 -179
  93. package/dist/client/static/js/{index-dmc82cxb.js → index-jxxewcat.js} +2 -2
  94. package/dist/client/static/js/{index-gz7kvpnm.js → index-k3vvk28c.js} +1 -1
  95. package/dist/client/static/js/{index-yyjw1ty9.js → index-k66w6d9b.js} +2 -2
  96. package/dist/client/static/js/{index-1yq96wpa.js → index-kce86cnw.js} +2 -2
  97. package/dist/client/static/js/{index-zp40g8ah.js → index-n54jd3aw.js} +12 -12
  98. package/dist/client/static/js/{index-pygy21w5.js → index-nnqyew8n.js} +2 -2
  99. package/dist/client/static/js/index-qaxjp73x.js +2 -0
  100. package/dist/client/static/js/{index-5dn4159w.js → index-qxzyvye9.js} +2 -2
  101. package/dist/client/static/js/{index-5ztdqm1w.js → index-r2z0a118.js} +2 -2
  102. package/dist/client/static/js/{index-7dqq7cjp.js → index-r6bm9sth.js} +7 -7
  103. package/dist/client/static/js/{index-e8mt8rag.js → index-ratbr10x.js} +2 -2
  104. package/dist/client/static/js/{index-xw1bptp5.js → index-rgneq3zt.js} +2 -2
  105. package/dist/client/static/js/{index-nbm5r9g1.js → index-svx6rnfs.js} +2 -2
  106. package/dist/client/static/js/{index-3v8k8ms3.js → index-tew3rd6t.js} +1 -1
  107. package/dist/client/static/js/index-tfwsch7a.js +4 -0
  108. package/dist/client/static/js/{index-qs4n116g.js → index-vgwjn4de.js} +2 -2
  109. package/dist/client/static/js/{index-mbtenbyc.js → index-vn495w82.js} +6 -6
  110. package/dist/client/static/js/{index-tcfpzqb9.js → index-wbma8kqw.js} +33 -33
  111. package/dist/client/static/js/{index-gaqjrzdb.js → index-xgbcn89g.js} +2 -2
  112. package/dist/client/static/js/{index-tc6k8qt7.js → index-xrn2reb5.js} +2 -2
  113. package/dist/client/static/js/{index-0w4jqzqk.js → index-zhnfq8br.js} +2 -2
  114. package/dist/client/static/js/index-zsx5vs3j.js +2 -0
  115. package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +1 -0
  116. package/dist/client/static/js/{infoDiagram-VRGFBTTK-xsar9j6v.js → infoDiagram-VRGFBTTK-gtdp0z6p.js} +1 -1
  117. package/dist/client/static/js/ini-apj95p59.js +1 -0
  118. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g2rvt9jp.js → ishikawaDiagram-OU5B5YK6-c05m0sqq.js} +3 -3
  119. package/dist/client/static/js/java-khk2v3g4.js +1 -0
  120. package/dist/client/static/js/javascript-gez6yppm.js +1 -0
  121. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-q95v18zc.js → journeyDiagram-ZHPQQLJL-kgk5ygm2.js} +6 -6
  122. package/dist/client/static/js/json-r78y6e80.js +1 -0
  123. package/dist/client/static/js/jsx-h7hfj8cz.js +1 -0
  124. package/dist/client/static/js/{julia-pe5vpc2m.js → julia-w13bz4s1.js} +1 -1
  125. package/dist/client/static/js/{kanban-definition-PNTS6WVX-2e7m7ds3.js → kanban-definition-PNTS6WVX-q1w9w68s.js} +6 -6
  126. package/dist/client/static/js/lua-pat2bzg3.js +1 -0
  127. package/dist/client/static/js/markdown-545zn05v.js +1 -0
  128. package/dist/client/static/js/{mermaid.core-dzajkp0g.js → mermaid.core-1rz62j9g.js} +7 -7
  129. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-banecvf8.js → mindmap-definition-NLK3R4M7-3m3w6bnb.js} +8 -8
  130. package/dist/client/static/js/one-dark-pro-7c942tnw.js +1 -0
  131. package/dist/client/static/js/one-light-tp8y6c5g.js +1 -0
  132. package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +1 -0
  133. package/dist/client/static/js/{pegDiagram-GJSIUBJH-6erykm1c.js → pegDiagram-GJSIUBJH-svd3ex4e.js} +1 -1
  134. package/dist/client/static/js/{perl-cc2eqye8.js → perl-hcg3hacf.js} +1 -1
  135. package/dist/client/static/js/{php-p9bvnpsv.js → php-q6hhp84p.js} +1 -1
  136. package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +1 -0
  137. package/dist/client/static/js/{pieDiagram-5QR66LMP-jn1d905q.js → pieDiagram-5QR66LMP-2nrkw034.js} +3 -3
  138. package/dist/client/static/js/properties-9f76xngb.js +1 -0
  139. package/dist/client/static/js/python-nwerpkfq.js +1 -0
  140. package/dist/client/static/js/quadrantDiagram-O4NWA36T-4895d1aq.js +7 -0
  141. package/dist/client/static/js/r-39k5dr2p.js +1 -0
  142. package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +1 -0
  143. package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +1 -0
  144. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +1 -0
  145. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +1 -0
  146. package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +1 -0
  147. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ewzhhth2.js → railroadDiagram-XR7U4H2S-zj3g9yne.js} +1 -1
  148. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-fcs3xd42.js → requirementDiagram-PLB6GJNP-727yjvs8.js} +6 -6
  149. package/dist/client/static/js/{ruby-65s2ca5d.js → ruby-wzqz8vw6.js} +1 -1
  150. package/dist/client/static/js/{rust-ec1j2hwy.js → rust-r94pgqvf.js} +1 -1
  151. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2r829rjf.js → sankeyDiagram-IPEJSGJF-17c7p2pe.js} +5 -5
  152. package/dist/client/static/js/{sass-p6cssgq8.js → sass-xb3van7h.js} +1 -1
  153. package/dist/client/static/js/{scss-qfx8wt3b.js → scss-ddg6t3x4.js} +1 -1
  154. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3mnte9tv.js → sequenceDiagram-PO4LG4MO-wcmbpckr.js} +21 -21
  155. package/dist/client/static/js/{sizeCapture-INFHLROL-r6hf9265.js → sizeCapture-INFHLROL-nkr57cd6.js} +1 -1
  156. package/dist/client/static/js/sql-4dcrp3sw.js +1 -0
  157. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-hm2f0wdb.js → stateDiagram-v2-GCMORJYK-vd7r8s78.js} +6 -6
  158. package/dist/client/static/js/{svelte-jz3a190v.js → svelte-wzaxz546.js} +1 -1
  159. package/dist/client/static/js/{swimlanes-2SLR337P-s58xzqhw.js → swimlanes-2SLR337P-zhxm05ak.js} +1 -1
  160. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +8 -0
  161. package/dist/client/static/js/timeline-definition-EJHVYXUP-n7gbzhzd.js +120 -0
  162. package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +1 -0
  163. package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +1 -0
  164. package/dist/client/static/js/tsx-dk8rpgtw.js +1 -0
  165. package/dist/client/static/js/typescript-q0493nmw.js +1 -0
  166. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ryvgs5ac.js → usecaseDiagram-POWQR4AR-davsnwkf.js} +82 -82
  167. package/dist/client/static/js/vennDiagram-UO4OBE2U-gb54bh5k.js +34 -0
  168. package/dist/client/static/js/{vue-rv4pea8r.js → vue-6zhfw7zx.js} +1 -1
  169. package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +1 -0
  170. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1kt8q8a4.js → wardleyDiagram-VNRHLVJA-sf98cg9t.js} +4 -4
  171. package/dist/client/static/js/xml-91sb3gt9.js +1 -0
  172. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-q39bbgq4.js → xychartDiagram-PMCCYNJV-9nn09k40.js} +4 -4
  173. package/dist/client/static/js/yaml-ghx4mjw1.js +1 -0
  174. package/package.json +1 -1
  175. package/src/client/components/common/header-button/index.tsx +10 -2
  176. package/src/client/components/settings/apply-side-effects.test.ts +16 -0
  177. package/src/client/components/settings/apply-side-effects.ts +8 -0
  178. package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
  179. package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
  180. package/src/client/components/settings/categories/HarnessSettings.tsx +8 -0
  181. package/src/client/components/settings/categories/TokenUsageSettings.tsx +26 -3
  182. package/src/client/components/settings/categories/appearance-settings/RightSideSection.test.tsx +97 -0
  183. package/src/client/components/settings/categories/appearance-settings/RightSideSection.tsx +94 -0
  184. package/src/client/components/settings/categories/appearance-settings/groups.ts +4 -3
  185. package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +224 -0
  186. package/src/client/components/settings/categories/harness-settings/AccountsPanel.test.tsx +139 -0
  187. package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +349 -0
  188. package/src/client/components/settings/categories/harness-settings/AddAccountForm.tsx +58 -0
  189. package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +33 -0
  190. package/src/client/components/settings/categories/token-usage-settings/HarnessFilter.tsx +59 -0
  191. package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +37 -0
  192. package/src/client/components/settings/categories/usage-settings/limit-groups.test.ts +10 -0
  193. package/src/client/components/settings/categories/usage-settings/limit-groups.ts +4 -1
  194. package/src/client/components/settings/categories/usage-settings/providers.ts +28 -0
  195. package/src/client/components/settings/categories/usage-settings/usage-visibility.test.ts +60 -0
  196. package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +40 -0
  197. package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +8 -2
  198. package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +52 -21
  199. package/src/client/components/workspace/usage-panel/index.test.tsx +92 -12
  200. package/src/client/components/workspace/usage-panel/index.tsx +48 -12
  201. package/src/client/data/mock/token-usage.ts +53 -10
  202. package/src/client/hooks/chat/timeline/reader-input.ts +53 -1
  203. package/src/client/hooks/chat/timeline/scroll-activity.test.ts +103 -0
  204. package/src/client/hooks/chat/timeline/scroll-geometry.ts +9 -4
  205. package/src/client/hooks/chat/timeline/scroll.ts +19 -2
  206. package/src/client/hooks/models/harness-accounts.ts +143 -0
  207. package/src/client/hooks/models/harness-catalog.ts +9 -2
  208. package/src/client/hooks/models/use-harnesses-controller.ts +12 -0
  209. package/src/client/hooks/models/use-harnesses.ts +14 -0
  210. package/src/client/hooks/settings/hide-empty-providers.test.ts +132 -0
  211. package/src/client/hooks/settings/hide-empty-providers.ts +49 -0
  212. package/src/client/hooks/settings/useTokenUsage.ts +7 -2
  213. package/src/client/hooks/workspace/panel-tabs.ts +1 -1
  214. package/src/client/hooks/workspace/right-side.test.ts +75 -1
  215. package/src/client/hooks/workspace/right-side.ts +71 -10
  216. package/src/server/lib/antigravity/home.server.ts +27 -0
  217. package/src/server/lib/db/schema.ts +5 -1
  218. package/src/server/lib/harness/account-identity.server.ts +163 -0
  219. package/src/server/lib/harness/account-login.server.test.ts +151 -0
  220. package/src/server/lib/harness/account-login.server.ts +232 -0
  221. package/src/server/lib/harness/accounts.server.ts +339 -0
  222. package/src/server/lib/harness/accounts.test.ts +147 -0
  223. package/src/server/lib/harness/acp/background-probe.test.ts +314 -0
  224. package/src/server/lib/harness/acp/background-probe.ts +288 -0
  225. package/src/server/lib/harness/acp/background-replay.test.ts +1 -1
  226. package/src/server/lib/harness/acp/background-work.test.ts +4 -194
  227. package/src/server/lib/harness/acp/background-work.ts +4 -207
  228. package/src/server/lib/harness/acp/client.ts +3 -0
  229. package/src/server/lib/harness/acp/commands.ts +2 -2
  230. package/src/server/lib/harness/acp/one-shot.server.ts +4 -2
  231. package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
  232. package/src/server/lib/harness/acp/session-background.test.ts +2 -1
  233. package/src/server/lib/harness/acp/session-intake.test.ts +8 -0
  234. package/src/server/lib/harness/acp/session-intake.ts +12 -3
  235. package/src/server/lib/harness/acp/session-options.ts +2 -0
  236. package/src/server/lib/harness/acp/session-process.ts +1 -0
  237. package/src/server/lib/harness/acp/session-wiring.test.ts +2 -0
  238. package/src/server/lib/harness/acp/session-wiring.ts +22 -0
  239. package/src/server/lib/harness/acp/session.ts +3 -3
  240. package/src/server/lib/harness/acp/stdio.test.ts +52 -0
  241. package/src/server/lib/harness/acp/stdio.ts +7 -1
  242. package/src/server/lib/harness/auto-probe.server.ts +2 -2
  243. package/src/server/lib/harness/launch-table.ts +6 -1
  244. package/src/server/lib/harness/launch.ts +1 -0
  245. package/src/server/lib/harness/schema.server.ts +37 -0
  246. package/src/server/lib/harness/session-delete.server.ts +4 -2
  247. package/src/server/lib/harness/session-import.server.ts +21 -7
  248. package/src/server/lib/harness/session-store.server.test.ts +12 -0
  249. package/src/server/lib/harness/session-store.server.ts +21 -6
  250. package/src/server/lib/harness/session-transcript.server.ts +2 -1
  251. package/src/server/lib/harness/spawn.server.ts +27 -6
  252. package/src/server/lib/models/provider-icon-fetch.test.ts +57 -3
  253. package/src/server/lib/models/provider-icon-fetch.ts +9 -1
  254. package/src/server/lib/models/provider-icon-store.server.ts +61 -0
  255. package/src/server/lib/models/provider-icon-store.test.ts +55 -0
  256. package/src/server/lib/models/provider-icon-svg.ts +57 -0
  257. package/src/server/lib/schedule/runtime.server.ts +4 -1
  258. package/src/server/lib/sessions/dispatch.server.ts +4 -1
  259. package/src/server/lib/sessions/fork.server.ts +2 -0
  260. package/src/server/lib/sessions/resolve.server.ts +4 -0
  261. package/src/server/lib/sessions/spawn.server.ts +4 -2
  262. package/src/server/lib/tts/engines/adapters.test.ts +33 -0
  263. package/src/server/lib/tts/engines/elevenlabs.ts +6 -0
  264. package/src/server/lib/tts/engines/gemini.ts +116 -0
  265. package/src/server/lib/tts/engines/index.ts +3 -0
  266. package/src/server/lib/tts/engines/openai.ts +21 -4
  267. package/src/server/lib/usage/antigravity-quota.test.ts +249 -0
  268. package/src/server/lib/usage/antigravity-quota.ts +197 -0
  269. package/src/server/lib/usage/antigravity.test.ts +20 -0
  270. package/src/server/lib/usage/antigravity.ts +267 -0
  271. package/src/server/lib/usage/index-harness.test.ts +162 -0
  272. package/src/server/lib/usage/index-parse.test.ts +1 -0
  273. package/src/server/lib/usage/index-parse.ts +12 -4
  274. package/src/server/lib/usage/index-query.server.ts +64 -2
  275. package/src/server/lib/usage/index-scan.server.ts +68 -152
  276. package/src/server/lib/usage/index-schema.server.ts +24 -8
  277. package/src/server/lib/usage/index-schema.test.ts +54 -0
  278. package/src/server/lib/usage/index-sources.server.ts +54 -0
  279. package/src/server/lib/usage/providers.server.test.ts +67 -1
  280. package/src/server/lib/usage/providers.server.ts +82 -3
  281. package/src/server/lib/usage/sources/claude.server.ts +187 -0
  282. package/src/server/lib/usage/sources/claude.test.ts +86 -0
  283. package/src/server/lib/usage/sources/codex.server.ts +155 -0
  284. package/src/server/lib/usage/sources/codex.test.ts +53 -0
  285. package/src/server/lib/usage/sources/dsh.server.ts +120 -0
  286. package/src/server/lib/usage/sources/dsh.test.ts +49 -0
  287. package/src/server/lib/usage/sources/helpers.ts +191 -0
  288. package/src/server/lib/usage/sources/jsonl.server.ts +78 -0
  289. package/src/server/lib/usage/sources/jsonl.test.ts +72 -0
  290. package/src/server/lib/usage/sources/omp.server.ts +124 -0
  291. package/src/server/lib/usage/sources/opencode.server.ts +203 -0
  292. package/src/server/lib/usage/sources/opencode.test.ts +104 -0
  293. package/src/server/lib/usage/sources/qwen.server.ts +122 -0
  294. package/src/server/lib/usage/sources/qwen.test.ts +62 -0
  295. package/src/server/lib/usage/sources/types.ts +53 -0
  296. package/src/server/lib/usage/sources/zcode.server.ts +131 -0
  297. package/src/server/lib/usage/sources/zcode.test.ts +87 -0
  298. package/src/server/routes/agent/harness-command.ts +2 -0
  299. package/src/server/routes/agent/prewarm.ts +7 -2
  300. package/src/server/routes/harness/accounts.test.ts +99 -0
  301. package/src/server/routes/harness/accounts.ts +106 -0
  302. package/src/server/routes/harness/root.ts +13 -1
  303. package/src/server/routes/sessions/local-image.ts +2 -2
  304. package/src/server/routes/telemetry/tokens.test.ts +20 -0
  305. package/src/server/routes/telemetry/tokens.ts +12 -3
  306. package/src/server/routes/tts/speak.test.ts +40 -0
  307. package/src/shared/lib/harness/accounts.test.ts +41 -0
  308. package/src/shared/lib/harness/accounts.ts +175 -0
  309. package/src/shared/lib/icons/tint-hues.generated.ts +26 -25
  310. package/src/shared/lib/markdown/ascii-art.test.ts +154 -0
  311. package/src/shared/lib/markdown/ascii-art.ts +158 -0
  312. package/src/shared/lib/markdown/marked.ts +24 -2
  313. package/src/shared/lib/models/provider/identity.test.ts +34 -0
  314. package/src/shared/lib/models/provider/identity.ts +28 -0
  315. package/src/shared/lib/settings/defaults.ts +2 -0
  316. package/src/shared/lib/tts/engines.test.ts +12 -0
  317. package/src/shared/lib/tts/engines.ts +58 -57
  318. package/src/shared/lib/tts/settings.ts +1 -1
  319. package/src/shared/lib/tts/voices.ts +98 -0
  320. package/src/shared/lib/workspace/right-side-hidden.ts +57 -0
  321. package/src/shared/lib/workspace/session-state/store.ts +7 -5
  322. package/src/shared/types/harness.ts +5 -0
  323. package/src/shared/types/settings/state.ts +12 -0
  324. package/src/shared/types/tokenUsage.ts +21 -0
  325. package/src/test-support/preload.ts +9 -0
  326. package/dist/client/static/js/ImageView-g50pk5pt.js +0 -1
  327. package/dist/client/static/js/MergeDiffView-c4mb8m1w.js +0 -1
  328. package/dist/client/static/js/Modal-pf9p6m1k.js +0 -59
  329. package/dist/client/static/js/architecture-7GRP2DOG-ee9wjsht.js +0 -1
  330. package/dist/client/static/js/architectureDiagram-NJMV4G6O-278nx8rt.js +0 -36
  331. package/dist/client/static/js/bash-36shcpcw.js +0 -1
  332. package/dist/client/static/js/c-kxeqssf9.js +0 -1
  333. package/dist/client/static/js/cose-bilkent-JH36ORCC-ydq7mvy0.js +0 -1
  334. package/dist/client/static/js/cpp-wtk1s3d7.js +0 -1
  335. package/dist/client/static/js/css-0a0r6rp3.js +0 -1
  336. package/dist/client/static/js/css-xhnrhg4e.js +0 -1
  337. package/dist/client/static/js/cynefin-OW5HDTMX-gs16zjqa.js +0 -1
  338. package/dist/client/static/js/eventmodeling-NTZA5JFV-ftz7zrz5.js +0 -1
  339. package/dist/client/static/js/flowDiagram-KWPJA3E3-ax0qfmp3.js +0 -1
  340. package/dist/client/static/js/ganttDiagram-FUAMR5RP-49jd7msz.js +0 -292
  341. package/dist/client/static/js/gitGraph-4MIJSDKK-3rtkds4s.js +0 -1
  342. package/dist/client/static/js/gitGraphDiagram-X574FWY7-5p9mgq7n.js +0 -106
  343. package/dist/client/static/js/graphql-w9ajhndp.js +0 -1
  344. package/dist/client/static/js/html-krfbq5wp.js +0 -1
  345. package/dist/client/static/js/index-05n22cg9.js +0 -4
  346. package/dist/client/static/js/index-2jgx68m0.js +0 -1
  347. package/dist/client/static/js/index-333rq9yy.js +0 -1
  348. package/dist/client/static/js/index-38g2eevc.js +0 -314
  349. package/dist/client/static/js/index-9wc36am3.css +0 -1
  350. package/dist/client/static/js/index-bvpzzhn2.js +0 -4
  351. package/dist/client/static/js/index-e19dbqd3.js +0 -2
  352. package/dist/client/static/js/index-yr3exz70.js +0 -2
  353. package/dist/client/static/js/index-zdw8bd5t.js +0 -2
  354. package/dist/client/static/js/index-zyefab6q.js +0 -1
  355. package/dist/client/static/js/info-A6RAGUB7-vr5mxm6f.js +0 -1
  356. package/dist/client/static/js/ini-zx7x1jj1.js +0 -1
  357. package/dist/client/static/js/java-bbw6kdcr.js +0 -1
  358. package/dist/client/static/js/javascript-p2a8rbpw.js +0 -1
  359. package/dist/client/static/js/json-zh7m2fyg.js +0 -1
  360. package/dist/client/static/js/jsx-3zyyt0eh.js +0 -1
  361. package/dist/client/static/js/lua-d656k76a.js +0 -1
  362. package/dist/client/static/js/markdown-b5w681mm.js +0 -1
  363. package/dist/client/static/js/one-dark-pro-z965dedc.js +0 -1
  364. package/dist/client/static/js/one-light-capdx801.js +0 -1
  365. package/dist/client/static/js/packet-AYTQ26CC-ncb5xxtn.js +0 -1
  366. package/dist/client/static/js/pie-WAS4IAKB-ff8fpvc4.js +0 -1
  367. package/dist/client/static/js/properties-3c6rmnqp.js +0 -1
  368. package/dist/client/static/js/python-a3x3zpv1.js +0 -1
  369. package/dist/client/static/js/quadrantDiagram-O4NWA36T-sz4afnp1.js +0 -7
  370. package/dist/client/static/js/r-7h3gwype.js +0 -1
  371. package/dist/client/static/js/radar-RG4KPBEZ-gbj4b1hf.js +0 -1
  372. package/dist/client/static/js/railroad-74A4TZTK-ndv5tqgr.js +0 -1
  373. package/dist/client/static/js/railroad-abnf-HS5TGJTU-yjzj09s1.js +0 -1
  374. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e6pw7e5z.js +0 -1
  375. package/dist/client/static/js/railroad-peg-WCYAUIDC-9734dxy4.js +0 -1
  376. package/dist/client/static/js/sql-7a5vavm0.js +0 -1
  377. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-z4pt2kn1.js +0 -8
  378. package/dist/client/static/js/timeline-definition-EJHVYXUP-ezm1c4pz.js +0 -120
  379. package/dist/client/static/js/treeView-Q6P3EWNA-rs10d4p5.js +0 -1
  380. package/dist/client/static/js/treemap-WGGIJYW6-ey6c5x9f.js +0 -1
  381. package/dist/client/static/js/tsx-4a9b8tqf.js +0 -1
  382. package/dist/client/static/js/typescript-kas107wb.js +0 -1
  383. package/dist/client/static/js/vennDiagram-UO4OBE2U-rd5prsf1.js +0 -34
  384. package/dist/client/static/js/wardley-WFR3VGLG-kd9swrdr.js +0 -1
  385. package/dist/client/static/js/xml-3g4bdtpa.js +0 -1
  386. package/dist/client/static/js/yaml-ktxjn917.js +0 -1
@@ -1,19 +1,19 @@
1
- import{t,l,ee,xo,w,M,O,G,z,j,H,q,m,h,V,Rn,ht,it,st,Xn,Ft,Pt,zn,Ot,bt}from"./index-38g2eevc.js";import{Gt}from"./index-pv4z2mp2.js";import{Ka}from"./index-taev57jw.js";var Ke=function(){var s=t(function(R,p,b,f){for(b=b||{},f=R.length;f--;b[R[f]]=p);return b},"o"),a=[1,18],r=[1,19],n=[1,20],u=[1,41],d=[1,26],A=[1,42],c=[1,24],g=[1,25],C=[1,32],N=[1,33],X=[1,34],T=[1,45],Fe=[1,35],Be=[1,36],_e=[1,37],Se=[1,38],Ne=[1,27],Le=[1,28],xe=[1,29],ve=[1,30],Ie=[1,31],y=[1,44],D=[1,46],F=[1,43],B=[1,47],Oe=[1,9],k=[1,8,9],ce=[1,58],he=[1,59],de=[1,60],pe=[1,61],Ae=[1,62],we=[1,63],Me=[1,64],L=[1,8,9,41],We=[1,77],W=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],be=[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],fe=[13,60,86,100,102,103],J=[13,60,73,74,86,100,102,103],Qe=[13,60,68,69,70,71,72,86,100,102,103],ke=[1,103],Z=[1,121],te=[1,117],se=[1,113],ie=[1,119],ae=[1,114],re=[1,115],ne=[1,116],le=[1,118],ue=[1,120],je=[22,50,60,61,82,86,87,88,89,90],Xe=[1,128],me=[12,39],Pe=[1,8,9,39,41,44,46],ge=[1,8,9,22],He=[1,153],qe=[1,8,9,61],I=[1,8,9,22,50,60,61,82,86,87,88,89,90],Ve={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(p,b,f,o,E,e,oe){var i=e.length-1;switch(E){case 8:this.$=e[i-1];break;case 9:case 10:case 13:case 15:this.$=e[i];break;case 11:case 14:this.$=e[i-2]+"."+e[i];break;case 12:case 16:this.$=e[i-1]+e[i];break;case 17:case 18:this.$=e[i-1]+"~"+e[i]+"~";break;case 19:o.addRelation(e[i]);break;case 20:e[i-1].title=o.cleanupLabel(e[i]),o.addRelation(e[i-1]);break;case 31:this.$=e[i].trim(),o.setAccTitle(this.$);break;case 32:case 33:this.$=e[i].trim(),o.setAccDescription(this.$);break;case 34:o.addClassesToNamespace(e[i-3],e[i-1][0],e[i-1][1]),o.popNamespace();break;case 35:o.addClassesToNamespace(e[i-4],e[i-1][0],e[i-1][1]),o.popNamespace();break;case 36:this.$=o.addNamespace(e[i]);break;case 37:this.$=o.addNamespace(e[i-1],e[i]);break;case 38:this.$=[[e[i]],[]];break;case 39:this.$=[[e[i-1]],[]];break;case 40:e[i][0].unshift(e[i-2]),this.$=e[i];break;case 41:this.$=[[],[e[i]]];break;case 42:this.$=[[],[e[i-1]]];break;case 43:e[i][1].unshift(e[i-2]),this.$=e[i];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[i];break;case 48:o.setCssClass(e[i-2],e[i]);break;case 49:o.addMembers(e[i-3],e[i-1]);break;case 51:o.setCssClass(e[i-5],e[i-3]),o.addMembers(e[i-5],e[i-1]);break;case 52:o.addAnnotation(e[i-3],e[i-1]);break;case 53:o.addAnnotation(e[i-6],e[i-4]),o.addMembers(e[i-6],e[i-1]);break;case 54:o.addAnnotation(e[i-5],e[i-3]);break;case 55:this.$=e[i],o.addClass(e[i]);break;case 56:this.$=e[i-1],o.addClass(e[i-1]),o.setClassLabel(e[i-1],e[i]);break;case 60:o.addAnnotation(e[i],e[i-2]);break;case 61:case 74:this.$=[e[i]];break;case 62:e[i].push(e[i-1]),this.$=e[i];break;case 63:break;case 64:o.addMember(e[i-1],o.cleanupLabel(e[i]));break;case 65:break;case 66:break;case 67:this.$={id1:e[i-2],id2:e[i],relation:e[i-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[i-3],id2:e[i],relation:e[i-1],relationTitle1:e[i-2],relationTitle2:"none"};break;case 69:this.$={id1:e[i-3],id2:e[i],relation:e[i-2],relationTitle1:"none",relationTitle2:e[i-1]};break;case 70:this.$={id1:e[i-4],id2:e[i],relation:e[i-2],relationTitle1:e[i-3],relationTitle2:e[i-1]};break;case 71:this.$=o.addNote(e[i],e[i-1]);break;case 72:this.$=o.addNote(e[i]);break;case 73:this.$=e[i-2],o.defineClass(e[i-1],e[i]);break;case 75:this.$=e[i-2].concat([e[i]]);break;case 76:o.setDirection("TB");break;case 77:o.setDirection("BT");break;case 78:o.setDirection("RL");break;case 79:o.setDirection("LR");break;case 80:this.$={type1:e[i-2],type2:e[i],lineType:e[i-1]};break;case 81:this.$={type1:"none",type2:e[i],lineType:e[i-1]};break;case 82:this.$={type1:e[i-1],type2:"none",lineType:e[i]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[i]};break;case 84:this.$=o.relationType.AGGREGATION;break;case 85:this.$=o.relationType.EXTENSION;break;case 86:this.$=o.relationType.COMPOSITION;break;case 87:this.$=o.relationType.DEPENDENCY;break;case 88:this.$=o.relationType.LOLLIPOP;break;case 89:this.$=o.lineType.LINE;break;case 90:this.$=o.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[i-2],o.setClickEvent(e[i-1],e[i]);break;case 92:case 98:this.$=e[i-3],o.setClickEvent(e[i-2],e[i-1]),o.setTooltip(e[i-2],e[i]);break;case 93:this.$=e[i-2],o.setLink(e[i-1],e[i]);break;case 94:this.$=e[i-3],o.setLink(e[i-2],e[i-1],e[i]);break;case 95:this.$=e[i-3],o.setLink(e[i-2],e[i-1]),o.setTooltip(e[i-2],e[i]);break;case 96:this.$=e[i-4],o.setLink(e[i-3],e[i-2],e[i]),o.setTooltip(e[i-3],e[i-1]);break;case 99:this.$=e[i-3],o.setClickEvent(e[i-2],e[i-1],e[i]);break;case 100:this.$=e[i-4],o.setClickEvent(e[i-3],e[i-2],e[i-1]),o.setTooltip(e[i-3],e[i]);break;case 101:this.$=e[i-3],o.setLink(e[i-2],e[i]);break;case 102:this.$=e[i-4],o.setLink(e[i-3],e[i-1],e[i]);break;case 103:this.$=e[i-4],o.setLink(e[i-3],e[i-1]),o.setTooltip(e[i-3],e[i]);break;case 104:this.$=e[i-5],o.setLink(e[i-4],e[i-2],e[i]),o.setTooltip(e[i-4],e[i-1]);break;case 105:this.$=e[i-2],o.setCssStyle(e[i-1],e[i]);break;case 106:o.setCssClass(e[i-1],e[i]);break;case 107:this.$=[e[i]];break;case 108:e[i-2].push(e[i]),this.$=e[i-2];break;case 110:this.$=e[i-1]+e[i];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:a,35:r,37:n,38:22,42:u,43:23,46:d,48:A,51:c,52:g,54:C,56:N,57:X,60:T,62:Fe,63:Be,64:_e,65:Se,75:Ne,76:Le,78:xe,82:ve,83:Ie,86:y,100:D,102:F,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Oe,[2,5],{8:[1,48]}),{8:[1,49]},s(k,[2,19],{22:[1,50]}),s(k,[2,21]),s(k,[2,22]),s(k,[2,23]),s(k,[2,24]),s(k,[2,25]),s(k,[2,26]),s(k,[2,27]),s(k,[2,28]),s(k,[2,29]),s(k,[2,30]),{34:[1,51]},{36:[1,52]},s(k,[2,33]),s(k,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:ce,69:he,70:de,71:pe,72:Ae,73:we,74:Me}),{39:[1,65]},s(L,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),s(k,[2,65]),s(k,[2,66]),{16:69,60:T,86:y,100:D,102:F},{16:39,17:40,19:70,60:T,86:y,100:D,102:F,103:B},{16:39,17:40,19:71,60:T,86:y,100:D,102:F,103:B},{16:39,17:40,19:72,60:T,86:y,100:D,102:F,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:T,86:y,100:D,102:F,103:B},{13:We,55:76},{58:78,60:[1,79]},s(k,[2,76]),s(k,[2,77]),s(k,[2,78]),s(k,[2,79]),s(W,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:T,86:y,100:D,102:F,103:B}),s(W,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:T,86:y,100:D,102:F,103:B},{16:39,17:40,19:87,60:T,86:y,100:D,102:F,103:B},s(be,[2,133]),s(be,[2,134]),s(be,[2,135]),s(be,[2,136]),s([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),s(Oe,[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:a,35:r,37:n,42:u,46:d,48:A,51:c,52:g,54:C,56:N,57:X,60:T,62:Fe,63:Be,64:_e,65:Se,75:Ne,76:Le,78:xe,82:ve,83:Ie,86:y,100:D,102:F,103:B}),{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:a,35:r,37:n,38:22,42:u,43:23,46:d,48:A,51:c,52:g,54:C,56:N,57:X,60:T,62:Fe,63:Be,64:_e,65:Se,75:Ne,76:Le,78:xe,82:ve,83:Ie,86:y,100:D,102:F,103:B},s(k,[2,20]),s(k,[2,31]),s(k,[2,32]),{13:[1,91],16:39,17:40,19:90,60:T,86:y,100:D,102:F,103:B},{53:92,66:56,67:57,68:ce,69:he,70:de,71:pe,72:Ae,73:we,74:Me},s(k,[2,64]),{67:93,73:we,74:Me},s(fe,[2,83],{66:94,68:ce,69:he,70:de,71:pe,72:Ae}),s(J,[2,84]),s(J,[2,85]),s(J,[2,86]),s(J,[2,87]),s(J,[2,88]),s(Qe,[2,89]),s(Qe,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:u,43:23,48:A,54:C,56:N},{16:100,60:T,86:y,100:D,102:F},{41:[1,102],45:101,51:ke},{16:104,60:T,86:y,100:D,102:F},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:Z,50:te,59:110,60:se,82:ie,84:111,85:112,86:ae,87:re,88:ne,89:le,90:ue},{60:[1,122]},{13:We,55:123},s(L,[2,72]),s(L,[2,138]),{22:Z,50:te,59:124,60:se,61:[1,125],82:ie,84:111,85:112,86:ae,87:re,88:ne,89:le,90:ue},s(je,[2,74]),{16:39,17:40,19:126,60:T,86:y,100:D,102:F,103:B},s(W,[2,16]),s(W,[2,17]),s(W,[2,18]),{11:127,12:Xe,39:[2,36]},s(me,[2,9],{16:85,17:86,15:130,18:[1,129],60:T,86:y,100:D,102:F,103:B}),s(me,[2,10]),s(Pe,[2,55],{11:131,12:Xe}),s(Oe,[2,7]),{9:[1,132]},s(ge,[2,67]),{16:39,17:40,19:133,60:T,86:y,100:D,102:F,103:B},{13:[1,135],16:39,17:40,19:134,60:T,86:y,100:D,102:F,103:B},s(fe,[2,82],{66:136,68:ce,69:he,70:de,71:pe,72:Ae}),s(fe,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:u,43:23,48:A,54:C,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},s(L,[2,48],{39:[1,142]}),{41:[1,143]},s(L,[2,50]),{41:[2,61],45:144,51:ke},{47:[1,145]},{16:39,17:40,19:146,60:T,86:y,100:D,102:F,103:B},s(k,[2,91],{13:[1,147]}),s(k,[2,93],{13:[1,149],77:[1,148]}),s(k,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},s(k,[2,105],{61:He}),s(qe,[2,107],{85:154,22:Z,50:te,60:se,82:ie,86:ae,87:re,88:ne,89:le,90:ue}),s(I,[2,109]),s(I,[2,111]),s(I,[2,112]),s(I,[2,113]),s(I,[2,114]),s(I,[2,115]),s(I,[2,116]),s(I,[2,117]),s(I,[2,118]),s(I,[2,119]),s(k,[2,106]),s(L,[2,71]),s(k,[2,73],{61:He}),{60:[1,155]},s(W,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:T,86:y,100:D,102:F,103:B},s(me,[2,12]),s(Pe,[2,56]),{1:[2,4]},s(ge,[2,69]),s(ge,[2,68]),{16:39,17:40,19:158,60:T,86:y,100:D,102:F,103:B},s(fe,[2,80]),s(L,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:u,43:23,48:A,54:C,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:u,43:23,48:A,54:C,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:u,43:23,48:A,54:C,56:N},{45:163,51:ke},s(L,[2,49]),{41:[2,62]},s(L,[2,52],{39:[1,164]}),s(k,[2,60]),s(k,[2,92]),s(k,[2,94]),s(k,[2,95],{77:[1,165]}),s(k,[2,98]),s(k,[2,99],{13:[1,166]}),s(k,[2,101],{13:[1,168],77:[1,167]}),{22:Z,50:te,60:se,82:ie,84:169,85:112,86:ae,87:re,88:ne,89:le,90:ue},s(I,[2,110]),s(je,[2,75]),{14:[1,170]},s(me,[2,11]),s(ge,[2,70]),s(L,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ke},s(k,[2,96]),s(k,[2,100]),s(k,[2,102]),s(k,[2,103],{77:[1,174]}),s(qe,[2,108],{85:154,22:Z,50:te,60:se,82:ie,86:ae,87:re,88:ne,89:le,90:ue}),s(Pe,[2,8]),s(L,[2,51]),{41:[1,175]},s(L,[2,54]),s(k,[2,104]),s(L,[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(p,b){if(b.recoverable)this.trace(p);else{var f=Error(p);throw f.hash=b,f}},"parseError"),parse:t(function(p){var b=this,f=[0],o=[],E=[null],e=[],oe=this.table,i="",Ee=0,Je=0,Ze=0,ut=2,$e=1,ot=e.slice.call(arguments,1),_=Object.create(this.lexer),U={yy:{}};for(var Re in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Re))U.yy[Re]=this.yy[Re];if(_.setInput(p,U.yy),U.yy.lexer=_,U.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ge=_.yylloc;e.push(Ge);var ct=_.options&&_.options.ranges;if(typeof U.yy.parseError==="function")this.parseError=U.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function dt(v){f.length=f.length-2*v,E.length=E.length-v,e.length=e.length-v}t(dt,"popStack");function et(){var v=o.pop()||_.lex()||$e;if(typeof v!=="number"){if(v instanceof Array)o=v,v=o.pop();v=b.symbols_[v]||v}return v}t(et,"lex");var S,Ue,Y,x,yt,ze,Q={},Te,P,tt,ye;while(!0){if(Y=f[f.length-1],this.defaultActions[Y])x=this.defaultActions[Y];else{if(S===null||typeof S>"u")S=et();x=oe[Y]&&oe[Y][S]}if(typeof x>"u"||!x.length||!x[0]){var Ye="";ye=[];for(Te in oe[Y])if(this.terminals_[Te]&&Te>ut)ye.push("'"+this.terminals_[Te]+"'");if(_.showPosition)Ye="Parse error on line "+(Ee+1)+`:
2
- `+_.showPosition()+`
3
- Expecting `+ye.join(", ")+", got '"+(this.terminals_[S]||S)+"'";else Ye="Parse error on line "+(Ee+1)+": Unexpected "+(S==$e?"end of input":"'"+(this.terminals_[S]||S)+"'");this.parseError(Ye,{text:_.match,token:this.terminals_[S]||S,line:_.yylineno,loc:Ge,expected:ye})}if(x[0]instanceof Array&&x.length>1)throw Error("Parse Error: multiple actions possible at state: "+Y+", token: "+S);switch(x[0]){case 1:if(f.push(S),E.push(_.yytext),e.push(_.yylloc),f.push(x[1]),S=null,!Ue){if(Je=_.yyleng,i=_.yytext,Ee=_.yylineno,Ge=_.yylloc,Ze>0)Ze--}else S=Ue,Ue=null;break;case 2:if(P=this.productions_[x[1]][1],Q.$=E[E.length-P],Q._$={first_line:e[e.length-(P||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(P||1)].first_column,last_column:e[e.length-1].last_column},ct)Q._$.range=[e[e.length-(P||1)].range[0],e[e.length-1].range[1]];if(ze=this.performAction.apply(Q,[i,Je,Ee,U.yy,x[1],E,e].concat(ot)),typeof ze<"u")return ze;if(P)f=f.slice(0,-1*P*2),E=E.slice(0,-1*P),e=e.slice(0,-1*P);f.push(this.productions_[x[1]][0]),E.push(Q.$),e.push(Q._$),tt=oe[f[f.length-2]][f[f.length-1]],f.push(tt);break;case 3:return!0}}return!0},"parse")},lt=function(){var R={EOF:1,parseError:t(function(b,f){if(this.yy.parser)this.yy.parser.parseError(b,f);else throw Error(b)},"parseError"),setInput:t(function(p,b){if(this.yy=b||this.yy||{},this._input=p,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];return this.offset=0,this},"setInput"),input:t(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var b=p.match(/(?:\r\n?|\n).*/g);if(b)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),p},"input"),unput:t(function(p){var b=p.length,f=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var o=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1)this.yylineno-=f.length-1;var E=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===o.length?this.yylloc.first_column:0)+o[o.length-f.length].length-f[0].length:this.yylloc.first_column-b},this.options.ranges)this.yylloc.range=[E[0],E[0]+this.yyleng-b];return 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(p){this.unput(this.match.slice(p))},"less"),pastInput:t(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var p=this.match;if(p.length<20)p+=this._input.substr(0,20-p.length);return(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var p=this.pastInput(),b=Array(p.length+1).join("-");return p+this.upcomingInput()+`
5
- `+b+"^"},"showPosition"),test_match:t(function(p,b){var f,o,E;if(this.options.backtrack_lexer){if(E={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)E.yylloc.range=this.yylloc.range.slice(0)}if(o=p[0].match(/(?:\r\n?|\n).*/g),o)this.yylineno+=o.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],f=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(f)return f;else if(this._backtrack){for(var e in E)this[e]=E[e];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var p,b,f,o;if(!this._more)this.yytext="",this.match="";var E=this._currentRules();for(var e=0;e<E.length;e++)if(f=this._input.match(this.rules[E[e]]),f&&(!b||f[0].length>b[0].length)){if(b=f,o=e,this.options.backtrack_lexer)if(p=this.test_match(f,E[e]),p!==!1)return p;else if(this._backtrack){b=!1;continue}else return!1;else if(!this.options.flex)break}if(b){if(p=this.test_match(b,E[o]),p!==!1)return p;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var b=this.next();if(b)return b;else return this.lex()},"lex"),begin:t(function(b){this.conditionStack.push(b)},"begin"),popState:t(function(){var b=this.conditionStack.length-1;if(b>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(b){if(b=this.conditionStack.length-1-Math.abs(b||0),b>=0)return this.conditionStack[b];else return"INITIAL"},"topState"),pushState:t(function(b){this.begin(b)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(b,f,o,E){var e=E;switch(o){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;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;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;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;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;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;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}}};return R}();Ve.lexer=lt;function Ce(){this.yy={}}return t(Ce,"Parser"),Ce.prototype=Ve,Ve.Parser=Ce,new Ce}();Ke.parser=Ke;var pt=Ke,at=["#","+","~","-",""],rt=class{static{t(this,"ClassMember")}constructor(s,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";let r=ee(s,m());this.parseMember(r)}getDisplayDetails(){let s=this.visibility+xo(this.id);if(this.memberType==="method"){if(s+=`(${xo(this.parameters.trim())})`,this.returnType)s+=" : "+xo(this.returnType)}s=s.trim();let a=this.parseClassifier();return{displayText:s,cssStyle:a}}parseMember(s){let a="";if(this.memberType==="method"){let u=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(s);if(u){let d=u[1]?u[1].trim():"";if(at.includes(d))this.visibility=d;if(this.id=u[2],this.parameters=u[3]?u[3].trim():"",a=u[4]?u[4].trim():"",this.returnType=u[5]?u[5].trim():"",a===""){let A=this.returnType.substring(this.returnType.length-1);if(/[$*]/.exec(A))a=A,this.returnType=this.returnType.substring(0,this.returnType.length-1)}}}else{let n=s.length,u=s.substring(0,1),d=s.substring(n-1);if(at.includes(u))this.visibility=u;if(/[$*]/.exec(d))a=d;this.id=s.substring(this.visibility===""?0:1,a===""?n:n-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${xo(this.id)}${this.memberType==="method"?`(${xo(this.parameters)})${this.returnType?" : "+xo(this.returnType):""}`:""}`;if(this.text=r.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""}}},De="classId-",nt=0,K=t((s)=>w.sanitizeText(s,m()),"sanitizeText"),At=class s{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((a)=>{let r=Ka();h(a).select("svg").selectAll("g").filter(function(){return h(this).attr("title")!==null}).on("mouseover",(d)=>{let A=h(d.currentTarget),c=A.attr("title");if(!c)return;let g=d.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(Gt.sanitize(c)).style("left",`${window.scrollX+g.left+g.width/2}px`).style("top",`${window.scrollY+g.bottom+4}px`),A.classed("hover",!0)}).on("mouseout",(d)=>{r.transition().duration(500).style("opacity",0),h(d.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=O,this.getAccTitle=G,this.setAccDescription=z,this.getAccDescription=j,this.setDiagramTitle=H,this.getDiagramTitle=q,this.getConfig=t(()=>m().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(a){let r=w.sanitizeText(a,m()),n="",u=r;if(r.indexOf("~")>0){let d=r.split("~");u=K(d[0]),n=K(d[1])}return{className:u,type:n}}setClassLabel(a,r){let n=w.sanitizeText(a,m());if(r)r=K(r);let{className:u}=this.splitClassNameAndType(n);this.classes.get(u).label=r,this.classes.get(u).text=`${r}${this.classes.get(u).type?`<${this.classes.get(u).type}>`:""}`}addClass(a){let r=w.sanitizeText(a,m()),{className:n,type:u}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let d=w.sanitizeText(n,m());this.classes.set(d,{id:d,type:u,label:d,text:`${d}${u?`&lt;${u}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:De+d+"-"+nt}),nt++}addInterface(a,r){let n={id:`interface${this.interfaces.length}`,label:a,classId:r};this.interfaces.push(n)}setDiagramId(a){this.diagramId=a}lookUpDomId(a){let r=w.sanitizeText(a,m());if(this.classes.has(r)){let n=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${n}`:n}throw Error("Class not found: "+r)}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",M()}getClass(a){return this.classes.get(a)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(a){let r=typeof a==="number"?`note${a}`:a;return this.notes.get(r)}getNotes(){return this.notes}addRelation(a){l.debug("Adding relation: "+JSON.stringify(a));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];if(a.relation.type1===this.relationType.LOLLIPOP&&!r.includes(a.relation.type2))this.addClass(a.id2),this.addInterface(a.id1,a.id2),a.id1=`interface${this.interfaces.length-1}`;else if(a.relation.type2===this.relationType.LOLLIPOP&&!r.includes(a.relation.type1))this.addClass(a.id1),this.addInterface(a.id2,a.id1),a.id2=`interface${this.interfaces.length-1}`;else this.addClass(a.id1),this.addClass(a.id2);a.id1=this.splitClassNameAndType(a.id1).className,a.id2=this.splitClassNameAndType(a.id2).className,a.relationTitle1=w.sanitizeText(a.relationTitle1.trim(),m()),a.relationTitle2=w.sanitizeText(a.relationTitle2.trim(),m()),this.relations.push(a)}addAnnotation(a,r){let n=this.splitClassNameAndType(a).className;this.classes.get(n).annotations.push(r)}addMember(a,r){this.addClass(a);let n=this.splitClassNameAndType(a).className,u=this.classes.get(n);if(typeof r==="string"){let d=r.trim();if(d.startsWith("<<")&&d.endsWith(">>"))u.annotations.push(K(d.substring(2,d.length-2)));else if(d.indexOf(")")>0)u.methods.push(new rt(d,"method"));else if(d)u.members.push(new rt(d,"attribute"))}}addMembers(a,r){if(Array.isArray(r))r.reverse(),r.forEach((n)=>this.addMember(a,n))}addNote(a,r){let n=this.notes.size,u={id:`note${n}`,class:r,text:a,index:n};return this.notes.set(u.id,u),u.id}cleanupLabel(a){if(a.startsWith(":"))a=a.substring(1);return K(a.trim())}setCssClass(a,r){a.split(",").forEach((n)=>{let u=n;if(/\d/.exec(n[0]))u=De+u;u=this.splitClassNameAndType(u).className;let d=this.classes.get(u);if(d)d.cssClasses+=" "+r})}defineClass(a,r){for(let n of a){let u=this.styleClasses.get(n);if(u===void 0)u={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,u);if(r)r.forEach((d)=>{if(/color/.exec(d)){let A=d.replace("fill","bgFill");u.textStyles.push(A)}u.styles.push(d)});this.classes.forEach((d)=>{if(d.cssClasses.includes(n))d.styles.push(...r.flatMap((A)=>A.split(",")))})}}setTooltip(a,r){a.split(",").forEach((n)=>{if(r!==void 0){let u=this.splitClassNameAndType(n).className,d=this.classes.get(u);if(d)d.tooltip=K(r)}})}getTooltip(a,r){if(r&&this.namespaces.has(r))return this.namespaces.get(r).classes.get(a).tooltip;return this.classes.get(a).tooltip}setLink(a,r,n){let u=m();a.split(",").forEach((d)=>{let A=d;if(/\d/.exec(d[0]))A=De+A;A=this.splitClassNameAndType(A).className;let c=this.classes.get(A);if(c)if(c.link=V.formatUrl(r,u),u.securityLevel==="sandbox")c.linkTarget="_top";else if(typeof n==="string")c.linkTarget=K(n);else c.linkTarget="_blank"}),this.setCssClass(a,"clickable")}setClickEvent(a,r,n){a.split(",").forEach((u)=>{this.setClickFunc(u,r,n);let d=this.splitClassNameAndType(u).className,A=this.classes.get(d);if(A)A.haveCallback=!0}),this.setCssClass(a,"clickable")}setClickFunc(a,r,n){let u=w.sanitizeText(a,m());if(m().securityLevel!=="loose")return;if(r===void 0)return;let A=this.splitClassNameAndType(u).className;if(this.classes.has(A)){let c=[];if(typeof n==="string"){c=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g<c.length;g++){let C=c[g].trim();if(C.startsWith('"')&&C.endsWith('"'))C=C.substr(1,C.length-2);c[g]=C}}if(c.length===0)c.push(A);this.functions.push(()=>{let g=this.lookUpDomId(A),C=document.querySelector(`[id="${g}"]`);if(C!==null)C.addEventListener("click",()=>{V.runFunc(r,...c)},!1)})}}bindFunctions(a){this.functions.forEach((r)=>{r(a)})}escapeHtml(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(a){this.direction=a}static resolveQualifiedId(a,r){let n=r.at(-1);return n?`${n}.${a}`:a}static getAncestorIds(a){let r=a.split("."),n=Array(r.length);n[0]=r[0];for(let u=1;u<r.length;u++)n[u]=`${n[u-1]}.${r[u]}`;return n}createNamespaceNode(a,r,n,u=!1){return{id:a,label:r,classes:new Map,notes:new Map,children:new Map,domId:De+a+"-"+this.namespaceCounter++,parent:n,explicit:u}}linkParentChild(a,r){let n=this.namespaces.get(a),u=this.namespaces.get(r);if(!n||!u)return;if(!n.children.has(r))n.children.set(r,u);u.parent??=a}addNamespace(a,r){let n=s.resolveQualifiedId(a,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){let A=this.namespaces.get(n);if(A.explicit=!0,r)A.label=r;return n}let u=n.split("."),d=s.getAncestorIds(n);for(let A=0;A<d.length;A++){let c=d[A],g=A>0?d[A-1]:void 0,C=A===d.length-1,N=C&&r?r:u[A];if(!this.namespaces.has(c))this.namespaces.set(c,this.createNamespaceNode(c,N,g,C));else if(C)this.namespaces.get(c).explicit=!0;if(g)this.linkParentChild(g,c)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(a){return this.namespaces.get(a)}getNamespaces(){return this.namespaces}addClassesToNamespace(a,r,n){if(!this.namespaces.has(a))return;for(let u of r){let{className:d}=this.splitClassNameAndType(u),A=this.getClass(d);A.parent=a,this.namespaces.get(a).classes.set(d,A)}for(let u of n){let d=this.getNote(u);d.parent=a,this.namespaces.get(a).notes.set(u,d)}}setCssStyle(a,r){let n=this.classes.get(a);if(!r||!n)return;for(let u of r)if(u.includes(","))n.styles.push(...u.split(","));else n.styles.push(u)}getArrowMarker(a){let r;switch(a){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(a){let r=a;while(r){let n=this.namespaces.get(r);if(!n)return;if(n.explicit)return r;r=n.parent}return}getData(){let a=[],r=[],n=m(),u=n.class?.hierarchicalNamespaces??!0;for(let c of this.namespaces.values()){if(!u&&!c.explicit)continue;let g={id:c.id,label:u?c.label:c.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look,parentId:u?c.parent:void 0};a.push(g)}let d=0;for(let c of this.classes.values()){let g=u?c.parent:this.resolveExplicitAncestor(c.parent),C={...c,type:void 0,isGroup:!1,parentId:g,look:n.look,colorIndex:d++};a.push(C)}for(let c of this.notes.values()){let g=u?c.parent:this.resolveExplicitAncestor(c.parent),C={id:c.id,label:c.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:g,labelType:"markdown"};a.push(C);let N=this.classes.get(c.class)?.id;if(N){let X={id:`edgeNote${c.index}`,start:c.id,end:N,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(X)}}for(let c of this.interfaces){let g={id:c.id,label:c.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};a.push(g)}let A=0;for(let c of this.relations){A++;let g={id:Rn(c.id1,c.id2,{prefix:"id",counter:A}),start:c.id1,end:c.id2,type:"normal",label:c.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(c.relation.type1),arrowTypeEnd:this.getArrowMarker(c.relation.type2),startLabelRight:c.relationTitle1==="none"?"":c.relationTitle1,endLabelLeft:c.relationTitle2==="none"?"":c.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:c.style||"",pattern:c.relation.lineType==1?"dashed":"solid",look:n.look,labelType:"markdown"};r.push(g)}return{nodes:a,edges:r,other:{},config:n,direction:this.getDirection()}}},ft=t((s)=>{let{theme:a,bkgColorArray:r,borderColorArray:n}=s;if(!it(a,n))return"";let u=st(s.look),d=ht(r),A="";for(let c=0;c<Xn(s.THEME_COLOR_LIMIT,n);c++){let g=n[c%n.length];A+=`
1
+ import{t,l,ee,Co,w,F,O,G,z,j,q,H,m,b,V,Ln,bt,lt,ct,er,Pt,Ot,Un,$t,yt}from"./index-17jy16v3.js";import{jt}from"./index-jr6q69r3.js";import{Ya}from"./index-56319bht.js";var Ke=function(){var s=t(function(R,d,A,f){for(A=A||{},f=R.length;f--;A[R[f]]=d);return A},"o"),a=[1,18],r=[1,19],n=[1,20],u=[1,41],h=[1,26],p=[1,42],c=[1,24],g=[1,25],C=[1,32],L=[1,33],X=[1,34],T=[1,45],Fe=[1,35],Be=[1,36],_e=[1,37],Se=[1,38],Ne=[1,27],Le=[1,28],xe=[1,29],ve=[1,30],Ie=[1,31],y=[1,44],D=[1,46],B=[1,43],_=[1,47],Oe=[1,9],k=[1,8,9],ce=[1,58],he=[1,59],de=[1,60],pe=[1,61],Ae=[1,62],we=[1,63],Me=[1,64],x=[1,8,9,41],We=[1,77],W=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],be=[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],fe=[13,60,86,100,102,103],J=[13,60,73,74,86,100,102,103],Qe=[13,60,68,69,70,71,72,86,100,102,103],ke=[1,103],Z=[1,121],te=[1,117],se=[1,113],ie=[1,119],ae=[1,114],re=[1,115],ne=[1,116],le=[1,118],ue=[1,120],je=[22,50,60,61,82,86,87,88,89,90],Xe=[1,128],me=[12,39],Pe=[1,8,9,39,41,44,46],ge=[1,8,9,22],He=[1,153],qe=[1,8,9,61],M=[1,8,9,22,50,60,61,82,86,87,88,89,90],Ve={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(d,A,f,o,E,e,oe){var i=e.length-1;switch(E){case 8:this.$=e[i-1];break;case 9:case 10:case 13:case 15:this.$=e[i];break;case 11:case 14:this.$=e[i-2]+"."+e[i];break;case 12:case 16:this.$=e[i-1]+e[i];break;case 17:case 18:this.$=e[i-1]+"~"+e[i]+"~";break;case 19:o.addRelation(e[i]);break;case 20:e[i-1].title=o.cleanupLabel(e[i]),o.addRelation(e[i-1]);break;case 31:this.$=e[i].trim(),o.setAccTitle(this.$);break;case 32:case 33:this.$=e[i].trim(),o.setAccDescription(this.$);break;case 34:o.addClassesToNamespace(e[i-3],e[i-1][0],e[i-1][1]),o.popNamespace();break;case 35:o.addClassesToNamespace(e[i-4],e[i-1][0],e[i-1][1]),o.popNamespace();break;case 36:this.$=o.addNamespace(e[i]);break;case 37:this.$=o.addNamespace(e[i-1],e[i]);break;case 38:this.$=[[e[i]],[]];break;case 39:this.$=[[e[i-1]],[]];break;case 40:e[i][0].unshift(e[i-2]),this.$=e[i];break;case 41:this.$=[[],[e[i]]];break;case 42:this.$=[[],[e[i-1]]];break;case 43:e[i][1].unshift(e[i-2]),this.$=e[i];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[i];break;case 48:o.setCssClass(e[i-2],e[i]);break;case 49:o.addMembers(e[i-3],e[i-1]);break;case 51:o.setCssClass(e[i-5],e[i-3]),o.addMembers(e[i-5],e[i-1]);break;case 52:o.addAnnotation(e[i-3],e[i-1]);break;case 53:o.addAnnotation(e[i-6],e[i-4]),o.addMembers(e[i-6],e[i-1]);break;case 54:o.addAnnotation(e[i-5],e[i-3]);break;case 55:this.$=e[i],o.addClass(e[i]);break;case 56:this.$=e[i-1],o.addClass(e[i-1]),o.setClassLabel(e[i-1],e[i]);break;case 60:o.addAnnotation(e[i],e[i-2]);break;case 61:case 74:this.$=[e[i]];break;case 62:e[i].push(e[i-1]),this.$=e[i];break;case 63:break;case 64:o.addMember(e[i-1],o.cleanupLabel(e[i]));break;case 65:break;case 66:break;case 67:this.$={id1:e[i-2],id2:e[i],relation:e[i-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[i-3],id2:e[i],relation:e[i-1],relationTitle1:e[i-2],relationTitle2:"none"};break;case 69:this.$={id1:e[i-3],id2:e[i],relation:e[i-2],relationTitle1:"none",relationTitle2:e[i-1]};break;case 70:this.$={id1:e[i-4],id2:e[i],relation:e[i-2],relationTitle1:e[i-3],relationTitle2:e[i-1]};break;case 71:this.$=o.addNote(e[i],e[i-1]);break;case 72:this.$=o.addNote(e[i]);break;case 73:this.$=e[i-2],o.defineClass(e[i-1],e[i]);break;case 75:this.$=e[i-2].concat([e[i]]);break;case 76:o.setDirection("TB");break;case 77:o.setDirection("BT");break;case 78:o.setDirection("RL");break;case 79:o.setDirection("LR");break;case 80:this.$={type1:e[i-2],type2:e[i],lineType:e[i-1]};break;case 81:this.$={type1:"none",type2:e[i],lineType:e[i-1]};break;case 82:this.$={type1:e[i-1],type2:"none",lineType:e[i]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[i]};break;case 84:this.$=o.relationType.AGGREGATION;break;case 85:this.$=o.relationType.EXTENSION;break;case 86:this.$=o.relationType.COMPOSITION;break;case 87:this.$=o.relationType.DEPENDENCY;break;case 88:this.$=o.relationType.LOLLIPOP;break;case 89:this.$=o.lineType.LINE;break;case 90:this.$=o.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[i-2],o.setClickEvent(e[i-1],e[i]);break;case 92:case 98:this.$=e[i-3],o.setClickEvent(e[i-2],e[i-1]),o.setTooltip(e[i-2],e[i]);break;case 93:this.$=e[i-2],o.setLink(e[i-1],e[i]);break;case 94:this.$=e[i-3],o.setLink(e[i-2],e[i-1],e[i]);break;case 95:this.$=e[i-3],o.setLink(e[i-2],e[i-1]),o.setTooltip(e[i-2],e[i]);break;case 96:this.$=e[i-4],o.setLink(e[i-3],e[i-2],e[i]),o.setTooltip(e[i-3],e[i-1]);break;case 99:this.$=e[i-3],o.setClickEvent(e[i-2],e[i-1],e[i]);break;case 100:this.$=e[i-4],o.setClickEvent(e[i-3],e[i-2],e[i-1]),o.setTooltip(e[i-3],e[i]);break;case 101:this.$=e[i-3],o.setLink(e[i-2],e[i]);break;case 102:this.$=e[i-4],o.setLink(e[i-3],e[i-1],e[i]);break;case 103:this.$=e[i-4],o.setLink(e[i-3],e[i-1]),o.setTooltip(e[i-3],e[i]);break;case 104:this.$=e[i-5],o.setLink(e[i-4],e[i-2],e[i]),o.setTooltip(e[i-4],e[i-1]);break;case 105:this.$=e[i-2],o.setCssStyle(e[i-1],e[i]);break;case 106:o.setCssClass(e[i-1],e[i]);break;case 107:this.$=[e[i]];break;case 108:e[i-2].push(e[i]),this.$=e[i-2];break;case 110:this.$=e[i-1]+e[i];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:a,35:r,37:n,38:22,42:u,43:23,46:h,48:p,51:c,52:g,54:C,56:L,57:X,60:T,62:Fe,63:Be,64:_e,65:Se,75:Ne,76:Le,78:xe,82:ve,83:Ie,86:y,100:D,102:B,103:_},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Oe,[2,5],{8:[1,48]}),{8:[1,49]},s(k,[2,19],{22:[1,50]}),s(k,[2,21]),s(k,[2,22]),s(k,[2,23]),s(k,[2,24]),s(k,[2,25]),s(k,[2,26]),s(k,[2,27]),s(k,[2,28]),s(k,[2,29]),s(k,[2,30]),{34:[1,51]},{36:[1,52]},s(k,[2,33]),s(k,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:ce,69:he,70:de,71:pe,72:Ae,73:we,74:Me}),{39:[1,65]},s(x,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),s(k,[2,65]),s(k,[2,66]),{16:69,60:T,86:y,100:D,102:B},{16:39,17:40,19:70,60:T,86:y,100:D,102:B,103:_},{16:39,17:40,19:71,60:T,86:y,100:D,102:B,103:_},{16:39,17:40,19:72,60:T,86:y,100:D,102:B,103:_},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:T,86:y,100:D,102:B,103:_},{13:We,55:76},{58:78,60:[1,79]},s(k,[2,76]),s(k,[2,77]),s(k,[2,78]),s(k,[2,79]),s(W,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:T,86:y,100:D,102:B,103:_}),s(W,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:T,86:y,100:D,102:B,103:_},{16:39,17:40,19:87,60:T,86:y,100:D,102:B,103:_},s(be,[2,133]),s(be,[2,134]),s(be,[2,135]),s(be,[2,136]),s([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),s(Oe,[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:a,35:r,37:n,42:u,46:h,48:p,51:c,52:g,54:C,56:L,57:X,60:T,62:Fe,63:Be,64:_e,65:Se,75:Ne,76:Le,78:xe,82:ve,83:Ie,86:y,100:D,102:B,103:_}),{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:a,35:r,37:n,38:22,42:u,43:23,46:h,48:p,51:c,52:g,54:C,56:L,57:X,60:T,62:Fe,63:Be,64:_e,65:Se,75:Ne,76:Le,78:xe,82:ve,83:Ie,86:y,100:D,102:B,103:_},s(k,[2,20]),s(k,[2,31]),s(k,[2,32]),{13:[1,91],16:39,17:40,19:90,60:T,86:y,100:D,102:B,103:_},{53:92,66:56,67:57,68:ce,69:he,70:de,71:pe,72:Ae,73:we,74:Me},s(k,[2,64]),{67:93,73:we,74:Me},s(fe,[2,83],{66:94,68:ce,69:he,70:de,71:pe,72:Ae}),s(J,[2,84]),s(J,[2,85]),s(J,[2,86]),s(J,[2,87]),s(J,[2,88]),s(Qe,[2,89]),s(Qe,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:u,43:23,48:p,54:C,56:L},{16:100,60:T,86:y,100:D,102:B},{41:[1,102],45:101,51:ke},{16:104,60:T,86:y,100:D,102:B},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:Z,50:te,59:110,60:se,82:ie,84:111,85:112,86:ae,87:re,88:ne,89:le,90:ue},{60:[1,122]},{13:We,55:123},s(x,[2,72]),s(x,[2,138]),{22:Z,50:te,59:124,60:se,61:[1,125],82:ie,84:111,85:112,86:ae,87:re,88:ne,89:le,90:ue},s(je,[2,74]),{16:39,17:40,19:126,60:T,86:y,100:D,102:B,103:_},s(W,[2,16]),s(W,[2,17]),s(W,[2,18]),{11:127,12:Xe,39:[2,36]},s(me,[2,9],{16:85,17:86,15:130,18:[1,129],60:T,86:y,100:D,102:B,103:_}),s(me,[2,10]),s(Pe,[2,55],{11:131,12:Xe}),s(Oe,[2,7]),{9:[1,132]},s(ge,[2,67]),{16:39,17:40,19:133,60:T,86:y,100:D,102:B,103:_},{13:[1,135],16:39,17:40,19:134,60:T,86:y,100:D,102:B,103:_},s(fe,[2,82],{66:136,68:ce,69:he,70:de,71:pe,72:Ae}),s(fe,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:u,43:23,48:p,54:C,56:L},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},s(x,[2,48],{39:[1,142]}),{41:[1,143]},s(x,[2,50]),{41:[2,61],45:144,51:ke},{47:[1,145]},{16:39,17:40,19:146,60:T,86:y,100:D,102:B,103:_},s(k,[2,91],{13:[1,147]}),s(k,[2,93],{13:[1,149],77:[1,148]}),s(k,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},s(k,[2,105],{61:He}),s(qe,[2,107],{85:154,22:Z,50:te,60:se,82:ie,86:ae,87:re,88:ne,89:le,90:ue}),s(M,[2,109]),s(M,[2,111]),s(M,[2,112]),s(M,[2,113]),s(M,[2,114]),s(M,[2,115]),s(M,[2,116]),s(M,[2,117]),s(M,[2,118]),s(M,[2,119]),s(k,[2,106]),s(x,[2,71]),s(k,[2,73],{61:He}),{60:[1,155]},s(W,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:T,86:y,100:D,102:B,103:_},s(me,[2,12]),s(Pe,[2,56]),{1:[2,4]},s(ge,[2,69]),s(ge,[2,68]),{16:39,17:40,19:158,60:T,86:y,100:D,102:B,103:_},s(fe,[2,80]),s(x,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:u,43:23,48:p,54:C,56:L},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:u,43:23,48:p,54:C,56:L},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:u,43:23,48:p,54:C,56:L},{45:163,51:ke},s(x,[2,49]),{41:[2,62]},s(x,[2,52],{39:[1,164]}),s(k,[2,60]),s(k,[2,92]),s(k,[2,94]),s(k,[2,95],{77:[1,165]}),s(k,[2,98]),s(k,[2,99],{13:[1,166]}),s(k,[2,101],{13:[1,168],77:[1,167]}),{22:Z,50:te,60:se,82:ie,84:169,85:112,86:ae,87:re,88:ne,89:le,90:ue},s(M,[2,110]),s(je,[2,75]),{14:[1,170]},s(me,[2,11]),s(ge,[2,70]),s(x,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ke},s(k,[2,96]),s(k,[2,100]),s(k,[2,102]),s(k,[2,103],{77:[1,174]}),s(qe,[2,108],{85:154,22:Z,50:te,60:se,82:ie,86:ae,87:re,88:ne,89:le,90:ue}),s(Pe,[2,8]),s(x,[2,51]),{41:[1,175]},s(x,[2,54]),s(k,[2,104]),s(x,[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(d,A){if(A.recoverable)this.trace(d);else{var f=Error(d);throw f.hash=A,f}},"parseError"),parse:t(function(d){var A=this,f=[0],o=[],E=[null],e=[],oe=this.table,i="",Ee=0,Je=0,Ze=0,nt=2,$e=1,ut=e.slice.call(arguments,1),S=Object.create(this.lexer),U={yy:{}};for(var Re in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Re))U.yy[Re]=this.yy[Re];if(S.setInput(d,U.yy),U.yy.lexer=S,U.yy.parser=this,typeof S.yylloc>"u")S.yylloc={};var Ge=S.yylloc;e.push(Ge);var ot=S.options&&S.options.ranges;if(typeof U.yy.parseError==="function")this.parseError=U.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ht(I){f.length=f.length-2*I,E.length=E.length-I,e.length=e.length-I}t(ht,"popStack");function et(){var I=o.pop()||S.lex()||$e;if(typeof I!=="number"){if(I instanceof Array)o=I,I=o.pop();I=A.symbols_[I]||I}return I}t(et,"lex");var N,Ue,Y,v,Tt,ze,Q={},Te,P,tt,ye;while(!0){if(Y=f[f.length-1],this.defaultActions[Y])v=this.defaultActions[Y];else{if(N===null||typeof N>"u")N=et();v=oe[Y]&&oe[Y][N]}if(typeof v>"u"||!v.length||!v[0]){var Ye="";ye=[];for(Te in oe[Y])if(this.terminals_[Te]&&Te>nt)ye.push("'"+this.terminals_[Te]+"'");if(S.showPosition)Ye="Parse error on line "+(Ee+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+ye.join(", ")+", got '"+(this.terminals_[N]||N)+"'";else Ye="Parse error on line "+(Ee+1)+": Unexpected "+(N==$e?"end of input":"'"+(this.terminals_[N]||N)+"'");this.parseError(Ye,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:Ge,expected:ye})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+Y+", token: "+N);switch(v[0]){case 1:if(f.push(N),E.push(S.yytext),e.push(S.yylloc),f.push(v[1]),N=null,!Ue){if(Je=S.yyleng,i=S.yytext,Ee=S.yylineno,Ge=S.yylloc,Ze>0)Ze--}else N=Ue,Ue=null;break;case 2:if(P=this.productions_[v[1]][1],Q.$=E[E.length-P],Q._$={first_line:e[e.length-(P||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(P||1)].first_column,last_column:e[e.length-1].last_column},ot)Q._$.range=[e[e.length-(P||1)].range[0],e[e.length-1].range[1]];if(ze=this.performAction.apply(Q,[i,Je,Ee,U.yy,v[1],E,e].concat(ut)),typeof ze<"u")return ze;if(P)f=f.slice(0,-1*P*2),E=E.slice(0,-1*P),e=e.slice(0,-1*P);f.push(this.productions_[v[1]][0]),E.push(Q.$),e.push(Q._$),tt=oe[f[f.length-2]][f[f.length-1]],f.push(tt);break;case 3:return!0}}return!0},"parse")},rt=function(){var R={EOF:1,parseError:t(function(A,f){if(this.yy.parser)this.yy.parser.parseError(A,f);else throw Error(A)},"parseError"),setInput:t(function(d,A){if(this.yy=A||this.yy||{},this._input=d,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];return this.offset=0,this},"setInput"),input:t(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var A=d.match(/(?:\r\n?|\n).*/g);if(A)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),d},"input"),unput:t(function(d){var A=d.length,f=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var o=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1)this.yylineno-=f.length-1;var E=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===o.length?this.yylloc.first_column:0)+o[o.length-f.length].length-f[0].length:this.yylloc.first_column-A},this.options.ranges)this.yylloc.range=[E[0],E[0]+this.yyleng-A];return 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(d){this.unput(this.match.slice(d))},"less"),pastInput:t(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var d=this.match;if(d.length<20)d+=this._input.substr(0,20-d.length);return(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var d=this.pastInput(),A=Array(d.length+1).join("-");return d+this.upcomingInput()+`
5
+ `+A+"^"},"showPosition"),test_match:t(function(d,A){var f,o,E;if(this.options.backtrack_lexer){if(E={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)E.yylloc.range=this.yylloc.range.slice(0)}if(o=d[0].match(/(?:\r\n?|\n).*/g),o)this.yylineno+=o.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],f=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(f)return f;else if(this._backtrack){for(var e in E)this[e]=E[e];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var d,A,f,o;if(!this._more)this.yytext="",this.match="";var E=this._currentRules();for(var e=0;e<E.length;e++)if(f=this._input.match(this.rules[E[e]]),f&&(!A||f[0].length>A[0].length)){if(A=f,o=e,this.options.backtrack_lexer)if(d=this.test_match(f,E[e]),d!==!1)return d;else if(this._backtrack){A=!1;continue}else return!1;else if(!this.options.flex)break}if(A){if(d=this.test_match(A,E[o]),d!==!1)return d;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var A=this.next();if(A)return A;else return this.lex()},"lex"),begin:t(function(A){this.conditionStack.push(A)},"begin"),popState:t(function(){var A=this.conditionStack.length-1;if(A>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(A){if(A=this.conditionStack.length-1-Math.abs(A||0),A>=0)return this.conditionStack[A];else return"INITIAL"},"topState"),pushState:t(function(A){this.begin(A)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(A,f,o,E){var e=E;switch(o){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;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;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;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;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;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;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}}};return R}();Ve.lexer=rt;function Ce(){this.yy={}}return t(Ce,"Parser"),Ce.prototype=Ve,Ve.Parser=Ce,new Ce}();Ke.parser=Ke;var dt=Ke,st=["#","+","~","-",""],it=class{static{t(this,"ClassMember")}constructor(s,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";let r=ee(s,m());this.parseMember(r)}getDisplayDetails(){let s=this.visibility+Co(this.id);if(this.memberType==="method"){if(s+=`(${Co(this.parameters.trim())})`,this.returnType)s+=" : "+Co(this.returnType)}s=s.trim();let a=this.parseClassifier();return{displayText:s,cssStyle:a}}parseMember(s){let a="";if(this.memberType==="method"){let u=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(s);if(u){let h=u[1]?u[1].trim():"";if(st.includes(h))this.visibility=h;if(this.id=u[2],this.parameters=u[3]?u[3].trim():"",a=u[4]?u[4].trim():"",this.returnType=u[5]?u[5].trim():"",a===""){let p=this.returnType.substring(this.returnType.length-1);if(/[$*]/.exec(p))a=p,this.returnType=this.returnType.substring(0,this.returnType.length-1)}}}else{let n=s.length,u=s.substring(0,1),h=s.substring(n-1);if(st.includes(u))this.visibility=u;if(/[$*]/.exec(h))a=h;this.id=s.substring(this.visibility===""?0:1,a===""?n:n-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${Co(this.id)}${this.memberType==="method"?`(${Co(this.parameters)})${this.returnType?" : "+Co(this.returnType):""}`:""}`;if(this.text=r.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""}}},De="classId-",at=0,K=t((s)=>w.sanitizeText(s,m()),"sanitizeText"),pt=class s{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((a)=>{let r=Ya();b(a).select("svg").selectAll("g").filter(function(){return b(this).attr("title")!==null}).on("mouseover",(h)=>{let p=b(h.currentTarget),c=p.attr("title");if(!c)return;let g=h.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(jt.sanitize(c)).style("left",`${window.scrollX+g.left+g.width/2}px`).style("top",`${window.scrollY+g.bottom+4}px`),p.classed("hover",!0)}).on("mouseout",(h)=>{r.transition().duration(500).style("opacity",0),b(h.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=O,this.getAccTitle=G,this.setAccDescription=z,this.getAccDescription=j,this.setDiagramTitle=q,this.getDiagramTitle=H,this.getConfig=t(()=>m().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(a){let r=w.sanitizeText(a,m()),n="",u=r;if(r.indexOf("~")>0){let h=r.split("~");u=K(h[0]),n=K(h[1])}return{className:u,type:n}}setClassLabel(a,r){let n=w.sanitizeText(a,m());if(r)r=K(r);let{className:u}=this.splitClassNameAndType(n);this.classes.get(u).label=r,this.classes.get(u).text=`${r}${this.classes.get(u).type?`<${this.classes.get(u).type}>`:""}`}addClass(a){let r=w.sanitizeText(a,m()),{className:n,type:u}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let h=w.sanitizeText(n,m());this.classes.set(h,{id:h,type:u,label:h,text:`${h}${u?`&lt;${u}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:De+h+"-"+at}),at++}addInterface(a,r){let n={id:`interface${this.interfaces.length}`,label:a,classId:r};this.interfaces.push(n)}setDiagramId(a){this.diagramId=a}lookUpDomId(a){let r=w.sanitizeText(a,m());if(this.classes.has(r)){let n=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${n}`:n}throw Error("Class not found: "+r)}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",F()}getClass(a){return this.classes.get(a)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(a){let r=typeof a==="number"?`note${a}`:a;return this.notes.get(r)}getNotes(){return this.notes}addRelation(a){l.debug("Adding relation: "+JSON.stringify(a));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];if(a.relation.type1===this.relationType.LOLLIPOP&&!r.includes(a.relation.type2))this.addClass(a.id2),this.addInterface(a.id1,a.id2),a.id1=`interface${this.interfaces.length-1}`;else if(a.relation.type2===this.relationType.LOLLIPOP&&!r.includes(a.relation.type1))this.addClass(a.id1),this.addInterface(a.id2,a.id1),a.id2=`interface${this.interfaces.length-1}`;else this.addClass(a.id1),this.addClass(a.id2);a.id1=this.splitClassNameAndType(a.id1).className,a.id2=this.splitClassNameAndType(a.id2).className,a.relationTitle1=w.sanitizeText(a.relationTitle1.trim(),m()),a.relationTitle2=w.sanitizeText(a.relationTitle2.trim(),m()),this.relations.push(a)}addAnnotation(a,r){let n=this.splitClassNameAndType(a).className;this.classes.get(n).annotations.push(r)}addMember(a,r){this.addClass(a);let n=this.splitClassNameAndType(a).className,u=this.classes.get(n);if(typeof r==="string"){let h=r.trim();if(h.startsWith("<<")&&h.endsWith(">>"))u.annotations.push(K(h.substring(2,h.length-2)));else if(h.indexOf(")")>0)u.methods.push(new it(h,"method"));else if(h)u.members.push(new it(h,"attribute"))}}addMembers(a,r){if(Array.isArray(r))r.reverse(),r.forEach((n)=>this.addMember(a,n))}addNote(a,r){let n=this.notes.size,u={id:`note${n}`,class:r,text:a,index:n};return this.notes.set(u.id,u),u.id}cleanupLabel(a){if(a.startsWith(":"))a=a.substring(1);return K(a.trim())}setCssClass(a,r){a.split(",").forEach((n)=>{let u=n;if(/\d/.exec(n[0]))u=De+u;u=this.splitClassNameAndType(u).className;let h=this.classes.get(u);if(h)h.cssClasses+=" "+r})}defineClass(a,r){for(let n of a){let u=this.styleClasses.get(n);if(u===void 0)u={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,u);if(r)r.forEach((h)=>{if(/color/.exec(h)){let p=h.replace("fill","bgFill");u.textStyles.push(p)}u.styles.push(h)});this.classes.forEach((h)=>{if(h.cssClasses.includes(n))h.styles.push(...r.flatMap((p)=>p.split(",")))})}}setTooltip(a,r){a.split(",").forEach((n)=>{if(r!==void 0){let u=this.splitClassNameAndType(n).className,h=this.classes.get(u);if(h)h.tooltip=K(r)}})}getTooltip(a,r){if(r&&this.namespaces.has(r))return this.namespaces.get(r).classes.get(a).tooltip;return this.classes.get(a).tooltip}setLink(a,r,n){let u=m();a.split(",").forEach((h)=>{let p=h;if(/\d/.exec(h[0]))p=De+p;p=this.splitClassNameAndType(p).className;let c=this.classes.get(p);if(c)if(c.link=V.formatUrl(r,u),u.securityLevel==="sandbox")c.linkTarget="_top";else if(typeof n==="string")c.linkTarget=K(n);else c.linkTarget="_blank"}),this.setCssClass(a,"clickable")}setClickEvent(a,r,n){a.split(",").forEach((u)=>{this.setClickFunc(u,r,n);let h=this.splitClassNameAndType(u).className,p=this.classes.get(h);if(p)p.haveCallback=!0}),this.setCssClass(a,"clickable")}setClickFunc(a,r,n){let u=w.sanitizeText(a,m());if(m().securityLevel!=="loose")return;if(r===void 0)return;let p=this.splitClassNameAndType(u).className;if(this.classes.has(p)){let c=[];if(typeof n==="string"){c=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g<c.length;g++){let C=c[g].trim();if(C.startsWith('"')&&C.endsWith('"'))C=C.substr(1,C.length-2);c[g]=C}}if(c.length===0)c.push(p);this.functions.push(()=>{let g=this.lookUpDomId(p),C=document.querySelector(`[id="${g}"]`);if(C!==null)C.addEventListener("click",()=>{V.runFunc(r,...c)},!1)})}}bindFunctions(a){this.functions.forEach((r)=>{r(a)})}escapeHtml(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(a){this.direction=a}static resolveQualifiedId(a,r){let n=r.at(-1);return n?`${n}.${a}`:a}static getAncestorIds(a){let r=a.split("."),n=Array(r.length);n[0]=r[0];for(let u=1;u<r.length;u++)n[u]=`${n[u-1]}.${r[u]}`;return n}createNamespaceNode(a,r,n,u=!1){return{id:a,label:r,classes:new Map,notes:new Map,children:new Map,domId:De+a+"-"+this.namespaceCounter++,parent:n,explicit:u}}linkParentChild(a,r){let n=this.namespaces.get(a),u=this.namespaces.get(r);if(!n||!u)return;if(!n.children.has(r))n.children.set(r,u);u.parent??=a}addNamespace(a,r){let n=s.resolveQualifiedId(a,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){let p=this.namespaces.get(n);if(p.explicit=!0,r)p.label=r;return n}let u=n.split("."),h=s.getAncestorIds(n);for(let p=0;p<h.length;p++){let c=h[p],g=p>0?h[p-1]:void 0,C=p===h.length-1,L=C&&r?r:u[p];if(!this.namespaces.has(c))this.namespaces.set(c,this.createNamespaceNode(c,L,g,C));else if(C)this.namespaces.get(c).explicit=!0;if(g)this.linkParentChild(g,c)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(a){return this.namespaces.get(a)}getNamespaces(){return this.namespaces}addClassesToNamespace(a,r,n){if(!this.namespaces.has(a))return;for(let u of r){let{className:h}=this.splitClassNameAndType(u),p=this.getClass(h);p.parent=a,this.namespaces.get(a).classes.set(h,p)}for(let u of n){let h=this.getNote(u);h.parent=a,this.namespaces.get(a).notes.set(u,h)}}setCssStyle(a,r){let n=this.classes.get(a);if(!r||!n)return;for(let u of r)if(u.includes(","))n.styles.push(...u.split(","));else n.styles.push(u)}getArrowMarker(a){let r;switch(a){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(a){let r=a;while(r){let n=this.namespaces.get(r);if(!n)return;if(n.explicit)return r;r=n.parent}return}getData(){let a=[],r=[],n=m(),u=n.class?.hierarchicalNamespaces??!0;for(let c of this.namespaces.values()){if(!u&&!c.explicit)continue;let g={id:c.id,label:u?c.label:c.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look,parentId:u?c.parent:void 0};a.push(g)}let h=0;for(let c of this.classes.values()){let g=u?c.parent:this.resolveExplicitAncestor(c.parent),C={...c,type:void 0,isGroup:!1,parentId:g,look:n.look,colorIndex:h++};a.push(C)}for(let c of this.notes.values()){let g=u?c.parent:this.resolveExplicitAncestor(c.parent),C={id:c.id,label:c.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:g,labelType:"markdown"};a.push(C);let L=this.classes.get(c.class)?.id;if(L){let X={id:`edgeNote${c.index}`,start:c.id,end:L,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(X)}}for(let c of this.interfaces){let g={id:c.id,label:c.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};a.push(g)}let p=0;for(let c of this.relations){p++;let g={id:Ln(c.id1,c.id2,{prefix:"id",counter:p}),start:c.id1,end:c.id2,type:"normal",label:c.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(c.relation.type1),arrowTypeEnd:this.getArrowMarker(c.relation.type2),startLabelRight:c.relationTitle1==="none"?"":c.relationTitle1,endLabelLeft:c.relationTitle2==="none"?"":c.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:c.style||"",pattern:c.relation.lineType==1?"dashed":"solid",look:n.look,labelType:"markdown"};r.push(g)}return{nodes:a,edges:r,other:{},config:n,direction:this.getDirection()}}},At=t((s)=>{let{theme:a,bkgColorArray:r,borderColorArray:n}=s;if(!lt(a,n))return"";let u=ct(s.look),h=bt(r),p="";for(let c=0;c<er(s.THEME_COLOR_LIMIT,n);c++){let g=n[c%n.length];p+=`
7
7
 
8
8
  [data-look="${u}"][data-color-id="color-${c}"].node .outer-path path {
9
9
  stroke: ${g};
10
- ${d?`fill: ${r[c%r.length]};`:""}
10
+ ${h?`fill: ${r[c%r.length]};`:""}
11
11
  }
12
12
 
13
13
  [data-look="${u}"][data-color-id="color-${c}"].node .divider path {
14
14
  stroke: ${g};
15
15
  }
16
- `}return A},"genColor"),kt=t((s)=>`${ft(s)}
16
+ `}return p},"genColor"),ft=t((s)=>`${At(s)}
17
17
  g.classGroup text {
18
18
  fill: ${s.nodeBorder||s.classText};
19
19
  stroke: none;
@@ -213,5 +213,5 @@ g.classGroup line {
213
213
  }
214
214
  text-align: center;
215
215
  }
216
- ${zn()}
217
- `,"getStyles"),mt=kt,gt=t((s,a="TB")=>{if(!s.doc)return a;let r=a;for(let n of s.doc)if(n.stmt==="dir")r=n.value;return r},"getDir"),Ct=t(function(s,a){return a.db.getClasses()},"getClasses"),Et=t(async function(s,a,r,n){l.info("REF0:"),l.info("Drawing class diagram (v3)",a);let{securityLevel:u,state:d,layout:A}=m();n.db.setDiagramId(a);let c=n.db.getData(),g=Ot(a,u);c.type=n.type,c.layoutAlgorithm=Pt(A),c.nodeSpacing=d?.nodeSpacing||50,c.rankSpacing=d?.rankSpacing||50,c.markers=["aggregation","extension","composition","dependency","lollipop"],c.diagramId=a,await Ft(c,g);let C=8;V.insertTitle(g,"classDiagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),bt(g,C,"classDiagram",d?.useMaxWidth??!0)},"draw"),Tt={getClasses:Ct,draw:Et,getDir:gt},Xt={parser:pt,get db(){return new At},renderer:Tt,styles:mt,init:t((s)=>{if(!s.class)s.class={};s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute},"init")};export{Xt as diagram};
216
+ ${Un()}
217
+ `,"getStyles"),kt=ft,mt=t((s,a="TB")=>{if(!s.doc)return a;let r=a;for(let n of s.doc)if(n.stmt==="dir")r=n.value;return r},"getDir"),gt=t(function(s,a){return a.db.getClasses()},"getClasses"),Ct=t(async function(s,a,r,n){l.info("REF0:"),l.info("Drawing class diagram (v3)",a);let{securityLevel:u,state:h,layout:p}=m();n.db.setDiagramId(a);let c=n.db.getData(),g=$t(a,u);c.type=n.type,c.layoutAlgorithm=Ot(p),c.nodeSpacing=h?.nodeSpacing||50,c.rankSpacing=h?.rankSpacing||50,c.markers=["aggregation","extension","composition","dependency","lollipop"],c.diagramId=a,await Pt(c,g);let C=8;V.insertTitle(g,"classDiagramTitleText",h?.titleTopMargin??25,n.db.getDiagramTitle()),yt(g,C,"classDiagram",h?.useMaxWidth??!0)},"draw"),Et={getClasses:gt,draw:Ct,getDir:mt},Qt={parser:dt,get db(){return new pt},renderer:Et,styles:kt,init:t((s)=>{if(!s.class)s.class={};s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute},"init")};export{Qt as diagram};
@@ -0,0 +1 @@
1
+ import{t,l,b}from"./index-17jy16v3.js";import{Yr}from"./index-5qwgexg6.js";import{vn,Fn}from"./index-4vaxdt8a.js";var q=Fn(function(Z,K){(function(M,E){if(typeof Z==="object"&&typeof K==="object")K.exports=E();else if(typeof define==="function"&&define.amd)define([],E);else if(typeof Z==="object")Z.layoutBase=E();else M.layoutBase=E()})(Z,function(){return function(I){var M={};function E(s){if(M[s])return M[s].exports;var r=M[s]={i:s,l:!1,exports:{}};return I[s].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=I,E.c=M,E.i=function(s){return s},E.d=function(s,r,e){if(!E.o(s,r))Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:e})},E.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return E.d(r,"a",r),r},E.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},E.p="",E(E.s=26)}([function(I,M,E){function s(){}s.QUALITY=1,s.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,s.DEFAULT_INCREMENTAL=!1,s.DEFAULT_ANIMATION_ON_LAYOUT=!0,s.DEFAULT_ANIMATION_DURING_LAYOUT=!1,s.DEFAULT_ANIMATION_PERIOD=50,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,s.DEFAULT_GRAPH_MARGIN=15,s.NODE_DIMENSIONS_INCLUDE_LABELS=!1,s.SIMPLE_NODE_SIZE=40,s.SIMPLE_NODE_HALF_SIZE=s.SIMPLE_NODE_SIZE/2,s.EMPTY_COMPOUND_NODE_SIZE=40,s.MIN_EDGE_LENGTH=1,s.WORLD_BOUNDARY=1e6,s.INITIAL_WORLD_BOUNDARY=s.WORLD_BOUNDARY/1000,s.WORLD_CENTER_X=1200,s.WORLD_CENTER_Y=900,I.exports=s},function(I,M,E){var s=E(2),r=E(8),e=E(9);function i(f,o,v){s.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=o}i.prototype=Object.create(s.prototype);for(var h in s)i[h]=s[h];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;else if(this.target===f)return this.source;else throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(f,o){var v=this.getOtherEnd(f),n=o.getGraphManager().getRoot();while(!0){if(v.getOwner()==o)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var f=[,,,,];if(this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),f),!this.isOverlapingSourceAndTarget){if(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1)this.lengthX=e.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=e.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},i.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=e.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=e.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},I.exports=i},function(I,M,E){function s(r){this.vGraphObject=r}I.exports=s},function(I,M,E){var s=E(2),r=E(10),e=E(13),i=E(0),h=E(16),f=E(4);function o(n,u,g,y){if(g==null&&y==null)y=u;if(s.call(this,y),n.graphManager!=null)n=n.graphManager;if(this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=y,this.edges=[],this.graphManager=n,g!=null&&u!=null)this.rect=new e(u.x,u.y,g.width,g.height);else this.rect=new e}o.prototype=Object.create(s.prototype);for(var v in s)o[v]=s[v];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(n){this.rect.width=n},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(n){this.rect.height=n},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(n,u){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=u.width,this.rect.height=u.height},o.prototype.setCenter=function(n,u){this.rect.x=n-this.rect.width/2,this.rect.y=u-this.rect.height/2},o.prototype.setLocation=function(n,u){this.rect.x=n,this.rect.y=u},o.prototype.moveBy=function(n,u){this.rect.x+=n,this.rect.y+=u},o.prototype.getEdgeListToNode=function(n){var u=[],g,y=this;return y.edges.forEach(function(L){if(L.target==n){if(L.source!=y)throw"Incorrect edge source!";u.push(L)}}),u},o.prototype.getEdgesBetween=function(n){var u=[],g,y=this;return y.edges.forEach(function(L){if(!(L.source==y||L.target==y))throw"Incorrect edge source and/or target";if(L.target==n||L.source==n)u.push(L)}),u},o.prototype.getNeighborsList=function(){var n=new Set,u=this;return u.edges.forEach(function(g){if(g.source==u)n.add(g.target);else{if(g.target!=u)throw"Incorrect incidency!";n.add(g.source)}}),n},o.prototype.withChildren=function(){var n=new Set,u,g;if(n.add(this),this.child!=null){var y=this.child.getNodes();for(var L=0;L<y.length;L++)u=y[L],g=u.withChildren(),g.forEach(function(A){n.add(A)})}return n},o.prototype.getNoOfChildren=function(){var n=0,u;if(this.child==null)n=1;else{var g=this.child.getNodes();for(var y=0;y<g.length;y++)u=g[y],n+=u.getNoOfChildren()}if(n==0)n=1;return n},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},o.prototype.scatter=function(){var n,u,g=-i.INITIAL_WORLD_BOUNDARY,y=i.INITIAL_WORLD_BOUNDARY;n=i.WORLD_CENTER_X+h.nextDouble()*(y-g)+g;var L=-i.INITIAL_WORLD_BOUNDARY,A=i.INITIAL_WORLD_BOUNDARY;u=i.WORLD_CENTER_Y+h.nextDouble()*(A-L)+L,this.rect.x=n,this.rect.y=u},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var n=this.getChild();if(n.updateBounds(!0),this.rect.x=n.getLeft(),this.rect.y=n.getTop(),this.setWidth(n.getRight()-n.getLeft()),this.setHeight(n.getBottom()-n.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var u=n.getRight()-n.getLeft(),g=n.getBottom()-n.getTop();if(this.labelWidth>u)this.rect.x-=(this.labelWidth-u)/2,this.setWidth(this.labelWidth);if(this.labelHeight>g){if(this.labelPos=="center")this.rect.y-=(this.labelHeight-g)/2;else if(this.labelPos=="top")this.rect.y-=this.labelHeight-g;this.setHeight(this.labelHeight)}}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(n){var u=this.rect.x;if(u>i.WORLD_BOUNDARY)u=i.WORLD_BOUNDARY;else if(u<-i.WORLD_BOUNDARY)u=-i.WORLD_BOUNDARY;var g=this.rect.y;if(g>i.WORLD_BOUNDARY)g=i.WORLD_BOUNDARY;else if(g<-i.WORLD_BOUNDARY)g=-i.WORLD_BOUNDARY;var y=new f(u,g),L=n.inverseTransformPoint(y);this.setLocation(L.x,L.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},I.exports=o},function(I,M,E){function s(r,e){if(r==null&&e==null)this.x=0,this.y=0;else this.x=r,this.y=e}s.prototype.getX=function(){return this.x},s.prototype.getY=function(){return this.y},s.prototype.setX=function(r){this.x=r},s.prototype.setY=function(r){this.y=r},s.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},s.prototype.getCopy=function(){return new s(this.x,this.y)},s.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},I.exports=s},function(I,M,E){var s=E(2),r=E(10),e=E(0),i=E(6),h=E(3),f=E(1),o=E(13),v=E(12),n=E(11);function u(y,L,A){if(s.call(this,A),this.estimatedSize=r.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=y,L!=null&&L instanceof i)this.graphManager=L;else if(L!=null&&L instanceof Layout)this.graphManager=L.graphManager}u.prototype=Object.create(s.prototype);for(var g in s)u[g]=s[g];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(y,L,A){if(L==null&&A==null){var d=y;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(d)>-1)throw"Node already in graph!";return d.owner=this,this.getNodes().push(d),d}else{var N=y;if(!(this.getNodes().indexOf(L)>-1&&this.getNodes().indexOf(A)>-1))throw"Source or target not in graph!";if(!(L.owner==A.owner&&L.owner==this))throw"Both owners must be this graph!";if(L.owner!=A.owner)return null;if(N.source=L,N.target=A,N.isInterGraph=!1,this.getEdges().push(N),L.edges.push(N),A!=L)A.edges.push(N);return N}},u.prototype.remove=function(y){var L=y;if(y instanceof h){if(L==null)throw"Node is null!";if(!(L.owner!=null&&L.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var A=L.edges.slice(),d,N=A.length;for(var T=0;T<N;T++)if(d=A[T],d.isInterGraph)this.graphManager.remove(d);else d.source.owner.remove(d);var m=this.nodes.indexOf(L);if(m==-1)throw"Node not in owner node list!";this.nodes.splice(m,1)}else if(y instanceof f){var d=y;if(d==null)throw"Edge is null!";if(!(d.source!=null&&d.target!=null))throw"Source and/or target is null!";if(!(d.source.owner!=null&&d.target.owner!=null&&d.source.owner==this&&d.target.owner==this))throw"Source and/or target owner is invalid!";var a=d.source.edges.indexOf(d),c=d.target.edges.indexOf(d);if(!(a>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(d.source.edges.splice(a,1),d.target!=d.source)d.target.edges.splice(c,1);var m=d.source.owner.getEdges().indexOf(d);if(m==-1)throw"Not in owner's edge list!";d.source.owner.getEdges().splice(m,1)}},u.prototype.updateLeftTop=function(){var{MAX_VALUE:y,MAX_VALUE:L}=r,A,d,N,T=this.getNodes(),m=T.length;for(var a=0;a<m;a++){var c=T[a];if(A=c.getTop(),d=c.getLeft(),y>A)y=A;if(L>d)L=d}if(y==r.MAX_VALUE)return null;if(T[0].getParent().paddingLeft!=null)N=T[0].getParent().paddingLeft;else N=this.margin;return this.left=L-N,this.top=y-N,new v(this.left,this.top)},u.prototype.updateBounds=function(y){var L=r.MAX_VALUE,A=-r.MAX_VALUE,d=r.MAX_VALUE,N=-r.MAX_VALUE,T,m,a,c,p,D=this.nodes,O=D.length;for(var R=0;R<O;R++){var C=D[R];if(y&&C.child!=null)C.updateBounds();if(T=C.getLeft(),m=C.getRight(),a=C.getTop(),c=C.getBottom(),L>T)L=T;if(A<m)A=m;if(d>a)d=a;if(N<c)N=c}var w=new o(L,d,A-L,N-d);if(L==r.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(D[0].getParent().paddingLeft!=null)p=D[0].getParent().paddingLeft;else p=this.margin;this.left=w.x-p,this.right=w.x+w.width+p,this.top=w.y-p,this.bottom=w.y+w.height+p},u.calculateBounds=function(y){var L=r.MAX_VALUE,A=-r.MAX_VALUE,d=r.MAX_VALUE,N=-r.MAX_VALUE,T,m,a,c,p=y.length;for(var D=0;D<p;D++){var O=y[D];if(T=O.getLeft(),m=O.getRight(),a=O.getTop(),c=O.getBottom(),L>T)L=T;if(A<m)A=m;if(d>a)d=a;if(N<c)N=c}var R=new o(L,d,A-L,N-d);return R},u.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){var y=0,L=this.nodes,A=L.length;for(var d=0;d<A;d++){var N=L[d];y+=N.calcEstimatedSize()}if(y==0)this.estimatedSize=e.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=y/Math.sqrt(this.nodes.length);return this.estimatedSize},u.prototype.updateConnected=function(){var y=this;if(this.nodes.length==0){this.isConnected=!0;return}var L=new n,A=new Set,d=this.nodes[0],N,T,m=d.withChildren();m.forEach(function(R){L.push(R),A.add(R)});while(L.length!==0){d=L.shift(),N=d.getEdges();var a=N.length;for(var c=0;c<a;c++){var p=N[c];if(T=p.getOtherEndInGraph(d,this),T!=null&&!A.has(T)){var D=T.withChildren();D.forEach(function(R){L.push(R),A.add(R)})}}}if(this.isConnected=!1,A.size>=this.nodes.length){var O=0;if(A.forEach(function(R){if(R.owner==y)O++}),O==this.nodes.length)this.isConnected=!0}},I.exports=u},function(I,M,E){var s,r=E(1);function e(i){s=E(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),h=this.layout.newNode(null),f=this.add(i,h);return this.setRootGraph(f),this.rootGraph},e.prototype.add=function(i,h,f,o,v){if(f==null&&o==null&&v==null){if(i==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return i.parent=h,h.child=i,i}else{v=f,o=h,f=i;var n=o.getOwner(),u=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(u!=null&&u.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==u)return f.isInterGraph=!1,n.add(f,o,v);else{if(f.isInterGraph=!0,f.source=o,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}}},e.prototype.remove=function(i){if(i instanceof s){var h=i;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(h.getEdges());var o,v=f.length;for(var n=0;n<v;n++)o=f[n],h.remove(o);var u=[];u=u.concat(h.getNodes());var g;v=u.length;for(var n=0;n<v;n++)g=u[n],h.remove(g);if(h==this.rootGraph)this.setRootGraph(null);var y=this.graphs.indexOf(h);this.graphs.splice(y,1),h.parent=null}else if(i instanceof r){if(o=i,o==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(!(o.source!=null&&o.target!=null))throw"Source and/or target is null!";if(!(o.source.edges.indexOf(o)!=-1&&o.target.edges.indexOf(o)!=-1))throw"Source and/or target doesn't know this edge!";var y=o.source.edges.indexOf(o);if(o.source.edges.splice(y,1),y=o.target.edges.indexOf(o),o.target.edges.splice(y,1),!(o.source.owner!=null&&o.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";var y=o.source.owner.getGraphManager().edges.indexOf(o);o.source.owner.getGraphManager().edges.splice(y,1)}},e.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},e.prototype.getGraphs=function(){return this.graphs},e.prototype.getAllNodes=function(){if(this.allNodes==null){var i=[],h=this.getGraphs(),f=h.length;for(var o=0;o<f;o++)i=i.concat(h[o].getNodes());this.allNodes=i}return this.allNodes},e.prototype.resetAllNodes=function(){this.allNodes=null},e.prototype.resetAllEdges=function(){this.allEdges=null},e.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},e.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],h=this.getGraphs(),f=h.length;for(var o=0;o<h.length;o++)i=i.concat(h[o].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},e.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},e.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},e.prototype.getRoot=function(){return this.rootGraph},e.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=i,i.parent==null)i.parent=this.layout.newNode("Root node")},e.prototype.getLayout=function(){return this.layout},e.prototype.isOneAncestorOfOther=function(i,h){if(!(i!=null&&h!=null))throw"assert failed";if(i==h)return!0;var f=i.getOwner(),o;do{if(o=f.getParent(),o==null)break;if(o==h)return!0;if(f=o.getOwner(),f==null)break}while(!0);f=h.getOwner();do{if(o=f.getParent(),o==null)break;if(o==i)return!0;if(f=o.getOwner(),f==null)break}while(!0);return!1},e.prototype.calcLowestCommonAncestors=function(){var i,h,f,o,v,n=this.getAllEdges(),u=n.length;for(var g=0;g<u;g++){if(i=n[g],h=i.source,f=i.target,i.lca=null,i.sourceInLca=h,i.targetInLca=f,h==f){i.lca=h.getOwner();continue}o=h.getOwner();while(i.lca==null){i.targetInLca=f,v=f.getOwner();while(i.lca==null){if(v==o){i.lca=v;break}if(v==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=v.getParent(),v=i.targetInLca.getOwner()}if(o==this.rootGraph)break;if(i.lca==null)i.sourceInLca=o.getParent(),o=i.sourceInLca.getOwner()}if(i.lca==null)throw"assert failed"}},e.prototype.calcLowestCommonAncestor=function(i,h){if(i==h)return i.getOwner();var f=i.getOwner();do{if(f==null)break;var o=h.getOwner();do{if(o==null)break;if(o==f)return o;o=o.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},e.prototype.calcInclusionTreeDepths=function(i,h){if(i==null&&h==null)i=this.rootGraph,h=1;var f,o=i.getNodes(),v=o.length;for(var n=0;n<v;n++)if(f=o[n],f.inclusionTreeDepth=h,f.child!=null)this.calcInclusionTreeDepths(f.child,h+1)},e.prototype.includesInvalidEdge=function(){var i,h=this.edges.length;for(var f=0;f<h;f++)if(i=this.edges[f],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},I.exports=e},function(I,M,E){var s=E(0);function r(){}for(var e in s)r[e]=s[e];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=0.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=0.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,r.COOLING_ADAPTATION_FACTOR=0.33,r.ADAPTATION_LOWER_NODE_LIMIT=1000,r.ADAPTATION_UPPER_NODE_LIMIT=5000,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=r.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,I.exports=r},function(I,M,E){var s=E(12);function r(){}r.calcSeparationAmount=function(e,i,h,f){if(!e.intersects(i))throw"assert failed";var o=[,,];if(this.decideDirectionsForOverlappingNodes(e,i,o),h[0]=Math.min(e.getRight(),i.getRight())-Math.max(e.x,i.x),h[1]=Math.min(e.getBottom(),i.getBottom())-Math.max(e.y,i.y),e.getX()<=i.getX()&&e.getRight()>=i.getRight())h[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight());else if(i.getX()<=e.getX()&&i.getRight()>=e.getRight())h[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight());if(e.getY()<=i.getY()&&e.getBottom()>=i.getBottom())h[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom());else if(i.getY()<=e.getY()&&i.getBottom()>=e.getBottom())h[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom());var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));if(i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX())v=1;var n=v*h[0],u=h[1]/v;if(h[0]<u)u=h[0];else n=h[1];h[0]=-1*o[0]*(u/2+f),h[1]=-1*o[1]*(n/2+f)},r.decideDirectionsForOverlappingNodes=function(e,i,h){if(e.getCenterX()<i.getCenterX())h[0]=-1;else h[0]=1;if(e.getCenterY()<i.getCenterY())h[1]=-1;else h[1]=1},r.getIntersection2=function(e,i,h){var f=e.getCenterX(),o=e.getCenterY(),v=i.getCenterX(),n=i.getCenterY();if(e.intersects(i))return h[0]=f,h[1]=o,h[2]=v,h[3]=n,!0;var u=e.getX(),g=e.getY(),y=e.getRight(),L=e.getX(),A=e.getBottom(),d=e.getRight(),N=e.getWidthHalf(),T=e.getHeightHalf(),m=i.getX(),a=i.getY(),c=i.getRight(),p=i.getX(),D=i.getBottom(),O=i.getRight(),R=i.getWidthHalf(),C=i.getHeightHalf(),w=!1,x=!1;if(f===v){if(o>n)return h[0]=f,h[1]=g,h[2]=v,h[3]=D,!1;else if(o<n)return h[0]=f,h[1]=A,h[2]=v,h[3]=a,!1}else if(o===n){if(f>v)return h[0]=u,h[1]=o,h[2]=c,h[3]=n,!1;else if(f<v)return h[0]=y,h[1]=o,h[2]=m,h[3]=n,!1}else{var U=e.height/e.width,X=i.height/i.width,S=(n-o)/(v-f),G=void 0,F=void 0,P=void 0,_=void 0,H=void 0,Y=void 0;if(-U===S)if(f>v)h[0]=L,h[1]=A,w=!0;else h[0]=y,h[1]=g,w=!0;else if(U===S)if(f>v)h[0]=u,h[1]=g,w=!0;else h[0]=d,h[1]=A,w=!0;if(-X===S)if(v>f)h[2]=p,h[3]=D,x=!0;else h[2]=c,h[3]=a,x=!0;else if(X===S)if(v>f)h[2]=m,h[3]=a,x=!0;else h[2]=O,h[3]=D,x=!0;if(w&&x)return!1;if(f>v)if(o>n)G=this.getCardinalDirection(U,S,4),F=this.getCardinalDirection(X,S,2);else G=this.getCardinalDirection(-U,S,3),F=this.getCardinalDirection(-X,S,1);else if(o>n)G=this.getCardinalDirection(-U,S,1),F=this.getCardinalDirection(-X,S,3);else G=this.getCardinalDirection(U,S,2),F=this.getCardinalDirection(X,S,4);if(!w)switch(G){case 1:_=g,P=f+-T/S,h[0]=P,h[1]=_;break;case 2:P=d,_=o+N*S,h[0]=P,h[1]=_;break;case 3:_=A,P=f+T/S,h[0]=P,h[1]=_;break;case 4:P=L,_=o+-N*S,h[0]=P,h[1]=_;break}if(!x)switch(F){case 1:Y=a,H=v+-C/S,h[2]=H,h[3]=Y;break;case 2:H=O,Y=n+R*S,h[2]=H,h[3]=Y;break;case 3:Y=D,H=v+C/S,h[2]=H,h[3]=Y;break;case 4:H=p,Y=n+-R*S,h[2]=H,h[3]=Y;break}}return!1},r.getCardinalDirection=function(e,i,h){if(e>i)return h;else return 1+h%4},r.getIntersection=function(e,i,h,f){if(f==null)return this.getIntersection2(e,i,h);var{x:o,y:v}=e,{x:n,y:u}=i,{x:g,y}=h,{x:L,y:A}=f,d=void 0,N=void 0,T=void 0,m=void 0,a=void 0,c=void 0,p=void 0,D=void 0,O=void 0;if(T=u-v,a=o-n,p=n*v-o*u,m=A-y,c=g-L,D=L*y-g*A,O=T*c-m*a,O===0)return null;return d=(a*D-c*p)/O,N=(m*p-T*D)/O,new s(d,N)},r.angleOfVector=function(e,i,h,f){var o=void 0;if(e!==h){if(o=Math.atan((f-i)/(h-e)),h<e)o+=Math.PI;else if(f<i)o+=this.TWO_PI}else if(f<i)o=this.ONE_AND_HALF_PI;else o=this.HALF_PI;return o},r.doIntersect=function(e,i,h,f){var{x:o,y:v}=e,{x:n,y:u}=i,{x:g,y}=h,{x:L,y:A}=f,d=(n-o)*(A-y)-(L-g)*(u-v);if(d===0)return!1;else{var N=((A-y)*(L-o)+(g-L)*(A-v))/d,T=((v-u)*(L-o)+(n-o)*(A-v))/d;return 0<N&&N<1&&0<T&&T<1}},r.HALF_PI=0.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,I.exports=r},function(I,M,E){function s(){}s.sign=function(r){if(r>0)return 1;else if(r<0)return-1;else return 0},s.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},s.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},I.exports=s},function(I,M,E){function s(){}s.MAX_VALUE=2147483647,s.MIN_VALUE=-2147483648,I.exports=s},function(I,M,E){var s=function(){function o(v,n){for(var u=0;u<n.length;u++){var g=n[u];if(g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g)g.writable=!0;Object.defineProperty(v,g.key,g)}}return function(v,n,u){if(n)o(v.prototype,n);if(u)o(v,u);return v}}();function r(o,v){if(!(o instanceof v))throw TypeError("Cannot call a class as a function")}var e=function(v){return{value:v,next:null,prev:null}},i=function(v,n,u,g){if(v!==null)v.next=n;else g.head=n;if(u!==null)u.prev=n;else g.tail=n;return n.prev=v,n.next=u,g.length++,n},h=function(v,n){var{prev:u,next:g}=v;if(u!==null)u.next=g;else n.head=g;if(g!==null)g.prev=u;else n.tail=u;return v.prev=v.next=null,n.length--,v},f=function(){function o(v){var n=this;if(r(this,o),this.length=0,this.head=null,this.tail=null,v!=null)v.forEach(function(u){return n.push(u)})}return s(o,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(n,u){return i(u.prev,e(n),u,this)}},{key:"insertAfter",value:function(n,u){return i(u,e(n),u.next,this)}},{key:"insertNodeBefore",value:function(n,u){return i(u.prev,n,u,this)}},{key:"insertNodeAfter",value:function(n,u){return i(u,n,u.next,this)}},{key:"push",value:function(n){return i(this.tail,e(n),null,this)}},{key:"unshift",value:function(n){return i(null,e(n),this.head,this)}},{key:"remove",value:function(n){return h(n,this)}},{key:"pop",value:function(){return h(this.tail,this).value}},{key:"popNode",value:function(){return h(this.tail,this)}},{key:"shift",value:function(){return h(this.head,this).value}},{key:"shiftNode",value:function(){return h(this.head,this)}},{key:"get_object_at",value:function(n){if(n<=this.length()){var u=1,g=this.head;while(u<n)g=g.next,u++;return g.value}}},{key:"set_object_at",value:function(n,u){if(n<=this.length()){var g=1,y=this.head;while(g<n)y=y.next,g++;y.value=u}}}]),o}();I.exports=f},function(I,M,E){function s(r,e,i){if(this.x=null,this.y=null,r==null&&e==null&&i==null)this.x=0,this.y=0;else if(typeof r=="number"&&typeof e=="number"&&i==null)this.x=r,this.y=e;else if(r.constructor.name=="Point"&&e==null&&i==null)i=r,this.x=i.x,this.y=i.y}s.prototype.getX=function(){return this.x},s.prototype.getY=function(){return this.y},s.prototype.getLocation=function(){return new s(this.x,this.y)},s.prototype.setLocation=function(r,e,i){if(r.constructor.name=="Point"&&e==null&&i==null)i=r,this.setLocation(i.x,i.y);else if(typeof r=="number"&&typeof e=="number"&&i==null)if(parseInt(r)==r&&parseInt(e)==e)this.move(r,e);else this.x=Math.floor(r+0.5),this.y=Math.floor(e+0.5)},s.prototype.move=function(r,e){this.x=r,this.y=e},s.prototype.translate=function(r,e){this.x+=r,this.y+=e},s.prototype.equals=function(r){if(r.constructor.name=="Point"){var e=r;return this.x==e.x&&this.y==e.y}return this==r},s.prototype.toString=function(){return new s().constructor.name+"[x="+this.x+",y="+this.y+"]"},I.exports=s},function(I,M,E){function s(r,e,i,h){if(this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&e!=null&&i!=null&&h!=null)this.x=r,this.y=e,this.width=i,this.height=h}s.prototype.getX=function(){return this.x},s.prototype.setX=function(r){this.x=r},s.prototype.getY=function(){return this.y},s.prototype.setY=function(r){this.y=r},s.prototype.getWidth=function(){return this.width},s.prototype.setWidth=function(r){this.width=r},s.prototype.getHeight=function(){return this.height},s.prototype.setHeight=function(r){this.height=r},s.prototype.getRight=function(){return this.x+this.width},s.prototype.getBottom=function(){return this.y+this.height},s.prototype.intersects=function(r){if(this.getRight()<r.x)return!1;if(this.getBottom()<r.y)return!1;if(r.getRight()<this.x)return!1;if(r.getBottom()<this.y)return!1;return!0},s.prototype.getCenterX=function(){return this.x+this.width/2},s.prototype.getMinX=function(){return this.getX()},s.prototype.getMaxX=function(){return this.getX()+this.width},s.prototype.getCenterY=function(){return this.y+this.height/2},s.prototype.getMinY=function(){return this.getY()},s.prototype.getMaxY=function(){return this.getY()+this.height},s.prototype.getWidthHalf=function(){return this.width/2},s.prototype.getHeightHalf=function(){return this.height/2},I.exports=s},function(I,M,E){var s=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function r(){}r.lastID=0,r.createID=function(e){if(r.isPrimitive(e))return e;if(e.uniqueID!=null)return e.uniqueID;return e.uniqueID=r.getString(),r.lastID++,e.uniqueID},r.getString=function(e){if(e==null)e=r.lastID;return"Object#"+e},r.isPrimitive=function(e){var i=typeof e>"u"?"undefined":s(e);return e==null||i!="object"&&i!="function"},I.exports=r},function(I,M,E){function s(g){if(Array.isArray(g)){for(var y=0,L=Array(g.length);y<g.length;y++)L[y]=g[y];return L}else return Array.from(g)}var r=E(0),e=E(6),i=E(3),h=E(1),f=E(5),o=E(4),v=E(17),n=E(27);function u(g){if(n.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new e(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null)this.isRemoteUse=g}u.RANDOM_SEED=1,u.prototype=Object.create(n.prototype),u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var g=new e(this);return this.graphManager=g,g},u.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},u.prototype.newNode=function(g){return new i(this.graphManager,g)},u.prototype.newEdge=function(g){return new h(null,null,g)},u.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var g;if(this.checkLayoutSuccess())g=!1;else g=this.layout();if(r.ANIMATE==="during")return!1;if(g){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,g},u.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var g,y=this.graphManager.getAllEdges();for(var L=0;L<y.length;L++)g=y[L];var A,d=this.graphManager.getRoot().getNodes();for(var L=0;L<d.length;L++)A=d[L];this.update(this.graphManager.getRoot())}},u.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof i){var y=g;if(y.getChild()!=null){var L=y.getChild().getNodes();for(var A=0;A<L.length;A++)update(L[A])}if(y.vGraphObject!=null){var d=y.vGraphObject;d.update(y)}}else if(g instanceof h){var N=g;if(N.vGraphObject!=null){var T=N.vGraphObject;T.update(N)}}else if(g instanceof f){var m=g;if(m.vGraphObject!=null){var a=m.vGraphObject;a.update(m)}}},u.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},u.prototype.transform=function(g){if(g==null)this.transform(new o(0,0));else{var y=new v,L=this.graphManager.getRoot().updateLeftTop();if(L!=null){y.setWorldOrgX(g.x),y.setWorldOrgY(g.y),y.setDeviceOrgX(L.x),y.setDeviceOrgY(L.y);var A=this.getAllNodes(),d;for(var N=0;N<A.length;N++)d=A[N],d.transform(y)}}},u.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var y,L,A=g.getNodes();for(var d=0;d<A.length;d++)if(y=A[d],L=y.getChild(),L==null)y.scatter();else if(L.getNodes().length==0)y.scatter();else this.positionNodesRandomly(L),y.updateBounds()}},u.prototype.getFlatForest=function(){var g=[],y=!0,L=this.graphManager.getRoot().getNodes(),A=!0;for(var d=0;d<L.length;d++)if(L[d].getChild()!=null)A=!1;if(!A)return g;var N=new Set,T=[],m=new Map,a=[];a=a.concat(L);while(a.length>0&&y){T.push(a[0]);while(T.length>0&&y){var c=T[0];T.splice(0,1),N.add(c);var p=c.getEdges();for(var d=0;d<p.length;d++){var D=p[d].getOtherEnd(c);if(m.get(c)!=D)if(!N.has(D))T.push(D),m.set(D,c);else{y=!1;break}}}if(!y)g=[];else{var O=[].concat(s(N));g.push(O);for(var d=0;d<O.length;d++){var R=O[d],C=a.indexOf(R);if(C>-1)a.splice(C,1)}N=new Set,m=new Map}}return g},u.prototype.createDummyNodesForBendpoints=function(g){var y=[],L=g.source,A=this.graphManager.calcLowestCommonAncestor(g.source,g.target);for(var d=0;d<g.bendpoints.length;d++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),A.add(N);var T=this.newEdge(null);this.graphManager.add(T,L,N),y.add(N),L=N}var T=this.newEdge(null);if(this.graphManager.add(T,L,g.target),this.edgeToDummyNodes.set(g,y),g.isInterGraph())this.graphManager.remove(g);else A.remove(g);return y},u.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(s(this.edgeToDummyNodes.keys())).concat(g);for(var y=0;y<g.length;y++){var L=g[y];if(L.bendpoints.length>0){var A=this.edgeToDummyNodes.get(L);for(var d=0;d<A.length;d++){var N=A[d],T=new o(N.getCenterX(),N.getCenterY()),m=L.bendpoints.get(d);m.x=T.x,m.y=T.y,N.getOwner().remove(N)}this.graphManager.add(L,L.source,L.target)}}},u.transform=function(g,y,L,A){if(L!=null&&A!=null){var d=y;if(g<=50){var N=y/L;d-=(y-N)/50*(50-g)}else{var T=y*A;d+=(T-y)/50*(g-50)}return d}else{var m,a;if(g<=50)m=9*y/500,a=y/10;else m=9*y/50,a=-8*y;return m*g+a}},u.findCenterOfTree=function(g){var y=[];y=y.concat(g);var L=[],A=new Map,d=!1,N=null;if(y.length==1||y.length==2)d=!0,N=y[0];for(var T=0;T<y.length;T++){var m=y[T],a=m.getNeighborsList().size;if(A.set(m,m.getNeighborsList().size),a==1)L.push(m)}var c=[];c=c.concat(L);while(!d){var p=[];p=p.concat(c),c=[];for(var T=0;T<y.length;T++){var m=y[T],D=y.indexOf(m);if(D>=0)y.splice(D,1);var O=m.getNeighborsList();O.forEach(function(w){if(L.indexOf(w)<0){var x=A.get(w),U=x-1;if(U==1)c.push(w);A.set(w,U)}})}if(L=L.concat(c),y.length==1||y.length==2)d=!0,N=y[0]}return N},u.prototype.setGraphManager=function(g){this.graphManager=g},I.exports=u},function(I,M,E){function s(){}s.seed=1,s.x=0,s.nextDouble=function(){return s.x=Math.sin(s.seed++)*1e4,s.x-Math.floor(s.x)},I.exports=s},function(I,M,E){var s=E(4);function r(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(e){this.lworldExtX=e},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(e){this.lworldExtY=e},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},r.prototype.transformX=function(e){var i=0,h=this.lworldExtX;if(h!=0)i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/h;return i},r.prototype.transformY=function(e){var i=0,h=this.lworldExtY;if(h!=0)i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/h;return i},r.prototype.inverseTransformX=function(e){var i=0,h=this.ldeviceExtX;if(h!=0)i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/h;return i},r.prototype.inverseTransformY=function(e){var i=0,h=this.ldeviceExtY;if(h!=0)i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/h;return i},r.prototype.inverseTransformPoint=function(e){var i=new s(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},I.exports=r},function(I,M,E){function s(n){if(Array.isArray(n)){for(var u=0,g=Array(n.length);u<n.length;u++)g[u]=n[u];return g}else return Array.from(n)}var r=E(15),e=E(7),i=E(0),h=E(8),f=E(9);function o(){r.call(this),this.useSmartIdealEdgeLengthCalculation=e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=e.DEFAULT_EDGE_LENGTH,this.springConstant=e.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=e.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=e.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=e.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=e.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*e.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=e.MAX_ITERATIONS}o.prototype=Object.create(r.prototype);for(var v in r)o[v]=r[v];o.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){var n,u,g,y,L,A,d=this.getGraphManager().getAllEdges();for(var N=0;N<d.length;N++)if(n=d[N],n.idealLength=this.idealEdgeLength,n.isInterGraph){if(g=n.getSource(),y=n.getTarget(),L=n.getSourceInLca().getEstimatedSize(),A=n.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)n.idealLength+=L+A-2*i.SIMPLE_NODE_SIZE;u=n.getLca().getInclusionTreeDepth(),n.idealLength+=e.DEFAULT_EDGE_LENGTH*e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*u)}},o.prototype.initSpringEmbedder=function(){var n=this.getAllNodes().length;if(this.incremental){if(n>e.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(n>e.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){var n=this.getAllEdges(),u;for(var g=0;g<n.length;g++)u=n[g],this.calcSpringForce(u,u.idealLength)},o.prototype.calcRepulsionForces=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,y,L,A,d=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n)this.updateGrid();N=new Set;for(g=0;g<d.length;g++)L=d[g],this.calculateRepulsionForceOfANode(L,N,n,u),N.add(L)}else for(g=0;g<d.length;g++){L=d[g];for(y=g+1;y<d.length;y++){if(A=d[y],L.getOwner()!=A.getOwner())continue;this.calcRepulsionForce(L,A)}}},o.prototype.calcGravitationalForces=function(){var n,u=this.getAllNodesToApplyGravitation();for(var g=0;g<u.length;g++)n=u[g],this.calcGravitationalForce(n)},o.prototype.moveNodes=function(){var n=this.getAllNodes(),u;for(var g=0;g<n.length;g++)u=n[g],u.move()},o.prototype.calcSpringForce=function(n,u){var g=n.getSource(),y=n.getTarget(),L,A,d,N;if(this.uniformLeafNodeSizes&&g.getChild()==null&&y.getChild()==null)n.updateLengthSimple();else if(n.updateLength(),n.isOverlapingSourceAndTarget)return;if(L=n.getLength(),L==0)return;A=this.springConstant*(L-u),d=A*(n.lengthX/L),N=A*(n.lengthY/L),g.springForceX+=d,g.springForceY+=N,y.springForceX-=d,y.springForceY-=N},o.prototype.calcRepulsionForce=function(n,u){var g=n.getRect(),y=u.getRect(),L=[,,],A=[,,,,],d,N,T,m,a,c,p;if(g.intersects(y)){h.calcSeparationAmount(g,y,L,e.DEFAULT_EDGE_LENGTH/2),c=2*L[0],p=2*L[1];var D=n.noOfChildren*u.noOfChildren/(n.noOfChildren+u.noOfChildren);n.repulsionForceX-=D*c,n.repulsionForceY-=D*p,u.repulsionForceX+=D*c,u.repulsionForceY+=D*p}else{if(this.uniformLeafNodeSizes&&n.getChild()==null&&u.getChild()==null)d=y.getCenterX()-g.getCenterX(),N=y.getCenterY()-g.getCenterY();else h.getIntersection(g,y,A),d=A[2]-A[0],N=A[3]-A[1];if(Math.abs(d)<e.MIN_REPULSION_DIST)d=f.sign(d)*e.MIN_REPULSION_DIST;if(Math.abs(N)<e.MIN_REPULSION_DIST)N=f.sign(N)*e.MIN_REPULSION_DIST;T=d*d+N*N,m=Math.sqrt(T),a=this.repulsionConstant*n.noOfChildren*u.noOfChildren/T,c=a*d/m,p=a*N/m,n.repulsionForceX-=c,n.repulsionForceY-=p,u.repulsionForceX+=c,u.repulsionForceY+=p}},o.prototype.calcGravitationalForce=function(n){var u,g,y,L,A,d,N,T;if(u=n.getOwner(),g=(u.getRight()+u.getLeft())/2,y=(u.getTop()+u.getBottom())/2,L=n.getCenterX()-g,A=n.getCenterY()-y,d=Math.abs(L)+n.getWidth()/2,N=Math.abs(A)+n.getHeight()/2,n.getOwner()==this.graphManager.getRoot()){if(T=u.getEstimatedSize()*this.gravityRangeFactor,d>T||N>T)n.gravitationForceX=-this.gravityConstant*L,n.gravitationForceY=-this.gravityConstant*A}else if(T=u.getEstimatedSize()*this.compoundGravityRangeFactor,d>T||N>T)n.gravitationForceX=-this.gravityConstant*L*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*A*this.compoundGravityConstant},o.prototype.isConverged=function(){var n,u=!1;if(this.totalIterations>this.maxIterations/3)u=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return n=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,n||u},o.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},o.prototype.calcNoOfChildrenForAllNodes=function(){var n,u=this.graphManager.getAllNodes();for(var g=0;g<u.length;g++)n=u[g],n.noOfChildren=n.getNoOfChildren()},o.prototype.calcGrid=function(n){var u=0,g=0;u=parseInt(Math.ceil((n.getRight()-n.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((n.getBottom()-n.getTop())/this.repulsionRange));var y=Array(u);for(var L=0;L<u;L++)y[L]=Array(g);for(var L=0;L<u;L++)for(var A=0;A<g;A++)y[L][A]=[];return y},o.prototype.addNodeToGrid=function(n,u,g){var y=0,L=0,A=0,d=0;y=parseInt(Math.floor((n.getRect().x-u)/this.repulsionRange)),L=parseInt(Math.floor((n.getRect().width+n.getRect().x-u)/this.repulsionRange)),A=parseInt(Math.floor((n.getRect().y-g)/this.repulsionRange)),d=parseInt(Math.floor((n.getRect().height+n.getRect().y-g)/this.repulsionRange));for(var N=y;N<=L;N++)for(var T=A;T<=d;T++)this.grid[N][T].push(n),n.setGridCoordinates(y,L,A,d)},o.prototype.updateGrid=function(){var n,u,g=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(n=0;n<g.length;n++)u=g[n],this.addNodeToGrid(u,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(n,u,g,y){if(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&g||y){var L=new Set;n.surrounding=[];var A,d=this.grid;for(var N=n.startX-1;N<n.finishX+2;N++)for(var T=n.startY-1;T<n.finishY+2;T++)if(!(N<0||T<0||N>=d.length||T>=d[0].length))for(var m=0;m<d[N][T].length;m++){if(A=d[N][T][m],n.getOwner()!=A.getOwner()||n==A)continue;if(!u.has(A)&&!L.has(A)){var a=Math.abs(n.getCenterX()-A.getCenterX())-(n.getWidth()/2+A.getWidth()/2),c=Math.abs(n.getCenterY()-A.getCenterY())-(n.getHeight()/2+A.getHeight()/2);if(a<=this.repulsionRange&&c<=this.repulsionRange)L.add(A)}}n.surrounding=[].concat(s(L))}for(N=0;N<n.surrounding.length;N++)this.calcRepulsionForce(n,n.surrounding[N])},o.prototype.calcRepulsionRange=function(){return 0},I.exports=o},function(I,M,E){var s=E(1),r=E(7);function e(h,f,o){s.call(this,h,f,o),this.idealLength=r.DEFAULT_EDGE_LENGTH}e.prototype=Object.create(s.prototype);for(var i in s)e[i]=s[i];I.exports=e},function(I,M,E){var s=E(3);function r(i,h,f,o){s.call(this,i,h,f,o),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}r.prototype=Object.create(s.prototype);for(var e in s)r[e]=s[e];r.prototype.setGridCoordinates=function(i,h,f,o){this.startX=i,this.finishX=h,this.startY=f,this.finishY=o},I.exports=r},function(I,M,E){function s(r,e){if(this.width=0,this.height=0,r!==null&&e!==null)this.height=e,this.width=r}s.prototype.getWidth=function(){return this.width},s.prototype.setWidth=function(r){this.width=r},s.prototype.getHeight=function(){return this.height},s.prototype.setHeight=function(r){this.height=r},I.exports=s},function(I,M,E){var s=E(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(e,i){var h=s.createID(e);if(!this.contains(h))this.map[h]=i,this.keys.push(e)},r.prototype.contains=function(e){var i=s.createID(e);return this.map[e]!=null},r.prototype.get=function(e){var i=s.createID(e);return this.map[i]},r.prototype.keySet=function(){return this.keys},I.exports=r},function(I,M,E){var s=E(14);function r(){this.set={}}r.prototype.add=function(e){var i=s.createID(e);if(!this.contains(i))this.set[i]=e},r.prototype.remove=function(e){delete this.set[s.createID(e)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(e){return this.set[s.createID(e)]==e},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(e){var i=Object.keys(this.set),h=i.length;for(var f=0;f<h;f++)e.push(this.set[i[f]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(e){var i=e.length;for(var h=0;h<i;h++){var f=e[h];this.add(f)}},I.exports=r},function(I,M,E){var s=function(){function h(f,o){for(var v=0;v<o.length;v++){var n=o[v];if(n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n)n.writable=!0;Object.defineProperty(f,n.key,n)}}return function(f,o,v){if(o)h(f.prototype,o);if(v)h(f,v);return f}}();function r(h,f){if(!(h instanceof f))throw TypeError("Cannot call a class as a function")}var e=E(11),i=function(){function h(f,o){if(r(this,h),o!==null||o!==void 0)this.compareFunction=this._defaultCompareFunction;var v=void 0;if(f instanceof e)v=f.size();else v=f.length;this._quicksort(f,0,v-1)}return s(h,[{key:"_quicksort",value:function(o,v,n){if(v<n){var u=this._partition(o,v,n);this._quicksort(o,v,u),this._quicksort(o,u+1,n)}}},{key:"_partition",value:function(o,v,n){var u=this._get(o,v),g=v,y=n;while(!0){while(this.compareFunction(u,this._get(o,y)))y--;while(this.compareFunction(this._get(o,g),u))g++;if(g<y)this._swap(o,g,y),g++,y--;else return y}}},{key:"_get",value:function(o,v){if(o instanceof e)return o.get_object_at(v);else return o[v]}},{key:"_set",value:function(o,v,n){if(o instanceof e)o.set_object_at(v,n);else o[v]=n}},{key:"_swap",value:function(o,v,n){var u=this._get(o,v);this._set(o,v,this._get(o,n)),this._set(o,n,u)}},{key:"_defaultCompareFunction",value:function(o,v){return v>o}}]),h}();I.exports=i},function(I,M,E){var s=function(){function i(h,f){for(var o=0;o<f.length;o++){var v=f[o];if(v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v)v.writable=!0;Object.defineProperty(h,v.key,v)}}return function(h,f,o){if(f)i(h.prototype,f);if(o)i(h,o);return h}}();function r(i,h){if(!(i instanceof h))throw TypeError("Cannot call a class as a function")}var e=function(){function i(h,f){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;r(this,i),this.sequence1=h,this.sequence2=f,this.match_score=o,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=h.length+1,this.jMax=f.length+1,this.grid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.grid[u]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[u][g]=0}this.tracebackGrid=Array(this.iMax);for(var y=0;y<this.iMax;y++){this.tracebackGrid[y]=Array(this.jMax);for(var L=0;L<this.jMax;L++)this.tracebackGrid[y][L]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return s(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var o=1;o<this.iMax;o++)this.grid[o][0]=this.grid[o-1][0]+this.gap_penalty,this.tracebackGrid[o][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var n=1;n<this.jMax;n++){var u=void 0;if(this.sequence1[v-1]===this.sequence2[n-1])u=this.grid[v-1][n-1]+this.match_score;else u=this.grid[v-1][n-1]+this.mismatch_penalty;var g=this.grid[v-1][n]+this.gap_penalty,y=this.grid[v][n-1]+this.gap_penalty,L=[u,g,y],A=this.arrayAllMaxIndexes(L);this.grid[v][n]=L[A[0]],this.tracebackGrid[v][n]=[A.includes(0),A.includes(1),A.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(f[0]){var o=f[0],v=this.tracebackGrid[o.pos[0]][o.pos[1]];if(v[0])f.push({pos:[o.pos[0]-1,o.pos[1]-1],seq1:this.sequence1[o.pos[0]-1]+o.seq1,seq2:this.sequence2[o.pos[1]-1]+o.seq2});if(v[1])f.push({pos:[o.pos[0]-1,o.pos[1]],seq1:this.sequence1[o.pos[0]-1]+o.seq1,seq2:"-"+o.seq2});if(v[2])f.push({pos:[o.pos[0],o.pos[1]-1],seq1:"-"+o.seq1,seq2:this.sequence2[o.pos[1]-1]+o.seq2});if(o.pos[0]===0&&o.pos[1]===0)this.alignments.push({sequence1:o.seq1,sequence2:o.seq2});f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,o){var v=[],n=-1;while((n=f.indexOf(o,n+1))!==-1)v.push(n);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),i}();I.exports=e},function(I,M,E){var s=function(){return};s.FDLayout=E(18),s.FDLayoutConstants=E(7),s.FDLayoutEdge=E(19),s.FDLayoutNode=E(20),s.DimensionD=E(21),s.HashMap=E(22),s.HashSet=E(23),s.IGeometry=E(8),s.IMath=E(9),s.Integer=E(10),s.Point=E(12),s.PointD=E(4),s.RandomSeed=E(16),s.RectangleD=E(13),s.Transform=E(17),s.UniqueIDGeneretor=E(14),s.Quicksort=E(24),s.LinkedList=E(11),s.LGraphObject=E(2),s.LGraph=E(5),s.LEdge=E(1),s.LGraphManager=E(6),s.LNode=E(3),s.Layout=E(15),s.LayoutConstants=E(0),s.NeedlemanWunsch=E(25),I.exports=s},function(I,M,E){function s(){this.listeners=[]}var r=s.prototype;r.addListener=function(e,i){this.listeners.push({event:e,callback:i})},r.removeListener=function(e,i){for(var h=this.listeners.length;h>=0;h--){var f=this.listeners[h];if(f.event===e&&f.callback===i)this.listeners.splice(h,1)}},r.emit=function(e,i){for(var h=0;h<this.listeners.length;h++){var f=this.listeners[h];if(e===f.event)f.callback(i)}},I.exports=s}])})});var J=Fn(function(Q,z){(function(M,E){if(typeof Q==="object"&&typeof z==="object")z.exports=E(q());else if(typeof define==="function"&&define.amd)define(["layout-base"],E);else if(typeof Q==="object")Q.coseBase=E(q());else M.coseBase=E(M.layoutBase)})(Q,function(I){return function(M){var E={};function s(r){if(E[r])return E[r].exports;var e=E[r]={i:r,l:!1,exports:{}};return M[r].call(e.exports,e,e.exports,s),e.l=!0,e.exports}return s.m=M,s.c=E,s.i=function(r){return r},s.d=function(r,e,i){if(!s.o(r,e))Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:i})},s.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return s.d(e,"a",e),e},s.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},s.p="",s(s.s=7)}([function(M,E){M.exports=I},function(M,E,s){var r=s(0).FDLayoutConstants;function e(){}for(var i in r)e[i]=r[i];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TREE_REDUCTION_ON_INCREMENTAL=!1,M.exports=e},function(M,E,s){var r=s(0).FDLayoutEdge;function e(h,f,o){r.call(this,h,f,o)}e.prototype=Object.create(r.prototype);for(var i in r)e[i]=r[i];M.exports=e},function(M,E,s){var r=s(0).LGraph;function e(h,f,o){r.call(this,h,f,o)}e.prototype=Object.create(r.prototype);for(var i in r)e[i]=r[i];M.exports=e},function(M,E,s){var r=s(0).LGraphManager;function e(h){r.call(this,h)}e.prototype=Object.create(r.prototype);for(var i in r)e[i]=r[i];M.exports=e},function(M,E,s){var r=s(0).FDLayoutNode,e=s(0).IMath;function i(f,o,v,n){r.call(this,f,o,v,n)}i.prototype=Object.create(r.prototype);for(var h in r)i[h]=r[h];i.prototype.move=function(){var f=this.graphManager.getLayout();if(this.displacementX=f.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=f.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>f.coolingFactor*f.maxNodeDisplacement)this.displacementX=f.coolingFactor*f.maxNodeDisplacement*e.sign(this.displacementX);if(Math.abs(this.displacementY)>f.coolingFactor*f.maxNodeDisplacement)this.displacementY=f.coolingFactor*f.maxNodeDisplacement*e.sign(this.displacementY);if(this.child==null)this.moveBy(this.displacementX,this.displacementY);else if(this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY);else this.propogateDisplacementToChildren(this.displacementX,this.displacementY);f.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(f,o){var v=this.getChild().getNodes(),n;for(var u=0;u<v.length;u++)if(n=v[u],n.getChild()==null)n.moveBy(f,o),n.displacementX+=f,n.displacementY+=o;else n.propogateDisplacementToChildren(f,o)},i.prototype.setPred1=function(f){this.pred1=f},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(f){this.next=f},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(f){this.processed=f},i.prototype.isProcessed=function(){return processed},M.exports=i},function(M,E,s){var r=s(0).FDLayout,e=s(4),i=s(3),h=s(5),f=s(2),o=s(1),v=s(0).FDLayoutConstants,n=s(0).LayoutConstants,u=s(0).Point,g=s(0).PointD,y=s(0).Layout,L=s(0).Integer,A=s(0).IGeometry,d=s(0).LGraph,N=s(0).Transform;function T(){r.call(this),this.toBeTiled={}}T.prototype=Object.create(r.prototype);for(var m in r)T[m]=r[m];T.prototype.newGraphManager=function(){var a=new e(this);return this.graphManager=a,a},T.prototype.newGraph=function(a){return new i(null,this.graphManager,a)},T.prototype.newNode=function(a){return new h(this.graphManager,a)},T.prototype.newEdge=function(a){return new f(null,null,a)},T.prototype.initParameters=function(){if(r.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(o.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=v.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=v.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=v.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=v.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/v.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=v.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1}},T.prototype.layout=function(){var a=n.DEFAULT_CREATE_BENDS_AS_NEEDED;if(a)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(D){return c.has(D)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}else if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return c.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(this.layoutQuality==1)this.coolingAdjuster=this.coolingCycle/3;this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return a.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){var a=this.graphManager.getAllNodes(),c={};for(var p=0;p<a.length;p++){var D=a[p].rect,O=a[p].id;c[O]={id:O,x:D.getCenterX(),y:D.getCenterY(),w:D.width,h:D.height}}return c},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(v.ANIMATE==="during")this.emit("layoutstarted");else{while(!a)a=this.tick();this.graphManager.updateBounds()}},T.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],c,p=this.graphManager.getGraphs(),D=p.length,O;for(O=0;O<D;O++)if(c=p[O],c.updateConnected(),!c.isConnected)a=a.concat(c.getNodes());return a},T.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var c=new Set,p;for(p=0;p<a.length;p++){var D=a[p];if(!c.has(D)){var O=D.getSource(),R=D.getTarget();if(O==R)D.getBendpoints().push(new g),D.getBendpoints().push(new g),this.createDummyNodesForBendpoints(D),c.add(D);else{var C=[];if(C=C.concat(O.getEdgeListToNode(R)),C=C.concat(R.getEdgeListToNode(O)),!c.has(C[0])){if(C.length>1){var w;for(w=0;w<C.length;w++){var x=C[w];x.getBendpoints().push(new g),this.createDummyNodesForBendpoints(x)}}C.forEach(function(U){c.add(U)})}}}if(c.size==a.length)break}},T.prototype.positionNodesRadially=function(a){var c=new u(0,0),p=Math.ceil(Math.sqrt(a.length)),D=0,O=0,R=0,C=new g(0,0);for(var w=0;w<a.length;w++){if(w%p==0){if(R=0,O=D,w!=0)O+=o.DEFAULT_COMPONENT_SEPERATION;D=0}var x=a[w],U=y.findCenterOfTree(x);if(c.x=R,c.y=O,C=T.radialLayout(x,U,c),C.y>D)D=Math.floor(C.y);R=Math.floor(C.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(n.WORLD_CENTER_X-C.x/2,n.WORLD_CENTER_Y-C.y/2))},T.radialLayout=function(a,c,p){var D=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(c,null,0,359,0,D);var O=d.calculateBounds(a),R=new N;R.setDeviceOrgX(O.getMinX()),R.setDeviceOrgY(O.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var C=0;C<a.length;C++){var w=a[C];w.transform(R)}var x=new g(O.getMaxX(),O.getMaxY());return R.inverseTransformPoint(x)},T.branchRadialLayout=function(a,c,p,D,O,R){var C=(D-p+1)/2;if(C<0)C+=180;var w=(C+p)%360,x=w*A.TWO_PI/360,U=Math.cos(x),X=O*Math.cos(x),S=O*Math.sin(x);a.setCenter(X,S);var G=[];G=G.concat(a.getEdges());var F=G.length;if(c!=null)F--;var P=0,_=G.length,H,Y=a.getEdgesBetween(c);while(Y.length>1){var W=Y[0];Y.splice(0,1);var k=G.indexOf(W);if(k>=0)G.splice(k,1);_--,F--}if(c!=null)H=(G.indexOf(Y[0])+1)%_;else H=0;var B=Math.abs(D-p)/F;for(var V=H;P!=F;V=++V%_){var et=G[V].getOtherEnd(a);if(et==c)continue;var rt=(p+P*B)%360,ft=(rt+B)%360;T.branchRadialLayout(et,a,rt,ft,O+R,R),P++}},T.maxDiagonalInTree=function(a){var c=L.MIN_VALUE;for(var p=0;p<a.length;p++){var D=a[p],O=D.getDiagonal();if(O>c)c=O}return c},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var a=this,c={};this.memberGroups={},this.idToDummyNode={};var p=[],D=this.graphManager.getAllNodes();for(var O=0;O<D.length;O++){var R=D[O],C=R.getParent();if(this.getNodeDegreeWithChildren(R)===0&&(C.id==null||!this.getToBeTiled(C)))p.push(R)}for(var O=0;O<p.length;O++){var R=p[O],w=R.getParent().id;if(typeof c[w]>"u")c[w]=[];c[w]=c[w].concat(R)}Object.keys(c).forEach(function(x){if(c[x].length>1){var U="DummyCompound_"+x;a.memberGroups[U]=c[x];var X=c[x][0].getParent(),S=new h(a.graphManager);S.id=U,S.paddingLeft=X.paddingLeft||0,S.paddingRight=X.paddingRight||0,S.paddingBottom=X.paddingBottom||0,S.paddingTop=X.paddingTop||0,a.idToDummyNode[U]=S;var G=a.getGraphManager().add(a.newGraph(),S),F=X.getChild();F.add(S);for(var P=0;P<c[x].length;P++){var _=c[x][P];F.remove(_),G.add(_)}}})},T.prototype.clearCompounds=function(){var a={},c={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)c[this.compoundOrder[p].id]=this.compoundOrder[p],a[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,c)},T.prototype.clearZeroDegreeMembers=function(){var a=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var D=a.idToDummyNode[p];c[p]=a.tileNodes(a.memberGroups[p],D.paddingLeft+D.paddingRight),D.rect.width=c[p].width,D.rect.height=c[p].height})},T.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var c=this.compoundOrder[a],{id:p,paddingLeft:D,paddingTop:O}=c;this.adjustLocations(this.tiledMemberPack[p],c.rect.x,c.rect.y,D,O)}},T.prototype.repopulateZeroDegreeMembers=function(){var a=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(p){var D=a.idToDummyNode[p],{paddingLeft:O,paddingTop:R}=D;a.adjustLocations(c[p],D.rect.x,D.rect.y,O,R)})},T.prototype.getToBeTiled=function(a){var c=a.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var p=a.getChild();if(p==null)return this.toBeTiled[c]=!1,!1;var D=p.getNodes();for(var O=0;O<D.length;O++){var R=D[O];if(this.getNodeDegree(R)>0)return this.toBeTiled[c]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[c]=!1,!1}return this.toBeTiled[c]=!0,!0},T.prototype.getNodeDegree=function(a){var c=a.id,p=a.getEdges(),D=0;for(var O=0;O<p.length;O++){var R=p[O];if(R.getSource().id!==R.getTarget().id)D=D+1}return D},T.prototype.getNodeDegreeWithChildren=function(a){var c=this.getNodeDegree(a);if(a.getChild()==null)return c;var p=a.getChild().getNodes();for(var D=0;D<p.length;D++){var O=p[D];c+=this.getNodeDegreeWithChildren(O)}return c},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(a){for(var c=0;c<a.length;c++){var p=a[c];if(p.getChild()!=null)this.fillCompexOrderByDFS(p.getChild().getNodes());if(this.getToBeTiled(p))this.compoundOrder.push(p)}},T.prototype.adjustLocations=function(a,c,p,D,O){c+=D,p+=O;var R=c;for(var C=0;C<a.rows.length;C++){var w=a.rows[C];c=R;var x=0;for(var U=0;U<w.length;U++){var X=w[U];if(X.rect.x=c,X.rect.y=p,c+=X.rect.width+a.horizontalPadding,X.rect.height>x)x=X.rect.height}p+=x+a.verticalPadding}},T.prototype.tileCompoundMembers=function(a,c){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(D){var O=c[D];p.tiledMemberPack[D]=p.tileNodes(a[D],O.paddingLeft+O.paddingRight),O.rect.width=p.tiledMemberPack[D].width,O.rect.height=p.tiledMemberPack[D].height})},T.prototype.tileNodes=function(a,c){var{TILING_PADDING_VERTICAL:p,TILING_PADDING_HORIZONTAL:D}=o,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:p,horizontalPadding:D};a.sort(function(w,x){if(w.rect.width*w.rect.height>x.rect.width*x.rect.height)return-1;if(w.rect.width*w.rect.height<x.rect.width*x.rect.height)return 1;return 0});for(var R=0;R<a.length;R++){var C=a[R];if(O.rows.length==0)this.insertNodeToRow(O,C,0,c);else if(this.canAddHorizontal(O,C.rect.width,C.rect.height))this.insertNodeToRow(O,C,this.getShortestRowIndex(O),c);else this.insertNodeToRow(O,C,O.rows.length,c);this.shiftToLastRow(O)}return O},T.prototype.insertNodeToRow=function(a,c,p,D){var O=D;if(p==a.rows.length){var R=[];a.rows.push(R),a.rowWidth.push(O),a.rowHeight.push(0)}var C=a.rowWidth[p]+c.rect.width;if(a.rows[p].length>0)C+=a.horizontalPadding;if(a.rowWidth[p]=C,a.width<C)a.width=C;var w=c.rect.height;if(p>0)w+=a.verticalPadding;var x=0;if(w>a.rowHeight[p])x=a.rowHeight[p],a.rowHeight[p]=w,x=a.rowHeight[p]-x;a.height+=x,a.rows[p].push(c)},T.prototype.getShortestRowIndex=function(a){var c=-1,p=Number.MAX_VALUE;for(var D=0;D<a.rows.length;D++)if(a.rowWidth[D]<p)c=D,p=a.rowWidth[D];return c},T.prototype.getLongestRowIndex=function(a){var c=-1,p=Number.MIN_VALUE;for(var D=0;D<a.rows.length;D++)if(a.rowWidth[D]>p)c=D,p=a.rowWidth[D];return c},T.prototype.canAddHorizontal=function(a,c,p){var D=this.getShortestRowIndex(a);if(D<0)return!0;var O=a.rowWidth[D];if(O+a.horizontalPadding+c<=a.width)return!0;var R=0;if(a.rowHeight[D]<p){if(D>0)R=p+a.verticalPadding-a.rowHeight[D]}var C;if(a.width-O>=c+a.horizontalPadding)C=(a.height+R)/(O+c+a.horizontalPadding);else C=(a.height+R)/a.width;R=p+a.verticalPadding;var w;if(a.width<c)w=(a.height+R)/c;else w=(a.height+R)/a.width;if(w<1)w=1/w;if(C<1)C=1/C;return C<w},T.prototype.shiftToLastRow=function(a){var c=this.getLongestRowIndex(a),p=a.rowWidth.length-1,D=a.rows[c],O=D[D.length-1],R=O.width+a.horizontalPadding;if(a.width-a.rowWidth[p]>R&&c!=p){D.splice(-1,1),a.rows[p].push(O),a.rowWidth[c]=a.rowWidth[c]-R,a.rowWidth[p]=a.rowWidth[p]+R,a.width=a.rowWidth[instance.getLongestRowIndex(a)];var C=Number.MIN_VALUE;for(var w=0;w<D.length;w++)if(D[w].height>C)C=D[w].height;if(c>0)C+=a.verticalPadding;var x=a.rowHeight[c]+a.rowHeight[p];if(a.rowHeight[c]=C,a.rowHeight[p]<O.height+a.verticalPadding)a.rowHeight[p]=O.height+a.verticalPadding;var U=a.rowHeight[c]+a.rowHeight[p];a.height+=U-x,this.shiftToLastRow(a)}},T.prototype.tilingPreLayout=function(){if(o.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},T.prototype.tilingPostLayout=function(){if(o.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},T.prototype.reduceTrees=function(){var a=[],c=!0,p;while(c){var D=this.graphManager.getAllNodes(),O=[];c=!1;for(var R=0;R<D.length;R++)if(p=D[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null)O.push([p,p.getEdges()[0],p.getOwner()]),c=!0;if(c==!0){var C=[];for(var w=0;w<O.length;w++)if(O[w][0].getEdges().length==1)C.push(O[w]),O[w][0].getOwner().remove(O[w][0]);a.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},T.prototype.growTree=function(a){var c=a.length,p=a[c-1],D;for(var O=0;O<p.length;O++)D=p[O],this.findPlaceforPrunedNode(D),D[2].add(D[0]),D[2].add(D[1],D[1].source,D[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(a){var c,p,D=a[0];if(D==a[1].source)p=a[1].target;else p=a[1].source;var O=p.startX,R=p.finishX,C=p.startY,w=p.finishY,x=0,U=0,X=0,S=0,G=[x,X,U,S];if(C>0)for(var F=O;F<=R;F++)G[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(R<this.grid.length-1)for(var F=C;F<=w;F++)G[1]+=this.grid[R+1][F].length+this.grid[R][F].length-1;if(w<this.grid[0].length-1)for(var F=O;F<=R;F++)G[2]+=this.grid[F][w+1].length+this.grid[F][w].length-1;if(O>0)for(var F=C;F<=w;F++)G[3]+=this.grid[O-1][F].length+this.grid[O][F].length-1;var P=L.MAX_VALUE,_,H;for(var Y=0;Y<G.length;Y++)if(G[Y]<P)P=G[Y],_=1,H=Y;else if(G[Y]==P)_++;if(_==3&&P==0){if(G[0]==0&&G[1]==0&&G[2]==0)c=1;else if(G[0]==0&&G[1]==0&&G[3]==0)c=0;else if(G[0]==0&&G[2]==0&&G[3]==0)c=3;else if(G[1]==0&&G[2]==0&&G[3]==0)c=2}else if(_==2&&P==0){var W=Math.floor(Math.random()*2);if(G[0]==0&&G[1]==0)if(W==0)c=0;else c=1;else if(G[0]==0&&G[2]==0)if(W==0)c=0;else c=2;else if(G[0]==0&&G[3]==0)if(W==0)c=0;else c=3;else if(G[1]==0&&G[2]==0)if(W==0)c=1;else c=2;else if(G[1]==0&&G[3]==0)if(W==0)c=1;else c=3;else if(W==0)c=2;else c=3}else if(_==4&&P==0){var W=Math.floor(Math.random()*4);c=W}else c=H;if(c==0)D.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-v.DEFAULT_EDGE_LENGTH-D.getHeight()/2);else if(c==1)D.setCenter(p.getCenterX()+p.getWidth()/2+v.DEFAULT_EDGE_LENGTH+D.getWidth()/2,p.getCenterY());else if(c==2)D.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+v.DEFAULT_EDGE_LENGTH+D.getHeight()/2);else D.setCenter(p.getCenterX()-p.getWidth()/2-v.DEFAULT_EDGE_LENGTH-D.getWidth()/2,p.getCenterY())},M.exports=T},function(M,E,s){var r={};r.layoutBase=s(0),r.CoSEConstants=s(1),r.CoSEEdge=s(2),r.CoSEGraph=s(3),r.CoSEGraphManager=s(4),r.CoSELayout=s(6),r.CoSENode=s(5),M.exports=r}])})});var it=Fn(function(j,tt){(function(M,E){if(typeof j==="object"&&typeof tt==="object")tt.exports=E(J());else if(typeof define==="function"&&define.amd)define(["cose-base"],E);else if(typeof j==="object")j.cytoscapeCoseBilkent=E(J());else M.cytoscapeCoseBilkent=E(M.coseBase)})(j,function(I){return function(M){var E={};function s(r){if(E[r])return E[r].exports;var e=E[r]={i:r,l:!1,exports:{}};return M[r].call(e.exports,e,e.exports,s),e.l=!0,e.exports}return s.m=M,s.c=E,s.i=function(r){return r},s.d=function(r,e,i){if(!s.o(r,e))Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:i})},s.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return s.d(e,"a",e),e},s.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},s.p="",s(s.s=1)}([function(M,E){M.exports=I},function(M,E,s){var r=s(0).layoutBase.LayoutConstants,e=s(0).layoutBase.FDLayoutConstants,i=s(0).CoSEConstants,h=s(0).CoSELayout,f=s(0).CoSENode,o=s(0).layoutBase.PointD,v=s(0).layoutBase.DimensionD,n={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function u(A,d){var N={};for(var T in A)N[T]=A[T];for(var T in d)N[T]=d[T];return N}function g(A){this.options=u(n,A),y(this.options)}var y=function(d){if(d.nodeRepulsion!=null)i.DEFAULT_REPULSION_STRENGTH=e.DEFAULT_REPULSION_STRENGTH=d.nodeRepulsion;if(d.idealEdgeLength!=null)i.DEFAULT_EDGE_LENGTH=e.DEFAULT_EDGE_LENGTH=d.idealEdgeLength;if(d.edgeElasticity!=null)i.DEFAULT_SPRING_STRENGTH=e.DEFAULT_SPRING_STRENGTH=d.edgeElasticity;if(d.nestingFactor!=null)i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor;if(d.gravity!=null)i.DEFAULT_GRAVITY_STRENGTH=e.DEFAULT_GRAVITY_STRENGTH=d.gravity;if(d.numIter!=null)i.MAX_ITERATIONS=e.MAX_ITERATIONS=d.numIter;if(d.gravityRange!=null)i.DEFAULT_GRAVITY_RANGE_FACTOR=e.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange;if(d.gravityCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound;if(d.gravityRangeCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound;if(d.initialEnergyOnIncremental!=null)i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental;if(d.quality=="draft")r.QUALITY=0;else if(d.quality=="proof")r.QUALITY=2;else r.QUALITY=1;i.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!d.randomize,i.ANIMATE=e.ANIMATE=r.ANIMATE=d.animate,i.TILE=d.tile,i.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical==="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal==="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal};g.prototype.run=function(){var A,d,N=this.options,T=this.idToLNode={},m=this.layout=new h,a=this;a.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var c=m.newGraphManager();this.gm=c;var p=this.options.eles.nodes(),D=this.options.eles.edges();this.root=c.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(p),m);for(var O=0;O<D.length;O++){var R=D[O],C=this.idToLNode[R.data("source")],w=this.idToLNode[R.data("target")];if(C!==w&&C.getEdgesBetween(w).length==0){var x=c.add(m.newEdge(),C,w);x.id=R.id()}}var U=function(G,F){if(typeof G==="number")G=F;var P=G.data("id"),_=a.idToLNode[P];return{x:_.getRect().getCenterX(),y:_.getRect().getCenterY()}},X=function S(){var G=function(){if(N.fit)N.cy.fit(N.eles,N.padding);if(!A)A=!0,a.cy.one("layoutready",N.ready),a.cy.trigger({type:"layoutready",layout:a})},F=a.options.refresh,P;for(var _=0;_<F&&!P;_++)P=a.stopped||a.layout.tick();if(P){if(m.checkLayoutSuccess()&&!m.isSubLayout)m.doPostLayout();if(m.tilingPostLayout)m.tilingPostLayout();if(m.isLayoutFinished=!0,a.options.eles.nodes().positions(U),G(),a.cy.one("layoutstop",a.options.stop),a.cy.trigger({type:"layoutstop",layout:a}),d)cancelAnimationFrame(d);A=!1;return}var H=a.layout.getPositionsData();N.eles.nodes().positions(function(Y,W){if(typeof Y==="number")Y=W;if(!Y.isParent()){var k=Y.id(),B=H[k],V=Y;while(B==null)if(B=H[V.data("parent")]||H["DummyCompound_"+V.data("parent")],H[k]=B,V=V.parent()[0],V==null)break;if(B!=null)return{x:B.x,y:B.y};else return{x:Y.position("x"),y:Y.position("y")}}}),G(),d=requestAnimationFrame(S)};if(m.addListener("layoutstarted",function(){if(a.options.animate==="during")d=requestAnimationFrame(X)}),m.runLayout(),this.options.animate!=="during")a.options.eles.nodes().not(":parent").layoutPositions(a,a.options,U),A=!1;return this},g.prototype.getTopMostNodes=function(A){var d={};for(var N=0;N<A.length;N++)d[A[N].id()]=!0;var T=A.filter(function(m,a){if(typeof m==="number")m=a;var c=m.parent()[0];while(c!=null){if(d[c.id()])return!1;c=c.parent()[0]}return!0});return T},g.prototype.processChildrenList=function(A,d,N){var T=d.length;for(var m=0;m<T;m++){var a=d[m],c=a.children(),p,D=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(a.outerWidth()!=null&&a.outerHeight()!=null)p=A.add(new f(N.graphManager,new o(a.position("x")-D.w/2,a.position("y")-D.h/2),new v(parseFloat(D.w),parseFloat(D.h))));else p=A.add(new f(this.graphManager));if(p.id=a.data("id"),p.paddingLeft=parseInt(a.css("padding")),p.paddingTop=parseInt(a.css("padding")),p.paddingRight=parseInt(a.css("padding")),p.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels){if(a.isParent()){var O=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,R=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=a.css("text-halign");p.labelWidth=O,p.labelHeight=R,p.labelPos=C}}if(this.idToLNode[a.data("id")]=p,isNaN(p.rect.x))p.rect.x=0;if(isNaN(p.rect.y))p.rect.y=0;if(c!=null&&c.length>0){var w=N.getGraphManager().add(N.newGraph(),p);this.processChildrenList(w,c,N)}}},g.prototype.stop=function(){return this.stopped=!0,this};var L=function(d){d("layout","cose-bilkent",g)};if(typeof cytoscape<"u")L(cytoscape);M.exports=L}])})});var nt=vn(it(),1);Yr.use(nt.default);function st(I,M){I.forEach((E)=>{let s={id:E.id,labelText:E.label,height:E.height,width:E.width,padding:E.padding??0};Object.keys(E).forEach((r)=>{if(!["id","label","height","width","padding","x","y"].includes(r))s[r]=E[r]}),M.add({group:"nodes",data:s,position:{x:E.x??0,y:E.y??0}})})}t(st,"addNodes");function ot(I,M){I.forEach((E)=>{let s={id:E.id,source:E.start,target:E.end};Object.keys(E).forEach((r)=>{if(!["id","start","end"].includes(r))s[r]=E[r]}),M.add({group:"edges",data:s})})}t(ot,"addEdges");function at(I){return new Promise((M)=>{let E=b("body").append("div").attr("id","cy").attr("style","display:none"),s=Yr({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});E.remove(),st(I.nodes,s),ot(I.edges,s),s.nodes().forEach(function(e){e.layoutDimensions=()=>{let i=e.data();return{w:i.width,h:i.height}}});let r={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};s.layout(r).run(),s.ready((e)=>{l.info("Cytoscape ready",e),M(s)})})}t(at,"createCytoscapeInstance");function ht(I){return I.nodes().map((M)=>{let E=M.data(),s=M.position(),r={id:E.id,x:s.x,y:s.y};return Object.keys(E).forEach((e)=>{if(e!=="id")r[e]=E[e]}),r})}t(ht,"extractPositionedNodes");function lt(I){return I.edges().map((M)=>{let E=M.data(),s=M._private.rscratch,r={id:E.id,source:E.source,target:E.target,startX:s.startX,startY:s.startY,midX:s.midX,midY:s.midY,endX:s.endX,endY:s.endY};return Object.keys(E).forEach((e)=>{if(!["id","source","target"].includes(e))r[e]=E[e]}),r})}t(lt,"extractPositionedEdges");async function ut(I,M){l.debug("Starting cose-bilkent layout algorithm");try{gt(I);let E=await at(I),s=ht(E),r=lt(E);return l.debug(`Layout completed: ${s.length} nodes, ${r.length} edges`),{nodes:s,edges:r}}catch(E){throw l.error("Error in cose-bilkent layout algorithm:",E),E}}t(ut,"executeCoseBilkentLayout");function gt(I){if(!I)throw Error("Layout data is required");if(!I.config)throw Error("Configuration is required in layout data");if(!I.rootNode)throw Error("Root node is required");if(!I.nodes||!Array.isArray(I.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(I.edges))throw Error("Edges array is required in layout data");return!0}t(gt,"validateLayoutData");var ct=t(async(I,M,{insertCluster:E,insertEdge:s,insertEdgeLabel:r,insertMarkers:e,insertNode:i,log:h,positionEdgeLabel:f},{algorithm:o})=>{let v={},n={},u=M.select("g");e(u,I.markers,I.type,I.diagramId);let g=u.insert("g").attr("class","subgraphs"),y=u.insert("g").attr("class","edgePaths"),L=u.insert("g").attr("class","edgeLabels"),A=u.insert("g").attr("class","nodes");h.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(I.nodes.map(async(T)=>{if(T.isGroup){let m={...T};n[T.id]=m,v[T.id]=m,await E(g,T)}else{let m={...T};v[T.id]=m;let a=await i(A,T,{config:I.config,dir:I.direction||"TB"}),c=a.node().getBBox();m.width=c.width,m.height=c.height,m.domId=a,h.debug(`Node ${T.id} dimensions: ${c.width}x${c.height}`)}})),h.debug("Running cose-bilkent layout algorithm");let d={...I,nodes:I.nodes.map((T)=>{let m=v[T.id];return{...T,width:m.width,height:m.height}})},N=await ut(d,I.config);h.debug("Positioning nodes based on layout results"),N.nodes.forEach((T)=>{let m=v[T.id];if(m?.domId)m.domId.attr("transform",`translate(${T.x}, ${T.y})`),m.x=T.x,m.y=T.y,h.debug(`Positioned node ${m.id} at center (${T.x}, ${T.y})`)}),N.edges.forEach((T)=>{let m=I.edges.find((a)=>a.id===T.id);if(m)m.points=[{x:T.startX,y:T.startY},{x:T.midX,y:T.midY},{x:T.endX,y:T.endY}]}),h.debug("Inserting and positioning edges"),await Promise.all(I.edges.map(async(T)=>{let m=await r(L,T),a=v[T.start??""],c=v[T.end??""];if(a&&c){let p=N.edges.find((D)=>D.id===T.id);if(p){h.debug("APA01 positionedEdge",p);let D={...T},O=s(y,D,n,I.type,a,c,I.diagramId);f(D,O)}else{let D={...T,points:[{x:a.x||0,y:a.y||0},{x:c.x||0,y:c.y||0}]},O=s(y,D,n,I.type,a,c,I.diagramId);f(D,O)}}})),h.debug("Cose-bilkent rendering completed")},"render"),Et=ct;export{Et as render};
@@ -0,0 +1 @@
1
+ import{Cc}from"./index-cm8pa783.js";import"./index-2g1ey1c9.js";export{Cc as default};
@@ -0,0 +1 @@
1
+ import{ep,$s,X0,eb,tb,nb}from"./index-1vfej0gk.js";export{X0 as css,nb as gss,$s as keywords,tb as less,ep as mkCSS,eb as sCSS};
@@ -0,0 +1 @@
1
+ import{xt}from"./index-jxxewcat.js";export{xt as default};
@@ -0,0 +1 @@
1
+ import{bg}from"./index-09ap9ncj.js";export{bg as createCynefinServices};
@@ -1,4 +1,4 @@
1
- import{ke}from"./index-14dgbjsm.js";import{t,l,Kt,Y,C,te,M,O,G,z,j,H,q,ge,ie}from"./index-38g2eevc.js";import{Pe}from"./index-c3whkrwa.js";var mt=t(()=>({domains:new Map,transitions:[]}),"createDefaultData"),J=mt(),Dt=t(()=>J.domains,"getDomains"),kt=t(()=>J.transitions,"getTransitions"),Tt=t((e)=>{if(!e)return;for(let n of e){let o=n.domain,a=(n.items??[]).map((c)=>({label:c.label}));J.domains.set(o,{name:o,items:a})}},"setDomains"),At=t((e)=>{if(!e)return;J.transitions=e.filter((n)=>{if(n.from===n.to)return l.warn(`Cynefin: self-loop transition on domain "${n.from}" is not meaningful and will be skipped.`),!1;return!0}).map((n)=>({from:n.from,to:n.to,label:n.label||void 0}))},"setTransitions"),Bt=t(()=>ie({...Y.cynefin,...C().cynefin}),"getConfig"),St=t(()=>{M(),J=mt()},"clear"),et={getDomains:Dt,getTransitions:kt,setDomains:Tt,setTransitions:At,getConfig:Bt,clear:St,setAccTitle:O,getAccTitle:G,setDiagramTitle:H,getDiagramTitle:q,getAccDescription:j,setAccDescription:z},Mt=t((e)=>{ke(e,et),et.setDomains(e.domains),et.setTransitions(e.transitions)},"populate"),zt={parse:t(async(e)=>{let n=await Pe("cynefin",e);l.debug(n),Mt(n)},"parse")};function Z(e){let n=e+1831565813|0;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}t(Z,"seededRandom");function pt(e){let n=0;for(let o=0;o<e.length;o++){let a=e.charCodeAt(o);n=(n<<5)-n+a,n|=0}return n}t(pt,"hashString");function yt(e,n){if(typeof e==="number"&&Number.isFinite(e)&&e!==0)return e;return pt(n)}t(yt,"resolveSeed");function ut(e,n,o,a){let c=e/2,p=a??e*0.015,K=7,_=n/7,f=[];for(let r=0;r<=7;r++){let y=Z(o+r*17)*p*2-p;f.push({x:c+y,y:r*_})}let T=`M${f[0].x},${f[0].y}`;for(let r=0;r<f.length-1;r++){let y=f[r],s=f[r+1],m=(y.y+s.y)/2,v=r%2===0?1:-1,h=p*1.5*v*Z(o+r*31+7),E=y.x+h,X=m,U=s.x-h;T+=` C${E},${X} ${U},${m} ${s.x},${s.y}`}return T}t(ut,"generateFoldPath");function gt(e,n,o,a){let c=n/2,p=a??n*0.015,K=7,_=e/7,f=[];for(let r=0;r<=7;r++){let y=Z(o+r*23)*p*2-p;f.push({x:r*_,y:c+y})}let T=`M${f[0].x},${f[0].y}`;for(let r=0;r<f.length-1;r++){let y=f[r],s=f[r+1],m=(y.x+s.x)/2,v=r%2===0?1:-1,h=p*1.5*v*Z(o+r*37+11),E=m,X=y.y+h,U=m,I=s.y-h;T+=` C${E},${X} ${U},${I} ${s.x},${s.y}`}return T}t(gt,"generateHorizontalBoundary");function ht(e,n){let o=e/2,a=n*0.5,c=n,p=e*0.03;return[`M${o},${a}`,`C${o+p},${a+(c-a)*0.2}`,`${o-p*1.5},${a+(c-a)*0.55}`,`${o+p*0.5},${a+(c-a)*0.75}`,`C${o-p},${a+(c-a)*0.85}`,`${o+p*0.3},${a+(c-a)*0.95}`,`${o},${c}`].join(" ")}t(ht,"generateCliffPath");function xt(e,n,o,a){return[`M${e-o},${n}`,`A${o},${a} 0 1,1 ${e+o},${n}`,`A${o},${a} 0 1,1 ${e-o},${n}`,"Z"].join(" ")}t(xt,"generateConfusionPath");var ft={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Lt=t((e,n)=>{let o=e/2,a=n/2;return{complex:{cx:o/2,cy:a/2,x:0,y:0,w:o,h:a},complicated:{cx:o+o/2,cy:a/2,x:o,y:0,w:o,h:a},chaotic:{cx:o/2,cy:a+a/2,x:0,y:a,w:o,h:a},clear:{cx:o+o/2,cy:a+a/2,x:o,y:a,w:o,h:a},confusion:{cx:o,cy:a,x:o*0.7,y:a*0.7,w:o*0.6,h:a*0.6}}},"getDomainLayouts"),Nt=t(()=>{let e=Kt(),n=C();return ie(e,n.themeVariables).cynefin},"getCynefinDomainColors"),at=3,Pt=t((e,n,o,a)=>{let c=a.db,p=c.getDomains(),K=c.getTransitions(),_=c.getDiagramTitle(),f=c.getAccTitle(),T=c.getAccDescription(),r=c.getConfig(),y=Nt();l.debug("Rendering Cynefin diagram");let{width:s,height:m,padding:v,showDomainDescriptions:h,boundaryAmplitude:E}=r,X=s+v*2,U=m+v*2,I={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},A=ge(n);if(te(A,U,X,r.useMaxWidth??!0),A.attr("viewBox",`0 0 ${X} ${U}`),f)A.append("title").text(f);if(T)A.append("desc").text(T);let B=A.append("g").attr("transform",`translate(${v}, ${v})`),Q=Lt(s,m),rt=yt(r.seed,n),$t=B.append("g").attr("class","cynefin-backgrounds"),nt=["complex","complicated","chaotic","clear"];for(let d of nt){let i=Q[d];$t.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",I[d]).attr("fill-opacity",0.4).attr("stroke","none")}let ot=B.append("g").attr("class","cynefin-boundaries");ot.append("path").attr("class","cynefinBoundary").attr("d",ut(s,m,rt,E)).attr("fill","none"),ot.append("path").attr("class","cynefinBoundary").attr("d",gt(s,m,rt+100,E)).attr("fill","none"),ot.append("path").attr("class","cynefinCliff").attr("d",ht(s,m)).attr("fill","none");let bt=s*0.15,wt=m*0.15;B.append("path").attr("class","cynefinConfusion").attr("d",xt(s/2,m/2,bt,wt)).attr("fill",I.confusion).attr("fill-opacity",0.5);let it=B.append("g").attr("class","cynefin-labels");for(let d of nt){let i=Q[d];it.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",h?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(it.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=B.append("g").attr("class","cynefin-subtitles");for(let i of nt){let g=Q[i],u=ft[i];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(ft.confusion.practice)}let st=B.append("g").attr("class","cynefin-items"),S=26,ct=10,Ct=["complex","complicated","chaotic","clear","confusion"];for(let d of Ct){let i=p.get(d);if(!i||i.items.length===0)continue;let g=Q[d],u=d==="confusion",W=i.items,R=0;if(u&&i.items.length>at)R=i.items.length-at,W=i.items.slice(0,at);let L;if(u){let b=h?22:14;L=g.cy+b}else L=g.cy+(h?25:15);if([...W].forEach((b,N)=>{let D=L+N*(S+4),P=st.append("g"),F=P.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",S/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(b.label),w=b.label.length*7,x=F.node();if(x&&typeof x.getBBox==="function"){let tt=x.getBBox();if(tt.width>0)w=tt.width}let k=w+ct*2,V=g.cx-k/2;P.attr("transform",`translate(${V}, ${D})`),P.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",k).attr("height",S).attr("rx",4).attr("ry",4).attr("fill",I[d]).attr("fill-opacity",0.95),F.attr("x",k/2).attr("y",S/2)}),R>0){let b=L+W.length*(S+4),N=`+${R} more`,D=st.append("g"),P=D.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",S/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(N),F=N.length*7,w=P.node();if(w&&typeof w.getBBox==="function"){let V=w.getBBox();if(V.width>0)F=V.width}let x=F+ct*2,k=g.cx-x/2;D.attr("transform",`translate(${k}, ${b})`),D.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",S).attr("rx",4).attr("ry",4).attr("fill",I[d]).attr("fill-opacity",0.6),P.attr("x",x/2).attr("y",S/2)}}if(K.length>0){let d=A.select("defs").empty()?A.append("defs"):A.select("defs"),i=`cynefin-arrow-${n}`;d.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=B.append("g").attr("class","cynefin-arrows");K.forEach((u)=>{let W=Q[u.from],R=Q[u.to];if(!W||!R)return;if(u.from===u.to){l.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:L,cy:b}=W,{cx:N,cy:D}=R,P=(L+N)/2,F=(b+D)/2,w=N-L,x=D-b,k=Math.sqrt(w*w+x*x),V=k*0.15,tt=-x/k,vt=w/k,lt=P+tt*V,dt=F+vt*V;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${L},${b} Q${lt},${dt} ${N},${D}`).attr("fill","none").attr("marker-end",`url(#${i})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",lt).attr("y",dt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(_)B.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-v/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(_)},"draw"),It={draw:Pt},Wt=t(()=>{let e=Kt(),n=C();return ie(e,n.themeVariables).cynefin},"getCynefinTheme"),Rt=t(()=>{let e=Wt();return`
1
+ import{ke}from"./index-evvmkk2f.js";import{t,l,Vt,Y,C,te,F,O,G,z,j,q,H,ge,ie}from"./index-17jy16v3.js";import{Oe}from"./index-09ap9ncj.js";var mt=t(()=>({domains:new Map,transitions:[]}),"createDefaultData"),J=mt(),Dt=t(()=>J.domains,"getDomains"),kt=t(()=>J.transitions,"getTransitions"),Tt=t((e)=>{if(!e)return;for(let n of e){let o=n.domain,a=(n.items??[]).map((c)=>({label:c.label}));J.domains.set(o,{name:o,items:a})}},"setDomains"),At=t((e)=>{if(!e)return;J.transitions=e.filter((n)=>{if(n.from===n.to)return l.warn(`Cynefin: self-loop transition on domain "${n.from}" is not meaningful and will be skipped.`),!1;return!0}).map((n)=>({from:n.from,to:n.to,label:n.label||void 0}))},"setTransitions"),Bt=t(()=>ie({...Y.cynefin,...C().cynefin}),"getConfig"),St=t(()=>{F(),J=mt()},"clear"),et={getDomains:Dt,getTransitions:kt,setDomains:Tt,setTransitions:At,getConfig:Bt,clear:St,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z},Mt=t((e)=>{ke(e,et),et.setDomains(e.domains),et.setTransitions(e.transitions)},"populate"),zt={parse:t(async(e)=>{let n=await Oe("cynefin",e);l.debug(n),Mt(n)},"parse")};function Z(e){let n=e+1831565813|0;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}t(Z,"seededRandom");function pt(e){let n=0;for(let o=0;o<e.length;o++){let a=e.charCodeAt(o);n=(n<<5)-n+a,n|=0}return n}t(pt,"hashString");function yt(e,n){if(typeof e==="number"&&Number.isFinite(e)&&e!==0)return e;return pt(n)}t(yt,"resolveSeed");function ut(e,n,o,a){let c=e/2,p=a??e*0.015,K=7,_=n/7,f=[];for(let r=0;r<=7;r++){let y=Z(o+r*17)*p*2-p;f.push({x:c+y,y:r*_})}let T=`M${f[0].x},${f[0].y}`;for(let r=0;r<f.length-1;r++){let y=f[r],s=f[r+1],m=(y.y+s.y)/2,v=r%2===0?1:-1,h=p*1.5*v*Z(o+r*31+7),E=y.x+h,X=m,U=s.x-h;T+=` C${E},${X} ${U},${m} ${s.x},${s.y}`}return T}t(ut,"generateFoldPath");function gt(e,n,o,a){let c=n/2,p=a??n*0.015,K=7,_=e/7,f=[];for(let r=0;r<=7;r++){let y=Z(o+r*23)*p*2-p;f.push({x:r*_,y:c+y})}let T=`M${f[0].x},${f[0].y}`;for(let r=0;r<f.length-1;r++){let y=f[r],s=f[r+1],m=(y.x+s.x)/2,v=r%2===0?1:-1,h=p*1.5*v*Z(o+r*37+11),E=m,X=y.y+h,U=m,P=s.y-h;T+=` C${E},${X} ${U},${P} ${s.x},${s.y}`}return T}t(gt,"generateHorizontalBoundary");function ht(e,n){let o=e/2,a=n*0.5,c=n,p=e*0.03;return[`M${o},${a}`,`C${o+p},${a+(c-a)*0.2}`,`${o-p*1.5},${a+(c-a)*0.55}`,`${o+p*0.5},${a+(c-a)*0.75}`,`C${o-p},${a+(c-a)*0.85}`,`${o+p*0.3},${a+(c-a)*0.95}`,`${o},${c}`].join(" ")}t(ht,"generateCliffPath");function xt(e,n,o,a){return[`M${e-o},${n}`,`A${o},${a} 0 1,1 ${e+o},${n}`,`A${o},${a} 0 1,1 ${e-o},${n}`,"Z"].join(" ")}t(xt,"generateConfusionPath");var ft={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Lt=t((e,n)=>{let o=e/2,a=n/2;return{complex:{cx:o/2,cy:a/2,x:0,y:0,w:o,h:a},complicated:{cx:o+o/2,cy:a/2,x:o,y:0,w:o,h:a},chaotic:{cx:o/2,cy:a+a/2,x:0,y:a,w:o,h:a},clear:{cx:o+o/2,cy:a+a/2,x:o,y:a,w:o,h:a},confusion:{cx:o,cy:a,x:o*0.7,y:a*0.7,w:o*0.6,h:a*0.6}}},"getDomainLayouts"),Nt=t(()=>{let e=Vt(),n=C();return ie(e,n.themeVariables).cynefin},"getCynefinDomainColors"),at=3,Pt=t((e,n,o,a)=>{let c=a.db,p=c.getDomains(),K=c.getTransitions(),_=c.getDiagramTitle(),f=c.getAccTitle(),T=c.getAccDescription(),r=c.getConfig(),y=Nt();l.debug("Rendering Cynefin diagram");let{width:s,height:m,padding:v,showDomainDescriptions:h,boundaryAmplitude:E}=r,X=s+v*2,U=m+v*2,P={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},A=ge(n);if(te(A,U,X,r.useMaxWidth??!0),A.attr("viewBox",`0 0 ${X} ${U}`),f)A.append("title").text(f);if(T)A.append("desc").text(T);let B=A.append("g").attr("transform",`translate(${v}, ${v})`),Q=Lt(s,m),rt=yt(r.seed,n),$t=B.append("g").attr("class","cynefin-backgrounds"),nt=["complex","complicated","chaotic","clear"];for(let d of nt){let i=Q[d];$t.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",P[d]).attr("fill-opacity",0.4).attr("stroke","none")}let ot=B.append("g").attr("class","cynefin-boundaries");ot.append("path").attr("class","cynefinBoundary").attr("d",ut(s,m,rt,E)).attr("fill","none"),ot.append("path").attr("class","cynefinBoundary").attr("d",gt(s,m,rt+100,E)).attr("fill","none"),ot.append("path").attr("class","cynefinCliff").attr("d",ht(s,m)).attr("fill","none");let bt=s*0.15,wt=m*0.15;B.append("path").attr("class","cynefinConfusion").attr("d",xt(s/2,m/2,bt,wt)).attr("fill",P.confusion).attr("fill-opacity",0.5);let it=B.append("g").attr("class","cynefin-labels");for(let d of nt){let i=Q[d];it.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",h?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(it.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=B.append("g").attr("class","cynefin-subtitles");for(let i of nt){let g=Q[i],u=ft[i];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(ft.confusion.practice)}let st=B.append("g").attr("class","cynefin-items"),S=26,ct=10,Ct=["complex","complicated","chaotic","clear","confusion"];for(let d of Ct){let i=p.get(d);if(!i||i.items.length===0)continue;let g=Q[d],u=d==="confusion",I=i.items,W=0;if(u&&i.items.length>at)W=i.items.length-at,I=i.items.slice(0,at);let M;if(u){let b=h?22:14;M=g.cy+b}else M=g.cy+(h?25:15);if([...I].forEach((b,L)=>{let D=M+L*(S+4),N=st.append("g"),R=N.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",S/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(b.label),w=b.label.length*7,x=R.node();if(x&&typeof x.getBBox==="function"){let tt=x.getBBox();if(tt.width>0)w=tt.width}let k=w+ct*2,V=g.cx-k/2;N.attr("transform",`translate(${V}, ${D})`),N.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",k).attr("height",S).attr("rx",4).attr("ry",4).attr("fill",P[d]).attr("fill-opacity",0.95),R.attr("x",k/2).attr("y",S/2)}),W>0){let b=M+I.length*(S+4),L=`+${W} more`,D=st.append("g"),N=D.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",S/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(L),R=L.length*7,w=N.node();if(w&&typeof w.getBBox==="function"){let V=w.getBBox();if(V.width>0)R=V.width}let x=R+ct*2,k=g.cx-x/2;D.attr("transform",`translate(${k}, ${b})`),D.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",S).attr("rx",4).attr("ry",4).attr("fill",P[d]).attr("fill-opacity",0.6),N.attr("x",x/2).attr("y",S/2)}}if(K.length>0){let d=A.select("defs").empty()?A.append("defs"):A.select("defs"),i=`cynefin-arrow-${n}`;d.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=B.append("g").attr("class","cynefin-arrows");K.forEach((u)=>{let I=Q[u.from],W=Q[u.to];if(!I||!W)return;if(u.from===u.to){l.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:M,cy:b}=I,{cx:L,cy:D}=W,N=(M+L)/2,R=(b+D)/2,w=L-M,x=D-b,k=Math.sqrt(w*w+x*x),V=k*0.15,tt=-x/k,vt=w/k,lt=N+tt*V,dt=R+vt*V;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${M},${b} Q${lt},${dt} ${L},${D}`).attr("fill","none").attr("marker-end",`url(#${i})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",lt).attr("y",dt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(_)B.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-v/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(_)},"draw"),It={draw:Pt},Wt=t(()=>{let e=Vt(),n=C();return ie(e,n.themeVariables).cynefin},"getCynefinTheme"),Rt=t(()=>{let e=Wt();return`
2
2
  .cynefinDomain {
3
3
  stroke: none;
4
4
  }
@@ -59,4 +59,4 @@ import{ke}from"./index-14dgbjsm.js";import{t,l,Kt,Y,C,te,M,O,G,z,j,H,q,ge,ie}fro
59
59
  font-weight: bold;
60
60
  fill: ${e.labelColor};
61
61
  }
62
- `},"styles"),Ft=Rt,Xt={parser:zt,db:et,renderer:It,styles:Ft};export{Xt as diagram};
62
+ `},"styles"),Ft=Rt,jt={parser:zt,db:et,renderer:It,styles:Ft};export{jt as diagram};