@kabmo-labs/kabmo 0.59.0 → 0.60.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 (384) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +397 -397
  3. package/dist/client/static/js/{Body-jqq4654r.js → Body-p82s28sj.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-avw0taqb.js → CsvGrid-erc5mcvc.js} +2 -2
  5. package/dist/client/static/js/{DocxView-d221vr6g.js → DocxView-x3faj0jv.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-gjsy7p01.js → DrawioView-t7fh3ens.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-949393v1.js → HtmlPreview-zy7x7jmm.js} +1 -1
  8. package/dist/client/static/js/ImageView-xc90jc1c.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-bng34cpr.js +1 -0
  11. package/dist/client/static/js/Modal-89jk7wff.js +60 -0
  12. package/dist/client/static/js/{PdfView-dzj2s6rj.js → PdfView-kqx472q7.js} +1 -1
  13. package/dist/client/static/js/SessionsView-6bpz1faj.js +1 -0
  14. package/dist/client/static/js/{SheetView-jpc178g5.js → SheetView-0n9fze50.js} +9 -9
  15. package/dist/client/static/js/{SvgPreview-94fap32p.js → SvgPreview-6xc6ts46.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-a6eyfzrj.js → abnfDiagram-O67JEVCF-2xdkkqwg.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-pgmyfncy.js → architectureDiagram-NJMV4G6O-ja8cx19z.js} +11 -11
  19. package/dist/client/static/js/{astro-ryr2ajmg.js → astro-yphdvdty.js} +1 -1
  20. package/dist/client/static/js/bash-bcbct9gc.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-rf51jyb2.js → blockDiagram-BEXU5L5S-ytf7s99c.js} +8 -8
  22. package/dist/client/static/js/c-fn9jz26e.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-0faj48jp.js → c4Diagram-YGBWAQC7-5a0kdx0z.js} +5 -5
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-bvzsws8x.js → classDiagram-v2-NBCMYWYE-hd98dvjw.js} +6 -6
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-j1amnd3m.js → cose-bilkent-JH36ORCC-man3fqcj.js} +1 -1
  26. package/dist/client/static/js/cpp-a1q64mke.js +1 -0
  27. package/dist/client/static/js/css-b92azee8.js +1 -0
  28. package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +1 -0
  29. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-f73w6zzz.js → cynefinDiagram-VND7K2PF-2f0kbbv2.js} +2 -2
  30. package/dist/client/static/js/{dagre-6A5THRUB-a5vgvjsg.js → dagre-6A5THRUB-k7pyhgzn.js} +2 -2
  31. package/dist/client/static/js/{diagram-22UHCM2B-6y9efamp.js → diagram-22UHCM2B-qx0afa2m.js} +15 -15
  32. package/dist/client/static/js/{diagram-3UASUU5V-2mycy7xm.js → diagram-3UASUU5V-ydpe77sv.js} +2 -2
  33. package/dist/client/static/js/{diagram-ATOU4E4O-10zgjb66.js → diagram-ATOU4E4O-e63v984n.js} +2 -2
  34. package/dist/client/static/js/{diagram-CDSNMT55-bewa52yf.js → diagram-CDSNMT55-8c765h3a.js} +4 -4
  35. package/dist/client/static/js/{diagram-MLGK6HIB-mh3b7gd3.js → diagram-MLGK6HIB-3pq0n7v8.js} +2 -2
  36. package/dist/client/static/js/{diagram-MPIPVDR6-gvdrbdm5.js → diagram-MPIPVDR6-638atzxz.js} +2 -2
  37. package/dist/client/static/js/{dockerfile-6bn19kg0.js → dockerfile-yehc914q.js} +1 -1
  38. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-2prre93c.js → ebnfDiagram-ZINNZB2B-3gv43zvm.js} +1 -1
  39. package/dist/client/static/js/{elixir-fyxw6d70.js → elixir-3nwnd9yw.js} +1 -1
  40. package/dist/client/static/js/{elk-276RUBZZ-9t6t9kc6.js → elk-276RUBZZ-6s5pggfc.js} +1 -1
  41. package/dist/client/static/js/{erDiagram-OPXOYQCR-etcggr5n.js → erDiagram-OPXOYQCR-x7cqyb89.js} +3 -3
  42. package/dist/client/static/js/{erlang-97ayje6m.js → erlang-p5c4n3t0.js} +1 -1
  43. package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +1 -0
  44. package/dist/client/static/js/flowDiagram-KWPJA3E3-7sn6nwjv.js +1 -0
  45. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-cdc4mwhs.js → ganttDiagram-FUAMR5RP-g97te4v1.js} +5 -5
  46. package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +1 -0
  47. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-55d0fa7x.js → gitGraphDiagram-X574FWY7-sw4f94tc.js} +14 -14
  48. package/dist/client/static/js/graphql-8d8bn59j.js +1 -0
  49. package/dist/client/static/js/html-6hdrwtz2.js +1 -0
  50. package/dist/client/static/js/{index-5e4e18tg.js → index-025s3fp8.js} +2 -2
  51. package/dist/client/static/js/{index-pgy7ree5.js → index-0ze5bwvw.js} +5 -5
  52. package/dist/client/static/js/{index-f13ern5e.js → index-111bq6rs.js} +1 -1
  53. package/dist/client/static/js/{index-8tzt0dek.js → index-11qn05g9.js} +2 -2
  54. package/dist/client/static/js/{index-np2rfq06.js → index-2dmew334.js} +2 -2
  55. package/dist/client/static/js/index-2n2evsg0.js +2 -0
  56. package/dist/client/static/js/{index-trq7bdvk.js → index-37apvxgj.js} +2 -2
  57. package/dist/client/static/js/{index-6bsez5n6.js → index-43gmn7yb.js} +1 -1
  58. package/dist/client/static/js/index-4h2zkrk1.js +2 -0
  59. package/dist/client/static/js/{index-xe447cw3.js → index-4xbc0j7t.js} +1 -1
  60. package/dist/client/static/js/index-5nm8hm4k.js +2 -0
  61. package/dist/client/static/js/{index-mx5y9vt9.js → index-6qn9kygb.js} +7 -7
  62. package/dist/client/static/js/{index-jpvng27a.js → index-8zct30zd.js} +1 -1
  63. package/dist/client/static/js/{index-eggbcdwx.js → index-95jfphx5.js} +197 -197
  64. package/dist/client/static/js/{index-yrwm437g.js → index-97sw4d9n.js} +2 -2
  65. package/dist/client/static/js/{index-8z9aqgf3.js → index-9pw441wc.js} +4 -4
  66. package/dist/client/static/js/{index-27gwghmp.js → index-9rz6kzsv.js} +1 -1
  67. package/dist/client/static/js/{index-y4cx8cqf.js → index-a145x0w2.js} +2 -2
  68. package/dist/client/static/js/{index-mhrkjbjq.js → index-bdtftrym.js} +2 -2
  69. package/dist/client/static/js/index-bjz54ht6.js +1 -0
  70. package/dist/client/static/js/{index-db6s66jr.js → index-bkn6jtn1.js} +2 -2
  71. package/dist/client/static/js/{index-rw84kefb.js → index-bpcg34jp.js} +2 -2
  72. package/dist/client/static/js/{index-f6t91mpp.js → index-bqapt2e8.js} +1 -1
  73. package/dist/client/static/js/{index-ndqtff48.js → index-ca6tmamh.js} +2 -2
  74. package/dist/client/static/js/{index-fyt8m8ah.js → index-cf69bhjx.js} +2 -2
  75. package/dist/client/static/js/{index-yh7gngsh.js → index-cfvc1zpk.js} +2 -2
  76. package/dist/client/static/js/{index-nnwcbp2d.js → index-ddkjgv5h.js} +2 -2
  77. package/dist/client/static/js/{index-60cxxnpk.js → index-dekvtt2a.js} +87 -87
  78. package/dist/client/static/js/{index-ax8gaayq.js → index-dv01prse.js} +2 -2
  79. package/dist/client/static/js/{index-sg65xdey.js → index-enm77k5z.js} +2 -2
  80. package/dist/client/static/js/{index-nf4hq5tg.js → index-excgtjhx.js} +14 -14
  81. package/dist/client/static/js/{index-51rbgeh9.js → index-fb2fjndj.js} +5 -5
  82. package/dist/client/static/js/index-fnwaxc6r.js +1 -0
  83. package/dist/client/static/js/{index-vs2y8gxr.js → index-fr6wsqk8.js} +2 -2
  84. package/dist/client/static/js/index-h65zrhva.js +1 -0
  85. package/dist/client/static/js/{index-fr91ghwb.js → index-hgfyx8dt.js} +2 -2
  86. package/dist/client/static/js/{index-gcad7b6g.js → index-hwdkxe4n.js} +2 -2
  87. package/dist/client/static/js/{index-69mnn71v.js → index-hwv7bfxc.js} +2 -2
  88. package/dist/client/static/js/index-hxsqw7sz.js +4 -0
  89. package/dist/client/static/js/{index-461ga40v.js → index-hxy1sadd.js} +2 -2
  90. package/dist/client/static/js/{index-c253x7vt.js → index-ja0ajnvq.js} +7 -7
  91. package/dist/client/static/js/{index-2f6afhze.js → index-jfqd838j.js} +2 -2
  92. package/dist/client/static/js/{index-d9sfavx1.js → index-mtav0rpf.js} +2 -2
  93. package/dist/client/static/js/{index-58z2hatp.js → index-n8r7r86r.js} +1 -1
  94. package/dist/client/static/js/{index-j1ksa4x2.js → index-pdgc9ccr.js} +1 -1
  95. package/dist/client/static/js/{index-s9ts6qbj.js → index-pdz6j2g2.js} +2 -2
  96. package/dist/client/static/js/{index-jct0jryd.js → index-qccydkze.js} +2 -2
  97. package/dist/client/static/js/{index-yg38s8t3.js → index-qkqkygrf.js} +1 -1
  98. package/dist/client/static/js/index-qkyy563e.js +1 -0
  99. package/dist/client/static/js/{index-92h38pwg.js → index-s4j2ghmx.js} +2 -2
  100. package/dist/client/static/js/{index-z82nd2bd.js → index-sx83ans2.js} +2 -2
  101. package/dist/client/static/js/index-t6nqy2n5.css +1 -0
  102. package/dist/client/static/js/{index-fsa18ns9.js → index-twwsn91p.js} +2 -2
  103. package/dist/client/static/js/{index-nwbr15b3.js → index-v88m5sva.js} +2 -2
  104. package/dist/client/static/js/{index-a5ecn5yx.js → index-vcq6zfxx.js} +6 -6
  105. package/dist/client/static/js/{index-3akjcs82.js → index-vec7m1yd.js} +2 -2
  106. package/dist/client/static/js/{index-mngpcca7.js → index-vejz38qt.js} +9 -9
  107. package/dist/client/static/js/{index-9rvjegmy.js → index-wrk99kks.js} +2 -2
  108. package/dist/client/static/js/{index-q3k8r0ms.js → index-wsy6y5em.js} +9 -9
  109. package/dist/client/static/js/{index-h1xbx74w.js → index-yfcy4cf6.js} +2 -2
  110. package/dist/client/static/js/{index-pa70qj4p.js → index-ywp0sd1e.js} +1 -1
  111. package/dist/client/static/js/{index-njhrm5qa.js → index-z8k42dwz.js} +9 -9
  112. package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +1 -0
  113. package/dist/client/static/js/{infoDiagram-VRGFBTTK-9xph6cr5.js → infoDiagram-VRGFBTTK-pw2qaa27.js} +1 -1
  114. package/dist/client/static/js/ini-g6a5xsaw.js +1 -0
  115. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-3gshs3v8.js → ishikawaDiagram-OU5B5YK6-d13jhvxy.js} +3 -3
  116. package/dist/client/static/js/java-n596am4c.js +1 -0
  117. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-fa8x56mf.js → journeyDiagram-ZHPQQLJL-20gb8a04.js} +4 -4
  118. package/dist/client/static/js/json-7k70qbkj.js +1 -0
  119. package/dist/client/static/js/jsx-sndenqrc.js +1 -0
  120. package/dist/client/static/js/{julia-agc5kfvg.js → julia-rpd1y9vh.js} +1 -1
  121. package/dist/client/static/js/{kanban-definition-PNTS6WVX-fybp2hh4.js → kanban-definition-PNTS6WVX-s78e158c.js} +5 -5
  122. package/dist/client/static/js/lua-djd3g9q5.js +1 -0
  123. package/dist/client/static/js/markdown-r2tpvxpn.js +1 -0
  124. package/dist/client/static/js/{mermaid.core-jjh5ggp0.js → mermaid.core-xbm27k28.js} +6 -6
  125. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-gtfbg619.js → mindmap-definition-NLK3R4M7-6y7xe2zm.js} +7 -7
  126. package/dist/client/static/js/one-dark-pro-7bgqnyhm.js +1 -0
  127. package/dist/client/static/js/one-light-47y6etng.js +1 -0
  128. package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +1 -0
  129. package/dist/client/static/js/{pegDiagram-GJSIUBJH-1a51sbqv.js → pegDiagram-GJSIUBJH-dmvewetf.js} +1 -1
  130. package/dist/client/static/js/{perl-v5vbtzgf.js → perl-kmtz9dnv.js} +1 -1
  131. package/dist/client/static/js/{php-83qwy98t.js → php-bttrsbxy.js} +1 -1
  132. package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +1 -0
  133. package/dist/client/static/js/{pieDiagram-5QR66LMP-zd9svyyn.js → pieDiagram-5QR66LMP-1q9e7rcm.js} +2 -2
  134. package/dist/client/static/js/properties-brn72zdk.js +1 -0
  135. package/dist/client/static/js/python-g9mghwgm.js +1 -0
  136. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-5gtw2m6s.js → quadrantDiagram-O4NWA36T-mvrem3n6.js} +4 -4
  137. package/dist/client/static/js/r-e247x4mw.js +1 -0
  138. package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +1 -0
  139. package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +1 -0
  140. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +1 -0
  141. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +1 -0
  142. package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +1 -0
  143. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-3ccwpfzz.js → railroadDiagram-XR7U4H2S-axttcfhw.js} +1 -1
  144. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-sasndrrp.js → requirementDiagram-PLB6GJNP-5qx7erta.js} +12 -12
  145. package/dist/client/static/js/{ruby-994n5j6e.js → ruby-dve3y59w.js} +1 -1
  146. package/dist/client/static/js/{rust-n9z2c9m3.js → rust-b3ckax3e.js} +1 -1
  147. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2ahb4sda.js → sankeyDiagram-IPEJSGJF-es87a3j6.js} +4 -4
  148. package/dist/client/static/js/{sass-p6g7qdv2.js → sass-emxqt5p2.js} +1 -1
  149. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bfj90kz1.js → sequenceDiagram-PO4LG4MO-dgpnjrtk.js} +21 -21
  150. package/dist/client/static/js/{sizeCapture-INFHLROL-5tygxmtc.js → sizeCapture-INFHLROL-kyw0p86n.js} +1 -1
  151. package/dist/client/static/js/sql-0kar81jy.js +1 -0
  152. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-533xw76e.js → stateDiagram-v2-GCMORJYK-vnsbw8y9.js} +3 -3
  153. package/dist/client/static/js/{svelte-bek3h1sz.js → svelte-dbsx1ehx.js} +1 -1
  154. package/dist/client/static/js/{swimlanes-2SLR337P-gd3d04pk.js → swimlanes-2SLR337P-060q1rep.js} +1 -1
  155. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y77g9dq0.js +8 -0
  156. package/dist/client/static/js/{timeline-definition-EJHVYXUP-fvqvgqvg.js → timeline-definition-EJHVYXUP-8a3yqmx0.js} +6 -6
  157. package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +1 -0
  158. package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +1 -0
  159. package/dist/client/static/js/typescript-bm89v3gk.js +1 -0
  160. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-tm1f0m4x.js → usecaseDiagram-POWQR4AR-18sp73v7.js} +51 -51
  161. package/dist/client/static/js/{vennDiagram-UO4OBE2U-2vdvv1hd.js → vennDiagram-UO4OBE2U-gf4y1r3s.js} +5 -5
  162. package/dist/client/static/js/{vue-y44m889c.js → vue-hyr58df9.js} +1 -1
  163. package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +1 -0
  164. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-7avcjznx.js → wardleyDiagram-VNRHLVJA-q0kwmbzh.js} +5 -5
  165. package/dist/client/static/js/xml-b7824nx0.js +1 -0
  166. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-g39y526n.js → xychartDiagram-PMCCYNJV-y0gpmg6m.js} +6 -6
  167. package/dist/client/static/js/yaml-kqqktdv1.js +1 -0
  168. package/package.json +4 -4
  169. package/src/client/borders.css +28 -15
  170. package/src/client/components/common/Modal.tsx +10 -2
  171. package/src/client/components/common/Toast.tsx +8 -3
  172. package/src/client/components/common/anchored-menu/index.tsx +10 -3
  173. package/src/client/components/common/command-palette/index.tsx +9 -3
  174. package/src/client/components/common/fullscreen-viewer/index.tsx +1 -1
  175. package/src/client/components/common/header-controls/index.test.tsx +40 -3
  176. package/src/client/components/common/header-controls/index.tsx +106 -56
  177. package/src/client/components/common/search-select/search-select.test.tsx +10 -1
  178. package/src/client/components/common/session-row/TrailingSlot.tsx +8 -1
  179. package/src/client/components/common/session-row/index.tsx +4 -0
  180. package/src/client/components/common/session-row/session-row.test.tsx +5 -0
  181. package/src/client/components/common/workspace-mark/index.test.tsx +67 -0
  182. package/src/client/components/common/workspace-mark/index.tsx +48 -0
  183. package/src/client/components/layout/ActivityBar.test.ts +1 -1
  184. package/src/client/components/layout/ActivityBarDrag.test.ts +1 -1
  185. package/src/client/components/layout/LeftActivityBar.test.ts +48 -3
  186. package/src/client/components/layout/LeftDock.tsx +33 -14
  187. package/src/client/components/layout/PanelButton.test.tsx +119 -0
  188. package/src/client/components/layout/PanelButton.tsx +2 -4
  189. package/src/client/components/layout/activity-bar/Row.tsx +125 -0
  190. package/src/client/components/layout/{ActivityBar.tsx → activity-bar/index.tsx} +81 -20
  191. package/src/client/components/layout/controls-bar/index.tsx +183 -0
  192. package/src/client/components/layout/desktop-layout/BarSlot.tsx +18 -0
  193. package/src/client/components/layout/desktop-layout/LeftColumn.test.tsx +187 -0
  194. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +81 -64
  195. package/src/client/components/layout/desktop-layout/LeftRail.tsx +60 -0
  196. package/src/client/components/layout/desktop-layout/LeftTabsColumn.tsx +91 -0
  197. package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +19 -3
  198. package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +60 -0
  199. package/src/client/components/layout/desktop-layout/RightColumn.tsx +77 -28
  200. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +114 -104
  201. package/src/client/components/layout/desktop-layout/index.tsx +48 -45
  202. package/src/client/components/layout/desktop-layout/resizer/index.tsx +25 -83
  203. package/src/client/components/layout/desktop-layout/resizer/panel-motion.ts +61 -0
  204. package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +40 -2
  205. package/src/client/components/layout/desktop-layout/resizer/separator.tsx +89 -0
  206. package/src/client/components/layout/left-bar/index.tsx +88 -0
  207. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +5 -2
  208. package/src/client/components/layout/session-sidebar/Footer.tsx +28 -11
  209. package/src/client/components/layout/session-sidebar/FooterHost.tsx +167 -0
  210. package/src/client/components/layout/session-sidebar/SessionItem.tsx +2 -2
  211. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +8 -3
  212. package/src/client/components/layout/session-sidebar/footer-host.test.tsx +133 -0
  213. package/src/client/components/layout/session-sidebar/modern/RevealRow.tsx +36 -5
  214. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +5 -2
  215. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -0
  216. package/src/client/components/layout/session-sidebar/modern/reveal-row.test.tsx +28 -1
  217. package/src/client/components/layout/session-title-bar/index.tsx +199 -0
  218. package/src/client/components/layout/top-bars.test.tsx +338 -0
  219. package/src/client/components/mobile/LayoutWrapper.tsx +13 -2
  220. package/src/client/components/mobile/SessionSidebar.tsx +10 -8
  221. package/src/client/components/mobile/drawer-layout.test.tsx +67 -0
  222. package/src/client/components/mobile/drawer-strip.tsx +37 -14
  223. package/src/client/components/mobile/left-drawer-nav.test.tsx +19 -127
  224. package/src/client/components/settings/LazyModal.tsx +8 -2
  225. package/src/client/components/settings/Modal.tsx +6 -2
  226. package/src/client/components/settings/apply-side-effects.ts +5 -0
  227. package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
  228. package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
  229. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +6 -5
  230. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +2 -2
  231. package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +105 -0
  232. package/src/client/components/settings/categories/appearance-settings/groups.ts +3 -2
  233. package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
  234. package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +2 -2
  235. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
  236. package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +2 -2
  237. package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
  238. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +1 -1
  239. package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
  240. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +8 -1
  241. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +8 -1
  242. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -2
  243. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -25
  244. package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +1 -1
  245. package/src/client/components/workspace/editor/Tab.tsx +160 -0
  246. package/src/client/components/workspace/editor/Tabs.test.ts +40 -0
  247. package/src/client/components/workspace/editor/Tabs.tsx +52 -102
  248. package/src/client/components/workspace/editor/index.tsx +2 -0
  249. package/src/client/components/workspace/editor/props.ts +6 -0
  250. package/src/client/components/workspace/file-explorer/OutlineResize.test.tsx +225 -0
  251. package/src/client/components/workspace/file-explorer/OutlineSection.tsx +43 -3
  252. package/src/client/components/workspace/file-explorer/index.tsx +1 -1
  253. package/src/client/components/workspace/model-dropdown/CloseButton.tsx +2 -2
  254. package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +2 -2
  255. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +10 -1
  256. package/src/client/components/workspace/model-dropdown/Header.tsx +27 -20
  257. package/src/client/components/workspace/model-dropdown/Panel.tsx +2 -2
  258. package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
  259. package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +18 -0
  260. package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +34 -4
  261. package/src/client/components/workspace/panel-tabs/TabChip.tsx +48 -20
  262. package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +163 -0
  263. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +18 -9
  264. package/src/client/components/workspace/search-panel/Body.tsx +3 -3
  265. package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
  266. package/src/client/data/settings/omp-schema.json +205 -9
  267. package/src/client/floating.css +276 -0
  268. package/src/client/floating.test.ts +151 -0
  269. package/src/client/hooks/chat/timeline/session-pagination.ts +13 -9
  270. package/src/client/hooks/editor/use-outline-resize.ts +145 -0
  271. package/src/client/hooks/ui/border-style.test.ts +19 -7
  272. package/src/client/hooks/ui/border-style.ts +2 -3
  273. package/src/client/hooks/ui/chrome-style.test.ts +140 -0
  274. package/src/client/hooks/ui/chrome-style.ts +75 -0
  275. package/src/client/hooks/ui/media-query.ts +29 -0
  276. package/src/client/hooks/ui/presence.test.ts +104 -0
  277. package/src/client/hooks/ui/presence.ts +62 -0
  278. package/src/client/hooks/ui/style-attributes.test.ts +7 -6
  279. package/src/client/hooks/ui/surface-style.ts +2 -2
  280. package/src/client/hooks/ui/titlebar-inset.test.ts +56 -0
  281. package/src/client/hooks/ui/titlebar-inset.ts +31 -0
  282. package/src/client/hooks/workspace/available-width.ts +25 -1
  283. package/src/client/hooks/workspace/panel-peek.test.ts +124 -0
  284. package/src/client/hooks/workspace/panel-peek.ts +151 -0
  285. package/src/client/hooks/workspace/panel-rail.test.ts +86 -0
  286. package/src/client/hooks/workspace/panel-rail.ts +108 -0
  287. package/src/client/hooks/workspace/panel-resize.ts +8 -2
  288. package/src/client/hooks/workspace/rail-peek.test.ts +119 -0
  289. package/src/client/hooks/workspace/rail-peek.ts +68 -0
  290. package/src/client/hooks/workspace/right-panel-card.test.ts +71 -0
  291. package/src/client/hooks/workspace/right-panel-card.ts +69 -0
  292. package/src/client/hooks/workspace/right-panel-geometry.ts +172 -0
  293. package/src/client/hooks/workspace/right-side.ts +7 -0
  294. package/src/client/lib/desktop/titlebar.test.ts +6 -0
  295. package/src/client/lib/desktop/titlebar.ts +16 -0
  296. package/src/client/main.tsx +11 -0
  297. package/src/client/motion.test.ts +36 -0
  298. package/src/client/tailwind.css +67 -0
  299. package/src/server/lib/assets/shell-attributes.server.ts +14 -4
  300. package/src/server/lib/assets/shell-attributes.test.ts +35 -21
  301. package/src/server/lib/bundler/titlebar-css.test.ts +3 -2
  302. package/src/server/lib/realtime/topics/peer-relay.server.test.ts +19 -3
  303. package/src/server/lib/updates/omp.test.ts +40 -1
  304. package/src/server/lib/updates/omp.ts +29 -2
  305. package/src/server/plugins/ssr.ts +2 -0
  306. package/src/server/routes/settings/mcp.test.ts +16 -0
  307. package/src/server/routes/settings/mcp.ts +4 -0
  308. package/src/shared/lib/code/outline/resize.test.ts +57 -0
  309. package/src/shared/lib/code/outline/resize.ts +67 -0
  310. package/src/shared/lib/models/provider/glyph.test.ts +3 -1
  311. package/src/shared/lib/models/provider/glyph.ts +1 -0
  312. package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +103 -3
  313. package/src/shared/lib/omp/config/schema.test.ts +9 -0
  314. package/src/shared/lib/omp/config/schema.ts +8 -0
  315. package/src/shared/lib/settings/defaults.ts +2 -0
  316. package/src/shared/lib/theme/border-style.test.ts +12 -14
  317. package/src/shared/lib/theme/border-style.ts +25 -18
  318. package/src/shared/lib/theme/chrome-style.test.ts +31 -0
  319. package/src/shared/lib/theme/chrome-style.ts +74 -0
  320. package/src/shared/lib/theme/surface-style.test.ts +4 -5
  321. package/src/shared/lib/theme/surface-style.ts +6 -5
  322. package/src/shared/lib/ui/motion.ts +29 -0
  323. package/src/shared/lib/workspace/floating-chrome.ts +23 -0
  324. package/src/shared/lib/workspace/session-state/store.ts +3 -0
  325. package/src/shared/lib/workspace/workspace-panel-widths.test.ts +73 -0
  326. package/src/shared/lib/workspace/workspace-panel-widths.ts +79 -17
  327. package/src/shared/types/settings/state.ts +10 -9
  328. package/src/test-support/left-drawer-harness.test-util.ts +169 -0
  329. package/src/test-support/peer-harness.ts +44 -36
  330. package/dist/client/static/js/ImageView-pan9pqtm.js +0 -1
  331. package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +0 -2
  332. package/dist/client/static/js/MergeDiffView-swt467g7.js +0 -1
  333. package/dist/client/static/js/Modal-4spmcn44.js +0 -60
  334. package/dist/client/static/js/SessionsView-b6szjdg5.js +0 -1
  335. package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +0 -1
  336. package/dist/client/static/js/bash-zknkkwkw.js +0 -1
  337. package/dist/client/static/js/c-0w02jkxb.js +0 -1
  338. package/dist/client/static/js/cpp-p5b4vean.js +0 -1
  339. package/dist/client/static/js/css-9jzbvdyz.js +0 -1
  340. package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +0 -1
  341. package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +0 -1
  342. package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +0 -1
  343. package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +0 -1
  344. package/dist/client/static/js/graphql-xzykn0ba.js +0 -1
  345. package/dist/client/static/js/html-2zc3shky.js +0 -1
  346. package/dist/client/static/js/index-537m8a3x.js +0 -2
  347. package/dist/client/static/js/index-me0b6wkw.js +0 -1
  348. package/dist/client/static/js/index-mttx9327.css +0 -1
  349. package/dist/client/static/js/index-pe5f2gmn.js +0 -1
  350. package/dist/client/static/js/index-pzwf6hwe.js +0 -4
  351. package/dist/client/static/js/index-skvfxcd8.js +0 -1
  352. package/dist/client/static/js/index-sx2yz2wx.js +0 -1
  353. package/dist/client/static/js/index-wwyjzhgs.js +0 -2
  354. package/dist/client/static/js/index-y09de44h.js +0 -2
  355. package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +0 -1
  356. package/dist/client/static/js/ini-62r3vxaf.js +0 -1
  357. package/dist/client/static/js/java-kacycary.js +0 -1
  358. package/dist/client/static/js/json-yrwpn6bd.js +0 -1
  359. package/dist/client/static/js/jsx-b40ag8q1.js +0 -1
  360. package/dist/client/static/js/lua-bk961f37.js +0 -1
  361. package/dist/client/static/js/markdown-b7rgzgd6.js +0 -1
  362. package/dist/client/static/js/one-dark-pro-vht9rv39.js +0 -1
  363. package/dist/client/static/js/one-light-arxc5whh.js +0 -1
  364. package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +0 -1
  365. package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +0 -1
  366. package/dist/client/static/js/properties-k8gbzggp.js +0 -1
  367. package/dist/client/static/js/python-343tspad.js +0 -1
  368. package/dist/client/static/js/r-ycdwmv8g.js +0 -1
  369. package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +0 -1
  370. package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +0 -1
  371. package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +0 -1
  372. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +0 -1
  373. package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +0 -1
  374. package/dist/client/static/js/sql-kwpd5w07.js +0 -1
  375. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +0 -8
  376. package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +0 -1
  377. package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +0 -1
  378. package/dist/client/static/js/typescript-4dchbnya.js +0 -1
  379. package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +0 -1
  380. package/dist/client/static/js/xml-xs6qz3ya.js +0 -1
  381. package/dist/client/static/js/yaml-174nk5bn.js +0 -1
  382. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +0 -238
  383. package/src/client/components/layout/session-sidebar/Header.test.ts +0 -98
  384. package/src/client/components/layout/session-sidebar/Header.tsx +0 -60
@@ -1,7 +1,7 @@
1
- import{Wt}from"./index-eggbcdwx.js";import{xn,$n}from"./index-nwbr15b3.js";var am=$n(function(ea,ia){(function(r,e){typeof ea=="object"&&typeof ia<"u"?ia.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ea,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",h="hour",n="day",u="week",d="month",c="quarter",f="year",p="date",x="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ot){var N=["th","st","nd","rd"],X=ot%100;return"["+ot+(N[(X-20)%10]||N[X]||N[0])+"]"}},B=function(ot,N,X){var tt=String(ot);return!tt||tt.length>=N?ot:""+Array(N+1-tt.length).join(X)+ot},_={s:B,z:function(ot){var N=-ot.utcOffset(),X=Math.abs(N),tt=Math.floor(X/60),U=X%60;return(N<=0?"+":"-")+B(tt,2,"0")+":"+B(U,2,"0")},m:function ot(N,X){if(N.date()<X.date())return-ot(X,N);var tt=12*(X.year()-N.year())+(X.month()-N.month()),U=N.clone().add(tt,d),at=X-U<0,st=N.clone().add(tt+(at?-1:1),d);return+(-(tt+(X-U)/(at?U-st:st-U))||0)},a:function(ot){return ot<0?Math.ceil(ot)||0:Math.floor(ot)},p:function(ot){return{M:d,y:f,w:u,d:n,D:p,h,m:a,s:o,ms:s,Q:c}[ot]||String(ot||"").toLowerCase().replace(/s$/,"")},u:function(ot){return ot===void 0}},L="en",D={};D[L]=T;var P="$isDayjsObject",K=function(ot){return ot instanceof ht||!(!ot||!ot[P])},Z=function ot(N,X,tt){var U;if(!N)return L;if(typeof N=="string"){var at=N.toLowerCase();D[at]&&(U=at),X&&(D[at]=X,U=at);var st=N.split("-");if(!U&&st.length>1)return ot(st[0])}else{var Bt=N.name;D[Bt]=N,U=Bt}return!tt&&U&&(L=U),U||!tt&&L},J=function(ot,N){if(K(ot))return ot.clone();var X=typeof N=="object"?N:{};return X.date=ot,X.args=arguments,new ht(X)},rt=_;rt.l=Z,rt.i=K,rt.w=function(ot,N){return J(ot,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var ht=function(){function ot(X){this.$L=Z(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[P]=!0}var N=ot.prototype;return N.parse=function(X){this.$d=function(tt){var{date:U,utc:at}=tt;if(U===null)return new Date(NaN);if(rt.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var st=U.match(k);if(st){var Bt=st[2]-1||0,vt=(st[7]||"0").substring(0,3);return at?new Date(Date.UTC(st[1],Bt,st[3]||1,st[4]||0,st[5]||0,st[6]||0,vt)):new Date(st[1],Bt,st[3]||1,st[4]||0,st[5]||0,st[6]||0,vt)}}return new Date(U)}(X),this.init()},N.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},N.$utils=function(){return rt},N.isValid=function(){return this.$d.toString()!==x},N.isSame=function(X,tt){var U=J(X);return this.startOf(tt)<=U&&U<=this.endOf(tt)},N.isAfter=function(X,tt){return J(X)<this.startOf(tt)},N.isBefore=function(X,tt){return this.endOf(tt)<J(X)},N.$g=function(X,tt,U){return rt.u(X)?this[tt]:this.set(U,X)},N.unix=function(){return Math.floor(this.valueOf()/1000)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(X,tt){var U=this,at=!!rt.u(tt)||tt,st=rt.p(X),Bt=function(Pt,jt){var qt=rt.w(U.$u?Date.UTC(U.$y,jt,Pt):new Date(U.$y,jt,Pt),U);return at?qt:qt.endOf(n)},vt=function(Pt,jt){return rt.w(U.toDate()[Pt].apply(U.toDate("s"),(at?[0,0,0,0]:[23,59,59,999]).slice(jt)),U)},Ht=this.$W,Yt=this.$M,Vt=this.$D,Kt="set"+(this.$u?"UTC":"");switch(st){case f:return at?Bt(1,0):Bt(31,11);case d:return at?Bt(1,Yt):Bt(0,Yt+1);case u:var It=this.$locale().weekStart||0,Mt=(Ht<It?Ht+7:Ht)-It;return Bt(at?Vt-Mt:Vt+(6-Mt),Yt);case n:case p:return vt(Kt+"Hours",0);case h:return vt(Kt+"Minutes",1);case a:return vt(Kt+"Seconds",2);case o:return vt(Kt+"Milliseconds",3);default:return this.clone()}},N.endOf=function(X){return this.startOf(X,!1)},N.$set=function(X,tt){var U,at=rt.p(X),st="set"+(this.$u?"UTC":""),Bt=(U={},U[n]=st+"Date",U[p]=st+"Date",U[d]=st+"Month",U[f]=st+"FullYear",U[h]=st+"Hours",U[a]=st+"Minutes",U[o]=st+"Seconds",U[s]=st+"Milliseconds",U)[at],vt=at===n?this.$D+(tt-this.$W):tt;if(at===d||at===f){var Ht=this.clone().set(p,1);Ht.$d[Bt](vt),Ht.init(),this.$d=Ht.set(p,Math.min(this.$D,Ht.daysInMonth())).$d}else Bt&&this.$d[Bt](vt);return this.init(),this},N.set=function(X,tt){return this.clone().$set(X,tt)},N.get=function(X){return this[rt.p(X)]()},N.add=function(X,tt){var U,at=this;X=Number(X);var st=rt.p(tt),Bt=function(Yt){var Vt=J(at);return rt.w(Vt.date(Vt.date()+Math.round(Yt*X)),at)};if(st===d)return this.set(d,this.$M+X);if(st===f)return this.set(f,this.$y+X);if(st===n)return Bt(1);if(st===u)return Bt(7);var vt=(U={},U[a]=e,U[h]=i,U[o]=r,U)[st]||1,Ht=this.$d.getTime()+X*vt;return rt.w(Ht,this)},N.subtract=function(X,tt){return this.add(-1*X,tt)},N.format=function(X){var tt=this,U=this.$locale();if(!this.isValid())return U.invalidDate||x;var at=X||"YYYY-MM-DDTHH:mm:ssZ",st=rt.z(this),Bt=this.$H,vt=this.$m,Ht=this.$M,{weekdays:Yt,months:Vt,meridiem:Kt}=U,It=function(jt,qt,oe,ie){return jt&&(jt[qt]||jt(tt,at))||oe[qt].slice(0,ie)},Mt=function(jt){return rt.s(Bt%12||12,jt,"0")},Pt=Kt||function(jt,qt,oe){var ie=jt<12?"AM":"PM";return oe?ie.toLowerCase():ie};return at.replace(S,function(jt,qt){return qt||function(oe){switch(oe){case"YY":return String(tt.$y).slice(-2);case"YYYY":return rt.s(tt.$y,4,"0");case"M":return Ht+1;case"MM":return rt.s(Ht+1,2,"0");case"MMM":return It(U.monthsShort,Ht,Vt,3);case"MMMM":return It(Vt,Ht);case"D":return tt.$D;case"DD":return rt.s(tt.$D,2,"0");case"d":return String(tt.$W);case"dd":return It(U.weekdaysMin,tt.$W,Yt,2);case"ddd":return It(U.weekdaysShort,tt.$W,Yt,3);case"dddd":return Yt[tt.$W];case"H":return String(Bt);case"HH":return rt.s(Bt,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return Pt(Bt,vt,!0);case"A":return Pt(Bt,vt,!1);case"m":return String(vt);case"mm":return rt.s(vt,2,"0");case"s":return String(tt.$s);case"ss":return rt.s(tt.$s,2,"0");case"SSS":return rt.s(tt.$ms,3,"0");case"Z":return st}return null}(jt)||st.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(X,tt,U){var at,st=this,Bt=rt.p(tt),vt=J(X),Ht=(vt.utcOffset()-this.utcOffset())*e,Yt=this-vt,Vt=function(){return rt.m(st,vt)};switch(Bt){case f:at=Vt()/12;break;case d:at=Vt();break;case c:at=Vt()/3;break;case u:at=(Yt-Ht)/604800000;break;case n:at=(Yt-Ht)/86400000;break;case h:at=Yt/i;break;case a:at=Yt/e;break;case o:at=Yt/r;break;default:at=Yt}return U?at:rt.a(at)},N.daysInMonth=function(){return this.endOf(d).$D},N.$locale=function(){return D[this.$L]},N.locale=function(X,tt){if(!X)return this.$L;var U=this.clone(),at=Z(X,tt,!0);return at&&(U.$L=at),U},N.clone=function(){return rt.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},ot}(),nt=ht.prototype;return J.prototype=nt,[["$ms",s],["$s",o],["$m",a],["$H",h],["$W",n],["$M",d],["$y",f],["$D",p]].forEach(function(ot){nt[ot[1]]=function(N){return this.$g(N,ot[0],ot[1])}}),J.extend=function(ot,N){return ot.$i||(ot(N,ht,J),ot.$i=!0),J},J.locale=Z,J.isDayjs=K,J.unix=function(ot){return J(1000*ot)},J.en=D[L],J.Ls=D,J.p={},J})});var cf=$n(function(lf){Object.defineProperty(lf,"__esModule",{value:!0});lf.BLANK_URL=lf.relativeFirstCharacters=lf.whitespaceEscapeCharsRegex=lf.urlSchemeRegex=lf.ctrlCharactersRegex=lf.htmlCtrlEntityRegex=lf.htmlEntitiesRegex=lf.invalidProtocolRegex=void 0;lf.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;lf.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;lf.htmlCtrlEntityRegex=/&(newline|tab);/gi;lf.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;lf.urlSchemeRegex=/^.+(:|&colon;)/gim;lf.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;lf.relativeFirstCharacters=[".","/"];lf.BLANK_URL="about:blank"});var fl=$n(function(df){Object.defineProperty(df,"__esModule",{value:!0});df.sanitizeUrl=Bb;var we=cf();function wb(r){return we.relativeFirstCharacters.indexOf(r[0])>-1}function Sb(r){var e=r.replace(we.ctrlCharactersRegex,"");return e.replace(we.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function Tb(r){return URL.canParse(r)}function uf(r){try{return decodeURIComponent(r)}catch(e){return r}}function Bb(r){if(!r)return we.BLANK_URL;var e,i=uf(r.trim());do i=Sb(i).replace(we.htmlCtrlEntityRegex,"").replace(we.ctrlCharactersRegex,"").replace(we.whitespaceEscapeCharsRegex,"").trim(),i=uf(i),e=i.match(we.ctrlCharactersRegex)||i.match(we.htmlEntitiesRegex)||i.match(we.htmlCtrlEntityRegex)||i.match(we.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return we.BLANK_URL;if(wb(s))return s;var o=s.trimStart(),a=o.match(we.urlSchemeRegex);if(!a)return s;var h=a[0].toLowerCase().trim();if(we.invalidProtocolRegex.test(h))return we.BLANK_URL;var n=o.replace(/\\/g,"/");if(h==="mailto:"||h.includes("://"))return n;if(h==="http:"||h==="https:"){if(!Tb(n))return we.BLANK_URL;var u=new URL(n);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return n}});var Oc=Object.defineProperty,t=(r,e)=>Oc(r,"name",{value:e,configurable:!0}),To=(r,e)=>{for(var i in e)Oc(r,i,{get:e[i],enumerable:!0})};var Pc=xn(am(),1),Je={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},yd=t(function(r="fatal"){let e=Je.fatal;if(typeof r==="string"){if(r.toLowerCase()in Je)e=Je[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=Je.fatal)l.fatal=console.error?console.error.bind(console,Ee("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ee("FATAL"));if(e<=Je.error)l.error=console.error?console.error.bind(console,Ee("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ee("ERROR"));if(e<=Je.warn)l.warn=console.warn?console.warn.bind(console,Ee("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ee("WARN"));if(e<=Je.info)l.info=console.info?console.info.bind(console,Ee("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ee("INFO"));if(e<=Je.debug)l.debug=console.debug?console.debug.bind(console,Ee("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ee("DEBUG"));if(e<=Je.trace)l.trace=console.debug?console.debug.bind(console,Ee("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ee("TRACE"))},"setLogLevel"),Ee=t((r)=>`%c${Pc.default().format("ss.SSS")} : ${r} : `,"format");var _o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return _o.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return _o.hue2rgb(a,o,r)*255;case"b":return _o.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),h=(o+a)/2;if(s==="l")return h*100;if(o===a)return 0;let n=o-a,u=h>0.5?n/(2-o-a):n/(o+a);if(s==="s")return u*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Rc=_o;var By={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},qc=By;var _y={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Wc=_y;var vy={channel:Rc,lang:qc,unit:Wc},Dt=vy;var tr={};for(let r=0;r<=255;r++)tr[r]=Dt.unit.dec2hex(r);var fe={ALL:0,RGB:1,HSL:2};class Nc{constructor(){this.type=fe.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=fe.ALL}is(r){return this.type===r}}var zc=Nc;class Hc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new zc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=fe.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Dt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Dt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Dt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Dt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Dt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Dt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(fe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(fe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(fe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(fe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(fe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(fe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(fe.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(fe.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(fe.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(fe.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(fe.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(fe.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Yc=Hc;var Ly=new Yc({r:0,g:0,b:0,a:0},"transparent"),fr=Ly;var jc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(jc.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,h=o>4,n=h?1:17,u=h?8:4,d=a?0:-1,c=h?255:15;return fr.set({r:(s>>u*(d+3)&c)*n,g:(s>>u*(d+2)&c)*n,b:(s>>u*(d+1)&c)*n,a:a?(s&c)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${tr[Math.round(e)]}${tr[Math.round(i)]}${tr[Math.round(s)]}${tr[Math.round(o*255)]}`;else return`#${tr[Math.round(e)]}${tr[Math.round(i)]}${tr[Math.round(s)]}`}},Sr=jc;var vo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:(r)=>{let e=r.match(vo.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Dt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Dt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(i)*360)}}return Dt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(vo.re);if(!i)return;let[,s,o,a,h,n]=i;return fr.set({h:vo._hue2deg(s),s:Dt.channel.clamp.s(parseFloat(o)),l:Dt.channel.clamp.l(parseFloat(a)),a:h?Dt.channel.clamp.a(n?parseFloat(h)/100:parseFloat(h)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Dt.lang.round(e)}, ${Dt.lang.round(i)}%, ${Dt.lang.round(s)}%, ${o})`;else return`hsl(${Dt.lang.round(e)}, ${Dt.lang.round(i)}%, ${Dt.lang.round(s)}%)`}},Ti=vo;var Fo={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:(r)=>{r=r.toLowerCase();let e=Fo.colors[r];if(!e)return;return Sr.parse(e)},stringify:(r)=>{let e=Sr.stringify(r);for(let i in Fo.colors)if(Fo.colors[i]===e)return i;return}},sa=Fo;var Uc={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Uc.re);if(!i)return;let[,s,o,a,h,n,u,d,c]=i;return fr.set({r:Dt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Dt.channel.clamp.g(h?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(u?parseFloat(n)*2.55:parseFloat(n)),a:d?Dt.channel.clamp.a(c?parseFloat(d)/100:parseFloat(d)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Dt.lang.round(e)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)}, ${Dt.lang.round(o)})`;else return`rgb(${Dt.lang.round(e)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`}},Bi=Uc;var Fy={format:{keyword:sa,hex:Sr,rgb:Bi,rgba:Bi,hsl:Ti,hsla:Ti},parse:(r)=>{if(typeof r!=="string")return r;let e=Sr.parse(r)||Bi.parse(r)||Ti.parse(r)||sa.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(fe.HSL)||r.data.r===void 0)return Ti.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return Bi.stringify(r);else return Sr.stringify(r)}},pe=Fy;var My=(r,e)=>{let i=pe.parse(r);for(let s in e)i[s]=Dt.channel.clamp[s](e[s]);return pe.stringify(i)},Mo=My;var Ay=(r,e,i=0,s=1)=>{if(typeof r!=="number")return Mo(r,{a:e});let o=fr.set({r:Dt.channel.clamp.r(r),g:Dt.channel.clamp.g(e),b:Dt.channel.clamp.b(i),a:Dt.channel.clamp.a(s)});return pe.stringify(o)},xt=Ay;var Ey=(r,e)=>Dt.lang.round(pe.parse(r)[e]),xa=Ey;var $y=(r)=>{let{r:e,g:i,b:s}=pe.parse(r),o=0.2126*Dt.channel.toLinear(e)+0.7152*Dt.channel.toLinear(i)+0.0722*Dt.channel.toLinear(s);return Dt.lang.round(o)},Xc=$y;var Iy=(r)=>Xc(r)>=0.5,Gc=Iy;var Oy=(r)=>!Gc(r),Te=Oy;var Dy=(r,e,i)=>{let s=pe.parse(r),o=s[e],a=Dt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return pe.stringify(s)},hc=Dy;var Py=(r,e)=>hc(r,"l",e),g=Py;var Ry=(r,e)=>hc(r,"l",-e),A=Ry;var qy=(r,e)=>{let i=pe.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return Mo(r,s)},v=qy;var Wy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:h}=pe.parse(r),{r:n,g:u,b:d,a:c}=pe.parse(e),f=i/100,p=f*2-1,x=h-c,S=((p*x===-1?p:(p+x)/(1+p*x))+1)/2,T=1-S,B=s*S+n*T,_=o*S+u*T,L=a*S+d*T,D=h*f+c*(1-f);return xt(B,_,L,D)},Vc=Wy;var Ny=(r,e=100)=>{let i=pe.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Vc(i,r,e)},Q=Ny;var qg=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Nr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,zy=/\s/,Hy=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
2
- `,o);if(a===-1)break;let h=o;while(h>i&&zy.test(r[h-1]))h--;e+=r.slice(i,h)+`
3
- `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Wg=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},ts={},bc=t(function(r,e){r=Hy(r.replace(qg,"").replace(Nr,""));for(let[i,{detector:s}]of Object.entries(ts))if(s(r,e))return i;throw new Wg(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),om=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)tu(e,i,s)},"registerLazyLoadedDiagrams"),tu=t((r,e,i)=>{if(ts[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);ts[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),hh=t((r)=>ts[r].loader,"getDiagramLoader"),la=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>la(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,h])=>{if(typeof h==="object"){if(h===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(h)?[]:{};if(typeof o[a]==="object")o[a]=la(o[a],h,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=h;else Object.defineProperty(r,a,{value:h,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),lt=la,ze="#ffffff",He="#f2f2f2",Gt=t((r,e)=>e?v(r,{s:-40,l:10}):v(r,{s:-40,l:-10}),"mkBorder"),Yy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode)this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10);else this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,5);if(this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||v(this.primaryColor,{h:64}),this.fillType3=this.fillType3||v(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||v(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||v(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||v(this.primaryColor,{h:128}),this.fillType7=this.fillType7||v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-10}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??v(this.primaryColor,{l:-30}),this.venn2=this.venn2??v(this.secondaryColor,{l:-30}),this.venn3=this.venn3??v(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??v(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??v(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??v(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??v(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??v(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},jy=t((r)=>{let e=new Yy;return e.calculate(r),e},"getThemeVariables"),Uy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=xt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=xt(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||g(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=g(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=g(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=Q(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Q(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||v(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||v(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||v(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||v(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||v(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||v(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||v(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Xy=t((r)=>{let e=new Uy;return e.calculate(r),e},"getThemeVariables"),Gy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=v(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Gt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=xt(102,102,255,0.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||v(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||v(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||v(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Q(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Q(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||v(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-30}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||v(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??v(this.primaryColor,{l:-30}),this.venn2=this.venn2??v(this.secondaryColor,{l:-30}),this.venn3=this.venn3??v(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??v(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??v(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??v(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??v(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??v(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||A(Q(this.git0),25),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Xt=t((r)=>{let e=new Gy;return e.calculate(r),e},"getThemeVariables"),Vy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=g("#cde498",10),this.primaryBorderColor=Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.primaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||v(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||v(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||v(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||v(this.primaryColor,{l:-30}),this.pie5=this.pie5||v(this.secondaryColor,{l:-30}),this.pie6=this.pie6||v(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??v(this.primaryColor,{l:-30}),this.venn2=this.venn2??v(this.secondaryColor,{l:-30}),this.venn3=this.venn3??v(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??v(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??v(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??v(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??v(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??v(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Ky=t((r)=>{let e=new Vy;return e.calculate(r),e},"getThemeVariables"),Zy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Q(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||v(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||v(this.mainBkg,{l:-(8+r*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(this.contrast,30),this.taskBorderColor=A(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=g(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||v(this.primaryColor,{h:-30}),this.git4=this.pie5||v(this.primaryColor,{h:-60}),this.git5=this.pie6||v(this.primaryColor,{h:-90}),this.git6=this.pie7||v(this.primaryColor,{h:60}),this.git7=this.pie8||v(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Gt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Te(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=v(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||v(r,{h:30}),this.cScale4=this.cScale4||v(r,{h:60}),this.cScale5=this.cScale5||v(r,{h:90}),this.cScale6=this.cScale6||v(r,{h:120}),this.cScale7=this.cScale7||v(r,{h:150}),this.cScale8=this.cScale8||v(r,{h:210,l:150}),this.cScale9=this.cScale9||v(r,{h:270}),this.cScale10=this.cScale10||v(r,{h:300}),this.cScale11=this.cScale11||v(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||v(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||v(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||v(r,{h:64}),this.fillType3=this.fillType3||v(e,{h:64}),this.fillType4=this.fillType4||v(r,{h:-64}),this.fillType5=this.fillType5||v(e,{h:-64}),this.fillType6=this.fillType6||v(r,{h:128}),this.fillType7=this.fillType7||v(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||v(r,{l:-10}),this.pie5=this.pie5||v(e,{l:-10}),this.pie6=this.pie6||v(i,{l:-10}),this.pie7=this.pie7||v(r,{h:60,l:-10}),this.pie8=this.pie8||v(r,{h:-60,l:-10}),this.pie9=this.pie9||v(r,{h:120,l:0}),this.pie10=this.pie10||v(r,{h:60,l:-20}),this.pie11=this.pie11||v(r,{h:-60,l:-20}),this.pie12=this.pie12||v(r,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||v(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||v(r,{h:-30}),this.git4=this.git4||v(r,{h:-60}),this.git5=this.git5||v(r,{h:-90}),this.git6=this.git6||v(r,{h:60}),this.git7=this.git7||v(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor=Q(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||v(this.primaryColor,{h:64}),this.fillType3=this.fillType3||v(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||v(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||v(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||v(this.primaryColor,{h:128}),this.fillType7=this.fillType7||v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-10}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var rx=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),ix=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Gt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Te(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=v(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||v(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||v(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||v(r,{h:64}),this.fillType3=this.fillType3||v(e,{h:64}),this.fillType4=this.fillType4||v(r,{h:-64}),this.fillType5=this.fillType5||v(e,{h:-64}),this.fillType6=this.fillType6||v(r,{h:128}),this.fillType7=this.fillType7||v(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||v(r,{l:-10}),this.pie5=this.pie5||v(e,{l:-10}),this.pie6=this.pie6||v(i,{l:-10}),this.pie7=this.pie7||v(r,{h:60,l:-10}),this.pie8=this.pie8||v(r,{h:-60,l:-10}),this.pie9=this.pie9||v(r,{h:120,l:0}),this.pie10=this.pie10||v(r,{h:60,l:-20}),this.pie11=this.pie11||v(r,{h:-60,l:-20}),this.pie12=this.pie12||v(r,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||v(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||v(r,{h:-30}),this.git4=this.git4||v(r,{h:-60}),this.git5=this.git5||v(r,{h:-90}),this.git6=this.git6||v(r,{h:60}),this.git7=this.git7||v(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ox=t((r)=>{let e=new ix;return e.calculate(r),e},"getThemeVariables"),sx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor=Q(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||v(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||v(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||v(this.primaryColor,{h:64}),this.fillType3=this.fillType3||v(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||v(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||v(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||v(this.primaryColor,{h:128}),this.fillType7=this.fillType7||v(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||v(this.primaryColor,{l:-10}),this.pie5=this.pie5||v(this.secondaryColor,{l:-10}),this.pie6=this.pie6||v(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||v(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||v(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||v(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||v(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||v(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||v(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ax=t((r)=>{let e=new sx;return e.calculate(r),e},"getThemeVariables"),nx=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Gt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Te(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=v(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||v(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||v(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||v(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||v(r,{h:-30}),this.git4=this.git4||v(r,{h:-60}),this.git5=this.git5||v(r,{h:-90}),this.git6=this.git6||v(r,{h:60}),this.git7=this.git7||v(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},lx=t((r)=>{let e=new nx;return e.calculate(r),e},"getThemeVariables"),hx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor=Q(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||Q(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||v(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||v(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||v(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||v(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||v(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||v(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||v(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||v(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||v(this.primaryColor,{h:-30}),this.git4=this.git4||v(this.primaryColor,{h:-60}),this.git5=this.git5||v(this.primaryColor,{h:-90}),this.git6=this.git6||v(this.primaryColor,{h:60}),this.git7=this.git7||v(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},cx=t((r)=>{let e=new hx;return e.calculate(r),e},"getThemeVariables"),Do={base:{getThemeVariables:jy},dark:{getThemeVariables:Xy},default:{getThemeVariables:Xt},forest:{getThemeVariables:Ky},neutral:{getThemeVariables:Qy},neo:{getThemeVariables:tx},"neo-dark":{getThemeVariables:rx},redux:{getThemeVariables:ox},"redux-dark":{getThemeVariables:ax},"redux-color":{getThemeVariables:lx},"redux-dark-color":{getThemeVariables:cx}},de={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:0.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:50000,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},eu={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Do.default.getThemeVariables(),sequence:{...de.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:de.class?.theme,look:de.class?.look,layout:de.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},eventmodeling:{...de.eventmodeling},treeView:{...de.treeView,useWidth:void 0},radar:{...de.radar},usecase:{...de.usecase},railroad:{...de.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...de.ishikawa},sankey:{...de.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...de.venn},cynefin:{...de.cynefin}},ru=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...ru(r[s],"")];return[...i,e+s]},[]),"keyify"),ux=new Set(ru(eu,"")),Y=eu,dx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},fx=t((r)=>dx[r]??r,"getDiagramConfigKey"),px={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},gx=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Li=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Li(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!ux.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=px[e];if(s)gx(r[e],s);else l.debug("sanitizing object",e),Li(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Kg(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Kg=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),mi=Object.freeze(Y),mx=["theme","look","layout"],yx=new Set(["classic","handDrawn","neo"]),xx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Do,e);return r!=="look"||yx.has(e)},"isUsableAppearance"),Cx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&xx(i,o))},"readAppearance"),ta=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Se=lt({},mi),$o,Io={},er=[],_i=lt({},mi),vi,bx=t((r,e)=>{if(!vi)return;let i=[e,...[...er].reverse(),Io,mi],s=r[vi];for(let o of mx)for(let a of i){let h=Cx(a,vi,o);if(h===void 0)continue;if(r[o]=h,s?.[o]!==void 0)s[o]=h;break}},"resolveAppearance"),zr=t((r,e)=>{let i=lt({},r),s={};for(let a of e)iu(a),s=lt(s,a);if(i=lt(i,s),bx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Do,i.theme)){let a=lt({},$o),h=lt(a.themeVariables||{},s.themeVariables);i.themeVariables=Do[i.theme].getThemeVariables(h)}return _i=i,wx(_i),_i},"updateCurrentConfig"),im=t((r)=>{vi=r===void 0?void 0:fx(r),zr(Se,er)},"setDiagramConfigScope"),bh=t((r)=>{if(Se=lt({},mi),Se=lt(Se,r),Io=lt({},r),r.theme&&Object.hasOwn(Do,r.theme))Se.themeVariables=Do[r.theme].getThemeVariables(r.themeVariables);return zr(Se,er),Se},"setSiteConfig"),yh=t((r)=>{$o=lt({},r)},"saveConfigFromInitialize"),vh=t((r)=>(Se=lt(Se,r),Io=lt(Io,r),zr(Se,er),Se),"updateSiteConfig"),Vg=t(()=>lt({},Se),"getSiteConfig"),Yg=t((r)=>(zr(_i,[r]),E()),"setConfig"),E=t(()=>lt({},_i),"getConfig"),iu=t((r)=>{if(!r)return;["secure",...Se.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")iu(r[e])})},"sanitize"),kh=t((r)=>{if(Li(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};er.push(r),zr(Se,er)},"addDirective"),vd=t((r=Se)=>{er=[],vi=void 0,zr(r,er)},"reset"),kx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Kc={},ou=t((r)=>{if(Kc[r])return;l.warn(kx[r]),Kc[r]=!0},"issueWarning"),wx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)ou("LAZY_LOAD_DEPRECATED")},"checkConfig"),xh=t(()=>{let r={};if($o)r=lt(r,$o);for(let e of er)r=lt(r,e);return r},"getUserDefinedConfig"),en=t((r)=>{if(r.flowchart?.htmlLabels!=null)ou("FLOWCHART_HTML_LABELS_DEPRECATED");return ta(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),dl=/<\/?br\s*\/?>/gi,Sx=new RegExp(dl.source,"i"),Tx=t((r)=>{if(!r)return[""];return nu(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Bx=(()=>{let r=!1;return()=>{if(!r)su(),r=!0}})();function su(){Wt.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Wt.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(su,"setupDompurifyHooks");var au=t((r)=>(Bx(),Wt.sanitize(r)),"removeScript"),Zc=t((r,e)=>{if(en(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=au(r);else if(i!=="loose")r=nu(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Fx(r)}return r},"sanitizeMore"),te=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Wt.sanitize(Zc(r,e),e.dompurifyConfig).toString();else r=Wt.sanitize(Zc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),_x=t((r,e)=>{if(typeof r==="string")return te(r,e);return r.flat().map((i)=>te(i,e))},"sanitizeTextOrArray"),vx=t((r)=>Sx.test(r),"hasBreaks"),Lx=t((r)=>r.split(dl),"splitBreaks"),Fx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),nu=t((r)=>r.replace(dl,"#br#"),"breakToPlaceholder"),Jg=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Mx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Ax=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),No=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],h=e[s+1];if(Ex(a,h))o=a+","+h,s++,i.pop()}i.push($x(o))}return i.join("")},"parseGenericTypes"),ha=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Ex=t((r,e)=>{let i=ha(r,"~"),s=ha(e,"~");return i===1&&s===1},"shouldCombineSets"),$x=t((r)=>{let e=ha(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Qc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ao=/\$\$(.*?)\$\$/g,Lt=t((r)=>(r.match(Ao)?.length??0)>0,"hasKatex"),yc=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await vc(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Ix=t(async(r,e)=>{if(!Lt(r))return r;if(!(Qc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Ao,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Qc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(dl).map((o)=>Lt(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Ao,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Ao,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),vc=t(async(r,e)=>te(await Ix(r,e),e),"renderKatexSanitized"),w={getRows:Tx,sanitizeText:te,sanitizeTextOrArray:_x,hasBreaks:vx,splitBreaks:Lx,lineBreakRegex:dl,removeScript:au,getUrl:Jg,evaluate:ta,getMax:Mx,getMin:Ax},Ox=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Dx=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),ne=t(function(r,e,i,s){let o=Dx(e,i,s);Ox(r,o)},"configureSvgSize"),na=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:h}=o;l.info(`SVG bounds: ${a}x${h}`,o);let n=0,u=0;l.info(`Graph bounds: ${n}x${u}`,r),n=a+i*2,u=h+i*2,l.info(`Calculated bounds: ${n}x${u}`),ne(e,u,n,s);let d=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",d)},"setupGraphViewbox"),Eo={};function sm(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
- `)}t(sm,"cssStyleSheetToString");var Px=t((r,e,i,s)=>{let o="";if(r in Eo&&Eo[r])o=Eo[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
1
+ import{Kt}from"./index-95jfphx5.js";import{xn,zn}from"./index-v88m5sva.js";var sm=zn(function(Js,ta){(function(r,e){typeof Js=="object"&&typeof ta<"u"?ta.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(Js,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",h="hour",n="day",u="week",d="month",c="quarter",f="year",p="date",x="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ot){var P=["th","st","nd","rd"],X=ot%100;return"["+ot+(P[(X-20)%10]||P[X]||P[0])+"]"}},_=function(ot,P,X){var tt=String(ot);return!tt||tt.length>=P?ot:""+Array(P+1-tt.length).join(X)+ot},v={s:_,z:function(ot){var P=-ot.utcOffset(),X=Math.abs(P),tt=Math.floor(X/60),N=X%60;return(P<=0?"+":"-")+_(tt,2,"0")+":"+_(N,2,"0")},m:function ot(P,X){if(P.date()<X.date())return-ot(X,P);var tt=12*(X.year()-P.year())+(X.month()-P.month()),N=P.clone().add(tt,d),at=X-N<0,st=P.clone().add(tt+(at?-1:1),d);return+(-(tt+(X-N)/(at?N-st:st-N))||0)},a:function(ot){return ot<0?Math.ceil(ot)||0:Math.floor(ot)},p:function(ot){return{M:d,y:f,w:u,d:n,D:p,h,m:a,s:o,ms:s,Q:c}[ot]||String(ot||"").toLowerCase().replace(/s$/,"")},u:function(ot){return ot===void 0}},E="en",O={};O[E]=B;var D="$isDayjsObject",G=function(ot){return ot instanceof ht||!(!ot||!ot[D])},Z=function ot(P,X,tt){var N;if(!P)return E;if(typeof P=="string"){var at=P.toLowerCase();O[at]&&(N=at),X&&(O[at]=X,N=at);var st=P.split("-");if(!N&&st.length>1)return ot(st[0])}else{var Bt=P.name;O[Bt]=P,N=Bt}return!tt&&N&&(E=N),N||!tt&&E},J=function(ot,P){if(G(ot))return ot.clone();var X=typeof P=="object"?P:{};return X.date=ot,X.args=arguments,new ht(X)},rt=v;rt.l=Z,rt.i=G,rt.w=function(ot,P){return J(ot,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var ht=function(){function ot(X){this.$L=Z(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[D]=!0}var P=ot.prototype;return P.parse=function(X){this.$d=function(tt){var{date:N,utc:at}=tt;if(N===null)return new Date(NaN);if(rt.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var st=N.match(S);if(st){var Bt=st[2]-1||0,vt=(st[7]||"0").substring(0,3);return at?new Date(Date.UTC(st[1],Bt,st[3]||1,st[4]||0,st[5]||0,st[6]||0,vt)):new Date(st[1],Bt,st[3]||1,st[4]||0,st[5]||0,st[6]||0,vt)}}return new Date(N)}(X),this.init()},P.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},P.$utils=function(){return rt},P.isValid=function(){return this.$d.toString()!==x},P.isSame=function(X,tt){var N=J(X);return this.startOf(tt)<=N&&N<=this.endOf(tt)},P.isAfter=function(X,tt){return J(X)<this.startOf(tt)},P.isBefore=function(X,tt){return this.endOf(tt)<J(X)},P.$g=function(X,tt,N){return rt.u(X)?this[tt]:this.set(N,X)},P.unix=function(){return Math.floor(this.valueOf()/1000)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(X,tt){var N=this,at=!!rt.u(tt)||tt,st=rt.p(X),Bt=function(Dt,Ht){var Rt=rt.w(N.$u?Date.UTC(N.$y,Ht,Dt):new Date(N.$y,Ht,Dt),N);return at?Rt:Rt.endOf(n)},vt=function(Dt,Ht){return rt.w(N.toDate()[Dt].apply(N.toDate("s"),(at?[0,0,0,0]:[23,59,59,999]).slice(Ht)),N)},Wt=this.$W,Nt=this.$M,jt=this.$D,Xt="set"+(this.$u?"UTC":"");switch(st){case f:return at?Bt(1,0):Bt(31,11);case d:return at?Bt(1,Nt):Bt(0,Nt+1);case u:var $t=this.$locale().weekStart||0,Mt=(Wt<$t?Wt+7:Wt)-$t;return Bt(at?jt-Mt:jt+(6-Mt),Nt);case n:case p:return vt(Xt+"Hours",0);case h:return vt(Xt+"Minutes",1);case a:return vt(Xt+"Seconds",2);case o:return vt(Xt+"Milliseconds",3);default:return this.clone()}},P.endOf=function(X){return this.startOf(X,!1)},P.$set=function(X,tt){var N,at=rt.p(X),st="set"+(this.$u?"UTC":""),Bt=(N={},N[n]=st+"Date",N[p]=st+"Date",N[d]=st+"Month",N[f]=st+"FullYear",N[h]=st+"Hours",N[a]=st+"Minutes",N[o]=st+"Seconds",N[s]=st+"Milliseconds",N)[at],vt=at===n?this.$D+(tt-this.$W):tt;if(at===d||at===f){var Wt=this.clone().set(p,1);Wt.$d[Bt](vt),Wt.init(),this.$d=Wt.set(p,Math.min(this.$D,Wt.daysInMonth())).$d}else Bt&&this.$d[Bt](vt);return this.init(),this},P.set=function(X,tt){return this.clone().$set(X,tt)},P.get=function(X){return this[rt.p(X)]()},P.add=function(X,tt){var N,at=this;X=Number(X);var st=rt.p(tt),Bt=function(Nt){var jt=J(at);return rt.w(jt.date(jt.date()+Math.round(Nt*X)),at)};if(st===d)return this.set(d,this.$M+X);if(st===f)return this.set(f,this.$y+X);if(st===n)return Bt(1);if(st===u)return Bt(7);var vt=(N={},N[a]=e,N[h]=i,N[o]=r,N)[st]||1,Wt=this.$d.getTime()+X*vt;return rt.w(Wt,this)},P.subtract=function(X,tt){return this.add(-1*X,tt)},P.format=function(X){var tt=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var at=X||"YYYY-MM-DDTHH:mm:ssZ",st=rt.z(this),Bt=this.$H,vt=this.$m,Wt=this.$M,{weekdays:Nt,months:jt,meridiem:Xt}=N,$t=function(Ht,Rt,ie,re){return Ht&&(Ht[Rt]||Ht(tt,at))||ie[Rt].slice(0,re)},Mt=function(Ht){return rt.s(Bt%12||12,Ht,"0")},Dt=Xt||function(Ht,Rt,ie){var re=Ht<12?"AM":"PM";return ie?re.toLowerCase():re};return at.replace(T,function(Ht,Rt){return Rt||function(ie){switch(ie){case"YY":return String(tt.$y).slice(-2);case"YYYY":return rt.s(tt.$y,4,"0");case"M":return Wt+1;case"MM":return rt.s(Wt+1,2,"0");case"MMM":return $t(N.monthsShort,Wt,jt,3);case"MMMM":return $t(jt,Wt);case"D":return tt.$D;case"DD":return rt.s(tt.$D,2,"0");case"d":return String(tt.$W);case"dd":return $t(N.weekdaysMin,tt.$W,Nt,2);case"ddd":return $t(N.weekdaysShort,tt.$W,Nt,3);case"dddd":return Nt[tt.$W];case"H":return String(Bt);case"HH":return rt.s(Bt,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return Dt(Bt,vt,!0);case"A":return Dt(Bt,vt,!1);case"m":return String(vt);case"mm":return rt.s(vt,2,"0");case"s":return String(tt.$s);case"ss":return rt.s(tt.$s,2,"0");case"SSS":return rt.s(tt.$ms,3,"0");case"Z":return st}return null}(Ht)||st.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(X,tt,N){var at,st=this,Bt=rt.p(tt),vt=J(X),Wt=(vt.utcOffset()-this.utcOffset())*e,Nt=this-vt,jt=function(){return rt.m(st,vt)};switch(Bt){case f:at=jt()/12;break;case d:at=jt();break;case c:at=jt()/3;break;case u:at=(Nt-Wt)/604800000;break;case n:at=(Nt-Wt)/86400000;break;case h:at=Nt/i;break;case a:at=Nt/e;break;case o:at=Nt/r;break;default:at=Nt}return N?at:rt.a(at)},P.daysInMonth=function(){return this.endOf(d).$D},P.$locale=function(){return O[this.$L]},P.locale=function(X,tt){if(!X)return this.$L;var N=this.clone(),at=Z(X,tt,!0);return at&&(N.$L=at),N},P.clone=function(){return rt.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},ot}(),nt=ht.prototype;return J.prototype=nt,[["$ms",s],["$s",o],["$m",a],["$H",h],["$W",n],["$M",d],["$y",f],["$D",p]].forEach(function(ot){nt[ot[1]]=function(P){return this.$g(P,ot[0],ot[1])}}),J.extend=function(ot,P){return ot.$i||(ot(P,ht,J),ot.$i=!0),J},J.locale=Z,J.isDayjs=G,J.unix=function(ot){return J(1000*ot)},J.en=O[E],J.Ls=O,J.p={},J})});var cf=zn(function(lf){Object.defineProperty(lf,"__esModule",{value:!0});lf.BLANK_URL=lf.relativeFirstCharacters=lf.whitespaceEscapeCharsRegex=lf.urlSchemeRegex=lf.ctrlCharactersRegex=lf.htmlCtrlEntityRegex=lf.htmlEntitiesRegex=lf.invalidProtocolRegex=void 0;lf.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;lf.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;lf.htmlCtrlEntityRegex=/&(newline|tab);/gi;lf.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;lf.urlSchemeRegex=/^.+(:|&colon;)/gim;lf.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;lf.relativeFirstCharacters=[".","/"];lf.BLANK_URL="about:blank"});var ml=zn(function(df){Object.defineProperty(df,"__esModule",{value:!0});df.sanitizeUrl=kb;var ke=cf();function xb(r){return ke.relativeFirstCharacters.indexOf(r[0])>-1}function Cb(r){var e=r.replace(ke.ctrlCharactersRegex,"");return e.replace(ke.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function bb(r){return URL.canParse(r)}function uf(r){try{return decodeURIComponent(r)}catch(e){return r}}function kb(r){if(!r)return ke.BLANK_URL;var e,i=uf(r.trim());do i=Cb(i).replace(ke.htmlCtrlEntityRegex,"").replace(ke.ctrlCharactersRegex,"").replace(ke.whitespaceEscapeCharsRegex,"").trim(),i=uf(i),e=i.match(ke.ctrlCharactersRegex)||i.match(ke.htmlEntitiesRegex)||i.match(ke.htmlCtrlEntityRegex)||i.match(ke.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return ke.BLANK_URL;if(xb(s))return s;var o=s.trimStart(),a=o.match(ke.urlSchemeRegex);if(!a)return s;var h=a[0].toLowerCase().trim();if(ke.invalidProtocolRegex.test(h))return ke.BLANK_URL;var n=o.replace(/\\/g,"/");if(h==="mailto:"||h.includes("://"))return n;if(h==="http:"||h==="https:"){if(!bb(n))return ke.BLANK_URL;var u=new URL(n);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return n}});var Oc=Object.defineProperty,t=(r,e)=>Oc(r,"name",{value:e,configurable:!0}),Qo=(r,e)=>{for(var i in e)Oc(r,i,{get:e[i],enumerable:!0})};var Pc=xn(sm(),1),Qe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},yd=t(function(r="fatal"){let e=Qe.fatal;if(typeof r==="string"){if(r.toLowerCase()in Qe)e=Qe[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=Qe.fatal)l.fatal=console.error?console.error.bind(console,Fe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Fe("FATAL"));if(e<=Qe.error)l.error=console.error?console.error.bind(console,Fe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Fe("ERROR"));if(e<=Qe.warn)l.warn=console.warn?console.warn.bind(console,Fe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Fe("WARN"));if(e<=Qe.info)l.info=console.info?console.info.bind(console,Fe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Fe("INFO"));if(e<=Qe.debug)l.debug=console.debug?console.debug.bind(console,Fe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Fe("DEBUG"));if(e<=Qe.trace)l.trace=console.debug?console.debug.bind(console,Fe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Fe("TRACE"))},"setLogLevel"),Fe=t((r)=>`%c${Pc.default().format("ss.SSS")} : ${r} : `,"format");var To={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return To.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return To.hue2rgb(a,o,r)*255;case"b":return To.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),h=(o+a)/2;if(s==="l")return h*100;if(o===a)return 0;let n=o-a,u=h>0.5?n/(2-o-a):n/(o+a);if(s==="s")return u*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Rc=To;var ky={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},qc=ky;var wy={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Wc=wy;var Sy={channel:Rc,lang:qc,unit:Wc},Ot=Sy;var Je={};for(let r=0;r<=255;r++)Je[r]=Ot.unit.dec2hex(r);var de={ALL:0,RGB:1,HSL:2};class Nc{constructor(){this.type=de.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=de.ALL}is(r){return this.type===r}}var zc=Nc;class Hc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new zc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=de.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Ot.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Ot.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Ot.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Ot.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Ot.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Ot.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(de.HSL)&&e!==void 0)return e;return this._ensureHSL(),Ot.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(de.HSL)&&e!==void 0)return e;return this._ensureHSL(),Ot.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(de.HSL)&&e!==void 0)return e;return this._ensureHSL(),Ot.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(de.RGB)&&e!==void 0)return e;return this._ensureRGB(),Ot.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(de.RGB)&&e!==void 0)return e;return this._ensureRGB(),Ot.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(de.RGB)&&e!==void 0)return e;return this._ensureRGB(),Ot.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(de.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(de.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(de.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(de.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(de.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(de.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Yc=Hc;var Ty=new Yc({r:0,g:0,b:0,a:0},"transparent"),dr=Ty;var jc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(jc.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,h=o>4,n=h?1:17,u=h?8:4,d=a?0:-1,c=h?255:15;return dr.set({r:(s>>u*(d+3)&c)*n,g:(s>>u*(d+2)&c)*n,b:(s>>u*(d+1)&c)*n,a:a?(s&c)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${Je[Math.round(e)]}${Je[Math.round(i)]}${Je[Math.round(s)]}${Je[Math.round(o*255)]}`;else return`#${Je[Math.round(e)]}${Je[Math.round(i)]}${Je[Math.round(s)]}`}},wr=jc;var Bo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:(r)=>{let e=r.match(Bo.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Ot.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Ot.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Ot.channel.clamp.h(parseFloat(i)*360)}}return Ot.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Bo.re);if(!i)return;let[,s,o,a,h,n]=i;return dr.set({h:Bo._hue2deg(s),s:Ot.channel.clamp.s(parseFloat(o)),l:Ot.channel.clamp.l(parseFloat(a)),a:h?Ot.channel.clamp.a(n?parseFloat(h)/100:parseFloat(h)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Ot.lang.round(e)}, ${Ot.lang.round(i)}%, ${Ot.lang.round(s)}%, ${o})`;else return`hsl(${Ot.lang.round(e)}, ${Ot.lang.round(i)}%, ${Ot.lang.round(s)}%)`}},Ti=Bo;var _o={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:(r)=>{r=r.toLowerCase();let e=_o.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in _o.colors)if(_o.colors[i]===e)return i;return}},ea=_o;var Uc={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Uc.re);if(!i)return;let[,s,o,a,h,n,u,d,c]=i;return dr.set({r:Ot.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Ot.channel.clamp.g(h?parseFloat(a)*2.55:parseFloat(a)),b:Ot.channel.clamp.b(u?parseFloat(n)*2.55:parseFloat(n)),a:d?Ot.channel.clamp.a(c?parseFloat(d)/100:parseFloat(d)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Ot.lang.round(e)}, ${Ot.lang.round(i)}, ${Ot.lang.round(s)}, ${Ot.lang.round(o)})`;else return`rgb(${Ot.lang.round(e)}, ${Ot.lang.round(i)}, ${Ot.lang.round(s)})`}},Bi=Uc;var By={format:{keyword:ea,hex:wr,rgb:Bi,rgba:Bi,hsl:Ti,hsla:Ti},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||Bi.parse(r)||Ti.parse(r)||ea.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(de.HSL)||r.data.r===void 0)return Ti.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return Bi.stringify(r);else return wr.stringify(r)}},fe=By;var _y=(r,e)=>{let i=fe.parse(r);for(let s in e)i[s]=Ot.channel.clamp[s](e[s]);return fe.stringify(i)},vo=_y;var vy=(r,e,i=0,s=1)=>{if(typeof r!=="number")return vo(r,{a:e});let o=dr.set({r:Ot.channel.clamp.r(r),g:Ot.channel.clamp.g(e),b:Ot.channel.clamp.b(i),a:Ot.channel.clamp.a(s)});return fe.stringify(o)},xt=vy;var Ly=(r,e)=>Ot.lang.round(fe.parse(r)[e]),Ea=Ly;var Fy=(r)=>{let{r:e,g:i,b:s}=fe.parse(r),o=0.2126*Ot.channel.toLinear(e)+0.7152*Ot.channel.toLinear(i)+0.0722*Ot.channel.toLinear(s);return Ot.lang.round(o)},Xc=Fy;var My=(r)=>Xc(r)>=0.5,Gc=My;var Ay=(r)=>!Gc(r),De=Ay;var Ey=(r,e,i)=>{let s=fe.parse(r),o=s[e],a=Ot.channel.clamp[e](o+i);if(o!==a)s[e]=a;return fe.stringify(s)},hc=Ey;var $y=(r,e)=>hc(r,"l",e),g=$y;var Iy=(r,e)=>hc(r,"l",-e),A=Iy;var Oy=(r,e)=>{let i=fe.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return vo(r,s)},L=Oy;var Dy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:h}=fe.parse(r),{r:n,g:u,b:d,a:c}=fe.parse(e),f=i/100,p=f*2-1,x=h-c,T=((p*x===-1?p:(p+x)/(1+p*x))+1)/2,B=1-T,_=s*T+n*B,v=o*T+u*B,E=a*T+d*B,O=h*f+c*(1-f);return xt(_,v,E,O)},Vc=Dy;var Py=(r,e=100)=>{let i=fe.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Vc(i,r,e)},Q=Py;var Yg=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Wr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ry=/\s/,qy=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
2
+ `,o);if(a===-1)break;let h=o;while(h>i&&Ry.test(r[h-1]))h--;e+=r.slice(i,h)+`
3
+ `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Jg=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},ns={},bc=t(function(r,e){r=qy(r.replace(Yg,"").replace(Wr,""));for(let[i,{detector:s}]of Object.entries(ns))if(s(r,e))return i;throw new Jg(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),lm=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)tu(e,i,s)},"registerLazyLoadedDiagrams"),tu=t((r,e,i)=>{if(ns[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);ns[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),xh=t((r)=>ns[r].loader,"getDiagramLoader"),ra=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>ra(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,h])=>{if(typeof h==="object"){if(h===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(h)?[]:{};if(typeof o[a]==="object")o[a]=ra(o[a],h,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=h;else Object.defineProperty(r,a,{value:h,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),lt=ra,Ne="#ffffff",ze="#f2f2f2",Yt=t((r,e)=>e?L(r,{s:-40,l:10}):L(r,{s:-40,l:-10}),"mkBorder"),Wy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode)this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10);else this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,5);if(this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},Ny=t((r)=>{let e=new Wy;return e.calculate(r),e},"getThemeVariables"),zy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=xt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=xt(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||g(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=g(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=g(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=Q(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Q(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Hy=t((r)=>{let e=new zy;return e.calculate(r),e},"getThemeVariables"),Yy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=xt(102,102,255,0.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Q(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Q(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||A(Q(this.git0),25),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},en=t((r)=>{let e=new Yy;return e.calculate(r),e},"getThemeVariables"),jy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=g("#cde498",10),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.primaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Uy=t((r)=>{let e=new jy;return e.calculate(r),e},"getThemeVariables"),Xy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Q(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{l:-(8+r*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(this.contrast,30),this.taskBorderColor=A(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=g(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Gy=t((r)=>{let e=new Xy;return e.calculate(r),e},"getThemeVariables"),Vy=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(De(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||L(r,{h:30}),this.cScale4=this.cScale4||L(r,{h:60}),this.cScale5=this.cScale5||L(r,{h:90}),this.cScale6=this.cScale6||L(r,{h:120}),this.cScale7=this.cScale7||L(r,{h:150}),this.cScale8=this.cScale8||L(r,{h:210,l:150}),this.cScale9=this.cScale9||L(r,{h:270}),this.cScale10=this.cScale10||L(r,{h:300}),this.cScale11=this.cScale11||L(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Ky=t((r)=>{let e=new Vy;return e.calculate(r),e},"getThemeVariables"),Zy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor=Q(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Yt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(De(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor=Q(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},rx=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),ix=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Yt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(De(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ox=t((r)=>{let e=new ix;return e.calculate(r),e},"getThemeVariables"),sx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=xt(255,255,255,0.25),this.arrowheadColor=Q(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||Q(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ax=t((r)=>{let e=new sx;return e.calculate(r),e},"getThemeVariables"),Ro={base:{getThemeVariables:Ny},dark:{getThemeVariables:Hy},default:{getThemeVariables:en},forest:{getThemeVariables:Uy},neutral:{getThemeVariables:Gy},neo:{getThemeVariables:Ky},"neo-dark":{getThemeVariables:Qy},redux:{getThemeVariables:tx},"redux-dark":{getThemeVariables:rx},"redux-color":{getThemeVariables:ox},"redux-dark-color":{getThemeVariables:ax}},ce={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:0.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:50000,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},eu={...ce,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Ro.default.getThemeVariables(),sequence:{...ce.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:ce.class?.theme,look:ce.class?.look,layout:ce.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ce.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ce.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ce.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ce.pie,useWidth:984},xyChart:{...ce.xyChart,useWidth:void 0},requirement:{...ce.requirement,useWidth:void 0},packet:{...ce.packet},eventmodeling:{...ce.eventmodeling},treeView:{...ce.treeView,useWidth:void 0},radar:{...ce.radar},usecase:{...ce.usecase},railroad:{...ce.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...ce.ishikawa},sankey:{...ce.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ce.venn},cynefin:{...ce.cynefin}},ru=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...ru(r[s],"")];return[...i,e+s]},[]),"keyify"),nx=new Set(ru(eu,"")),Y=eu,lx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},hx=t((r)=>lx[r]??r,"getDiagramConfigKey"),cx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},ux=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Li=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Li(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!nx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=cx[e];if(s)ux(r[e],s);else l.debug("sanitizing object",e),Li(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Zg(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Zg=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),hi=Object.freeze(Y),dx=["theme","look","layout"],fx=new Set(["classic","handDrawn","neo"]),px=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Ro,e);return r!=="look"||fx.has(e)},"isUsableAppearance"),gx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&px(i,o))},"readAppearance"),aa=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),we=lt({},hi),$o,Io={},tr=[],_i=lt({},hi),vi,mx=t((r,e)=>{if(!vi)return;let i=[e,...[...tr].reverse(),Io,hi],s=r[vi];for(let o of dx)for(let a of i){let h=gx(a,vi,o);if(h===void 0)continue;if(r[o]=h,s?.[o]!==void 0)s[o]=h;break}},"resolveAppearance"),Nr=t((r,e)=>{let i=lt({},r),s={};for(let a of e)iu(a),s=lt(s,a);if(i=lt(i,s),mx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Ro,i.theme)){let a=lt({},$o),h=lt(a.themeVariables||{},s.themeVariables);i.themeVariables=Ro[i.theme].getThemeVariables(h)}return _i=i,xx(_i),_i},"updateCurrentConfig"),cm=t((r)=>{vi=r===void 0?void 0:hx(r),Nr(we,tr)},"setDiagramConfigScope"),wh=t((r)=>{if(we=lt({},hi),we=lt(we,r),Io=lt({},r),r.theme&&Object.hasOwn(Ro,r.theme))we.themeVariables=Ro[r.theme].getThemeVariables(r.themeVariables);return Nr(we,tr),we},"setSiteConfig"),Ch=t((r)=>{$o=lt({},r)},"saveConfigFromInitialize"),Eh=t((r)=>(we=lt(we,r),Io=lt(Io,r),Nr(we,tr),we),"updateSiteConfig"),Xg=t(()=>lt({},we),"getSiteConfig"),eA=t((r)=>(Nr(_i,[r]),C()),"setConfig"),C=t(()=>lt({},_i),"getConfig"),iu=t((r)=>{if(!r)return;["secure",...we.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")iu(r[e])})},"sanitize"),Bh=t((r)=>{if(Li(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};tr.push(r),Nr(we,tr)},"addDirective"),vd=t((r=we)=>{tr=[],vi=void 0,Nr(r,tr)},"reset"),yx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Kc={},ou=t((r)=>{if(Kc[r])return;l.warn(yx[r]),Kc[r]=!0},"issueWarning"),xx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)ou("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ih=t(()=>{let r={};if($o)r=lt(r,$o);for(let e of tr)r=lt(r,e);return r},"getUserDefinedConfig"),tn=t((r)=>{if(r.flowchart?.htmlLabels!=null)ou("FLOWCHART_HTML_LABELS_DEPRECATED");return aa(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),ul=/<\/?br\s*\/?>/gi,Cx=new RegExp(ul.source,"i"),bx=t((r)=>{if(!r)return[""];return nu(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),kx=(()=>{let r=!1;return()=>{if(!r)su(),r=!0}})();function su(){Kt.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Kt.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(su,"setupDompurifyHooks");var au=t((r)=>(kx(),Kt.sanitize(r)),"removeScript"),Zc=t((r,e)=>{if(tn(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=au(r);else if(i!=="loose")r=nu(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Bx(r)}return r},"sanitizeMore"),te=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Kt.sanitize(Zc(r,e),e.dompurifyConfig).toString();else r=Kt.sanitize(Zc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),wx=t((r,e)=>{if(typeof r==="string")return te(r,e);return r.flat().map((i)=>te(i,e))},"sanitizeTextOrArray"),Sx=t((r)=>Cx.test(r),"hasBreaks"),Tx=t((r)=>r.split(ul),"splitBreaks"),Bx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),nu=t((r)=>r.replace(ul,"#br#"),"breakToPlaceholder"),tA=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),_x=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),vx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),Lo=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],h=e[s+1];if(Lx(a,h))o=a+","+h,s++,i.pop()}i.push(Fx(o))}return i.join("")},"parseGenericTypes"),na=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Lx=t((r,e)=>{let i=na(r,"~"),s=na(e,"~");return i===1&&s===1},"shouldCombineSets"),Fx=t((r)=>{let e=na(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Qc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ao=/\$\$(.*?)\$\$/g,Lt=t((r)=>(r.match(Ao)?.length??0)>0,"hasKatex"),yc=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await vc(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Mx=t(async(r,e)=>{if(!Lt(r))return r;if(!(Qc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Ao,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Qc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(ul).map((o)=>Lt(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Ao,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Ao,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),vc=t(async(r,e)=>te(await Mx(r,e),e),"renderKatexSanitized"),w={getRows:bx,sanitizeText:te,sanitizeTextOrArray:wx,hasBreaks:Sx,splitBreaks:Tx,lineBreakRegex:ul,removeScript:au,getUrl:tA,evaluate:aa,getMax:_x,getMin:vx},Ax=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Ex=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),ne=t(function(r,e,i,s){let o=Ex(e,i,s);Ax(r,o)},"configureSvgSize"),oa=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:h}=o;l.info(`SVG bounds: ${a}x${h}`,o);let n=0,u=0;l.info(`Graph bounds: ${n}x${u}`,r),n=a+i*2,u=h+i*2,l.info(`Calculated bounds: ${n}x${u}`),ne(e,u,n,s);let d=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",d)},"setupGraphViewbox"),Eo={};function um(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
+ `)}t(um,"cssStyleSheetToString");var $x=t((r,e,i,s)=>{let o="";if(r in Eo&&Eo[r])o=Eo[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
5
5
  font-family: ${i.fontFamily};
6
6
  font-size: ${i.fontSize};
7
7
  fill: ${i.textColor}
@@ -122,66 +122,66 @@ import{Wt}from"./index-eggbcdwx.js";import{xn,$n}from"./index-nwbr15b3.js";var a
122
122
  }
123
123
 
124
124
  ${e}
125
- `},"getStyles"),Rx=t((r,e)=>{if(e!==void 0)Eo[r]=e},"addStylesForDiagram"),wh=Px,lm={};To(lm,{clear:()=>F,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>H,setAccDescription:()=>z,setAccTitle:()=>O,setDiagramTitle:()=>q});var ca="",ua="",da="",fa=t((r)=>te(r,E()),"sanitizeText"),F=t(()=>{ca="",da="",ua=""},"clear"),O=t((r)=>{ca=fa(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>ca,"getAccTitle"),z=t((r)=>{da=fa(r).replace(/\n\s+/g,`
126
- `)},"setAccDescription"),j=t(()=>da,"getAccDescription"),q=t((r)=>{ua=fa(r)},"setDiagramTitle"),H=t(()=>ua,"getDiagramTitle"),Jc=l,qx=yd,m=E,wa=Yg,ns=mi,Po=t((r)=>te(r,m()),"sanitizeText"),kc=na,Wx=t(()=>lm,"getCommonDb"),Oo={},kd=t((r,e,i)=>{if(Oo[r])Jc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(Oo[r]=e,i)tu(r,i);Rx(r,e.styles),e.injectUtils?.(Jc,qx,m,Po,kc,Wx(),()=>{})},"registerDiagram"),cm=t((r)=>{if(r in Oo)return Oo[r];throw new Nx(r)},"getDiagram"),Nx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class Fi extends Map{constructor(r,e=Yx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(lu(this,r))}has(r){return super.has(lu(this,r))}set(r,e){return super.set(zx(this,r),e)}delete(r){return super.delete(Hx(this,r))}}function lu({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function zx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Hx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Yx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var jx={value:()=>{}};function cu(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new qo(i)}function qo(r){this._=r}function Ux(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}qo.prototype=cu.prototype={constructor:qo,on:function(r,e){var i=this._,s=Ux(r+"",i),o,a=-1,h=s.length;if(arguments.length<2){while(++a<h)if((o=(r=s[a]).type)&&(o=Xx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<h)if(o=(r=s[a]).type)i[o]=hu(i[o],r.name,e);else if(e==null)for(o in i)i[o]=hu(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new qo(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function Xx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function hu(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=jx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var pa=cu;var Wo="http://www.w3.org/1999/xhtml",ga={svg:"http://www.w3.org/2000/svg",xhtml:Wo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ye(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return ga.hasOwnProperty(e)?{space:ga[e],local:r}:r}function Gx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Wo&&e.documentElement.namespaceURI===Wo?e.createElement(r):e.createElementNS(i,r)}}function Vx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Mi(r){var e=Ye(r);return(e.local?Vx:Gx)(e)}function Kx(){}function pr(r){return r==null?Kx:function(){return this.querySelector(r)}}function ma(r){if(typeof r!=="function")r=pr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=Array(h),u,d,c=0;c<h;++c)if((u=a[c])&&(d=r.call(u,u.__data__,c,a))){if("__data__"in u)d.__data__=u.__data__;n[c]=d}return new he(s,this._parents)}function ya(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Zx(){return[]}function Hr(r){return r==null?Zx:function(){return this.querySelectorAll(r)}}function Qx(r){return function(){return ya(r.apply(this,arguments))}}function ba(r){if(typeof r==="function")r=Qx(r);else r=Hr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var h=e[a],n=h.length,u,d=0;d<n;++d)if(u=h[d])s.push(r.call(u,u.__data__,d,h)),o.push(u);return new he(s,o)}function Yr(r){return function(){return this.matches(r)}}function zo(r){return function(e){return e.matches(r)}}var Jx=Array.prototype.find;function t0(r){return function(){return Jx.call(this.children,r)}}function e0(){return this.firstElementChild}function ka(r){return this.select(r==null?e0:t0(typeof r==="function"?r:zo(r)))}var r0=Array.prototype.filter;function i0(){return Array.from(this.children)}function o0(r){return function(){return r0.call(this.children,r)}}function Sa(r){return this.selectAll(r==null?i0:o0(typeof r==="function"?r:zo(r)))}function Ta(r){if(typeof r!=="function")r=Yr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=[],u,d=0;d<h;++d)if((u=a[d])&&r.call(u,u.__data__,d,a))n.push(u);return new he(s,this._parents)}function Ei(r){return Array(r.length)}function _a(){return new he(this._enter||this._groups.map(Ei),this._parents)}function $i(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}$i.prototype={constructor:$i,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function va(r){return function(){return r}}function s0(r,e,i,s,o,a){var h=0,n,u=e.length,d=a.length;for(;h<d;++h)if(n=e[h])n.__data__=a[h],s[h]=n;else i[h]=new $i(r,a[h]);for(;h<u;++h)if(n=e[h])o[h]=n}function a0(r,e,i,s,o,a,h){var n,u,d=new Map,c=e.length,f=a.length,p=Array(c),x;for(n=0;n<c;++n)if(u=e[n])if(p[n]=x=h.call(u,u.__data__,n,e)+"",d.has(x))o[n]=u;else d.set(x,u);for(n=0;n<f;++n)if(x=h.call(r,a[n],n,a)+"",u=d.get(x))s[n]=u,u.__data__=a[n],d.delete(x);else i[n]=new $i(r,a[n]);for(n=0;n<c;++n)if((u=e[n])&&d.get(p[n])===u)o[n]=u}function n0(r){return r.__data__}function La(r,e){if(!arguments.length)return Array.from(this,n0);var i=e?a0:s0,s=this._parents,o=this._groups;if(typeof r!=="function")r=va(r);for(var a=o.length,h=Array(a),n=Array(a),u=Array(a),d=0;d<a;++d){var c=s[d],f=o[d],p=f.length,x=l0(r.call(c,c&&c.__data__,d,s)),k=x.length,S=n[d]=Array(k),T=h[d]=Array(k),B=u[d]=Array(p);i(c,f,S,T,B,x,e);for(var _=0,L=0,D,P;_<k;++_)if(D=S[_]){if(_>=L)L=_+1;while(!(P=T[L])&&++L<k);D._next=P||null}}return h=new he(h,s),h._enter=n,h._exit=u,h}function l0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Fa(){return new he(this._exit||this._groups.map(Ei),this._parents)}function Ma(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function Aa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,h=Math.min(o,a),n=Array(o),u=0;u<h;++u)for(var d=i[u],c=s[u],f=d.length,p=n[u]=Array(f),x,k=0;k<f;++k)if(x=d[k]||c[k])p[k]=x;for(;u<o;++u)n[u]=i[u];return new he(n,this._parents)}function $a(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],h;--o>=0;)if(h=s[o]){if(a&&h.compareDocumentPosition(a)^4)a.parentNode.insertBefore(h,a);a=h}return this}function Oa(r){if(!r)r=h0;function e(f,p){return f&&p?r(f.__data__,p.__data__):!f-!p}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var h=i[a],n=h.length,u=o[a]=Array(n),d,c=0;c<n;++c)if(d=h[c])u[c]=d;u.sort(e)}return new he(o,this._parents).order()}function h0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function Da(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Pa(){return Array.from(this)}function Ra(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var h=s[o];if(h)return h}return null}function qa(){let r=0;for(let e of this)++r;return r}function Wa(){return!this.node()}function Na(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,h=o.length,n;a<h;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function c0(r){return function(){this.removeAttribute(r)}}function u0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function d0(r,e){return function(){this.setAttribute(r,e)}}function f0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function p0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function g0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function za(r,e){var i=Ye(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?u0:c0:typeof e==="function"?i.local?g0:p0:i.local?f0:d0)(i,e))}function Ii(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function m0(r){return function(){this.style.removeProperty(r)}}function y0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function x0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function Ha(r,e,i){return arguments.length>1?this.each((e==null?m0:typeof e==="function"?x0:y0)(r,e,i==null?"":i)):gr(this.node(),r)}function gr(r,e){return r.style.getPropertyValue(e)||Ii(r).getComputedStyle(r,null).getPropertyValue(e)}function C0(r){return function(){delete this[r]}}function b0(r,e){return function(){this[r]=e}}function k0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ya(r,e){return arguments.length>1?this.each((e==null?C0:typeof e==="function"?k0:b0)(r,e)):this.node()[r]}function uu(r){return r.trim().split(/^|\s+/)}function ja(r){return r.classList||new du(r)}function du(r){this._node=r,this._names=uu(r.getAttribute("class")||"")}du.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function fu(r,e){var i=ja(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function pu(r,e){var i=ja(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function w0(r){return function(){fu(this,r)}}function S0(r){return function(){pu(this,r)}}function T0(r,e){return function(){(e.apply(this,arguments)?fu:pu)(this,r)}}function Ua(r,e){var i=uu(r+"");if(arguments.length<2){var s=ja(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?T0:e?w0:S0)(i,e))}function B0(){this.textContent=""}function _0(r){return function(){this.textContent=r}}function v0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Xa(r){return arguments.length?this.each(r==null?B0:(typeof r==="function"?v0:_0)(r)):this.node().textContent}function L0(){this.innerHTML=""}function F0(r){return function(){this.innerHTML=r}}function M0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function Ga(r){return arguments.length?this.each(r==null?L0:(typeof r==="function"?M0:F0)(r)):this.node().innerHTML}function A0(){if(this.nextSibling)this.parentNode.appendChild(this)}function Va(){return this.each(A0)}function E0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ka(){return this.each(E0)}function Za(r){var e=typeof r==="function"?r:Mi(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function $0(){return null}function Qa(r,e){var i=typeof r==="function"?r:Mi(r),s=e==null?$0:typeof e==="function"?e:pr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function I0(){var r=this.parentNode;if(r)r.removeChild(this)}function Ja(){return this.each(I0)}function O0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function D0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function rn(r){return this.select(r?D0:O0)}function on(r){return arguments.length?this.property("__data__",r):this.node().__data__}function P0(r){return function(e){r.call(this,e,this.__data__)}}function R0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function q0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function W0(r,e,i){return function(){var s=this.__on,o,a=P0(e);if(s){for(var h=0,n=s.length;h<n;++h)if((o=s[h]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function sn(r,e,i){var s=R0(r+""),o,a=s.length,h;if(arguments.length<2){var n=this.node().__on;if(n){for(var u=0,d=n.length,c;u<d;++u)for(o=0,c=n[u];o<a;++o)if((h=s[o]).type===c.type&&h.name===c.name)return c.value}return}n=e?W0:q0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function gu(r,e,i){var s=Ii(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function N0(r,e){return function(){return gu(this,r,e)}}function z0(r,e){return function(){return gu(this,r,e.apply(this,arguments))}}function an(r,e){return this.each((typeof e==="function"?z0:N0)(r,e))}function*ln(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,h;o<a;++o)if(h=s[o])yield h}var hn=[null];function he(r,e){this._groups=r,this._parents=e}function mu(){return new he([[document.documentElement]],hn)}function H0(){return this}he.prototype=mu.prototype={constructor:he,select:ma,selectAll:ba,selectChild:ka,selectChildren:Sa,filter:Ta,data:La,enter:_a,exit:Fa,join:Ma,merge:Aa,selection:H0,order:$a,sort:Oa,call:Da,nodes:Pa,node:Ra,size:qa,empty:Wa,each:Na,attr:za,style:Ha,property:Ya,classed:Ua,text:Xa,html:Ga,raise:Va,lower:Ka,append:Za,insert:Qa,remove:Ja,clone:rn,datum:on,on:sn,dispatch:an,[Symbol.iterator]:ln};var ir=mu;function b(r){return typeof r==="string"?new he([[document.querySelector(r)]],[document.documentElement]):new he([[r]],hn)}function rs(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function xc(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function as(){}var Oi=0.7,jo=1/Oi,jr="\\s*([+-]?\\d+)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Y0=/^#([0-9a-f]{3,8})$/,j0=new RegExp(`^rgb\\(${jr},${jr},${jr}\\)$`),U0=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),X0=new RegExp(`^rgba\\(${jr},${jr},${jr},${Di}\\)$`),G0=new RegExp(`^rgba\\(${je},${je},${je},${Di}\\)$`),V0=new RegExp(`^hsl\\(${Di},${je},${je}\\)$`),K0=new RegExp(`^hsla\\(${Di},${je},${je},${Di}\\)$`),yu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};rs(as,no,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:xu,formatHex:xu,formatHex8:Z0,formatHsl:Q0,formatRgb:Cu,toString:Cu});function xu(){return this.rgb().formatHex()}function Z0(){return this.rgb().formatHex8()}function Q0(){return Bu(this).formatHsl()}function Cu(){return this.rgb().formatRgb()}function no(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Y0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?bu(e):i===3?new Gn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Ho(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Ho(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=j0.exec(r))?new Gn(e[1],e[2],e[3],1):(e=U0.exec(r))?new Gn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=X0.exec(r))?Ho(e[1],e[2],e[3],e[4]):(e=G0.exec(r))?Ho(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=V0.exec(r))?Su(e[1],e[2]/100,e[3]/100,1):(e=K0.exec(r))?Su(e[1],e[2]/100,e[3]/100,e[4]):yu.hasOwnProperty(r)?bu(yu[r]):r==="transparent"?new Gn(NaN,NaN,NaN,0):null}function bu(r){return new Gn(r>>16&255,r>>8&255,r&255,1)}function Ho(r,e,i,s){if(s<=0)r=e=i=NaN;return new Gn(r,e,i,s)}function Zg(r){if(!(r instanceof as))r=no(r);if(!r)return new Gn;return r=r.rgb(),new Gn(r.r,r.g,r.b,r.opacity)}function Ur(r,e,i,s){return arguments.length===1?Zg(r):new Gn(r,e,i,s==null?1:s)}function Gn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}rs(Gn,Ur,xc(as,{brighter(r){return r=r==null?jo:Math.pow(jo,r),new Gn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Oi:Math.pow(Oi,r),new Gn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Gn(Br(this.r),Br(this.g),Br(this.b),Uo(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:ku,formatHex:ku,formatHex8:J0,formatRgb:wu,toString:wu}));function ku(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}`}function J0(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}${Tr((isNaN(this.opacity)?1:this.opacity)*255)}`}function wu(){let r=Uo(this.opacity);return`${r===1?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${r===1?")":`, ${r})`}`}function Uo(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Br(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Tr(r){return r=Br(r),(r<16?"0":"")+r.toString(16)}function Su(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Oe(r,e,i,s)}function Bu(r){if(r instanceof Oe)return new Oe(r.h,r.s,r.l,r.opacity);if(!(r instanceof as))r=no(r);if(!r)return new Oe;if(r instanceof Oe)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),h=NaN,n=a-o,u=(a+o)/2;if(n){if(e===a)h=(i-s)/n+(i<s)*6;else if(i===a)h=(s-e)/n+2;else h=(e-i)/n+4;n/=u<0.5?a+o:2-a-o,h*=60}else n=u>0&&u<1?0:h;return new Oe(h,n,u,r.opacity)}function _u(r,e,i,s){return arguments.length===1?Bu(r):new Oe(r,e,i,s==null?1:s)}function Oe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}rs(Oe,_u,xc(as,{brighter(r){return r=r==null?jo:Math.pow(jo,r),new Oe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Oi:Math.pow(Oi,r),new Oe(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new Gn(cn(r>=240?r-240:r+120,o,s),cn(r,o,s),cn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Oe(Tu(this.h),Yo(this.s),Yo(this.l),Uo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let r=Uo(this.opacity);return`${r===1?"hsl(":"hsla("}${Tu(this.h)}, ${Yo(this.s)*100}%, ${Yo(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Tu(r){return r=(r||0)%360,r<0?r+360:r}function Yo(r){return Math.max(0,Math.min(1,r||0))}function cn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function un(r,e,i,s,o){var a=r*r,h=a*r;return((1-3*r+3*a-h)*e+(4-6*a+3*h)*i+(1+3*r+3*a-3*h)*s+h*o)/6}function dn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],h=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return un((i-s/e)*e,h,o,a,n)}}function fn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],h=r[(s+1)%e],n=r[(s+2)%e];return un((i-s/e)*e,o,a,h,n)}}var wc=(r)=>()=>r;function vu(r,e){return function(i){return r+i*e}}function tC(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function Ch(r,e){var i=e-r;return i?vu(r,i>180||i<-180?i-360*Math.round(i/360):i):wc(isNaN(r)?e:r)}function Lu(r){return(r=+r)===1?fi:function(e,i){return i-e?tC(e,i,r):wc(isNaN(e)?i:e)}}function fi(r,e){var i=e-r;return i?vu(r,i):wc(isNaN(r)?e:r)}var pl=function r(e){var i=Lu(e);function s(o,a){var h=i((o=Ur(o)).r,(a=Ur(a)).r),n=i(o.g,a.g),u=i(o.b,a.b),d=fi(o.opacity,a.opacity);return function(c){return o.r=h(c),o.g=n(c),o.b=u(c),o.opacity=d(c),o+""}}return s.gamma=r,s}(1);function Fu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),h,n;for(h=0;h<i;++h)n=Ur(e[h]),s[h]=n.r||0,o[h]=n.g||0,a[h]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(u){return n.r=s(u),n.g=o(u),n.b=a(u),n+""}}}var eC=Fu(dn),rC=Fu(fn);function Mn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var gn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pn=new RegExp(gn.source,"g");function iC(r){return function(){return r}}function oC(r){return function(e){return r(e)+""}}function Cc(r,e){var i=gn.lastIndex=pn.lastIndex=0,s,o,a,h=-1,n=[],u=[];r=r+"",e=e+"";while((s=gn.exec(r))&&(o=pn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[h])n[h]+=a;else n[++h]=a;if((s=s[0])===(o=o[0]))if(n[h])n[h]+=o;else n[++h]=o;else n[++h]=null,u.push({i:h,x:Mn(s,o)});i=pn.lastIndex}if(i<e.length)if(a=e.slice(i),n[h])n[h]+=a;else n[++h]=a;return n.length<2?u[0]?oC(u[0].x):iC(e):(e=u.length,function(d){for(var c=0,f;c<e;++c)n[(f=u[c]).i]=f.x(d);return n.join("")})}var Mu=180/Math.PI,Xo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Go(r,e,i,s,o,a){var h,n,u;if(h=Math.sqrt(r*r+e*e))r/=h,e/=h;if(u=r*i+e*s)i-=r*u,s-=e*u;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,u/=n;if(r*s<e*i)r=-r,e=-e,u=-u,h=-h;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*Mu,skewX:Math.atan(u)*Mu,scaleX:h,scaleY:n}}var Vo;function Au(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?Xo:Go(e.a,e.b,e.c,e.d,e.e,e.f)}function Eu(r){if(r==null)return Xo;if(!Vo)Vo=document.createElementNS("http://www.w3.org/2000/svg","g");if(Vo.setAttribute("transform",r),!(r=Vo.transform.baseVal.consolidate()))return Xo;return r=r.matrix,Go(r.a,r.b,r.c,r.d,r.e,r.f)}function $u(r,e,i,s){function o(d){return d.length?d.pop()+" ":""}function a(d,c,f,p,x,k){if(d!==f||c!==p){var S=x.push("translate(",null,e,null,i);k.push({i:S-4,x:Mn(d,f)},{i:S-2,x:Mn(c,p)})}else if(f||p)x.push("translate("+f+e+p+i)}function h(d,c,f,p){if(d!==c){if(d-c>180)c+=360;else if(c-d>180)d+=360;p.push({i:f.push(o(f)+"rotate(",null,s)-2,x:Mn(d,c)})}else if(c)f.push(o(f)+"rotate("+c+s)}function n(d,c,f,p){if(d!==c)p.push({i:f.push(o(f)+"skewX(",null,s)-2,x:Mn(d,c)});else if(c)f.push(o(f)+"skewX("+c+s)}function u(d,c,f,p,x,k){if(d!==f||c!==p){var S=x.push(o(x)+"scale(",null,",",null,")");k.push({i:S-4,x:Mn(d,f)},{i:S-2,x:Mn(c,p)})}else if(f!==1||p!==1)x.push(o(x)+"scale("+f+","+p+")")}return function(d,c){var f=[],p=[];return d=r(d),c=r(c),a(d.translateX,d.translateY,c.translateX,c.translateY,f,p),h(d.rotate,c.rotate,f,p),n(d.skewX,c.skewX,f,p),u(d.scaleX,d.scaleY,c.scaleX,c.scaleY,f,p),d=c=null,function(x){var k=-1,S=p.length,T;while(++k<S)f[(T=p[k]).i]=T.x(x);return f.join("")}}}var mn=$u(Au,"px, ","px)","deg)"),yn=$u(Eu,", ",")",")");var Xr=0,Ri=0,Pi=0,Ou=1000,Ko,qi,Zo=0,_r=0,Jo=0,Wi=typeof performance==="object"&&performance.now?performance:Date,Du=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function zi(){return _r||(Du(sC),_r=Wi.now()+Jo)}function sC(){_r=0}function Ni(){this._call=this._time=this._next=null}Ni.prototype=es.prototype={constructor:Ni,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?zi():+i)+(e==null?0:+e),!this._next&&qi!==this){if(qi)qi._next=this;else Ko=this;qi=this}this._call=r,this._time=i,Cn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Cn()}};function es(r,e,i){var s=new Ni;return s.restart(r,e,i),s}function Pu(){zi(),++Xr;var r=Ko,e;while(r){if((e=_r-r._time)>=0)r._call.call(void 0,e);r=r._next}--Xr}function Iu(){_r=(Zo=Wi.now())+Jo,Xr=Ri=0;try{Pu()}finally{Xr=0,nC(),_r=0}}function aC(){var r=Wi.now(),e=r-Zo;if(e>Ou)Jo-=e,Zo=r}function nC(){var r,e=Ko,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:Ko=i;qi=r,Cn(s)}function Cn(r){if(Xr)return;if(Ri)Ri=clearTimeout(Ri);var e=r-_r;if(e>24){if(r<1/0)Ri=setTimeout(Iu,r-Wi.now()-Jo);if(Pi)Pi=clearInterval(Pi)}else{if(!Pi)Zo=Wi.now(),Pi=setInterval(aC,Ou);Xr=1,Du(Iu)}}function Hi(r,e,i){var s=new Ni;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var lC=pa("start","end","cancel","interrupt"),hC=[],Wu=0,Ru=1,hs=2,ls=3,qu=4,cs=5,Yi=6;function sr(r,e,i,s,o,a){var h=r.__transition;if(!h)r.__transition={};else if(i in h)return;cC(r,i,{name:e,index:s,group:o,on:lC,tween:hC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Wu})}function ji(r,e){var i=ge(r,e);if(i.state>Wu)throw Error("too late; already scheduled");return i}function ye(r,e){var i=ge(r,e);if(i.state>ls)throw Error("too late; already running");return i}function ge(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function cC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=es(a,0,i.time);function a(d){if(i.state=Ru,i.timer.restart(h,i.delay,i.time),i.delay<=d)h(d-i.delay)}function h(d){var c,f,p,x;if(i.state!==Ru)return u();for(c in s){if(x=s[c],x.name!==i.name)continue;if(x.state===ls)return Hi(h);if(x.state===qu)x.state=Yi,x.timer.stop(),x.on.call("interrupt",r,r.__data__,x.index,x.group),delete s[c];else if(+c<e)x.state=Yi,x.timer.stop(),x.on.call("cancel",r,r.__data__,x.index,x.group),delete s[c]}if(Hi(function(){if(i.state===ls)i.state=qu,i.timer.restart(n,i.delay,i.time),n(d)}),i.state=hs,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==hs)return;i.state=ls,o=Array(p=i.tween.length);for(c=0,f=-1;c<p;++c)if(x=i.tween[c].value.call(r,r.__data__,i.index,i.group))o[++f]=x;o.length=f+1}function n(d){var c=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(u),i.state=cs,1),f=-1,p=o.length;while(++f<p)o[f].call(r,c);if(i.state===cs)i.on.call("end",r,r.__data__,i.index,i.group),u()}function u(){i.state=Yi,i.timer.stop(),delete s[e];for(var d in s)return;delete r.__transition}}function Ui(r,e){var i=r.__transition,s,o,a=!0,h;if(!i)return;e=e==null?null:e+"";for(h in i){if((s=i[h]).name!==e){a=!1;continue}o=s.state>hs&&s.state<cs,s.state=Yi,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[h]}if(a)delete r.__transition}function kn(r){return this.each(function(){Ui(this,r)})}function uC(r,e){var i,s;return function(){var o=ye(this,r),a=o.tween;if(a!==i){s=i=a;for(var h=0,n=s.length;h<n;++h)if(s[h].name===e){s=s.slice(),s.splice(h,1);break}}o.tween=s}}function dC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=ye(this,r),h=a.tween;if(h!==s){o=(s=h).slice();for(var n={name:e,value:i},u=0,d=o.length;u<d;++u)if(o[u].name===e){o[u]=n;break}if(u===d)o.push(n)}a.tween=o}}function wn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=ge(this.node(),i).tween;for(var o=0,a=s.length,h;o<a;++o)if((h=s[o]).name===r)return h.value;return null}return this.each((e==null?uC:dC)(i,r,e))}function Gr(r,e,i){var s=r._id;return r.each(function(){var o=ye(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return ge(o,s).value[e]}}function Xi(r,e){var i;return(typeof e==="number"?Mn:e instanceof no?pl:(i=no(e))?(e=i,pl):Cc)(r,e)}function fC(r){return function(){this.removeAttribute(r)}}function pC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function gC(r,e,i){var s,o=i+"",a;return function(){var h=this.getAttribute(r);return h===o?null:h===s?a:a=e(s=h,i)}}function mC(r,e,i){var s,o=i+"",a;return function(){var h=this.getAttributeNS(r.space,r.local);return h===o?null:h===s?a:a=e(s=h,i)}}function yC(r,e,i){var s,o,a;return function(){var h,n=i(this),u;if(n==null)return void this.removeAttribute(r);return h=this.getAttribute(r),u=n+"",h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function xC(r,e,i){var s,o,a;return function(){var h,n=i(this),u;if(n==null)return void this.removeAttributeNS(r.space,r.local);return h=this.getAttributeNS(r.space,r.local),u=n+"",h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function Sn(r,e){var i=Ye(r),s=i==="transform"?yn:Xi;return this.attrTween(r,typeof e==="function"?(i.local?xC:yC)(i,s,Gr(this,"attr."+r,e)):e==null?(i.local?pC:fC)(i):(i.local?mC:gC)(i,s,e))}function CC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function bC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function kC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&bC(r,a);return i}return o._value=e,o}function wC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&CC(r,a);return i}return o._value=e,o}function Tn(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Ye(r);return this.tween(i,(s.local?kC:wC)(s,e))}function SC(r,e){return function(){ji(this,r).delay=+e.apply(this,arguments)}}function TC(r,e){return e=+e,function(){ji(this,r).delay=e}}function Bn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?SC:TC)(e,r)):ge(this.node(),e).delay}function BC(r,e){return function(){ye(this,r).duration=+e.apply(this,arguments)}}function _C(r,e){return e=+e,function(){ye(this,r).duration=e}}function _n(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?BC:_C)(e,r)):ge(this.node(),e).duration}function vC(r,e){if(typeof e!=="function")throw Error();return function(){ye(this,r).ease=e}}function vn(r){var e=this._id;return arguments.length?this.each(vC(e,r)):ge(this.node(),e).ease}function LC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();ye(this,r).ease=i}}function Ln(r){if(typeof r!=="function")throw Error();return this.each(LC(this._id,r))}function An(r){if(typeof r!=="function")r=Yr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=[],u,d=0;d<h;++d)if((u=a[d])&&r.call(u,u.__data__,d,a))n.push(u);return new Be(s,this._parents,this._name,this._id)}function En(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),h=Array(s),n=0;n<a;++n)for(var u=e[n],d=i[n],c=u.length,f=h[n]=Array(c),p,x=0;x<c;++x)if(p=u[x]||d[x])f[x]=p;for(;n<s;++n)h[n]=e[n];return new Be(h,this._parents,this._name,this._id)}function FC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function MC(r,e,i){var s,o,a=FC(e)?ji:ye;return function(){var h=a(this,r),n=h.on;if(n!==s)(o=(s=n).copy()).on(e,i);h.on=o}}function In(r,e){var i=this._id;return arguments.length<2?ge(this.node(),i).on.on(r):this.each(MC(i,r,e))}function AC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function On(){return this.on("end.remove",AC(this._id))}function Dn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=pr(r);for(var s=this._groups,o=s.length,a=Array(o),h=0;h<o;++h)for(var n=s[h],u=n.length,d=a[h]=Array(u),c,f,p=0;p<u;++p)if((c=n[p])&&(f=r.call(c,c.__data__,p,n))){if("__data__"in c)f.__data__=c.__data__;d[p]=f,sr(d[p],e,i,p,d,ge(c,i))}return new Be(a,this._parents,e,i)}function Pn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Hr(r);for(var s=this._groups,o=s.length,a=[],h=[],n=0;n<o;++n)for(var u=s[n],d=u.length,c,f=0;f<d;++f)if(c=u[f]){for(var p=r.call(c,c.__data__,f,u),x,k=ge(c,i),S=0,T=p.length;S<T;++S)if(x=p[S])sr(x,e,i,S,p,k);a.push(p),h.push(c)}return new Be(a,h,e,i)}var EC=ir.prototype.constructor;function Rn(){return new EC(this._groups,this._parents)}function $C(r,e){var i,s,o;return function(){var a=gr(this,r),h=(this.style.removeProperty(r),gr(this,r));return a===h?null:a===i&&h===s?o:o=e(i=a,s=h)}}function Nu(r){return function(){this.style.removeProperty(r)}}function IC(r,e,i){var s,o=i+"",a;return function(){var h=gr(this,r);return h===o?null:h===s?a:a=e(s=h,i)}}function OC(r,e,i){var s,o,a;return function(){var h=gr(this,r),n=i(this),u=n+"";if(n==null)u=n=(this.style.removeProperty(r),gr(this,r));return h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function DC(r,e){var i,s,o,a="style."+e,h="end."+a,n;return function(){var u=ye(this,r),d=u.on,c=u.value[a]==null?n||(n=Nu(e)):void 0;if(d!==i||o!==c)(s=(i=d).copy()).on(h,o=c);u.on=s}}function qn(r,e,i){var s=(r+="")==="transform"?mn:Xi;return e==null?this.styleTween(r,$C(r,s)).on("end.style."+r,Nu(r)):typeof e==="function"?this.styleTween(r,OC(r,s,Gr(this,"style."+r,e))).each(DC(this._id,r)):this.styleTween(r,IC(r,s,e),i).on("end.style."+r,null)}function PC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function RC(r,e,i){var s,o;function a(){var h=e.apply(this,arguments);if(h!==o)s=(o=h)&&PC(r,h,i);return s}return a._value=e,a}function Wn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,RC(r,e,i==null?"":i))}function qC(r){return function(){this.textContent=r}}function WC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Nn(r){return this.tween("text",typeof r==="function"?WC(Gr(this,"text",r)):qC(r==null?"":r+""))}function NC(r){return function(e){this.textContent=r.call(this,e)}}function zC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&NC(o);return e}return s._value=r,s}function zn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,zC(r))}function Yn(){var r=this._name,e=this._id,i=us();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var h=s[a],n=h.length,u,d=0;d<n;++d)if(u=h[d]){var c=ge(u,e);sr(u,r,i,d,h,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Be(s,this._parents,r,i)}function Un(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,h){var n={value:h},u={value:function(){if(--o===0)a()}};if(i.each(function(){var d=ye(this,s),c=d.on;if(c!==r)e=(r=c).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(u);d.on=e}),o===0)a()})}var HC=0;function Be(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function zu(r){return ir().transition(r)}function us(){return++HC}var lr=ir.prototype;Be.prototype=zu.prototype={constructor:Be,select:Dn,selectAll:Pn,selectChild:lr.selectChild,selectChildren:lr.selectChildren,filter:An,merge:En,selection:Rn,transition:Yn,call:lr.call,nodes:lr.nodes,node:lr.node,size:lr.size,empty:lr.empty,each:lr.each,on:In,attr:Sn,attrTween:Tn,style:qn,styleTween:Wn,text:Nn,textTween:zn,remove:On,tween:wn,delay:Bn,duration:_n,ease:vn,easeVarying:Ln,end:Un,[Symbol.iterator]:lr[Symbol.iterator]};function ds(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var YC={time:null,delay:0,duration:250,ease:ds};function jC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function Xn(r){var e,i;if(r instanceof Be)e=r._id,r=r._name;else e=us(),(i=YC).time=zi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var h=s[a],n=h.length,u,d=0;d<n;++d)if(u=h[d])sr(u,r,e,d,h,i||jC(u,e));return new Be(s,this._parents,r,e)}ir.prototype.interrupt=kn;ir.prototype.transition=Xn;var{abs:iF,max:oF,min:sF}=Math;function Hu(r){return[+r[0],+r[1]]}function UC(r){return[Hu(r[0]),Hu(r[1])]}var aF={name:"x",handles:["w","e"].map(Vn),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},nF={name:"y",handles:["n","s"].map(Vn),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},lF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vn),input:function(r){return r==null?null:UC(r)},output:function(r){return r}};function Vn(r){return{type:r}}var Kn=Math.PI,Zn=2*Kn;var XC=Zn-0.000001;function Yu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function GC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Yu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Vr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Yu:GC(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,h=this._y1,n=i-r,u=s-e,d=a-r,c=h-e,f=d*d+c*c;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(f>0.000001));else if(!(Math.abs(c*n-u*d)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let p=i-a,x=s-h,k=n*n+u*u,S=p*p+x*x,T=Math.sqrt(k),B=Math.sqrt(f),_=o*Math.tan((Kn-Math.acos((k+f-S)/(2*T*B)))/2),L=_/B,D=_/T;if(Math.abs(L-1)>0.000001)this._append`L${r+L*d},${e+L*c}`;this._append`A${o},${o},0,0,${+(c*p>d*x)},${this._x1=r+D*n},${this._y1=e+D*u}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let h=i*Math.cos(s),n=i*Math.sin(s),u=r+h,d=e+n,c=1^a,f=a?s-o:o-s;if(this._x1===null)this._append`M${u},${d}`;else if(Math.abs(this._x1-u)>0.000001||Math.abs(this._y1-d)>0.000001)this._append`L${u},${d}`;if(!i)return;if(f<0)f=f%Zn+Zn;if(f>XC)this._append`A${i},${i},0,1,${c},${r-h},${e-n}A${i},${i},0,1,${c},${this._x1=u},${this._y1=d}`;else if(f>0.000001)this._append`A${i},${i},0,${+(f>=Kn)},${c},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ju(){return new Vr}ju.prototype=Vr.prototype;function Qo(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var Qn=Symbol("implicit");function nr(){var r=new Fi,e=[],i=[],s=Qn;function o(a){let h=r.get(a);if(h===void 0){if(s!==Qn)return s;r.set(a,h=e.push(a)-1)}return i[h%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new Fi;for(let h of a){if(r.has(h))continue;r.set(h,e.push(h)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return nr(e,i).unknown(s)},Qo.apply(o,arguments),o}function St(r){return function(){return r}}var{abs:Jn,atan2:xe,cos:mr,max:Uu,min:fs,sin:De,sqrt:vr}=Math,me=0.000000000001,Kr=Math.PI,Gi=Kr/2,Ec=2*Kr;function Xu(r){return r>1?0:r<-1?Kr:Math.acos(r)}function tl(r){return r>=1?Gi:r<=-1?-Gi:Math.asin(r)}function ps(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Vr(e)}function VC(r){return r.innerRadius}function KC(r){return r.outerRadius}function ZC(r){return r.startAngle}function QC(r){return r.endAngle}function JC(r){return r&&r.padAngle}function tb(r,e,i,s,o,a,h,n){var u=i-r,d=s-e,c=h-o,f=n-a,p=f*u-c*d;if(p*p<me)return;return p=(c*(e-a)-f*(r-o))/p,[r+p*u,e+p*d]}function gs(r,e,i,s,o,a,h){var n=r-i,u=e-s,d=(h?a:-a)/vr(n*n+u*u),c=d*u,f=-d*n,p=r+c,x=e+f,k=i+c,S=s+f,T=(p+k)/2,B=(x+S)/2,_=k-p,L=S-x,D=_*_+L*L,P=o-a,K=p*S-k*x,Z=(L<0?-1:1)*vr(Uu(0,P*P*D-K*K)),J=(K*L-_*Z)/D,rt=(-K*_-L*Z)/D,ht=(K*L+_*Z)/D,nt=(-K*_+L*Z)/D,ot=J-T,N=rt-B,X=ht-T,tt=nt-B;if(ot*ot+N*N>X*X+tt*tt)J=ht,rt=nt;return{cx:J,cy:rt,x01:-c,y01:-f,x11:J*(o/P-1),y11:rt*(o/P-1)}}function ra(){var r=VC,e=KC,i=St(0),s=null,o=ZC,a=QC,h=JC,n=null,u=ps(d);function d(){var c,f,p=+r.apply(this,arguments),x=+e.apply(this,arguments),k=o.apply(this,arguments)-Gi,S=a.apply(this,arguments)-Gi,T=Jn(S-k),B=S>k;if(!n)n=c=u();if(x<p)f=x,x=p,p=f;if(!(x>me))n.moveTo(0,0);else if(T>Ec-me){if(n.moveTo(x*mr(k),x*De(k)),n.arc(0,0,x,k,S,!B),p>me)n.moveTo(p*mr(S),p*De(S)),n.arc(0,0,p,S,k,B)}else{var _=k,L=S,D=k,P=S,K=T,Z=T,J=h.apply(this,arguments)/2,rt=J>me&&(s?+s.apply(this,arguments):vr(p*p+x*x)),ht=fs(Jn(x-p)/2,+i.apply(this,arguments)),nt=ht,ot=ht,N,X;if(rt>me){var tt=tl(rt/p*De(J)),U=tl(rt/x*De(J));if((K-=tt*2)>me)tt*=B?1:-1,D+=tt,P-=tt;else K=0,D=P=(k+S)/2;if((Z-=U*2)>me)U*=B?1:-1,_+=U,L-=U;else Z=0,_=L=(k+S)/2}var at=x*mr(_),st=x*De(_),Bt=p*mr(P),vt=p*De(P);if(ht>me){var Ht=x*mr(L),Yt=x*De(L),Vt=p*mr(D),Kt=p*De(D),It;if(T<Kr)if(It=tb(at,st,Vt,Kt,Ht,Yt,Bt,vt)){var Mt=at-It[0],Pt=st-It[1],jt=Ht-It[0],qt=Yt-It[1],oe=1/De(Xu((Mt*jt+Pt*qt)/(vr(Mt*Mt+Pt*Pt)*vr(jt*jt+qt*qt)))/2),ie=vr(It[0]*It[0]+It[1]*It[1]);nt=fs(ht,(p-ie)/(oe-1)),ot=fs(ht,(x-ie)/(oe+1))}else nt=ot=0}if(!(Z>me))n.moveTo(at,st);else if(ot>me)if(N=gs(Vt,Kt,at,st,x,ot,B),X=gs(Ht,Yt,Bt,vt,x,ot,B),n.moveTo(N.cx+N.x01,N.cy+N.y01),ot<ht)n.arc(N.cx,N.cy,ot,xe(N.y01,N.x01),xe(X.y01,X.x01),!B);else n.arc(N.cx,N.cy,ot,xe(N.y01,N.x01),xe(N.y11,N.x11),!B),n.arc(0,0,x,xe(N.cy+N.y11,N.cx+N.x11),xe(X.cy+X.y11,X.cx+X.x11),!B),n.arc(X.cx,X.cy,ot,xe(X.y11,X.x11),xe(X.y01,X.x01),!B);else n.moveTo(at,st),n.arc(0,0,x,_,L,!B);if(!(p>me)||!(K>me))n.lineTo(Bt,vt);else if(nt>me)if(N=gs(Bt,vt,Ht,Yt,p,-nt,B),X=gs(at,st,Vt,Kt,p,-nt,B),n.lineTo(N.cx+N.x01,N.cy+N.y01),nt<ht)n.arc(N.cx,N.cy,nt,xe(N.y01,N.x01),xe(X.y01,X.x01),!B);else n.arc(N.cx,N.cy,nt,xe(N.y01,N.x01),xe(N.y11,N.x11),!B),n.arc(0,0,p,xe(N.cy+N.y11,N.cx+N.x11),xe(X.cy+X.y11,X.cx+X.x11),B),n.arc(X.cx,X.cy,nt,xe(X.y11,X.x11),xe(X.y01,X.x01),!B);else n.arc(0,0,p,P,D,B)}if(n.closePath(),c)return n=null,c+""||null}return d.centroid=function(){var c=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Kr/2;return[mr(f)*c,De(f)*c]},d.innerRadius=function(c){return arguments.length?(r=typeof c==="function"?c:St(+c),d):r},d.outerRadius=function(c){return arguments.length?(e=typeof c==="function"?c:St(+c),d):e},d.cornerRadius=function(c){return arguments.length?(i=typeof c==="function"?c:St(+c),d):i},d.padRadius=function(c){return arguments.length?(s=c==null?null:typeof c==="function"?c:St(+c),d):s},d.startAngle=function(c){return arguments.length?(o=typeof c==="function"?c:St(+c),d):o},d.endAngle=function(c){return arguments.length?(a=typeof c==="function"?c:St(+c),d):a},d.padAngle=function(c){return arguments.length?(h=typeof c==="function"?c:St(+c),d):h},d.context=function(c){return arguments.length?(n=c==null?null:c,d):n},d}var NF=Array.prototype.slice;function xd(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Gu(r){this._context=r}Gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function Ca(r){return new Gu(r)}function Vu(r){return r[0]}function Ku(r){return r[1]}function ml(r,e){var i=St(!0),s=null,o=Ca,a=null,h=ps(n);r=typeof r==="function"?r:r===void 0?Vu:St(r),e=typeof e==="function"?e:e===void 0?Ku:St(e);function n(u){var d,c=(u=xd(u)).length,f,p=!1,x;if(s==null)a=o(x=h());for(d=0;d<=c;++d){if(!(d<c&&i(f=u[d],d,u))===p)if(p=!p)a.lineStart();else a.lineEnd();if(p)a.point(+r(f,d,u),+e(f,d,u))}if(x)return a=null,x+""||null}return n.x=function(u){return arguments.length?(r=typeof u==="function"?u:St(+u),n):r},n.y=function(u){return arguments.length?(e=typeof u==="function"?u:St(+u),n):e},n.defined=function(u){return arguments.length?(i=typeof u==="function"?u:St(!!u),n):i},n.curve=function(u){return arguments.length?(o=u,s!=null&&(a=o(s)),n):o},n.context=function(u){return arguments.length?(u==null?s=a=null:a=o(s=u),n):s},n}class el{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function Vi(r){return new el(r,!0)}function Ki(r){return new el(r,!1)}function Fe(){}function Zr(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function Zi(r){this._context=r}Zi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Zr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Zr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Lr(r){return new Zi(r)}function Zu(r){this._context=r}Zu.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:Zr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function ms(r){return new Zu(r)}function Qu(r){this._context=r}Qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:Zr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function ys(r){return new Qu(r)}function Ju(r,e){this._basis=new Zi(r),this._beta=e}Ju.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,h=e[i]-o,n=-1,u;while(++n<=i)u=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+u*a),this._beta*e[n]+(1-this._beta)*(o+u*h))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var rl=function r(e){function i(s){return e===1?new Zi(s):new Ju(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function Qr(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function xs(r,e){this._context=r,this._k=(1-e)/6}xs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Qr(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:Qr(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Qi=function r(e){function i(s){return new xs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Cs(r,e){this._context=r,this._k=(1-e)/6}Cs.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:Qr(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var il=function r(e){function i(s){return new Cs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function bs(r,e){this._context=r,this._k=(1-e)/6}bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qr(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ol=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Ji(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:h}=r;if(r._l01_a>me){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,u=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/u,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/u}if(r._l23_a>me){var d=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,c=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*d+r._x1*r._l23_2a-e*r._l12_2a)/c,h=(h*d+r._y1*r._l23_2a-i*r._l12_2a)/c}r._context.bezierCurveTo(s,o,a,h,r._x2,r._y2)}function td(r,e){this._context=r,this._alpha=e}td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ji(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var to=function r(e){function i(s){return e?new td(s,e):new xs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ed(r,e){this._context=r,this._alpha=e}ed.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:Ji(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var sl=function r(e){function i(s){return e?new ed(s,e):new Cs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function rd(r,e){this._context=r,this._alpha=e}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ji(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var al=function r(e){function i(s){return e?new rd(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function id(r){this._context=r}id.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function ks(r){return new id(r)}function od(r){return r<0?-1:1}function sd(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),h=(i-r._y1)/(o||s<0&&-0),n=(a*o+h*s)/(s+o);return(od(a)+od(h))*Math.min(Math.abs(a),Math.abs(h),0.5*Math.abs(n))||0}function ad(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function nl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:h}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,h-n*i,a,h)}function ws(r){this._context=r}ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nl(this,this._t0,ad(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,nl(this,ad(this,i=sd(this,r,e)),i);break;default:nl(this,this._t0,i=sd(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function nd(r){this._context=new ld(r)}(nd.prototype=Object.create(ws.prototype)).point=function(r,e){ws.prototype.point.call(this,e,r)};function ld(r){this._context=r}ld.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function eo(r){return new ws(r)}function io(r){return new nd(r)}function cd(r){this._context=r}cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=hd(r),o=hd(e);for(var a=0,h=1;h<i;++a,++h)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[h],e[h])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function hd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),h=Array(i);o[0]=0,a[0]=2,h[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,h[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,h[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,h[e]-=s*h[e-1];o[i-1]=h[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(h[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function Jr(r){return new cd(r)}function Ss(r,e){this._context=r,this._t=e}Ss.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function ti(r){return new Ss(r,0.5)}function oo(r){return new Ss(r,0)}function so(r){return new Ss(r,1)}function xr(r,e,i){this.k=r,this.x=e,this.y=i}xr.prototype={constructor:xr,scale:function(r){return r===1?this:new xr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new xr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ll=new xr(1,0,0);cl.prototype=xr.prototype;function cl(r){while(!r.__zoom)if(!(r=r.parentNode))return ll;return r.__zoom}var Ae=t((r)=>{let{securityLevel:e}=m(),i=b("body");if(e==="sandbox"){let a=b(`#i${r}`).node()?.contentDocument??document;i=b(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ud(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ud,"getDefaultExportFromCjs");var be={},Ts={},Cr={},ud;function ei(){if(ud)return Cr;ud=1;function r(h){return typeof h>"u"||h===null}t(r,"isNothing");function e(h){return typeof h==="object"&&h!==null}t(e,"isObject");function i(h){if(Array.isArray(h))return h;else if(r(h))return[];return[h]}t(i,"toArray");function s(h,n){if(n){let u=Object.keys(n);for(let d=0,c=u.length;d<c;d+=1){let f=u[d];h[f]=n[f]}}return h}t(s,"extend");function o(h,n){let u="";for(let d=0;d<n;d+=1)u+=h;return u}t(o,"repeat");function a(h){return h===0&&Number.NEGATIVE_INFINITY===1/h}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(ei,"requireCommon");var ul,dd;function ri(){if(dd)return ul;dd=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
125
+ `},"getStyles"),Ix=t((r,e)=>{if(e!==void 0)Eo[r]=e},"addStylesForDiagram"),_h=$x,dm={};Qo(dm,{clear:()=>F,getAccDescription:()=>H,getAccTitle:()=>j,getDiagramTitle:()=>q,setAccDescription:()=>U,setAccTitle:()=>z,setDiagramTitle:()=>W});var ha="",ca="",ua="",da=t((r)=>te(r,C()),"sanitizeText"),F=t(()=>{ha="",ua="",ca=""},"clear"),z=t((r)=>{ha=da(r).replace(/^\s+/g,"")},"setAccTitle"),j=t(()=>ha,"getAccTitle"),U=t((r)=>{ua=da(r).replace(/\n\s+/g,`
126
+ `)},"setAccDescription"),H=t(()=>ua,"getAccDescription"),W=t((r)=>{ca=da(r)},"setDiagramTitle"),q=t(()=>ca,"getDiagramTitle"),Jc=l,Ox=yd,m=C,Ba=eA,rs=hi,Do=t((r)=>te(r,m()),"sanitizeText"),kc=oa,Dx=t(()=>dm,"getCommonDb"),Oo={},kd=t((r,e,i)=>{if(Oo[r])Jc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(Oo[r]=e,i)tu(r,i);Ix(r,e.styles),e.injectUtils?.(Jc,Ox,m,Do,kc,Dx(),()=>{})},"registerDiagram"),pm=t((r)=>{if(r in Oo)return Oo[r];throw new Px(r)},"getDiagram"),Px=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class Fi extends Map{constructor(r,e=Wx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(lu(this,r))}has(r){return super.has(lu(this,r))}set(r,e){return super.set(Rx(this,r),e)}delete(r){return super.delete(qx(this,r))}}function lu({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Rx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function qx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Wx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Nx={value:()=>{}};function cu(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new qo(i)}function qo(r){this._=r}function zx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}qo.prototype=cu.prototype={constructor:qo,on:function(r,e){var i=this._,s=zx(r+"",i),o,a=-1,h=s.length;if(arguments.length<2){while(++a<h)if((o=(r=s[a]).type)&&(o=Hx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<h)if(o=(r=s[a]).type)i[o]=hu(i[o],r.name,e);else if(e==null)for(o in i)i[o]=hu(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new qo(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function Hx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function hu(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Nx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var fa=cu;var Wo="http://www.w3.org/1999/xhtml",pa={svg:"http://www.w3.org/2000/svg",xhtml:Wo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function He(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return pa.hasOwnProperty(e)?{space:pa[e],local:r}:r}function Yx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Wo&&e.documentElement.namespaceURI===Wo?e.createElement(r):e.createElementNS(i,r)}}function jx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Mi(r){var e=He(r);return(e.local?jx:Yx)(e)}function Ux(){}function fr(r){return r==null?Ux:function(){return this.querySelector(r)}}function ga(r){if(typeof r!=="function")r=fr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=Array(h),u,d,c=0;c<h;++c)if((u=a[c])&&(d=r.call(u,u.__data__,c,a))){if("__data__"in u)d.__data__=u.__data__;n[c]=d}return new le(s,this._parents)}function ma(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Xx(){return[]}function zr(r){return r==null?Xx:function(){return this.querySelectorAll(r)}}function Gx(r){return function(){return ma(r.apply(this,arguments))}}function ya(r){if(typeof r==="function")r=Gx(r);else r=zr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var h=e[a],n=h.length,u,d=0;d<n;++d)if(u=h[d])s.push(r.call(u,u.__data__,d,h)),o.push(u);return new le(s,o)}function Hr(r){return function(){return this.matches(r)}}function No(r){return function(e){return e.matches(r)}}var Vx=Array.prototype.find;function Kx(r){return function(){return Vx.call(this.children,r)}}function Zx(){return this.firstElementChild}function xa(r){return this.select(r==null?Zx:Kx(typeof r==="function"?r:No(r)))}var Qx=Array.prototype.filter;function Jx(){return Array.from(this.children)}function t0(r){return function(){return Qx.call(this.children,r)}}function Ca(r){return this.selectAll(r==null?Jx:t0(typeof r==="function"?r:No(r)))}function ba(r){if(typeof r!=="function")r=Hr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=[],u,d=0;d<h;++d)if((u=a[d])&&r.call(u,u.__data__,d,a))n.push(u);return new le(s,this._parents)}function Ai(r){return Array(r.length)}function ka(){return new le(this._enter||this._groups.map(Ai),this._parents)}function Ei(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Ei.prototype={constructor:Ei,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function wa(r){return function(){return r}}function e0(r,e,i,s,o,a){var h=0,n,u=e.length,d=a.length;for(;h<d;++h)if(n=e[h])n.__data__=a[h],s[h]=n;else i[h]=new Ei(r,a[h]);for(;h<u;++h)if(n=e[h])o[h]=n}function r0(r,e,i,s,o,a,h){var n,u,d=new Map,c=e.length,f=a.length,p=Array(c),x;for(n=0;n<c;++n)if(u=e[n])if(p[n]=x=h.call(u,u.__data__,n,e)+"",d.has(x))o[n]=u;else d.set(x,u);for(n=0;n<f;++n)if(x=h.call(r,a[n],n,a)+"",u=d.get(x))s[n]=u,u.__data__=a[n],d.delete(x);else i[n]=new Ei(r,a[n]);for(n=0;n<c;++n)if((u=e[n])&&d.get(p[n])===u)o[n]=u}function i0(r){return r.__data__}function va(r,e){if(!arguments.length)return Array.from(this,i0);var i=e?r0:e0,s=this._parents,o=this._groups;if(typeof r!=="function")r=wa(r);for(var a=o.length,h=Array(a),n=Array(a),u=Array(a),d=0;d<a;++d){var c=s[d],f=o[d],p=f.length,x=o0(r.call(c,c&&c.__data__,d,s)),S=x.length,T=n[d]=Array(S),B=h[d]=Array(S),_=u[d]=Array(p);i(c,f,T,B,_,x,e);for(var v=0,E=0,O,D;v<S;++v)if(O=T[v]){if(v>=E)E=v+1;while(!(D=B[E])&&++E<S);O._next=D||null}}return h=new le(h,s),h._enter=n,h._exit=u,h}function o0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function La(){return new le(this._exit||this._groups.map(Ai),this._parents)}function Fa(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function Ma(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,h=Math.min(o,a),n=Array(o),u=0;u<h;++u)for(var d=i[u],c=s[u],f=d.length,p=n[u]=Array(f),x,S=0;S<f;++S)if(x=d[S]||c[S])p[S]=x;for(;u<o;++u)n[u]=i[u];return new le(n,this._parents)}function Aa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],h;--o>=0;)if(h=s[o]){if(a&&h.compareDocumentPosition(a)^4)a.parentNode.insertBefore(h,a);a=h}return this}function $a(r){if(!r)r=s0;function e(f,p){return f&&p?r(f.__data__,p.__data__):!f-!p}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var h=i[a],n=h.length,u=o[a]=Array(n),d,c=0;c<n;++c)if(d=h[c])u[c]=d;u.sort(e)}return new le(o,this._parents).order()}function s0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function Oa(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Da(){return Array.from(this)}function Pa(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var h=s[o];if(h)return h}return null}function Ra(){let r=0;for(let e of this)++r;return r}function qa(){return!this.node()}function Wa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,h=o.length,n;a<h;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function a0(r){return function(){this.removeAttribute(r)}}function n0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function l0(r,e){return function(){this.setAttribute(r,e)}}function h0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function c0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function u0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Na(r,e){var i=He(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?n0:a0:typeof e==="function"?i.local?u0:c0:i.local?h0:l0)(i,e))}function $i(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function d0(r){return function(){this.style.removeProperty(r)}}function f0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function p0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function za(r,e,i){return arguments.length>1?this.each((e==null?d0:typeof e==="function"?p0:f0)(r,e,i==null?"":i)):pr(this.node(),r)}function pr(r,e){return r.style.getPropertyValue(e)||$i(r).getComputedStyle(r,null).getPropertyValue(e)}function g0(r){return function(){delete this[r]}}function m0(r,e){return function(){this[r]=e}}function y0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ha(r,e){return arguments.length>1?this.each((e==null?g0:typeof e==="function"?y0:m0)(r,e)):this.node()[r]}function uu(r){return r.trim().split(/^|\s+/)}function Ya(r){return r.classList||new du(r)}function du(r){this._node=r,this._names=uu(r.getAttribute("class")||"")}du.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function fu(r,e){var i=Ya(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function pu(r,e){var i=Ya(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function x0(r){return function(){fu(this,r)}}function C0(r){return function(){pu(this,r)}}function b0(r,e){return function(){(e.apply(this,arguments)?fu:pu)(this,r)}}function ja(r,e){var i=uu(r+"");if(arguments.length<2){var s=Ya(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?b0:e?x0:C0)(i,e))}function k0(){this.textContent=""}function w0(r){return function(){this.textContent=r}}function S0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ua(r){return arguments.length?this.each(r==null?k0:(typeof r==="function"?S0:w0)(r)):this.node().textContent}function T0(){this.innerHTML=""}function B0(r){return function(){this.innerHTML=r}}function _0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function Xa(r){return arguments.length?this.each(r==null?T0:(typeof r==="function"?_0:B0)(r)):this.node().innerHTML}function v0(){if(this.nextSibling)this.parentNode.appendChild(this)}function Ga(){return this.each(v0)}function L0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Va(){return this.each(L0)}function Ka(r){var e=typeof r==="function"?r:Mi(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function F0(){return null}function Za(r,e){var i=typeof r==="function"?r:Mi(r),s=e==null?F0:typeof e==="function"?e:fr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function M0(){var r=this.parentNode;if(r)r.removeChild(this)}function Qa(){return this.each(M0)}function A0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function E0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Ja(r){return this.select(r?E0:A0)}function on(r){return arguments.length?this.property("__data__",r):this.node().__data__}function $0(r){return function(e){r.call(this,e,this.__data__)}}function I0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function O0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function D0(r,e,i){return function(){var s=this.__on,o,a=$0(e);if(s){for(var h=0,n=s.length;h<n;++h)if((o=s[h]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function sn(r,e,i){var s=I0(r+""),o,a=s.length,h;if(arguments.length<2){var n=this.node().__on;if(n){for(var u=0,d=n.length,c;u<d;++u)for(o=0,c=n[u];o<a;++o)if((h=s[o]).type===c.type&&h.name===c.name)return c.value}return}n=e?D0:O0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function gu(r,e,i){var s=$i(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function P0(r,e){return function(){return gu(this,r,e)}}function R0(r,e){return function(){return gu(this,r,e.apply(this,arguments))}}function an(r,e){return this.each((typeof e==="function"?R0:P0)(r,e))}function*ln(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,h;o<a;++o)if(h=s[o])yield h}var hn=[null];function le(r,e){this._groups=r,this._parents=e}function mu(){return new le([[document.documentElement]],hn)}function q0(){return this}le.prototype=mu.prototype={constructor:le,select:ga,selectAll:ya,selectChild:xa,selectChildren:Ca,filter:ba,data:va,enter:ka,exit:La,join:Fa,merge:Ma,selection:q0,order:Aa,sort:$a,call:Oa,nodes:Da,node:Pa,size:Ra,empty:qa,each:Wa,attr:Na,style:za,property:Ha,classed:ja,text:Ua,html:Xa,raise:Ga,lower:Va,append:Ka,insert:Za,remove:Qa,clone:Ja,datum:on,on:sn,dispatch:an,[Symbol.iterator]:ln};var er=mu;function b(r){return typeof r==="string"?new le([[document.querySelector(r)]],[document.documentElement]):new le([[r]],hn)}function as(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function xc(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function os(){}var Ii=0.7,Yo=1/Ii,Yr="\\s*([+-]?\\d+)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W0=/^#([0-9a-f]{3,8})$/,N0=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),z0=new RegExp(`^rgb\\(${Ye},${Ye},${Ye}\\)$`),H0=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Oi}\\)$`),Y0=new RegExp(`^rgba\\(${Ye},${Ye},${Ye},${Oi}\\)$`),j0=new RegExp(`^hsl\\(${Oi},${Ye},${Ye}\\)$`),U0=new RegExp(`^hsla\\(${Oi},${Ye},${Ye},${Oi}\\)$`),yu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};as(os,ao,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:xu,formatHex:xu,formatHex8:X0,formatHsl:G0,formatRgb:Cu,toString:Cu});function xu(){return this.rgb().formatHex()}function X0(){return this.rgb().formatHex8()}function G0(){return Bu(this).formatHsl()}function Cu(){return this.rgb().formatRgb()}function ao(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=W0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?bu(e):i===3?new jn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?zo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?zo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=N0.exec(r))?new jn(e[1],e[2],e[3],1):(e=z0.exec(r))?new jn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=H0.exec(r))?zo(e[1],e[2],e[3],e[4]):(e=Y0.exec(r))?zo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=j0.exec(r))?Su(e[1],e[2]/100,e[3]/100,1):(e=U0.exec(r))?Su(e[1],e[2]/100,e[3]/100,e[4]):yu.hasOwnProperty(r)?bu(yu[r]):r==="transparent"?new jn(NaN,NaN,NaN,0):null}function bu(r){return new jn(r>>16&255,r>>8&255,r&255,1)}function zo(r,e,i,s){if(s<=0)r=e=i=NaN;return new jn(r,e,i,s)}function nA(r){if(!(r instanceof os))r=ao(r);if(!r)return new jn;return r=r.rgb(),new jn(r.r,r.g,r.b,r.opacity)}function jr(r,e,i,s){return arguments.length===1?nA(r):new jn(r,e,i,s==null?1:s)}function jn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}as(jn,jr,xc(os,{brighter(r){return r=r==null?Yo:Math.pow(Yo,r),new jn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Ii:Math.pow(Ii,r),new jn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new jn(Tr(this.r),Tr(this.g),Tr(this.b),jo(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:ku,formatHex:ku,formatHex8:V0,formatRgb:wu,toString:wu}));function ku(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function V0(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function wu(){let r=jo(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function jo(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Tr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Sr(r){return r=Tr(r),(r<16?"0":"")+r.toString(16)}function Su(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new $e(r,e,i,s)}function Bu(r){if(r instanceof $e)return new $e(r.h,r.s,r.l,r.opacity);if(!(r instanceof os))r=ao(r);if(!r)return new $e;if(r instanceof $e)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),h=NaN,n=a-o,u=(a+o)/2;if(n){if(e===a)h=(i-s)/n+(i<s)*6;else if(i===a)h=(s-e)/n+2;else h=(e-i)/n+4;n/=u<0.5?a+o:2-a-o,h*=60}else n=u>0&&u<1?0:h;return new $e(h,n,u,r.opacity)}function _u(r,e,i,s){return arguments.length===1?Bu(r):new $e(r,e,i,s==null?1:s)}function $e(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}as($e,_u,xc(os,{brighter(r){return r=r==null?Yo:Math.pow(Yo,r),new $e(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Ii:Math.pow(Ii,r),new $e(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new jn(cn(r>=240?r-240:r+120,o,s),cn(r,o,s),cn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new $e(Tu(this.h),Ho(this.s),Ho(this.l),jo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let r=jo(this.opacity);return`${r===1?"hsl(":"hsla("}${Tu(this.h)}, ${Ho(this.s)*100}%, ${Ho(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Tu(r){return r=(r||0)%360,r<0?r+360:r}function Ho(r){return Math.max(0,Math.min(1,r||0))}function cn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function un(r,e,i,s,o){var a=r*r,h=a*r;return((1-3*r+3*a-h)*e+(4-6*a+3*h)*i+(1+3*r+3*a-3*h)*s+h*o)/6}function dn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],h=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return un((i-s/e)*e,h,o,a,n)}}function fn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],h=r[(s+1)%e],n=r[(s+2)%e];return un((i-s/e)*e,o,a,h,n)}}var wc=(r)=>()=>r;function vu(r,e){return function(i){return r+i*e}}function K0(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function Sh(r,e){var i=e-r;return i?vu(r,i>180||i<-180?i-360*Math.round(i/360):i):wc(isNaN(r)?e:r)}function Lu(r){return(r=+r)===1?bi:function(e,i){return i-e?K0(e,i,r):wc(isNaN(e)?i:e)}}function bi(r,e){var i=e-r;return i?vu(r,i):wc(isNaN(r)?e:r)}var dl=function r(e){var i=Lu(e);function s(o,a){var h=i((o=jr(o)).r,(a=jr(a)).r),n=i(o.g,a.g),u=i(o.b,a.b),d=bi(o.opacity,a.opacity);return function(c){return o.r=h(c),o.g=n(c),o.b=u(c),o.opacity=d(c),o+""}}return s.gamma=r,s}(1);function Fu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),h,n;for(h=0;h<i;++h)n=jr(e[h]),s[h]=n.r||0,o[h]=n.g||0,a[h]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(u){return n.r=s(u),n.g=o(u),n.b=a(u),n+""}}}var Z0=Fu(dn),Q0=Fu(fn);function Mn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var gn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pn=new RegExp(gn.source,"g");function J0(r){return function(){return r}}function tC(r){return function(e){return r(e)+""}}function Cc(r,e){var i=gn.lastIndex=pn.lastIndex=0,s,o,a,h=-1,n=[],u=[];r=r+"",e=e+"";while((s=gn.exec(r))&&(o=pn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[h])n[h]+=a;else n[++h]=a;if((s=s[0])===(o=o[0]))if(n[h])n[h]+=o;else n[++h]=o;else n[++h]=null,u.push({i:h,x:Mn(s,o)});i=pn.lastIndex}if(i<e.length)if(a=e.slice(i),n[h])n[h]+=a;else n[++h]=a;return n.length<2?u[0]?tC(u[0].x):J0(e):(e=u.length,function(d){for(var c=0,f;c<e;++c)n[(f=u[c]).i]=f.x(d);return n.join("")})}var Mu=180/Math.PI,Uo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xo(r,e,i,s,o,a){var h,n,u;if(h=Math.sqrt(r*r+e*e))r/=h,e/=h;if(u=r*i+e*s)i-=r*u,s-=e*u;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,u/=n;if(r*s<e*i)r=-r,e=-e,u=-u,h=-h;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*Mu,skewX:Math.atan(u)*Mu,scaleX:h,scaleY:n}}var Go;function Au(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?Uo:Xo(e.a,e.b,e.c,e.d,e.e,e.f)}function Eu(r){if(r==null)return Uo;if(!Go)Go=document.createElementNS("http://www.w3.org/2000/svg","g");if(Go.setAttribute("transform",r),!(r=Go.transform.baseVal.consolidate()))return Uo;return r=r.matrix,Xo(r.a,r.b,r.c,r.d,r.e,r.f)}function $u(r,e,i,s){function o(d){return d.length?d.pop()+" ":""}function a(d,c,f,p,x,S){if(d!==f||c!==p){var T=x.push("translate(",null,e,null,i);S.push({i:T-4,x:Mn(d,f)},{i:T-2,x:Mn(c,p)})}else if(f||p)x.push("translate("+f+e+p+i)}function h(d,c,f,p){if(d!==c){if(d-c>180)c+=360;else if(c-d>180)d+=360;p.push({i:f.push(o(f)+"rotate(",null,s)-2,x:Mn(d,c)})}else if(c)f.push(o(f)+"rotate("+c+s)}function n(d,c,f,p){if(d!==c)p.push({i:f.push(o(f)+"skewX(",null,s)-2,x:Mn(d,c)});else if(c)f.push(o(f)+"skewX("+c+s)}function u(d,c,f,p,x,S){if(d!==f||c!==p){var T=x.push(o(x)+"scale(",null,",",null,")");S.push({i:T-4,x:Mn(d,f)},{i:T-2,x:Mn(c,p)})}else if(f!==1||p!==1)x.push(o(x)+"scale("+f+","+p+")")}return function(d,c){var f=[],p=[];return d=r(d),c=r(c),a(d.translateX,d.translateY,c.translateX,c.translateY,f,p),h(d.rotate,c.rotate,f,p),n(d.skewX,c.skewX,f,p),u(d.scaleX,d.scaleY,c.scaleX,c.scaleY,f,p),d=c=null,function(x){var S=-1,T=p.length,B;while(++S<T)f[(B=p[S]).i]=B.x(x);return f.join("")}}}var mn=$u(Au,"px, ","px)","deg)"),yn=$u(Eu,", ",")",")");var Ur=0,Pi=0,Di=0,Ou=1000,Vo,Ri,Ko=0,Br=0,Zo=0,qi=typeof performance==="object"&&performance.now?performance:Date,Du=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Ni(){return Br||(Du(eC),Br=qi.now()+Zo)}function eC(){Br=0}function Wi(){this._call=this._time=this._next=null}Wi.prototype=Jo.prototype={constructor:Wi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Ni():+i)+(e==null?0:+e),!this._next&&Ri!==this){if(Ri)Ri._next=this;else Vo=this;Ri=this}this._call=r,this._time=i,Cn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Cn()}};function Jo(r,e,i){var s=new Wi;return s.restart(r,e,i),s}function Pu(){Ni(),++Ur;var r=Vo,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Ur}function Iu(){Br=(Ko=qi.now())+Zo,Ur=Pi=0;try{Pu()}finally{Ur=0,iC(),Br=0}}function rC(){var r=qi.now(),e=r-Ko;if(e>Ou)Zo-=e,Ko=r}function iC(){var r,e=Vo,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:Vo=i;Ri=r,Cn(s)}function Cn(r){if(Ur)return;if(Pi)Pi=clearTimeout(Pi);var e=r-Br;if(e>24){if(r<1/0)Pi=setTimeout(Iu,r-qi.now()-Zo);if(Di)Di=clearInterval(Di)}else{if(!Di)Ko=qi.now(),Di=setInterval(rC,Ou);Ur=1,Du(Iu)}}function zi(r,e,i){var s=new Wi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var oC=fa("start","end","cancel","interrupt"),sC=[],Wu=0,Ru=1,es=2,ts=3,qu=4,hs=5,Hi=6;function sr(r,e,i,s,o,a){var h=r.__transition;if(!h)r.__transition={};else if(i in h)return;aC(r,i,{name:e,index:s,group:o,on:oC,tween:sC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Wu})}function Yi(r,e){var i=pe(r,e);if(i.state>Wu)throw Error("too late; already scheduled");return i}function me(r,e){var i=pe(r,e);if(i.state>ts)throw Error("too late; already running");return i}function pe(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function aC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=Jo(a,0,i.time);function a(d){if(i.state=Ru,i.timer.restart(h,i.delay,i.time),i.delay<=d)h(d-i.delay)}function h(d){var c,f,p,x;if(i.state!==Ru)return u();for(c in s){if(x=s[c],x.name!==i.name)continue;if(x.state===ts)return zi(h);if(x.state===qu)x.state=Hi,x.timer.stop(),x.on.call("interrupt",r,r.__data__,x.index,x.group),delete s[c];else if(+c<e)x.state=Hi,x.timer.stop(),x.on.call("cancel",r,r.__data__,x.index,x.group),delete s[c]}if(zi(function(){if(i.state===ts)i.state=qu,i.timer.restart(n,i.delay,i.time),n(d)}),i.state=es,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==es)return;i.state=ts,o=Array(p=i.tween.length);for(c=0,f=-1;c<p;++c)if(x=i.tween[c].value.call(r,r.__data__,i.index,i.group))o[++f]=x;o.length=f+1}function n(d){var c=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(u),i.state=hs,1),f=-1,p=o.length;while(++f<p)o[f].call(r,c);if(i.state===hs)i.on.call("end",r,r.__data__,i.index,i.group),u()}function u(){i.state=Hi,i.timer.stop(),delete s[e];for(var d in s)return;delete r.__transition}}function ji(r,e){var i=r.__transition,s,o,a=!0,h;if(!i)return;e=e==null?null:e+"";for(h in i){if((s=i[h]).name!==e){a=!1;continue}o=s.state>es&&s.state<hs,s.state=Hi,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[h]}if(a)delete r.__transition}function kn(r){return this.each(function(){ji(this,r)})}function nC(r,e){var i,s;return function(){var o=me(this,r),a=o.tween;if(a!==i){s=i=a;for(var h=0,n=s.length;h<n;++h)if(s[h].name===e){s=s.slice(),s.splice(h,1);break}}o.tween=s}}function lC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=me(this,r),h=a.tween;if(h!==s){o=(s=h).slice();for(var n={name:e,value:i},u=0,d=o.length;u<d;++u)if(o[u].name===e){o[u]=n;break}if(u===d)o.push(n)}a.tween=o}}function wn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=pe(this.node(),i).tween;for(var o=0,a=s.length,h;o<a;++o)if((h=s[o]).name===r)return h.value;return null}return this.each((e==null?nC:lC)(i,r,e))}function Xr(r,e,i){var s=r._id;return r.each(function(){var o=me(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return pe(o,s).value[e]}}function Ui(r,e){var i;return(typeof e==="number"?Mn:e instanceof ao?dl:(i=ao(e))?(e=i,dl):Cc)(r,e)}function hC(r){return function(){this.removeAttribute(r)}}function cC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function uC(r,e,i){var s,o=i+"",a;return function(){var h=this.getAttribute(r);return h===o?null:h===s?a:a=e(s=h,i)}}function dC(r,e,i){var s,o=i+"",a;return function(){var h=this.getAttributeNS(r.space,r.local);return h===o?null:h===s?a:a=e(s=h,i)}}function fC(r,e,i){var s,o,a;return function(){var h,n=i(this),u;if(n==null)return void this.removeAttribute(r);return h=this.getAttribute(r),u=n+"",h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function pC(r,e,i){var s,o,a;return function(){var h,n=i(this),u;if(n==null)return void this.removeAttributeNS(r.space,r.local);return h=this.getAttributeNS(r.space,r.local),u=n+"",h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function Sn(r,e){var i=He(r),s=i==="transform"?yn:Ui;return this.attrTween(r,typeof e==="function"?(i.local?pC:fC)(i,s,Xr(this,"attr."+r,e)):e==null?(i.local?cC:hC)(i):(i.local?dC:uC)(i,s,e))}function gC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function mC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function yC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&mC(r,a);return i}return o._value=e,o}function xC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&gC(r,a);return i}return o._value=e,o}function Tn(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=He(r);return this.tween(i,(s.local?yC:xC)(s,e))}function CC(r,e){return function(){Yi(this,r).delay=+e.apply(this,arguments)}}function bC(r,e){return e=+e,function(){Yi(this,r).delay=e}}function Bn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?CC:bC)(e,r)):pe(this.node(),e).delay}function kC(r,e){return function(){me(this,r).duration=+e.apply(this,arguments)}}function wC(r,e){return e=+e,function(){me(this,r).duration=e}}function _n(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?kC:wC)(e,r)):pe(this.node(),e).duration}function SC(r,e){if(typeof e!=="function")throw Error();return function(){me(this,r).ease=e}}function vn(r){var e=this._id;return arguments.length?this.each(SC(e,r)):pe(this.node(),e).ease}function TC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();me(this,r).ease=i}}function Ln(r){if(typeof r!=="function")throw Error();return this.each(TC(this._id,r))}function An(r){if(typeof r!=="function")r=Hr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],h=a.length,n=s[o]=[],u,d=0;d<h;++d)if((u=a[d])&&r.call(u,u.__data__,d,a))n.push(u);return new Se(s,this._parents,this._name,this._id)}function En(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),h=Array(s),n=0;n<a;++n)for(var u=e[n],d=i[n],c=u.length,f=h[n]=Array(c),p,x=0;x<c;++x)if(p=u[x]||d[x])f[x]=p;for(;n<s;++n)h[n]=e[n];return new Se(h,this._parents,this._name,this._id)}function BC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function _C(r,e,i){var s,o,a=BC(e)?Yi:me;return function(){var h=a(this,r),n=h.on;if(n!==s)(o=(s=n).copy()).on(e,i);h.on=o}}function $n(r,e){var i=this._id;return arguments.length<2?pe(this.node(),i).on.on(r):this.each(_C(i,r,e))}function vC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function In(){return this.on("end.remove",vC(this._id))}function On(r){var e=this._name,i=this._id;if(typeof r!=="function")r=fr(r);for(var s=this._groups,o=s.length,a=Array(o),h=0;h<o;++h)for(var n=s[h],u=n.length,d=a[h]=Array(u),c,f,p=0;p<u;++p)if((c=n[p])&&(f=r.call(c,c.__data__,p,n))){if("__data__"in c)f.__data__=c.__data__;d[p]=f,sr(d[p],e,i,p,d,pe(c,i))}return new Se(a,this._parents,e,i)}function Dn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=zr(r);for(var s=this._groups,o=s.length,a=[],h=[],n=0;n<o;++n)for(var u=s[n],d=u.length,c,f=0;f<d;++f)if(c=u[f]){for(var p=r.call(c,c.__data__,f,u),x,S=pe(c,i),T=0,B=p.length;T<B;++T)if(x=p[T])sr(x,e,i,T,p,S);a.push(p),h.push(c)}return new Se(a,h,e,i)}var LC=er.prototype.constructor;function Pn(){return new LC(this._groups,this._parents)}function FC(r,e){var i,s,o;return function(){var a=pr(this,r),h=(this.style.removeProperty(r),pr(this,r));return a===h?null:a===i&&h===s?o:o=e(i=a,s=h)}}function Nu(r){return function(){this.style.removeProperty(r)}}function MC(r,e,i){var s,o=i+"",a;return function(){var h=pr(this,r);return h===o?null:h===s?a:a=e(s=h,i)}}function AC(r,e,i){var s,o,a;return function(){var h=pr(this,r),n=i(this),u=n+"";if(n==null)u=n=(this.style.removeProperty(r),pr(this,r));return h===u?null:h===s&&u===o?a:(o=u,a=e(s=h,n))}}function EC(r,e){var i,s,o,a="style."+e,h="end."+a,n;return function(){var u=me(this,r),d=u.on,c=u.value[a]==null?n||(n=Nu(e)):void 0;if(d!==i||o!==c)(s=(i=d).copy()).on(h,o=c);u.on=s}}function Rn(r,e,i){var s=(r+="")==="transform"?mn:Ui;return e==null?this.styleTween(r,FC(r,s)).on("end.style."+r,Nu(r)):typeof e==="function"?this.styleTween(r,AC(r,s,Xr(this,"style."+r,e))).each(EC(this._id,r)):this.styleTween(r,MC(r,s,e),i).on("end.style."+r,null)}function $C(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function IC(r,e,i){var s,o;function a(){var h=e.apply(this,arguments);if(h!==o)s=(o=h)&&$C(r,h,i);return s}return a._value=e,a}function Wn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,IC(r,e,i==null?"":i))}function OC(r){return function(){this.textContent=r}}function DC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Nn(r){return this.tween("text",typeof r==="function"?DC(Xr(this,"text",r)):OC(r==null?"":r+""))}function PC(r){return function(e){this.textContent=r.call(this,e)}}function RC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&PC(o);return e}return s._value=r,s}function Yn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,RC(r))}function Un(){var r=this._name,e=this._id,i=cs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var h=s[a],n=h.length,u,d=0;d<n;++d)if(u=h[d]){var c=pe(u,e);sr(u,r,i,d,h,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Se(s,this._parents,r,i)}function Xn(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,h){var n={value:h},u={value:function(){if(--o===0)a()}};if(i.each(function(){var d=me(this,s),c=d.on;if(c!==r)e=(r=c).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(u);d.on=e}),o===0)a()})}var qC=0;function Se(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function zu(r){return er().transition(r)}function cs(){return++qC}var nr=er.prototype;Se.prototype=zu.prototype={constructor:Se,select:On,selectAll:Dn,selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:An,merge:En,selection:Pn,transition:Un,call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:$n,attr:Sn,attrTween:Tn,style:Rn,styleTween:Wn,text:Nn,textTween:Yn,remove:In,tween:wn,delay:Bn,duration:_n,ease:vn,easeVarying:Ln,end:Xn,[Symbol.iterator]:nr[Symbol.iterator]};function us(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var WC={time:null,delay:0,duration:250,ease:us};function NC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function Gn(r){var e,i;if(r instanceof Se)e=r._id,r=r._name;else e=cs(),(i=WC).time=Ni(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var h=s[a],n=h.length,u,d=0;d<n;++d)if(u=h[d])sr(u,r,e,d,h,i||NC(u,e));return new Se(s,this._parents,r,e)}er.prototype.interrupt=kn;er.prototype.transition=Gn;var{abs:JL,max:tF,min:eF}=Math;function Hu(r){return[+r[0],+r[1]]}function zC(r){return[Hu(r[0]),Hu(r[1])]}var rF={name:"x",handles:["w","e"].map(Vn),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},iF={name:"y",handles:["n","s"].map(Vn),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},oF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vn),input:function(r){return r==null?null:zC(r)},output:function(r){return r}};function Vn(r){return{type:r}}var Kn=Math.PI,Zn=2*Kn;var HC=Zn-0.000001;function Yu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function YC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Yu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Gr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Yu:YC(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,h=this._y1,n=i-r,u=s-e,d=a-r,c=h-e,f=d*d+c*c;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(f>0.000001));else if(!(Math.abs(c*n-u*d)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let p=i-a,x=s-h,S=n*n+u*u,T=p*p+x*x,B=Math.sqrt(S),_=Math.sqrt(f),v=o*Math.tan((Kn-Math.acos((S+f-T)/(2*B*_)))/2),E=v/_,O=v/B;if(Math.abs(E-1)>0.000001)this._append`L${r+E*d},${e+E*c}`;this._append`A${o},${o},0,0,${+(c*p>d*x)},${this._x1=r+O*n},${this._y1=e+O*u}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let h=i*Math.cos(s),n=i*Math.sin(s),u=r+h,d=e+n,c=1^a,f=a?s-o:o-s;if(this._x1===null)this._append`M${u},${d}`;else if(Math.abs(this._x1-u)>0.000001||Math.abs(this._y1-d)>0.000001)this._append`L${u},${d}`;if(!i)return;if(f<0)f=f%Zn+Zn;if(f>HC)this._append`A${i},${i},0,1,${c},${r-h},${e-n}A${i},${i},0,1,${c},${this._x1=u},${this._y1=d}`;else if(f>0.000001)this._append`A${i},${i},0,${+(f>=Kn)},${c},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ju(){return new Gr}ju.prototype=Gr.prototype;function Mo(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var Qn=Symbol("implicit");function rr(){var r=new Fi,e=[],i=[],s=Qn;function o(a){let h=r.get(a);if(h===void 0){if(s!==Qn)return s;r.set(a,h=e.push(a)-1)}return i[h%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new Fi;for(let h of a){if(r.has(h))continue;r.set(h,e.push(h)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return rr(e,i).unknown(s)},Mo.apply(o,arguments),o}function St(r){return function(){return r}}var{abs:Jn,atan2:ye,cos:gr,max:Uu,min:ds,sin:Ie,sqrt:_r}=Math,ge=0.000000000001,Vr=Math.PI,Xi=Vr/2,Ec=2*Vr;function Xu(r){return r>1?0:r<-1?Vr:Math.acos(r)}function tl(r){return r>=1?Xi:r<=-1?-Xi:Math.asin(r)}function fs(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Gr(e)}function jC(r){return r.innerRadius}function UC(r){return r.outerRadius}function XC(r){return r.startAngle}function GC(r){return r.endAngle}function VC(r){return r&&r.padAngle}function KC(r,e,i,s,o,a,h,n){var u=i-r,d=s-e,c=h-o,f=n-a,p=f*u-c*d;if(p*p<ge)return;return p=(c*(e-a)-f*(r-o))/p,[r+p*u,e+p*d]}function ps(r,e,i,s,o,a,h){var n=r-i,u=e-s,d=(h?a:-a)/_r(n*n+u*u),c=d*u,f=-d*n,p=r+c,x=e+f,S=i+c,T=s+f,B=(p+S)/2,_=(x+T)/2,v=S-p,E=T-x,O=v*v+E*E,D=o-a,G=p*T-S*x,Z=(E<0?-1:1)*_r(Uu(0,D*D*O-G*G)),J=(G*E-v*Z)/O,rt=(-G*v-E*Z)/O,ht=(G*E+v*Z)/O,nt=(-G*v+E*Z)/O,ot=J-B,P=rt-_,X=ht-B,tt=nt-_;if(ot*ot+P*P>X*X+tt*tt)J=ht,rt=nt;return{cx:J,cy:rt,x01:-c,y01:-f,x11:J*(o/D-1),y11:rt*(o/D-1)}}function ia(){var r=jC,e=UC,i=St(0),s=null,o=XC,a=GC,h=VC,n=null,u=fs(d);function d(){var c,f,p=+r.apply(this,arguments),x=+e.apply(this,arguments),S=o.apply(this,arguments)-Xi,T=a.apply(this,arguments)-Xi,B=Jn(T-S),_=T>S;if(!n)n=c=u();if(x<p)f=x,x=p,p=f;if(!(x>ge))n.moveTo(0,0);else if(B>Ec-ge){if(n.moveTo(x*gr(S),x*Ie(S)),n.arc(0,0,x,S,T,!_),p>ge)n.moveTo(p*gr(T),p*Ie(T)),n.arc(0,0,p,T,S,_)}else{var v=S,E=T,O=S,D=T,G=B,Z=B,J=h.apply(this,arguments)/2,rt=J>ge&&(s?+s.apply(this,arguments):_r(p*p+x*x)),ht=ds(Jn(x-p)/2,+i.apply(this,arguments)),nt=ht,ot=ht,P,X;if(rt>ge){var tt=tl(rt/p*Ie(J)),N=tl(rt/x*Ie(J));if((G-=tt*2)>ge)tt*=_?1:-1,O+=tt,D-=tt;else G=0,O=D=(S+T)/2;if((Z-=N*2)>ge)N*=_?1:-1,v+=N,E-=N;else Z=0,v=E=(S+T)/2}var at=x*gr(v),st=x*Ie(v),Bt=p*gr(D),vt=p*Ie(D);if(ht>ge){var Wt=x*gr(E),Nt=x*Ie(E),jt=p*gr(O),Xt=p*Ie(O),$t;if(B<Vr)if($t=KC(at,st,jt,Xt,Wt,Nt,Bt,vt)){var Mt=at-$t[0],Dt=st-$t[1],Ht=Wt-$t[0],Rt=Nt-$t[1],ie=1/Ie(Xu((Mt*Ht+Dt*Rt)/(_r(Mt*Mt+Dt*Dt)*_r(Ht*Ht+Rt*Rt)))/2),re=_r($t[0]*$t[0]+$t[1]*$t[1]);nt=ds(ht,(p-re)/(ie-1)),ot=ds(ht,(x-re)/(ie+1))}else nt=ot=0}if(!(Z>ge))n.moveTo(at,st);else if(ot>ge)if(P=ps(jt,Xt,at,st,x,ot,_),X=ps(Wt,Nt,Bt,vt,x,ot,_),n.moveTo(P.cx+P.x01,P.cy+P.y01),ot<ht)n.arc(P.cx,P.cy,ot,ye(P.y01,P.x01),ye(X.y01,X.x01),!_);else n.arc(P.cx,P.cy,ot,ye(P.y01,P.x01),ye(P.y11,P.x11),!_),n.arc(0,0,x,ye(P.cy+P.y11,P.cx+P.x11),ye(X.cy+X.y11,X.cx+X.x11),!_),n.arc(X.cx,X.cy,ot,ye(X.y11,X.x11),ye(X.y01,X.x01),!_);else n.moveTo(at,st),n.arc(0,0,x,v,E,!_);if(!(p>ge)||!(G>ge))n.lineTo(Bt,vt);else if(nt>ge)if(P=ps(Bt,vt,Wt,Nt,p,-nt,_),X=ps(at,st,jt,Xt,p,-nt,_),n.lineTo(P.cx+P.x01,P.cy+P.y01),nt<ht)n.arc(P.cx,P.cy,nt,ye(P.y01,P.x01),ye(X.y01,X.x01),!_);else n.arc(P.cx,P.cy,nt,ye(P.y01,P.x01),ye(P.y11,P.x11),!_),n.arc(0,0,p,ye(P.cy+P.y11,P.cx+P.x11),ye(X.cy+X.y11,X.cx+X.x11),_),n.arc(X.cx,X.cy,nt,ye(X.y11,X.x11),ye(X.y01,X.x01),!_);else n.arc(0,0,p,D,O,_)}if(n.closePath(),c)return n=null,c+""||null}return d.centroid=function(){var c=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Vr/2;return[gr(f)*c,Ie(f)*c]},d.innerRadius=function(c){return arguments.length?(r=typeof c==="function"?c:St(+c),d):r},d.outerRadius=function(c){return arguments.length?(e=typeof c==="function"?c:St(+c),d):e},d.cornerRadius=function(c){return arguments.length?(i=typeof c==="function"?c:St(+c),d):i},d.padRadius=function(c){return arguments.length?(s=c==null?null:typeof c==="function"?c:St(+c),d):s},d.startAngle=function(c){return arguments.length?(o=typeof c==="function"?c:St(+c),d):o},d.endAngle=function(c){return arguments.length?(a=typeof c==="function"?c:St(+c),d):a},d.padAngle=function(c){return arguments.length?(h=typeof c==="function"?c:St(+c),d):h},d.context=function(c){return arguments.length?(n=c==null?null:c,d):n},d}var PF=Array.prototype.slice;function xd(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Gu(r){this._context=r}Gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function Ia(r){return new Gu(r)}function Vu(r){return r[0]}function Ku(r){return r[1]}function pl(r,e){var i=St(!0),s=null,o=Ia,a=null,h=fs(n);r=typeof r==="function"?r:r===void 0?Vu:St(r),e=typeof e==="function"?e:e===void 0?Ku:St(e);function n(u){var d,c=(u=xd(u)).length,f,p=!1,x;if(s==null)a=o(x=h());for(d=0;d<=c;++d){if(!(d<c&&i(f=u[d],d,u))===p)if(p=!p)a.lineStart();else a.lineEnd();if(p)a.point(+r(f,d,u),+e(f,d,u))}if(x)return a=null,x+""||null}return n.x=function(u){return arguments.length?(r=typeof u==="function"?u:St(+u),n):r},n.y=function(u){return arguments.length?(e=typeof u==="function"?u:St(+u),n):e},n.defined=function(u){return arguments.length?(i=typeof u==="function"?u:St(!!u),n):i},n.curve=function(u){return arguments.length?(o=u,s!=null&&(a=o(s)),n):o},n.context=function(u){return arguments.length?(u==null?s=a=null:a=o(s=u),n):s},n}class el{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function Gi(r){return new el(r,!0)}function Vi(r){return new el(r,!1)}function ve(){}function Kr(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function Ki(r){this._context=r}Ki.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Kr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Kr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new Ki(r)}function Zu(r){this._context=r}Zu.prototype={areaStart:ve,areaEnd:ve,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:Kr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function gs(r){return new Zu(r)}function Qu(r){this._context=r}Qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:Kr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function ms(r){return new Qu(r)}function Ju(r,e){this._basis=new Ki(r),this._beta=e}Ju.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,h=e[i]-o,n=-1,u;while(++n<=i)u=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+u*a),this._beta*e[n]+(1-this._beta)*(o+u*h))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var rl=function r(e){function i(s){return e===1?new Ki(s):new Ju(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function Zr(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function ys(r,e){this._context=r,this._k=(1-e)/6}ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Zr(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:Zr(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Zi=function r(e){function i(s){return new ys(s,e)}return i.tension=function(s){return r(+s)},i}(0);function xs(r,e){this._context=r,this._k=(1-e)/6}xs.prototype={areaStart:ve,areaEnd:ve,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:Zr(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var il=function r(e){function i(s){return new xs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Cs(r,e){this._context=r,this._k=(1-e)/6}Cs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Zr(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ol=function r(e){function i(s){return new Cs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Qi(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:h}=r;if(r._l01_a>ge){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,u=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/u,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/u}if(r._l23_a>ge){var d=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,c=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*d+r._x1*r._l23_2a-e*r._l12_2a)/c,h=(h*d+r._y1*r._l23_2a-i*r._l12_2a)/c}r._context.bezierCurveTo(s,o,a,h,r._x2,r._y2)}function td(r,e){this._context=r,this._alpha=e}td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Qi(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ji=function r(e){function i(s){return e?new td(s,e):new ys(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ed(r,e){this._context=r,this._alpha=e}ed.prototype={areaStart:ve,areaEnd:ve,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:Qi(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var sl=function r(e){function i(s){return e?new ed(s,e):new xs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function rd(r,e){this._context=r,this._alpha=e}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qi(this,r,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var al=function r(e){function i(s){return e?new rd(s,e):new Cs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function id(r){this._context=r}id.prototype={areaStart:ve,areaEnd:ve,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function bs(r){return new id(r)}function od(r){return r<0?-1:1}function sd(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),h=(i-r._y1)/(o||s<0&&-0),n=(a*o+h*s)/(s+o);return(od(a)+od(h))*Math.min(Math.abs(a),Math.abs(h),0.5*Math.abs(n))||0}function ad(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function nl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:h}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,h-n*i,a,h)}function ks(r){this._context=r}ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nl(this,this._t0,ad(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,nl(this,ad(this,i=sd(this,r,e)),i);break;default:nl(this,this._t0,i=sd(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function nd(r){this._context=new ld(r)}(nd.prototype=Object.create(ks.prototype)).point=function(r,e){ks.prototype.point.call(this,e,r)};function ld(r){this._context=r}ld.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function to(r){return new ks(r)}function eo(r){return new nd(r)}function cd(r){this._context=r}cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=hd(r),o=hd(e);for(var a=0,h=1;h<i;++a,++h)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[h],e[h])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function hd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),h=Array(i);o[0]=0,a[0]=2,h[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,h[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,h[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,h[e]-=s*h[e-1];o[i-1]=h[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(h[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function Qr(r){return new cd(r)}function ws(r,e){this._context=r,this._t=e}ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function Jr(r){return new ws(r,0.5)}function ro(r){return new ws(r,0)}function io(r){return new ws(r,1)}function mr(r,e,i){this.k=r,this.x=e,this.y=i}mr.prototype={constructor:mr,scale:function(r){return r===1?this:new mr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new mr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ll=new mr(1,0,0);hl.prototype=mr.prototype;function hl(r){while(!r.__zoom)if(!(r=r.parentNode))return ll;return r.__zoom}var Ae=t((r)=>{let{securityLevel:e}=m(),i=b("body");if(e==="sandbox"){let a=b(`#i${r}`).node()?.contentDocument??document;i=b(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ud(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ud,"getDefaultExportFromCjs");var Ce={},Ss={},xr={},ud;function ti(){if(ud)return xr;ud=1;function r(h){return typeof h>"u"||h===null}t(r,"isNothing");function e(h){return typeof h==="object"&&h!==null}t(e,"isObject");function i(h){if(Array.isArray(h))return h;else if(r(h))return[];return[h]}t(i,"toArray");function s(h,n){if(n){let u=Object.keys(n);for(let d=0,c=u.length;d<c;d+=1){let f=u[d];h[f]=n[f]}}return h}t(s,"extend");function o(h,n){let u="";for(let d=0;d<n;d+=1)u+=h;return u}t(o,"repeat");function a(h){return h===0&&Number.NEGATIVE_INFINITY===1/h}return t(a,"isNegativeZero"),xr.isNothing=r,xr.isObject=e,xr.toArray=i,xr.repeat=o,xr.isNegativeZero=a,xr.extend=s,xr}t(ti,"requireCommon");var cl,dd;function ei(){if(dd)return cl;dd=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
127
127
 
128
- `+i.mark.snippet;return a+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),ul=e,ul}t(ri,"requireException");var yl,fd;function Xd(){if(fd)return yl;fd=1;let r=ei();function e(o,a,h,n,u){let d="",c="",f=Math.floor(u/2)-1;if(n-a>f)d=" ... ",a=n-f+d.length;if(h-n>f)c=" ...",h=n+f-c.length;return{str:d+o.slice(a,h).replace(/\t/g,"→")+c,pos:n-a+d.length}}t(e,"getLine");function i(o,a){return r.repeat(" ",a-o.length)+o}t(i,"padStart");function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;if(!a.maxLength)a.maxLength=79;if(typeof a.indent!=="number")a.indent=1;if(typeof a.linesBefore!=="number")a.linesBefore=3;if(typeof a.linesAfter!=="number")a.linesAfter=2;let h=/\r?\n|\r|\0/g,n=[0],u=[],d,c=-1;while(d=h.exec(o.buffer))if(u.push(d.index),n.push(d.index+d[0].length),o.position<=d.index&&c<0)c=n.length-2;if(c<0)c=n.length-1;let f="",p=Math.min(o.line+a.linesAfter,u.length).toString().length,x=a.maxLength-(a.indent+p+3);for(let S=1;S<=a.linesBefore;S++){if(c-S<0)break;let T=e(o.buffer,n[c-S],u[c-S],o.position-(n[c]-n[c-S]),x);f=r.repeat(" ",a.indent)+i((o.line-S+1).toString(),p)+" | "+T.str+`
129
- `+f}let k=e(o.buffer,n[c],u[c],o.position,x);f+=r.repeat(" ",a.indent)+i((o.line+1).toString(),p)+" | "+k.str+`
130
- `,f+=r.repeat("-",a.indent+p+3+k.pos)+`^
131
- `;for(let S=1;S<=a.linesAfter;S++){if(c+S>=u.length)break;let T=e(o.buffer,n[c+S],u[c+S],o.position-(n[c]-n[c+S]),x);f+=r.repeat(" ",a.indent)+i((o.line+S+1).toString(),p)+" | "+T.str+`
132
- `}return f.replace(/\n$/,"")}return t(s,"makeSnippet"),yl=s,yl}t(Xd,"requireSnippet");var xl,pd;function ke(){if(pd)return xl;pd=1;let r=ri(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let h={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(u){h[String(u)]=n})});return h}t(s,"compileStyleAliases");function o(a,h){if(h=h||{},Object.keys(h).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=h,this.tag=a,this.kind=h.kind||null,this.resolve=h.resolve||function(){return!0},this.construct=h.construct||function(n){return n},this.instanceOf=h.instanceOf||null,this.predicate=h.predicate||null,this.represent=h.represent||null,this.representName=h.representName||null,this.defaultStyle=h.defaultStyle||null,this.multi=h.multi||!1,this.styleAliases=s(h.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),xl=o,xl}t(ke,"requireType");var Cl,gd;function ql(){if(gd)return Cl;gd=1;let r=ri(),e=ke();function i(a,h){let n=[];return a[h].forEach(function(u){let d=n.length;n.forEach(function(c,f){if(c.tag===u.tag&&c.kind===u.kind&&c.multi===u.multi)d=f}),n[d]=u}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function h(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(h,"collectType");for(let n=0,u=arguments.length;n<u;n+=1)arguments[n].forEach(h);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(h){let n=[],u=[];if(h instanceof e)u.push(h);else if(Array.isArray(h))u=u.concat(h);else if(h&&(Array.isArray(h.implicit)||Array.isArray(h.explicit))){if(h.implicit)n=n.concat(h.implicit);if(h.explicit)u=u.concat(h.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(c){if(!(c instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(c){if(!(c instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let d=Object.create(o.prototype);return d.implicit=(this.implicit||[]).concat(n),d.explicit=(this.explicit||[]).concat(u),d.compiledImplicit=i(d,"implicit"),d.compiledExplicit=i(d,"explicit"),d.compiledTypeMap=s(d.compiledImplicit,d.compiledExplicit),d},"extend"),Cl=o,Cl}t(ql,"requireSchema");var bl,md;function Wl(){if(md)return bl;return md=1,bl=new(ke())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),bl}t(Wl,"requireStr");var kl,bd;function Nl(){if(bd)return kl;return bd=1,kl=new(ke())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),kl}t(Nl,"requireSeq");var wl,Sd;function zl(){if(Sd)return wl;return Sd=1,wl=new(ke())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),wl}t(zl,"requireMap");var Sl,Td;function Hl(){if(Td)return Sl;return Td=1,Sl=new(ql())({explicit:[Wl(),Nl(),zl()]}),Sl}t(Hl,"requireFailsafe");var Tl,Ld;function Yl(){if(Ld)return Tl;Ld=1;let r=ke();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Tl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Tl}t(Yl,"require_null");var Bl,Fd;function jl(){if(Fd)return Bl;Fd=1;let r=ke();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),Bl=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Bl}t(jl,"requireBool");var _l,Md;function Ul(){if(Md)return _l;Md=1;let r=ei(),e=ke();function i(d){return d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102}t(i,"isHexCode");function s(d){return d>=48&&d<=55}t(s,"isOctCode");function o(d){return d>=48&&d<=57}t(o,"isDecCode");function a(d){if(d===null)return!1;let c=d.length,f=0,p=!1;if(!c)return!1;let x=d[f];if(x==="-"||x==="+")x=d[++f];if(x==="0"){if(f+1===c)return!0;if(x=d[++f],x==="b"){f++;for(;f<c;f++){if(x=d[f],x!=="0"&&x!=="1")return!1;p=!0}return p&&isFinite(h(d))}if(x==="x"){f++;for(;f<c;f++){if(!i(d.charCodeAt(f)))return!1;p=!0}return p&&isFinite(h(d))}if(x==="o"){f++;for(;f<c;f++){if(!s(d.charCodeAt(f)))return!1;p=!0}return p&&isFinite(h(d))}}for(;f<c;f++){if(!o(d.charCodeAt(f)))return!1;p=!0}if(!p)return!1;return isFinite(h(d))}t(a,"resolveYamlInteger");function h(d){let c=d,f=1,p=c[0];if(p==="-"||p==="+"){if(p==="-")f=-1;c=c.slice(1),p=c[0]}if(c==="0")return 0;if(p==="0"){if(c[1]==="b")return f*parseInt(c.slice(2),2);if(c[1]==="x")return f*parseInt(c.slice(2),16);if(c[1]==="o")return f*parseInt(c.slice(2),8)}return f*parseInt(c,10)}t(h,"parseYamlInteger");function n(d){return h(d)}t(n,"constructYamlInteger");function u(d){return Object.prototype.toString.call(d)==="[object Number]"&&(d%1===0&&!r.isNegativeZero(d))}return t(u,"isInteger"),_l=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:u,represent:{binary:t(function(d){return d>=0?"0b"+d.toString(2):"-0b"+d.toString(2).slice(1)},"binary"),octal:t(function(d){return d>=0?"0o"+d.toString(8):"-0o"+d.toString(8).slice(1)},"octal"),decimal:t(function(d){return d.toString(10)},"decimal"),hexadecimal:t(function(d){return d>=0?"0x"+d.toString(16).toUpperCase():"-0x"+d.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_l}t(Ul,"requireInt");var vl,Ad;function Xl(){if(Ad)return vl;Ad=1;let r=ei(),e=ke(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(d){if(d===null)return!1;if(!i.test(d))return!1;if(isFinite(parseFloat(d,10)))return!0;return s.test(d)}t(o,"resolveYamlFloat");function a(d){let c=d.toLowerCase(),f=c[0]==="-"?-1:1;if("+-".indexOf(c[0])>=0)c=c.slice(1);if(c===".inf")return f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(c===".nan")return NaN;return f*parseFloat(c,10)}t(a,"constructYamlFloat");let h=/^[-+]?[0-9]+e/;function n(d,c){if(isNaN(d))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===d)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===d)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(d))return"-0.0";let f=d.toString(10);return h.test(f)?f.replace("e",".e"):f}t(n,"representYamlFloat");function u(d){return Object.prototype.toString.call(d)==="[object Number]"&&(d%1!==0||r.isNegativeZero(d))}return t(u,"isFloat"),vl=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:u,represent:n,defaultStyle:"lowercase"}),vl}t(Xl,"requireFloat");var Ll,$d;function Gl(){if($d)return Ll;return $d=1,Ll=Hl().extend({implicit:[Yl(),jl(),Ul(),Xl()]}),Ll}t(Gl,"requireJson");var Fl,Od;function Vl(){if(Od)return Fl;return Od=1,Fl=Gl(),Fl}t(Vl,"requireCore");var Ml,Dd;function Kl(){if(Dd)return Ml;Dd=1;let r=ke(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function s(h){if(h===null)return!1;if(e.exec(h)!==null)return!0;if(i.exec(h)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(h){let n=0,u=null,d=e.exec(h);if(d===null)d=i.exec(h);if(d===null)throw Error("Date resolve error");let c=+d[1],f=+d[2]-1,p=+d[3];if(!d[4])return new Date(Date.UTC(c,f,p));let x=+d[4],k=+d[5],S=+d[6];if(d[7]){n=d[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(d[9]){let B=+d[10],_=+(d[11]||0);if(u=(B*60+_)*60000,d[9]==="-")u=-u}let T=new Date(Date.UTC(c,f,p,x,k,S,n));if(u)T.setTime(T.getTime()-u);return T}t(o,"constructYamlTimestamp");function a(h){return h.toISOString()}return t(a,"representYamlTimestamp"),Ml=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Ml}t(Kl,"requireTimestamp");var El,Pd;function Zl(){if(Pd)return El;Pd=1;let r=ke();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),El=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),El}t(Zl,"requireMerge");var $l,Rd;function Ql(){if(Rd)return $l;Rd=1;let r=ke(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
- \r`;function i(h){if(h===null)return!1;let n=0,u=h.length,d=e;for(let c=0;c<u;c++){let f=d.indexOf(h.charAt(c));if(f>64)continue;if(f<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(h){let n=h.replace(/[\r\n=]/g,""),u=n.length,d=e,c=0,f=[];for(let x=0;x<u;x++){if(x%4===0&&x)f.push(c>>16&255),f.push(c>>8&255),f.push(c&255);c=c<<6|d.indexOf(n.charAt(x))}let p=u%4*6;if(p===0)f.push(c>>16&255),f.push(c>>8&255),f.push(c&255);else if(p===18)f.push(c>>10&255),f.push(c>>2&255);else if(p===12)f.push(c>>4&255);return new Uint8Array(f)}t(s,"constructYamlBinary");function o(h){let n="",u=0,d=h.length,c=e;for(let p=0;p<d;p++){if(p%3===0&&p)n+=c[u>>18&63],n+=c[u>>12&63],n+=c[u>>6&63],n+=c[u&63];u=(u<<8)+h[p]}let f=d%3;if(f===0)n+=c[u>>18&63],n+=c[u>>12&63],n+=c[u>>6&63],n+=c[u&63];else if(f===2)n+=c[u>>10&63],n+=c[u>>4&63],n+=c[u<<2&63],n+=c[64];else if(f===1)n+=c[u>>2&63],n+=c[u<<4&63],n+=c[64],n+=c[64];return n}t(o,"representYamlBinary");function a(h){return Object.prototype.toString.call(h)==="[object Uint8Array]"}return t(a,"isBinary"),$l=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),$l}t(Ql,"requireBinary");var Il,qd;function Jl(){if(qd)return Il;qd=1;let r=ke(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let h=[],n=a;for(let u=0,d=n.length;u<d;u+=1){let c=n[u],f=!1;if(i.call(c)!=="[object Object]")return!1;let p;for(p in c)if(e.call(c,p))if(!f)f=!0;else return!1;if(!f)return!1;if(h.indexOf(p)===-1)h.push(p);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Il=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Il}t(Jl,"requireOmap");var Ol,Wd;function th(){if(Wd)return Ol;Wd=1;let r=ke(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,h=Array(a.length);for(let n=0,u=a.length;n<u;n+=1){let d=a[n];if(e.call(d)!=="[object Object]")return!1;let c=Object.keys(d);if(c.length!==1)return!1;h[n]=[c[0],d[c[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,h=Array(a.length);for(let n=0,u=a.length;n<u;n+=1){let d=a[n],c=Object.keys(d);h[n]=[c[0],d[c[0]]]}return h}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(th,"requirePairs");var Dl,Nd;function eh(){if(Nd)return Dl;Nd=1;let r=ke(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let h in a)if(e.call(a,h)){if(a[h]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Dl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Dl}t(eh,"requireSet");var Pl,zd;function Bs(){if(zd)return Pl;return zd=1,Pl=Vl().extend({implicit:[Kl(),Zl()],explicit:[Ql(),Jl(),th(),eh()]}),Pl}t(Bs,"require_default");var Hd;function Gd(){if(Hd)return Ts;Hd=1;let r=ei(),e=ri(),i=Xd(),s=Bs(),o=Object.prototype.hasOwnProperty,a=1,h=2,n=3,u=4,d=1,c=2,f=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,x=/[\x85\u2028\u2029]/,k=/[,\[\]{}]/,S=/^(?:!|!!|![0-9A-Za-z-]+!)$/,T=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function B(C){return Object.prototype.toString.call(C)}t(B,"_class");function _(C){return C===10||C===13}t(_,"isEol");function L(C){return C===9||C===32}t(L,"isWhiteSpace");function D(C){return C===9||C===32||C===10||C===13}t(D,"isWsOrEol");function P(C){return C===44||C===91||C===93||C===123||C===125}t(P,"isFlowIndicator");function K(C){if(C>=48&&C<=57)return C-48;let et=C|32;if(et>=97&&et<=102)return et-97+10;return-1}t(K,"fromHexCode");function Z(C){if(C===120)return 2;if(C===117)return 4;if(C===85)return 8;return 0}t(Z,"escapedHexLen");function J(C){if(C>=48&&C<=57)return C-48;return-1}t(J,"fromDecimalCode");function rt(C){switch(C){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
134
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(rt,"simpleEscapeSequence");function ht(C){if(C<=65535)return String.fromCharCode(C);return String.fromCharCode((C-65536>>10)+55296,(C-65536&1023)+56320)}t(ht,"charFromCodepoint");function nt(C,et,ut){if(et==="__proto__")Object.defineProperty(C,et,{configurable:!0,enumerable:!0,writable:!0,value:ut});else C[et]=ut}t(nt,"setProperty");let ot=Array(256),N=Array(256);for(let C=0;C<256;C++)ot[C]=rt(C)?1:0,N[C]=rt(C);function X(C,et){this.input=C,this.filename=et.filename||null,this.schema=et.schema||s,this.onWarning=et.onWarning||null,this.legacy=et.legacy||!1,this.json=et.json||!1,this.listener=et.listener||null,this.maxDepth=typeof et.maxDepth==="number"?et.maxDepth:100,this.maxTotalMergeKeys=typeof et.maxTotalMergeKeys==="number"?et.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=C.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(X,"State");function tt(C,et){let ut={name:C.filename,buffer:C.input.slice(0,-1),position:C.position,line:C.line,column:C.position-C.lineStart};return ut.snippet=i(ut),new e(et,ut)}t(tt,"generateError");function U(C,et){throw tt(C,et)}t(U,"throwError");function at(C,et){if(C.onWarning)C.onWarning.call(null,tt(C,et))}t(at,"throwWarning");function st(C,et,ut){let gt=C.anchorMapTransactions;if(gt.length!==0){let ct=gt[gt.length-1];if(!o.call(ct,et))ct[et]={existed:o.call(C.anchorMap,et),value:C.anchorMap[et]}}C.anchorMap[et]=ut}t(st,"storeAnchor");function Bt(C){C.anchorMapTransactions.push(Object.create(null))}t(Bt,"beginAnchorTransaction");function vt(C){let et=C.anchorMapTransactions.pop(),ut=C.anchorMapTransactions;if(ut.length===0)return;let gt=ut[ut.length-1],ct=Object.keys(et);for(let Tt=0,I=ct.length;Tt<I;Tt+=1){let it=ct[Tt];if(!o.call(gt,it))gt[it]=et[it]}}t(vt,"commitAnchorTransaction");function Ht(C){let et=C.anchorMapTransactions.pop(),ut=Object.keys(et);for(let gt=ut.length-1;gt>=0;gt-=1){let ct=et[ut[gt]];if(ct.existed)C.anchorMap[ut[gt]]=ct.value;else delete C.anchorMap[ut[gt]]}}t(Ht,"rollbackAnchorTransaction");function Yt(C){return{position:C.position,line:C.line,lineStart:C.lineStart,lineIndent:C.lineIndent,firstTabInLine:C.firstTabInLine,tag:C.tag,anchor:C.anchor,kind:C.kind,result:C.result}}t(Yt,"snapshotState");function Vt(C,et){C.position=et.position,C.line=et.line,C.lineStart=et.lineStart,C.lineIndent=et.lineIndent,C.firstTabInLine=et.firstTabInLine,C.tag=et.tag,C.anchor=et.anchor,C.kind=et.kind,C.result=et.result}t(Vt,"restoreState");let Kt={YAML:t(function(et,ut,gt){if(et.version!==null)U(et,"duplication of %YAML directive");if(gt.length!==1)U(et,"YAML directive accepts exactly one argument");let ct=/^([0-9]+)\.([0-9]+)$/.exec(gt[0]);if(ct===null)U(et,"ill-formed argument of the YAML directive");let Tt=parseInt(ct[1],10),I=parseInt(ct[2],10);if(Tt!==1)U(et,"unacceptable YAML version of the document");if(et.version=gt[0],et.checkLineBreaks=I<2,I!==1&&I!==2)at(et,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(et,ut,gt){let ct;if(gt.length!==2)U(et,"TAG directive accepts exactly two arguments");let Tt=gt[0];if(ct=gt[1],!S.test(Tt))U(et,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(et.tagMap,Tt))U(et,'there is a previously declared suffix for "'+Tt+'" tag handle');if(!T.test(ct))U(et,"ill-formed tag prefix (second argument) of the TAG directive");try{ct=decodeURIComponent(ct)}catch(I){U(et,"tag prefix is malformed: "+ct)}et.tagMap[Tt]=ct},"handleTagDirective")};function It(C,et,ut,gt){if(et<ut){let ct=C.input.slice(et,ut);if(gt)for(let Tt=0,I=ct.length;Tt<I;Tt+=1){let it=ct.charCodeAt(Tt);if(!(it===9||it>=32&&it<=1114111))U(C,"expected valid JSON character")}else if(p.test(ct))U(C,"the stream contains non-printable characters");C.result+=ct}}t(It,"captureSegment");function Mt(C,et,ut,gt){if(!r.isObject(ut))U(C,"cannot merge mappings; the provided source object is unacceptable");let ct=Object.keys(ut);for(let Tt=0,I=ct.length;Tt<I;Tt+=1){let it=ct[Tt];if(C.maxTotalMergeKeys!==-1&&++C.totalMergeKeys>C.maxTotalMergeKeys)U(C,"merge keys exceeded maxTotalMergeKeys ("+C.maxTotalMergeKeys+")");if(!o.call(et,it))nt(et,it,ut[it]),gt[it]=!0}}t(Mt,"mergeMappings");function Pt(C,et,ut,gt,ct,Tt,I,it,bt){if(Array.isArray(ct)){ct=Array.prototype.slice.call(ct);for(let dt=0,ft=ct.length;dt<ft;dt+=1){if(Array.isArray(ct[dt]))U(C,"nested arrays are not supported inside keys");if(typeof ct==="object"&&B(ct[dt])==="[object Object]")ct[dt]="[object Object]"}}if(typeof ct==="object"&&B(ct)==="[object Object]")ct="[object Object]";if(ct=String(ct),et===null)et={};if(gt==="tag:yaml.org,2002:merge")if(Array.isArray(Tt))for(let dt=0,ft=Tt.length;dt<ft;dt+=1)Mt(C,et,Tt[dt],ut);else Mt(C,et,Tt,ut);else{if(!C.json&&!o.call(ut,ct)&&o.call(et,ct))C.line=I||C.line,C.lineStart=it||C.lineStart,C.position=bt||C.position,U(C,"duplicated mapping key");nt(et,ct,Tt),delete ut[ct]}return et}t(Pt,"storeMappingPair");function jt(C){let et=C.input.charCodeAt(C.position);if(et===10)C.position++;else if(et===13){if(C.position++,C.input.charCodeAt(C.position)===10)C.position++}else U(C,"a line break is expected");C.line+=1,C.lineStart=C.position,C.firstTabInLine=-1}t(jt,"readLineBreak");function qt(C,et,ut){let gt=0,ct=C.input.charCodeAt(C.position);while(ct!==0){while(L(ct)){if(ct===9&&C.firstTabInLine===-1)C.firstTabInLine=C.position;ct=C.input.charCodeAt(++C.position)}if(et&&ct===35)do ct=C.input.charCodeAt(++C.position);while(ct!==10&&ct!==13&&ct!==0);if(_(ct)){jt(C),ct=C.input.charCodeAt(C.position),gt++,C.lineIndent=0;while(ct===32)C.lineIndent++,ct=C.input.charCodeAt(++C.position)}else break}if(ut!==-1&&gt!==0&&C.lineIndent<ut)at(C,"deficient indentation");return gt}t(qt,"skipSeparationSpace");function oe(C){let et=C.position,ut=C.input.charCodeAt(et);if((ut===45||ut===46)&&ut===C.input.charCodeAt(et+1)&&ut===C.input.charCodeAt(et+2)){if(et+=3,ut=C.input.charCodeAt(et),ut===0||D(ut))return!0}return!1}t(oe,"testDocumentSeparator");function ie(C,et){if(et===1)C.result+=" ";else if(et>1)C.result+=r.repeat(`
135
- `,et-1)}t(ie,"writeFoldedLines");function Qe(C,et,ut){let gt,ct,Tt,I,it,bt,{kind:dt,result:ft}=C,kt=C.input.charCodeAt(C.position);if(D(kt)||P(kt)||kt===35||kt===38||kt===42||kt===33||kt===124||kt===62||kt===39||kt===34||kt===37||kt===64||kt===96)return!1;if(kt===63||kt===45){let yt=C.input.charCodeAt(C.position+1);if(D(yt)||ut&&P(yt))return!1}C.kind="scalar",C.result="",gt=ct=C.position,Tt=!1;while(kt!==0){if(kt===58){let yt=C.input.charCodeAt(C.position+1);if(D(yt)||ut&&P(yt))break}else if(kt===35){let yt=C.input.charCodeAt(C.position-1);if(D(yt))break}else if(C.position===C.lineStart&&oe(C)||ut&&P(kt))break;else if(_(kt))if(I=C.line,it=C.lineStart,bt=C.lineIndent,qt(C,!1,-1),C.lineIndent>=et){Tt=!0,kt=C.input.charCodeAt(C.position);continue}else{C.position=ct,C.line=I,C.lineStart=it,C.lineIndent=bt;break}if(Tt)It(C,gt,ct,!1),ie(C,C.line-I),gt=ct=C.position,Tt=!1;if(!L(kt))ct=C.position+1;kt=C.input.charCodeAt(++C.position)}if(It(C,gt,ct,!1),C.result)return!0;return C.kind=dt,C.result=ft,!1}t(Qe,"readPlainScalar");function Or(C,et){let ut,gt,ct=C.input.charCodeAt(C.position);if(ct!==39)return!1;C.kind="scalar",C.result="",C.position++,ut=gt=C.position;while((ct=C.input.charCodeAt(C.position))!==0)if(ct===39)if(It(C,ut,C.position,!0),ct=C.input.charCodeAt(++C.position),ct===39)ut=C.position,C.position++,gt=C.position;else return!0;else if(_(ct))It(C,ut,gt,!0),ie(C,qt(C,!1,et)),ut=gt=C.position;else if(C.position===C.lineStart&&oe(C))U(C,"unexpected end of the document within a single quoted scalar");else if(C.position++,!L(ct))gt=C.position;U(C,"unexpected end of the stream within a single quoted scalar")}t(Or,"readSingleQuotedScalar");function We(C,et){let ut,gt,ct,Tt=C.input.charCodeAt(C.position);if(Tt!==34)return!1;C.kind="scalar",C.result="",C.position++,ut=gt=C.position;while((Tt=C.input.charCodeAt(C.position))!==0)if(Tt===34)return It(C,ut,C.position,!0),C.position++,!0;else if(Tt===92){if(It(C,ut,C.position,!0),Tt=C.input.charCodeAt(++C.position),_(Tt))qt(C,!1,et);else if(Tt<256&&ot[Tt])C.result+=N[Tt],C.position++;else if((ct=Z(Tt))>0){let I=ct,it=0;for(;I>0;I--)if(Tt=C.input.charCodeAt(++C.position),(ct=K(Tt))>=0)it=(it<<4)+ct;else U(C,"expected hexadecimal character");C.result+=ht(it),C.position++}else U(C,"unknown escape sequence");ut=gt=C.position}else if(_(Tt))It(C,ut,gt,!0),ie(C,qt(C,!1,et)),ut=gt=C.position;else if(C.position===C.lineStart&&oe(C))U(C,"unexpected end of the document within a double quoted scalar");else if(C.position++,!L(Tt))gt=C.position;U(C,"unexpected end of the stream within a double quoted scalar")}t(We,"readDoubleQuotedScalar");function pi(C,et){let ut=!0,gt,ct,Tt,I=C.tag,it,bt=C.anchor,dt,ft,kt,yt,At=Object.create(null),Ft,Ot,Rt,Zt=C.input.charCodeAt(C.position);if(Zt===91)dt=93,yt=!1,it=[];else if(Zt===123)dt=125,yt=!0,it={};else return!1;if(C.anchor!==null)st(C,C.anchor,it);Zt=C.input.charCodeAt(++C.position);while(Zt!==0){if(qt(C,!0,et),Zt=C.input.charCodeAt(C.position),Zt===dt)return C.position++,C.tag=I,C.anchor=bt,C.kind=yt?"mapping":"sequence",C.result=it,!0;else if(!ut)U(C,"missed comma between flow collection entries");else if(Zt===44)U(C,"expected the node content, but found ','");if(Ot=Ft=Rt=null,ft=kt=!1,Zt===63){let se=C.input.charCodeAt(C.position+1);if(D(se))ft=kt=!0,C.position++,qt(C,!0,et)}if(gt=C.line,ct=C.lineStart,Tt=C.position,Ie(C,et,a,!1,!0),Ot=C.tag,Ft=C.result,qt(C,!0,et),Zt=C.input.charCodeAt(C.position),(kt||C.line===gt)&&Zt===58)ft=!0,Zt=C.input.charCodeAt(++C.position),qt(C,!0,et),Ie(C,et,a,!1,!0),Rt=C.result;if(yt)Pt(C,it,At,Ot,Ft,Rt,gt,ct,Tt);else if(ft)it.push(Pt(C,null,At,Ot,Ft,Rt,gt,ct,Tt));else it.push(Ft);if(qt(C,!0,et),Zt=C.input.charCodeAt(C.position),Zt===44)ut=!0,Zt=C.input.charCodeAt(++C.position);else ut=!1}U(C,"unexpected end of the stream within a flow collection")}t(pi,"readFlowCollection");function yi(C,et){let ut,gt=d,ct=!1,Tt=!1,I=et,it=0,bt=!1,dt,ft=C.input.charCodeAt(C.position);if(ft===124)ut=!1;else if(ft===62)ut=!0;else return!1;C.kind="scalar",C.result="";while(ft!==0)if(ft=C.input.charCodeAt(++C.position),ft===43||ft===45)if(d===gt)gt=ft===43?f:c;else U(C,"repeat of a chomping mode identifier");else if((dt=J(ft))>=0)if(dt===0)U(C,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Tt)I=et+dt-1,Tt=!0;else U(C,"repeat of an indentation width identifier");else break;if(L(ft)){do ft=C.input.charCodeAt(++C.position);while(L(ft));if(ft===35)do ft=C.input.charCodeAt(++C.position);while(!_(ft)&&ft!==0)}while(ft!==0){jt(C),C.lineIndent=0,ft=C.input.charCodeAt(C.position);while((!Tt||C.lineIndent<I)&&ft===32)C.lineIndent++,ft=C.input.charCodeAt(++C.position);if(!Tt&&C.lineIndent>I)I=C.lineIndent;if(_(ft)){it++;continue}if(!Tt&&I===0)U(C,"missing indentation for block scalar");if(C.lineIndent<I){if(gt===f)C.result+=r.repeat(`
136
- `,ct?1+it:it);else if(gt===d){if(ct)C.result+=`
137
- `}break}if(ut)if(L(ft))bt=!0,C.result+=r.repeat(`
138
- `,ct?1+it:it);else if(bt)bt=!1,C.result+=r.repeat(`
139
- `,it+1);else if(it===0){if(ct)C.result+=" "}else C.result+=r.repeat(`
140
- `,it);else C.result+=r.repeat(`
141
- `,ct?1+it:it);ct=!0,Tt=!0,it=0;let kt=C.position;while(!_(ft)&&ft!==0)ft=C.input.charCodeAt(++C.position);It(C,kt,C.position,!1)}return!0}t(yi,"readBlockScalar");function Ne(C,et){let{tag:ut,anchor:gt}=C,ct=[],Tt=!1;if(C.firstTabInLine!==-1)return!1;if(C.anchor!==null)st(C,C.anchor,ct);let I=C.input.charCodeAt(C.position);while(I!==0){if(C.firstTabInLine!==-1)C.position=C.firstTabInLine,U(C,"tab characters must not be used in indentation");if(I!==45)break;let it=C.input.charCodeAt(C.position+1);if(!D(it))break;if(Tt=!0,C.position++,qt(C,!0,-1)){if(C.lineIndent<=et){ct.push(null),I=C.input.charCodeAt(C.position);continue}}let bt=C.line;if(Ie(C,et,n,!1,!0),ct.push(C.result),qt(C,!0,-1),I=C.input.charCodeAt(C.position),(C.line===bt||C.lineIndent>et)&&I!==0)U(C,"bad indentation of a sequence entry");else if(C.lineIndent<et)break}if(Tt)return C.tag=ut,C.anchor=gt,C.kind="sequence",C.result=ct,!0;return!1}t(Ne,"readBlockSequence");function Dr(C,et,ut){let gt,ct,Tt,I,{tag:it,anchor:bt}=C,dt={},ft=Object.create(null),kt=null,yt=null,At=null,Ft=!1,Ot=!1;if(C.firstTabInLine!==-1)return!1;if(C.anchor!==null)st(C,C.anchor,dt);let Rt=C.input.charCodeAt(C.position);while(Rt!==0){if(!Ft&&C.firstTabInLine!==-1)C.position=C.firstTabInLine,U(C,"tab characters must not be used in indentation");let Zt=C.input.charCodeAt(C.position+1),se=C.line;if((Rt===63||Rt===58)&&D(Zt)){if(Rt===63){if(Ft)Pt(C,dt,ft,kt,yt,null,ct,Tt,I),kt=yt=At=null;Ot=!0,Ft=!0,gt=!0}else if(Ft)Ft=!1,gt=!0;else U(C,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");C.position+=1,Rt=Zt}else{if(ct=C.line,Tt=C.lineStart,I=C.position,!Ie(C,ut,h,!1,!0))break;if(C.line===se){Rt=C.input.charCodeAt(C.position);while(L(Rt))Rt=C.input.charCodeAt(++C.position);if(Rt===58){if(Rt=C.input.charCodeAt(++C.position),!D(Rt))U(C,"a whitespace character is expected after the key-value separator within a block mapping");if(Ft)Pt(C,dt,ft,kt,yt,null,ct,Tt,I),kt=yt=At=null;Ot=!0,Ft=!1,gt=!1,kt=C.tag,yt=C.result}else if(Ot)U(C,"can not read an implicit mapping pair; a colon is missed");else return C.tag=it,C.anchor=bt,!0}else if(Ot)U(C,"can not read a block mapping entry; a multiline key may not be an implicit key");else return C.tag=it,C.anchor=bt,!0}if(C.line===se||C.lineIndent>et){if(Ft)ct=C.line,Tt=C.lineStart,I=C.position;if(Ie(C,et,u,!0,gt))if(Ft)yt=C.result;else At=C.result;if(!Ft)Pt(C,dt,ft,kt,yt,At,ct,Tt,I),kt=yt=At=null;qt(C,!0,-1),Rt=C.input.charCodeAt(C.position)}if((C.line===se||C.lineIndent>et)&&Rt!==0)U(C,"bad indentation of a mapping entry");else if(C.lineIndent<et)break}if(Ft)Pt(C,dt,ft,kt,yt,null,ct,Tt,I);if(Ot)C.tag=it,C.anchor=bt,C.kind="mapping",C.result=dt;return Ot}t(Dr,"readBlockMapping");function xi(C){let et=!1,ut=!1,gt,ct,Tt=C.input.charCodeAt(C.position);if(Tt!==33)return!1;if(C.tag!==null)U(C,"duplication of a tag property");if(Tt=C.input.charCodeAt(++C.position),Tt===60)et=!0,Tt=C.input.charCodeAt(++C.position);else if(Tt===33)ut=!0,gt="!!",Tt=C.input.charCodeAt(++C.position);else gt="!";let I=C.position;if(et){do Tt=C.input.charCodeAt(++C.position);while(Tt!==0&&Tt!==62);if(C.position<C.length)ct=C.input.slice(I,C.position),Tt=C.input.charCodeAt(++C.position);else U(C,"unexpected end of the stream within a verbatim tag")}else{while(Tt!==0&&!D(Tt)){if(Tt===33)if(!ut){if(gt=C.input.slice(I-1,C.position+1),!S.test(gt))U(C,"named tag handle cannot contain such characters");ut=!0,I=C.position+1}else U(C,"tag suffix cannot contain exclamation marks");Tt=C.input.charCodeAt(++C.position)}if(ct=C.input.slice(I,C.position),k.test(ct))U(C,"tag suffix cannot contain flow indicator characters")}if(ct&&!T.test(ct))U(C,"tag name cannot contain such characters: "+ct);try{ct=decodeURIComponent(ct)}catch(it){U(C,"tag name is malformed: "+ct)}if(et)C.tag=ct;else if(o.call(C.tagMap,gt))C.tag=C.tagMap[gt]+ct;else if(gt==="!")C.tag="!"+ct;else if(gt==="!!")C.tag="tag:yaml.org,2002:"+ct;else U(C,'undeclared tag handle "'+gt+'"');return!0}t(xi,"readTagProperty");function Pr(C){let et=C.input.charCodeAt(C.position);if(et!==38)return!1;if(C.anchor!==null)U(C,"duplication of an anchor property");et=C.input.charCodeAt(++C.position);let ut=C.position;while(et!==0&&!D(et)&&!P(et))et=C.input.charCodeAt(++C.position);if(C.position===ut)U(C,"name of an anchor node must contain at least one character");return C.anchor=C.input.slice(ut,C.position),!0}t(Pr,"readAnchorProperty");function Rr(C){let et=C.input.charCodeAt(C.position);if(et!==42)return!1;et=C.input.charCodeAt(++C.position);let ut=C.position;while(et!==0&&!D(et)&&!P(et))et=C.input.charCodeAt(++C.position);if(C.position===ut)U(C,"name of an alias node must contain at least one character");let gt=C.input.slice(ut,C.position);if(!o.call(C.anchorMap,gt))U(C,'unidentified alias "'+gt+'"');return C.result=C.anchorMap[gt],qt(C,!0,-1),!0}t(Rr,"readAlias");function Ci(C,et,ut,gt){let ct=Yt(C);if(Bt(C),Vt(C,et),C.tag=null,C.anchor=null,C.kind=null,C.result=null,Dr(C,ut,gt)&&C.kind==="mapping")return vt(C),!0;return Ht(C),Vt(C,ct),!1}t(Ci,"tryReadBlockMappingFromProperty");function Ie(C,et,ut,gt,ct){let Tt,I,it=1,bt=!1,dt=!1,ft=null,kt,yt,At;if(C.depth>=C.maxDepth)U(C,"nesting exceeded maxDepth ("+C.maxDepth+")");if(C.depth+=1,C.listener!==null)C.listener("open",C);C.tag=null,C.anchor=null,C.kind=null,C.result=null;let Ft=Tt=I=u===ut||n===ut;if(gt){if(qt(C,!0,-1)){if(bt=!0,C.lineIndent>et)it=1;else if(C.lineIndent===et)it=0;else if(C.lineIndent<et)it=-1}}if(it===1)while(!0){let Ot=C.input.charCodeAt(C.position),Rt=Yt(C);if(bt&&(Ot===33&&C.tag!==null||Ot===38&&C.anchor!==null))break;if(!xi(C)&&!Pr(C))break;if(ft===null)ft=Rt;if(qt(C,!0,-1)){if(bt=!0,I=Ft,C.lineIndent>et)it=1;else if(C.lineIndent===et)it=0;else if(C.lineIndent<et)it=-1}else I=!1}if(I)I=bt||ct;if(it===1||u===ut){if(a===ut||h===ut)yt=et;else yt=et+1;if(At=C.position-C.lineStart,it===1)if(I&&(Ne(C,At)||Dr(C,At,yt))||pi(C,yt))dt=!0;else{let Ot=C.input.charCodeAt(C.position);if(ft!==null&&Ft&&!I&&Ot!==124&&Ot!==62&&Ci(C,ft,ft.position-ft.lineStart,yt))dt=!0;else if(Tt&&yi(C,yt)||Or(C,yt)||We(C,yt))dt=!0;else if(Rr(C)){if(dt=!0,C.tag!==null||C.anchor!==null)U(C,"alias node should not have any properties")}else if(Qe(C,yt,a===ut)){if(dt=!0,C.tag===null)C.tag="?"}if(C.anchor!==null)st(C,C.anchor,C.result)}else if(it===0)dt=I&&Ne(C,At)}if(C.tag===null){if(C.anchor!==null)st(C,C.anchor,C.result)}else if(C.tag==="?"){if(C.result!==null&&C.kind!=="scalar")U(C,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+C.kind+'"');for(let Ot=0,Rt=C.implicitTypes.length;Ot<Rt;Ot+=1)if(kt=C.implicitTypes[Ot],kt.resolve(C.result)){if(C.result=kt.construct(C.result),C.tag=kt.tag,C.anchor!==null)st(C,C.anchor,C.result);break}}else if(C.tag!=="!"){if(o.call(C.typeMap[C.kind||"fallback"],C.tag))kt=C.typeMap[C.kind||"fallback"][C.tag];else{kt=null;let Ot=C.typeMap.multi[C.kind||"fallback"];for(let Rt=0,Zt=Ot.length;Rt<Zt;Rt+=1)if(C.tag.slice(0,Ot[Rt].tag.length)===Ot[Rt].tag){kt=Ot[Rt];break}}if(!kt)U(C,"unknown tag !<"+C.tag+">");if(C.result!==null&&kt.kind!==C.kind)U(C,"unacceptable node kind for !<"+C.tag+'> tag; it should be "'+kt.kind+'", not "'+C.kind+'"');if(!kt.resolve(C.result,C.tag))U(C,"cannot resolve a node with !<"+C.tag+"> explicit tag");else if(C.result=kt.construct(C.result,C.tag),C.anchor!==null)st(C,C.anchor,C.result)}if(C.listener!==null)C.listener("close",C);return C.depth-=1,C.tag!==null||C.anchor!==null||dt}t(Ie,"composeNode");function bi(C){let et=C.position,ut=!1,gt;C.version=null,C.checkLineBreaks=C.legacy,C.tagMap=Object.create(null),C.anchorMap=Object.create(null);while((gt=C.input.charCodeAt(C.position))!==0){if(qt(C,!0,-1),gt=C.input.charCodeAt(C.position),C.lineIndent>0||gt!==37)break;ut=!0,gt=C.input.charCodeAt(++C.position);let ct=C.position;while(gt!==0&&!D(gt))gt=C.input.charCodeAt(++C.position);let Tt=C.input.slice(ct,C.position),I=[];if(Tt.length<1)U(C,"directive name must not be less than one character in length");while(gt!==0){while(L(gt))gt=C.input.charCodeAt(++C.position);if(gt===35){do gt=C.input.charCodeAt(++C.position);while(gt!==0&&!_(gt));break}if(_(gt))break;ct=C.position;while(gt!==0&&!D(gt))gt=C.input.charCodeAt(++C.position);I.push(C.input.slice(ct,C.position))}if(gt!==0)jt(C);if(o.call(Kt,Tt))Kt[Tt](C,Tt,I);else at(C,'unknown document directive "'+Tt+'"')}if(qt(C,!0,-1),C.lineIndent===0&&C.input.charCodeAt(C.position)===45&&C.input.charCodeAt(C.position+1)===45&&C.input.charCodeAt(C.position+2)===45)C.position+=3,qt(C,!0,-1);else if(ut)U(C,"directives end mark is expected");if(Ie(C,C.lineIndent-1,u,!1,!0),qt(C,!0,-1),C.checkLineBreaks&&x.test(C.input.slice(et,C.position)))at(C,"non-ASCII line breaks are interpreted as content");if(C.documents.push(C.result),C.position===C.lineStart&&oe(C)){if(C.input.charCodeAt(C.position)===46)C.position+=3,qt(C,!0,-1);return}if(C.position<C.length-1)U(C,"end of the stream or a document separator is expected")}t(bi,"readDocument");function qr(C,et){if(C=String(C),et=et||{},C.length!==0){if(C.charCodeAt(C.length-1)!==10&&C.charCodeAt(C.length-1)!==13)C+=`
142
- `;if(C.charCodeAt(0)===65279)C=C.slice(1)}let ut=new X(C,et),gt=C.indexOf("\x00");if(gt!==-1)ut.position=gt,U(ut,"null byte is not allowed in input");ut.input+="\x00";while(ut.input.charCodeAt(ut.position)===32)ut.lineIndent+=1,ut.position+=1;while(ut.position<ut.length-1)bi(ut);return ut.documents}t(qr,"loadDocuments");function Wr(C,et,ut){if(et!==null&&typeof et==="object"&&typeof ut>"u")ut=et,et=null;let gt=qr(C,ut);if(typeof et!=="function")return gt;for(let ct=0,Tt=gt.length;ct<Tt;ct+=1)et(gt[ct])}t(Wr,"loadAll2");function ki(C,et){let ut=qr(C,et);if(ut.length===0)return;else if(ut.length===1)return ut[0];throw new e("expected a single document in the stream, but found more")}return t(ki,"load2"),Ts.loadAll=Wr,Ts.load=ki,Ts}t(Gd,"requireLoader");var Rl={},Yd;function Vd(){if(Yd)return Rl;Yd=1;let r=ei(),e=ri(),i=Bs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,h=9,n=10,u=13,d=32,c=33,f=34,p=35,x=37,k=38,S=39,T=42,B=44,_=45,L=58,D=61,P=62,K=63,Z=64,J=91,rt=93,ht=96,nt=123,ot=124,N=125,X={};X[0]="\\0",X[7]="\\a",X[8]="\\b",X[9]="\\t",X[10]="\\n",X[11]="\\v",X[12]="\\f",X[13]="\\r",X[27]="\\e",X[34]="\\\"",X[92]="\\\\",X[133]="\\N",X[160]="\\_",X[8232]="\\L",X[8233]="\\P";let tt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],U=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function at(I,it){if(it===null)return{};let bt={},dt=Object.keys(it);for(let ft=0,kt=dt.length;ft<kt;ft+=1){let yt=dt[ft],At=String(it[yt]);if(yt.slice(0,2)==="!!")yt="tag:yaml.org,2002:"+yt.slice(2);let Ft=I.compiledTypeMap.fallback[yt];if(Ft&&o.call(Ft.styleAliases,At))At=Ft.styleAliases[At];bt[yt]=At}return bt}t(at,"compileStyleMap");function st(I){let it,bt,dt=I.toString(16).toUpperCase();if(I<=255)it="x",bt=2;else if(I<=65535)it="u",bt=4;else if(I<=4294967295)it="U",bt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+it+r.repeat("0",bt-dt.length)+dt}t(st,"encodeHex");let Bt=1,vt=2;function Ht(I){this.schema=I.schema||i,this.indent=Math.max(1,I.indent||2),this.noArrayIndent=I.noArrayIndent||!1,this.skipInvalid=I.skipInvalid||!1,this.flowLevel=r.isNothing(I.flowLevel)?-1:I.flowLevel,this.styleMap=at(this.schema,I.styles||null),this.sortKeys=I.sortKeys||!1,this.lineWidth=I.lineWidth||80,this.noRefs=I.noRefs||!1,this.noCompatMode=I.noCompatMode||!1,this.condenseFlow=I.condenseFlow||!1,this.quotingType=I.quotingType==='"'?vt:Bt,this.forceQuotes=I.forceQuotes||!1,this.replacer=typeof I.replacer==="function"?I.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Ht,"State");function Yt(I,it){let bt=r.repeat(" ",it),dt=0,ft="",kt=I.length;while(dt<kt){let yt,At=I.indexOf(`
128
+ `+i.mark.snippet;return a+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),cl=e,cl}t(ei,"requireException");var yl,fd;function Xd(){if(fd)return yl;fd=1;let r=ti();function e(o,a,h,n,u){let d="",c="",f=Math.floor(u/2)-1;if(n-a>f)d=" ... ",a=n-f+d.length;if(h-n>f)c=" ...",h=n+f-c.length;return{str:d+o.slice(a,h).replace(/\t/g,"→")+c,pos:n-a+d.length}}t(e,"getLine");function i(o,a){return r.repeat(" ",a-o.length)+o}t(i,"padStart");function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;if(!a.maxLength)a.maxLength=79;if(typeof a.indent!=="number")a.indent=1;if(typeof a.linesBefore!=="number")a.linesBefore=3;if(typeof a.linesAfter!=="number")a.linesAfter=2;let h=/\r?\n|\r|\0/g,n=[0],u=[],d,c=-1;while(d=h.exec(o.buffer))if(u.push(d.index),n.push(d.index+d[0].length),o.position<=d.index&&c<0)c=n.length-2;if(c<0)c=n.length-1;let f="",p=Math.min(o.line+a.linesAfter,u.length).toString().length,x=a.maxLength-(a.indent+p+3);for(let T=1;T<=a.linesBefore;T++){if(c-T<0)break;let B=e(o.buffer,n[c-T],u[c-T],o.position-(n[c]-n[c-T]),x);f=r.repeat(" ",a.indent)+i((o.line-T+1).toString(),p)+" | "+B.str+`
129
+ `+f}let S=e(o.buffer,n[c],u[c],o.position,x);f+=r.repeat(" ",a.indent)+i((o.line+1).toString(),p)+" | "+S.str+`
130
+ `,f+=r.repeat("-",a.indent+p+3+S.pos)+`^
131
+ `;for(let T=1;T<=a.linesAfter;T++){if(c+T>=u.length)break;let B=e(o.buffer,n[c+T],u[c+T],o.position-(n[c]-n[c+T]),x);f+=r.repeat(" ",a.indent)+i((o.line+T+1).toString(),p)+" | "+B.str+`
132
+ `}return f.replace(/\n$/,"")}return t(s,"makeSnippet"),yl=s,yl}t(Xd,"requireSnippet");var xl,pd;function be(){if(pd)return xl;pd=1;let r=ei(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let h={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(u){h[String(u)]=n})});return h}t(s,"compileStyleAliases");function o(a,h){if(h=h||{},Object.keys(h).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=h,this.tag=a,this.kind=h.kind||null,this.resolve=h.resolve||function(){return!0},this.construct=h.construct||function(n){return n},this.instanceOf=h.instanceOf||null,this.predicate=h.predicate||null,this.represent=h.represent||null,this.representName=h.representName||null,this.defaultStyle=h.defaultStyle||null,this.multi=h.multi||!1,this.styleAliases=s(h.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),xl=o,xl}t(be,"requireType");var Cl,gd;function ql(){if(gd)return Cl;gd=1;let r=ei(),e=be();function i(a,h){let n=[];return a[h].forEach(function(u){let d=n.length;n.forEach(function(c,f){if(c.tag===u.tag&&c.kind===u.kind&&c.multi===u.multi)d=f}),n[d]=u}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function h(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(h,"collectType");for(let n=0,u=arguments.length;n<u;n+=1)arguments[n].forEach(h);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(h){let n=[],u=[];if(h instanceof e)u.push(h);else if(Array.isArray(h))u=u.concat(h);else if(h&&(Array.isArray(h.implicit)||Array.isArray(h.explicit))){if(h.implicit)n=n.concat(h.implicit);if(h.explicit)u=u.concat(h.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(c){if(!(c instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(c){if(!(c instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let d=Object.create(o.prototype);return d.implicit=(this.implicit||[]).concat(n),d.explicit=(this.explicit||[]).concat(u),d.compiledImplicit=i(d,"implicit"),d.compiledExplicit=i(d,"explicit"),d.compiledTypeMap=s(d.compiledImplicit,d.compiledExplicit),d},"extend"),Cl=o,Cl}t(ql,"requireSchema");var bl,md;function Wl(){if(md)return bl;return md=1,bl=new(be())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),bl}t(Wl,"requireStr");var kl,bd;function Nl(){if(bd)return kl;return bd=1,kl=new(be())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),kl}t(Nl,"requireSeq");var wl,Sd;function zl(){if(Sd)return wl;return Sd=1,wl=new(be())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),wl}t(zl,"requireMap");var Sl,Td;function Hl(){if(Td)return Sl;return Td=1,Sl=new(ql())({explicit:[Wl(),Nl(),zl()]}),Sl}t(Hl,"requireFailsafe");var Tl,Ld;function Yl(){if(Ld)return Tl;Ld=1;let r=be();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Tl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Tl}t(Yl,"require_null");var Bl,Fd;function jl(){if(Fd)return Bl;Fd=1;let r=be();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),Bl=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Bl}t(jl,"requireBool");var _l,Md;function Ul(){if(Md)return _l;Md=1;let r=ti(),e=be();function i(d){return d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102}t(i,"isHexCode");function s(d){return d>=48&&d<=55}t(s,"isOctCode");function o(d){return d>=48&&d<=57}t(o,"isDecCode");function a(d){if(d===null)return!1;let c=d.length,f=0,p=!1;if(!c)return!1;let x=d[f];if(x==="-"||x==="+")x=d[++f];if(x==="0"){if(f+1===c)return!0;if(x=d[++f],x==="b"){f++;for(;f<c;f++){if(x=d[f],x!=="0"&&x!=="1")return!1;p=!0}return p&&isFinite(h(d))}if(x==="x"){f++;for(;f<c;f++){if(!i(d.charCodeAt(f)))return!1;p=!0}return p&&isFinite(h(d))}if(x==="o"){f++;for(;f<c;f++){if(!s(d.charCodeAt(f)))return!1;p=!0}return p&&isFinite(h(d))}}for(;f<c;f++){if(!o(d.charCodeAt(f)))return!1;p=!0}if(!p)return!1;return isFinite(h(d))}t(a,"resolveYamlInteger");function h(d){let c=d,f=1,p=c[0];if(p==="-"||p==="+"){if(p==="-")f=-1;c=c.slice(1),p=c[0]}if(c==="0")return 0;if(p==="0"){if(c[1]==="b")return f*parseInt(c.slice(2),2);if(c[1]==="x")return f*parseInt(c.slice(2),16);if(c[1]==="o")return f*parseInt(c.slice(2),8)}return f*parseInt(c,10)}t(h,"parseYamlInteger");function n(d){return h(d)}t(n,"constructYamlInteger");function u(d){return Object.prototype.toString.call(d)==="[object Number]"&&(d%1===0&&!r.isNegativeZero(d))}return t(u,"isInteger"),_l=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:u,represent:{binary:t(function(d){return d>=0?"0b"+d.toString(2):"-0b"+d.toString(2).slice(1)},"binary"),octal:t(function(d){return d>=0?"0o"+d.toString(8):"-0o"+d.toString(8).slice(1)},"octal"),decimal:t(function(d){return d.toString(10)},"decimal"),hexadecimal:t(function(d){return d>=0?"0x"+d.toString(16).toUpperCase():"-0x"+d.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_l}t(Ul,"requireInt");var vl,Ad;function Xl(){if(Ad)return vl;Ad=1;let r=ti(),e=be(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(d){if(d===null)return!1;if(!i.test(d))return!1;if(isFinite(parseFloat(d,10)))return!0;return s.test(d)}t(o,"resolveYamlFloat");function a(d){let c=d.toLowerCase(),f=c[0]==="-"?-1:1;if("+-".indexOf(c[0])>=0)c=c.slice(1);if(c===".inf")return f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(c===".nan")return NaN;return f*parseFloat(c,10)}t(a,"constructYamlFloat");let h=/^[-+]?[0-9]+e/;function n(d,c){if(isNaN(d))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===d)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===d)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(d))return"-0.0";let f=d.toString(10);return h.test(f)?f.replace("e",".e"):f}t(n,"representYamlFloat");function u(d){return Object.prototype.toString.call(d)==="[object Number]"&&(d%1!==0||r.isNegativeZero(d))}return t(u,"isFloat"),vl=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:u,represent:n,defaultStyle:"lowercase"}),vl}t(Xl,"requireFloat");var Ll,$d;function Gl(){if($d)return Ll;return $d=1,Ll=Hl().extend({implicit:[Yl(),jl(),Ul(),Xl()]}),Ll}t(Gl,"requireJson");var Fl,Od;function Vl(){if(Od)return Fl;return Od=1,Fl=Gl(),Fl}t(Vl,"requireCore");var Ml,Dd;function Kl(){if(Dd)return Ml;Dd=1;let r=be(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function s(h){if(h===null)return!1;if(e.exec(h)!==null)return!0;if(i.exec(h)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(h){let n=0,u=null,d=e.exec(h);if(d===null)d=i.exec(h);if(d===null)throw Error("Date resolve error");let c=+d[1],f=+d[2]-1,p=+d[3];if(!d[4])return new Date(Date.UTC(c,f,p));let x=+d[4],S=+d[5],T=+d[6];if(d[7]){n=d[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(d[9]){let _=+d[10],v=+(d[11]||0);if(u=(_*60+v)*60000,d[9]==="-")u=-u}let B=new Date(Date.UTC(c,f,p,x,S,T,n));if(u)B.setTime(B.getTime()-u);return B}t(o,"constructYamlTimestamp");function a(h){return h.toISOString()}return t(a,"representYamlTimestamp"),Ml=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Ml}t(Kl,"requireTimestamp");var El,Pd;function Zl(){if(Pd)return El;Pd=1;let r=be();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),El=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),El}t(Zl,"requireMerge");var $l,Rd;function Ql(){if(Rd)return $l;Rd=1;let r=be(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
+ \r`;function i(h){if(h===null)return!1;let n=0,u=h.length,d=e;for(let c=0;c<u;c++){let f=d.indexOf(h.charAt(c));if(f>64)continue;if(f<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(h){let n=h.replace(/[\r\n=]/g,""),u=n.length,d=e,c=0,f=[];for(let x=0;x<u;x++){if(x%4===0&&x)f.push(c>>16&255),f.push(c>>8&255),f.push(c&255);c=c<<6|d.indexOf(n.charAt(x))}let p=u%4*6;if(p===0)f.push(c>>16&255),f.push(c>>8&255),f.push(c&255);else if(p===18)f.push(c>>10&255),f.push(c>>2&255);else if(p===12)f.push(c>>4&255);return new Uint8Array(f)}t(s,"constructYamlBinary");function o(h){let n="",u=0,d=h.length,c=e;for(let p=0;p<d;p++){if(p%3===0&&p)n+=c[u>>18&63],n+=c[u>>12&63],n+=c[u>>6&63],n+=c[u&63];u=(u<<8)+h[p]}let f=d%3;if(f===0)n+=c[u>>18&63],n+=c[u>>12&63],n+=c[u>>6&63],n+=c[u&63];else if(f===2)n+=c[u>>10&63],n+=c[u>>4&63],n+=c[u<<2&63],n+=c[64];else if(f===1)n+=c[u>>2&63],n+=c[u<<4&63],n+=c[64],n+=c[64];return n}t(o,"representYamlBinary");function a(h){return Object.prototype.toString.call(h)==="[object Uint8Array]"}return t(a,"isBinary"),$l=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),$l}t(Ql,"requireBinary");var Il,qd;function Jl(){if(qd)return Il;qd=1;let r=be(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let h=[],n=a;for(let u=0,d=n.length;u<d;u+=1){let c=n[u],f=!1;if(i.call(c)!=="[object Object]")return!1;let p;for(p in c)if(e.call(c,p))if(!f)f=!0;else return!1;if(!f)return!1;if(h.indexOf(p)===-1)h.push(p);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Il=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Il}t(Jl,"requireOmap");var Ol,Wd;function th(){if(Wd)return Ol;Wd=1;let r=be(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,h=Array(a.length);for(let n=0,u=a.length;n<u;n+=1){let d=a[n];if(e.call(d)!=="[object Object]")return!1;let c=Object.keys(d);if(c.length!==1)return!1;h[n]=[c[0],d[c[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,h=Array(a.length);for(let n=0,u=a.length;n<u;n+=1){let d=a[n],c=Object.keys(d);h[n]=[c[0],d[c[0]]]}return h}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(th,"requirePairs");var Dl,Nd;function eh(){if(Nd)return Dl;Nd=1;let r=be(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let h in a)if(e.call(a,h)){if(a[h]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Dl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Dl}t(eh,"requireSet");var Pl,zd;function Ts(){if(zd)return Pl;return zd=1,Pl=Vl().extend({implicit:[Kl(),Zl()],explicit:[Ql(),Jl(),th(),eh()]}),Pl}t(Ts,"require_default");var Hd;function Gd(){if(Hd)return Ss;Hd=1;let r=ti(),e=ei(),i=Xd(),s=Ts(),o=Object.prototype.hasOwnProperty,a=1,h=2,n=3,u=4,d=1,c=2,f=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,x=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(k){return Object.prototype.toString.call(k)}t(_,"_class");function v(k){return k===10||k===13}t(v,"isEol");function E(k){return k===9||k===32}t(E,"isWhiteSpace");function O(k){return k===9||k===32||k===10||k===13}t(O,"isWsOrEol");function D(k){return k===44||k===91||k===93||k===123||k===125}t(D,"isFlowIndicator");function G(k){if(k>=48&&k<=57)return k-48;let et=k|32;if(et>=97&&et<=102)return et-97+10;return-1}t(G,"fromHexCode");function Z(k){if(k===120)return 2;if(k===117)return 4;if(k===85)return 8;return 0}t(Z,"escapedHexLen");function J(k){if(k>=48&&k<=57)return k-48;return-1}t(J,"fromDecimalCode");function rt(k){switch(k){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
134
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(rt,"simpleEscapeSequence");function ht(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ht,"charFromCodepoint");function nt(k,et,ut){if(et==="__proto__")Object.defineProperty(k,et,{configurable:!0,enumerable:!0,writable:!0,value:ut});else k[et]=ut}t(nt,"setProperty");let ot=Array(256),P=Array(256);for(let k=0;k<256;k++)ot[k]=rt(k)?1:0,P[k]=rt(k);function X(k,et){this.input=k,this.filename=et.filename||null,this.schema=et.schema||s,this.onWarning=et.onWarning||null,this.legacy=et.legacy||!1,this.json=et.json||!1,this.listener=et.listener||null,this.maxDepth=typeof et.maxDepth==="number"?et.maxDepth:100,this.maxTotalMergeKeys=typeof et.maxTotalMergeKeys==="number"?et.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=k.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(X,"State");function tt(k,et){let ut={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return ut.snippet=i(ut),new e(et,ut)}t(tt,"generateError");function N(k,et){throw tt(k,et)}t(N,"throwError");function at(k,et){if(k.onWarning)k.onWarning.call(null,tt(k,et))}t(at,"throwWarning");function st(k,et,ut){let gt=k.anchorMapTransactions;if(gt.length!==0){let ct=gt[gt.length-1];if(!o.call(ct,et))ct[et]={existed:o.call(k.anchorMap,et),value:k.anchorMap[et]}}k.anchorMap[et]=ut}t(st,"storeAnchor");function Bt(k){k.anchorMapTransactions.push(Object.create(null))}t(Bt,"beginAnchorTransaction");function vt(k){let et=k.anchorMapTransactions.pop(),ut=k.anchorMapTransactions;if(ut.length===0)return;let gt=ut[ut.length-1],ct=Object.keys(et);for(let Tt=0,I=ct.length;Tt<I;Tt+=1){let it=ct[Tt];if(!o.call(gt,it))gt[it]=et[it]}}t(vt,"commitAnchorTransaction");function Wt(k){let et=k.anchorMapTransactions.pop(),ut=Object.keys(et);for(let gt=ut.length-1;gt>=0;gt-=1){let ct=et[ut[gt]];if(ct.existed)k.anchorMap[ut[gt]]=ct.value;else delete k.anchorMap[ut[gt]]}}t(Wt,"rollbackAnchorTransaction");function Nt(k){return{position:k.position,line:k.line,lineStart:k.lineStart,lineIndent:k.lineIndent,firstTabInLine:k.firstTabInLine,tag:k.tag,anchor:k.anchor,kind:k.kind,result:k.result}}t(Nt,"snapshotState");function jt(k,et){k.position=et.position,k.line=et.line,k.lineStart=et.lineStart,k.lineIndent=et.lineIndent,k.firstTabInLine=et.firstTabInLine,k.tag=et.tag,k.anchor=et.anchor,k.kind=et.kind,k.result=et.result}t(jt,"restoreState");let Xt={YAML:t(function(et,ut,gt){if(et.version!==null)N(et,"duplication of %YAML directive");if(gt.length!==1)N(et,"YAML directive accepts exactly one argument");let ct=/^([0-9]+)\.([0-9]+)$/.exec(gt[0]);if(ct===null)N(et,"ill-formed argument of the YAML directive");let Tt=parseInt(ct[1],10),I=parseInt(ct[2],10);if(Tt!==1)N(et,"unacceptable YAML version of the document");if(et.version=gt[0],et.checkLineBreaks=I<2,I!==1&&I!==2)at(et,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(et,ut,gt){let ct;if(gt.length!==2)N(et,"TAG directive accepts exactly two arguments");let Tt=gt[0];if(ct=gt[1],!T.test(Tt))N(et,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(et.tagMap,Tt))N(et,'there is a previously declared suffix for "'+Tt+'" tag handle');if(!B.test(ct))N(et,"ill-formed tag prefix (second argument) of the TAG directive");try{ct=decodeURIComponent(ct)}catch(I){N(et,"tag prefix is malformed: "+ct)}et.tagMap[Tt]=ct},"handleTagDirective")};function $t(k,et,ut,gt){if(et<ut){let ct=k.input.slice(et,ut);if(gt)for(let Tt=0,I=ct.length;Tt<I;Tt+=1){let it=ct.charCodeAt(Tt);if(!(it===9||it>=32&&it<=1114111))N(k,"expected valid JSON character")}else if(p.test(ct))N(k,"the stream contains non-printable characters");k.result+=ct}}t($t,"captureSegment");function Mt(k,et,ut,gt){if(!r.isObject(ut))N(k,"cannot merge mappings; the provided source object is unacceptable");let ct=Object.keys(ut);for(let Tt=0,I=ct.length;Tt<I;Tt+=1){let it=ct[Tt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)N(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(et,it))nt(et,it,ut[it]),gt[it]=!0}}t(Mt,"mergeMappings");function Dt(k,et,ut,gt,ct,Tt,I,it,bt){if(Array.isArray(ct)){ct=Array.prototype.slice.call(ct);for(let dt=0,pt=ct.length;dt<pt;dt+=1){if(Array.isArray(ct[dt]))N(k,"nested arrays are not supported inside keys");if(typeof ct==="object"&&_(ct[dt])==="[object Object]")ct[dt]="[object Object]"}}if(typeof ct==="object"&&_(ct)==="[object Object]")ct="[object Object]";if(ct=String(ct),et===null)et={};if(gt==="tag:yaml.org,2002:merge")if(Array.isArray(Tt))for(let dt=0,pt=Tt.length;dt<pt;dt+=1)Mt(k,et,Tt[dt],ut);else Mt(k,et,Tt,ut);else{if(!k.json&&!o.call(ut,ct)&&o.call(et,ct))k.line=I||k.line,k.lineStart=it||k.lineStart,k.position=bt||k.position,N(k,"duplicated mapping key");nt(et,ct,Tt),delete ut[ct]}return et}t(Dt,"storeMappingPair");function Ht(k){let et=k.input.charCodeAt(k.position);if(et===10)k.position++;else if(et===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else N(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Ht,"readLineBreak");function Rt(k,et,ut){let gt=0,ct=k.input.charCodeAt(k.position);while(ct!==0){while(E(ct)){if(ct===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;ct=k.input.charCodeAt(++k.position)}if(et&&ct===35)do ct=k.input.charCodeAt(++k.position);while(ct!==10&&ct!==13&&ct!==0);if(v(ct)){Ht(k),ct=k.input.charCodeAt(k.position),gt++,k.lineIndent=0;while(ct===32)k.lineIndent++,ct=k.input.charCodeAt(++k.position)}else break}if(ut!==-1&&gt!==0&&k.lineIndent<ut)at(k,"deficient indentation");return gt}t(Rt,"skipSeparationSpace");function ie(k){let et=k.position,ut=k.input.charCodeAt(et);if((ut===45||ut===46)&&ut===k.input.charCodeAt(et+1)&&ut===k.input.charCodeAt(et+2)){if(et+=3,ut=k.input.charCodeAt(et),ut===0||O(ut))return!0}return!1}t(ie,"testDocumentSeparator");function re(k,et){if(et===1)k.result+=" ";else if(et>1)k.result+=r.repeat(`
135
+ `,et-1)}t(re,"writeFoldedLines");function Ze(k,et,ut){let gt,ct,Tt,I,it,bt,{kind:dt,result:pt}=k,kt=k.input.charCodeAt(k.position);if(O(kt)||D(kt)||kt===35||kt===38||kt===42||kt===33||kt===124||kt===62||kt===39||kt===34||kt===37||kt===64||kt===96)return!1;if(kt===63||kt===45){let yt=k.input.charCodeAt(k.position+1);if(O(yt)||ut&&D(yt))return!1}k.kind="scalar",k.result="",gt=ct=k.position,Tt=!1;while(kt!==0){if(kt===58){let yt=k.input.charCodeAt(k.position+1);if(O(yt)||ut&&D(yt))break}else if(kt===35){let yt=k.input.charCodeAt(k.position-1);if(O(yt))break}else if(k.position===k.lineStart&&ie(k)||ut&&D(kt))break;else if(v(kt))if(I=k.line,it=k.lineStart,bt=k.lineIndent,Rt(k,!1,-1),k.lineIndent>=et){Tt=!0,kt=k.input.charCodeAt(k.position);continue}else{k.position=ct,k.line=I,k.lineStart=it,k.lineIndent=bt;break}if(Tt)$t(k,gt,ct,!1),re(k,k.line-I),gt=ct=k.position,Tt=!1;if(!E(kt))ct=k.position+1;kt=k.input.charCodeAt(++k.position)}if($t(k,gt,ct,!1),k.result)return!0;return k.kind=dt,k.result=pt,!1}t(Ze,"readPlainScalar");function Ir(k,et){let ut,gt,ct=k.input.charCodeAt(k.position);if(ct!==39)return!1;k.kind="scalar",k.result="",k.position++,ut=gt=k.position;while((ct=k.input.charCodeAt(k.position))!==0)if(ct===39)if($t(k,ut,k.position,!0),ct=k.input.charCodeAt(++k.position),ct===39)ut=k.position,k.position++,gt=k.position;else return!0;else if(v(ct))$t(k,ut,gt,!0),re(k,Rt(k,!1,et)),ut=gt=k.position;else if(k.position===k.lineStart&&ie(k))N(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!E(ct))gt=k.position;N(k,"unexpected end of the stream within a single quoted scalar")}t(Ir,"readSingleQuotedScalar");function qe(k,et){let ut,gt,ct,Tt=k.input.charCodeAt(k.position);if(Tt!==34)return!1;k.kind="scalar",k.result="",k.position++,ut=gt=k.position;while((Tt=k.input.charCodeAt(k.position))!==0)if(Tt===34)return $t(k,ut,k.position,!0),k.position++,!0;else if(Tt===92){if($t(k,ut,k.position,!0),Tt=k.input.charCodeAt(++k.position),v(Tt))Rt(k,!1,et);else if(Tt<256&&ot[Tt])k.result+=P[Tt],k.position++;else if((ct=Z(Tt))>0){let I=ct,it=0;for(;I>0;I--)if(Tt=k.input.charCodeAt(++k.position),(ct=G(Tt))>=0)it=(it<<4)+ct;else N(k,"expected hexadecimal character");k.result+=ht(it),k.position++}else N(k,"unknown escape sequence");ut=gt=k.position}else if(v(Tt))$t(k,ut,gt,!0),re(k,Rt(k,!1,et)),ut=gt=k.position;else if(k.position===k.lineStart&&ie(k))N(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!E(Tt))gt=k.position;N(k,"unexpected end of the stream within a double quoted scalar")}t(qe,"readDoubleQuotedScalar");function fi(k,et){let ut=!0,gt,ct,Tt,I=k.tag,it,bt=k.anchor,dt,pt,kt,yt,At=Object.create(null),Ft,It,Pt,Vt=k.input.charCodeAt(k.position);if(Vt===91)dt=93,yt=!1,it=[];else if(Vt===123)dt=125,yt=!0,it={};else return!1;if(k.anchor!==null)st(k,k.anchor,it);Vt=k.input.charCodeAt(++k.position);while(Vt!==0){if(Rt(k,!0,et),Vt=k.input.charCodeAt(k.position),Vt===dt)return k.position++,k.tag=I,k.anchor=bt,k.kind=yt?"mapping":"sequence",k.result=it,!0;else if(!ut)N(k,"missed comma between flow collection entries");else if(Vt===44)N(k,"expected the node content, but found ','");if(It=Ft=Pt=null,pt=kt=!1,Vt===63){let oe=k.input.charCodeAt(k.position+1);if(O(oe))pt=kt=!0,k.position++,Rt(k,!0,et)}if(gt=k.line,ct=k.lineStart,Tt=k.position,Ee(k,et,a,!1,!0),It=k.tag,Ft=k.result,Rt(k,!0,et),Vt=k.input.charCodeAt(k.position),(kt||k.line===gt)&&Vt===58)pt=!0,Vt=k.input.charCodeAt(++k.position),Rt(k,!0,et),Ee(k,et,a,!1,!0),Pt=k.result;if(yt)Dt(k,it,At,It,Ft,Pt,gt,ct,Tt);else if(pt)it.push(Dt(k,null,At,It,Ft,Pt,gt,ct,Tt));else it.push(Ft);if(Rt(k,!0,et),Vt=k.input.charCodeAt(k.position),Vt===44)ut=!0,Vt=k.input.charCodeAt(++k.position);else ut=!1}N(k,"unexpected end of the stream within a flow collection")}t(fi,"readFlowCollection");function pi(k,et){let ut,gt=d,ct=!1,Tt=!1,I=et,it=0,bt=!1,dt,pt=k.input.charCodeAt(k.position);if(pt===124)ut=!1;else if(pt===62)ut=!0;else return!1;k.kind="scalar",k.result="";while(pt!==0)if(pt=k.input.charCodeAt(++k.position),pt===43||pt===45)if(d===gt)gt=pt===43?f:c;else N(k,"repeat of a chomping mode identifier");else if((dt=J(pt))>=0)if(dt===0)N(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Tt)I=et+dt-1,Tt=!0;else N(k,"repeat of an indentation width identifier");else break;if(E(pt)){do pt=k.input.charCodeAt(++k.position);while(E(pt));if(pt===35)do pt=k.input.charCodeAt(++k.position);while(!v(pt)&&pt!==0)}while(pt!==0){Ht(k),k.lineIndent=0,pt=k.input.charCodeAt(k.position);while((!Tt||k.lineIndent<I)&&pt===32)k.lineIndent++,pt=k.input.charCodeAt(++k.position);if(!Tt&&k.lineIndent>I)I=k.lineIndent;if(v(pt)){it++;continue}if(!Tt&&I===0)N(k,"missing indentation for block scalar");if(k.lineIndent<I){if(gt===f)k.result+=r.repeat(`
136
+ `,ct?1+it:it);else if(gt===d){if(ct)k.result+=`
137
+ `}break}if(ut)if(E(pt))bt=!0,k.result+=r.repeat(`
138
+ `,ct?1+it:it);else if(bt)bt=!1,k.result+=r.repeat(`
139
+ `,it+1);else if(it===0){if(ct)k.result+=" "}else k.result+=r.repeat(`
140
+ `,it);else k.result+=r.repeat(`
141
+ `,ct?1+it:it);ct=!0,Tt=!0,it=0;let kt=k.position;while(!v(pt)&&pt!==0)pt=k.input.charCodeAt(++k.position);$t(k,kt,k.position,!1)}return!0}t(pi,"readBlockScalar");function We(k,et){let{tag:ut,anchor:gt}=k,ct=[],Tt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)st(k,k.anchor,ct);let I=k.input.charCodeAt(k.position);while(I!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,N(k,"tab characters must not be used in indentation");if(I!==45)break;let it=k.input.charCodeAt(k.position+1);if(!O(it))break;if(Tt=!0,k.position++,Rt(k,!0,-1)){if(k.lineIndent<=et){ct.push(null),I=k.input.charCodeAt(k.position);continue}}let bt=k.line;if(Ee(k,et,n,!1,!0),ct.push(k.result),Rt(k,!0,-1),I=k.input.charCodeAt(k.position),(k.line===bt||k.lineIndent>et)&&I!==0)N(k,"bad indentation of a sequence entry");else if(k.lineIndent<et)break}if(Tt)return k.tag=ut,k.anchor=gt,k.kind="sequence",k.result=ct,!0;return!1}t(We,"readBlockSequence");function Or(k,et,ut){let gt,ct,Tt,I,{tag:it,anchor:bt}=k,dt={},pt=Object.create(null),kt=null,yt=null,At=null,Ft=!1,It=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)st(k,k.anchor,dt);let Pt=k.input.charCodeAt(k.position);while(Pt!==0){if(!Ft&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,N(k,"tab characters must not be used in indentation");let Vt=k.input.charCodeAt(k.position+1),oe=k.line;if((Pt===63||Pt===58)&&O(Vt)){if(Pt===63){if(Ft)Dt(k,dt,pt,kt,yt,null,ct,Tt,I),kt=yt=At=null;It=!0,Ft=!0,gt=!0}else if(Ft)Ft=!1,gt=!0;else N(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,Pt=Vt}else{if(ct=k.line,Tt=k.lineStart,I=k.position,!Ee(k,ut,h,!1,!0))break;if(k.line===oe){Pt=k.input.charCodeAt(k.position);while(E(Pt))Pt=k.input.charCodeAt(++k.position);if(Pt===58){if(Pt=k.input.charCodeAt(++k.position),!O(Pt))N(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Ft)Dt(k,dt,pt,kt,yt,null,ct,Tt,I),kt=yt=At=null;It=!0,Ft=!1,gt=!1,kt=k.tag,yt=k.result}else if(It)N(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=it,k.anchor=bt,!0}else if(It)N(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=it,k.anchor=bt,!0}if(k.line===oe||k.lineIndent>et){if(Ft)ct=k.line,Tt=k.lineStart,I=k.position;if(Ee(k,et,u,!0,gt))if(Ft)yt=k.result;else At=k.result;if(!Ft)Dt(k,dt,pt,kt,yt,At,ct,Tt,I),kt=yt=At=null;Rt(k,!0,-1),Pt=k.input.charCodeAt(k.position)}if((k.line===oe||k.lineIndent>et)&&Pt!==0)N(k,"bad indentation of a mapping entry");else if(k.lineIndent<et)break}if(Ft)Dt(k,dt,pt,kt,yt,null,ct,Tt,I);if(It)k.tag=it,k.anchor=bt,k.kind="mapping",k.result=dt;return It}t(Or,"readBlockMapping");function gi(k){let et=!1,ut=!1,gt,ct,Tt=k.input.charCodeAt(k.position);if(Tt!==33)return!1;if(k.tag!==null)N(k,"duplication of a tag property");if(Tt=k.input.charCodeAt(++k.position),Tt===60)et=!0,Tt=k.input.charCodeAt(++k.position);else if(Tt===33)ut=!0,gt="!!",Tt=k.input.charCodeAt(++k.position);else gt="!";let I=k.position;if(et){do Tt=k.input.charCodeAt(++k.position);while(Tt!==0&&Tt!==62);if(k.position<k.length)ct=k.input.slice(I,k.position),Tt=k.input.charCodeAt(++k.position);else N(k,"unexpected end of the stream within a verbatim tag")}else{while(Tt!==0&&!O(Tt)){if(Tt===33)if(!ut){if(gt=k.input.slice(I-1,k.position+1),!T.test(gt))N(k,"named tag handle cannot contain such characters");ut=!0,I=k.position+1}else N(k,"tag suffix cannot contain exclamation marks");Tt=k.input.charCodeAt(++k.position)}if(ct=k.input.slice(I,k.position),S.test(ct))N(k,"tag suffix cannot contain flow indicator characters")}if(ct&&!B.test(ct))N(k,"tag name cannot contain such characters: "+ct);try{ct=decodeURIComponent(ct)}catch(it){N(k,"tag name is malformed: "+ct)}if(et)k.tag=ct;else if(o.call(k.tagMap,gt))k.tag=k.tagMap[gt]+ct;else if(gt==="!")k.tag="!"+ct;else if(gt==="!!")k.tag="tag:yaml.org,2002:"+ct;else N(k,'undeclared tag handle "'+gt+'"');return!0}t(gi,"readTagProperty");function Dr(k){let et=k.input.charCodeAt(k.position);if(et!==38)return!1;if(k.anchor!==null)N(k,"duplication of an anchor property");et=k.input.charCodeAt(++k.position);let ut=k.position;while(et!==0&&!O(et)&&!D(et))et=k.input.charCodeAt(++k.position);if(k.position===ut)N(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(ut,k.position),!0}t(Dr,"readAnchorProperty");function Pr(k){let et=k.input.charCodeAt(k.position);if(et!==42)return!1;et=k.input.charCodeAt(++k.position);let ut=k.position;while(et!==0&&!O(et)&&!D(et))et=k.input.charCodeAt(++k.position);if(k.position===ut)N(k,"name of an alias node must contain at least one character");let gt=k.input.slice(ut,k.position);if(!o.call(k.anchorMap,gt))N(k,'unidentified alias "'+gt+'"');return k.result=k.anchorMap[gt],Rt(k,!0,-1),!0}t(Pr,"readAlias");function mi(k,et,ut,gt){let ct=Nt(k);if(Bt(k),jt(k,et),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Or(k,ut,gt)&&k.kind==="mapping")return vt(k),!0;return Wt(k),jt(k,ct),!1}t(mi,"tryReadBlockMappingFromProperty");function Ee(k,et,ut,gt,ct){let Tt,I,it=1,bt=!1,dt=!1,pt=null,kt,yt,At;if(k.depth>=k.maxDepth)N(k,"nesting exceeded maxDepth ("+k.maxDepth+")");if(k.depth+=1,k.listener!==null)k.listener("open",k);k.tag=null,k.anchor=null,k.kind=null,k.result=null;let Ft=Tt=I=u===ut||n===ut;if(gt){if(Rt(k,!0,-1)){if(bt=!0,k.lineIndent>et)it=1;else if(k.lineIndent===et)it=0;else if(k.lineIndent<et)it=-1}}if(it===1)while(!0){let It=k.input.charCodeAt(k.position),Pt=Nt(k);if(bt&&(It===33&&k.tag!==null||It===38&&k.anchor!==null))break;if(!gi(k)&&!Dr(k))break;if(pt===null)pt=Pt;if(Rt(k,!0,-1)){if(bt=!0,I=Ft,k.lineIndent>et)it=1;else if(k.lineIndent===et)it=0;else if(k.lineIndent<et)it=-1}else I=!1}if(I)I=bt||ct;if(it===1||u===ut){if(a===ut||h===ut)yt=et;else yt=et+1;if(At=k.position-k.lineStart,it===1)if(I&&(We(k,At)||Or(k,At,yt))||fi(k,yt))dt=!0;else{let It=k.input.charCodeAt(k.position);if(pt!==null&&Ft&&!I&&It!==124&&It!==62&&mi(k,pt,pt.position-pt.lineStart,yt))dt=!0;else if(Tt&&pi(k,yt)||Ir(k,yt)||qe(k,yt))dt=!0;else if(Pr(k)){if(dt=!0,k.tag!==null||k.anchor!==null)N(k,"alias node should not have any properties")}else if(Ze(k,yt,a===ut)){if(dt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)st(k,k.anchor,k.result)}else if(it===0)dt=I&&We(k,At)}if(k.tag===null){if(k.anchor!==null)st(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")N(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let It=0,Pt=k.implicitTypes.length;It<Pt;It+=1)if(kt=k.implicitTypes[It],kt.resolve(k.result)){if(k.result=kt.construct(k.result),k.tag=kt.tag,k.anchor!==null)st(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))kt=k.typeMap[k.kind||"fallback"][k.tag];else{kt=null;let It=k.typeMap.multi[k.kind||"fallback"];for(let Pt=0,Vt=It.length;Pt<Vt;Pt+=1)if(k.tag.slice(0,It[Pt].tag.length)===It[Pt].tag){kt=It[Pt];break}}if(!kt)N(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&kt.kind!==k.kind)N(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+kt.kind+'", not "'+k.kind+'"');if(!kt.resolve(k.result,k.tag))N(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=kt.construct(k.result,k.tag),k.anchor!==null)st(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||dt}t(Ee,"composeNode");function xi(k){let et=k.position,ut=!1,gt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((gt=k.input.charCodeAt(k.position))!==0){if(Rt(k,!0,-1),gt=k.input.charCodeAt(k.position),k.lineIndent>0||gt!==37)break;ut=!0,gt=k.input.charCodeAt(++k.position);let ct=k.position;while(gt!==0&&!O(gt))gt=k.input.charCodeAt(++k.position);let Tt=k.input.slice(ct,k.position),I=[];if(Tt.length<1)N(k,"directive name must not be less than one character in length");while(gt!==0){while(E(gt))gt=k.input.charCodeAt(++k.position);if(gt===35){do gt=k.input.charCodeAt(++k.position);while(gt!==0&&!v(gt));break}if(v(gt))break;ct=k.position;while(gt!==0&&!O(gt))gt=k.input.charCodeAt(++k.position);I.push(k.input.slice(ct,k.position))}if(gt!==0)Ht(k);if(o.call(Xt,Tt))Xt[Tt](k,Tt,I);else at(k,'unknown document directive "'+Tt+'"')}if(Rt(k,!0,-1),k.lineIndent===0&&k.input.charCodeAt(k.position)===45&&k.input.charCodeAt(k.position+1)===45&&k.input.charCodeAt(k.position+2)===45)k.position+=3,Rt(k,!0,-1);else if(ut)N(k,"directives end mark is expected");if(Ee(k,k.lineIndent-1,u,!1,!0),Rt(k,!0,-1),k.checkLineBreaks&&x.test(k.input.slice(et,k.position)))at(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&ie(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,Rt(k,!0,-1);return}if(k.position<k.length-1)N(k,"end of the stream or a document separator is expected")}t(xi,"readDocument");function Rr(k,et){if(k=String(k),et=et||{},k.length!==0){if(k.charCodeAt(k.length-1)!==10&&k.charCodeAt(k.length-1)!==13)k+=`
142
+ `;if(k.charCodeAt(0)===65279)k=k.slice(1)}let ut=new X(k,et),gt=k.indexOf("\x00");if(gt!==-1)ut.position=gt,N(ut,"null byte is not allowed in input");ut.input+="\x00";while(ut.input.charCodeAt(ut.position)===32)ut.lineIndent+=1,ut.position+=1;while(ut.position<ut.length-1)xi(ut);return ut.documents}t(Rr,"loadDocuments");function qr(k,et,ut){if(et!==null&&typeof et==="object"&&typeof ut>"u")ut=et,et=null;let gt=Rr(k,ut);if(typeof et!=="function")return gt;for(let ct=0,Tt=gt.length;ct<Tt;ct+=1)et(gt[ct])}t(qr,"loadAll2");function Ci(k,et){let ut=Rr(k,et);if(ut.length===0)return;else if(ut.length===1)return ut[0];throw new e("expected a single document in the stream, but found more")}return t(Ci,"load2"),Ss.loadAll=qr,Ss.load=Ci,Ss}t(Gd,"requireLoader");var Rl={},Yd;function Vd(){if(Yd)return Rl;Yd=1;let r=ti(),e=ei(),i=Ts(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,h=9,n=10,u=13,d=32,c=33,f=34,p=35,x=37,S=38,T=39,B=42,_=44,v=45,E=58,O=61,D=62,G=63,Z=64,J=91,rt=93,ht=96,nt=123,ot=124,P=125,X={};X[0]="\\0",X[7]="\\a",X[8]="\\b",X[9]="\\t",X[10]="\\n",X[11]="\\v",X[12]="\\f",X[13]="\\r",X[27]="\\e",X[34]="\\\"",X[92]="\\\\",X[133]="\\N",X[160]="\\_",X[8232]="\\L",X[8233]="\\P";let tt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function at(I,it){if(it===null)return{};let bt={},dt=Object.keys(it);for(let pt=0,kt=dt.length;pt<kt;pt+=1){let yt=dt[pt],At=String(it[yt]);if(yt.slice(0,2)==="!!")yt="tag:yaml.org,2002:"+yt.slice(2);let Ft=I.compiledTypeMap.fallback[yt];if(Ft&&o.call(Ft.styleAliases,At))At=Ft.styleAliases[At];bt[yt]=At}return bt}t(at,"compileStyleMap");function st(I){let it,bt,dt=I.toString(16).toUpperCase();if(I<=255)it="x",bt=2;else if(I<=65535)it="u",bt=4;else if(I<=4294967295)it="U",bt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+it+r.repeat("0",bt-dt.length)+dt}t(st,"encodeHex");let Bt=1,vt=2;function Wt(I){this.schema=I.schema||i,this.indent=Math.max(1,I.indent||2),this.noArrayIndent=I.noArrayIndent||!1,this.skipInvalid=I.skipInvalid||!1,this.flowLevel=r.isNothing(I.flowLevel)?-1:I.flowLevel,this.styleMap=at(this.schema,I.styles||null),this.sortKeys=I.sortKeys||!1,this.lineWidth=I.lineWidth||80,this.noRefs=I.noRefs||!1,this.noCompatMode=I.noCompatMode||!1,this.condenseFlow=I.condenseFlow||!1,this.quotingType=I.quotingType==='"'?vt:Bt,this.forceQuotes=I.forceQuotes||!1,this.replacer=typeof I.replacer==="function"?I.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Wt,"State");function Nt(I,it){let bt=r.repeat(" ",it),dt=0,pt="",kt=I.length;while(dt<kt){let yt,At=I.indexOf(`
143
143
  `,dt);if(At===-1)yt=I.slice(dt),dt=kt;else yt=I.slice(dt,At+1),dt=At+1;if(yt.length&&yt!==`
144
- `)ft+=bt;ft+=yt}return ft}t(Yt,"indentString");function Vt(I,it){return`
145
- `+r.repeat(" ",I.indent*it)}t(Vt,"generateNextLine");function Kt(I,it){for(let bt=0,dt=I.implicitTypes.length;bt<dt;bt+=1)if(I.implicitTypes[bt].resolve(it))return!0;return!1}t(Kt,"testImplicitResolving");function It(I){return I===d||I===h}t(It,"isWhitespace");function Mt(I){return I>=32&&I<=126||I>=161&&I<=55295&&I!==8232&&I!==8233||I>=57344&&I<=65533&&I!==a||I>=65536&&I<=1114111}t(Mt,"isPrintable");function Pt(I){return Mt(I)&&I!==a&&I!==u&&I!==n}t(Pt,"isNsCharOrWhitespace");function jt(I,it,bt){let dt=Pt(I),ft=dt&&!It(I);return(bt?dt:dt&&I!==B&&I!==J&&I!==rt&&I!==nt&&I!==N)&&I!==p&&!(it===L&&!ft)||Pt(it)&&!It(it)&&I===p||it===L&&ft}t(jt,"isPlainSafe");function qt(I){return Mt(I)&&I!==a&&!It(I)&&I!==_&&I!==K&&I!==L&&I!==B&&I!==J&&I!==rt&&I!==nt&&I!==N&&I!==p&&I!==k&&I!==T&&I!==c&&I!==ot&&I!==D&&I!==P&&I!==S&&I!==f&&I!==x&&I!==Z&&I!==ht}t(qt,"isPlainSafeFirst");function oe(I){return!It(I)&&I!==L}t(oe,"isPlainSafeLast");function ie(I,it){let bt=I.charCodeAt(it),dt;if(bt>=55296&&bt<=56319&&it+1<I.length){if(dt=I.charCodeAt(it+1),dt>=56320&&dt<=57343)return(bt-55296)*1024+dt-56320+65536}return bt}t(ie,"codePointAt");function Qe(I){return/^\n* /.test(I)}t(Qe,"needIndentIndicator");let Or=1,We=2,pi=3,yi=4,Ne=5;function Dr(I,it,bt,dt,ft,kt,yt,At){let Ft,Ot=0,Rt=null,Zt=!1,se=!1,$c=dt!==-1,wi=-1,Si=qt(ie(I,0))&&oe(ie(I,I.length-1));if(it||yt)for(Ft=0;Ft<I.length;Ot>=65536?Ft+=2:Ft++){if(Ot=ie(I,Ft),!Mt(Ot))return Ne;Si=Si&&jt(Ot,Rt,At),Rt=Ot}else{for(Ft=0;Ft<I.length;Ot>=65536?Ft+=2:Ft++){if(Ot=ie(I,Ft),Ot===n){if(Zt=!0,$c)se=se||Ft-wi-1>dt&&I[wi+1]!==" ",wi=Ft}else if(!Mt(Ot))return Ne;Si=Si&&jt(Ot,Rt,At),Rt=Ot}se=se||$c&&(Ft-wi-1>dt&&I[wi+1]!==" ")}if(!Zt&&!se){if(Si&&!yt&&!ft(I))return Or;return kt===vt?Ne:We}if(bt>9&&Qe(I))return Ne;if(!yt)return se?yi:pi;return kt===vt?Ne:We}t(Dr,"chooseScalarStyle");function xi(I,it,bt,dt,ft){I.dump=function(){if(it.length===0)return I.quotingType===vt?'""':"''";if(!I.noCompatMode){if(tt.indexOf(it)!==-1||U.test(it))return I.quotingType===vt?'"'+it+'"':"'"+it+"'"}let kt=I.indent*Math.max(1,bt),yt=I.lineWidth===-1?-1:Math.max(Math.min(I.lineWidth,40),I.lineWidth-kt),At=dt||I.flowLevel>-1&&bt>=I.flowLevel;function Ft(Ot){return Kt(I,Ot)}switch(t(Ft,"testAmbiguity"),Dr(it,At,I.indent,yt,Ft,I.quotingType,I.forceQuotes&&!dt,ft)){case Or:return it;case We:return"'"+it.replace(/'/g,"''")+"'";case pi:return"|"+Pr(it,I.indent)+Rr(Yt(it,kt));case yi:return">"+Pr(it,I.indent)+Rr(Yt(Ci(it,yt),kt));case Ne:return'"'+bi(it)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(xi,"writeScalar");function Pr(I,it){let bt=Qe(I)?String(it):"",dt=I[I.length-1]===`
144
+ `)pt+=bt;pt+=yt}return pt}t(Nt,"indentString");function jt(I,it){return`
145
+ `+r.repeat(" ",I.indent*it)}t(jt,"generateNextLine");function Xt(I,it){for(let bt=0,dt=I.implicitTypes.length;bt<dt;bt+=1)if(I.implicitTypes[bt].resolve(it))return!0;return!1}t(Xt,"testImplicitResolving");function $t(I){return I===d||I===h}t($t,"isWhitespace");function Mt(I){return I>=32&&I<=126||I>=161&&I<=55295&&I!==8232&&I!==8233||I>=57344&&I<=65533&&I!==a||I>=65536&&I<=1114111}t(Mt,"isPrintable");function Dt(I){return Mt(I)&&I!==a&&I!==u&&I!==n}t(Dt,"isNsCharOrWhitespace");function Ht(I,it,bt){let dt=Dt(I),pt=dt&&!$t(I);return(bt?dt:dt&&I!==_&&I!==J&&I!==rt&&I!==nt&&I!==P)&&I!==p&&!(it===E&&!pt)||Dt(it)&&!$t(it)&&I===p||it===E&&pt}t(Ht,"isPlainSafe");function Rt(I){return Mt(I)&&I!==a&&!$t(I)&&I!==v&&I!==G&&I!==E&&I!==_&&I!==J&&I!==rt&&I!==nt&&I!==P&&I!==p&&I!==S&&I!==B&&I!==c&&I!==ot&&I!==O&&I!==D&&I!==T&&I!==f&&I!==x&&I!==Z&&I!==ht}t(Rt,"isPlainSafeFirst");function ie(I){return!$t(I)&&I!==E}t(ie,"isPlainSafeLast");function re(I,it){let bt=I.charCodeAt(it),dt;if(bt>=55296&&bt<=56319&&it+1<I.length){if(dt=I.charCodeAt(it+1),dt>=56320&&dt<=57343)return(bt-55296)*1024+dt-56320+65536}return bt}t(re,"codePointAt");function Ze(I){return/^\n* /.test(I)}t(Ze,"needIndentIndicator");let Ir=1,qe=2,fi=3,pi=4,We=5;function Or(I,it,bt,dt,pt,kt,yt,At){let Ft,It=0,Pt=null,Vt=!1,oe=!1,$c=dt!==-1,wi=-1,Si=Rt(re(I,0))&&ie(re(I,I.length-1));if(it||yt)for(Ft=0;Ft<I.length;It>=65536?Ft+=2:Ft++){if(It=re(I,Ft),!Mt(It))return We;Si=Si&&Ht(It,Pt,At),Pt=It}else{for(Ft=0;Ft<I.length;It>=65536?Ft+=2:Ft++){if(It=re(I,Ft),It===n){if(Vt=!0,$c)oe=oe||Ft-wi-1>dt&&I[wi+1]!==" ",wi=Ft}else if(!Mt(It))return We;Si=Si&&Ht(It,Pt,At),Pt=It}oe=oe||$c&&(Ft-wi-1>dt&&I[wi+1]!==" ")}if(!Vt&&!oe){if(Si&&!yt&&!pt(I))return Ir;return kt===vt?We:qe}if(bt>9&&Ze(I))return We;if(!yt)return oe?pi:fi;return kt===vt?We:qe}t(Or,"chooseScalarStyle");function gi(I,it,bt,dt,pt){I.dump=function(){if(it.length===0)return I.quotingType===vt?'""':"''";if(!I.noCompatMode){if(tt.indexOf(it)!==-1||N.test(it))return I.quotingType===vt?'"'+it+'"':"'"+it+"'"}let kt=I.indent*Math.max(1,bt),yt=I.lineWidth===-1?-1:Math.max(Math.min(I.lineWidth,40),I.lineWidth-kt),At=dt||I.flowLevel>-1&&bt>=I.flowLevel;function Ft(It){return Xt(I,It)}switch(t(Ft,"testAmbiguity"),Or(it,At,I.indent,yt,Ft,I.quotingType,I.forceQuotes&&!dt,pt)){case Ir:return it;case qe:return"'"+it.replace(/'/g,"''")+"'";case fi:return"|"+Dr(it,I.indent)+Pr(Nt(it,kt));case pi:return">"+Dr(it,I.indent)+Pr(Nt(mi(it,yt),kt));case We:return'"'+xi(it)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(gi,"writeScalar");function Dr(I,it){let bt=Ze(I)?String(it):"",dt=I[I.length-1]===`
146
146
  `,kt=dt&&(I[I.length-2]===`
147
147
  `||I===`
148
148
  `)?"+":dt?"":"-";return bt+kt+`
149
- `}t(Pr,"blockHeader");function Rr(I){return I[I.length-1]===`
150
- `?I.slice(0,-1):I}t(Rr,"dropEndingNewline");function Ci(I,it){let bt=/(\n+)([^\n]*)/g,dt=function(){let At=I.indexOf(`
151
- `);return At=At!==-1?At:I.length,bt.lastIndex=At,Ie(I.slice(0,At),it)}(),ft=I[0]===`
152
- `||I[0]===" ",kt,yt;while(yt=bt.exec(I)){let At=yt[1],Ft=yt[2];kt=Ft[0]===" ",dt+=At+(!ft&&!kt&&Ft!==""?`
153
- `:"")+Ie(Ft,it),ft=kt}return dt}t(Ci,"foldString");function Ie(I,it){if(I===""||I[0]===" ")return I;let bt=/ [^ ]/g,dt,ft=0,kt,yt=0,At=0,Ft="";while(dt=bt.exec(I)){if(At=dt.index,At-ft>it)kt=yt>ft?yt:At,Ft+=`
154
- `+I.slice(ft,kt),ft=kt+1;yt=At}if(Ft+=`
155
- `,I.length-ft>it&&yt>ft)Ft+=I.slice(ft,yt)+`
156
- `+I.slice(yt+1);else Ft+=I.slice(ft);return Ft.slice(1)}t(Ie,"foldLine");function bi(I){let it="",bt=0;for(let dt=0;dt<I.length;bt>=65536?dt+=2:dt++){bt=ie(I,dt);let ft=X[bt];if(!ft&&Mt(bt)){if(it+=I[dt],bt>=65536)it+=I[dt+1]}else it+=ft||st(bt)}return it}t(bi,"escapeString");function qr(I,it,bt){let dt="",ft=I.tag;for(let kt=0,yt=bt.length;kt<yt;kt+=1){let At=bt[kt];if(I.replacer)At=I.replacer.call(bt,String(kt),At);if(ut(I,it,At,!1,!1)||typeof At>"u"&&ut(I,it,null,!1,!1)){if(dt!=="")dt+=","+(!I.condenseFlow?" ":"");dt+=I.dump}}I.tag=ft,I.dump="["+dt+"]"}t(qr,"writeFlowSequence");function Wr(I,it,bt,dt){let ft="",kt=I.tag;for(let yt=0,At=bt.length;yt<At;yt+=1){let Ft=bt[yt];if(I.replacer)Ft=I.replacer.call(bt,String(yt),Ft);if(ut(I,it+1,Ft,!0,!0,!1,!0)||typeof Ft>"u"&&ut(I,it+1,null,!0,!0,!1,!0)){if(!dt||ft!=="")ft+=Vt(I,it);if(I.dump&&n===I.dump.charCodeAt(0))ft+="-";else ft+="- ";ft+=I.dump}}I.tag=kt,I.dump=ft||"[]"}t(Wr,"writeBlockSequence");function ki(I,it,bt){let dt="",ft=I.tag,kt=Object.keys(bt);for(let yt=0,At=kt.length;yt<At;yt+=1){let Ft="";if(dt!=="")Ft+=", ";if(I.condenseFlow)Ft+='"';let Ot=kt[yt],Rt=bt[Ot];if(I.replacer)Rt=I.replacer.call(bt,Ot,Rt);if(!ut(I,it,Ot,!1,!1))continue;if(I.dump.length>1024)Ft+="? ";if(Ft+=I.dump+(I.condenseFlow?'"':"")+":"+(I.condenseFlow?"":" "),!ut(I,it,Rt,!1,!1))continue;Ft+=I.dump,dt+=Ft}I.tag=ft,I.dump="{"+dt+"}"}t(ki,"writeFlowMapping");function C(I,it,bt,dt){let ft="",kt=I.tag,yt=Object.keys(bt);if(I.sortKeys===!0)yt.sort();else if(typeof I.sortKeys==="function")yt.sort(I.sortKeys);else if(I.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let At=0,Ft=yt.length;At<Ft;At+=1){let Ot="";if(!dt||ft!=="")Ot+=Vt(I,it);let Rt=yt[At],Zt=bt[Rt];if(I.replacer)Zt=I.replacer.call(bt,Rt,Zt);if(!ut(I,it+1,Rt,!0,!0,!0))continue;let se=I.tag!==null&&I.tag!=="?"||I.dump&&I.dump.length>1024;if(se)if(I.dump&&n===I.dump.charCodeAt(0))Ot+="?";else Ot+="? ";if(Ot+=I.dump,se)Ot+=Vt(I,it);if(!ut(I,it+1,Zt,!0,se))continue;if(I.dump&&n===I.dump.charCodeAt(0))Ot+=":";else Ot+=": ";Ot+=I.dump,ft+=Ot}I.tag=kt,I.dump=ft||"{}"}t(C,"writeBlockMapping");function et(I,it,bt){let dt=bt?I.explicitTypes:I.implicitTypes;for(let ft=0,kt=dt.length;ft<kt;ft+=1){let yt=dt[ft];if((yt.instanceOf||yt.predicate)&&(!yt.instanceOf||typeof it==="object"&&it instanceof yt.instanceOf)&&(!yt.predicate||yt.predicate(it))){if(bt)if(yt.multi&&yt.representName)I.tag=yt.representName(it);else I.tag=yt.tag;else I.tag="?";if(yt.represent){let At=I.styleMap[yt.tag]||yt.defaultStyle,Ft;if(s.call(yt.represent)==="[object Function]")Ft=yt.represent(it,At);else if(o.call(yt.represent,At))Ft=yt.represent[At](it,At);else throw new e("!<"+yt.tag+'> tag resolver accepts not "'+At+'" style');I.dump=Ft}return!0}}return!1}t(et,"detectType");function ut(I,it,bt,dt,ft,kt,yt){if(I.tag=null,I.dump=bt,!et(I,bt,!1))et(I,bt,!0);let At=s.call(I.dump),Ft=dt;if(dt)dt=I.flowLevel<0||I.flowLevel>it;let Ot=At==="[object Object]"||At==="[object Array]",Rt,Zt;if(Ot)Rt=I.duplicates.indexOf(bt),Zt=Rt!==-1;if(I.tag!==null&&I.tag!=="?"||Zt||I.indent!==2&&it>0)ft=!1;if(Zt&&I.usedDuplicates[Rt])I.dump="*ref_"+Rt;else{if(Ot&&Zt&&!I.usedDuplicates[Rt])I.usedDuplicates[Rt]=!0;if(At==="[object Object]"){if(dt&&Object.keys(I.dump).length!==0){if(C(I,it,I.dump,ft),Zt)I.dump="&ref_"+Rt+I.dump}else if(ki(I,it,I.dump),Zt)I.dump="&ref_"+Rt+" "+I.dump}else if(At==="[object Array]"){if(dt&&I.dump.length!==0){if(I.noArrayIndent&&!yt&&it>0)Wr(I,it-1,I.dump,ft);else Wr(I,it,I.dump,ft);if(Zt)I.dump="&ref_"+Rt+I.dump}else if(qr(I,it,I.dump),Zt)I.dump="&ref_"+Rt+" "+I.dump}else if(At==="[object String]"){if(I.tag!=="?")xi(I,I.dump,it,kt,Ft)}else if(At==="[object Undefined]")return!1;else{if(I.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+At)}if(I.tag!==null&&I.tag!=="?"){let se=encodeURI(I.tag[0]==="!"?I.tag.slice(1):I.tag).replace(/!/g,"%21");if(I.tag[0]==="!")se="!"+se;else if(se.slice(0,18)==="tag:yaml.org,2002:")se="!!"+se.slice(18);else se="!<"+se+">";I.dump=se+" "+I.dump}}return!0}t(ut,"writeNode");function gt(I,it){let bt=[],dt=[];ct(I,bt,dt);let ft=dt.length;for(let kt=0;kt<ft;kt+=1)it.duplicates.push(bt[dt[kt]]);it.usedDuplicates=Array(ft)}t(gt,"getDuplicateReferences");function ct(I,it,bt){if(I!==null&&typeof I==="object"){let dt=it.indexOf(I);if(dt!==-1){if(bt.indexOf(dt)===-1)bt.push(dt)}else if(it.push(I),Array.isArray(I))for(let ft=0,kt=I.length;ft<kt;ft+=1)ct(I[ft],it,bt);else{let ft=Object.keys(I);for(let kt=0,yt=ft.length;kt<yt;kt+=1)ct(I[ft[kt]],it,bt)}}}t(ct,"inspectNode");function Tt(I,it){it=it||{};let bt=new Ht(it);if(!bt.noRefs)gt(I,bt);let dt=I;if(bt.replacer)dt=bt.replacer.call({"":dt},"",dt);if(ut(bt,0,dt,!0,!0))return bt.dump+`
157
- `;return""}return t(Tt,"dump2"),Rl.dump=Tt,Rl}t(Vd,"requireDumper");var jd;function Kd(){if(jd)return be;jd=1;let r=Gd(),e=Vd();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),be.Type=ke(),be.Schema=ql(),be.FAILSAFE_SCHEMA=Hl(),be.JSON_SCHEMA=Gl(),be.CORE_SCHEMA=Vl(),be.DEFAULT_SCHEMA=Bs(),be.load=r.load,be.loadAll=r.loadAll,be.dump=e.dump,be.YAMLException=ri(),be.types={binary:Ql(),float:Xl(),map:zl(),null:Yl(),pairs:th(),set:eh(),timestamp:Kl(),bool:jl(),int:Ul(),merge:Zl(),omap:Jl(),seq:Nl(),str:Wl()},be.safeLoad=i("safeLoad","load"),be.safeLoadAll=i("safeLoadAll","loadAll"),be.safeDump=i("safeDump","dump"),be}t(Kd,"requireJsYaml");var eb=Kd(),rb=Ud(eb),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:hr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:br,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=rb;var um=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:h}=s??{},n=r.attr("id"),u=i?.includes("dark")?"#FFFFFF":"#000000",d=t((f,p,x)=>r.append("defs").append("filter").attr("id",f).attr("height",p).attr("width",p).append("feDropShadow").attr("dx",x).attr("dy",x).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u),"dropShadow");if(d(`${n}-drop-shadow`,"130%","4"),d(`${n}-drop-shadow-small`,"150%","2"),!o)return;let c=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)},"insertLookDefs");var Zd=t((r)=>{let{handDrawnSeed:e}=m();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),ib=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ue=t((r)=>{let e=ob([...r.cssCompiledStyles||[],...r.cssStyles||[],...ib(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),ob=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),wd=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),M=t((r)=>{let{stylesArray:e}=Ue(r),i=[],s=[],o=[],a=[];return e.forEach((h)=>{let n=h[0];if(wd(n))i.push(h.join(":")+" !important");else{if(s.push(h.join(":")+" !important"),n.includes("stroke"))o.push(h.join(":")+" !important");if(n==="fill")a.push(h.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),_t=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=m(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:h}=Ue(r);return Object.assign({roughness:0.7,fill:h.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:h.get("stroke")||o,seed:s,strokeWidth:h.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:sb(h.get("stroke-dasharray"))},e)},"userNodeOverrides"),sb=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var rh=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),u=o.pop(),d={provider:o.length>0?o[0]:s,prefix:u,name:n};return e&&!_s(d)?null:d}let a=o[0],h=a.split("-");if(h.length>1){let n={provider:s,prefix:h.shift(),name:h.join("-")};return e&&!_s(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!_s(n,i)?null:n}return null},_s=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var ab=Object.freeze({left:0,top:0,width:16,height:16}),ii=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ih=Object.freeze({...ab,...ii}),Qd=Object.freeze({...ih,body:"",hidden:!1});function Jd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function oh(r,e){let i=Jd(r,e);for(let s in Qd)if(s in ii){if(s in r&&!(s in i))i[s]=ii[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function tf(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(h){if(i[h])return o[h]=[];if(!(h in o)){o[h]=null;let n=s[h]&&s[h].parent,u=n&&a(n);if(u)o[h]=[n].concat(u)}return o[h]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function ef(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function h(n){a=oh(s[n]||o[n],a)}return h(e),i.forEach(h),oh(r,a)}function sh(r,e){if(r.icons[e])return ef(r,e,[]);let i=tf(r,[e])[e];return i?ef(r,e,i):null}var nb=Object.freeze({width:null,height:null}),rf=Object.freeze({...nb,...ii});var lb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ah(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(lb);if(s===null||!s.length)return r;let o=[],a=s.shift(),h=hb.test(a);while(!0){if(h){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");h=!h}}function cb(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let h=r.indexOf(">",a);if(h===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(h+1)}return{defs:i,content:r}}function ub(r,e){return r?"<defs>"+r+"</defs>"+e:e}function of(r,e,i){let s=cb(r);return ub(s.defs,e+s.content+i)}var db=(r)=>r==="unset"||r==="undefined"||r==="none";function nh(r,e){let i={...ih,...r},s={...rf,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((S)=>{let T=[],{hFlip:B,vFlip:_,rotate:L}=S;if(B)if(_)L+=2;else T.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),T.push("scale(-1 1)"),o.top=o.left=0;else if(_)T.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),T.push("scale(1 -1)"),o.top=o.left=0;let D;if(L<0)L-=Math.floor(L/4)*4;switch(L=L%4,L){case 1:D=o.height/2+o.top,T.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:T.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:D=o.width/2+o.left,T.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}if(L%2===1){if(o.left!==o.top)D=o.left,o.left=o.top,o.top=D;if(o.width!==o.height)D=o.width,o.width=o.height,o.height=D}if(T.length)a=of(a,'<g transform="'+T.join(" ")+'">',"</g>")});let{width:h,height:n}=s,{width:u,height:d}=o,c,f;if(h===null)f=n===null?"1em":n==="auto"?d:n,c=ah(f,u/d);else c=h==="auto"?u:h,f=n===null?ah(c,d/u):n==="auto"?d:n;let p={},x=(S,T)=>{if(!db(T))p[S]=T.toString()};x("width",c),x("height",f);let k=[o.left,o.top,u,d];return p.viewBox=k.join(" "),{attributes:p,viewBox:k,body:a}}var fb=/\sid="(\S+)"/g,sf=new Map;function pb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=sf.get(r)||0;return sf.set(r,e+1),e?`${r}${e}`:r}function lh(r){let e=[],i;while(i=fb.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=pb(o),h=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+h+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function ch(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var Xg={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},uh=new Map,af=new Map,os=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)af.set(e.name,e.loader);else if("icons"in e)uh.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),nf=t(async(r,e)=>{let i=rh(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=uh.get(s);if(!o){let h=af.get(s);if(!h)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await h(),prefix:s},uh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=sh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),vs=t(async(r)=>{try{return await nf(r),!0}catch{return!1}},"isIconAvailable"),yr=t(async(r,e,i)=>{let s;try{s=await nf(r,e?.fallbackPrefix)}catch(h){l.error(h),s=Xg}let o=nh(s,e),a=ch(lh(o.body),{...o.attributes,...i});return te(a,E())},"getIconSVG");var Sf=xn(fl(),1);function Fr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let h=r.apply(this,s);return i.cache=a.set(o,h)||a,h};return i.cache=new(Fr.Cache||Map),i}Fr.Cache=Map;function is(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function gi(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var dm="[object RegExp]",Bc="[object String]",Ic="[object Number]",_c="[object Boolean]",Sc="[object Arguments]",pm="[object Symbol]",mm="[object Date]",fm="[object Map]",gm="[object Set]",Am="[object Array]";var hm="[object ArrayBuffer]",bm="[object Object]";var ym="[object DataView]",vm="[object Uint8Array]",km="[object Uint8ClampedArray]",xm="[object Uint16Array]",wm="[object Uint32Array]";var Cm="[object Int8Array]",Em="[object Int16Array]",Bm="[object Int32Array]";var Im="[object Float32Array]",_m="[object Float64Array]";function oi(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Ai(r){return oi(r)}function ff(){}function pf(r){if(is(r))return r;if(Array.isArray(r)||oi(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function Ls(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var dh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Tc(r){return typeof dh.Buffer<"u"&&dh.Buffer.isBuffer(r)}function gf(r){return r==="__proto__"}function Fs(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function mf(r,e){return si(r,void 0,r,new Map,e)}function si(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(is(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let h=Array(r.length);s.set(r,h);for(let n=0;n<r.length;n++)h[n]=si(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))h.index=r.index;if(Object.hasOwn(r,"input"))h.input=r.input;return h}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let h=new RegExp(r.source,r.flags);return h.lastIndex=r.lastIndex,h}if(r instanceof Map){let h=new Map;s.set(r,h);for(let[n,u]of r)h.set(n,si(u,n,i,s,o));return h}if(r instanceof Set){let h=new Set;s.set(r,h);for(let n of r)h.add(si(n,void 0,i,s,o));return h}if(Tc(r))return r.subarray();if(oi(r)){let h=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,h);for(let n=0;n<r.length;n++)h[n]=si(r[n],n,i,s,o);return h}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let h=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,h),$e(h,r,i,s,o),h}if(typeof File<"u"&&r instanceof File){let h=new File([r],r.name,{type:r.type});return s.set(r,h),$e(h,r,i,s,o),h}if(typeof Blob<"u"&&r instanceof Blob){let h=new Blob([r],{type:r.type});return s.set(r,h),$e(h,r,i,s,o),h}if(r instanceof Error){let h=structuredClone(r);return s.set(r,h),h.message=r.message,h.name=r.name,h.stack=r.stack,h.cause=r.cause,h.constructor=r.constructor,$e(h,r,i,s,o),h}if(r instanceof Boolean){let h=new Boolean(r.valueOf());return s.set(r,h),$e(h,r,i,s,o),h}if(r instanceof Number){let h=new Number(r.valueOf());return s.set(r,h),$e(h,r,i,s,o),h}if(r instanceof String){let h=new String(r.valueOf());return s.set(r,h),$e(h,r,i,s,o),h}if(typeof r==="object"&&vb(r)){let h=Object.create(Object.getPrototypeOf(r));return s.set(r,h),$e(h,r,i,s,o),h}return r}function $e(r,e,i=r,s,o){let a=[...Object.keys(e),...Ls(e)];for(let h=0;h<a.length;h++){let n=a[h],u=Object.getOwnPropertyDescriptor(r,n);if(u==null||u.writable)r[n]=si(e[n],n,i,s,o)}}function vb(r){switch(gi(r)){case Sc:case Am:case hm:case ym:case _c:case mm:case Im:case _m:case Cm:case Em:case Bm:case fm:case Ic:case bm:case dm:case gm:case Bc:case pm:case vm:case km:case xm:case wm:return!0;default:return!1}}function yf(r,e){return mf(r,(i,s,o,a)=>{let h=e?.(i,s,o,a);if(h!==void 0)return h;if(typeof r!=="object")return;if(gi(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),$e(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Ic:case Bc:case _c:{let n=new r.constructor(r?.valueOf());return $e(n,r),n}case Sc:{let n={};return $e(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function fh(r){return yf(r)}function Cd(r){return r!==null&&typeof r==="object"&&gi(r)==="[object Arguments]"}function ao(r){return typeof r==="object"&&r!==null}function xf(r){return Number.isSafeInteger(r)&&r>=0}function Sm(r){return r!=null&&typeof r!=="function"&&xf(r.length)}function Cf(r){return ao(r)&&Sm(r)}function bf(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let h=i[a];o=Ms(o,h,s,new Map)}return o}function Ms(r,e,i,s){if(is(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return pf(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...Ls(e)];for(let a=0;a<o.length;a++){let h=o[a];if(gf(h))continue;let n=e[h],u=r[h];if(Cd(n))n={...n};if(Cd(u))u={...u};if(Tc(n))n=fh(n);if(Array.isArray(n))if(Array.isArray(u)){let c=[],f=Reflect.ownKeys(u);for(let p=0;p<f.length;p++){let x=f[p];c[x]=u[x]}u=c}else if(Cf(u)){let c=[];for(let f=0;f<u.length;f++)c[f]=u[f];u=c}else u=[];let d=i(u,n,h,r,e,s);if(d!==void 0)r[h]=d;else if(Array.isArray(n))r[h]=Ms(u,n,i,s);else if(ao(u)&&ao(n)&&(Fs(u)||Fs(n)||Ai(u)||Ai(n)))r[h]=Ms(u,n,i,s);else if(u==null&&Fs(n))r[h]=Ms({},n,i,s);else if(u==null&&Ai(n))r[h]=fh(n);else if(u===void 0||n!==void 0)r[h]=n}return r}function ph(r,...e){return bf(r,...e,ff)}var eA="​",Lb={curveBasis:Lr,curveBasisClosed:ms,curveBasisOpen:ys,curveBumpX:Vi,curveBumpY:Ki,curveBundle:rl,curveCardinalClosed:il,curveCardinalOpen:ol,curveCardinal:Qi,curveCatmullRomClosed:sl,curveCatmullRomOpen:al,curveCatmullRom:to,curveLinear:Ca,curveLinearClosed:ks,curveMonotoneX:eo,curveMonotoneY:io,curveNatural:Jr,curveStep:ti,curveStepAfter:so,curveStepBefore:oo},Fb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Mb=t(function(r,e){let i=Tf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let h=i.map((n)=>n.args);Li(h),s=lt(s,[...h])}else s=i.args;if(!s)return;let o=bc(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),Tf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Fb.source})(?=[}][%]{2}).*
158
- `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Nr.exec(r))!==null){if(s.index===Nr.lastIndex)Nr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],h=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:h})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),Eh=t(function(r){return r.replace(Nr,"")},"removeDirectives"),Ab=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Es(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Lb[i]??e}t(Es,"interpolateToCurve");function Bf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return Sf.sanitizeUrl(i);return i}t(Bf,"formatUrl");var Eb=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let h=0;h<s;h++)if(a=a[i[h]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function gh(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(gh,"distance");function _f(r){let e,i=0;r.forEach((o)=>{i+=gh(o,e),e=o});let s=i/2;return mh(r,s)}t(_f,"traverseEdge");function vf(r){if(r.length===1)return r[0];return _f(r)}t(vf,"calcLabelPosition");var kf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),mh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=gh(o,i);if(a===0)return i;if(a<s)s-=a;else{let h=s/a;if(h<=0)return i;if(h>=1)return{x:o.x,y:o.y};if(h>0&&h<1)return{x:kf((1-h)*i.x+h*o.x,5),y:kf((1-h)*i.y+h*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),$b=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=mh(e,25),a=r?10:5,h=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(h)*a+(e[0].x+o.x)/2,n.y=-Math.cos(h)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function Lf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=mh(s,o),h=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),u={x:0,y:0};if(e==="start_left")u.x=Math.sin(n+Math.PI)*h+(s[0].x+a.x)/2,u.y=-Math.cos(n+Math.PI)*h+(s[0].y+a.y)/2;else if(e==="end_right")u.x=Math.sin(n-Math.PI)*h+(s[0].x+a.x)/2-5,u.y=-Math.cos(n-Math.PI)*h+(s[0].y+a.y)/2-5;else if(e==="end_left")u.x=Math.sin(n)*h+(s[0].x+a.x)/2-5,u.y=-Math.cos(n)*h+(s[0].y+a.y)/2-5;else u.x=Math.sin(n)*h+(s[0].x+a.x)/2,u.y=-Math.cos(n)*h+(s[0].y+a.y)/2;return u}t(Lf,"calcTerminalLabelPosition");function Tm(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Tm,"getStylesFromArray");var wf=0,tA=t(()=>(wf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wf),"generateId");function Ff(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(Ff,"makeRandomHex");var nA=t((r)=>Ff(r.length),"random"),Ib=t(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Ob=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=jn(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),ss=Fr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),w.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((h,n)=>{let u=rr(`${h} `,i),d=rr(a,i);if(u>e){let{hyphenatedStrings:p,remainingWord:x}=Db(h,e,"-",i);o.push(a,...p),a=x}else if(d+u>=e)o.push(a),a=h;else a=[a,h].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((h)=>h!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Db=Fr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],h="";return o.forEach((n,u)=>{let d=`${h}${n}`;if(rr(d,s)>=e){let f=u+1,p=o.length===f,x=`${d}${i}`;a.push(p?d:x),h=""}else h=d}),{hyphenatedStrings:a,remainingWord:h}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Ed(r,e){return Bd(r,e).height}t(Ed,"calculateTextHeight");function rr(r,e){return Bd(r,e).width}t(rr,"calculateTextWidth");var Bd=Fr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=jn(i),h=["sans-serif",s],n=r.split(w.lineBreakRegex),u=[],d=b("body");if(!d.remove)return{width:0,height:0,lineHeight:0};let c=d.append("svg");for(let p of h){let x=0,k={width:0,height:0,lineHeight:0};for(let S of n){let T=Ib();T.text=S||eA;let B=Ob(c,T).style("font-size",a).style("font-weight",o).style("font-family",p),_=(B._groups||B)[0][0].getBBox();if(_.width===0&&_.height===0)throw Error("svg element not in render tree");k.width=Math.round(Math.max(k.width,_.width)),x=Math.round(_.height),k.height+=x,k.lineHeight=Math.round(Math.max(k.lineHeight,x))}u.push(k)}c.remove();let f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Pb=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},As,Rb=t(function(r){return As=As||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),As.innerHTML=r,unescape(As.textContent)},"entityDecode");function Dm(r){return"str"in r}t(Dm,"isDetailedError");var qb=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),jn=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function ue(r,e){return ph({},r,e)}t(ue,"cleanAndMerge");var V={assignWithDepth:lt,wrapLabel:ss,calculateTextHeight:Ed,calculateTextWidth:rr,calculateTextDimensions:Bd,cleanAndMerge:ue,detectInit:Mb,detectDirective:Tf,isSubstringInArray:Ab,interpolateToCurve:Es,calcLabelPosition:vf,calcCardinalityPosition:$b,calcTerminalLabelPosition:Lf,formatUrl:Bf,getStylesFromArray:Tm,generateId:tA,random:nA,runFunc:Eb,entityDecode:Rb,insertTitle:qb,isLabelCoordinateInPath:Mf,parseFontSize:jn,InitIDGenerator:Pb},Bh=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),ro=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Fn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function le(r){return r??null}t(le,"handleUndefinedAttr");function Mf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(Mf,"isLabelCoordinateInPath");function Fh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ar=Fh();function Pf(r){Ar=r}var uo={exec:()=>null};function Jt(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let h=typeof a=="string"?a:a.source;return h=h.replace(_e.caret,"$1"),i=i.replace(o,h),s},getRegex:()=>new RegExp(i,e)};return s}var Wb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),_e={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Nb=/^(?:[ \t]*(?:\n|$))+/,zb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Hb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mh=/(?:[*+-]|\d{1,9}[.)])/,Rf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qf=Jt(Rf).replace(/bull/g,Mh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),jb=Jt(Rf).replace(/bull/g,Mh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ah=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ub=/^[^\n]+/,$h=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Xb=Jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gb=Jt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Mh).getRegex(),Ps="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Oh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Vb=Jt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Oh).replace("tag",Ps).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wf=Jt(Ah).replace("hr",fo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex(),Kb=Jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Wf).getRegex(),Dh={blockquote:Kb,code:zb,def:Xb,fences:Hb,heading:Yb,hr:fo,html:Vb,lheading:qf,list:Gb,newline:Nb,paragraph:Wf,table:uo,text:Ub},Af=Jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex(),Zb={...Dh,lheading:jb,table:Af,paragraph:Jt(Ah).replace("hr",fo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Af).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex()},Qb={...Dh,html:Jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jt(Ah).replace("hr",fo).replace("heading",` *#{1,6} *[^
159
- ]`).replace("lheading",qf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Jb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Nf=/^( {2,}|\\)\n(?!\s*$)/,ek=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rs=/[\p{P}\p{S}]/u,Ph=/[\s\p{P}\p{S}]/u,zf=/[^\s\p{P}\p{S}]/u,rk=Jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ph).getRegex(),Hf=/(?!~)[\p{P}\p{S}]/u,ik=/(?!~)[\s\p{P}\p{S}]/u,ok=/(?:[^\s\p{P}\p{S}]|~)/u,sk=Jt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Wb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Yf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ak=Jt(Yf,"u").replace(/punct/g,Rs).getRegex(),nk=Jt(Yf,"u").replace(/punct/g,Hf).getRegex(),jf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lk=Jt(jf,"gu").replace(/notPunctSpace/g,zf).replace(/punctSpace/g,Ph).replace(/punct/g,Rs).getRegex(),hk=Jt(jf,"gu").replace(/notPunctSpace/g,ok).replace(/punctSpace/g,ik).replace(/punct/g,Hf).getRegex(),ck=Jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zf).replace(/punctSpace/g,Ph).replace(/punct/g,Rs).getRegex(),uk=Jt(/\\(punct)/,"gu").replace(/punct/g,Rs).getRegex(),dk=Jt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fk=Jt(Oh).replace("(?:-->|$)","-->").getRegex(),pk=Jt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Is=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gk=Jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Is).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Uf=Jt(/^!?\[(label)\]\[(ref)\]/).replace("label",Is).replace("ref",$h).getRegex(),Xf=Jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",$h).getRegex(),mk=Jt("reflink|nolink(?!\\()","g").replace("reflink",Uf).replace("nolink",Xf).getRegex(),Ef=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Rh={_backpedal:uo,anyPunctuation:uk,autolink:dk,blockSkip:sk,br:Nf,code:tk,del:uo,emStrongLDelim:ak,emStrongRDelimAst:lk,emStrongRDelimUnd:ck,escape:Jb,link:gk,nolink:Xf,punctuation:rk,reflink:Uf,reflinkSearch:mk,tag:pk,text:ek,url:uo},yk={...Rh,link:Jt(/^!?\[(label)\]\((.*?)\)/).replace("label",Is).getRegex(),reflink:Jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Is).getRegex()},Lh={...Rh,emStrongRDelimAst:hk,emStrongLDelim:nk,url:Jt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ef).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Jt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ef).getRegex()},xk={...Lh,br:Jt(Nf).replace("{2,}","*").getRegex(),text:Jt(Lh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$s={normal:Dh,gfm:Zb,pedantic:Qb},lo={normal:Rh,gfm:Lh,breaks:xk,pedantic:yk},Ck={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$f=(r)=>Ck[r];function Xe(r,e){if(e){if(_e.escapeTest.test(r))return r.replace(_e.escapeReplace,$f)}else if(_e.escapeTestNoEncode.test(r))return r.replace(_e.escapeReplaceNoEncode,$f);return r}function If(r){try{r=encodeURI(r).replace(_e.percentDecode,"%")}catch{return null}return r}function Of(r,e){let i=r.replace(_e.findPipe,(a,h,n)=>{let u=!1,d=h;for(;--d>=0&&n[d]==="\\";)u=!u;return u?"|":" |"}),s=i.split(_e.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(_e.slashPipe,"|");return s}function ho(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function bk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function Df(r,e,i,s,o){let a=e.href,h=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:h,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,u}function kk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
149
+ `}t(Dr,"blockHeader");function Pr(I){return I[I.length-1]===`
150
+ `?I.slice(0,-1):I}t(Pr,"dropEndingNewline");function mi(I,it){let bt=/(\n+)([^\n]*)/g,dt=function(){let At=I.indexOf(`
151
+ `);return At=At!==-1?At:I.length,bt.lastIndex=At,Ee(I.slice(0,At),it)}(),pt=I[0]===`
152
+ `||I[0]===" ",kt,yt;while(yt=bt.exec(I)){let At=yt[1],Ft=yt[2];kt=Ft[0]===" ",dt+=At+(!pt&&!kt&&Ft!==""?`
153
+ `:"")+Ee(Ft,it),pt=kt}return dt}t(mi,"foldString");function Ee(I,it){if(I===""||I[0]===" ")return I;let bt=/ [^ ]/g,dt,pt=0,kt,yt=0,At=0,Ft="";while(dt=bt.exec(I)){if(At=dt.index,At-pt>it)kt=yt>pt?yt:At,Ft+=`
154
+ `+I.slice(pt,kt),pt=kt+1;yt=At}if(Ft+=`
155
+ `,I.length-pt>it&&yt>pt)Ft+=I.slice(pt,yt)+`
156
+ `+I.slice(yt+1);else Ft+=I.slice(pt);return Ft.slice(1)}t(Ee,"foldLine");function xi(I){let it="",bt=0;for(let dt=0;dt<I.length;bt>=65536?dt+=2:dt++){bt=re(I,dt);let pt=X[bt];if(!pt&&Mt(bt)){if(it+=I[dt],bt>=65536)it+=I[dt+1]}else it+=pt||st(bt)}return it}t(xi,"escapeString");function Rr(I,it,bt){let dt="",pt=I.tag;for(let kt=0,yt=bt.length;kt<yt;kt+=1){let At=bt[kt];if(I.replacer)At=I.replacer.call(bt,String(kt),At);if(ut(I,it,At,!1,!1)||typeof At>"u"&&ut(I,it,null,!1,!1)){if(dt!=="")dt+=","+(!I.condenseFlow?" ":"");dt+=I.dump}}I.tag=pt,I.dump="["+dt+"]"}t(Rr,"writeFlowSequence");function qr(I,it,bt,dt){let pt="",kt=I.tag;for(let yt=0,At=bt.length;yt<At;yt+=1){let Ft=bt[yt];if(I.replacer)Ft=I.replacer.call(bt,String(yt),Ft);if(ut(I,it+1,Ft,!0,!0,!1,!0)||typeof Ft>"u"&&ut(I,it+1,null,!0,!0,!1,!0)){if(!dt||pt!=="")pt+=jt(I,it);if(I.dump&&n===I.dump.charCodeAt(0))pt+="-";else pt+="- ";pt+=I.dump}}I.tag=kt,I.dump=pt||"[]"}t(qr,"writeBlockSequence");function Ci(I,it,bt){let dt="",pt=I.tag,kt=Object.keys(bt);for(let yt=0,At=kt.length;yt<At;yt+=1){let Ft="";if(dt!=="")Ft+=", ";if(I.condenseFlow)Ft+='"';let It=kt[yt],Pt=bt[It];if(I.replacer)Pt=I.replacer.call(bt,It,Pt);if(!ut(I,it,It,!1,!1))continue;if(I.dump.length>1024)Ft+="? ";if(Ft+=I.dump+(I.condenseFlow?'"':"")+":"+(I.condenseFlow?"":" "),!ut(I,it,Pt,!1,!1))continue;Ft+=I.dump,dt+=Ft}I.tag=pt,I.dump="{"+dt+"}"}t(Ci,"writeFlowMapping");function k(I,it,bt,dt){let pt="",kt=I.tag,yt=Object.keys(bt);if(I.sortKeys===!0)yt.sort();else if(typeof I.sortKeys==="function")yt.sort(I.sortKeys);else if(I.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let At=0,Ft=yt.length;At<Ft;At+=1){let It="";if(!dt||pt!=="")It+=jt(I,it);let Pt=yt[At],Vt=bt[Pt];if(I.replacer)Vt=I.replacer.call(bt,Pt,Vt);if(!ut(I,it+1,Pt,!0,!0,!0))continue;let oe=I.tag!==null&&I.tag!=="?"||I.dump&&I.dump.length>1024;if(oe)if(I.dump&&n===I.dump.charCodeAt(0))It+="?";else It+="? ";if(It+=I.dump,oe)It+=jt(I,it);if(!ut(I,it+1,Vt,!0,oe))continue;if(I.dump&&n===I.dump.charCodeAt(0))It+=":";else It+=": ";It+=I.dump,pt+=It}I.tag=kt,I.dump=pt||"{}"}t(k,"writeBlockMapping");function et(I,it,bt){let dt=bt?I.explicitTypes:I.implicitTypes;for(let pt=0,kt=dt.length;pt<kt;pt+=1){let yt=dt[pt];if((yt.instanceOf||yt.predicate)&&(!yt.instanceOf||typeof it==="object"&&it instanceof yt.instanceOf)&&(!yt.predicate||yt.predicate(it))){if(bt)if(yt.multi&&yt.representName)I.tag=yt.representName(it);else I.tag=yt.tag;else I.tag="?";if(yt.represent){let At=I.styleMap[yt.tag]||yt.defaultStyle,Ft;if(s.call(yt.represent)==="[object Function]")Ft=yt.represent(it,At);else if(o.call(yt.represent,At))Ft=yt.represent[At](it,At);else throw new e("!<"+yt.tag+'> tag resolver accepts not "'+At+'" style');I.dump=Ft}return!0}}return!1}t(et,"detectType");function ut(I,it,bt,dt,pt,kt,yt){if(I.tag=null,I.dump=bt,!et(I,bt,!1))et(I,bt,!0);let At=s.call(I.dump),Ft=dt;if(dt)dt=I.flowLevel<0||I.flowLevel>it;let It=At==="[object Object]"||At==="[object Array]",Pt,Vt;if(It)Pt=I.duplicates.indexOf(bt),Vt=Pt!==-1;if(I.tag!==null&&I.tag!=="?"||Vt||I.indent!==2&&it>0)pt=!1;if(Vt&&I.usedDuplicates[Pt])I.dump="*ref_"+Pt;else{if(It&&Vt&&!I.usedDuplicates[Pt])I.usedDuplicates[Pt]=!0;if(At==="[object Object]"){if(dt&&Object.keys(I.dump).length!==0){if(k(I,it,I.dump,pt),Vt)I.dump="&ref_"+Pt+I.dump}else if(Ci(I,it,I.dump),Vt)I.dump="&ref_"+Pt+" "+I.dump}else if(At==="[object Array]"){if(dt&&I.dump.length!==0){if(I.noArrayIndent&&!yt&&it>0)qr(I,it-1,I.dump,pt);else qr(I,it,I.dump,pt);if(Vt)I.dump="&ref_"+Pt+I.dump}else if(Rr(I,it,I.dump),Vt)I.dump="&ref_"+Pt+" "+I.dump}else if(At==="[object String]"){if(I.tag!=="?")gi(I,I.dump,it,kt,Ft)}else if(At==="[object Undefined]")return!1;else{if(I.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+At)}if(I.tag!==null&&I.tag!=="?"){let oe=encodeURI(I.tag[0]==="!"?I.tag.slice(1):I.tag).replace(/!/g,"%21");if(I.tag[0]==="!")oe="!"+oe;else if(oe.slice(0,18)==="tag:yaml.org,2002:")oe="!!"+oe.slice(18);else oe="!<"+oe+">";I.dump=oe+" "+I.dump}}return!0}t(ut,"writeNode");function gt(I,it){let bt=[],dt=[];ct(I,bt,dt);let pt=dt.length;for(let kt=0;kt<pt;kt+=1)it.duplicates.push(bt[dt[kt]]);it.usedDuplicates=Array(pt)}t(gt,"getDuplicateReferences");function ct(I,it,bt){if(I!==null&&typeof I==="object"){let dt=it.indexOf(I);if(dt!==-1){if(bt.indexOf(dt)===-1)bt.push(dt)}else if(it.push(I),Array.isArray(I))for(let pt=0,kt=I.length;pt<kt;pt+=1)ct(I[pt],it,bt);else{let pt=Object.keys(I);for(let kt=0,yt=pt.length;kt<yt;kt+=1)ct(I[pt[kt]],it,bt)}}}t(ct,"inspectNode");function Tt(I,it){it=it||{};let bt=new Wt(it);if(!bt.noRefs)gt(I,bt);let dt=I;if(bt.replacer)dt=bt.replacer.call({"":dt},"",dt);if(ut(bt,0,dt,!0,!0))return bt.dump+`
157
+ `;return""}return t(Tt,"dump2"),Rl.dump=Tt,Rl}t(Vd,"requireDumper");var jd;function Kd(){if(jd)return Ce;jd=1;let r=Gd(),e=Vd();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),Ce.Type=be(),Ce.Schema=ql(),Ce.FAILSAFE_SCHEMA=Hl(),Ce.JSON_SCHEMA=Gl(),Ce.CORE_SCHEMA=Vl(),Ce.DEFAULT_SCHEMA=Ts(),Ce.load=r.load,Ce.loadAll=r.loadAll,Ce.dump=e.dump,Ce.YAMLException=ei(),Ce.types={binary:Ql(),float:Xl(),map:zl(),null:Yl(),pairs:th(),set:eh(),timestamp:Kl(),bool:jl(),int:Ul(),merge:Zl(),omap:Jl(),seq:Nl(),str:Wl()},Ce.safeLoad=i("safeLoad","load"),Ce.safeLoadAll=i("safeLoadAll","loadAll"),Ce.safeDump=i("safeDump","dump"),Ce}t(Kd,"requireJsYaml");var ZC=Kd(),QC=Ud(ZC),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:hr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:br,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=QC;var mm=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:h}=s??{},n=r.attr("id"),u=i?.includes("dark")?"#FFFFFF":"#000000",d=t((f,p,x)=>r.append("defs").append("filter").attr("id",f).attr("height",p).attr("width",p).append("feDropShadow").attr("dx",x).attr("dy",x).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u),"dropShadow");if(d(`${n}-drop-shadow`,"130%","4"),d(`${n}-drop-shadow-small`,"150%","2"),!o)return;let c=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)},"insertLookDefs");var Zd=t((r)=>{let{handDrawnSeed:e}=m();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),JC=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),je=t((r)=>{let e=tb([...r.cssCompiledStyles||[],...r.cssStyles||[],...JC(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),tb=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),wd=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),M=t((r)=>{let{stylesArray:e}=je(r),i=[],s=[],o=[],a=[];return e.forEach((h)=>{let n=h[0];if(wd(n))i.push(h.join(":")+" !important");else{if(s.push(h.join(":")+" !important"),n.includes("stroke"))o.push(h.join(":")+" !important");if(n==="fill")a.push(h.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),_t=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=m(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:h}=je(r);return Object.assign({roughness:0.7,fill:h.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:h.get("stroke")||o,seed:s,strokeWidth:h.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:eb(h.get("stroke-dasharray"))},e)},"userNodeOverrides"),eb=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var rh=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),u=o.pop(),d={provider:o.length>0?o[0]:s,prefix:u,name:n};return e&&!Bs(d)?null:d}let a=o[0],h=a.split("-");if(h.length>1){let n={provider:s,prefix:h.shift(),name:h.join("-")};return e&&!Bs(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Bs(n,i)?null:n}return null},Bs=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var rb=Object.freeze({left:0,top:0,width:16,height:16}),ri=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ih=Object.freeze({...rb,...ri}),Qd=Object.freeze({...ih,body:"",hidden:!1});function Jd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function oh(r,e){let i=Jd(r,e);for(let s in Qd)if(s in ri){if(s in r&&!(s in i))i[s]=ri[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function tf(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(h){if(i[h])return o[h]=[];if(!(h in o)){o[h]=null;let n=s[h]&&s[h].parent,u=n&&a(n);if(u)o[h]=[n].concat(u)}return o[h]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function ef(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function h(n){a=oh(s[n]||o[n],a)}return h(e),i.forEach(h),oh(r,a)}function sh(r,e){if(r.icons[e])return ef(r,e,[]);let i=tf(r,[e])[e];return i?ef(r,e,i):null}var ib=Object.freeze({width:null,height:null}),rf=Object.freeze({...ib,...ri});var ob=/(-?[0-9.]*[0-9]+[0-9.]*)/g,sb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ah(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(ob);if(s===null||!s.length)return r;let o=[],a=s.shift(),h=sb.test(a);while(!0){if(h){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");h=!h}}function ab(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let h=r.indexOf(">",a);if(h===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(h+1)}return{defs:i,content:r}}function nb(r,e){return r?"<defs>"+r+"</defs>"+e:e}function of(r,e,i){let s=ab(r);return nb(s.defs,e+s.content+i)}var lb=(r)=>r==="unset"||r==="undefined"||r==="none";function nh(r,e){let i={...ih,...r},s={...rf,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((T)=>{let B=[],{hFlip:_,vFlip:v,rotate:E}=T;if(_)if(v)E+=2;else B.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),B.push("scale(-1 1)"),o.top=o.left=0;else if(v)B.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),B.push("scale(1 -1)"),o.top=o.left=0;let O;if(E<0)E-=Math.floor(E/4)*4;switch(E=E%4,E){case 1:O=o.height/2+o.top,B.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:O=o.width/2+o.left,B.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")")}if(E%2===1){if(o.left!==o.top)O=o.left,o.left=o.top,o.top=O;if(o.width!==o.height)O=o.width,o.width=o.height,o.height=O}if(B.length)a=of(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:h,height:n}=s,{width:u,height:d}=o,c,f;if(h===null)f=n===null?"1em":n==="auto"?d:n,c=ah(f,u/d);else c=h==="auto"?u:h,f=n===null?ah(c,d/u):n==="auto"?d:n;let p={},x=(T,B)=>{if(!lb(B))p[T]=B.toString()};x("width",c),x("height",f);let S=[o.left,o.top,u,d];return p.viewBox=S.join(" "),{attributes:p,viewBox:S,body:a}}var hb=/\sid="(\S+)"/g,sf=new Map;function cb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=sf.get(r)||0;return sf.set(r,e+1),e?`${r}${e}`:r}function lh(r){let e=[],i;while(i=hb.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=cb(o),h=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+h+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function hh(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var rA={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},ch=new Map,af=new Map,is=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)af.set(e.name,e.loader);else if("icons"in e)ch.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),nf=t(async(r,e)=>{let i=rh(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=ch.get(s);if(!o){let h=af.get(s);if(!h)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await h(),prefix:s},ch.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=sh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),_s=t(async(r)=>{try{return await nf(r),!0}catch{return!1}},"isIconAvailable"),yr=t(async(r,e,i)=>{let s;try{s=await nf(r,e?.fallbackPrefix)}catch(h){l.error(h),s=rA}let o=nh(s,e),a=hh(lh(o.body),{...o.attributes,...i});return te(a,C())},"getIconSVG");var Sf=xn(ml(),1);function Lr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let h=r.apply(this,s);return i.cache=a.set(o,h)||a,h};return i.cache=new(Lr.Cache||Map),i}Lr.Cache=Map;function ss(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function yi(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var fm="[object RegExp]",Bc="[object String]",Ic="[object Number]",_c="[object Boolean]",Sc="[object Arguments]",gm="[object Symbol]",Am="[object Date]",hm="[object Map]",bm="[object Set]",ym="[object Array]";var vm="[object ArrayBuffer]",km="[object Object]";var xm="[object DataView]",wm="[object Uint8Array]",Cm="[object Uint8ClampedArray]",Em="[object Uint16Array]",Bm="[object Uint32Array]";var Im="[object Int8Array]",_m="[object Int16Array]",Sm="[object Int32Array]";var Tm="[object Float32Array]",Dm="[object Float64Array]";function ii(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function ki(r){return ii(r)}function ff(){}function pf(r){if(ss(r))return r;if(Array.isArray(r)||ii(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function vs(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var uh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Tc(r){return typeof uh.Buffer<"u"&&uh.Buffer.isBuffer(r)}function gf(r){return r==="__proto__"}function Ls(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function mf(r,e){return oi(r,void 0,r,new Map,e)}function oi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(ss(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let h=Array(r.length);s.set(r,h);for(let n=0;n<r.length;n++)h[n]=oi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))h.index=r.index;if(Object.hasOwn(r,"input"))h.input=r.input;return h}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let h=new RegExp(r.source,r.flags);return h.lastIndex=r.lastIndex,h}if(r instanceof Map){let h=new Map;s.set(r,h);for(let[n,u]of r)h.set(n,oi(u,n,i,s,o));return h}if(r instanceof Set){let h=new Set;s.set(r,h);for(let n of r)h.add(oi(n,void 0,i,s,o));return h}if(Tc(r))return r.subarray();if(ii(r)){let h=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,h);for(let n=0;n<r.length;n++)h[n]=oi(r[n],n,i,s,o);return h}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let h=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,h),Me(h,r,i,s,o),h}if(typeof File<"u"&&r instanceof File){let h=new File([r],r.name,{type:r.type});return s.set(r,h),Me(h,r,i,s,o),h}if(typeof Blob<"u"&&r instanceof Blob){let h=new Blob([r],{type:r.type});return s.set(r,h),Me(h,r,i,s,o),h}if(r instanceof Error){let h=structuredClone(r);return s.set(r,h),h.message=r.message,h.name=r.name,h.stack=r.stack,h.cause=r.cause,h.constructor=r.constructor,Me(h,r,i,s,o),h}if(r instanceof Boolean){let h=new Boolean(r.valueOf());return s.set(r,h),Me(h,r,i,s,o),h}if(r instanceof Number){let h=new Number(r.valueOf());return s.set(r,h),Me(h,r,i,s,o),h}if(r instanceof String){let h=new String(r.valueOf());return s.set(r,h),Me(h,r,i,s,o),h}if(typeof r==="object"&&Sb(r)){let h=Object.create(Object.getPrototypeOf(r));return s.set(r,h),Me(h,r,i,s,o),h}return r}function Me(r,e,i=r,s,o){let a=[...Object.keys(e),...vs(e)];for(let h=0;h<a.length;h++){let n=a[h],u=Object.getOwnPropertyDescriptor(r,n);if(u==null||u.writable)r[n]=oi(e[n],n,i,s,o)}}function Sb(r){switch(yi(r)){case Sc:case ym:case vm:case xm:case _c:case Am:case Tm:case Dm:case Im:case _m:case Sm:case hm:case Ic:case km:case fm:case bm:case Bc:case gm:case wm:case Cm:case Em:case Bm:return!0;default:return!1}}function yf(r,e){return mf(r,(i,s,o,a)=>{let h=e?.(i,s,o,a);if(h!==void 0)return h;if(typeof r!=="object")return;if(yi(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),Me(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Ic:case Bc:case _c:{let n=new r.constructor(r?.valueOf());return Me(n,r),n}case Sc:{let n={};return Me(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function dh(r){return yf(r)}function Cd(r){return r!==null&&typeof r==="object"&&yi(r)==="[object Arguments]"}function so(r){return typeof r==="object"&&r!==null}function xf(r){return Number.isSafeInteger(r)&&r>=0}function Nm(r){return r!=null&&typeof r!=="function"&&xf(r.length)}function Cf(r){return so(r)&&Nm(r)}function bf(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let h=i[a];o=Fs(o,h,s,new Map)}return o}function Fs(r,e,i,s){if(ss(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return pf(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...vs(e)];for(let a=0;a<o.length;a++){let h=o[a];if(gf(h))continue;let n=e[h],u=r[h];if(Cd(n))n={...n};if(Cd(u))u={...u};if(Tc(n))n=dh(n);if(Array.isArray(n))if(Array.isArray(u)){let c=[],f=Reflect.ownKeys(u);for(let p=0;p<f.length;p++){let x=f[p];c[x]=u[x]}u=c}else if(Cf(u)){let c=[];for(let f=0;f<u.length;f++)c[f]=u[f];u=c}else u=[];let d=i(u,n,h,r,e,s);if(d!==void 0)r[h]=d;else if(Array.isArray(n))r[h]=Fs(u,n,i,s);else if(so(u)&&so(n)&&(Ls(u)||Ls(n)||ki(u)||ki(n)))r[h]=Fs(u,n,i,s);else if(u==null&&Ls(n))r[h]=Fs({},n,i,s);else if(u==null&&ki(n))r[h]=dh(n);else if(u===void 0||n!==void 0)r[h]=n}return r}function fh(r,...e){return bf(r,...e,ff)}var aA="​",Tb={curveBasis:vr,curveBasisClosed:gs,curveBasisOpen:ms,curveBumpX:Gi,curveBumpY:Vi,curveBundle:rl,curveCardinalClosed:il,curveCardinalOpen:ol,curveCardinal:Zi,curveCatmullRomClosed:sl,curveCatmullRomOpen:al,curveCatmullRom:Ji,curveLinear:Ia,curveLinearClosed:bs,curveMonotoneX:to,curveMonotoneY:eo,curveNatural:Qr,curveStep:Jr,curveStepAfter:io,curveStepBefore:ro},Bb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_b=t(function(r,e){let i=Tf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let h=i.map((n)=>n.args);Li(h),s=lt(s,[...h])}else s=i.args;if(!s)return;let o=bc(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),Tf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Bb.source})(?=[}][%]{2}).*
158
+ `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Wr.exec(r))!==null){if(s.index===Wr.lastIndex)Wr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],h=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:h})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),Th=t(function(r){return r.replace(Wr,"")},"removeDirectives"),vb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function As(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Tb[i]??e}t(As,"interpolateToCurve");function Bf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return Sf.sanitizeUrl(i);return i}t(Bf,"formatUrl");var Lb=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let h=0;h<s;h++)if(a=a[i[h]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function ph(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(ph,"distance");function _f(r){let e,i=0;r.forEach((o)=>{i+=ph(o,e),e=o});let s=i/2;return gh(r,s)}t(_f,"traverseEdge");function vf(r){if(r.length===1)return r[0];return _f(r)}t(vf,"calcLabelPosition");var kf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),gh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=ph(o,i);if(a===0)return i;if(a<s)s-=a;else{let h=s/a;if(h<=0)return i;if(h>=1)return{x:o.x,y:o.y};if(h>0&&h<1)return{x:kf((1-h)*i.x+h*o.x,5),y:kf((1-h)*i.y+h*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Fb=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=gh(e,25),a=r?10:5,h=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(h)*a+(e[0].x+o.x)/2,n.y=-Math.cos(h)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function Lf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=gh(s,o),h=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),u={x:0,y:0};if(e==="start_left")u.x=Math.sin(n+Math.PI)*h+(s[0].x+a.x)/2,u.y=-Math.cos(n+Math.PI)*h+(s[0].y+a.y)/2;else if(e==="end_right")u.x=Math.sin(n-Math.PI)*h+(s[0].x+a.x)/2-5,u.y=-Math.cos(n-Math.PI)*h+(s[0].y+a.y)/2-5;else if(e==="end_left")u.x=Math.sin(n)*h+(s[0].x+a.x)/2-5,u.y=-Math.cos(n)*h+(s[0].y+a.y)/2-5;else u.x=Math.sin(n)*h+(s[0].x+a.x)/2,u.y=-Math.cos(n)*h+(s[0].y+a.y)/2;return u}t(Lf,"calcTerminalLabelPosition");function Qm(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Qm,"getStylesFromArray");var wf=0,oA=t(()=>(wf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wf),"generateId");function Ff(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(Ff,"makeRandomHex");var iA=t((r)=>Ff(r.length),"random"),Mb=t(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Ab=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=Hn(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),ls=Lr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),w.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((h,n)=>{let u=ar(`${h} `,i),d=ar(a,i);if(u>e){let{hyphenatedStrings:p,remainingWord:x}=Eb(h,e,"-",i);o.push(a,...p),a=x}else if(d+u>=e)o.push(a),a=h;else a=[a,h].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((h)=>h!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Eb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],h="";return o.forEach((n,u)=>{let d=`${h}${n}`;if(ar(d,s)>=e){let f=u+1,p=o.length===f,x=`${d}${i}`;a.push(p?d:x),h=""}else h=d}),{hyphenatedStrings:a,remainingWord:h}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Ed(r,e){return Bd(r,e).height}t(Ed,"calculateTextHeight");function ar(r,e){return Bd(r,e).width}t(ar,"calculateTextWidth");var Bd=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Hn(i),h=["sans-serif",s],n=r.split(w.lineBreakRegex),u=[],d=b("body");if(!d.remove)return{width:0,height:0,lineHeight:0};let c=d.append("svg");for(let p of h){let x=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Mb();B.text=T||aA;let _=Ab(c,B).style("font-size",a).style("font-weight",o).style("font-family",p),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),x=Math.round(v.height),S.height+=x,S.lineHeight=Math.round(Math.max(S.lineHeight,x))}u.push(S)}c.remove();let f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),$b=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},Ms,Ib=t(function(r){return Ms=Ms||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ms.innerHTML=r,unescape(Ms.textContent)},"entityDecode");function Rm(r){return"str"in r}t(Rm,"isDetailedError");var Ob=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),Hn=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function ue(r,e){return fh({},r,e)}t(ue,"cleanAndMerge");var V={assignWithDepth:lt,wrapLabel:ls,calculateTextHeight:Ed,calculateTextWidth:ar,calculateTextDimensions:Bd,cleanAndMerge:ue,detectInit:_b,detectDirective:Tf,isSubstringInArray:vb,interpolateToCurve:As,calcLabelPosition:vf,calcCardinalityPosition:Fb,calcTerminalLabelPosition:Lf,formatUrl:Bf,getStylesFromArray:Qm,generateId:oA,random:iA,runFunc:Lb,entityDecode:Ib,insertTitle:Ob,isLabelCoordinateInPath:Mf,parseFontSize:Hn,InitIDGenerator:$b},Dh=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),oo=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Fn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function ae(r){return r??null}t(ae,"handleUndefinedAttr");function Mf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(Mf,"isLabelCoordinateInPath");function yh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=yh();function Pf(r){Mr=r}var co={exec:()=>null};function Qt(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let h=typeof a=="string"?a:a.source;return h=h.replace(Te.caret,"$1"),i=i.replace(o,h),s},getRegex:()=>new RegExp(i,e)};return s}var Db=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Pb=/^(?:[ \t]*(?:\n|$))+/,Rb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,uo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bh=/(?:[*+-]|\d{1,9}[.)])/,Rf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qf=Qt(Rf).replace(/bull/g,bh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Nb=Qt(Rf).replace(/bull/g,bh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),kh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,zb=/^[^\n]+/,vh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Hb=Qt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yb=Qt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bh).getRegex(),Ds="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jb=Qt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Fh).replace("tag",Ds).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wf=Qt(kh).replace("hr",uo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ds).getRegex(),Ub=Qt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Wf).getRegex(),Mh={blockquote:Ub,code:Rb,def:Hb,fences:qb,heading:Wb,hr:uo,html:jb,lheading:qf,list:Yb,newline:Pb,paragraph:Wf,table:co,text:zb},Af=Qt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",uo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ds).getRegex(),Xb={...Mh,lheading:Nb,table:Af,paragraph:Qt(kh).replace("hr",uo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Af).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ds).getRegex()},Gb={...Mh,html:Qt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:co,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Qt(kh).replace("hr",uo).replace("heading",` *#{1,6} *[^
159
+ ]`).replace("lheading",qf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Vb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Nf=/^( {2,}|\\)\n(?!\s*$)/,Zb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ps=/[\p{P}\p{S}]/u,Ah=/[\s\p{P}\p{S}]/u,zf=/[^\s\p{P}\p{S}]/u,Qb=Qt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ah).getRegex(),Hf=/(?!~)[\p{P}\p{S}]/u,Jb=/(?!~)[\s\p{P}\p{S}]/u,tk=/(?:[^\s\p{P}\p{S}]|~)/u,ek=Qt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Db?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Yf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rk=Qt(Yf,"u").replace(/punct/g,Ps).getRegex(),ik=Qt(Yf,"u").replace(/punct/g,Hf).getRegex(),jf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ok=Qt(jf,"gu").replace(/notPunctSpace/g,zf).replace(/punctSpace/g,Ah).replace(/punct/g,Ps).getRegex(),sk=Qt(jf,"gu").replace(/notPunctSpace/g,tk).replace(/punctSpace/g,Jb).replace(/punct/g,Hf).getRegex(),ak=Qt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zf).replace(/punctSpace/g,Ah).replace(/punct/g,Ps).getRegex(),nk=Qt(/\\(punct)/,"gu").replace(/punct/g,Ps).getRegex(),lk=Qt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),hk=Qt(Fh).replace("(?:-->|$)","-->").getRegex(),ck=Qt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",hk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$s=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,uk=Qt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$s).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Uf=Qt(/^!?\[(label)\]\[(ref)\]/).replace("label",$s).replace("ref",vh).getRegex(),Xf=Qt(/^!?\[(ref)\](?:\[\])?/).replace("ref",vh).getRegex(),dk=Qt("reflink|nolink(?!\\()","g").replace("reflink",Uf).replace("nolink",Xf).getRegex(),Ef=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$h={_backpedal:co,anyPunctuation:nk,autolink:lk,blockSkip:ek,br:Nf,code:Kb,del:co,emStrongLDelim:rk,emStrongRDelimAst:ok,emStrongRDelimUnd:ak,escape:Vb,link:uk,nolink:Xf,punctuation:Qb,reflink:Uf,reflinkSearch:dk,tag:ck,text:Zb,url:co},fk={...$h,link:Qt(/^!?\[(label)\]\((.*?)\)/).replace("label",$s).getRegex(),reflink:Qt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$s).getRegex()},mh={...$h,emStrongRDelimAst:sk,emStrongLDelim:ik,url:Qt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ef).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Qt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ef).getRegex()},pk={...mh,br:Qt(Nf).replace("{2,}","*").getRegex(),text:Qt(mh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Es={normal:Mh,gfm:Xb,pedantic:Gb},no={normal:$h,gfm:mh,breaks:pk,pedantic:fk},gk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$f=(r)=>gk[r];function Ue(r,e){if(e){if(Te.escapeTest.test(r))return r.replace(Te.escapeReplace,$f)}else if(Te.escapeTestNoEncode.test(r))return r.replace(Te.escapeReplaceNoEncode,$f);return r}function If(r){try{r=encodeURI(r).replace(Te.percentDecode,"%")}catch{return null}return r}function Of(r,e){let i=r.replace(Te.findPipe,(a,h,n)=>{let u=!1,d=h;for(;--d>=0&&n[d]==="\\";)u=!u;return u?"|":" |"}),s=i.split(Te.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Te.slashPipe,"|");return s}function lo(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function mk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function Df(r,e,i,s,o){let a=e.href,h=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:h,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,u}function yk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
160
160
  `).map((a)=>{let h=a.match(i.other.beginningSpace);if(h===null)return a;let[n]=h;return n.length>=o.length?a.slice(o.length):a}).join(`
161
- `)}var Os=class{options;rules;lexer;constructor(r){this.options=r||Ar}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ho(i,`
162
- `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=kk(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=ho(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:ho(e[0],`
163
- `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=ho(e[0],`
161
+ `)}var Is=class{options;rules;lexer;constructor(r){this.options=r||Mr}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:lo(i,`
162
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=yk(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=lo(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:lo(e[0],`
163
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=lo(e[0],`
164
164
  `).split(`
165
165
  `),s="",o="",a=[];for(;i.length>0;){let h=!1,n=[],u;for(u=0;u<i.length;u++)if(this.rules.other.blockquoteStart.test(i[u]))n.push(i[u]),h=!0;else if(!h)n.push(i[u]);else break;i=i.slice(u);let d=n.join(`
166
166
  `),c=d.replace(this.rules.other.blockquoteSetextReplace,`
167
167
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
168
168
  ${d}`:d,o=o?`${o}
169
- ${c}`:c;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=f,i.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let x=p,k=x.raw+`
169
+ ${c}`:c;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=f,i.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let x=p,S=x.raw+`
170
170
  `+i.join(`
171
- `),S=this.blockquote(k);a[a.length-1]=S,s=s.substring(0,s.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if(p?.type==="list"){let x=p,k=x.raw+`
171
+ `),T=this.blockquote(S);a[a.length-1]=T,s=s.substring(0,s.length-x.raw.length)+T.raw,o=o.substring(0,o.length-x.text.length)+T.text;break}else if(p?.type==="list"){let x=p,S=x.raw+`
172
172
  `+i.join(`
173
- `),S=this.list(k);a[a.length-1]=S,s=s.substring(0,s.length-p.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,i=k.substring(a.at(-1).raw.length).split(`
173
+ `),T=this.list(S);a[a.length-1]=T,s=s.substring(0,s.length-p.raw.length)+T.raw,o=o.substring(0,o.length-x.raw.length)+T.raw,i=S.substring(a.at(-1).raw.length).split(`
174
174
  `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),h=!1;for(;r;){let u=!1,d="",c="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;d=e[0],r=r.substring(d.length);let f=e[2].split(`
175
- `,1)[0].replace(this.rules.other.listReplaceTabs,(B)=>" ".repeat(3*B.length)),p=r.split(`
176
- `,1)[0],x=!f.trim(),k=0;if(this.options.pedantic?(k=2,c=f.trimStart()):x?k=e[1].length+1:(k=e[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,c=f.slice(k),k+=e[1].length),x&&this.rules.other.blankLine.test(p)&&(d+=p+`
177
- `,r=r.substring(p.length+1),u=!0),!u){let B=this.rules.other.nextBulletRegex(k),_=this.rules.other.hrRegex(k),L=this.rules.other.fencesBeginRegex(k),D=this.rules.other.headingBeginRegex(k),P=this.rules.other.htmlBeginRegex(k);for(;r;){let K=r.split(`
178
- `,1)[0],Z;if(p=K,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),Z=p):Z=p.replace(this.rules.other.tabCharGlobal," "),L.test(p)||D.test(p)||P.test(p)||B.test(p)||_.test(p))break;if(Z.search(this.rules.other.nonSpaceChar)>=k||!p.trim())c+=`
179
- `+Z.slice(k);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(f)||D.test(f)||_.test(f))break;c+=`
180
- `+p}!x&&!p.trim()&&(x=!0),d+=K+`
181
- `,r=r.substring(K.length+1),f=Z.slice(k)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(h=!0));let S=null,T;this.options.gfm&&(S=this.rules.other.listIsTask.exec(c),S&&(T=S[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!S,checked:T,loose:!1,text:c,tokens:[]}),o.raw+=d}let n=o.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){let d=o.items[u].tokens.filter((f)=>f.type==="space"),c=d.length>0&&d.some((f)=>this.rules.other.anyLine.test(f.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=Of(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
175
+ `,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),p=r.split(`
176
+ `,1)[0],x=!f.trim(),S=0;if(this.options.pedantic?(S=2,c=f.trimStart()):x?S=e[1].length+1:(S=e[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,c=f.slice(S),S+=e[1].length),x&&this.rules.other.blankLine.test(p)&&(d+=p+`
177
+ `,r=r.substring(p.length+1),u=!0),!u){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),E=this.rules.other.fencesBeginRegex(S),O=this.rules.other.headingBeginRegex(S),D=this.rules.other.htmlBeginRegex(S);for(;r;){let G=r.split(`
178
+ `,1)[0],Z;if(p=G,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),Z=p):Z=p.replace(this.rules.other.tabCharGlobal," "),E.test(p)||O.test(p)||D.test(p)||_.test(p)||v.test(p))break;if(Z.search(this.rules.other.nonSpaceChar)>=S||!p.trim())c+=`
179
+ `+Z.slice(S);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(f)||O.test(f)||v.test(f))break;c+=`
180
+ `+p}!x&&!p.trim()&&(x=!0),d+=G+`
181
+ `,r=r.substring(G.length+1),f=Z.slice(S)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(h=!0));let T=null,B;this.options.gfm&&(T=this.rules.other.listIsTask.exec(c),T&&(B=T[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!T,checked:B,loose:!1,text:c,tokens:[]}),o.raw+=d}let n=o.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){let d=o.items[u].tokens.filter((f)=>f.type==="space"),c=d.length>0&&d.some((f)=>this.rules.other.anyLine.test(f.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=Of(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
182
182
  `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let h of s)this.rules.other.tableAlignRight.test(h)?a.align.push("right"):this.rules.other.tableAlignCenter.test(h)?a.align.push("center"):this.rules.other.tableAlignLeft.test(h)?a.align.push("left"):a.align.push(null);for(let h=0;h<i.length;h++)a.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:a.align[h]});for(let h of o)a.rows.push(Of(h,a.header.length).map((n,u)=>({text:n,tokens:this.lexer.inline(n),header:!1,align:a.align[u]})));return a}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
183
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=ho(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=bk(e[2],"()");if(a===-2)return;if(a>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Df(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return Df(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,h,n=o,u=0,d=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*r.length+o);(s=d.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(h=[...a].length,s[3]||s[4]){n+=h;continue}else if((s[5]||s[6])&&o%3&&!((o+h)%3)){u+=h;continue}if(n-=h,n>0)continue;h=Math.min(h,h+n+u);let c=[...s[0]][0].length,f=r.slice(0,o+s.index+c+h);if(Math.min(o,h)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},Pe=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ar,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:_e,block:$s.normal,inline:lo.normal};this.options.pedantic?(i.block=$s.pedantic,i.inline=lo.pedantic):this.options.gfm&&(i.block=$s.gfm,this.options.breaks?i.inline=lo.breaks:i.inline=lo.gfm),this.tokenizer.rules=i}static get rules(){return{block:$s,inline:lo}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(_e.carriageReturn,`
184
- `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(_e.tabCharGlobal," ").replace(_e.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((h)=>(o=h.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let h=i.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
183
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=lo(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=mk(e[2],"()");if(a===-2)return;if(a>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Df(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return Df(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,h,n=o,u=0,d=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*r.length+o);(s=d.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(h=[...a].length,s[3]||s[4]){n+=h;continue}else if((s[5]||s[6])&&o%3&&!((o+h)%3)){u+=h;continue}if(n-=h,n>0)continue;h=Math.min(h,h+n+u);let c=[...s[0]][0].length,f=r.slice(0,o+s.index+c+h);if(Math.min(o,h)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},Oe=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mr,this.options.tokenizer=this.options.tokenizer||new Is,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Te,block:Es.normal,inline:no.normal};this.options.pedantic?(i.block=Es.pedantic,i.inline=no.pedantic):this.options.gfm&&(i.block=Es.gfm,this.options.breaks?i.inline=no.breaks:i.inline=no.gfm),this.tokenizer.rules=i}static get rules(){return{block:Es,inline:no}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Te.carriageReturn,`
184
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Te.tabCharGlobal," ").replace(Te.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((h)=>(o=h.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let h=i.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
185
185
  `:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let h=i.at(-1);h?.type==="paragraph"||h?.type==="text"?(h.raw+=(h.raw.endsWith(`
186
186
  `)?"":`
187
187
  `)+o.raw,h.text+=`
@@ -194,16 +194,16 @@ ${c}`:c;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
194
194
  `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(o),s=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let h=i.at(-1);h?.type==="text"?(h.raw+=(h.raw.endsWith(`
195
195
  `)?"":`
196
196
  `)+o.raw,h.text+=`
197
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw Error(h)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)a=o[2]?o[2].length:0,s=s.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let h=!1,n="";for(;e;){h||(n=""),h=!1;let u;if(this.options.extensions?.inline?.some((c)=>(u=c.call({lexer:this},e,i))?(e=e.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let c=i.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(u=this.tokenizer.emStrong(e,s,n)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),i.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),i.push(u);continue}let d=e;if(this.options.extensions?.startInline){let c=1/0,f=e.slice(1),p;this.options.extensions.startInline.forEach((x)=>{p=x.call({lexer:this},f),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(d=e.substring(0,c+1))}if(u=this.tokenizer.inlineText(d)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),h=!0;let c=i.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return i}},Ds=class{options;parser;constructor(r){this.options=r||Ar}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(_e.notSpaceStart)?.[0],o=r.replace(_e.endingNewline,"")+`
198
- `;return s?'<pre><code class="language-'+Xe(s)+'">'+(i?o:Xe(o,!0))+`</code></pre>
199
- `:"<pre><code>"+(i?o:Xe(o,!0))+`</code></pre>
197
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw Error(h)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)a=o[2]?o[2].length:0,s=s.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let h=!1,n="";for(;e;){h||(n=""),h=!1;let u;if(this.options.extensions?.inline?.some((c)=>(u=c.call({lexer:this},e,i))?(e=e.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let c=i.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(u=this.tokenizer.emStrong(e,s,n)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),i.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),i.push(u);continue}let d=e;if(this.options.extensions?.startInline){let c=1/0,f=e.slice(1),p;this.options.extensions.startInline.forEach((x)=>{p=x.call({lexer:this},f),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(d=e.substring(0,c+1))}if(u=this.tokenizer.inlineText(d)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),h=!0;let c=i.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return i}},Os=class{options;parser;constructor(r){this.options=r||Mr}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Te.notSpaceStart)?.[0],o=r.replace(Te.endingNewline,"")+`
198
+ `;return s?'<pre><code class="language-'+Ue(s)+'">'+(i?o:Ue(o,!0))+`</code></pre>
199
+ `:"<pre><code>"+(i?o:Ue(o,!0))+`</code></pre>
200
200
  `}blockquote({tokens:r}){return`<blockquote>
201
201
  ${this.parser.parse(r)}</blockquote>
202
202
  `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
203
203
  `}hr(r){return`<hr>
204
204
  `}list(r){let{ordered:e,start:i}=r,s="";for(let h=0;h<r.items.length;h++){let n=r.items[h];s+=this.listitem(n)}let o=e?"ol":"ul",a=e&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
205
205
  `+s+"</"+o+`>
206
- `}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+Xe(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
206
+ `}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+Ue(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
207
207
  `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
208
208
  `}table(r){let e="",i="";for(let o=0;o<r.header.length;o++)i+=this.tablecell(r.header[o]);e+=this.tablerow({text:i});let s="";for(let o=0;o<r.rows.length;o++){let a=r.rows[o];i="";for(let h=0;h<a.length;h++)i+=this.tablecell(a[h]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
209
209
  <thead>
@@ -212,48 +212,48 @@ ${this.parser.parse(r)}</blockquote>
212
212
  `}tablerow({text:r}){return`<tr>
213
213
  ${r}</tr>
214
214
  `}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
215
- `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Xe(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=If(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Xe(e)+'"'),a+=">"+s+"</a>",a}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=If(r);if(o===null)return Xe(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Xe(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Xe(r.text)}},qh=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Re=class r{options;renderer;textRenderer;constructor(e){this.options=e||Ar,this.options.renderer=this.options.renderer||new Ds,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qh}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=a,u=this.options.extensions.renderers[n.type].call({parser:this},n);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=u||"";continue}}let h=a;switch(h.type){case"space":{s+=this.renderer.space(h);continue}case"hr":{s+=this.renderer.hr(h);continue}case"heading":{s+=this.renderer.heading(h);continue}case"code":{s+=this.renderer.code(h);continue}case"table":{s+=this.renderer.table(h);continue}case"blockquote":{s+=this.renderer.blockquote(h);continue}case"list":{s+=this.renderer.list(h);continue}case"html":{s+=this.renderer.html(h);continue}case"def":{s+=this.renderer.def(h);continue}case"paragraph":{s+=this.renderer.paragraph(h);continue}case"text":{let n=h,u=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],u+=`
216
- `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{let n='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=this.options.extensions.renderers[a.type].call({parser:this},a);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=n||"";continue}}let h=a;switch(h.type){case"escape":{s+=i.text(h);break}case"html":{s+=i.html(h);break}case"link":{s+=i.link(h);break}case"image":{s+=i.image(h);break}case"strong":{s+=i.strong(h);break}case"em":{s+=i.em(h);break}case"codespan":{s+=i.codespan(h);break}case"br":{s+=i.br(h);break}case"del":{s+=i.del(h);break}case"text":{s+=i.text(h);break}default:{let n='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},co=class{options;block;constructor(r){this.options=r||Ar}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?Pe.lex:Pe.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},wk=class{defaults=Fh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Re;Renderer=Ds;TextRenderer=qh;Lexer=Pe;Tokenizer=Os;Hooks=co;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let h of a)i=i.concat(this.walkTokens(h.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((a)=>{let h=o[a].flat(1/0);i=i.concat(this.walkTokens(h,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...h){let n=o.renderer.apply(this,h);return n===!1&&(n=a.apply(this,h)),n}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let a=e[o.level];a?a.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Ds(this.defaults);for(let a in i.renderer){if(!(a in o))throw Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let h=a,n=i.renderer[h],u=o[h];o[h]=(...d)=>{let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Os(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let h=a,n=i.tokenizer[h],u=o[h];o[h]=(...d)=>{let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new co;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let h=a,n=i.hooks[h],u=o[h];co.passThroughHooks.has(a)?o[h]=(d)=>{if(this.defaults.async&&co.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await n.call(o,d);return u.call(o,f)})();let c=n.call(o,d);return u.call(o,c)}:o[h]=(...d)=>{if(this.defaults.async)return(async()=>{let f=await n.apply(o,d);return f===!1&&(f=await u.apply(o,d)),f})();let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(h){let n=[];return n.push(a.call(this,h)),o&&(n=n.concat(o.call(this,h))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Pe.lex(r,e??this.defaults)}parser(r,e){return Re.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?Pe.lex:Pe.lexInline)(h,o),u=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(u,o.walkTokens));let d=await(o.hooks?await o.hooks.provideParser():r?Re.parse:Re.parseInline)(u,o);return o.hooks?await o.hooks.postprocess(d):d})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let h=(o.hooks?o.hooks.provideLexer():r?Pe.lex:Pe.lexInline)(e,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?Re.parse:Re.parseInline)(h,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(h){return a(h)}}}onError(r,e){return(i)=>{if(i.message+=`
217
- Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Xe(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Mr=new wk;function re(r,e){return Mr.parse(r,e)}re.options=re.setOptions=function(r){return Mr.setOptions(r),re.defaults=Mr.defaults,Pf(re.defaults),re};re.getDefaults=Fh;re.defaults=Ar;re.use=function(...r){return Mr.use(...r),re.defaults=Mr.defaults,Pf(re.defaults),re};re.walkTokens=function(r,e){return Mr.walkTokens(r,e)};re.parseInline=Mr.parseInline;re.Parser=Re;re.parser=Re.parse;re.Renderer=Ds;re.TextRenderer=qh;re.Lexer=Pe;re.lexer=Pe.lex;re.Tokenizer=Os;re.Hooks=co;re.parse=re;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=re;var Cz=Re.parse,bz=Pe.lex;function Nm(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(n,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);if(d)return n.concat(d.map(function(c){var f,p;return(p=(f=c.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&p!==void 0?p:0}));return n},[]);if(o.length){var a=new RegExp(`
215
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ue(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=If(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ue(e)+'"'),a+=">"+s+"</a>",a}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=If(r);if(o===null)return Ue(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ue(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ue(r.text)}},Oh=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Pe=class r{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new Os,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Oh}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=a,u=this.options.extensions.renderers[n.type].call({parser:this},n);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=u||"";continue}}let h=a;switch(h.type){case"space":{s+=this.renderer.space(h);continue}case"hr":{s+=this.renderer.hr(h);continue}case"heading":{s+=this.renderer.heading(h);continue}case"code":{s+=this.renderer.code(h);continue}case"table":{s+=this.renderer.table(h);continue}case"blockquote":{s+=this.renderer.blockquote(h);continue}case"list":{s+=this.renderer.list(h);continue}case"html":{s+=this.renderer.html(h);continue}case"def":{s+=this.renderer.def(h);continue}case"paragraph":{s+=this.renderer.paragraph(h);continue}case"text":{let n=h,u=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],u+=`
216
+ `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{let n='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=this.options.extensions.renderers[a.type].call({parser:this},a);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=n||"";continue}}let h=a;switch(h.type){case"escape":{s+=i.text(h);break}case"html":{s+=i.html(h);break}case"link":{s+=i.link(h);break}case"image":{s+=i.image(h);break}case"strong":{s+=i.strong(h);break}case"em":{s+=i.em(h);break}case"codespan":{s+=i.codespan(h);break}case"br":{s+=i.br(h);break}case"del":{s+=i.del(h);break}case"text":{s+=i.text(h);break}default:{let n='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},ho=class{options;block;constructor(r){this.options=r||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?Oe.lex:Oe.lexInline}provideParser(){return this.block?Pe.parse:Pe.parseInline}},xk=class{defaults=yh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Pe;Renderer=Os;TextRenderer=Oh;Lexer=Oe;Tokenizer=Is;Hooks=ho;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let h of a)i=i.concat(this.walkTokens(h.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((a)=>{let h=o[a].flat(1/0);i=i.concat(this.walkTokens(h,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...h){let n=o.renderer.apply(this,h);return n===!1&&(n=a.apply(this,h)),n}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let a=e[o.level];a?a.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Os(this.defaults);for(let a in i.renderer){if(!(a in o))throw Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let h=a,n=i.renderer[h],u=o[h];o[h]=(...d)=>{let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Is(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let h=a,n=i.tokenizer[h],u=o[h];o[h]=(...d)=>{let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ho;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let h=a,n=i.hooks[h],u=o[h];ho.passThroughHooks.has(a)?o[h]=(d)=>{if(this.defaults.async&&ho.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await n.call(o,d);return u.call(o,f)})();let c=n.call(o,d);return u.call(o,c)}:o[h]=(...d)=>{if(this.defaults.async)return(async()=>{let f=await n.apply(o,d);return f===!1&&(f=await u.apply(o,d)),f})();let c=n.apply(o,d);return c===!1&&(c=u.apply(o,d)),c}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(h){let n=[];return n.push(a.call(this,h)),o&&(n=n.concat(o.call(this,h))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Oe.lex(r,e??this.defaults)}parser(r,e){return Pe.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?Oe.lex:Oe.lexInline)(h,o),u=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(u,o.walkTokens));let d=await(o.hooks?await o.hooks.provideParser():r?Pe.parse:Pe.parseInline)(u,o);return o.hooks?await o.hooks.postprocess(d):d})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let h=(o.hooks?o.hooks.provideLexer():r?Oe.lex:Oe.lexInline)(e,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?Pe.parse:Pe.parseInline)(h,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(h){return a(h)}}}onError(r,e){return(i)=>{if(i.message+=`
217
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ue(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Fr=new xk;function Jt(r,e){return Fr.parse(r,e)}Jt.options=Jt.setOptions=function(r){return Fr.setOptions(r),Jt.defaults=Fr.defaults,Pf(Jt.defaults),Jt};Jt.getDefaults=yh;Jt.defaults=Mr;Jt.use=function(...r){return Fr.use(...r),Jt.defaults=Fr.defaults,Pf(Jt.defaults),Jt};Jt.walkTokens=function(r,e){return Fr.walkTokens(r,e)};Jt.parseInline=Fr.parseInline;Jt.Parser=Pe;Jt.parser=Pe.parse;Jt.Renderer=Os;Jt.TextRenderer=Oh;Jt.Lexer=Oe;Jt.lexer=Oe.lex;Jt.Tokenizer=Is;Jt.Hooks=ho;Jt.parse=Jt;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=Jt;var Cz=Pe.parse,bz=Oe.lex;function Lm(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(n,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);if(d)return n.concat(d.map(function(c){var f,p;return(p=(f=c.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&p!==void 0?p:0}));return n},[]);if(o.length){var a=new RegExp(`
218
218
  [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");s=s.map(function(n){return n.replace(a,`
219
219
  `)})}s[0]=s[0].replace(/^\r?\n/,"");var h=s[0];return e.forEach(function(n,u){var d=h.match(/(?:^|\n)( *)$/),c=d?d[1]:"",f=n;if(typeof n==="string"&&n.includes(`
220
220
  `))f=String(n).split(`
221
221
  `).map(function(p,x){return x===0?p:"".concat(c).concat(p)}).join(`
222
- `);h+=f+s[u+1]}),h}var Nh=typeof performance<"u"&&typeof performance.now==="function",ai=t(()=>Nh?performance.now():0,"now"),Wh="\uD83E\uDDDC ",Sk="Mermaid render",Tk="Mermaid",Bk={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},$z=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=ai();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ai()-i)}}async tick(r,e){if(!this.enabled)return e();let i=ai();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ai()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:ai(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Nh&&typeof performance.mark==="function")try{performance.mark(`${Wh}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=ai();if(r.duration=e-r.start,Nh&&typeof performance.measure==="function")try{performance.measure(`${Wh}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:Sk,trackGroup:Tk,color:Bk[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],a=t((n,u)=>{let d=" ".repeat(u),c=n.duration.toFixed(1).padStart(8),f=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${c} ${f} ${d}${n.name}`);for(let p of n.children)a(p,u+1);if(n.children.length>0){let p=n.children.reduce((k,S)=>k+S.duration,0),x=n.duration-p;if(x>0.5){let k=x.toFixed(1).padStart(8);o.push(`${k} ${d} (self)`)}}},"walk");a(r,0);let h=Object.keys(this.buckets);if(h.length>0){o.push("—— buckets (summed) ——");for(let n of h)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Wh}mermaid render profile · ${s}
222
+ `);h+=f+s[u+1]}),h}var qh=typeof performance<"u"&&typeof performance.now==="function",si=t(()=>qh?performance.now():0,"now"),Ph="\uD83E\uDDDC ",Ck="Mermaid render",bk="Mermaid",kk={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},$z=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=si();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(si()-i)}}async tick(r,e){if(!this.enabled)return e();let i=si();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(si()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:si(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),qh&&typeof performance.mark==="function")try{performance.mark(`${Ph}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=si();if(r.duration=e-r.start,qh&&typeof performance.measure==="function")try{performance.measure(`${Ph}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:Ck,trackGroup:bk,color:kk[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],a=t((n,u)=>{let d=" ".repeat(u),c=n.duration.toFixed(1).padStart(8),f=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${c} ${f} ${d}${n.name}`);for(let p of n.children)a(p,u+1);if(n.children.length>0){let p=n.children.reduce((S,T)=>S+T.duration,0),x=n.duration-p;if(x>0.5){let S=x.toFixed(1).padStart(8);o.push(`${S} ${d} (self)`)}}},"walk");a(r,0);let h=Object.keys(this.buckets);if(h.length>0){o.push("—— buckets (summed) ——");for(let n of h)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Ph}mermaid render profile · ${s}
223
223
  ${o.join(`
224
224
  `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Vf(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
225
225
  `).replace(/\n{2,}/g,`
226
- `);return Nm(s)}t(Vf,"preprocessMarkdown");function Kf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Kf,"nonMarkdownToLines");function Qm(r,e={}){let i=Vf(r,e),s=re.lexer(i),o=[[]],a=0;function h(n,u="normal"){if(n.type==="text")n.text.split(`
227
- `).forEach((c,f)=>{if(f!==0)a++,o.push([]);c.split(" ").forEach((p)=>{if(p=p.replace(/&#39;/g,"'"),p)o[a].push({content:p,type:u})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((d)=>{h(d,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(h,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((u)=>{h(u)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Qm,"markdownToLines");function Zf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Zf,"nonMarkdownToHTML");function Qf(r,{markdownAutoWrap:e}={}){let i=re.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Qf,"markdownToHTML");var _k=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(d){return setTimeout(d,16)};function s(){var d=this;d.reads=[],d.writes=[],d.raf=i.bind(r),e("initialized",d)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(d){e("run tasks");var c;while(c=d.shift())c()},"runTasks"),measure:t(function(d,c){e("measure");var f=!c?d:d.bind(c);return this.reads.push(f),o(this),f},"measure"),mutate:t(function(d,c){e("mutate");var f=!c?d:d.bind(c);return this.writes.push(f),o(this),f},"mutate"),clear:t(function(d){return e("clear",d),h(this.reads,d)||h(this.writes,d)},"clear"),extend:t(function(d){if(e("extend",d),typeof d!="object")throw Error("expected object");var c=Object.create(this);if(n(c,d),c.fastdom=this,c.initialize)c.initialize();return c},"extend"),catch:null};function o(d){if(!d.scheduled)d.scheduled=!0,d.raf(a.bind(null,d)),e("flush scheduled")}t(o,"scheduleFlush");function a(d){e("flush");var{writes:c,reads:f}=d,p;try{e("flushing reads",f.length),d.runTasks(f),e("flushing writes",c.length),d.runTasks(c)}catch(x){p=x}if(d.scheduled=!1,f.length||c.length)o(d);if(p)if(e("task errored",p.message),d.catch)d.catch(p);else throw p}t(a,"flush");function h(d,c){var f=d.indexOf(c);return!!~f&&!!d.splice(f,1)}t(h,"remove");function n(d,c){for(var f in c)if(c.hasOwnProperty(f))d[f]=c[f]}t(n,"mixin");var u=r.fastdom=r.fastdom||new s;return u}(typeof window<"u"?window:globalThis),Jf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return zh(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return zh(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function zh(r,e,i,s){var{_tasks:o,fastdom:a}=r,h,n=new Promise(function(u,d){h=a[e](function(){o.delete(n);try{u(s?i.call(s):i())}catch(c){d(c)}},s)});return o.set(n,h),n}t(zh,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Jf,vk=Jf,Lk=_k.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(vk),cr=Lk;function tp(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(tp,"splitTextToChars");function ep(r,e){let i=tp(e.content);return jh(r,[],i,e.type)}t(ep,"splitWordToFitWidth");function jh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,h=[...e,o];if(r([{content:h.join(""),type:s}]))return jh(r,h,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(jh,"splitWordToFitWidthRecursion");function rp(r,e){if(r.some(({content:i})=>i.includes(`
228
- `)))throw Error("splitLineToFitWidth does not support newlines in the line");return qs(r,e)}t(rp,"splitLineToFitWidth");function qs(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},h=[...s];if(o!=="")h.push({content:o,type:"normal"});if(h.push(a),e(h))return qs(r,e,i,h);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,u]=ep(e,a);if(i.push([n]),u.content)r.unshift(u)}return qs(r,e,i)}t(qs,"splitLineToFitWidthRecursion");function Hh(r,e){if(e)r.attr("style",e)}t(Hh,"applyStyle");var Gf=16384;async function ip(r,e,i,s,o=!1,a=E(),h=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Gf)}px`),n.attr("height",`${Math.min(10*i,Gf)}px`);let u=n.append("xhtml:div"),d=Lt(e.label)?await vc(e.label.replace(w.lineBreakRegex,`
229
- `),a):te(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",f=u.append("span");if(f.html(d),Hh(f,e.labelStyle),f.attr("class",`${c} ${s}`),Hh(u,e.labelStyle),u.style("display","table-cell"),u.style("white-space","nowrap"),u.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)u.style("max-width",i+"px"),u.style("text-align","center");if(u.attr("xmlns","http://www.w3.org/1999/xhtml"),o)u.attr("class","labelBkg");let p=await cr.measure(()=>u.node().getBoundingClientRect());if(p.width===i)u.style("display","table"),u.style("white-space","break-spaces"),u.style("width",i+"px");else if(p.width<h)u.style("display","table"),u.style("width",h+"px"),u.style("text-align","center");return n.node()}t(ip,"addHtmlSpan");function Ws(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Ws,"createTspan");function op(r,e,i){let s=r.append("text"),o=Ws(s,1,e);Ns(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(op,"computeWidthOfText");function rA(r,e,i){let s=r.append("text"),o=Ws(s,1,e);Ns(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(rA,"computeDimensionOfText");function sp(r,e,i,s=!1,o=!1){let h=e.append("g"),n=h.insert("rect").attr("class","background").attr("style","stroke: none"),u=h.append("text").attr("y","-10.1");if(o)u.attr("text-anchor","middle");let d=0;for(let c of i){let f=t((x)=>op(h,1.1,x)<=r,"checkWidth"),p=f(c)?[c]:rp(c,f);for(let x of p){let k=Ws(u,d,1.1,o);Ns(k,x),d++}}if(s){let c=u.node().getBBox(),f=2;return n.attr("x",c.x-2).attr("y",c.y-2).attr("width",c.width+4).attr("height",c.height+4),h.node()}else return u.node()}t(sp,"createFormattedText");function Yh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(Yh,"decodeHTMLEntities");function Ns(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(Yh(i.content));else o.text(" "+Yh(i.content))})}t(Ns,"updateTextContentAndStyles");async function ap(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,h)=>(i.push((async()=>{let n=`${a}:${h}`;if(await vs(n))return await yr(n,void 0,{class:"label-icon"});else return`<i class='${te(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ap,"replaceIconSubstring");var bn=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:h=!0,isNode:n=!0,width:u=200,minWidth:d=0,addSvgBackground:c=!1}={},f)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",c),a){let p=h?Qf(e,f):Zf(e),x=await ap(ro(p),f),k=e.replace(/\\\\/g,"\\"),S={isNode:n,label:Lt(e)?k:x,labelStyle:i.replace("fill:","color:")};return await ip(r,S,u,o,c,f,d)}else{let p=ro(e.replace(/<br\s*\/?>/g,"<br/>")),x=h?Qm(p.replace("<br>","<br/>"),f):Kf(p),k=sp(u,r,x,e?c:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let S=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(k).attr("style",S)}else{let S=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");b(k).select("rect").attr("style",S.replace(/background:/g,"fill:"));let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(k).select("text").attr("style",T)}if(s)b(k).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else b(k).selectAll("tspan.text-outer-tspan").classed("row",!0);return k}},"createText");var Id=new Set(["redux-color","redux-dark-color"]),Fk=12,Mk=64,wt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),pt=t((r,e)=>r!=null&&Id.has(r)&&wt(e),"isColorTheme"),Ak=/^[\w-]+$/,mt=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Ak.test(e)?e:"classic"},"safeLook"),aa=t((r)=>wt(r)?r.length:0,"paletteSlotCount"),ar=t((r,e)=>{if(wt(e))return aa(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Mk?r:Fk},"colorSlotCount"),or=t((r,e,i,s)=>{if(e===void 0||!pt(i,s))return;let o=e%aa(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Uh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,h=Math.cos(a),n=Math.sin(a);for(let u of r){let[d,c]=u;u[0]=(d-s)*h-(c-o)*n+s,u[1]=(d-s)*n+(c-o)*h+o}}}function Ek(r,e){return r[0]===e[0]&&r[1]===e[1]}function $k(r,e,i,s=1){let o=i,a=Math.max(e,0.1),h=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let d of h)Uh(d,n,o);let u=function(d,c,f){let p=[];for(let _ of d){let L=[..._];Ek(L[0],L[L.length-1])||L.push([L[0][0],L[0][1]]),L.length>2&&p.push(L)}let x=[];c=Math.max(c,0.1);let k=[];for(let _ of p)for(let L=0;L<_.length-1;L++){let D=_[L],P=_[L+1];if(D[1]!==P[1]){let K=Math.min(D[1],P[1]);k.push({ymin:K,ymax:Math.max(D[1],P[1]),x:K===D[1]?D[0]:P[0],islope:(P[0]-D[0])/(P[1]-D[1])})}}if(k.sort((_,L)=>_.ymin<L.ymin?-1:_.ymin>L.ymin?1:_.x<L.x?-1:_.x>L.x?1:_.ymax===L.ymax?0:(_.ymax-L.ymax)/Math.abs(_.ymax-L.ymax)),!k.length)return x;let S=[],T=k[0].ymin,B=0;for(;S.length||k.length;){if(k.length){let _=-1;for(let L=0;L<k.length&&!(k[L].ymin>T);L++)_=L;k.splice(0,_+1).forEach((L)=>{S.push({s:T,edge:L})})}if(S=S.filter((_)=>!(_.edge.ymax<=T)),S.sort((_,L)=>_.edge.x===L.edge.x?0:(_.edge.x-L.edge.x)/Math.abs(_.edge.x-L.edge.x)),(f!==1||B%c==0)&&S.length>1)for(let _=0;_<S.length;_+=2){let L=_+1;if(L>=S.length)break;let D=S[_].edge,P=S[L].edge;x.push([[Math.round(D.x),T],[Math.round(P.x),T]])}T+=f,S.forEach((_)=>{_.edge.x=_.edge.x+f*_.edge.islope}),B++}return x}(h,a,s);if(o){for(let d of h)Uh(d,n,-o);(function(d,c,f){let p=[];d.forEach((x)=>p.push(...x)),Uh(p,c,f)})(u,n,-o)}return u}function yo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),$k(r,o,s,a||1)}class Ks{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=yo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function Zs(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class gp extends Ks{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=yo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],h=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[u,d]of s)Zs([u,d])&&a.push([[u[0]-h,u[1]+n],[...d]],[[u[0]+h,u[1]-n],[...d]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class mp extends Ks{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class yp{constructor(r){this.helper=r}fillPolygons(r,e){let i=yo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let h of r){let n=Zs(h),u=n/s,d=Math.ceil(u)-1,c=n-d*s,f=(h[0][0]+h[1][0])/2-s/4,p=Math.min(h[0][1],h[1][1]);for(let x=0;x<d;x++){let k=p+c+x*s,S=f-a+2*Math.random()*a,T=k-a+2*Math.random()*a,B=this.helper.ellipse(S,T,o,o,e);i.push(...B.ops)}}return{type:"fillSketch",ops:i}}}class xp{constructor(r){this.helper=r}fillPolygons(r,e){let i=yo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let h=Zs(a),n=Math.floor(h/(i+s)),u=(h+s-n*(i+s))/2,d=a[0],c=a[1];d[0]>c[0]&&(d=a[1],c=a[0]);let f=Math.atan((c[1]-d[1])/(c[0]-d[0]));for(let p=0;p<n;p++){let x=p*(i+s),k=x+i,S=[d[0]+x*Math.cos(f)+u*Math.cos(f),d[1]+x*Math.sin(f)+u*Math.sin(f)],T=[d[0]+k*Math.cos(f)+u*Math.cos(f),d[1]+k*Math.sin(f)+u*Math.sin(f)];o.push(...this.helper.doubleLineOps(S[0],S[1],T[0],T[1],e))}}),o}}class Cp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=yo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=Zs(o),h=Math.round(a/(2*e)),n=o[0],u=o[1];n[0]>u[0]&&(n=o[1],u=o[0]);let d=Math.atan((u[1]-n[1])/(u[0]-n[0]));for(let c=0;c<h;c++){let f=2*c*e,p=2*(c+1)*e,x=Math.sqrt(2*Math.pow(e,2)),k=[n[0]+f*Math.cos(d),n[1]+f*Math.sin(d)],S=[n[0]+p*Math.cos(d),n[1]+p*Math.sin(d)],T=[k[0]+x*Math.cos(d+Math.PI/4),k[1]+x*Math.sin(d+Math.PI/4)];s.push(...this.helper.doubleLineOps(k[0],k[1],T[0],T[1],i),...this.helper.doubleLineOps(T[0],T[1],S[0],S[1],i))}}),s}}var ve={};class bp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ik=0,Xh=1,np=2,zs={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Gh(r,e){return r.type===e}function tc(r){let e=[],i=function(h){let n=[];for(;h!=="";)if(h.match(/^([ \t\r\n,]+)/))h=h.substr(RegExp.$1.length);else if(h.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Ik,text:RegExp.$1},h=h.substr(RegExp.$1.length);else{if(!h.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Xh,text:`${parseFloat(RegExp.$1)}`},h=h.substr(RegExp.$1.length)}return n[n.length]={type:np,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Gh(a,np);){let h=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return tc("M0,0"+r);o++,h=zs[a.text],s=a.text}else Gh(a,Xh)?h=zs[s]:(o++,h=zs[a.text],s=a.text);if(!(o+h<i.length))throw Error("Path data ended short");for(let u=o;u<o+h;u++){let d=i[u];if(!Gh(d,Xh))throw Error("Param not a number: "+s+","+d.text);n[n.length]=+d.text}if(typeof zs[s]!="number")throw Error("Bad segment: "+s);{let u={key:s,data:n};e.push(u),o+=h,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function kp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:h,data:n}of r)switch(h){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"C",data:u}),e=u[4],i=u[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"Q",data:u}),e=u[2],i=u[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"S",data:u}),e=u[2],i=u[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function wp(r){let e=[],i="",s=0,o=0,a=0,h=0,n=0,u=0;for(let{key:d,data:c}of r){switch(d){case"M":e.push({key:"M",data:[...c]}),[s,o]=c,[a,h]=c;break;case"C":e.push({key:"C",data:[...c]}),s=c[4],o=c[5],n=c[2],u=c[3];break;case"L":e.push({key:"L",data:[...c]}),[s,o]=c;break;case"H":s=c[0],e.push({key:"L",data:[s,o]});break;case"V":o=c[0],e.push({key:"L",data:[s,o]});break;case"S":{let f=0,p=0;i==="C"||i==="S"?(f=s+(s-n),p=o+(o-u)):(f=s,p=o),e.push({key:"C",data:[f,p,...c]}),n=c[0],u=c[1],s=c[2],o=c[3];break}case"T":{let[f,p]=c,x=0,k=0;i==="Q"||i==="T"?(x=s+(s-n),k=o+(o-u)):(x=s,k=o);let S=s+2*(x-s)/3,T=o+2*(k-o)/3,B=f+2*(x-f)/3,_=p+2*(k-p)/3;e.push({key:"C",data:[S,T,B,_,f,p]}),n=x,u=k,s=f,o=p;break}case"Q":{let[f,p,x,k]=c,S=s+2*(f-s)/3,T=o+2*(p-o)/3,B=x+2*(f-x)/3,_=k+2*(p-k)/3;e.push({key:"C",data:[S,T,B,_,x,k]}),n=f,u=p,s=x,o=k;break}case"A":{let f=Math.abs(c[0]),p=Math.abs(c[1]),x=c[2],k=c[3],S=c[4],T=c[5],B=c[6];if(f===0||p===0)e.push({key:"C",data:[s,o,T,B,T,B]}),s=T,o=B;else if(s!==T||o!==B)Sp(s,o,T,B,f,p,x,k,S).forEach(function(_){e.push({key:"C",data:_})}),s=T,o=B;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=h}i=d}return e}function po(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function Sp(r,e,i,s,o,a,h,n,u,d){let c=(f=h,Math.PI*f/180);var f;let p=[],x=0,k=0,S=0,T=0;if(d)[x,k,S,T]=d;else{[r,e]=po(r,e,-c),[i,s]=po(i,s,-c);let N=(r-i)/2,X=(e-s)/2,tt=N*N/(o*o)+X*X/(a*a);tt>1&&(tt=Math.sqrt(tt),o*=tt,a*=tt);let U=o*o,at=a*a,st=U*at-U*X*X-at*N*N,Bt=U*X*X+at*N*N,vt=(n===u?-1:1)*Math.sqrt(Math.abs(st/Bt));S=vt*o*X/a+(r+i)/2,T=vt*-a*N/o+(e+s)/2,x=Math.asin(parseFloat(((e-T)/a).toFixed(9))),k=Math.asin(parseFloat(((s-T)/a).toFixed(9))),r<S&&(x=Math.PI-x),i<S&&(k=Math.PI-k),x<0&&(x=2*Math.PI+x),k<0&&(k=2*Math.PI+k),u&&x>k&&(x-=2*Math.PI),!u&&k>x&&(k-=2*Math.PI)}let B=k-x;if(Math.abs(B)>120*Math.PI/180){let N=k,X=i,tt=s;k=u&&k>x?x+120*Math.PI/180*1:x+120*Math.PI/180*-1,p=Sp(i=S+o*Math.cos(k),s=T+a*Math.sin(k),X,tt,o,a,h,0,u,[k,N,S,T])}B=k-x;let _=Math.cos(x),L=Math.sin(x),D=Math.cos(k),P=Math.sin(k),K=Math.tan(B/4),Z=1.3333333333333333*o*K,J=1.3333333333333333*a*K,rt=[r,e],ht=[r+Z*L,e-J*_],nt=[i+Z*P,s-J*D],ot=[i,s];if(ht[0]=2*rt[0]-ht[0],ht[1]=2*rt[1]-ht[1],d)return[ht,nt,ot].concat(p);{p=[ht,nt,ot].concat(p);let N=[];for(let X=0;X<p.length;X+=3){let tt=po(p[X][0],p[X][1],c),U=po(p[X+1][0],p[X+1][1],c),at=po(p[X+2][0],p[X+2][1],c);N.push([tt[0],tt[1],U[0],U[1],at[0],at[1]])}return N}}var Ok={randOffset:function(r,e){return Nt(r,e)},randOffsetWithRange:function(r,e,i){return Xs(r,e,i)},ellipse:function(r,e,i,s,o){let a=Bp(i,s,o);return Zh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return kr(r,e,i,s,o,!0)}};function Tp(r,e,i,s,o){return{type:"path",ops:kr(r,e,i,s,o)}}function js(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...kr(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...kr(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Tp(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Dk(r,e,i,s,o){return function(a,h){return js(a,!0,h)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function lp(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Hs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Hs(i[0],1.5*(1+0.22*e.roughness),up(e));for(let a=1;a<i.length;a++){let h=i[a];if(h.length){let n=Hs(h,1*(1+0.2*e.roughness),e),u=e.disableMultiStroke?[]:Hs(h,1.5*(1+0.22*e.roughness),up(e));for(let d of n)d.op!=="move"&&s.push(d);for(let d of u)d.op!=="move"&&o.push(d)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function Bp(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,h=Math.abs(r/2),n=Math.abs(e/2),u=1-i.curveFitting;return h+=Nt(h*u,i),n+=Nt(n*u,i),{increment:a,rx:h,ry:n}}function Zh(r,e,i,s){let[o,a]=dp(s.increment,r,e,s.rx,s.ry,1,s.increment*Xs(0.1,Xs(0.4,1,i),i),i),h=Gs(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=dp(s.increment,r,e,s.rx,s.ry,1.5,0,i),u=Gs(n,null,i);h=h.concat(u)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function hp(r,e,i,s,o,a,h,n,u){let d=r,c=e,f=Math.abs(i/2),p=Math.abs(s/2);f+=Nt(0.01*f,u),p+=Nt(0.01*p,u);let x=o,k=a;for(;x<0;)x+=2*Math.PI,k+=2*Math.PI;k-x>2*Math.PI&&(x=0,k=2*Math.PI);let S=2*Math.PI/u.curveStepCount,T=Math.min(S/2,(k-x)/2),B=fp(T,d,c,f,p,x,k,1,u);if(!u.disableMultiStroke){let _=fp(T,d,c,f,p,x,k,1.5,u);B.push(..._)}return h&&(n?B.push(...kr(d,c,d+f*Math.cos(x),c+p*Math.sin(x),u),...kr(d,c,d+f*Math.cos(k),c+p*Math.sin(k),u)):B.push({op:"lineTo",data:[d,c]},{op:"lineTo",data:[d+f*Math.cos(x),c+p*Math.sin(x)]})),{type:"path",ops:B}}function cp(r,e){let i=wp(kp(tc(r))),s=[],o=[0,0],a=[0,0];for(let{key:h,data:n}of i)switch(h){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...kr(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[u,d,c,f,p,x]=n;s.push(...Pk(u,d,c,f,p,x,a,e)),a=[p,x];break}case"Z":s.push(...kr(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Vh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Nt(o,e),s[0][1]+Nt(o,e)]});for(let h=1;h<a;h++)i.push({op:"lineTo",data:[s[h][0]+Nt(o,e),s[h][1]+Nt(o,e)]})}}return{type:"fillPath",ops:i}}function ni(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!ve[o])switch(o){case"zigzag":ve[o]||(ve[o]=new gp(s));break;case"cross-hatch":ve[o]||(ve[o]=new mp(s));break;case"dots":ve[o]||(ve[o]=new yp(s));break;case"dashed":ve[o]||(ve[o]=new xp(s));break;case"zigzag-line":ve[o]||(ve[o]=new Cp(s));break;default:o="hachure",ve[o]||(ve[o]=new Ks(s))}return ve[o]}(e,Ok).fillPolygons(r,e)}function up(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function _p(r){return r.randomizer||(r.randomizer=new bp(r.seed||0)),r.randomizer.next()}function Xs(r,e,i,s=1){return i.roughness*s*(_p(i)*(e-r)+r)}function Nt(r,e,i=1){return Xs(-r,r,e,i)}function kr(r,e,i,s,o,a=!1){let h=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Qh(r,e,i,s,o,!0,!1);if(h)return n;let u=Qh(r,e,i,s,o,!0,!0);return n.concat(u)}function Qh(r,e,i,s,o,a,h){let n=Math.pow(r-i,2)+Math.pow(e-s,2),u=Math.sqrt(n),d=1;d=u<200?1:u>500?0.4:-0.0016668*u+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=u/10);let f=c/2,p=0.2+0.2*_p(o),x=o.bowing*o.maxRandomnessOffset*(s-e)/200,k=o.bowing*o.maxRandomnessOffset*(r-i)/200;x=Nt(x,o,d),k=Nt(k,o,d);let S=[],T=()=>Nt(f,o,d),B=()=>Nt(c,o,d),_=o.preserveVertices;return a&&(h?S.push({op:"move",data:[r+(_?0:T()),e+(_?0:T())]}):S.push({op:"move",data:[r+(_?0:Nt(c,o,d)),e+(_?0:Nt(c,o,d))]})),h?S.push({op:"bcurveTo",data:[x+r+(i-r)*p+T(),k+e+(s-e)*p+T(),x+r+2*(i-r)*p+T(),k+e+2*(s-e)*p+T(),i+(_?0:T()),s+(_?0:T())]}):S.push({op:"bcurveTo",data:[x+r+(i-r)*p+B(),k+e+(s-e)*p+B(),x+r+2*(i-r)*p+B(),k+e+2*(s-e)*p+B(),i+(_?0:B()),s+(_?0:B())]}),S}function Hs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Nt(e,i),r[0][1]+Nt(e,i)]),s.push([r[0][0]+Nt(e,i),r[0][1]+Nt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Nt(e,i),r[o][1]+Nt(e,i)]),o===r.length-1&&s.push([r[o][0]+Nt(e,i),r[o][1]+Nt(e,i)]);return Gs(s,null,i)}function Gs(r,e,i){let s=r.length,o=[];if(s>3){let a=[],h=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let u=r[n];a[0]=[u[0],u[1]],a[1]=[u[0]+(h*r[n+1][0]-h*r[n-1][0])/6,u[1]+(h*r[n+1][1]-h*r[n-1][1])/6],a[2]=[r[n+1][0]+(h*r[n][0]-h*r[n+2][0])/6,r[n+1][1]+(h*r[n][1]-h*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Nt(n,i),e[1]+Nt(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Qh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function dp(r,e,i,s,o,a,h,n){let u=[],d=[];if(n.roughness===0){r/=4,d.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let c=0;c<=2*Math.PI;c+=r){let f=[e+s*Math.cos(c),i+o*Math.sin(c)];u.push(f),d.push(f)}d.push([e+s*Math.cos(0),i+o*Math.sin(0)]),d.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let c=Nt(0.5,n)-Math.PI/2;d.push([Nt(a,n)+e+0.9*s*Math.cos(c-r),Nt(a,n)+i+0.9*o*Math.sin(c-r)]);let f=2*Math.PI+c-0.01;for(let p=c;p<f;p+=r){let x=[Nt(a,n)+e+s*Math.cos(p),Nt(a,n)+i+o*Math.sin(p)];u.push(x),d.push(x)}d.push([Nt(a,n)+e+s*Math.cos(c+2*Math.PI+0.5*h),Nt(a,n)+i+o*Math.sin(c+2*Math.PI+0.5*h)]),d.push([Nt(a,n)+e+0.98*s*Math.cos(c+h),Nt(a,n)+i+0.98*o*Math.sin(c+h)]),d.push([Nt(a,n)+e+0.9*s*Math.cos(c+0.5*h),Nt(a,n)+i+0.9*o*Math.sin(c+0.5*h)])}return[d,u]}function fp(r,e,i,s,o,a,h,n,u){let d=a+Nt(0.1,u),c=[];c.push([Nt(n,u)+e+0.9*s*Math.cos(d-r),Nt(n,u)+i+0.9*o*Math.sin(d-r)]);for(let f=d;f<=h;f+=r)c.push([Nt(n,u)+e+s*Math.cos(f),Nt(n,u)+i+o*Math.sin(f)]);return c.push([e+s*Math.cos(h),i+o*Math.sin(h)]),c.push([e+s*Math.cos(h),i+o*Math.sin(h)]),Gs(c,null,u)}function Pk(r,e,i,s,o,a,h,n){let u=[],d=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],c=[0,0],f=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let x=0;x<f;x++)x===0?u.push({op:"move",data:[h[0],h[1]]}):u.push({op:"move",data:[h[0]+(p?0:Nt(d[0],n)),h[1]+(p?0:Nt(d[0],n))]}),c=p?[o,a]:[o+Nt(d[x],n),a+Nt(d[x],n)],u.push({op:"bcurveTo",data:[r+Nt(d[x],n),e+Nt(d[x],n),i+Nt(d[x],n),s+Nt(d[x],n),c[0],c[1]]});return u}function go(r){return[...r]}function pp(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(go(r[0]),go(r[1]),go(r[2]),go(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],h=1-e;s.push(go(o[0]));for(let n=1;n+2<o.length;n++){let u=o[n];a[0]=[u[0],u[1]],a[1]=[u[0]+(h*o[n+1][0]-h*o[n-1][0])/6,u[1]+(h*o[n+1][1]-h*o[n-1][1])/6],a[2]=[o[n+1][0]+(h*o[n][0]-h*o[n+2][0])/6,o[n+1][1]+(h*o[n][1]-h*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function Us(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Rk(r,e,i){let s=Us(e,i);if(s===0)return Us(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),Us(r,Er(e,i,o))}function Er(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Jh(r,e,i,s){let o=s||[];if(function(n,u){let d=n[u+0],c=n[u+1],f=n[u+2],p=n[u+3],x=3*c[0]-2*d[0]-p[0];x*=x;let k=3*c[1]-2*d[1]-p[1];k*=k;let S=3*f[0]-2*p[0]-d[0];S*=S;let T=3*f[1]-2*p[1]-d[1];return T*=T,x<S&&(x=S),k<T&&(k=T),x+k}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],h=n,Math.sqrt(Us(a,h)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let u=r[e+0],d=r[e+1],c=r[e+2],f=r[e+3],p=Er(u,d,0.5),x=Er(d,c,0.5),k=Er(c,f,0.5),S=Er(p,x,0.5),T=Er(x,k,0.5),B=Er(S,T,0.5);Jh([u,p,S,B],0,i,o),Jh([B,T,k,f],0,i,o)}var a,h;return o}function qk(r,e){return Vs(r,0,r.length,e)}function Vs(r,e,i,s,o){let a=o||[],h=r[e],n=r[i-1],u=0,d=1;for(let c=e+1;c<i-1;++c){let f=Rk(r[c],h,n);f>u&&(u=f,d=c)}return Math.sqrt(u)>s?(Vs(r,e,d+1,s,a),Vs(r,d,i,s,a)):(a.length||a.push(h),a.push(n)),a}function Kh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Jh(r,3*a,e,s);return i&&i>0?Vs(s,0,s.length,i):s}var Me="none";class mo{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[Tp(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),h=[],n=Dk(r,e,i,s,a);if(a.fill){let u=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?h.push(Vh([u],a)):h.push(ni([u],a))}return a.stroke!==Me&&h.push(n),this._d("rectangle",h,a)}ellipse(r,e,i,s,o){let a=this._o(o),h=[],n=Bp(i,s,a),u=Zh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let d=Zh(r,e,a,n).opset;d.type="fillPath",h.push(d)}else h.push(ni([u.estimatedPoints],a));return a.stroke!==Me&&h.push(u.opset),this._d("ellipse",h,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[js(r,!1,i)],i)}arc(r,e,i,s,o,a,h=!1,n){let u=this._o(n),d=[],c=hp(r,e,i,s,o,a,h,!0,u);if(h&&u.fill)if(u.fillStyle==="solid"){let f=Object.assign({},u);f.disableMultiStroke=!0;let p=hp(r,e,i,s,o,a,!0,!1,f);p.type="fillPath",d.push(p)}else d.push(function(f,p,x,k,S,T,B){let _=f,L=p,D=Math.abs(x/2),P=Math.abs(k/2);D+=Nt(0.01*D,B),P+=Nt(0.01*P,B);let K=S,Z=T;for(;K<0;)K+=2*Math.PI,Z+=2*Math.PI;Z-K>2*Math.PI&&(K=0,Z=2*Math.PI);let J=(Z-K)/B.curveStepCount,rt=[];for(let ht=K;ht<=Z;ht+=J)rt.push([_+D*Math.cos(ht),L+P*Math.sin(ht)]);return rt.push([_+D*Math.cos(Z),L+P*Math.sin(Z)]),rt.push([_,L]),ni([rt],B)}(r,e,i,s,o,a,u));return u.stroke!==Me&&d.push(c),this._d("arc",d,u)}curve(r,e){let i=this._o(e),s=[],o=lp(r,i);if(i.fill&&i.fill!==Me)if(i.fillStyle==="solid"){let a=lp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],h=r;if(h.length){let n=typeof h[0][0]=="number"?[h]:h;for(let u of n)u.length<3?a.push(...u):u.length===3?a.push(...Kh(pp([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):a.push(...Kh(pp(u),10,(1+i.roughness)/2))}a.length&&s.push(ni([a],i))}return i.stroke!==Me&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=js(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Vh([r],i)):s.push(ni([r],i))),i.stroke!==Me&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Me,a=i.stroke!==Me,h=!!(i.simplification&&i.simplification<1),n=function(d,c,f){let p=wp(kp(tc(d))),x=[],k=[],S=[0,0],T=[],B=()=>{T.length>=4&&k.push(...Kh(T,c)),T=[]},_=()=>{B(),k.length&&(x.push(k),k=[])};for(let{key:D,data:P}of p)switch(D){case"M":_(),S=[P[0],P[1]],k.push(S);break;case"L":B(),k.push([P[0],P[1]]);break;case"C":if(!T.length){let K=k.length?k[k.length-1]:S;T.push([K[0],K[1]])}T.push([P[0],P[1]]),T.push([P[2],P[3]]),T.push([P[4],P[5]]);break;case"Z":B(),k.push([S[0],S[1]])}if(_(),!f)return x;let L=[];for(let D of x){let P=qk(D,f);P.length&&L.push(P)}return L}(r,1,h?4-4*(i.simplification||1):(1+i.roughness)/2),u=cp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let d=cp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else s.push(Vh(n,i));else s.push(ni(n,i));return a&&(h?n.forEach((d)=>{s.push(js(d,!1,i))}):s.push(u)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Me};break;case"fillPath":a={d:this.opsToPath(o),stroke:Me,strokeWidth:0,fill:i.fill||Me};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Me,strokeWidth:i,fill:Me}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class vp{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new mo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let h=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,h),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((h)=>+h.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,h=!1,n){let u=this.gen.arc(r,e,i,s,o,a,h,n);return this.draw(u),u}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Ys="http://www.w3.org/2000/svg";class Lp{constructor(r,e){this.svg=r,this.gen=new mo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Ys,"g"),a=r.options.fixedDecimalPlaceDigits;for(let h of e){let n=null;switch(h.type){case"path":n=s.createElementNS(Ys,"path"),n.setAttribute("d",this.opsToPath(h,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Ys,"path"),n.setAttribute("d",this.opsToPath(h,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,h,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Ys,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,h=!1,n){let u=this.gen.arc(r,e,i,s,o,a,h,n);return this.draw(u)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new vp(r,e),svg:(r,e)=>new Lp(r,e),generator:(r)=>new mo(r),newSeed:()=>mo.newSeed()};var Wk=1,Nk=3;async function fc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!pc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let h=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[u=Y.fontSize]=jn(h),d=u*5+"px";s.style.minWidth=d,s.style.maxWidth=d}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(fc,"configureLabelImages");function pc(r){if(r.nodeType===Nk)return r.textContent?.trim()!=="";if(r.nodeType!==Wk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var Fp=3,zk=32,Hk=t(async(r,e,i)=>{let s=m(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",le(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((B)=>({text:B,cssClass:"c4-descr"}))].filter((B)=>B.text),u=e.width?Math.max(e.width-2*(e.padding??0),zk):m().flowchart?.wrappingWidth??200,c=s.c4?.wrap??!0?u:Number.POSITIVE_INFINITY,f=await Promise.all(n.map(async(B)=>{let _=a.append("g").attr("class",B.cssClass),L=await bn(_,te(ro(B.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:e.labelStyle},s);return b(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),b(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:_,box:_.node().getBBox()}})),p=Math.max(...f.map(({box:B})=>B.width),0),x=0;for(let{el:B,box:_}of f)B.attr("transform",`translate(${p/2-_.x-_.width/2}, ${x-_.y})`),x+=_.height+Fp;let k=f.length>0?x-Fp:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-p/2}, ${-k/2})`);let S=a.node().getBBox(),T=(e.padding??0)/2;return{shapeSvg:o,bbox:S,halfPadding:T,label:a}},"c4LabelHelper"),Mp=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),ee=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Hk(r,e,i);let s,o=e.useHtmlLabels||ta(m()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),h=a.insert("g").attr("class","label").attr("style",le(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let u=!!e.icon||!!e.img,d=e.labelType==="markdown",c=n&&!e.width?e.minWidth??0:0,f=await bn(h,te(ro(n),m()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||m().flowchart?.wrappingWidth,minWidth:c,classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},m()),p=(e?.padding??0)/2,x;if(o){let k=f.children[0],S=b(f);await fc(k),x=await cr.measure(()=>k.getBoundingClientRect()),x=Mp(x,c),S.attr("width",x.width),S.attr("height",x.height)}else x=await cr.measure(()=>f.getBBox()),x=Mp(x,c);if(o)h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")");else h.attr("transform","translate(0, "+-x.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:a,bbox:x,halfPadding:p,label:h}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??en(m()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await bn(o,te(ro(e),m()),{useHtmlLabels:s,width:i.width||m()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),h=i.padding/2,n;if(en(m())){let u=a.children[0],d=b(a);n=await cr.measure(()=>u.getBoundingClientRect()),d.attr("width",n.width),d.attr("height",n.height)}else n=await cr.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:h,label:o}},"insertLabel"),W=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),Et=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Qt(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Qt,"createPathFromPoints");function wr(r,e,i,s,o,a){let h=[],n=50,u=i-r,d=s-e,c=u/a,f=2*Math.PI/c,p=e+d/2;for(let x=0;x<=50;x++){let k=x/50,S=r+k*u,T=p+o*Math.sin(f*(S-r));h.push({x:S,y:T})}return h}t(wr,"generateFullSineWavePoints");function Ve(r,e,i,s,o,a){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),k=e+i*Math.sin(p);h.push({x:-x,y:-k})}return h}t(Ve,"generateCirclePoints");function lc(r){let e=Array.from(r.childNodes).filter((u)=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((u)=>u.getAttribute("d")).filter((u)=>u!==null).join(" ");i.setAttribute("d",s);let o=e.find((u)=>u.getAttribute("fill")!=="none"),a=e.find((u)=>u.getAttribute("stroke")!=="none"),h=t((u,d)=>u?.getAttribute(d)??void 0,"getAttr");if(o){let u={fill:h(o,"fill"),"fill-opacity":h(o,"fill-opacity")??"1"};Object.entries(u).forEach(([d,c])=>{if(c)i.setAttribute(d,c)})}if(a){let u={stroke:h(a,"stroke"),"stroke-width":h(a,"stroke-width")??"1","stroke-opacity":h(a,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,c])=>{if(c)i.setAttribute(d,c)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(lc,"mergePaths");var Yk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,h=r.width/2,n=r.height/2,u,d;if(Math.abs(a)*h>Math.abs(o)*n){if(a<0)n=-n;u=a===0?0:n*o/a,d=n}else{if(o<0)h=-h;u=h,d=o===0?0:h*a/o}return{x:i+u,y:s+d}},"intersectRect"),Ke=Yk;function Qp(r,e){return r.intersect(e)}t(Qp,"intersectNode");var jk=Qp;function Jp(r,e,i,s){var{x:o,y:a}=r,h=o-s.x,n=a-s.y,u=Math.sqrt(e*e*n*n+i*i*h*h),d=Math.abs(e*i*h/u);if(s.x<o)d=-d;var c=Math.abs(e*i*n/u);if(s.y<a)c=-c;return{x:o+d,y:a+c}}t(Jp,"intersectEllipse");var tg=Jp;function eg(r,e,i){return tg(r,e,e,i)}t(eg,"intersectCircle");var Uk=eg;function rg(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,h=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+h,u=o*s.x+a*s.y+h,d=0.000001;if(n!==0&&u!==0&&cc(n,u))return;let c=s.y-i.y,f=i.x-s.x,p=s.x*i.y-i.x*s.y,x=c*r.x+f*r.y+p,k=c*e.x+f*e.y+p;if(Math.abs(x)<0.000001&&Math.abs(k)<0.000001&&cc(x,k))return;let S=o*f-c*a;if(S===0)return;let T=(a*p-f*h)/S,B=(c*h-o*p)/S;return{x:T,y:B}}}t(rg,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var Xk=rg;function ig(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:h,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(c){h=Math.min(h,c.x),n=Math.min(n,c.y)});else h=Math.min(h,e.x),n=Math.min(n,e.y);let u=s-r.width/2-h,d=o-r.height/2-n;for(let c=0;c<e.length;c++){let f=e[c],p=e[c<e.length-1?c+1:0],x=Xk(r,i,{x:u+f.x,y:d+f.y},{x:u+p.x,y:d+p.y});if(x)a.push(x)}if(!a.length)return r;if(a.length>1)a.sort(function(c,f){let p=c.x-i.x,x=c.y-i.y,k=Math.sqrt(p*p+x*x),S=f.x-i.x,T=f.y-i.y,B=Math.sqrt(S*S+T*T);return k<B?-1:k===B?0:1});return a[0]}t(ig,"intersectPolygon");var Gk=ig,R={node:jk,circle:Uk,ellipse:tg,polygon:Gk,rect:Ke},Le=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Vk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let h=m(),n=en(h);return await bn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},h)},"createLabel"),qe=Vk;function og(r,e){let{labelStyles:i}=M(e);e.labelStyle=i;let s=Et(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=1,{cssStyles:n}=e,u=y.svg(a),d=_t(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")d.roughness=0;let c=u.circle(0,0,h*2,d),f=a.insert(()=>c,":first-child");return f.attr("class","anchor").attr("style",le(n)),W(e,f),e.intersect=function(p){return l.info("Circle intersect",e,h,p),R.circle(e,h,p)},a}t(og,"anchor");function uc(r,e,i,s,o,a,h){let u=(r+i)/2,d=(e+s)/2,c=Math.atan2(s-e,i-r),f=(i-r)/2,p=(s-e)/2,x=f/o,k=p/a,S=Math.sqrt(x**2+k**2);if(S>1)throw Error("The given radii are too small to create an arc between the points.");let T=Math.sqrt(1-S**2),B=u+T*a*Math.sin(c)*(h?-1:1),_=d-T*o*Math.cos(c)*(h?-1:1),L=Math.atan2((e-_)/a,(r-B)/o),P=Math.atan2((s-_)/a,(i-B)/o)-L;if(h&&P<0)P+=2*Math.PI;if(!h&&P>0)P-=2*Math.PI;let K=[];for(let Z=0;Z<20;Z++){let J=Z/19,rt=L+J*P,ht=B+o*Math.cos(rt),nt=_+a*Math.sin(rt);K.push({x:ht,y:nt})}return K}t(uc,"generateArcPoints");function sg(r,e,i){let[s,o]=[e,i].sort((a,h)=>h-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(sg,"calculateArcSagitta");async function ag(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=t((rt)=>rt+h,"calcTotalHeight"),u=t((rt)=>{let ht=rt/2;return[ht/(2.5+rt/50),ht]},"calcEllipseRadius"),{shapeSvg:d,bbox:c}=await ee(r,e,Et(e)),f=n(e?.height?e?.height:c.height),[p,x]=u(f),k=sg(f,p,x),T=(e?.width?e?.width:c.width)+a*2+k-k,B=f,{cssStyles:_}=e,L=[{x:T/2,y:-B/2},{x:-T/2,y:-B/2},...uc(-T/2,-B/2,-T/2,B/2,p,x,!1),{x:T/2,y:B/2},...uc(T/2,B/2,T/2,-B/2,p,x,!0)],D=y.svg(d),P=_t(e,{});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let K=Qt(L),Z=D.path(K,P),J=d.insert(()=>Z,":first-child");if(J.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")J.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(${p/2}, 0)`),W(e,J),e.intersect=function(rt){return R.polygon(e,L,rt)},d}t(ag,"bowTieRect");async function ng(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await ee(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=Math.max(h.width+d*2,e.width??0,80),f=Math.max(Math.min(c*0.08,12),5),p=Math.max(h.height+d*2+f,e.height??0),x=-p/2+f,k=p/2,S=c*0.72,T=[`M${-c/2},${x}`,`L${-S/2},${k}`,`A${S/2},${f} 0 0 0 ${S/2},${k}`,`L${c/2},${x}`,`A${c/2},${f} 0 0 0 ${-c/2},${x}`,"Z"].join(" "),{cssStyles:B}=e,_=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let J=y.svg(a).path(T,_t(e,{}));if(_.node()?.appendChild(J),B)_.attr("style",B)}else _.append("path").attr("d",T).attr("style",o);_.append("ellipse").attr("cx",0).attr("cy",x).attr("rx",c/2).attr("ry",f).attr("style",`fill:none;stroke:${u};stroke-width:1px`),W(e,_);let L=x+(k-x)/2;n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${L-h.height/2-(h.y-(h.top??0))})`);let D=12,P=t((Z,J,rt)=>Array.from({length:D+1},(ht,nt)=>{let ot=Math.PI-nt*Math.PI/D;return{x:Z*Math.cos(ot),y:J+rt*f*Math.sin(ot)}}),"arc"),K=[...P(c/2,x,-1),...P(S/2,k,1).reverse()];return e.intersect=function(Z){return R.polygon(e,K,Z)},a}t(ng,"bucket");var ec=20,rc=8,Kk=80,Zk=8;function lg(r){let{themeVariables:e}=m(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Zk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(lg,"getCollapsedStyle");async function hg(r,e){let i=lg(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=M(e),{shapeSvg:h,bbox:n}=await ee(r,e,Et(e)),{theme:u,themeVariables:d}=m();or(h,e.colorIndex,u,d.borderColorArray);let c=e.padding??8,f=n.height,p=Math.max(n.width+c*2,Kk,e?.width??0),x=Math.max(f+rc+ec+c*2,e?.height??0),k=-p/2,S=-x/2,T=-(rc+ec)/2,B=h.select(".label");if(B)if(e.useHtmlLabels??en(m()))B.attr("transform",`translate(${-n.width/2}, ${-n.height/2+T})`);else B.attr("transform",`translate(0, ${-n.height/2+T})`);let _;if(e.look==="handDrawn"){let Z=y.svg(h),J=_t(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),rt=Z.path(Le(k,S,p,x,i.rx),J);_=h.insert(()=>rt,":first-child"),_.attr("class","basic label-container "+i.cssClass).attr("style",le(e.cssStyles))}else if(_=h.insert("rect",":first-child"),_.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",k).attr("y",S).attr("width",p).attr("height",x).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)_.attr("stroke-width",i.strokeWidth+"px");let L=S+c+f+rc;h.append("line").attr("class","collapsed-separator").attr("x1",k+8).attr("y1",L).attr("x2",k+p-8).attr("y2",L).attr("stroke",o).attr("stroke-dasharray","3, 3");let D=L+ec/2,P=2.5,K=10;for(let Z=-1;Z<=1;Z++)h.append("circle").attr("class","collapsed-indicator").attr("cx",Z*K).attr("cy",D).attr("r",P).attr("fill",o);return W(e,_),e.calcIntersect=function(Z,J){return R.rect(Z,J)},e.intersect=function(Z){return R.rect(e,Z)},h}t(hg,"collapsedGroup");function Ze(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(Ze,"insertPolygonShape");var Qk=["right","left","up","down"],gc="point",Jk=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),t1=t((r)=>Qk.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),Ap={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[gc]:()=>[{x:0,y:0}]},e1=t((r,e,i,s)=>{let o=Jk(r),a=(i.padding??0)/2,h=e.height+4*a,n=h/2,u=s??e.width+2*n+2*a,d=t1(o);return(Ap[d]??Ap[gc])({height:h,midpoint:n,padding:a,width:u})},"getArrowPoints");async function cg(r,e){let i=e,{shapeSvg:s,bbox:o}=await ee(r,i,Et(i)),a=i.padding??0,h=o.height+2*a,n=h/2,u=o.width+2*n+a,d=i.width??0,f=i.positioned&&(i.widthInColumns??1)>1&&d>u?d:u,p=e1(i.directions??[],o,i,f),x=Ze(s,f,h,p);return x.attr("style",i.style??null),W(i,x),i.intersect=function(k){return R.polygon(i,p,k)},s}t(cg,"block_arrow");async function ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await ee(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=18,f=12,p=Math.max(h.width+d*2,e.width??0,90),x=Math.max(h.height+d*2+c,e.height??0),k=-x/2,{cssStyles:S}=e,T=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let L=y.svg(a).path(Le(-p/2,k,p,x,f),_t(e,{}));if(T.node()?.appendChild(L),S)T.attr("style",S)}else T.append("rect").attr("x",-p/2).attr("y",k).attr("width",p).attr("height",x).attr("rx",f).attr("ry",f).attr("style",o);T.append("line").attr("x1",-p/2).attr("y1",k+c).attr("x2",p/2).attr("y2",k+c).attr("style",`stroke:${u};stroke-width:1px`);for(let _=0;_<3;_++)T.append("circle").attr("cx",-p/2+12+_*9).attr("cy",k+c/2).attr("r",2.5).attr("style",`fill:${u};stroke:none`);T.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",k+4).attr("width",Math.max(p-56,10)).attr("height",c-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${u};stroke-width:1px;opacity:0.6`),W(e,T);let B=k+c+(x-c)/2;return n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${B-h.height/2-(h.y-(h.top??0))})`),e.intersect=function(_){return R.rect(e,_)},a}t(ug,"browser");var Qs=12;async function dg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,h=e.look==="neo"?24:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=(e?.width??u.width)+(e.look==="neo"?a*2:a+Qs),c=(e?.height??u.height)+(e.look==="neo"?h*2:h),f=0,p=d,x=-c,k=0,S=[{x:f+Qs,y:x},{x:p,y:x},{x:p,y:k},{x:f,y:k},{x:f,y:x+Qs},{x:f+Qs,y:x}],T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),L=_t(e,{}),D=Qt(S),P=_.path(D,L);if(T=n.insert(()=>P,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),B)T.attr("style",B)}else T=Ze(n,d,c,S);if(s)T.attr("style",s);return W(e,T),e.intersect=function(_){return R.polygon(e,S,_)},n}t(dg,"card");function fg(r,e){let{nodeStyles:i}=M(e);e.label="";let s=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),h=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),u=_t(e,{});if(e.look!=="handDrawn")u.roughness=0,u.fillStyle="solid";let d=Qt(h),c=n.path(d,u),f=s.insert(()=>c,":first-child");if(o&&e.look!=="handDrawn")f.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")f.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(p){return R.polygon(e,h,p)},s}t(fg,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,halfPadding:n}=await ee(r,e,Et(e)),u=16,d=i?.padding??n,c=Math.sqrt(h.width**2+h.height**2)/2,f=e.look==="neo"?c+u*2:c+d,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(a),S=_t(e,{}),T=k.circle(0,0,f*2,S);p=a.insert(()=>T,":first-child"),p.attr("class","basic label-container").attr("style",le(x))}else p=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",f).attr("cx",0).attr("cy",0);return W(e,p),e.calcIntersect=function(k,S){let T=k.width/2;return R.circle(k,T,S)},e.intersect=function(k){return l.info("Circle intersect",e,f,k),R.circle(e,f,k)},a}t(mc,"circle");async function pg(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:h}=await ee(r,i,s),n=o.insert("rect",":first-child"),u=i.padding??0,d=i.positioned?i.width??0:a.width+u,c=i.positioned?i.height??0:a.height+u,f=i.positioned?-d/2:-a.width/2-h,p=i.positioned?-c/2:-a.height/2-h;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",f).attr("y",p).attr("width",d).attr("height",c),W(i,n),i.intersect=function(x){return R.rect(i,x)},o}t(pg,"composite");async function gg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await ee(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=20,f=12,p=Math.max(h.width+d*2,e.width??0,90),x=Math.max(h.height+d*2+c,e.height??0),k=-x/2,{cssStyles:S}=e,T=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let L=y.svg(a).path(Le(-p/2,k,p,x,f),_t(e,{}));if(T.node()?.appendChild(L),S)T.attr("style",S)}else T.append("rect").attr("x",-p/2).attr("y",k).attr("width",p).attr("height",x).attr("rx",f).attr("ry",f).attr("style",o);T.append("text").attr("x",-p/2+12).attr("y",k+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${u}`).text(">_"),W(e,T);let B=k+c+(x-c)/2;return n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${B-h.height/2-(h.y-(h.top??0))})`),e.intersect=function(_){return R.rect(e,_)},a}t(gg,"consoleWindow");function mg(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},h={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
230
- M ${o.x},${o.y} L ${h.x},${h.y}`}t(mg,"createLine");function yg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:h}=e,n=y.svg(o),u=_t(e,{});if(e.look!=="handDrawn")u.roughness=0,u.fillStyle="solid";let d=n.circle(0,0,a*2,u),c=mg(a),f=n.path(c,u),p=o.insert(()=>d,":first-child");if(p.insert(()=>f),p.attr("class","outer-path"),h&&e.look!=="handDrawn")p.selectAll("path").attr("style",h);if(s&&e.look!=="handDrawn")p.selectAll("path").attr("style",s);return W(e,p),e.intersect=function(x){return l.info("crossedCircle intersect",e,{radius:a,point:x}),R.circle(e,a,x)},o}t(yg,"crossedCircle");function ur(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),k=e+i*Math.sin(p);h.push({x:-x,y:-k})}return h}t(ur,"generateCirclePoints");async function xg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+n,c=a.height+u,f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...ur(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...ur(d/2+f*2,-f,f,20,-180,-270),...ur(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...ur(d/2,c/2,f,20,0,90)],k=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...ur(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...ur(d/2+d*0.1,-f,f,20,-180,-270),...ur(d/2+d*0.1,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...ur(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2,y:c/2+f}],S=y.svg(o),T=_t(e,{fill:"none"});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let _=Qt(x).replace("Z",""),L=S.path(_,T),D=Qt(k),P=S.path(D,{...T}),K=o.insert("g",":first-child");if(K.insert(()=>P,":first-child").attr("stroke-opacity",0),K.insert(()=>L,":first-child"),K.attr("class","text"),p&&e.look!=="handDrawn")K.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${f}, 0)`),h.attr("transform",`translate(${-d/2+f-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return R.polygon(e,k,Z)},o}t(xg,"curlyBraceLeft");function dr(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),k=e+i*Math.sin(p);h.push({x,y:k})}return h}t(dr,"generateCirclePoints");async function Cg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+(e.look==="neo"?n*2:n),c=a.height+(e.look==="neo"?u*2:u),f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...dr(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...dr(d/2+f*2,-f,f,20,-180,-270),...dr(d/2+f*2,f,f,20,-90,-180),{x:d/2+f,y:c/2},...dr(d/2,c/2,f,20,0,90)],k=[{x:-d/2,y:-c/2-f},{x:d/2,y:-c/2-f},...dr(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...dr(d/2+f*2,-f,f,20,-180,-270),...dr(d/2+f*2,f,f,20,-90,-180),{x:d/2+f,y:c/2},...dr(d/2,c/2,f,20,0,90),{x:d/2,y:c/2+f},{x:-d/2,y:c/2+f}],S=y.svg(o),T=_t(e,{fill:"none"});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let _=Qt(x).replace("Z",""),L=S.path(_,T),D=Qt(k),P=S.path(D,{...T}),K=o.insert("g",":first-child");if(K.insert(()=>P,":first-child").attr("stroke-opacity",0),K.insert(()=>L,":first-child"),K.attr("class","text"),p&&e.look!=="handDrawn")K.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${-f}, 0)`),h.attr("transform",`translate(${-d/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return R.polygon(e,k,Z)},o}t(Cg,"curlyBraceRight");function Ce(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),k=e+i*Math.sin(p);h.push({x:-x,y:-k})}return h}t(Ce,"generateCirclePoints");async function bg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+(e.look==="neo"?n*2:n),c=a.height+(e.look==="neo"?u*2:u),f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...Ce(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...Ce(d/2+f*2,-f,f,20,-180,-270),...Ce(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...Ce(d/2,c/2,f,20,0,90)],k=[...Ce(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...Ce(-d/2-f/2,-f,f,20,0,90),...Ce(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...Ce(-d/2+f+f/2,c/2,f,30,-180,-270)],S=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...Ce(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...Ce(d/2+f*2,-f,f,20,-180,-270),...Ce(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...Ce(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2-f-f/2,y:c/2+f},...Ce(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...Ce(-d/2-f/2,-f,f,20,0,90),...Ce(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...Ce(-d/2+f+f/2,c/2,f,30,-180,-270)],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let L=Qt(x).replace("Z",""),D=T.path(L,B),K=Qt(k).replace("Z",""),Z=T.path(K,B),J=Qt(S),rt=T.path(J,{...B}),ht=o.insert("g",":first-child");if(ht.insert(()=>rt,":first-child").attr("stroke-opacity",0),ht.insert(()=>D,":first-child"),ht.insert(()=>Z,":first-child"),ht.attr("class","text"),p&&e.look!=="handDrawn")ht.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return ht.attr("transform",`translate(${f-f/4}, 0)`),h.attr("transform",`translate(${-d/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ht),e.intersect=function(nt){return R.polygon(e,S,nt)},o}t(bg,"curlyBraces");async function kg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=20,u=5,{shapeSvg:d,bbox:c}=await ee(r,e,Et(e)),f=Math.max(u,c.height+h*2,e?.height??0),p=f/2,x=p-Math.sqrt(Math.max(0,p**2-(c.height/2)**2)),k=Math.max(f/4,x),S=Math.max(n,c.width+a*2+k*2,(c.width+a*2)*1.25,e?.width??0),{cssStyles:T}=e,B=y.svg(d),_=_t(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let L=S,D=f,P=L-p,K=D/4,Z=[{x:P,y:0},{x:K,y:0},{x:0,y:D/2},{x:K,y:D},{x:P,y:D},...Ve(-P,-D/2,p,50,270,90)],J=Qt(Z),rt=B.path(J,_),ht=d.insert(()=>rt,":first-child");if(ht.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",T);if(s&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",s);return ht.attr("transform",`translate(${-S/2}, ${-f/2})`),W(e,ht),e.intersect=function(nt){return R.polygon(e,Z,nt)},d}t(kg,"curvedTrapezoid");async function wg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.padding??20,u=Math.max(a.width+n*2,e.width??0,100),d=Math.min(Math.max(u*0.23,16),56),c=d*0.27,f=Math.max(a.height+n*2,e.height?e.height-(2*d-c):0),p=Math.min(u*0.177,f*0.45),x=f+2*d-c,k=-x/2,S=k+2*d-c,T=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:B}=e;if(e.look==="handDrawn"){let J=y.svg(o),rt=_t(e,{}),ht=J.path(Le(-u/2,S,u,f,p),rt),nt=J.circle(0,k+d,d*2,rt);if(T.insert(()=>nt,":first-child"),T.insert(()=>ht,":first-child"),B)T.attr("style",B)}else T.append("rect").attr("x",-u/2).attr("y",S).attr("width",u).attr("height",f).attr("rx",p).attr("ry",p).attr("style",s),T.append("circle").attr("cx",0).attr("cy",k+d).attr("r",d).attr("style",s);W(e,T);let _=S+f/2;h.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${_-a.height/2-(a.y-(a.top??0))})`);let L=k+d,D=Math.asin(Math.min(1,(S-L)/d))*180/Math.PI,P=24,Z=[...Ve(0,-L,d,P,180+D,-D),...Ve(-(-u/2+p),-(S+p),p,12,90,0),...Ve(-(-u/2+p),-(x/2-p),p,12,360,270),...Ve(-(u/2-p),-(x/2-p),p,12,270,180),...Ve(-(u/2-p),-(S+p),p,12,180,90)];return e.intersect=function(J){return R.polygon(e,Z,J)},o}t(wg,"person");var r1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),i1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),o1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Ep=8,$p=8;async function Sg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,h=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-h,e.width<$p)e.width=$p}if(e.height){let _=n/2/(2.5+n/50);if(e.height=e.height-a-_*3,e.height<Ep)e.height=Ep}let{shapeSvg:u,bbox:d,label:c}=await ee(r,e,Et(e)),f=Math.max(e.width??0,d.width)+h,p=f/2,x=p/(2.5+f/50),k=Math.max(e.height??0,d.height)+a+x,S,{cssStyles:T}=e;if(e.look==="handDrawn"){let B=y.svg(u),_=i1(0,0,f,k,p,x),L=o1(0,x,f,k,p,x),D=_t(e,{}),P=B.path(_,D),K=B.path(L,_t(e,{fill:"none"}));if(S=u.insert(()=>K,":first-child"),S=u.insert(()=>P,":first-child"),S.attr("class","basic label-container"),T)S.attr("style",T)}else{let B=r1(0,0,f,k,p,x);S=u.insert("path",":first-child").attr("d",B).attr("class","basic label-container outer-path").attr("style",le(T)).attr("style",s)}return S.attr("label-offset-y",x),S.attr("transform",`translate(${-f/2}, ${-(k/2+x)})`),W(e,S),c.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+(e.padding??0)/1.5-(d.y-(d.top??0))})`),e.intersect=function(B){let _=R.rect(e,B),L=_.x-(e.x??0);if(p!=0&&(Math.abs(L)<(e.width??0)/2||Math.abs(L)==(e.width??0)/2&&Math.abs(_.y-(e.y??0))>(e.height??0)/2-x)){let D=x*x*(1-L*L/(p*p));if(D>0)D=Math.sqrt(D);if(D=x-D,B.y-(e.y??0)>0)D=-D;_.y+=D}return _},u}t(Sg,"cylinder");async function di(r,e,i){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h}=await ee(r,e,Et(e)),n=Math.max(h.width+i.labelPaddingX*2,e?.width||0),u=Math.max(h.height+i.labelPaddingY*2,e?.height||0),d=-n/2,c=-u/2,f,{rx:p,ry:x}=e,{cssStyles:k}=e;if(i?.rx&&i.ry)p=i.rx,x=i.ry;if(e.look==="handDrawn"){let S=y.svg(a),T=_t(e,{}),B=p||x?S.path(Le(d,c,n,u,p||0),T):S.rectangle(d,c,n,u,T);f=a.insert(()=>B,":first-child"),f.attr("class","basic label-container").attr("style",le(k))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",o).attr("rx",le(p)).attr("ry",le(x)).attr("x",d).attr("y",c).attr("width",n).attr("height",u);return W(e,f,e.look==="handDrawn"?void 0:{width:n,height:u}),e.calcIntersect=function(S,T){return R.rect(S,T)},e.intersect=function(S){return R.rect(e,S)},a}t(di,"drawRect");async function Tg(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:h,height:n}=e,u={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},d=await di(r,e,u);if(e.look==="handDrawn"){let x=y.svg(d),k=_t(e,{}),S=d.select(".basic.label-container > path:nth-child(2)"),T=S.node();if(!T)return d;let B=null;if(T instanceof SVGGraphicsElement)B=T.getBBox();else return d;return d.insert(()=>x.line(B.x,B.y,B.x+B.width,B.y,k),".basic.label-container g.label"),d.insert(()=>x.line(B.x,B.y+B.height,B.x+B.width,B.y+B.height,k),".basic.label-container g.label"),S.remove(),d}let c=d.select(".basic.label-container"),f=(Number(c.attr("width"))||h)??0,p=(Number(c.attr("height"))||n)??0;if(f>0&&p>0)c.attr("stroke-dasharray",`${f} ${p}`);return d}t(Tg,"datastore");async function Bg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=n.width+o,c=n.height+a,f=c*0.2,p=-d/2,x=-c/2-f/2,{cssStyles:k}=e,S=y.svg(h),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:p,y:x+f},{x:-p,y:x+f},{x:-p,y:-x},{x:p,y:-x},{x:p,y:x},{x:-p,y:x},{x:-p,y:x+f}],_=S.polygon(B.map((D)=>[D.x,D.y]),T),L=h.insert(()=>_,":first-child");if(L.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")L.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")L.selectAll("path").attr("style",s);return u.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${x+f+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,L),e.intersect=function(D){return R.rect(e,D)},h}t(Bg,"dividedRectangle");async function _g(r,e){let{labelStyles:i,nodeStyles:s}=M(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,h=e.look==="neo"?16:a,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.sqrt(u.width**2+u.height**2)/2,c=(e?.width?e?.width/2:d)+(h??0),f=c+o,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(n),S=_t(e,{roughness:0.2,strokeWidth:2.5}),T=_t(e,{roughness:0.2,strokeWidth:1.5}),B=k.circle(0,0,f*2,S),_=k.circle(0,0,c*2,T);p=n.insert("g",":first-child"),p.attr("class",le(e.cssClasses)).attr("style",le(x)),p.node()?.appendChild(B),p.node()?.appendChild(_)}else{p=n.insert("g",":first-child");let k=p.insert("circle",":first-child"),S=p.insert("circle");p.attr("class","basic label-container").attr("style",s),k.attr("class","outer-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0),S.attr("class","inner-circle").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0)}return W(e,p),e.intersect=function(k){return l.info("DoubleCircle intersect",e,f,k),R.circle(e,f,k)},n}t(_g,"doublecircle");async function vg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h}=await ee(r,e,Et(e)),{theme:n,themeVariables:u}=m();or(o,e.colorIndex,n,u.borderColorArray);let d=h??10,c=a.width/2+d*2,f=a.height/2+d*2,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(o),S=_t(e,{}),T=k.ellipse(0,0,c*2,f*2,S);if(p=o.insert(()=>T,":first-child"),p.attr("class","basic label-container"),x)p.attr("style",x)}else p=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",c).attr("ry",f).attr("cx",0).attr("cy",0);return e.width=c*2,e.height=f*2,W(e,p),e.calcIntersect=function(k,S){let T=k.width/2,B=k.height/2;return R.ellipse(k,T,B,S)},e.intersect=function(k){return R.ellipse(e,c,f,k)},o}t(vg,"usecaseEllipse");function Lg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),h=7,{cssStyles:n}=e,u=y.svg(a),{nodeBorder:d}=i,c=_t(e,{fillStyle:"solid"});if(e.look!=="handDrawn")c.roughness=0;let f=u.circle(0,0,h*2,c),p=a.insert(()=>f,":first-child");if(p.selectAll("path").attr("style",`fill: ${d} !important;`),n&&n.length>0&&e.look!=="handDrawn")p.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")p.selectAll("path").attr("style",o);return W(e,p),e.intersect=function(x){return l.info("filledCircle intersect",e,{radius:h,point:x}),R.circle(e,h,x)},a}t(Lg,"filledCircle");var Ip=10,Op=10;async function Fg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Ip)e.height=Ip;if(e.width=(e?.width??0)-a-a/2,e.width<Op)e.width=Op}let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=(e?.width?e?.width:n.width)+(a??0),c=e?.height?e?.height:d+n.height,f=c,p=[{x:0,y:-c},{x:f,y:-c},{x:f/2,y:0}],{cssStyles:x}=e,k=y.svg(h),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=Qt(p),B=k.path(T,S),_=h.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");if(x&&e.look!=="handDrawn")_.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")_.selectChildren("path").attr("style",s);return e.width=d,e.height=c,W(e,_),u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(L){return l.info("Triangle intersect",e,p,L),R.polygon(e,p,L)},h}t(Fg,"flippedTriangle");async function Mg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.padding??12,u=Math.max(a.width+n*2,e.width??0,90),d=a.height+n*2,c=Math.max(Math.min(d*0.16,14),8),f=Math.max(d+c,e.height??0),p=f-c,x=Math.max(u*0.38,28),k=-f/2,S=[{x:-u/2,y:k},{x:-u/2+x,y:k},{x:-u/2+x,y:k+c},{x:u/2,y:k+c},{x:u/2,y:f/2},{x:-u/2,y:f/2}],T=[`M${S[0].x},${S[0].y}`,...S.slice(1).map((D)=>`L${D.x},${D.y}`),"Z"].join(" "),{cssStyles:B}=e,_;if(e.look==="handDrawn"){let P=y.svg(o).path(T,_t(e,{}));if(_=o.insert(()=>P,":first-child").attr("class","basic label-container"),B)_.attr("style",B)}else _=o.insert("path",":first-child").attr("d",T).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")W(e,_);else W(e,_,{width:u,height:f});let L=k+c+p/2;return h.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${L-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(D){return R.polygon(e,S,D)},o}t(Mg,"folder");function Ag(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=M(e);e.label="";let h=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,u=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")u=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0);let c=-1*u/2,f=-1*d/2,p=y.svg(h),x=_t(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let k=p.rectangle(c,f,u,d,x),S=h.insert(()=>k,":first-child");if(n&&e.look!=="handDrawn")S.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);W(e,S);let T=s?.padding??0;if(e.width&&e.height)e.width+=T/2||0,e.height+=T/2||0;return e.intersect=function(B){return R.rect(e,B)},h}t(Ag,"forkJoin");async function Eg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=15,a=10,h=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-h*2,e.width<o)e.width=o}let{shapeSvg:u,bbox:d}=await ee(r,e,Et(e)),c=(e?.height?e?.height:Math.max(a,d.height))+n*2,f=c/2,p=f-Math.sqrt(Math.max(0,f**2-(d.height/2)**2)),x=(e?.width?e?.width:Math.max(o,d.width)+p*2)+h*2,{cssStyles:k}=e,S=y.svg(u),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-x/2,y:-c/2},{x:x/2-f,y:-c/2},...Ve(-x/2+f,0,f,50,90,270),{x:x/2-f,y:c/2},{x:-x/2,y:c/2}],_=Qt(B),L=S.path(_,T),D=u.insert(()=>L,":first-child");if(D.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")D.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")D.selectChildren("path").attr("style",s);return W(e,D),e.intersect=function(P){return l.info("Pill intersect",e,{radius:f,point:P}),R.polygon(e,B,P)},u}t(Eg,"halfRoundedRectangle");var s1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function $g(r,e){let{labelStyles:i,nodeStyles:s}=M(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,h=70,n=32,u=e.look==="neo"?h:a,d=e.look==="neo"?n:a;if(e.width||e.height){let L=(e.height??0)/o;e.width=(e?.width??0)-2*L-d,e.height=(e.height??0)-u}let{shapeSvg:c,bbox:f}=await ee(r,e,Et(e)),p=(e?.height?e?.height:f.height)+u,x=p/o,k=(e?.width?e?.width:f.width)+2*x+d,S=[{x,y:0},{x:k-x,y:0},{x:k,y:-p/2},{x:k-x,y:-p},{x,y:-p},{x:0,y:-p/2}],T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(c),L=_t(e,{}),D=s1(0,0,k,p,x),P=_.path(D,L);if(T=c.insert(()=>P,":first-child").attr("transform",`translate(${-k/2}, ${p/2})`),B)T.attr("style",B)}else T=Ze(c,k,p,S);if(s)T.attr("style",s);return e.width=k,e.height=p,W(e,T),e.intersect=function(_){return R.polygon(e,S,_)},c}t($g,"hexagon");async function Ig(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await ee(r,e,Et(e)),a=Math.max(30,e?.width??0),h=Math.max(30,e?.height??0),{cssStyles:n}=e,u=y.svg(o),d=_t(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let c=[{x:0,y:0},{x:a,y:0},{x:0,y:h},{x:a,y:h}],f=Qt(c),p=u.path(f,d),x=o.insert(()=>p,":first-child");if(x.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")x.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")x.selectChildren("path").attr("style",s);return x.attr("transform",`translate(${-a/2}, ${-h/2})`),W(e,x),e.intersect=function(k){return l.info("Pill intersect",e,{points:c}),R.polygon(e,c,k)},o}t(Ig,"hourglass");async function Og(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,label:f}=await ee(r,e,"icon-shape default"),p=e.pos==="t",x=n,k=n,{nodeBorder:S}=i,{stylesMap:T}=Ue(e),B=-k/2,_=-x/2,L=e.label?8:0,D=y.svg(d),P=_t(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let K=D.rectangle(B,_,k,x,P),Z=Math.max(k,c.width),J=x+c.height+L,rt=D.rectangle(-Z/2,-J/2,Z,J,{...P,fill:"transparent",stroke:"none"}),ht=d.insert(()=>K,":first-child"),nt=d.insert(()=>rt);if(e.icon){let ot=d.append("g");ot.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=ot.node().getBBox(),{width:X,height:tt,x:U,y:at}=N;ot.attr("transform",`translate(${-X/2-U},${p?c.height/2+L/2-tt/2-at:-c.height/2-L/2-tt/2-at})`),ot.attr("style",`color: ${T.get("stroke")??S};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-J/2:J/2-c.height})`),ht.attr("transform",`translate(0,${p?c.height/2+L/2:-c.height/2-L/2})`),W(e,nt),e.intersect=function(ot){if(l.info("iconSquare intersect",e,ot),!e.label)return R.rect(e,ot);let N=e.x??0,X=e.y??0,tt=e.height??0,U=[];if(p)U=[{x:N-c.width/2,y:X-tt/2},{x:N+c.width/2,y:X-tt/2},{x:N+c.width/2,y:X-tt/2+c.height+L},{x:N+k/2,y:X-tt/2+c.height+L},{x:N+k/2,y:X+tt/2},{x:N-k/2,y:X+tt/2},{x:N-k/2,y:X-tt/2+c.height+L},{x:N-c.width/2,y:X-tt/2+c.height+L}];else U=[{x:N-k/2,y:X-tt/2},{x:N+k/2,y:X-tt/2},{x:N+k/2,y:X-tt/2+x},{x:N+c.width/2,y:X-tt/2+x},{x:N+c.width/2/2,y:X+tt/2},{x:N-c.width/2,y:X+tt/2},{x:N-c.width/2,y:X-tt/2+x},{x:N-k/2,y:X-tt/2+x}];return R.polygon(e,U,ot)},d}t(Og,"icon");async function Dg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,label:f}=await ee(r,e,"icon-shape default"),p=20,x=e.label?8:0,k=e.pos==="t",{nodeBorder:S,mainBkg:T}=i,{stylesMap:B}=Ue(e),_=y.svg(d),L=_t(e,{});if(e.look!=="handDrawn")L.roughness=0,L.fillStyle="solid";let D=B.get("fill");L.stroke=D??T;let P=d.append("g");if(e.icon)P.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let K=P.node().getBBox(),{width:Z,height:J,x:rt,y:ht}=K,nt=Math.max(Z,J)*Math.SQRT2+p*2,ot=_.circle(0,0,nt,L),N=Math.max(nt,c.width),X=nt+c.height+x,tt=_.rectangle(-N/2,-X/2,N,X,{...L,fill:"transparent",stroke:"none"}),U=d.insert(()=>ot,":first-child"),at=d.insert(()=>tt);return P.attr("transform",`translate(${-Z/2-rt},${k?c.height/2+x/2-J/2-ht:-c.height/2-x/2-J/2-ht})`),P.attr("style",`color: ${B.get("stroke")??S};`),f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${k?-X/2:X/2-c.height})`),U.attr("transform",`translate(0,${k?c.height/2+x/2:-c.height/2-x/2})`),W(e,at),e.intersect=function(st){return l.info("iconSquare intersect",e,st),R.rect(e,st)},d}t(Dg,"iconCircle");async function Pg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,halfPadding:f,label:p}=await ee(r,e,"icon-shape default"),x=e.pos==="t",k=n+f*2,S=n+f*2,{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ue(e),L=-S/2,D=-k/2,P=e.label?8:0,K=y.svg(d),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let J=_.get("fill");Z.stroke=J??B;let rt=K.path(Le(L,D,S,k,5),Z),ht=Math.max(S,c.width),nt=k+c.height+P,ot=K.rectangle(-ht/2,-nt/2,ht,nt,{...Z,fill:"transparent",stroke:"none"}),N=d.insert(()=>rt,":first-child").attr("class","icon-shape2"),X=d.insert(()=>ot);if(e.icon){let tt=d.append("g");tt.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let U=tt.node().getBBox(),{width:at,height:st,x:Bt,y:vt}=U;tt.attr("transform",`translate(${-at/2-Bt},${x?c.height/2+P/2-st/2-vt:-c.height/2-P/2-st/2-vt})`),tt.attr("style",`color: ${_.get("stroke")??T};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${x?-nt/2:nt/2-c.height})`),N.attr("transform",`translate(0,${x?c.height/2+P/2:-c.height/2-P/2})`),W(e,X),e.intersect=function(tt){if(l.info("iconSquare intersect",e,tt),!e.label)return R.rect(e,tt);let U=e.x??0,at=e.y??0,st=e.height??0,Bt=[];if(x)Bt=[{x:U-c.width/2,y:at-st/2},{x:U+c.width/2,y:at-st/2},{x:U+c.width/2,y:at-st/2+c.height+P},{x:U+S/2,y:at-st/2+c.height+P},{x:U+S/2,y:at+st/2},{x:U-S/2,y:at+st/2},{x:U-S/2,y:at-st/2+c.height+P},{x:U-c.width/2,y:at-st/2+c.height+P}];else Bt=[{x:U-S/2,y:at-st/2},{x:U+S/2,y:at-st/2},{x:U+S/2,y:at-st/2+k},{x:U+c.width/2,y:at-st/2+k},{x:U+c.width/2/2,y:at+st/2},{x:U-c.width/2,y:at+st/2},{x:U-c.width/2,y:at-st/2+k},{x:U-S/2,y:at-st/2+k}];return R.polygon(e,Bt,tt)},d}t(Pg,"iconRounded");async function Rg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,halfPadding:f,label:p}=await ee(r,e,"icon-shape default"),x=e.pos==="t",k=n+f*2,S=n+f*2,{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ue(e),L=-S/2,D=-k/2,P=e.label?8:0,K=y.svg(d),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let J=_.get("fill");Z.stroke=J??B;let rt=K.path(Le(L,D,S,k,0.1),Z),ht=Math.max(S,c.width),nt=k+c.height+P,ot=K.rectangle(-ht/2,-nt/2,ht,nt,{...Z,fill:"transparent",stroke:"none"}),N=d.insert(()=>rt,":first-child"),X=d.insert(()=>ot);if(e.icon){let tt=d.append("g");tt.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let U=tt.node().getBBox(),{width:at,height:st,x:Bt,y:vt}=U;tt.attr("transform",`translate(${-at/2-Bt},${x?c.height/2+P/2-st/2-vt:-c.height/2-P/2-st/2-vt})`),tt.attr("style",`color: ${_.get("stroke")??T};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${x?-nt/2:nt/2-c.height})`),N.attr("transform",`translate(0,${x?c.height/2+P/2:-c.height/2-P/2})`),W(e,X),e.intersect=function(tt){if(l.info("iconSquare intersect",e,tt),!e.label)return R.rect(e,tt);let U=e.x??0,at=e.y??0,st=e.height??0,Bt=[];if(x)Bt=[{x:U-c.width/2,y:at-st/2},{x:U+c.width/2,y:at-st/2},{x:U+c.width/2,y:at-st/2+c.height+P},{x:U+S/2,y:at-st/2+c.height+P},{x:U+S/2,y:at+st/2},{x:U-S/2,y:at+st/2},{x:U-S/2,y:at-st/2+c.height+P},{x:U-c.width/2,y:at-st/2+c.height+P}];else Bt=[{x:U-S/2,y:at-st/2},{x:U+S/2,y:at-st/2},{x:U+S/2,y:at-st/2+k},{x:U+c.width/2,y:at-st/2+k},{x:U+c.width/2/2,y:at+st/2},{x:U-c.width/2,y:at+st/2},{x:U-c.width/2,y:at-st/2+k},{x:U-S/2,y:at-st/2+k}];return R.polygon(e,Bt,tt)},d}t(Rg,"iconSquare");async function Ng(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:h}=M(e);e.labelStyle=h;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let u=Math.max(e.label?n??0:0,e?.assetWidth??o),d=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:u:u,c=e.constraint==="on"?d/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(d,n??0);let{shapeSvg:f,bbox:p,label:x}=await ee(r,e,"image-shape default"),k=e.pos==="t",S=-d/2,T=-c/2,B=e.label?8:0,_=y.svg(f),L=_t(e,{});if(e.look!=="handDrawn")L.roughness=0,L.fillStyle="solid";let D=_.rectangle(S,T,d,c,L),P=Math.max(d,p.width),K=c+p.height+B,Z=_.rectangle(-P/2,-K/2,P,K,{...L,fill:"none",stroke:"none"}),J=f.insert(()=>D,":first-child"),rt=f.insert(()=>Z);if(e.img){let ht=f.append("image");ht.attr("href",e.img),ht.attr("width",d),ht.attr("height",c),ht.attr("preserveAspectRatio","none"),ht.attr("transform",`translate(${-d/2},${k?K/2-c:-K/2})`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${k?-c/2-p.height/2-B/2:c/2-p.height/2+B/2})`),J.attr("transform",`translate(0,${k?p.height/2+B/2:-p.height/2-B/2})`),W(e,rt),e.intersect=function(ht){if(l.info("iconSquare intersect",e,ht),!e.label)return R.rect(e,ht);let nt=e.x??0,ot=e.y??0,N=e.height??0,X=[];if(k)X=[{x:nt-p.width/2,y:ot-N/2},{x:nt+p.width/2,y:ot-N/2},{x:nt+p.width/2,y:ot-N/2+p.height+B},{x:nt+d/2,y:ot-N/2+p.height+B},{x:nt+d/2,y:ot+N/2},{x:nt-d/2,y:ot+N/2},{x:nt-d/2,y:ot-N/2+p.height+B},{x:nt-p.width/2,y:ot-N/2+p.height+B}];else X=[{x:nt-d/2,y:ot-N/2},{x:nt+d/2,y:ot-N/2},{x:nt+d/2,y:ot-N/2+c},{x:nt+p.width/2,y:ot-N/2+c},{x:nt+p.width/2/2,y:ot+N/2},{x:nt-p.width/2,y:ot+N/2},{x:nt-p.width/2,y:ot-N/2+c},{x:nt-d/2,y:ot-N/2+c}];return R.polygon(e,X,ht)},f}t(Ng,"imageSquare");async function zg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a*2,e.height??0),c=Math.max(u.width+h*2,(e.width??0)-d),f=[{x:0,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:-3*d/6,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(n),S=_t(e,{}),T=Qt(f),B=k.path(T,S);if(p=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ze(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(k){return R.polygon(e,f,k)},n}t(zg,"inv_trapezoid");async function Hg(r,e){let{shapeSvg:i,bbox:s,label:o}=await ee(r,e,"label"),a=i.insert("rect",":first-child"),h=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),W(e,a),e.intersect=function(u){return R.rect(e,u)},i}t(Hg,"labelRect");async function jg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:0,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:-(3*d)/6,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(n),S=_t(e,{}),T=Qt(f),B=k.path(T,S);if(p=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ze(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(k){return R.polygon(e,f,k)},n}t(jg,"lean_left");async function Ug(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:-3*d/6,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:0,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(n),S=_t(e,{}),T=Qt(f),B=k.path(T,S);if(p=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ze(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(k){return R.polygon(e,f,k)},n}t(Ug,"lean_right");function Gg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,h=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),u=7,d=[{x:h,y:0},{x:0,y:n+u/2},{x:h-2*u,y:n+u/2},{x:0,y:2*n},{x:h,y:n-u/2},{x:2*u,y:n-u/2}],c=y.svg(o),f=_t(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let p=Qt(d),x=c.path(p,f),k=o.insert(()=>x,":first-child");if(k.attr("class","outer-path"),a&&e.look!=="handDrawn")k.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")k.selectAll("path").attr("style",s);return k.attr("transform",`translate(-${h/2},${-n})`),W(e,k),e.intersect=function(S){return l.info("lightningBolt intersect",e,S),R.polygon(e,d,S)},o}t(Gg,"lightningBolt");var a1=t((r,e,i,s,o,a,h)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+h}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),n1=t((r,e,i,s,o,a,h)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+h}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),l1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Dp=10,Pp=10;async function Qg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?24:o;if(e.width||e.height){let B=e.width??0;if(e.width=(e.width??0)-a,e.width<Pp)e.width=Pp;let L=B/2/(2.5+B/50);if(e.height=(e.height??0)-h-L*3,e.height<Dp)e.height=Dp}let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=(e?.width?e?.width:u.width)+a*2,f=c/2,p=f/(2.5+c/50),x=(e?.height?e?.height:u.height)+p+h*2,k=x*0.1,S,{cssStyles:T}=e;if(e.look==="handDrawn"){let B=y.svg(n),_=n1(0,0,c,x,f,p,k),L=l1(0,p,c,x,f,p),D=_t(e,{}),P=B.path(_,D),K=B.path(L,D);if(n.insert(()=>K,":first-child").attr("class","line"),S=n.insert(()=>P,":first-child"),S.attr("class","basic label-container"),T)S.attr("style",T)}else{let B=a1(0,0,c,x,f,p,k);S=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container outer-path").attr("style",le(T)).attr("style",s)}return S.attr("label-offset-y",p),S.attr("transform",`translate(${-c/2}, ${-(x/2+p)})`),W(e,S),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),e.intersect=function(B){let _=R.rect(e,B),L=_.x-(e.x??0);if(f!=0&&(Math.abs(L)<(e.width??0)/2||Math.abs(L)==(e.width??0)/2&&Math.abs(_.y-(e.y??0))>(e.height??0)/2-p)){let D=p*p*(1-L*L/(f*f));if(D>0)D=Math.sqrt(D);if(D=p-D,B.y-(e.y??0)>0)D=-D;_.y+=D}return _},n}t(Qg,"linedCylinder");async function tm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height){let D=e.width;if(e.width=(D??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-h*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=(e?.width?e?.width:u.width)+(a??0)*2,f=(e?.height?e?.height:u.height)+(h??0)*2,p=e.look==="neo"?f/4:f/8,x=f+p,{cssStyles:k}=e,S=y.svg(n),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-c/2-c/2*0.1,y:-x/2},{x:-c/2-c/2*0.1,y:x/2},...wr(-c/2-c/2*0.1,x/2,c/2+c/2*0.1,x/2,p,0.8),{x:c/2+c/2*0.1,y:-x/2},{x:-c/2-c/2*0.1,y:-x/2},{x:-c/2,y:-x/2},{x:-c/2,y:x/2*1.1},{x:-c/2,y:-x/2}],_=S.polygon(B.map((D)=>[D.x,D.y]),T),L=n.insert(()=>_,":first-child");if(L.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")L.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")L.selectAll("path").attr("style",s);return L.attr("transform",`translate(0,${-p/2})`),d.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*0.1/2-(u.x-(u.left??0))},${-f/2+(e.padding??0)-p-(u.y-(u.top??0))})`),W(e,L),e.intersect=function(D){return R.polygon(e,B,D)},n}t(tm,"linedWaveEdgedRect");var h1=56,ic=72,Rp=8,qp=2,c1=8,u1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Wp=Math.PI/3,Np=0.6,oc=t((r,e)=>{let i=e*Np,s=e*Math.sqrt(1-Np**2),o=Math.cos(Wp),a=-Math.sin(Wp),h=i*-a,n=r+i*o,u=s*o,d=s*a;return`M ${h-u} ${n-d} L ${h+u} ${n+d}`},"businessMarkerPathForCircle"),d1={normal:oc(-24,12),hollow:oc(-23,9),awesome:oc(-21,13),icon:"M 12 -8 L 26 -26"},zp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),Lc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,_t(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),f1=t((r,e,i,s,o,a,h=!1)=>{if(e.look==="handDrawn"){let d=y.svg(r).circle(i,s,o*2,_t(e,h?{fill:"none"}:{}));return r.insert(()=>d,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(h)n.attr("fill","none");return n},"appendActorCircle");var p1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",d1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Co(r,e,i,s){let{labelStyles:o,nodeStyles:a}=M(e);e.labelStyle=o;let h=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:u,label:d}=await ee(r,h,Et(e,`usecase-actor-variant usecase-actor-${i}`)),c=e.accessibleName??e.label;if(c)n.attr("role","img").attr("aria-label",c);d.attr("class","label actor-label usecase-actor-label");let{theme:f,themeVariables:p}=m();or(n,e.colorIndex,f,p.borderColorArray);let x,k;if(e.stereotype){let J=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=J.label.attr("class","label usecase-stereotype"),k=J.bbox}let S=n.append("g").attr("class",`usecase-actor-glyph ${u1[i]}`).attr("style",a||null);await s(S,e),p1(S,e,i);let T=e.padding??c1,B=k?.height??0,_=ic+Rp+u.height+(k?B+qp:0),L=Math.max(h1,u.width,k?.width??0)+T*2,D=_+T*2,P=-_/2;S.attr("transform",`translate(0,${P+ic/2})`);let K=P+ic+Rp;if(x&&k)K+=B/2,zp(x,k,K),K+=B/2+qp;zp(d,u,K+u.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-L/2).attr("y",-D/2).attr("width",L).attr("height",D).attr("opacity",0).attr("aria-hidden","true");return W(e,Z),e.intersect=(J)=>R.rect(e,J),n}t(Co,"renderUsecaseActor");var g1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function em(r,e){return Co(r,e,"normal",(i,s)=>{Lc(i,s,g1,"usecase-actor-stick")})}t(em,"usecaseActor");var m1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function rm(r,e){return Co(r,e,"awesome",(i,s)=>{Lc(i,s,m1,"usecase-actor-awesome-silhouette")})}t(rm,"usecaseActorAwesome");var y1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function nm(r,e){return Co(r,e,"hollow",(i,s)=>{f1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),Lc(i,s,y1,"usecase-actor-hollow-body",!0)})}t(nm,"usecaseActorHollow");var li=52,Hp=42,Yp=-2,x1=t(async(r,e)=>{let i=-li/2,s=Yp-li/2;if(e.look==="handDrawn"){let c=y.svg(r).rectangle(i,s,li,li,_t(e,{}));r.insert(()=>c,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",li).attr("height",li).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await vs(o.includes(":")?o:`fa:${o}`),h=await yr(o,{height:Hp,width:Hp,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${h}</g>`),u=n.node()?.getBBox();if(u)n.attr("transform",`translate(${-u.width/2-u.x},${Yp-u.height/2-u.y})`)},"drawIconActor");async function Lm(r,e){return Co(r,e,"icon",x1)}t(Lm,"usecaseActorIcon");var jp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Fm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:h,bbox:n,halfPadding:u,label:d}=await ee(r,a,Et(e,"usecase-business-shape"));d.attr("class","label usecase-label");let{theme:c,themeVariables:f}=m();or(h,e.colorIndex,c,f.borderColorArray);let p,x;if(i.stereotype){let N=await Ir(h,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});p=N.label.attr("class","label usecase-stereotype"),x=N.bbox}let k=x?2:0,S=n.height+(x?.height??0)+k,T=Math.max(n.width,x?.width??0),B=u??10,_=T/2+B*2,L=S/2+B*2,D=Math.min(Math.max(B/5,1),B/2),P=T/2+D,K=_-D,Z=P/_,J=K/_,rt=L*Math.sqrt(Math.max(0,1-Z*Z)),ht=-L*Math.sqrt(Math.max(0,1-J*J));if(p&&x)jp(p,x,-S/2+x.height/2);jp(d,n,S/2-n.height/2);let nt;if(e.look==="handDrawn"){let X=y.svg(h).ellipse(0,0,_*2,L*2,_t(e,{}));nt=h.insert(()=>X,":first-child").attr("class","basic label-container usecase-business-ellipse")}else nt=h.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",_).attr("ry",L).attr("cx",0).attr("cy",0);h.append("path").attr("class","usecase-business-marker").attr("d",`M ${P} ${rt} L ${K} ${ht}`).attr("fill","none").attr("style",o||null);let ot=i.accessibleName??i.label;if(ot)h.attr("role","img").attr("aria-label",ot);return W(e,nt),e.calcIntersect=(N,X)=>R.ellipse(N,N.width/2,N.height/2,X),e.intersect=(N)=>R.ellipse(e,_,L,N),h}t(Fm,"usecaseBusiness");var sc=8,Up=4,C1=1,ac=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),b1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:C1},"numericStrokeWidth");async function Mm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=M(e),{stylesMap:a}=Ue(e);e.labelStyle=s;let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e,"usecase-json-table"));if(h.attr("role","img"),i.accessibleName)h.attr("aria-label",i.accessibleName);u.attr("class","label usecase-json-title");let d=h.append("g").attr("class","usecase-json-table-grid"),c=[];for(let N of i.jsonRows??[]){let X=await Ir(d,N.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),tt=await Ir(d,N.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});c.push({key:{label:X.label.attr("class","label usecase-json-key"),bbox:X.bbox},value:{label:tt.label.attr("class","label usecase-json-value"),bbox:tt.bbox}})}let f=Math.max(0,...c.map(({key:N})=>N.bbox.width))+sc*2,p=Math.max(0,...c.map(({value:N})=>N.bbox.width))+sc*2,x=n.width+sc*2,k=Math.max(x,f+p),S=p+Math.max(0,k-f-p),T=n.height+Up*2,B=c.map(({key:N,value:X})=>Math.max(N.bbox.height,X.bbox.height)+Up*2),_=T+B.reduce((N,X)=>N+X,0),L=b1(a.get("stroke-width")),D=k+L*2,P=_+L*2,K=-k/2,Z=-_/2,J=e.look==="handDrawn"?y.svg(h):void 0,rt=J?_t(e,{}):void 0,ht=t((N,X,tt,U,at,st)=>{if(J&&rt){let Bt=J.rectangle(tt,U,at,st,rt);return N.insert(()=>Bt,":first-child").attr("class",X)}return N.insert("rect",":first-child").attr("class",X).attr("x",tt).attr("y",U).attr("width",at).attr("height",st).attr("style",o)},"insertCell"),nt=ht(h,"label-container usecase-json-border",-D/2,-P/2,D,P);ht(d,"usecase-json-cell usecase-json-title-cell",K,Z,k,T),d.node()?.append(u.node()),ac(u,n,0,Z+T/2);let ot=Z+T;return c.forEach(({key:N,value:X},tt)=>{let U=B[tt],at=d.append("g").attr("class","usecase-json-row").attr("data-row-index",tt).attr("transform",`translate(0,${ot})`);ht(at,"usecase-json-cell usecase-json-key-cell",K,0,f,U),ht(at,"usecase-json-cell usecase-json-value-cell",K+f,0,S,U),at.node()?.append(N.label.node(),X.label.node()),ac(N.label,N.bbox,K+f/2,U/2),ac(X.label,X.bbox,K+f+S/2,U/2),ot+=U}),W(e,nt),e.intersect=(N)=>R.rect(e,N),h}t(Mm,"usecaseJsonTable");async function $m(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-h*2-2*n,10);let{shapeSvg:u,bbox:d,label:c}=await ee(r,e,Et(e)),f=(e?.width?e?.width:d.width)+a*2+2*n,p=(e?.height?e?.height:d.height)+h*2+2*n,x=f-2*n,k=p-2*n,S=-x/2,T=-k/2,{cssStyles:B}=e,_=y.svg(u),L=_t(e,{}),D=[{x:S-n,y:T+n},{x:S-n,y:T+k+n},{x:S+x-n,y:T+k+n},{x:S+x-n,y:T+k},{x:S+x,y:T+k},{x:S+x,y:T+k-n},{x:S+x+n,y:T+k-n},{x:S+x+n,y:T-n},{x:S+n,y:T-n},{x:S+n,y:T},{x:S,y:T},{x:S,y:T+n}],P=[{x:S,y:T+n},{x:S+x-n,y:T+n},{x:S+x-n,y:T+k},{x:S+x,y:T+k},{x:S+x,y:T},{x:S,y:T}];if(e.look!=="handDrawn")L.roughness=0,L.fillStyle="solid";let K=Qt(D),Z=_.path(K,L),J=Qt(P),rt=_.path(J,L);if(e.look!=="handDrawn")Z=lc(Z),rt=lc(rt);let ht=u.insert("g",":first-child");if(ht.insert(()=>Z),ht.insert(()=>rt),ht.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ht.selectAll("path").attr("style",B);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return c.attr("transform",`translate(${-(d.width/2)-n-(d.x-(d.left??0))}, ${-(d.height/2)+n-(d.y-(d.top??0))})`),W(e,ht),e.intersect=function(nt){return R.polygon(e,D,nt)},u}t($m,"multiRect");async function Om(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.padding??0,u=e.look==="neo"?16:n,d=e.look==="neo"?12:n,c=!0;if(e.width||e.height)c=!1,e.width=(e?.width??0)-u*2,e.height=(e?.height??0)-d*3;let f=Math.max(a.width,e?.width??0)+u*2,p=Math.max(a.height,e?.height??0)+d*3,x=e.look==="neo"?p/4:p/8,k=p+(c?x/2:-x/2),S=-f/2,T=-k/2,B=10,{cssStyles:_}=e,L=wr(S-B,T+k+B,S+f-B,T+k+B,x,0.8),D=L?.[L.length-1],P=[{x:S-B,y:T+B},{x:S-B,y:T+k+B},...L,{x:S+f-B,y:D.y-B},{x:S+f,y:D.y-B},{x:S+f,y:D.y-2*B},{x:S+f+B,y:D.y-2*B},{x:S+f+B,y:T-B},{x:S+B,y:T-B},{x:S+B,y:T},{x:S,y:T},{x:S,y:T+B}],K=[{x:S,y:T+B},{x:S+f-B,y:T+B},{x:S+f-B,y:D.y-B},{x:S+f,y:D.y-B},{x:S+f,y:T},{x:S,y:T}],Z=y.svg(o),J=_t(e,{});if(e.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let rt=Qt(P),ht=Z.path(rt,J),nt=Qt(K),ot=Z.path(nt,J),N=o.insert(()=>ht,":first-child");if(N.insert(()=>ot),N.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")N.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")N.selectAll("path").attr("style",s);return N.attr("transform",`translate(0,${-x/2})`),h.attr("transform",`translate(${-(a.width/2)-B-(a.x-(a.left??0))}, ${-(a.height/2)+B-x-(a.y-(a.top??0))})`),W(e,N),e.intersect=function(X){return R.polygon(e,P,X)},o}t(Om,"multiWaveEdgedRectangle");async function Pm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);if(e.labelStyle=s,!(e.useHtmlLabels||en(E())))e.centerLabel=!0;let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),f=-d/2,p=-c/2,{cssStyles:x}=e,k=y.svg(h),S=_t(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=k.rectangle(f,p,d,c,S),B=h.insert(()=>T,":first-child");if(B.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),x&&e.look!=="handDrawn")B.selectAll("path").attr("style",x);if(o&&e.look!=="handDrawn")B.selectAll("path").attr("style",o);return u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,B),e.intersect=function(_){return R.rect(e,_)},h}t(Pm,"note");var k1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function qm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await ee(r,e,Et(e)),h=a.width+(e.padding??0),n=a.height+(e.padding??0),u=h+n,d=0.5,c=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=e;if(e.look==="handDrawn"){let x=y.svg(o),k=_t(e,{}),S=k1(0,0,u),T=x.path(S,k);if(f=o.insert(()=>T,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),p)f.attr("style",p)}else f=Ze(o,u,u,c),f.attr("transform",`translate(${-u/2+d}, ${u/2})`);if(s)f.attr("style",s);return W(e,f),e.calcIntersect=function(x,k){let S=x.width,T=[{x:S/2,y:0},{x:S,y:-S/2},{x:S/2,y:-S},{x:0,y:-S/2}];return R.polygon(x,T,k)},e.intersect=function(x){return this.calcIntersect(e,x)},o}t(qm,"question");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,h=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=u.width+(e.look==="neo"?a*2:a),f=Math.max(u.height+(e.look==="neo"?h*2:h),e.height??0),p=f/4,k=-Math.max(c,(e.width??0)-p)/2,S=-f/2,T=S/2,B=[{x:k+T,y:S},{x:k,y:0},{x:k+T,y:-S},{x:-k,y:-S},{x:-k,y:S}],{cssStyles:_}=e,L=y.svg(n),D=_t(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=Qt(B),K=L.path(P,D),Z=n.insert(()=>K,":first-child");if(Z.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")Z.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-T/2},0)`),d.attr("transform",`translate(${-T/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),W(e,Z),e.intersect=function(J){return R.polygon(e,B,J)},n}t(Wm,"rect_left_inv_arrow");async function zm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:u,label:d}=e,c=await qe(n,d,e.labelStyle,!0,!0),f={width:0,height:0};if(en(m())){let J=c.children[0],rt=b(c);f=J.getBoundingClientRect(),rt.attr("width",f.width),rt.attr("height",f.height)}l.info("Text 2",u);let p=u||[],x=c.getBBox(),k=await qe(n,Array.isArray(p)?p.join("<br/>"):p,e.labelStyle,!0,!0),S=k.children[0],T=b(k);f=S.getBoundingClientRect(),T.attr("width",f.width),T.attr("height",f.height);let B=(e.padding||0)/2;b(k).attr("transform","translate( "+(f.width>x.width?0:(x.width-f.width)/2)+", "+(x.height+B+5)+")"),b(c).attr("transform","translate( "+(f.width<x.width?0:-(x.width-f.width)/2)+", 0)"),f=n.node().getBBox(),n.attr("transform","translate("+-f.width/2+", "+(-f.height/2-B+3)+")");let _=f.width+(e.padding||0),L=f.height+(e.padding||0),D=-f.width/2-B,P=-f.height/2-B,K,Z;if(e.look==="handDrawn"){let J=y.svg(a),rt=_t(e,{}),ht=J.path(Le(D,P,_,L,e.rx||0),rt),nt=J.line(-f.width/2-B,-f.height/2-B+x.height+B,f.width/2+B,-f.height/2-B+x.height+B,rt);Z=a.insert(()=>(l.debug("Rough node insert CXC",ht),nt),":first-child"),K=a.insert(()=>(l.debug("Rough node insert CXC",ht),ht),":first-child")}else K=h.insert("rect",":first-child"),Z=h.insert("line"),K.attr("class","outer title-state").attr("style",s).attr("x",-f.width/2-B).attr("y",-f.height/2-B).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-f.width/2-B).attr("x2",f.width/2+B).attr("y1",-f.height/2-B+x.height+B).attr("y2",-f.height/2-B+x.height+B);return W(e,K),e.intersect=function(J){return R.rect(e,J)},a}t(zm,"rectWithTitle");async function Hm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return di(r,e,o)}t(Hm,"roundedRect");var $r=8;async function Ym(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=(e?.width??n.width)+o*2+(e.look==="neo"?$r:$r*2),c=(e?.height??n.height)+a*2,f=d-$r,p=c,x=$r-d/2,k=-c/2,{cssStyles:S}=e,T=y.svg(h),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x,y:k},{x:x+f,y:k},{x:x+f,y:k+p},{x:x-$r,y:k+p},{x:x-$r,y:k},{x,y:k},{x,y:k+p}],L=T.polygon(_.map((P)=>[P.x,P.y]),B),D=h.insert(()=>L,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",le(S)),s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);if(S&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return u.attr("transform",`translate(${$r/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,D),e.intersect=function(P){return R.rect(e,P)},h}t(Ym,"shadedProcess");async function jm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-h*2,10);let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=(e?.width?e?.width:u.width)+a*2,f=((e?.height?e?.height:u.height)+h*2)*1.5,p=c,x=f/1.5,k=-p/2,S=-x/2,{cssStyles:T}=e,B=y.svg(n),_=_t(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let L=[{x:k,y:S},{x:k,y:S+x},{x:k+p,y:S+x},{x:k+p,y:S-x/2}],D=Qt(L),P=B.path(D,_),K=n.insert(()=>P,":first-child");if(K.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")K.selectChildren("path").attr("style",T);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return K.attr("transform",`translate(0, ${x/4})`),d.attr("transform",`translate(${-p/2+(e.padding??0)-(u.x-(u.left??0))}, ${-x/4+(e.padding??0)-(u.y-(u.top??0))})`),W(e,K),e.intersect=function(Z){return R.polygon(e,L,Z)},n}t(jm,"slopedRect");async function Um(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},h=await di(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:u}=m();or(h,e.colorIndex,n,u.borderColorArray)}return h}t(Um,"squareRect");var dc=50,w1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(dc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,h=e.look==="neo"?24:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),{w:d,h:c}=w1(u,a,h),f=c/2,{cssStyles:p}=e,x=y.svg(n),k=_t(e,{});if(e.look!=="handDrawn")k.roughness=0,k.fillStyle="solid";let S=[{x:-d/2+f,y:-c/2},{x:d/2-f,y:-c/2},...Ve(-d/2+f,0,f,dc,90,270),{x:d/2-f,y:c/2},...Ve(d/2-f,0,f,dc,270,450)],T=Qt(S),B=x.path(T,k),_=n.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn")_.selectChildren("path").attr("style",p);if(s&&e.look!=="handDrawn")_.selectChildren("path").attr("style",s);return W(e,_),e.intersect=function(L){return R.polygon(e,S,L)},n}t(Xm,"stadium");async function Gm(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return di(r,e,i)}t(Gm,"state");function Vm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:h,stateBorder:n,nodeBorder:u,nodeShadow:d}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let c=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=y.svg(c),p=_t(e,{});if(e.look!=="handDrawn")p.roughness=0,p.fillStyle="solid";let x=f.circle(0,0,e.width,{...p,stroke:h,strokeWidth:2}),k=n??u,S=(e.width??0)*5/14,T=f.circle(0,0,S,{...p,fill:k,stroke:k,strokeWidth:2,fillStyle:"solid"}),B=c.insert(()=>x,":first-child");if(B.insert(()=>T),e.look!=="handDrawn")B.attr("class","outer-path");if(a)B.selectAll("path").attr("style",a);if(o)B.selectAll("path").attr("style",o);if(e.width<25&&d&&e.look!=="handDrawn"){let _=r.node()?.ownerSVGElement?.id??"",L=_?`${_}-drop-shadow-small`:"drop-shadow-small";B.attr("style",`filter:url(#${L})`)}return W(e,B),e.intersect=function(_){return R.circle(e,(e.width??0)/2,_)},c}t(Vm,"stateEnd");function Km(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),h;if(e.look==="handDrawn"){let u=y.svg(a).circle(0,0,e.width,Zd(s));h=a.insert(()=>u),h.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else h=a.insert("circle",":first-child"),h.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",u=n?`${n}-drop-shadow-small`:"drop-shadow-small";h.attr("style",`filter:url(#${u})`)}return W(e,h),e.intersect=function(n){return R.circle(e,(e.width??7)/2,n)},a}t(Km,"stateStart");var hi=8;async function Zm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,h=e.look==="neo"?12:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.width+2*hi+a,e.width??0),c=Math.max(u.height+h,e.height??0),f=d-2*hi,p=c,x=-d/2,k=-c/2,S=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(e.look==="handDrawn"){let T=y.svg(n),B=_t(e,{}),_=T.rectangle(x,k,f+16,p,B),L=T.line(x+hi,k,x+hi,k+p,B),D=T.line(x+hi+f,k,x+hi+f,k+p,B);n.insert(()=>L,":first-child"),n.insert(()=>D,":first-child");let P=n.insert(()=>_,":first-child"),{cssStyles:K}=e;P.attr("class","basic label-container").attr("style",le(K)),W(e,P)}else{let T=Ze(n,f,p,S);if(s)T.attr("style",s);W(e,T)}return e.intersect=function(T){return R.polygon(e,S,T)},n}t(Zm,"subroutine");var nc=0.2;async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-h*2,10),e.width=Math.max((e?.width??0)-a*2-nc*(e.height+h*2),10);let{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=(e?.height?e?.height:u.height)+h*2,c=nc*d,f=nc*d,x=(e?.width?e?.width:u.width)+a*2+c-c,k=d,S=-x/2,T=-k/2,{cssStyles:B}=e,_=y.svg(n),L=_t(e,{}),D=[{x:S-c/2,y:T},{x:S+x+c/2,y:T},{x:S+x+c/2,y:T+k},{x:S-c/2,y:T+k}],P=[{x:S+x-c/2,y:T+k},{x:S+x+c/2,y:T+k},{x:S+x+c/2,y:T+k-f}];if(e.look!=="handDrawn")L.roughness=0,L.fillStyle="solid";let K=Qt(D),Z=_.path(K,L),J=Qt(P),rt=_.path(J,{...L,fillStyle:"solid"}),ht=n.insert(()=>rt,":first-child");if(ht.insert(()=>Z,":first-child"),ht.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ht.selectAll("path").attr("style",B);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return W(e,ht),e.intersect=function(nt){return R.polygon(e,D,nt)},n}t(Jm,"taggedRect");async function ty(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),d=u/8,c=0.2*n,f=0.2*u,p=u+d,{cssStyles:x}=e,k=y.svg(o),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-n/2-n/2*0.1,y:p/2},...wr(-n/2-n/2*0.1,p/2,n/2+n/2*0.1,p/2,d,0.8),{x:n/2+n/2*0.1,y:-p/2},{x:-n/2-n/2*0.1,y:-p/2}],B=-n/2+n/2*0.1,_=-p/2-f*0.4,L=[{x:B+n-c,y:(_+u)*1.3},{x:B+n,y:_+u-f},{x:B+n,y:(_+u)*0.9},...wr(B+n,(_+u)*1.25,B+n-c,(_+u)*1.3,-u*0.02,0.5)],D=Qt(T),P=k.path(D,S),K=Qt(L),Z=k.path(K,{...S,fillStyle:"solid"}),J=o.insert(()=>Z,":first-child");if(J.insert(()=>P,":first-child"),J.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")J.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-d/2-(a.y-(a.top??0))})`),W(e,J),e.intersect=function(rt){return R.polygon(e,T,rt)},o}t(ty,"taggedWaveEdgedRectangle");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await ee(r,e,Et(e)),h=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),u=-h/2,d=-n/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",u).attr("y",d).attr("width",h).attr("height",n),W(e,c),e.intersect=function(f){return R.rect(e,f)},o}t(ey,"text");var S1=t((r,e,i,s,o,a)=>`M${r},${e}
226
+ `);return Lm(s)}t(Vf,"preprocessMarkdown");function Kf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Kf,"nonMarkdownToLines");function Mm(r,e={}){let i=Vf(r,e),s=Jt.lexer(i),o=[[]],a=0;function h(n,u="normal"){if(n.type==="text")n.text.split(`
227
+ `).forEach((c,f)=>{if(f!==0)a++,o.push([]);c.split(" ").forEach((p)=>{if(p=p.replace(/&#39;/g,"'"),p)o[a].push({content:p,type:u})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((d)=>{h(d,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(h,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((u)=>{h(u)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Mm,"markdownToLines");function Zf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Zf,"nonMarkdownToHTML");function Qf(r,{markdownAutoWrap:e}={}){let i=Jt.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Qf,"markdownToHTML");var wk=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(d){return setTimeout(d,16)};function s(){var d=this;d.reads=[],d.writes=[],d.raf=i.bind(r),e("initialized",d)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(d){e("run tasks");var c;while(c=d.shift())c()},"runTasks"),measure:t(function(d,c){e("measure");var f=!c?d:d.bind(c);return this.reads.push(f),o(this),f},"measure"),mutate:t(function(d,c){e("mutate");var f=!c?d:d.bind(c);return this.writes.push(f),o(this),f},"mutate"),clear:t(function(d){return e("clear",d),h(this.reads,d)||h(this.writes,d)},"clear"),extend:t(function(d){if(e("extend",d),typeof d!="object")throw Error("expected object");var c=Object.create(this);if(n(c,d),c.fastdom=this,c.initialize)c.initialize();return c},"extend"),catch:null};function o(d){if(!d.scheduled)d.scheduled=!0,d.raf(a.bind(null,d)),e("flush scheduled")}t(o,"scheduleFlush");function a(d){e("flush");var{writes:c,reads:f}=d,p;try{e("flushing reads",f.length),d.runTasks(f),e("flushing writes",c.length),d.runTasks(c)}catch(x){p=x}if(d.scheduled=!1,f.length||c.length)o(d);if(p)if(e("task errored",p.message),d.catch)d.catch(p);else throw p}t(a,"flush");function h(d,c){var f=d.indexOf(c);return!!~f&&!!d.splice(f,1)}t(h,"remove");function n(d,c){for(var f in c)if(c.hasOwnProperty(f))d[f]=c[f]}t(n,"mixin");var u=r.fastdom=r.fastdom||new s;return u}(typeof window<"u"?window:globalThis),Jf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Wh(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Wh(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Wh(r,e,i,s){var{_tasks:o,fastdom:a}=r,h,n=new Promise(function(u,d){h=a[e](function(){o.delete(n);try{u(s?i.call(s):i())}catch(c){d(c)}},s)});return o.set(n,h),n}t(Wh,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Jf,Sk=Jf,Tk=wk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Sk),lr=Tk;function tp(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(tp,"splitTextToChars");function ep(r,e){let i=tp(e.content);return Yh(r,[],i,e.type)}t(ep,"splitWordToFitWidth");function Yh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,h=[...e,o];if(r([{content:h.join(""),type:s}]))return Yh(r,h,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Yh,"splitWordToFitWidthRecursion");function rp(r,e){if(r.some(({content:i})=>i.includes(`
228
+ `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Rs(r,e)}t(rp,"splitLineToFitWidth");function Rs(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},h=[...s];if(o!=="")h.push({content:o,type:"normal"});if(h.push(a),e(h))return Rs(r,e,i,h);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,u]=ep(e,a);if(i.push([n]),u.content)r.unshift(u)}return Rs(r,e,i)}t(Rs,"splitLineToFitWidthRecursion");function zh(r,e){if(e)r.attr("style",e)}t(zh,"applyStyle");var Gf=16384;async function ip(r,e,i,s,o=!1,a=C(),h=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Gf)}px`),n.attr("height",`${Math.min(10*i,Gf)}px`);let u=n.append("xhtml:div"),d=Lt(e.label)?await vc(e.label.replace(w.lineBreakRegex,`
229
+ `),a):te(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",f=u.append("span");if(f.html(d),zh(f,e.labelStyle),f.attr("class",`${c} ${s}`),zh(u,e.labelStyle),u.style("display","table-cell"),u.style("white-space","nowrap"),u.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)u.style("max-width",i+"px"),u.style("text-align","center");if(u.attr("xmlns","http://www.w3.org/1999/xhtml"),o)u.attr("class","labelBkg");let p=await lr.measure(()=>u.node().getBoundingClientRect());if(p.width===i)u.style("display","table"),u.style("white-space","break-spaces"),u.style("width",i+"px");else if(p.width<h)u.style("display","table"),u.style("width",h+"px"),u.style("text-align","center");return n.node()}t(ip,"addHtmlSpan");function qs(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(qs,"createTspan");function op(r,e,i){let s=r.append("text"),o=qs(s,1,e);Ws(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(op,"computeWidthOfText");function sA(r,e,i){let s=r.append("text"),o=qs(s,1,e);Ws(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(sA,"computeDimensionOfText");function sp(r,e,i,s=!1,o=!1){let h=e.append("g"),n=h.insert("rect").attr("class","background").attr("style","stroke: none"),u=h.append("text").attr("y","-10.1");if(o)u.attr("text-anchor","middle");let d=0;for(let c of i){let f=t((x)=>op(h,1.1,x)<=r,"checkWidth"),p=f(c)?[c]:rp(c,f);for(let x of p){let S=qs(u,d,1.1,o);Ws(S,x),d++}}if(s){let c=u.node().getBBox(),f=2;return n.attr("x",c.x-2).attr("y",c.y-2).attr("width",c.width+4).attr("height",c.height+4),h.node()}else return u.node()}t(sp,"createFormattedText");function Hh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(Hh,"decodeHTMLEntities");function Ws(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(Hh(i.content));else o.text(" "+Hh(i.content))})}t(Ws,"updateTextContentAndStyles");async function ap(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,h)=>(i.push((async()=>{let n=`${a}:${h}`;if(await _s(n))return await yr(n,void 0,{class:"label-icon"});else return`<i class='${te(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ap,"replaceIconSubstring");var bn=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:h=!0,isNode:n=!0,width:u=200,minWidth:d=0,addSvgBackground:c=!1}={},f)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",c),a){let p=h?Qf(e,f):Zf(e),x=await ap(oo(p),f),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:Lt(e)?S:x,labelStyle:i.replace("fill:","color:")};return await ip(r,T,u,o,c,f,d)}else{let p=oo(e.replace(/<br\s*\/?>/g,"<br/>")),x=h?Mm(p.replace("<br>","<br/>"),f):Kf(p),S=sp(u,r,x,e?c:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");b(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(S).select("text").attr("style",B)}if(s)b(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else b(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var Id=new Set(["redux-color","redux-dark-color"]),Bk=12,_k=64,wt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),mt=t((r,e)=>r!=null&&Id.has(r)&&wt(e),"isColorTheme"),vk=/^[\w-]+$/,ft=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return vk.test(e)?e:"classic"},"safeLook"),sa=t((r)=>wt(r)?r.length:0,"paletteSlotCount"),or=t((r,e)=>{if(wt(e))return sa(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=_k?r:Bk},"colorSlotCount"),ir=t((r,e,i,s)=>{if(e===void 0||!mt(i,s))return;let o=e%sa(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function jh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,h=Math.cos(a),n=Math.sin(a);for(let u of r){let[d,c]=u;u[0]=(d-s)*h-(c-o)*n+s,u[1]=(d-s)*n+(c-o)*h+o}}}function Lk(r,e){return r[0]===e[0]&&r[1]===e[1]}function Fk(r,e,i,s=1){let o=i,a=Math.max(e,0.1),h=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let d of h)jh(d,n,o);let u=function(d,c,f){let p=[];for(let v of d){let E=[...v];Lk(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&p.push(E)}let x=[];c=Math.max(c,0.1);let S=[];for(let v of p)for(let E=0;E<v.length-1;E++){let O=v[E],D=v[E+1];if(O[1]!==D[1]){let G=Math.min(O[1],D[1]);S.push({ymin:G,ymax:Math.max(O[1],D[1]),x:G===O[1]?O[0]:D[0],islope:(D[0]-O[0])/(D[1]-O[1])})}}if(S.sort((v,E)=>v.ymin<E.ymin?-1:v.ymin>E.ymin?1:v.x<E.x?-1:v.x>E.x?1:v.ymax===E.ymax?0:(v.ymax-E.ymax)/Math.abs(v.ymax-E.ymax)),!S.length)return x;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let E=0;E<S.length&&!(S[E].ymin>B);E++)v=E;S.splice(0,v+1).forEach((E)=>{T.push({s:B,edge:E})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,E)=>v.edge.x===E.edge.x?0:(v.edge.x-E.edge.x)/Math.abs(v.edge.x-E.edge.x)),(f!==1||_%c==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let E=v+1;if(E>=T.length)break;let O=T[v].edge,D=T[E].edge;x.push([[Math.round(O.x),B],[Math.round(D.x),B]])}B+=f,T.forEach((v)=>{v.edge.x=v.edge.x+f*v.edge.islope}),_++}return x}(h,a,s);if(o){for(let d of h)jh(d,n,-o);(function(d,c,f){let p=[];d.forEach((x)=>p.push(...x)),jh(p,c,f)})(u,n,-o)}return u}function mo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),Fk(r,o,s,a||1)}class Vs{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=mo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function Ks(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class gp extends Vs{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=mo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],h=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[u,d]of s)Ks([u,d])&&a.push([[u[0]-h,u[1]+n],[...d]],[[u[0]+h,u[1]-n],[...d]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class mp extends Vs{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class yp{constructor(r){this.helper=r}fillPolygons(r,e){let i=mo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let h of r){let n=Ks(h),u=n/s,d=Math.ceil(u)-1,c=n-d*s,f=(h[0][0]+h[1][0])/2-s/4,p=Math.min(h[0][1],h[1][1]);for(let x=0;x<d;x++){let S=p+c+x*s,T=f-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class xp{constructor(r){this.helper=r}fillPolygons(r,e){let i=mo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let h=Ks(a),n=Math.floor(h/(i+s)),u=(h+s-n*(i+s))/2,d=a[0],c=a[1];d[0]>c[0]&&(d=a[1],c=a[0]);let f=Math.atan((c[1]-d[1])/(c[0]-d[0]));for(let p=0;p<n;p++){let x=p*(i+s),S=x+i,T=[d[0]+x*Math.cos(f)+u*Math.cos(f),d[1]+x*Math.sin(f)+u*Math.sin(f)],B=[d[0]+S*Math.cos(f)+u*Math.cos(f),d[1]+S*Math.sin(f)+u*Math.sin(f)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class Cp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=mo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=Ks(o),h=Math.round(a/(2*e)),n=o[0],u=o[1];n[0]>u[0]&&(n=o[1],u=o[0]);let d=Math.atan((u[1]-n[1])/(u[0]-n[0]));for(let c=0;c<h;c++){let f=2*c*e,p=2*(c+1)*e,x=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+f*Math.cos(d),n[1]+f*Math.sin(d)],T=[n[0]+p*Math.cos(d),n[1]+p*Math.sin(d)],B=[S[0]+x*Math.cos(d+Math.PI/4),S[1]+x*Math.sin(d+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Be={};class bp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Mk=0,Uh=1,np=2,Ns={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Xh(r,e){return r.type===e}function tc(r){let e=[],i=function(h){let n=[];for(;h!=="";)if(h.match(/^([ \t\r\n,]+)/))h=h.substr(RegExp.$1.length);else if(h.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Mk,text:RegExp.$1},h=h.substr(RegExp.$1.length);else{if(!h.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Uh,text:`${parseFloat(RegExp.$1)}`},h=h.substr(RegExp.$1.length)}return n[n.length]={type:np,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Xh(a,np);){let h=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return tc("M0,0"+r);o++,h=Ns[a.text],s=a.text}else Xh(a,Uh)?h=Ns[s]:(o++,h=Ns[a.text],s=a.text);if(!(o+h<i.length))throw Error("Path data ended short");for(let u=o;u<o+h;u++){let d=i[u];if(!Xh(d,Uh))throw Error("Param not a number: "+s+","+d.text);n[n.length]=+d.text}if(typeof Ns[s]!="number")throw Error("Bad segment: "+s);{let u={key:s,data:n};e.push(u),o+=h,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function kp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:h,data:n}of r)switch(h){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"C",data:u}),e=u[4],i=u[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"Q",data:u}),e=u[2],i=u[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let u=n.map((d,c)=>c%2?d+i:d+e);a.push({key:"S",data:u}),e=u[2],i=u[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function wp(r){let e=[],i="",s=0,o=0,a=0,h=0,n=0,u=0;for(let{key:d,data:c}of r){switch(d){case"M":e.push({key:"M",data:[...c]}),[s,o]=c,[a,h]=c;break;case"C":e.push({key:"C",data:[...c]}),s=c[4],o=c[5],n=c[2],u=c[3];break;case"L":e.push({key:"L",data:[...c]}),[s,o]=c;break;case"H":s=c[0],e.push({key:"L",data:[s,o]});break;case"V":o=c[0],e.push({key:"L",data:[s,o]});break;case"S":{let f=0,p=0;i==="C"||i==="S"?(f=s+(s-n),p=o+(o-u)):(f=s,p=o),e.push({key:"C",data:[f,p,...c]}),n=c[0],u=c[1],s=c[2],o=c[3];break}case"T":{let[f,p]=c,x=0,S=0;i==="Q"||i==="T"?(x=s+(s-n),S=o+(o-u)):(x=s,S=o);let T=s+2*(x-s)/3,B=o+2*(S-o)/3,_=f+2*(x-f)/3,v=p+2*(S-p)/3;e.push({key:"C",data:[T,B,_,v,f,p]}),n=x,u=S,s=f,o=p;break}case"Q":{let[f,p,x,S]=c,T=s+2*(f-s)/3,B=o+2*(p-o)/3,_=x+2*(f-x)/3,v=S+2*(p-S)/3;e.push({key:"C",data:[T,B,_,v,x,S]}),n=f,u=p,s=x,o=S;break}case"A":{let f=Math.abs(c[0]),p=Math.abs(c[1]),x=c[2],S=c[3],T=c[4],B=c[5],_=c[6];if(f===0||p===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)Sp(s,o,B,_,f,p,x,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=h}i=d}return e}function fo(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function Sp(r,e,i,s,o,a,h,n,u,d){let c=(f=h,Math.PI*f/180);var f;let p=[],x=0,S=0,T=0,B=0;if(d)[x,S,T,B]=d;else{[r,e]=fo(r,e,-c),[i,s]=fo(i,s,-c);let P=(r-i)/2,X=(e-s)/2,tt=P*P/(o*o)+X*X/(a*a);tt>1&&(tt=Math.sqrt(tt),o*=tt,a*=tt);let N=o*o,at=a*a,st=N*at-N*X*X-at*P*P,Bt=N*X*X+at*P*P,vt=(n===u?-1:1)*Math.sqrt(Math.abs(st/Bt));T=vt*o*X/a+(r+i)/2,B=vt*-a*P/o+(e+s)/2,x=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(x=Math.PI-x),i<T&&(S=Math.PI-S),x<0&&(x=2*Math.PI+x),S<0&&(S=2*Math.PI+S),u&&x>S&&(x-=2*Math.PI),!u&&S>x&&(S-=2*Math.PI)}let _=S-x;if(Math.abs(_)>120*Math.PI/180){let P=S,X=i,tt=s;S=u&&S>x?x+120*Math.PI/180*1:x+120*Math.PI/180*-1,p=Sp(i=T+o*Math.cos(S),s=B+a*Math.sin(S),X,tt,o,a,h,0,u,[S,P,T,B])}_=S-x;let v=Math.cos(x),E=Math.sin(x),O=Math.cos(S),D=Math.sin(S),G=Math.tan(_/4),Z=1.3333333333333333*o*G,J=1.3333333333333333*a*G,rt=[r,e],ht=[r+Z*E,e-J*v],nt=[i+Z*D,s-J*O],ot=[i,s];if(ht[0]=2*rt[0]-ht[0],ht[1]=2*rt[1]-ht[1],d)return[ht,nt,ot].concat(p);{p=[ht,nt,ot].concat(p);let P=[];for(let X=0;X<p.length;X+=3){let tt=fo(p[X][0],p[X][1],c),N=fo(p[X+1][0],p[X+1][1],c),at=fo(p[X+2][0],p[X+2][1],c);P.push([tt[0],tt[1],N[0],N[1],at[0],at[1]])}return P}}var Ak={randOffset:function(r,e){return qt(r,e)},randOffsetWithRange:function(r,e,i){return Us(r,e,i)},ellipse:function(r,e,i,s,o){let a=Bp(i,s,o);return Kh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return Cr(r,e,i,s,o,!0)}};function Tp(r,e,i,s,o){return{type:"path",ops:Cr(r,e,i,s,o)}}function Ys(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...Cr(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...Cr(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Tp(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Ek(r,e,i,s,o){return function(a,h){return Ys(a,!0,h)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function lp(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=zs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:zs(i[0],1.5*(1+0.22*e.roughness),up(e));for(let a=1;a<i.length;a++){let h=i[a];if(h.length){let n=zs(h,1*(1+0.2*e.roughness),e),u=e.disableMultiStroke?[]:zs(h,1.5*(1+0.22*e.roughness),up(e));for(let d of n)d.op!=="move"&&s.push(d);for(let d of u)d.op!=="move"&&o.push(d)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function Bp(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,h=Math.abs(r/2),n=Math.abs(e/2),u=1-i.curveFitting;return h+=qt(h*u,i),n+=qt(n*u,i),{increment:a,rx:h,ry:n}}function Kh(r,e,i,s){let[o,a]=dp(s.increment,r,e,s.rx,s.ry,1,s.increment*Us(0.1,Us(0.4,1,i),i),i),h=Xs(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=dp(s.increment,r,e,s.rx,s.ry,1.5,0,i),u=Xs(n,null,i);h=h.concat(u)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function hp(r,e,i,s,o,a,h,n,u){let d=r,c=e,f=Math.abs(i/2),p=Math.abs(s/2);f+=qt(0.01*f,u),p+=qt(0.01*p,u);let x=o,S=a;for(;x<0;)x+=2*Math.PI,S+=2*Math.PI;S-x>2*Math.PI&&(x=0,S=2*Math.PI);let T=2*Math.PI/u.curveStepCount,B=Math.min(T/2,(S-x)/2),_=fp(B,d,c,f,p,x,S,1,u);if(!u.disableMultiStroke){let v=fp(B,d,c,f,p,x,S,1.5,u);_.push(...v)}return h&&(n?_.push(...Cr(d,c,d+f*Math.cos(x),c+p*Math.sin(x),u),...Cr(d,c,d+f*Math.cos(S),c+p*Math.sin(S),u)):_.push({op:"lineTo",data:[d,c]},{op:"lineTo",data:[d+f*Math.cos(x),c+p*Math.sin(x)]})),{type:"path",ops:_}}function cp(r,e){let i=wp(kp(tc(r))),s=[],o=[0,0],a=[0,0];for(let{key:h,data:n}of i)switch(h){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...Cr(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[u,d,c,f,p,x]=n;s.push(...$k(u,d,c,f,p,x,a,e)),a=[p,x];break}case"Z":s.push(...Cr(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Gh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+qt(o,e),s[0][1]+qt(o,e)]});for(let h=1;h<a;h++)i.push({op:"lineTo",data:[s[h][0]+qt(o,e),s[h][1]+qt(o,e)]})}}return{type:"fillPath",ops:i}}function ai(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Be[o])switch(o){case"zigzag":Be[o]||(Be[o]=new gp(s));break;case"cross-hatch":Be[o]||(Be[o]=new mp(s));break;case"dots":Be[o]||(Be[o]=new yp(s));break;case"dashed":Be[o]||(Be[o]=new xp(s));break;case"zigzag-line":Be[o]||(Be[o]=new Cp(s));break;default:o="hachure",Be[o]||(Be[o]=new Vs(s))}return Be[o]}(e,Ak).fillPolygons(r,e)}function up(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function _p(r){return r.randomizer||(r.randomizer=new bp(r.seed||0)),r.randomizer.next()}function Us(r,e,i,s=1){return i.roughness*s*(_p(i)*(e-r)+r)}function qt(r,e,i=1){return Us(-r,r,e,i)}function Cr(r,e,i,s,o,a=!1){let h=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Zh(r,e,i,s,o,!0,!1);if(h)return n;let u=Zh(r,e,i,s,o,!0,!0);return n.concat(u)}function Zh(r,e,i,s,o,a,h){let n=Math.pow(r-i,2)+Math.pow(e-s,2),u=Math.sqrt(n),d=1;d=u<200?1:u>500?0.4:-0.0016668*u+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=u/10);let f=c/2,p=0.2+0.2*_p(o),x=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;x=qt(x,o,d),S=qt(S,o,d);let T=[],B=()=>qt(f,o,d),_=()=>qt(c,o,d),v=o.preserveVertices;return a&&(h?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:qt(c,o,d)),e+(v?0:qt(c,o,d))]})),h?T.push({op:"bcurveTo",data:[x+r+(i-r)*p+B(),S+e+(s-e)*p+B(),x+r+2*(i-r)*p+B(),S+e+2*(s-e)*p+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[x+r+(i-r)*p+_(),S+e+(s-e)*p+_(),x+r+2*(i-r)*p+_(),S+e+2*(s-e)*p+_(),i+(v?0:_()),s+(v?0:_())]}),T}function zs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+qt(e,i),r[0][1]+qt(e,i)]),s.push([r[0][0]+qt(e,i),r[0][1]+qt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+qt(e,i),r[o][1]+qt(e,i)]),o===r.length-1&&s.push([r[o][0]+qt(e,i),r[o][1]+qt(e,i)]);return Xs(s,null,i)}function Xs(r,e,i){let s=r.length,o=[];if(s>3){let a=[],h=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let u=r[n];a[0]=[u[0],u[1]],a[1]=[u[0]+(h*r[n+1][0]-h*r[n-1][0])/6,u[1]+(h*r[n+1][1]-h*r[n-1][1])/6],a[2]=[r[n+1][0]+(h*r[n][0]-h*r[n+2][0])/6,r[n+1][1]+(h*r[n][1]-h*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+qt(n,i),e[1]+qt(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Zh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function dp(r,e,i,s,o,a,h,n){let u=[],d=[];if(n.roughness===0){r/=4,d.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let c=0;c<=2*Math.PI;c+=r){let f=[e+s*Math.cos(c),i+o*Math.sin(c)];u.push(f),d.push(f)}d.push([e+s*Math.cos(0),i+o*Math.sin(0)]),d.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let c=qt(0.5,n)-Math.PI/2;d.push([qt(a,n)+e+0.9*s*Math.cos(c-r),qt(a,n)+i+0.9*o*Math.sin(c-r)]);let f=2*Math.PI+c-0.01;for(let p=c;p<f;p+=r){let x=[qt(a,n)+e+s*Math.cos(p),qt(a,n)+i+o*Math.sin(p)];u.push(x),d.push(x)}d.push([qt(a,n)+e+s*Math.cos(c+2*Math.PI+0.5*h),qt(a,n)+i+o*Math.sin(c+2*Math.PI+0.5*h)]),d.push([qt(a,n)+e+0.98*s*Math.cos(c+h),qt(a,n)+i+0.98*o*Math.sin(c+h)]),d.push([qt(a,n)+e+0.9*s*Math.cos(c+0.5*h),qt(a,n)+i+0.9*o*Math.sin(c+0.5*h)])}return[d,u]}function fp(r,e,i,s,o,a,h,n,u){let d=a+qt(0.1,u),c=[];c.push([qt(n,u)+e+0.9*s*Math.cos(d-r),qt(n,u)+i+0.9*o*Math.sin(d-r)]);for(let f=d;f<=h;f+=r)c.push([qt(n,u)+e+s*Math.cos(f),qt(n,u)+i+o*Math.sin(f)]);return c.push([e+s*Math.cos(h),i+o*Math.sin(h)]),c.push([e+s*Math.cos(h),i+o*Math.sin(h)]),Xs(c,null,u)}function $k(r,e,i,s,o,a,h,n){let u=[],d=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],c=[0,0],f=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let x=0;x<f;x++)x===0?u.push({op:"move",data:[h[0],h[1]]}):u.push({op:"move",data:[h[0]+(p?0:qt(d[0],n)),h[1]+(p?0:qt(d[0],n))]}),c=p?[o,a]:[o+qt(d[x],n),a+qt(d[x],n)],u.push({op:"bcurveTo",data:[r+qt(d[x],n),e+qt(d[x],n),i+qt(d[x],n),s+qt(d[x],n),c[0],c[1]]});return u}function po(r){return[...r]}function pp(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(po(r[0]),po(r[1]),po(r[2]),po(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],h=1-e;s.push(po(o[0]));for(let n=1;n+2<o.length;n++){let u=o[n];a[0]=[u[0],u[1]],a[1]=[u[0]+(h*o[n+1][0]-h*o[n-1][0])/6,u[1]+(h*o[n+1][1]-h*o[n-1][1])/6],a[2]=[o[n+1][0]+(h*o[n][0]-h*o[n+2][0])/6,o[n+1][1]+(h*o[n][1]-h*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function js(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Ik(r,e,i){let s=js(e,i);if(s===0)return js(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),js(r,Ar(e,i,o))}function Ar(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Jh(r,e,i,s){let o=s||[];if(function(n,u){let d=n[u+0],c=n[u+1],f=n[u+2],p=n[u+3],x=3*c[0]-2*d[0]-p[0];x*=x;let S=3*c[1]-2*d[1]-p[1];S*=S;let T=3*f[0]-2*p[0]-d[0];T*=T;let B=3*f[1]-2*p[1]-d[1];return B*=B,x<T&&(x=T),S<B&&(S=B),x+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],h=n,Math.sqrt(js(a,h)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let u=r[e+0],d=r[e+1],c=r[e+2],f=r[e+3],p=Ar(u,d,0.5),x=Ar(d,c,0.5),S=Ar(c,f,0.5),T=Ar(p,x,0.5),B=Ar(x,S,0.5),_=Ar(T,B,0.5);Jh([u,p,T,_],0,i,o),Jh([_,B,S,f],0,i,o)}var a,h;return o}function Ok(r,e){return Gs(r,0,r.length,e)}function Gs(r,e,i,s,o){let a=o||[],h=r[e],n=r[i-1],u=0,d=1;for(let c=e+1;c<i-1;++c){let f=Ik(r[c],h,n);f>u&&(u=f,d=c)}return Math.sqrt(u)>s?(Gs(r,e,d+1,s,a),Gs(r,d,i,s,a)):(a.length||a.push(h),a.push(n)),a}function Vh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Jh(r,3*a,e,s);return i&&i>0?Gs(s,0,s.length,i):s}var Le="none";class go{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[Tp(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),h=[],n=Ek(r,e,i,s,a);if(a.fill){let u=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?h.push(Gh([u],a)):h.push(ai([u],a))}return a.stroke!==Le&&h.push(n),this._d("rectangle",h,a)}ellipse(r,e,i,s,o){let a=this._o(o),h=[],n=Bp(i,s,a),u=Kh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let d=Kh(r,e,a,n).opset;d.type="fillPath",h.push(d)}else h.push(ai([u.estimatedPoints],a));return a.stroke!==Le&&h.push(u.opset),this._d("ellipse",h,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[Ys(r,!1,i)],i)}arc(r,e,i,s,o,a,h=!1,n){let u=this._o(n),d=[],c=hp(r,e,i,s,o,a,h,!0,u);if(h&&u.fill)if(u.fillStyle==="solid"){let f=Object.assign({},u);f.disableMultiStroke=!0;let p=hp(r,e,i,s,o,a,!0,!1,f);p.type="fillPath",d.push(p)}else d.push(function(f,p,x,S,T,B,_){let v=f,E=p,O=Math.abs(x/2),D=Math.abs(S/2);O+=qt(0.01*O,_),D+=qt(0.01*D,_);let G=T,Z=B;for(;G<0;)G+=2*Math.PI,Z+=2*Math.PI;Z-G>2*Math.PI&&(G=0,Z=2*Math.PI);let J=(Z-G)/_.curveStepCount,rt=[];for(let ht=G;ht<=Z;ht+=J)rt.push([v+O*Math.cos(ht),E+D*Math.sin(ht)]);return rt.push([v+O*Math.cos(Z),E+D*Math.sin(Z)]),rt.push([v,E]),ai([rt],_)}(r,e,i,s,o,a,u));return u.stroke!==Le&&d.push(c),this._d("arc",d,u)}curve(r,e){let i=this._o(e),s=[],o=lp(r,i);if(i.fill&&i.fill!==Le)if(i.fillStyle==="solid"){let a=lp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],h=r;if(h.length){let n=typeof h[0][0]=="number"?[h]:h;for(let u of n)u.length<3?a.push(...u):u.length===3?a.push(...Vh(pp([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):a.push(...Vh(pp(u),10,(1+i.roughness)/2))}a.length&&s.push(ai([a],i))}return i.stroke!==Le&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=Ys(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Gh([r],i)):s.push(ai([r],i))),i.stroke!==Le&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Le,a=i.stroke!==Le,h=!!(i.simplification&&i.simplification<1),n=function(d,c,f){let p=wp(kp(tc(d))),x=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Vh(B,c)),B=[]},v=()=>{_(),S.length&&(x.push(S),S=[])};for(let{key:O,data:D}of p)switch(O){case"M":v(),T=[D[0],D[1]],S.push(T);break;case"L":_(),S.push([D[0],D[1]]);break;case"C":if(!B.length){let G=S.length?S[S.length-1]:T;B.push([G[0],G[1]])}B.push([D[0],D[1]]),B.push([D[2],D[3]]),B.push([D[4],D[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!f)return x;let E=[];for(let O of x){let D=Ok(O,f);D.length&&E.push(D)}return E}(r,1,h?4-4*(i.simplification||1):(1+i.roughness)/2),u=cp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let d=cp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else s.push(Gh(n,i));else s.push(ai(n,i));return a&&(h?n.forEach((d)=>{s.push(Ys(d,!1,i))}):s.push(u)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Le};break;case"fillPath":a={d:this.opsToPath(o),stroke:Le,strokeWidth:0,fill:i.fill||Le};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Le,strokeWidth:i,fill:Le}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class vp{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new go(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let h=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,h),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((h)=>+h.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,h=!1,n){let u=this.gen.arc(r,e,i,s,o,a,h,n);return this.draw(u),u}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Hs="http://www.w3.org/2000/svg";class Lp{constructor(r,e){this.svg=r,this.gen=new go(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Hs,"g"),a=r.options.fixedDecimalPlaceDigits;for(let h of e){let n=null;switch(h.type){case"path":n=s.createElementNS(Hs,"path"),n.setAttribute("d",this.opsToPath(h,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Hs,"path"),n.setAttribute("d",this.opsToPath(h,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,h,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Hs,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,h=!1,n){let u=this.gen.arc(r,e,i,s,o,a,h,n);return this.draw(u)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new vp(r,e),svg:(r,e)=>new Lp(r,e),generator:(r)=>new go(r),newSeed:()=>go.newSeed()};var Dk=1,Pk=3;async function fc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!pc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let h=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[u=Y.fontSize]=Hn(h),d=u*5+"px";s.style.minWidth=d,s.style.maxWidth=d}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(fc,"configureLabelImages");function pc(r){if(r.nodeType===Pk)return r.textContent?.trim()!=="";if(r.nodeType!==Dk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var Fp=3,Rk=32,qk=t(async(r,e,i)=>{let s=m(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",ae(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),u=e.width?Math.max(e.width-2*(e.padding??0),Rk):m().flowchart?.wrappingWidth??200,c=s.c4?.wrap??!0?u:Number.POSITIVE_INFINITY,f=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),E=await bn(v,te(oo(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:e.labelStyle},s);return b(E).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),b(E).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),p=Math.max(...f.map(({box:_})=>_.width),0),x=0;for(let{el:_,box:v}of f)_.attr("transform",`translate(${p/2-v.x-v.width/2}, ${x-v.y})`),x+=v.height+Fp;let S=f.length>0?x-Fp:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-p/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),Mp=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),ee=t(async(r,e,i)=>{if(e.stereotype!==void 0)return qk(r,e,i);let s,o=e.useHtmlLabels||aa(m()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),h=a.insert("g").attr("class","label").attr("style",ae(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let u=!!e.icon||!!e.img,d=e.labelType==="markdown",c=n&&!e.width?e.minWidth??0:0,f=await bn(h,te(oo(n),m()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||m().flowchart?.wrappingWidth,minWidth:c,classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},m()),p=(e?.padding??0)/2,x;if(o){let S=f.children[0],T=b(f);await fc(S),x=await lr.measure(()=>S.getBoundingClientRect()),x=Mp(x,c),T.attr("width",x.width),T.attr("height",x.height)}else x=await lr.measure(()=>f.getBBox()),x=Mp(x,c);if(o)h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")");else h.attr("transform","translate(0, "+-x.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:a,bbox:x,halfPadding:p,label:h}},"labelHelper"),$r=t(async(r,e,i)=>{let s=i.useHtmlLabels??tn(m()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await bn(o,te(oo(e),m()),{useHtmlLabels:s,width:i.width||m()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),h=i.padding/2,n;if(tn(m())){let u=a.children[0],d=b(a);n=await lr.measure(()=>u.getBoundingClientRect()),d.attr("width",n.width),d.attr("height",n.height)}else n=await lr.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:h,label:o}},"insertLabel"),K=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),Et=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Zt(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Zt,"createPathFromPoints");function kr(r,e,i,s,o,a){let h=[],n=50,u=i-r,d=s-e,c=u/a,f=2*Math.PI/c,p=e+d/2;for(let x=0;x<=50;x++){let S=x/50,T=r+S*u,B=p+o*Math.sin(f*(T-r));h.push({x:T,y:B})}return h}t(kr,"generateFullSineWavePoints");function Ge(r,e,i,s,o,a){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x:-x,y:-S})}return h}t(Ge,"generateCirclePoints");function lc(r){let e=Array.from(r.childNodes).filter((u)=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((u)=>u.getAttribute("d")).filter((u)=>u!==null).join(" ");i.setAttribute("d",s);let o=e.find((u)=>u.getAttribute("fill")!=="none"),a=e.find((u)=>u.getAttribute("stroke")!=="none"),h=t((u,d)=>u?.getAttribute(d)??void 0,"getAttr");if(o){let u={fill:h(o,"fill"),"fill-opacity":h(o,"fill-opacity")??"1"};Object.entries(u).forEach(([d,c])=>{if(c)i.setAttribute(d,c)})}if(a){let u={stroke:h(a,"stroke"),"stroke-width":h(a,"stroke-width")??"1","stroke-opacity":h(a,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,c])=>{if(c)i.setAttribute(d,c)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(lc,"mergePaths");var Wk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,h=r.width/2,n=r.height/2,u,d;if(Math.abs(a)*h>Math.abs(o)*n){if(a<0)n=-n;u=a===0?0:n*o/a,d=n}else{if(o<0)h=-h;u=h,d=o===0?0:h*a/o}return{x:i+u,y:s+d}},"intersectRect"),Ve=Wk;function Qp(r,e){return r.intersect(e)}t(Qp,"intersectNode");var Nk=Qp;function Jp(r,e,i,s){var{x:o,y:a}=r,h=o-s.x,n=a-s.y,u=Math.sqrt(e*e*n*n+i*i*h*h),d=Math.abs(e*i*h/u);if(s.x<o)d=-d;var c=Math.abs(e*i*n/u);if(s.y<a)c=-c;return{x:o+d,y:a+c}}t(Jp,"intersectEllipse");var tg=Jp;function eg(r,e,i){return tg(r,e,e,i)}t(eg,"intersectCircle");var zk=eg;function rg(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,h=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+h,u=o*s.x+a*s.y+h,d=0.000001;if(n!==0&&u!==0&&cc(n,u))return;let c=s.y-i.y,f=i.x-s.x,p=s.x*i.y-i.x*s.y,x=c*r.x+f*r.y+p,S=c*e.x+f*e.y+p;if(Math.abs(x)<0.000001&&Math.abs(S)<0.000001&&cc(x,S))return;let T=o*f-c*a;if(T===0)return;let B=(a*p-f*h)/T,_=(c*h-o*p)/T;return{x:B,y:_}}}t(rg,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var Hk=rg;function ig(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:h,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(c){h=Math.min(h,c.x),n=Math.min(n,c.y)});else h=Math.min(h,e.x),n=Math.min(n,e.y);let u=s-r.width/2-h,d=o-r.height/2-n;for(let c=0;c<e.length;c++){let f=e[c],p=e[c<e.length-1?c+1:0],x=Hk(r,i,{x:u+f.x,y:d+f.y},{x:u+p.x,y:d+p.y});if(x)a.push(x)}if(!a.length)return r;if(a.length>1)a.sort(function(c,f){let p=c.x-i.x,x=c.y-i.y,S=Math.sqrt(p*p+x*x),T=f.x-i.x,B=f.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(ig,"intersectPolygon");var Yk=ig,R={node:Nk,circle:zk,ellipse:tg,polygon:Yk,rect:Ve},_e=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),jk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let h=m(),n=tn(h);return await bn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},h)},"createLabel"),Re=jk;function og(r,e){let{labelStyles:i}=M(e);e.labelStyle=i;let s=Et(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=1,{cssStyles:n}=e,u=y.svg(a),d=_t(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")d.roughness=0;let c=u.circle(0,0,h*2,d),f=a.insert(()=>c,":first-child");return f.attr("class","anchor").attr("style",ae(n)),K(e,f),e.intersect=function(p){return l.info("Circle intersect",e,h,p),R.circle(e,h,p)},a}t(og,"anchor");function uc(r,e,i,s,o,a,h){let u=(r+i)/2,d=(e+s)/2,c=Math.atan2(s-e,i-r),f=(i-r)/2,p=(s-e)/2,x=f/o,S=p/a,T=Math.sqrt(x**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=u+B*a*Math.sin(c)*(h?-1:1),v=d-B*o*Math.cos(c)*(h?-1:1),E=Math.atan2((e-v)/a,(r-_)/o),D=Math.atan2((s-v)/a,(i-_)/o)-E;if(h&&D<0)D+=2*Math.PI;if(!h&&D>0)D-=2*Math.PI;let G=[];for(let Z=0;Z<20;Z++){let J=Z/19,rt=E+J*D,ht=_+o*Math.cos(rt),nt=v+a*Math.sin(rt);G.push({x:ht,y:nt})}return G}t(uc,"generateArcPoints");function sg(r,e,i){let[s,o]=[e,i].sort((a,h)=>h-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(sg,"calculateArcSagitta");async function ag(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=t((rt)=>rt+h,"calcTotalHeight"),u=t((rt)=>{let ht=rt/2;return[ht/(2.5+rt/50),ht]},"calcEllipseRadius"),{shapeSvg:d,bbox:c}=await ee(r,e,Et(e)),f=n(e?.height?e?.height:c.height),[p,x]=u(f),S=sg(f,p,x),B=(e?.width?e?.width:c.width)+a*2+S-S,_=f,{cssStyles:v}=e,E=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,p,x,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,p,x,!0)],O=y.svg(d),D=_t(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let G=Zt(E),Z=O.path(G,D),J=d.insert(()=>Z,":first-child");if(J.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")J.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(${p/2}, 0)`),K(e,J),e.intersect=function(rt){return R.polygon(e,E,rt)},d}t(ag,"bowTieRect");async function ng(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await ee(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=Math.max(h.width+d*2,e.width??0,80),f=Math.max(Math.min(c*0.08,12),5),p=Math.max(h.height+d*2+f,e.height??0),x=-p/2+f,S=p/2,T=c*0.72,B=[`M${-c/2},${x}`,`L${-T/2},${S}`,`A${T/2},${f} 0 0 0 ${T/2},${S}`,`L${c/2},${x}`,`A${c/2},${f} 0 0 0 ${-c/2},${x}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let J=y.svg(a).path(B,_t(e,{}));if(v.node()?.appendChild(J),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",x).attr("rx",c/2).attr("ry",f).attr("style",`fill:none;stroke:${u};stroke-width:1px`),K(e,v);let E=x+(S-x)/2;n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${E-h.height/2-(h.y-(h.top??0))})`);let O=12,D=t((Z,J,rt)=>Array.from({length:O+1},(ht,nt)=>{let ot=Math.PI-nt*Math.PI/O;return{x:Z*Math.cos(ot),y:J+rt*f*Math.sin(ot)}}),"arc"),G=[...D(c/2,x,-1),...D(T/2,S,1).reverse()];return e.intersect=function(Z){return R.polygon(e,G,Z)},a}t(ng,"bucket");var ec=20,rc=8,Uk=80,Xk=8;function lg(r){let{themeVariables:e}=m(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Xk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(lg,"getCollapsedStyle");async function hg(r,e){let i=lg(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=M(e),{shapeSvg:h,bbox:n}=await ee(r,e,Et(e)),{theme:u,themeVariables:d}=m();ir(h,e.colorIndex,u,d.borderColorArray);let c=e.padding??8,f=n.height,p=Math.max(n.width+c*2,Uk,e?.width??0),x=Math.max(f+rc+ec+c*2,e?.height??0),S=-p/2,T=-x/2,B=-(rc+ec)/2,_=h.select(".label");if(_)if(e.useHtmlLabels??tn(m()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let Z=y.svg(h),J=_t(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),rt=Z.path(_e(S,T,p,x,i.rx),J);v=h.insert(()=>rt,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",ae(e.cssStyles))}else if(v=h.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",p).attr("height",x).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let E=T+c+f+rc;h.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",E).attr("x2",S+p-8).attr("y2",E).attr("stroke",o).attr("stroke-dasharray","3, 3");let O=E+ec/2,D=2.5,G=10;for(let Z=-1;Z<=1;Z++)h.append("circle").attr("class","collapsed-indicator").attr("cx",Z*G).attr("cy",O).attr("r",D).attr("fill",o);return K(e,v),e.calcIntersect=function(Z,J){return R.rect(Z,J)},e.intersect=function(Z){return R.rect(e,Z)},h}t(hg,"collapsedGroup");function Ke(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(Ke,"insertPolygonShape");var Gk=["right","left","up","down"],gc="point",Vk=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),Kk=t((r)=>Gk.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),Ap={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[gc]:()=>[{x:0,y:0}]},Zk=t((r,e,i,s)=>{let o=Vk(r),a=(i.padding??0)/2,h=e.height+4*a,n=h/2,u=s??e.width+2*n+2*a,d=Kk(o);return(Ap[d]??Ap[gc])({height:h,midpoint:n,padding:a,width:u})},"getArrowPoints");async function cg(r,e){let i=e,{shapeSvg:s,bbox:o}=await ee(r,i,Et(i)),a=i.padding??0,h=o.height+2*a,n=h/2,u=o.width+2*n+a,d=i.width??0,f=i.positioned&&(i.widthInColumns??1)>1&&d>u?d:u,p=Zk(i.directions??[],o,i,f),x=Ke(s,f,h,p);return x.attr("style",i.style??null),K(i,x),i.intersect=function(S){return R.polygon(i,p,S)},s}t(cg,"block_arrow");async function ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await ee(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=18,f=12,p=Math.max(h.width+d*2,e.width??0,90),x=Math.max(h.height+d*2+c,e.height??0),S=-x/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(_e(-p/2,S,p,x,f),_t(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-p/2).attr("y",S).attr("width",p).attr("height",x).attr("rx",f).attr("ry",f).attr("style",o);B.append("line").attr("x1",-p/2).attr("y1",S+c).attr("x2",p/2).attr("y2",S+c).attr("style",`stroke:${u};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-p/2+12+v*9).attr("cy",S+c/2).attr("r",2.5).attr("style",`fill:${u};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",S+4).attr("width",Math.max(p-56,10)).attr("height",c-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${u};stroke-width:1px;opacity:0.6`),K(e,B);let _=S+c+(x-c)/2;return n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${_-h.height/2-(h.y-(h.top??0))})`),e.intersect=function(v){return R.rect(e,v)},a}t(ug,"browser");var Zs=12;async function dg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,h=e.look==="neo"?24:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=(e?.width??u.width)+(e.look==="neo"?a*2:a+Zs),c=(e?.height??u.height)+(e.look==="neo"?h*2:h),f=0,p=d,x=-c,S=0,T=[{x:f+Zs,y:x},{x:p,y:x},{x:p,y:S},{x:f,y:S},{x:f,y:x+Zs},{x:f+Zs,y:x}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),E=_t(e,{}),O=Zt(T),D=v.path(O,E);if(B=n.insert(()=>D,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),_)B.attr("style",_)}else B=Ke(n,d,c,T);if(s)B.attr("style",s);return K(e,B),e.intersect=function(v){return R.polygon(e,T,v)},n}t(dg,"card");function fg(r,e){let{nodeStyles:i}=M(e);e.label="";let s=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),h=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),u=_t(e,{});if(e.look!=="handDrawn")u.roughness=0,u.fillStyle="solid";let d=Zt(h),c=n.path(d,u),f=s.insert(()=>c,":first-child");if(o&&e.look!=="handDrawn")f.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")f.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(p){return R.polygon(e,h,p)},s}t(fg,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,halfPadding:n}=await ee(r,e,Et(e)),u=16,d=i?.padding??n,c=Math.sqrt(h.width**2+h.height**2)/2,f=e.look==="neo"?c+u*2:c+d,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=_t(e,{}),B=S.circle(0,0,f*2,T);p=a.insert(()=>B,":first-child"),p.attr("class","basic label-container").attr("style",ae(x))}else p=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",f).attr("cx",0).attr("cy",0);return K(e,p),e.calcIntersect=function(S,T){let B=S.width/2;return R.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,f,S),R.circle(e,f,S)},a}t(mc,"circle");async function pg(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:h}=await ee(r,i,s),n=o.insert("rect",":first-child"),u=i.padding??0,d=i.positioned?i.width??0:a.width+u,c=i.positioned?i.height??0:a.height+u,f=i.positioned?-d/2:-a.width/2-h,p=i.positioned?-c/2:-a.height/2-h;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",f).attr("y",p).attr("width",d).attr("height",c),K(i,n),i.intersect=function(x){return R.rect(i,x)},o}t(pg,"composite");async function gg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h,label:n}=await ee(r,e,Et(e)),u=i?.nodeBorder??i?.lineColor??"currentColor",d=e.padding??12,c=20,f=12,p=Math.max(h.width+d*2,e.width??0,90),x=Math.max(h.height+d*2+c,e.height??0),S=-x/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(_e(-p/2,S,p,x,f),_t(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-p/2).attr("y",S).attr("width",p).attr("height",x).attr("rx",f).attr("ry",f).attr("style",o);B.append("text").attr("x",-p/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${u}`).text(">_"),K(e,B);let _=S+c+(x-c)/2;return n.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${_-h.height/2-(h.y-(h.top??0))})`),e.intersect=function(v){return R.rect(e,v)},a}t(gg,"consoleWindow");function mg(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},h={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
230
+ M ${o.x},${o.y} L ${h.x},${h.y}`}t(mg,"createLine");function yg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:h}=e,n=y.svg(o),u=_t(e,{});if(e.look!=="handDrawn")u.roughness=0,u.fillStyle="solid";let d=n.circle(0,0,a*2,u),c=mg(a),f=n.path(c,u),p=o.insert(()=>d,":first-child");if(p.insert(()=>f),p.attr("class","outer-path"),h&&e.look!=="handDrawn")p.selectAll("path").attr("style",h);if(s&&e.look!=="handDrawn")p.selectAll("path").attr("style",s);return K(e,p),e.intersect=function(x){return l.info("crossedCircle intersect",e,{radius:a,point:x}),R.circle(e,a,x)},o}t(yg,"crossedCircle");function cr(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x:-x,y:-S})}return h}t(cr,"generateCirclePoints");async function xg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+n,c=a.height+u,f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...cr(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...cr(d/2+f*2,-f,f,20,-180,-270),...cr(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...cr(d/2,c/2,f,20,0,90)],S=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...cr(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...cr(d/2+d*0.1,-f,f,20,-180,-270),...cr(d/2+d*0.1,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...cr(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2,y:c/2+f}],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Zt(x).replace("Z",""),E=T.path(v,B),O=Zt(S),D=T.path(O,{...B}),G=o.insert("g",":first-child");if(G.insert(()=>D,":first-child").attr("stroke-opacity",0),G.insert(()=>E,":first-child"),G.attr("class","text"),p&&e.look!=="handDrawn")G.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.attr("transform",`translate(${f}, 0)`),h.attr("transform",`translate(${-d/2+f-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),K(e,G),e.intersect=function(Z){return R.polygon(e,S,Z)},o}t(xg,"curlyBraceLeft");function ur(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x,y:S})}return h}t(ur,"generateCirclePoints");async function Cg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+(e.look==="neo"?n*2:n),c=a.height+(e.look==="neo"?u*2:u),f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...ur(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...ur(d/2+f*2,-f,f,20,-180,-270),...ur(d/2+f*2,f,f,20,-90,-180),{x:d/2+f,y:c/2},...ur(d/2,c/2,f,20,0,90)],S=[{x:-d/2,y:-c/2-f},{x:d/2,y:-c/2-f},...ur(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...ur(d/2+f*2,-f,f,20,-180,-270),...ur(d/2+f*2,f,f,20,-90,-180),{x:d/2+f,y:c/2},...ur(d/2,c/2,f,20,0,90),{x:d/2,y:c/2+f},{x:-d/2,y:c/2+f}],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Zt(x).replace("Z",""),E=T.path(v,B),O=Zt(S),D=T.path(O,{...B}),G=o.insert("g",":first-child");if(G.insert(()=>D,":first-child").attr("stroke-opacity",0),G.insert(()=>E,":first-child"),G.attr("class","text"),p&&e.look!=="handDrawn")G.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.attr("transform",`translate(${-f}, 0)`),h.attr("transform",`translate(${-d/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),K(e,G),e.intersect=function(Z){return R.polygon(e,S,Z)},o}t(Cg,"curlyBraceRight");function xe(r,e,i,s=100,o=0,a=180){let h=[],n=o*Math.PI/180,c=(a*Math.PI/180-n)/(s-1);for(let f=0;f<s;f++){let p=n+f*c,x=r+i*Math.cos(p),S=e+i*Math.sin(p);h.push({x:-x,y:-S})}return h}t(xe,"generateCirclePoints");async function bg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=a.width+(e.look==="neo"?n*2:n),c=a.height+(e.look==="neo"?u*2:u),f=Math.max(5,c*0.1),{cssStyles:p}=e,x=[...xe(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...xe(d/2+f*2,-f,f,20,-180,-270),...xe(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...xe(d/2,c/2,f,20,0,90)],S=[...xe(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...xe(-d/2-f/2,-f,f,20,0,90),...xe(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...xe(-d/2+f+f/2,c/2,f,30,-180,-270)],T=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...xe(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...xe(d/2+f*2,-f,f,20,-180,-270),...xe(d/2+f*2,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...xe(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2-f-f/2,y:c/2+f},...xe(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...xe(-d/2-f/2,-f,f,20,0,90),...xe(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...xe(-d/2+f+f/2,c/2,f,30,-180,-270)],B=y.svg(o),_=_t(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let E=Zt(x).replace("Z",""),O=B.path(E,_),G=Zt(S).replace("Z",""),Z=B.path(G,_),J=Zt(T),rt=B.path(J,{..._}),ht=o.insert("g",":first-child");if(ht.insert(()=>rt,":first-child").attr("stroke-opacity",0),ht.insert(()=>O,":first-child"),ht.insert(()=>Z,":first-child"),ht.attr("class","text"),p&&e.look!=="handDrawn")ht.selectAll("path").attr("style",p);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return ht.attr("transform",`translate(${f-f/4}, 0)`),h.attr("transform",`translate(${-d/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),K(e,ht),e.intersect=function(nt){return R.polygon(e,T,nt)},o}t(bg,"curlyBraces");async function kg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=20,u=5,{shapeSvg:d,bbox:c}=await ee(r,e,Et(e)),f=Math.max(u,c.height+h*2,e?.height??0),p=f/2,x=p-Math.sqrt(Math.max(0,p**2-(c.height/2)**2)),S=Math.max(f/4,x),T=Math.max(n,c.width+a*2+S*2,(c.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(d),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=T,O=f,D=E-p,G=O/4,Z=[{x:D,y:0},{x:G,y:0},{x:0,y:O/2},{x:G,y:O},{x:D,y:O},...Ge(-D,-O/2,p,50,270,90)],J=Zt(Z),rt=_.path(J,v),ht=d.insert(()=>rt,":first-child");if(ht.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",s);return ht.attr("transform",`translate(${-T/2}, ${-f/2})`),K(e,ht),e.intersect=function(nt){return R.polygon(e,Z,nt)},d}t(kg,"curvedTrapezoid");async function wg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.padding??20,u=Math.max(a.width+n*2,e.width??0,100),d=Math.min(Math.max(u*0.23,16),56),c=d*0.27,f=Math.max(a.height+n*2,e.height?e.height-(2*d-c):0),p=Math.min(u*0.177,f*0.45),x=f+2*d-c,S=-x/2,T=S+2*d-c,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let J=y.svg(o),rt=_t(e,{}),ht=J.path(_e(-u/2,T,u,f,p),rt),nt=J.circle(0,S+d,d*2,rt);if(B.insert(()=>nt,":first-child"),B.insert(()=>ht,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-u/2).attr("y",T).attr("width",u).attr("height",f).attr("rx",p).attr("ry",p).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+d).attr("r",d).attr("style",s);K(e,B);let v=T+f/2;h.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let E=S+d,O=Math.asin(Math.min(1,(T-E)/d))*180/Math.PI,D=24,Z=[...Ge(0,-E,d,D,180+O,-O),...Ge(-(-u/2+p),-(T+p),p,12,90,0),...Ge(-(-u/2+p),-(x/2-p),p,12,360,270),...Ge(-(u/2-p),-(x/2-p),p,12,270,180),...Ge(-(u/2-p),-(T+p),p,12,180,90)];return e.intersect=function(J){return R.polygon(e,Z,J)},o}t(wg,"person");var Qk=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),Jk=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),t1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Ep=8,$p=8;async function Sg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,h=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-h,e.width<$p)e.width=$p}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<Ep)e.height=Ep}let{shapeSvg:u,bbox:d,label:c}=await ee(r,e,Et(e)),f=Math.max(e.width??0,d.width)+h,p=f/2,x=p/(2.5+f/50),S=Math.max(e.height??0,d.height)+a+x,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(u),v=Jk(0,0,f,S,p,x),E=t1(0,x,f,S,p,x),O=_t(e,{}),D=_.path(v,O),G=_.path(E,_t(e,{fill:"none"}));if(T=u.insert(()=>G,":first-child"),T=u.insert(()=>D,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=Qk(0,0,f,S,p,x);T=u.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ae(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-f/2}, ${-(S/2+x)})`),K(e,T),c.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+(e.padding??0)/1.5-(d.y-(d.top??0))})`),e.intersect=function(_){let v=R.rect(e,_),E=v.x-(e.x??0);if(p!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let O=x*x*(1-E*E/(p*p));if(O>0)O=Math.sqrt(O);if(O=x-O,_.y-(e.y??0)>0)O=-O;v.y+=O}return v},u}t(Sg,"cylinder");async function di(r,e,i){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:h}=await ee(r,e,Et(e)),n=Math.max(h.width+i.labelPaddingX*2,e?.width||0),u=Math.max(h.height+i.labelPaddingY*2,e?.height||0),d=-n/2,c=-u/2,f,{rx:p,ry:x}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)p=i.rx,x=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=_t(e,{}),_=p||x?T.path(_e(d,c,n,u,p||0),B):T.rectangle(d,c,n,u,B);f=a.insert(()=>_,":first-child"),f.attr("class","basic label-container").attr("style",ae(S))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",o).attr("rx",ae(p)).attr("ry",ae(x)).attr("x",d).attr("y",c).attr("width",n).attr("height",u);return K(e,f,e.look==="handDrawn"?void 0:{width:n,height:u}),e.calcIntersect=function(T,B){return R.rect(T,B)},e.intersect=function(T){return R.rect(e,T)},a}t(di,"drawRect");async function Tg(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:h,height:n}=e,u={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},d=await di(r,e,u);if(e.look==="handDrawn"){let x=y.svg(d),S=_t(e,{}),T=d.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return d;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return d;return d.insert(()=>x.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),d.insert(()=>x.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),d}let c=d.select(".basic.label-container"),f=(Number(c.attr("width"))||h)??0,p=(Number(c.attr("height"))||n)??0;if(f>0&&p>0)c.attr("stroke-dasharray",`${f} ${p}`);return d}t(Tg,"datastore");async function Bg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=n.width+o,c=n.height+a,f=c*0.2,p=-d/2,x=-c/2-f/2,{cssStyles:S}=e,T=y.svg(h),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:p,y:x+f},{x:-p,y:x+f},{x:-p,y:-x},{x:p,y:-x},{x:p,y:x},{x:-p,y:x},{x:-p,y:x+f}],v=T.polygon(_.map((O)=>[O.x,O.y]),B),E=h.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return u.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${x+f+(e.padding??0)/2-(n.y-(n.top??0))})`),K(e,E),e.intersect=function(O){return R.rect(e,O)},h}t(Bg,"dividedRectangle");async function _g(r,e){let{labelStyles:i,nodeStyles:s}=M(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,h=e.look==="neo"?16:a,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.sqrt(u.width**2+u.height**2)/2,c=(e?.width?e?.width/2:d)+(h??0),f=c+o,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{roughness:0.2,strokeWidth:2.5}),B=_t(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,f*2,T),v=S.circle(0,0,c*2,B);p=n.insert("g",":first-child"),p.attr("class",ae(e.cssClasses)).attr("style",ae(x)),p.node()?.appendChild(_),p.node()?.appendChild(v)}else{p=n.insert("g",":first-child");let S=p.insert("circle",":first-child"),T=p.insert("circle");p.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0)}return K(e,p),e.intersect=function(S){return l.info("DoubleCircle intersect",e,f,S),R.circle(e,f,S)},n}t(_g,"doublecircle");async function vg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h}=await ee(r,e,Et(e)),{theme:n,themeVariables:u}=m();ir(o,e.colorIndex,n,u.borderColorArray);let d=h??10,c=a.width/2+d*2,f=a.height/2+d*2,p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=_t(e,{}),B=S.ellipse(0,0,c*2,f*2,T);if(p=o.insert(()=>B,":first-child"),p.attr("class","basic label-container"),x)p.attr("style",x)}else p=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",c).attr("ry",f).attr("cx",0).attr("cy",0);return e.width=c*2,e.height=f*2,K(e,p),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return R.ellipse(S,B,_,T)},e.intersect=function(S){return R.ellipse(e,c,f,S)},o}t(vg,"usecaseEllipse");function Lg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),h=7,{cssStyles:n}=e,u=y.svg(a),{nodeBorder:d}=i,c=_t(e,{fillStyle:"solid"});if(e.look!=="handDrawn")c.roughness=0;let f=u.circle(0,0,h*2,c),p=a.insert(()=>f,":first-child");if(p.selectAll("path").attr("style",`fill: ${d} !important;`),n&&n.length>0&&e.look!=="handDrawn")p.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")p.selectAll("path").attr("style",o);return K(e,p),e.intersect=function(x){return l.info("filledCircle intersect",e,{radius:h,point:x}),R.circle(e,h,x)},a}t(Lg,"filledCircle");var Ip=10,Op=10;async function Fg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Ip)e.height=Ip;if(e.width=(e?.width??0)-a-a/2,e.width<Op)e.width=Op}let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=(e?.width?e?.width:n.width)+(a??0),c=e?.height?e?.height:d+n.height,f=c,p=[{x:0,y:-c},{x:f,y:-c},{x:f/2,y:0}],{cssStyles:x}=e,S=y.svg(h),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=Zt(p),_=S.path(B,T),v=h.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");if(x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=d,e.height=c,K(e,v),u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(E){return l.info("Triangle intersect",e,p,E),R.polygon(e,p,E)},h}t(Fg,"flippedTriangle");async function Mg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.padding??12,u=Math.max(a.width+n*2,e.width??0,90),d=a.height+n*2,c=Math.max(Math.min(d*0.16,14),8),f=Math.max(d+c,e.height??0),p=f-c,x=Math.max(u*0.38,28),S=-f/2,T=[{x:-u/2,y:S},{x:-u/2+x,y:S},{x:-u/2+x,y:S+c},{x:u/2,y:S+c},{x:u/2,y:f/2},{x:-u/2,y:f/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((O)=>`L${O.x},${O.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let D=y.svg(o).path(B,_t(e,{}));if(v=o.insert(()=>D,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")K(e,v);else K(e,v,{width:u,height:f});let E=S+c+p/2;return h.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${E-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(O){return R.polygon(e,T,O)},o}t(Mg,"folder");function Ag(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=M(e);e.label="";let h=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,u=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")u=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0);let c=-1*u/2,f=-1*d/2,p=y.svg(h),x=_t(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let S=p.rectangle(c,f,u,d,x),T=h.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);K(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return R.rect(e,_)},h}t(Ag,"forkJoin");async function Eg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=15,a=10,h=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-h*2,e.width<o)e.width=o}let{shapeSvg:u,bbox:d}=await ee(r,e,Et(e)),c=(e?.height?e?.height:Math.max(a,d.height))+n*2,f=c/2,p=f-Math.sqrt(Math.max(0,f**2-(d.height/2)**2)),x=(e?.width?e?.width:Math.max(o,d.width)+p*2)+h*2,{cssStyles:S}=e,T=y.svg(u),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-x/2,y:-c/2},{x:x/2-f,y:-c/2},...Ge(-x/2+f,0,f,50,90,270),{x:x/2-f,y:c/2},{x:-x/2,y:c/2}],v=Zt(_),E=T.path(v,B),O=u.insert(()=>E,":first-child");if(O.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")O.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")O.selectChildren("path").attr("style",s);return K(e,O),e.intersect=function(D){return l.info("Pill intersect",e,{radius:f,point:D}),R.polygon(e,_,D)},u}t(Eg,"halfRoundedRectangle");var e1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function $g(r,e){let{labelStyles:i,nodeStyles:s}=M(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,h=70,n=32,u=e.look==="neo"?h:a,d=e.look==="neo"?n:a;if(e.width||e.height){let E=(e.height??0)/o;e.width=(e?.width??0)-2*E-d,e.height=(e.height??0)-u}let{shapeSvg:c,bbox:f}=await ee(r,e,Et(e)),p=(e?.height?e?.height:f.height)+u,x=p/o,S=(e?.width?e?.width:f.width)+2*x+d,T=[{x,y:0},{x:S-x,y:0},{x:S,y:-p/2},{x:S-x,y:-p},{x,y:-p},{x:0,y:-p/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(c),E=_t(e,{}),O=e1(0,0,S,p,x),D=v.path(O,E);if(B=c.insert(()=>D,":first-child").attr("transform",`translate(${-S/2}, ${p/2})`),_)B.attr("style",_)}else B=Ke(c,S,p,T);if(s)B.attr("style",s);return e.width=S,e.height=p,K(e,B),e.intersect=function(v){return R.polygon(e,T,v)},c}t($g,"hexagon");async function Ig(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await ee(r,e,Et(e)),a=Math.max(30,e?.width??0),h=Math.max(30,e?.height??0),{cssStyles:n}=e,u=y.svg(o),d=_t(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let c=[{x:0,y:0},{x:a,y:0},{x:0,y:h},{x:a,y:h}],f=Zt(c),p=u.path(f,d),x=o.insert(()=>p,":first-child");if(x.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")x.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")x.selectChildren("path").attr("style",s);return x.attr("transform",`translate(${-a/2}, ${-h/2})`),K(e,x),e.intersect=function(S){return l.info("Pill intersect",e,{points:c}),R.polygon(e,c,S)},o}t(Ig,"hourglass");async function Og(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,label:f}=await ee(r,e,"icon-shape default"),p=e.pos==="t",x=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=je(e),_=-S/2,v=-x/2,E=e.label?8:0,O=y.svg(d),D=_t(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let G=O.rectangle(_,v,S,x,D),Z=Math.max(S,c.width),J=x+c.height+E,rt=O.rectangle(-Z/2,-J/2,Z,J,{...D,fill:"transparent",stroke:"none"}),ht=d.insert(()=>G,":first-child"),nt=d.insert(()=>rt);if(e.icon){let ot=d.append("g");ot.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=ot.node().getBBox(),{width:X,height:tt,x:N,y:at}=P;ot.attr("transform",`translate(${-X/2-N},${p?c.height/2+E/2-tt/2-at:-c.height/2-E/2-tt/2-at})`),ot.attr("style",`color: ${B.get("stroke")??T};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-J/2:J/2-c.height})`),ht.attr("transform",`translate(0,${p?c.height/2+E/2:-c.height/2-E/2})`),K(e,nt),e.intersect=function(ot){if(l.info("iconSquare intersect",e,ot),!e.label)return R.rect(e,ot);let P=e.x??0,X=e.y??0,tt=e.height??0,N=[];if(p)N=[{x:P-c.width/2,y:X-tt/2},{x:P+c.width/2,y:X-tt/2},{x:P+c.width/2,y:X-tt/2+c.height+E},{x:P+S/2,y:X-tt/2+c.height+E},{x:P+S/2,y:X+tt/2},{x:P-S/2,y:X+tt/2},{x:P-S/2,y:X-tt/2+c.height+E},{x:P-c.width/2,y:X-tt/2+c.height+E}];else N=[{x:P-S/2,y:X-tt/2},{x:P+S/2,y:X-tt/2},{x:P+S/2,y:X-tt/2+x},{x:P+c.width/2,y:X-tt/2+x},{x:P+c.width/2/2,y:X+tt/2},{x:P-c.width/2,y:X+tt/2},{x:P-c.width/2,y:X-tt/2+x},{x:P-S/2,y:X-tt/2+x}];return R.polygon(e,N,ot)},d}t(Og,"icon");async function Dg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,label:f}=await ee(r,e,"icon-shape default"),p=20,x=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=je(e),v=y.svg(d),E=_t(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let O=_.get("fill");E.stroke=O??B;let D=d.append("g");if(e.icon)D.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let G=D.node().getBBox(),{width:Z,height:J,x:rt,y:ht}=G,nt=Math.max(Z,J)*Math.SQRT2+p*2,ot=v.circle(0,0,nt,E),P=Math.max(nt,c.width),X=nt+c.height+x,tt=v.rectangle(-P/2,-X/2,P,X,{...E,fill:"transparent",stroke:"none"}),N=d.insert(()=>ot,":first-child"),at=d.insert(()=>tt);return D.attr("transform",`translate(${-Z/2-rt},${S?c.height/2+x/2-J/2-ht:-c.height/2-x/2-J/2-ht})`),D.attr("style",`color: ${_.get("stroke")??T};`),f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${S?-X/2:X/2-c.height})`),N.attr("transform",`translate(0,${S?c.height/2+x/2:-c.height/2-x/2})`),K(e,at),e.intersect=function(st){return l.info("iconSquare intersect",e,st),R.rect(e,st)},d}t(Dg,"iconCircle");async function Pg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,halfPadding:f,label:p}=await ee(r,e,"icon-shape default"),x=e.pos==="t",S=n+f*2,T=n+f*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=je(e),E=-T/2,O=-S/2,D=e.label?8:0,G=y.svg(d),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let J=v.get("fill");Z.stroke=J??_;let rt=G.path(_e(E,O,T,S,5),Z),ht=Math.max(T,c.width),nt=S+c.height+D,ot=G.rectangle(-ht/2,-nt/2,ht,nt,{...Z,fill:"transparent",stroke:"none"}),P=d.insert(()=>rt,":first-child").attr("class","icon-shape2"),X=d.insert(()=>ot);if(e.icon){let tt=d.append("g");tt.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=tt.node().getBBox(),{width:at,height:st,x:Bt,y:vt}=N;tt.attr("transform",`translate(${-at/2-Bt},${x?c.height/2+D/2-st/2-vt:-c.height/2-D/2-st/2-vt})`),tt.attr("style",`color: ${v.get("stroke")??B};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${x?-nt/2:nt/2-c.height})`),P.attr("transform",`translate(0,${x?c.height/2+D/2:-c.height/2-D/2})`),K(e,X),e.intersect=function(tt){if(l.info("iconSquare intersect",e,tt),!e.label)return R.rect(e,tt);let N=e.x??0,at=e.y??0,st=e.height??0,Bt=[];if(x)Bt=[{x:N-c.width/2,y:at-st/2},{x:N+c.width/2,y:at-st/2},{x:N+c.width/2,y:at-st/2+c.height+D},{x:N+T/2,y:at-st/2+c.height+D},{x:N+T/2,y:at+st/2},{x:N-T/2,y:at+st/2},{x:N-T/2,y:at-st/2+c.height+D},{x:N-c.width/2,y:at-st/2+c.height+D}];else Bt=[{x:N-T/2,y:at-st/2},{x:N+T/2,y:at-st/2},{x:N+T/2,y:at-st/2+S},{x:N+c.width/2,y:at-st/2+S},{x:N+c.width/2/2,y:at+st/2},{x:N-c.width/2,y:at+st/2},{x:N-c.width/2,y:at-st/2+S},{x:N-T/2,y:at-st/2+S}];return R.polygon(e,Bt,tt)},d}t(Pg,"iconRounded");async function Rg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(e);e.labelStyle=o;let a=e.assetHeight??48,h=e.assetWidth??48,n=Math.max(a,h),u=s?.wrappingWidth;e.width=Math.max(n,u??0);let{shapeSvg:d,bbox:c,halfPadding:f,label:p}=await ee(r,e,"icon-shape default"),x=e.pos==="t",S=n+f*2,T=n+f*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=je(e),E=-T/2,O=-S/2,D=e.label?8:0,G=y.svg(d),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let J=v.get("fill");Z.stroke=J??_;let rt=G.path(_e(E,O,T,S,0.1),Z),ht=Math.max(T,c.width),nt=S+c.height+D,ot=G.rectangle(-ht/2,-nt/2,ht,nt,{...Z,fill:"transparent",stroke:"none"}),P=d.insert(()=>rt,":first-child"),X=d.insert(()=>ot);if(e.icon){let tt=d.append("g");tt.html(`<g>${await yr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=tt.node().getBBox(),{width:at,height:st,x:Bt,y:vt}=N;tt.attr("transform",`translate(${-at/2-Bt},${x?c.height/2+D/2-st/2-vt:-c.height/2-D/2-st/2-vt})`),tt.attr("style",`color: ${v.get("stroke")??B};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${x?-nt/2:nt/2-c.height})`),P.attr("transform",`translate(0,${x?c.height/2+D/2:-c.height/2-D/2})`),K(e,X),e.intersect=function(tt){if(l.info("iconSquare intersect",e,tt),!e.label)return R.rect(e,tt);let N=e.x??0,at=e.y??0,st=e.height??0,Bt=[];if(x)Bt=[{x:N-c.width/2,y:at-st/2},{x:N+c.width/2,y:at-st/2},{x:N+c.width/2,y:at-st/2+c.height+D},{x:N+T/2,y:at-st/2+c.height+D},{x:N+T/2,y:at+st/2},{x:N-T/2,y:at+st/2},{x:N-T/2,y:at-st/2+c.height+D},{x:N-c.width/2,y:at-st/2+c.height+D}];else Bt=[{x:N-T/2,y:at-st/2},{x:N+T/2,y:at-st/2},{x:N+T/2,y:at-st/2+S},{x:N+c.width/2,y:at-st/2+S},{x:N+c.width/2/2,y:at+st/2},{x:N-c.width/2,y:at+st/2},{x:N-c.width/2,y:at-st/2+S},{x:N-T/2,y:at-st/2+S}];return R.polygon(e,Bt,tt)},d}t(Rg,"iconSquare");async function qg(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:h}=M(e);e.labelStyle=h;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let u=Math.max(e.label?n??0:0,e?.assetWidth??o),d=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:u:u,c=e.constraint==="on"?d/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(d,n??0);let{shapeSvg:f,bbox:p,label:x}=await ee(r,e,"image-shape default"),S=e.pos==="t",T=-d/2,B=-c/2,_=e.label?8:0,v=y.svg(f),E=_t(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let O=v.rectangle(T,B,d,c,E),D=Math.max(d,p.width),G=c+p.height+_,Z=v.rectangle(-D/2,-G/2,D,G,{...E,fill:"none",stroke:"none"}),J=f.insert(()=>O,":first-child"),rt=f.insert(()=>Z);if(e.img){let ht=f.append("image");ht.attr("href",e.img),ht.attr("width",d),ht.attr("height",c),ht.attr("preserveAspectRatio","none"),ht.attr("transform",`translate(${-d/2},${S?G/2-c:-G/2})`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${S?-c/2-p.height/2-_/2:c/2-p.height/2+_/2})`),J.attr("transform",`translate(0,${S?p.height/2+_/2:-p.height/2-_/2})`),K(e,rt),e.intersect=function(ht){if(l.info("iconSquare intersect",e,ht),!e.label)return R.rect(e,ht);let nt=e.x??0,ot=e.y??0,P=e.height??0,X=[];if(S)X=[{x:nt-p.width/2,y:ot-P/2},{x:nt+p.width/2,y:ot-P/2},{x:nt+p.width/2,y:ot-P/2+p.height+_},{x:nt+d/2,y:ot-P/2+p.height+_},{x:nt+d/2,y:ot+P/2},{x:nt-d/2,y:ot+P/2},{x:nt-d/2,y:ot-P/2+p.height+_},{x:nt-p.width/2,y:ot-P/2+p.height+_}];else X=[{x:nt-d/2,y:ot-P/2},{x:nt+d/2,y:ot-P/2},{x:nt+d/2,y:ot-P/2+c},{x:nt+p.width/2,y:ot-P/2+c},{x:nt+p.width/2/2,y:ot+P/2},{x:nt-p.width/2,y:ot+P/2},{x:nt-p.width/2,y:ot-P/2+c},{x:nt-d/2,y:ot-P/2+c}];return R.polygon(e,X,ht)},f}t(qg,"imageSquare");async function Wg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a*2,e.height??0),c=Math.max(u.width+h*2,(e.width??0)-d),f=[{x:0,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:-3*d/6,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=Zt(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ke(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,K(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(Wg,"inv_trapezoid");async function Ng(r,e){let{shapeSvg:i,bbox:s,label:o}=await ee(r,e,"label"),a=i.insert("rect",":first-child"),h=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),K(e,a),e.intersect=function(u){return R.rect(e,u)},i}t(Ng,"labelRect");async function zg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:0,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:-(3*d)/6,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=Zt(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ke(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,K(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(zg,"lean_left");async function Hg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:-3*d/6,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:0,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=Zt(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ke(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,K(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(Hg,"lean_right");function jg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",Et(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,h=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),u=7,d=[{x:h,y:0},{x:0,y:n+u/2},{x:h-2*u,y:n+u/2},{x:0,y:2*n},{x:h,y:n-u/2},{x:2*u,y:n-u/2}],c=y.svg(o),f=_t(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let p=Zt(d),x=c.path(p,f),S=o.insert(()=>x,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${h/2},${-n})`),K(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),R.polygon(e,d,T)},o}t(jg,"lightningBolt");var r1=t((r,e,i,s,o,a,h)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+h}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),i1=t((r,e,i,s,o,a,h)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+h}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),o1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Dp=10,Pp=10;async function Ug(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<Pp)e.width=Pp;let E=_/2/(2.5+_/50);if(e.height=(e.height??0)-h-E*3,e.height<Dp)e.height=Dp}let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=(e?.width?e?.width:u.width)+a*2,f=c/2,p=f/(2.5+c/50),x=(e?.height?e?.height:u.height)+p+h*2,S=x*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=i1(0,0,c,x,f,p,S),E=o1(0,p,c,x,f,p),O=_t(e,{}),D=_.path(v,O),G=_.path(E,O);if(n.insert(()=>G,":first-child").attr("class","line"),T=n.insert(()=>D,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=r1(0,0,c,x,f,p,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ae(B)).attr("style",s)}return T.attr("label-offset-y",p),T.attr("transform",`translate(${-c/2}, ${-(x/2+p)})`),K(e,T),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),e.intersect=function(_){let v=R.rect(e,_),E=v.x-(e.x??0);if(f!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-p)){let O=p*p*(1-E*E/(f*f));if(O>0)O=Math.sqrt(O);if(O=p-O,_.y-(e.y??0)>0)O=-O;v.y+=O}return v},n}t(Ug,"linedCylinder");async function Gg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height){let O=e.width;if(e.width=(O??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-h*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=(e?.width?e?.width:u.width)+(a??0)*2,f=(e?.height?e?.height:u.height)+(h??0)*2,p=e.look==="neo"?f/4:f/8,x=f+p,{cssStyles:S}=e,T=y.svg(n),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-c/2-c/2*0.1,y:-x/2},{x:-c/2-c/2*0.1,y:x/2},...kr(-c/2-c/2*0.1,x/2,c/2+c/2*0.1,x/2,p,0.8),{x:c/2+c/2*0.1,y:-x/2},{x:-c/2-c/2*0.1,y:-x/2},{x:-c/2,y:-x/2},{x:-c/2,y:x/2*1.1},{x:-c/2,y:-x/2}],v=T.polygon(_.map((O)=>[O.x,O.y]),B),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return E.attr("transform",`translate(0,${-p/2})`),d.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*0.1/2-(u.x-(u.left??0))},${-f/2+(e.padding??0)-p-(u.y-(u.top??0))})`),K(e,E),e.intersect=function(O){return R.polygon(e,_,O)},n}t(Gg,"linedWaveEdgedRect");var s1=56,ic=72,Rp=8,qp=2,a1=8,n1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Wp=Math.PI/3,Np=0.6,oc=t((r,e)=>{let i=e*Np,s=e*Math.sqrt(1-Np**2),o=Math.cos(Wp),a=-Math.sin(Wp),h=i*-a,n=r+i*o,u=s*o,d=s*a;return`M ${h-u} ${n-d} L ${h+u} ${n+d}`},"businessMarkerPathForCircle"),l1={normal:oc(-24,12),hollow:oc(-23,9),awesome:oc(-21,13),icon:"M 12 -8 L 26 -26"},zp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),Lc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,_t(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),h1=t((r,e,i,s,o,a,h=!1)=>{if(e.look==="handDrawn"){let d=y.svg(r).circle(i,s,o*2,_t(e,h?{fill:"none"}:{}));return r.insert(()=>d,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(h)n.attr("fill","none");return n},"appendActorCircle");var c1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",l1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function xo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=M(e);e.labelStyle=o;let h=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:u,label:d}=await ee(r,h,Et(e,`usecase-actor-variant usecase-actor-${i}`)),c=e.accessibleName??e.label;if(c)n.attr("role","img").attr("aria-label",c);d.attr("class","label actor-label usecase-actor-label");let{theme:f,themeVariables:p}=m();ir(n,e.colorIndex,f,p.borderColorArray);let x,S;if(e.stereotype){let J=await $r(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=J.label.attr("class","label usecase-stereotype"),S=J.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${n1[i]}`).attr("style",a||null);await s(T,e),c1(T,e,i);let B=e.padding??a1,_=S?.height??0,v=ic+Rp+u.height+(S?_+qp:0),E=Math.max(s1,u.width,S?.width??0)+B*2,O=v+B*2,D=-v/2;T.attr("transform",`translate(0,${D+ic/2})`);let G=D+ic+Rp;if(x&&S)G+=_/2,zp(x,S,G),G+=_/2+qp;zp(d,u,G+u.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-E/2).attr("y",-O/2).attr("width",E).attr("height",O).attr("opacity",0).attr("aria-hidden","true");return K(e,Z),e.intersect=(J)=>R.rect(e,J),n}t(xo,"renderUsecaseActor");var u1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Vg(r,e){return xo(r,e,"normal",(i,s)=>{Lc(i,s,u1,"usecase-actor-stick")})}t(Vg,"usecaseActor");var d1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Kg(r,e){return xo(r,e,"awesome",(i,s)=>{Lc(i,s,d1,"usecase-actor-awesome-silhouette")})}t(Kg,"usecaseActorAwesome");var f1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Qg(r,e){return xo(r,e,"hollow",(i,s)=>{h1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),Lc(i,s,f1,"usecase-actor-hollow-body",!0)})}t(Qg,"usecaseActorHollow");var ni=52,Hp=42,Yp=-2,p1=t(async(r,e)=>{let i=-ni/2,s=Yp-ni/2;if(e.look==="handDrawn"){let c=y.svg(r).rectangle(i,s,ni,ni,_t(e,{}));r.insert(()=>c,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",ni).attr("height",ni).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await _s(o.includes(":")?o:`fa:${o}`),h=await yr(o,{height:Hp,width:Hp,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${h}</g>`),u=n.node()?.getBBox();if(u)n.attr("transform",`translate(${-u.width/2-u.x},${Yp-u.height/2-u.y})`)},"drawIconActor");async function tm(r,e){return xo(r,e,"icon",p1)}t(tm,"usecaseActorIcon");var jp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function em(r,e){let i=e,{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:h,bbox:n,halfPadding:u,label:d}=await ee(r,a,Et(e,"usecase-business-shape"));d.attr("class","label usecase-label");let{theme:c,themeVariables:f}=m();ir(h,e.colorIndex,c,f.borderColorArray);let p,x;if(i.stereotype){let P=await $r(h,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});p=P.label.attr("class","label usecase-stereotype"),x=P.bbox}let S=x?2:0,T=n.height+(x?.height??0)+S,B=Math.max(n.width,x?.width??0),_=u??10,v=B/2+_*2,E=T/2+_*2,O=Math.min(Math.max(_/5,1),_/2),D=B/2+O,G=v-O,Z=D/v,J=G/v,rt=E*Math.sqrt(Math.max(0,1-Z*Z)),ht=-E*Math.sqrt(Math.max(0,1-J*J));if(p&&x)jp(p,x,-T/2+x.height/2);jp(d,n,T/2-n.height/2);let nt;if(e.look==="handDrawn"){let X=y.svg(h).ellipse(0,0,v*2,E*2,_t(e,{}));nt=h.insert(()=>X,":first-child").attr("class","basic label-container usecase-business-ellipse")}else nt=h.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",E).attr("cx",0).attr("cy",0);h.append("path").attr("class","usecase-business-marker").attr("d",`M ${D} ${rt} L ${G} ${ht}`).attr("fill","none").attr("style",o||null);let ot=i.accessibleName??i.label;if(ot)h.attr("role","img").attr("aria-label",ot);return K(e,nt),e.calcIntersect=(P,X)=>R.ellipse(P,P.width/2,P.height/2,X),e.intersect=(P)=>R.ellipse(e,v,E,P),h}t(em,"usecaseBusiness");var sc=8,Up=4,g1=1,ac=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),m1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:g1},"numericStrokeWidth");async function rm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=M(e),{stylesMap:a}=je(e);e.labelStyle=s;let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e,"usecase-json-table"));if(h.attr("role","img"),i.accessibleName)h.attr("aria-label",i.accessibleName);u.attr("class","label usecase-json-title");let d=h.append("g").attr("class","usecase-json-table-grid"),c=[];for(let P of i.jsonRows??[]){let X=await $r(d,P.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),tt=await $r(d,P.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});c.push({key:{label:X.label.attr("class","label usecase-json-key"),bbox:X.bbox},value:{label:tt.label.attr("class","label usecase-json-value"),bbox:tt.bbox}})}let f=Math.max(0,...c.map(({key:P})=>P.bbox.width))+sc*2,p=Math.max(0,...c.map(({value:P})=>P.bbox.width))+sc*2,x=n.width+sc*2,S=Math.max(x,f+p),T=p+Math.max(0,S-f-p),B=n.height+Up*2,_=c.map(({key:P,value:X})=>Math.max(P.bbox.height,X.bbox.height)+Up*2),v=B+_.reduce((P,X)=>P+X,0),E=m1(a.get("stroke-width")),O=S+E*2,D=v+E*2,G=-S/2,Z=-v/2,J=e.look==="handDrawn"?y.svg(h):void 0,rt=J?_t(e,{}):void 0,ht=t((P,X,tt,N,at,st)=>{if(J&&rt){let Bt=J.rectangle(tt,N,at,st,rt);return P.insert(()=>Bt,":first-child").attr("class",X)}return P.insert("rect",":first-child").attr("class",X).attr("x",tt).attr("y",N).attr("width",at).attr("height",st).attr("style",o)},"insertCell"),nt=ht(h,"label-container usecase-json-border",-O/2,-D/2,O,D);ht(d,"usecase-json-cell usecase-json-title-cell",G,Z,S,B),d.node()?.append(u.node()),ac(u,n,0,Z+B/2);let ot=Z+B;return c.forEach(({key:P,value:X},tt)=>{let N=_[tt],at=d.append("g").attr("class","usecase-json-row").attr("data-row-index",tt).attr("transform",`translate(0,${ot})`);ht(at,"usecase-json-cell usecase-json-key-cell",G,0,f,N),ht(at,"usecase-json-cell usecase-json-value-cell",G+f,0,T,N),at.node()?.append(P.label.node(),X.label.node()),ac(P.label,P.bbox,G+f/2,N/2),ac(X.label,X.bbox,G+f+T/2,N/2),ot+=N}),K(e,nt),e.intersect=(P)=>R.rect(e,P),h}t(rm,"usecaseJsonTable");async function im(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-h*2-2*n,10);let{shapeSvg:u,bbox:d,label:c}=await ee(r,e,Et(e)),f=(e?.width?e?.width:d.width)+a*2+2*n,p=(e?.height?e?.height:d.height)+h*2+2*n,x=f-2*n,S=p-2*n,T=-x/2,B=-S/2,{cssStyles:_}=e,v=y.svg(u),E=_t(e,{}),O=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+x-n,y:B+S+n},{x:T+x-n,y:B+S},{x:T+x,y:B+S},{x:T+x,y:B+S-n},{x:T+x+n,y:B+S-n},{x:T+x+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],D=[{x:T,y:B+n},{x:T+x-n,y:B+n},{x:T+x-n,y:B+S},{x:T+x,y:B+S},{x:T+x,y:B},{x:T,y:B}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let G=Zt(O),Z=v.path(G,E),J=Zt(D),rt=v.path(J,E);if(e.look!=="handDrawn")Z=lc(Z),rt=lc(rt);let ht=u.insert("g",":first-child");if(ht.insert(()=>Z),ht.insert(()=>rt),ht.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ht.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return c.attr("transform",`translate(${-(d.width/2)-n-(d.x-(d.left??0))}, ${-(d.height/2)+n-(d.y-(d.top??0))})`),K(e,ht),e.intersect=function(nt){return R.polygon(e,O,nt)},u}t(im,"multiRect");async function om(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=e.padding??0,u=e.look==="neo"?16:n,d=e.look==="neo"?12:n,c=!0;if(e.width||e.height)c=!1,e.width=(e?.width??0)-u*2,e.height=(e?.height??0)-d*3;let f=Math.max(a.width,e?.width??0)+u*2,p=Math.max(a.height,e?.height??0)+d*3,x=e.look==="neo"?p/4:p/8,S=p+(c?x/2:-x/2),T=-f/2,B=-S/2,_=10,{cssStyles:v}=e,E=kr(T-_,B+S+_,T+f-_,B+S+_,x,0.8),O=E?.[E.length-1],D=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...E,{x:T+f-_,y:O.y-_},{x:T+f,y:O.y-_},{x:T+f,y:O.y-2*_},{x:T+f+_,y:O.y-2*_},{x:T+f+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],G=[{x:T,y:B+_},{x:T+f-_,y:B+_},{x:T+f-_,y:O.y-_},{x:T+f,y:O.y-_},{x:T+f,y:B},{x:T,y:B}],Z=y.svg(o),J=_t(e,{});if(e.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let rt=Zt(D),ht=Z.path(rt,J),nt=Zt(G),ot=Z.path(nt,J),P=o.insert(()=>ht,":first-child");if(P.insert(()=>ot),P.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")P.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")P.selectAll("path").attr("style",s);return P.attr("transform",`translate(0,${-x/2})`),h.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-x-(a.y-(a.top??0))})`),K(e,P),e.intersect=function(X){return R.polygon(e,D,X)},o}t(om,"multiWaveEdgedRectangle");async function am(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);if(e.labelStyle=s,!(e.useHtmlLabels||tn(C())))e.centerLabel=!0;let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),f=-d/2,p=-c/2,{cssStyles:x}=e,S=y.svg(h),T=_t(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(f,p,d,c,T),_=h.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),x&&e.look!=="handDrawn")_.selectAll("path").attr("style",x);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(e,_),e.intersect=function(v){return R.rect(e,v)},h}t(am,"note");var y1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function nm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await ee(r,e,Et(e)),h=a.width+(e.padding??0),n=a.height+(e.padding??0),u=h+n,d=0.5,c=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=e;if(e.look==="handDrawn"){let x=y.svg(o),S=_t(e,{}),T=y1(0,0,u),B=x.path(T,S);if(f=o.insert(()=>B,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),p)f.attr("style",p)}else f=Ke(o,u,u,c),f.attr("transform",`translate(${-u/2+d}, ${u/2})`);if(s)f.attr("style",s);return K(e,f),e.calcIntersect=function(x,S){let T=x.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return R.polygon(x,B,S)},e.intersect=function(x){return this.calcIntersect(e,x)},o}t(nm,"question");async function $m(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,h=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=u.width+(e.look==="neo"?a*2:a),f=Math.max(u.height+(e.look==="neo"?h*2:h),e.height??0),p=f/4,S=-Math.max(c,(e.width??0)-p)/2,T=-f/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,E=y.svg(n),O=_t(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let D=Zt(_),G=E.path(D,O),Z=n.insert(()=>G,":first-child");if(Z.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")Z.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-B/2},0)`),d.attr("transform",`translate(${-B/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),K(e,Z),e.intersect=function(J){return R.polygon(e,_,J)},n}t($m,"rect_left_inv_arrow");async function Om(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:u,label:d}=e,c=await Re(n,d,e.labelStyle,!0,!0),f={width:0,height:0};if(tn(m())){let J=c.children[0],rt=b(c);f=J.getBoundingClientRect(),rt.attr("width",f.width),rt.attr("height",f.height)}l.info("Text 2",u);let p=u||[],x=c.getBBox(),S=await Re(n,Array.isArray(p)?p.join("<br/>"):p,e.labelStyle,!0,!0),T=S.children[0],B=b(S);f=T.getBoundingClientRect(),B.attr("width",f.width),B.attr("height",f.height);let _=(e.padding||0)/2;b(S).attr("transform","translate( "+(f.width>x.width?0:(x.width-f.width)/2)+", "+(x.height+_+5)+")"),b(c).attr("transform","translate( "+(f.width<x.width?0:-(x.width-f.width)/2)+", 0)"),f=n.node().getBBox(),n.attr("transform","translate("+-f.width/2+", "+(-f.height/2-_+3)+")");let v=f.width+(e.padding||0),E=f.height+(e.padding||0),O=-f.width/2-_,D=-f.height/2-_,G,Z;if(e.look==="handDrawn"){let J=y.svg(a),rt=_t(e,{}),ht=J.path(_e(O,D,v,E,e.rx||0),rt),nt=J.line(-f.width/2-_,-f.height/2-_+x.height+_,f.width/2+_,-f.height/2-_+x.height+_,rt);Z=a.insert(()=>(l.debug("Rough node insert CXC",ht),nt),":first-child"),G=a.insert(()=>(l.debug("Rough node insert CXC",ht),ht),":first-child")}else G=h.insert("rect",":first-child"),Z=h.insert("line"),G.attr("class","outer title-state").attr("style",s).attr("x",-f.width/2-_).attr("y",-f.height/2-_).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-f.width/2-_).attr("x2",f.width/2+_).attr("y1",-f.height/2-_+x.height+_).attr("y2",-f.height/2-_+x.height+_);return K(e,G),e.intersect=function(J){return R.rect(e,J)},a}t(Om,"rectWithTitle");async function Pm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return di(r,e,o)}t(Pm,"roundedRect");var Er=8;async function qm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),c=(e?.height??n.height)+a*2,f=d-Er,p=c,x=Er-d/2,S=-c/2,{cssStyles:T}=e,B=y.svg(h),_=_t(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x,y:S},{x:x+f,y:S},{x:x+f,y:S+p},{x:x-Er,y:S+p},{x:x-Er,y:S},{x,y:S},{x,y:S+p}],E=B.polygon(v.map((D)=>[D.x,D.y]),_),O=h.insert(()=>E,":first-child");if(O.attr("class","basic label-container outer-path").attr("style",ae(T)),s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return u.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(e,O),e.intersect=function(D){return R.rect(e,D)},h}t(qm,"shadedProcess");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-h*2,10);let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=(e?.width?e?.width:u.width)+a*2,f=((e?.height?e?.height:u.height)+h*2)*1.5,p=c,x=f/1.5,S=-p/2,T=-x/2,{cssStyles:B}=e,_=y.svg(n),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=[{x:S,y:T},{x:S,y:T+x},{x:S+p,y:T+x},{x:S+p,y:T-x/2}],O=Zt(E),D=_.path(O,v),G=n.insert(()=>D,":first-child");if(G.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")G.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")G.selectChildren("path").attr("style",s);return G.attr("transform",`translate(0, ${x/4})`),d.attr("transform",`translate(${-p/2+(e.padding??0)-(u.x-(u.left??0))}, ${-x/4+(e.padding??0)-(u.y-(u.top??0))})`),K(e,G),e.intersect=function(Z){return R.polygon(e,E,Z)},n}t(Wm,"slopedRect");async function zm(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},h=await di(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:u}=m();ir(h,e.colorIndex,n,u.borderColorArray)}return h}t(zm,"squareRect");var dc=50,x1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(dc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function Hm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,h=e.look==="neo"?24:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),{w:d,h:c}=x1(u,a,h),f=c/2,{cssStyles:p}=e,x=y.svg(n),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-d/2+f,y:-c/2},{x:d/2-f,y:-c/2},...Ge(-d/2+f,0,f,dc,90,270),{x:d/2-f,y:c/2},...Ge(d/2-f,0,f,dc,270,450)],B=Zt(T),_=x.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn")v.selectChildren("path").attr("style",p);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return K(e,v),e.intersect=function(E){return R.polygon(e,T,E)},n}t(Hm,"stadium");async function Ym(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return di(r,e,i)}t(Ym,"state");function jm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:h,stateBorder:n,nodeBorder:u,nodeShadow:d}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let c=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=y.svg(c),p=_t(e,{});if(e.look!=="handDrawn")p.roughness=0,p.fillStyle="solid";let x=f.circle(0,0,e.width,{...p,stroke:h,strokeWidth:2}),S=n??u,T=(e.width??0)*5/14,B=f.circle(0,0,T,{...p,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=c.insert(()=>x,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&d&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",E=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${E})`)}return K(e,_),e.intersect=function(v){return R.circle(e,(e.width??0)/2,v)},c}t(jm,"stateEnd");function Um(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),h;if(e.look==="handDrawn"){let u=y.svg(a).circle(0,0,e.width,Zd(s));h=a.insert(()=>u),h.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else h=a.insert("circle",":first-child"),h.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",u=n?`${n}-drop-shadow-small`:"drop-shadow-small";h.attr("style",`filter:url(#${u})`)}return K(e,h),e.intersect=function(n){return R.circle(e,(e.width??7)/2,n)},a}t(Um,"stateStart");var li=8;async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,h=e.look==="neo"?12:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.width+2*li+a,e.width??0),c=Math.max(u.height+h,e.height??0),f=d-2*li,p=c,x=-d/2,S=-c/2,T=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=_t(e,{}),v=B.rectangle(x,S,f+16,p,_),E=B.line(x+li,S,x+li,S+p,_),O=B.line(x+li+f,S,x+li+f,S+p,_);n.insert(()=>E,":first-child"),n.insert(()=>O,":first-child");let D=n.insert(()=>v,":first-child"),{cssStyles:G}=e;D.attr("class","basic label-container").attr("style",ae(G)),K(e,D)}else{let B=Ke(n,f,p,T);if(s)B.attr("style",s);K(e,B)}return e.intersect=function(B){return R.polygon(e,T,B)},n}t(Xm,"subroutine");var nc=0.2;async function Gm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-h*2,10),e.width=Math.max((e?.width??0)-a*2-nc*(e.height+h*2),10);let{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=(e?.height?e?.height:u.height)+h*2,c=nc*d,f=nc*d,x=(e?.width?e?.width:u.width)+a*2+c-c,S=d,T=-x/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),E=_t(e,{}),O=[{x:T-c/2,y:B},{x:T+x+c/2,y:B},{x:T+x+c/2,y:B+S},{x:T-c/2,y:B+S}],D=[{x:T+x-c/2,y:B+S},{x:T+x+c/2,y:B+S},{x:T+x+c/2,y:B+S-f}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let G=Zt(O),Z=v.path(G,E),J=Zt(D),rt=v.path(J,{...E,fillStyle:"solid"}),ht=n.insert(()=>rt,":first-child");if(ht.insert(()=>Z,":first-child"),ht.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ht.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return K(e,ht),e.intersect=function(nt){return R.polygon(e,O,nt)},n}t(Gm,"taggedRect");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:h}=await ee(r,e,Et(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),d=u/8,c=0.2*n,f=0.2*u,p=u+d,{cssStyles:x}=e,S=y.svg(o),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:p/2},...kr(-n/2-n/2*0.1,p/2,n/2+n/2*0.1,p/2,d,0.8),{x:n/2+n/2*0.1,y:-p/2},{x:-n/2-n/2*0.1,y:-p/2}],_=-n/2+n/2*0.1,v=-p/2-f*0.4,E=[{x:_+n-c,y:(v+u)*1.3},{x:_+n,y:v+u-f},{x:_+n,y:(v+u)*0.9},...kr(_+n,(v+u)*1.25,_+n-c,(v+u)*1.3,-u*0.02,0.5)],O=Zt(B),D=S.path(O,T),G=Zt(E),Z=S.path(G,{...T,fillStyle:"solid"}),J=o.insert(()=>Z,":first-child");if(J.insert(()=>D,":first-child"),J.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")J.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-d/2-(a.y-(a.top??0))})`),K(e,J),e.intersect=function(rt){return R.polygon(e,B,rt)},o}t(Vm,"taggedWaveEdgedRectangle");async function Km(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await ee(r,e,Et(e)),h=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),u=-h/2,d=-n/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",u).attr("y",d).attr("width",h).attr("height",n),K(e,c),e.intersect=function(f){return R.rect(e,f)},o}t(Km,"text");var C1=t((r,e,i,s,o,a)=>`M${r},${e}
231
231
  a${o},${a} 0,0,1 0,${-s}
232
232
  l${i},0
233
233
  a${o},${a} 0,0,1 0,${s}
234
234
  M${i},${-s}
235
235
  a${o},${a} 0,0,0 0,${s}
236
- l${-i},0`,"createCylinderPathD"),T1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),B1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Xp=5,Gp=10;async function ry(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,h=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Xp)e.height=Xp}if(e.width){let B=h/2/(2.5+h/50);if(e.width=e.width-a-B*3,e.width<Gp)e.width=Gp}let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=Math.max(e.height??0,u.height)+a,f=c/2,p=f/(2.5+c/50),x=Math.max(e.width??0,u.width)+p+a,{cssStyles:k}=e,S;if(e.look==="handDrawn"){let T=y.svg(n),B=T1(0,0,x,c,p,f),_=B1(0,0,x,c,p,f),L=T.path(B,_t(e,{})),D=T.path(_,_t(e,{fill:"none"}));if(S=n.insert(()=>D,":first-child"),S=n.insert(()=>L,":first-child"),S.attr("class","basic label-container"),k)S.attr("style",k)}else{let T=S1(0,0,x,c,p,f);if(S=n.insert("path",":first-child").attr("d",T).attr("class","basic label-container").attr("style",le(k)).attr("style",s),S.attr("class","basic label-container outer-path"),k)S.selectAll("path").attr("style",k);if(s)S.selectAll("path").attr("style",s)}return S.attr("label-offset-x",p),S.attr("transform",`translate(${-x/2}, ${c/2} )`),d.attr("transform",`translate(${-(u.width/2)-p-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),W(e,S),e.intersect=function(T){let B=R.rect(e,T),_=B.y-(e.y??0);if(f!=0&&(Math.abs(_)<(e.height??0)/2||Math.abs(_)==(e.height??0)/2&&Math.abs(B.x-(e.x??0))>(e.width??0)/2-p)){let L=p*p*(1-_*_/(f*f));if(L!=0)L=Math.sqrt(Math.abs(L));if(L=p-L,T.x-(e.x??0)>0)L=-L;B.x+=L}return B},n}t(ry,"tiltedCylinder");async function iy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:-3*d/6,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:0,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let k=y.svg(n),S=_t(e,{}),T=Qt(f),B=k.path(T,S);if(p=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ze(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,W(e,p),e.intersect=function(k){return R.polygon(e,f,k)},n}t(iy,"trapezoid");async function oy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=15,u=5;if(e.width||e.height){if(e.height=(e.height??0)-h*2,e.height<u)e.height=u;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:d,bbox:c}=await ee(r,e,Et(e)),f=(e?.width?e?.width:c.width)+a*2,p=(e?.height?e?.height:c.height)+h*2,{cssStyles:x}=e,k=y.svg(d),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2*0.8,y:-p/2},{x:f/2*0.8,y:-p/2},{x:f/2,y:-p/2*0.6},{x:f/2,y:p/2},{x:-f/2,y:p/2},{x:-f/2,y:-p/2*0.6}],B=Qt(T),_=k.path(B,S),L=d.insert(()=>_,":first-child");if(L.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")L.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")L.selectChildren("path").attr("style",s);return W(e,L),e.intersect=function(D){return R.polygon(e,T,D)},d}t(oy,"trapezoidalPentagon");var Vp=10,Kp=10;async function sy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<Kp)e.width=Kp;if(e.height=e?.height??0,e.height<Vp)e.height=Vp}let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=ta(m().flowchart?.htmlLabels),c=(e?.width?e?.width:n.width)+a,f=e?.height?e?.height:c+n.height,p=f,x=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:k}=e,S=y.svg(h),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=Qt(x),_=S.path(B,T),L=h.insert(()=>_,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(k&&e.look!=="handDrawn")L.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")L.selectChildren("path").attr("style",s);return e.width=c,e.height=f,W(e,L),u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${f/2-(n.height+(e.padding??0)/(d?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(D){return l.info("Triangle intersect",e,x,D),R.polygon(e,x,D)},h}t(sy,"triangle");async function ay(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-h*2,e.height<10)e.height=10}let{shapeSvg:u,bbox:d,label:c}=await ee(r,e,Et(e)),f=(e?.width?e?.width:d.width)+(a??0)*2,p=(e?.height?e?.height:d.height)+(h??0)*2,x=e.look==="neo"?p/4:p/8,k=p+(n?x:-x),{cssStyles:S}=e,B=14-f,_=B>0?B/2:0,L=y.svg(u),D=_t(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=[{x:-f/2-_,y:k/2},...wr(-f/2-_,k/2,f/2+_,k/2,x,0.8),{x:f/2+_,y:-k/2},{x:-f/2-_,y:-k/2}],K=Qt(P),Z=L.path(K,D),J=u.insert(()=>Z,":first-child");if(J.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")J.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(0,${-x/2})`),c.attr("transform",`translate(${-f/2+(e.padding??0)-(d.x-(d.left??0))},${-p/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,J),e.intersect=function(rt){return R.polygon(e,P,rt)},u}t(ay,"waveEdgedRectangle");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let D=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-h-D*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=(e?.width?e?.width:u.width)+a*2,c=(e?.height?e?.height:u.height)+h,f=c/8,p=c+f*2,{cssStyles:x}=e,k=y.svg(n),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-d/2,y:p/2},...wr(-d/2,p/2,d/2,p/2,f,1),{x:d/2,y:-p/2},...wr(d/2,-p/2,-d/2,-p/2,f,-1)],B=Qt(T),_=k.path(B,S),L=n.insert(()=>_,":first-child");if(L.attr("class","basic label-container"),x&&e.look!=="handDrawn")L.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")L.selectAll("path").attr("style",s);return W(e,L),e.intersect=function(D){return R.polygon(e,T,D)},n}t(ny,"waveRectangle");var ce=10;async function ly(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-ce,10),e.height=Math.max((e?.height??0)-a*2-ce,10);let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=(e?.width?e?.width:n.width)+o*2+ce,c=(e?.height?e?.height:n.height)+a*2+ce,f=d-ce,p=c-ce,x=-f/2,k=-p/2,{cssStyles:S}=e,T=y.svg(h),B=_t(e,{}),_=[{x:x-ce,y:k-ce},{x:x-ce,y:k+p},{x:x+f,y:k+p},{x:x+f,y:k-ce}],L=`M${x-ce},${k-ce} L${x+f},${k-ce} L${x+f},${k+p} L${x-ce},${k+p} L${x-ce},${k-ce}
237
- M${x-ce},${k} L${x+f},${k}
238
- M${x},${k-ce} L${x},${k+p}`;if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let D=T.path(L,B),P=h.insert(()=>D,":first-child");if(P.attr("transform",`translate(${ce/2}, ${ce/2})`),P.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")P.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")P.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(n.width/2)+ce/2-(n.x-(n.left??0))}, ${-(n.height/2)+ce/2-(n.y-(n.top??0))})`),W(e,P),e.intersect=function(K){return R.polygon(e,_,K)},h}t(ly,"windowPane");var Zp=new Set(["redux-color","redux-dark-color"]),_1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=E(),{rowEven:a,rowOdd:h,nodeBorder:n,borderColorArray:u}=o;if(e.look==="handDrawn"){let{themeVariables:Mt}=E(),{background:Pt}=Mt,jt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Pt}`]};await Fc(r,jt)}let d=E();e.useHtmlLabels=d.htmlLabels;let c=d.er?.diagramPadding??10,f=d.er?.entityPadding??6,{cssStyles:p}=e,{labelStyles:x,nodeStyles:k}=M(e);if(i.attributes.length===0&&e.label){let Mt={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5,classes:""};if(rr(e.label,d)+Mt.labelPaddingX*2<d.er.minEntityWidth)e.width=d.er.minEntityWidth;let Pt=await di(r,e,Mt);if(s!=null&&Zp.has(s)){let jt=i.colorIndex??0;Pt.attr("data-color-id",`color-${jt%u.length}`)}if(!ta(d.htmlLabels)){let jt=Pt.select("text"),qt=jt.node()?.getBBox();jt.attr("transform",`translate(${-qt.width/2}, 0)`)}return Pt}if(!d.htmlLabels)c*=1.25,f*=1.25;let S=Et(e);if(!S)S="node default";let T=r.insert("g").attr("class",S).attr("id",e.domId||e.id),B=await ci(T,e.label??"",d,0,0,["name"],x);B.height+=f;let _=0,L=[],D=[],P=0,K=0,Z=0,J=0,rt=!0,ht=!0;for(let Mt of i.attributes){let Pt=await ci(T,Mt.type,d,0,_,["attribute-type"],x);P=Math.max(P,Pt.width+c);let jt=await ci(T,Mt.name,d,0,_,["attribute-name"],x);K=Math.max(K,jt.width+c);let qt=await ci(T,Mt.keys.join(),d,0,_,["attribute-keys"],x);Z=Math.max(Z,qt.width+c);let oe=await ci(T,Mt.comment,d,0,_,["attribute-comment"],x);J=Math.max(J,oe.width+c);let ie=Math.max(Pt.height,jt.height,qt.height,oe.height)+f;D.push({yOffset:_,rowHeight:ie}),_+=ie}let nt=4;if(Z<=c)rt=!1,Z=0,nt--;if(J<=c)ht=!1,J=0,nt--;let ot=T.node().getBBox();if(B.width+c*2-(P+K+Z+J)>0){let Mt=B.width+c*2-(P+K+Z+J);if(P+=Mt/nt,K+=Mt/nt,Z>0)Z+=Mt/nt;if(J>0)J+=Mt/nt}let N=P+K+Z+J,X=y.svg(T),tt=_t(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let U=0;if(D.length>0)U=D.reduce((Mt,Pt)=>Mt+(Pt?.rowHeight??0),0);let at=Math.max(ot.width+c*2,e?.width||0,N),st=Math.max((U??0)+B.height,e?.height||0),Bt=-at/2,vt=-st/2;if(T.selectAll("g:not(:first-child)").each((Mt,Pt,jt)=>{let qt=b(jt[Pt]),oe=qt.attr("transform"),ie=0,Qe=0;if(oe){let We=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(oe);if(We){if(ie=parseFloat(We[1]),Qe=parseFloat(We[2]),qt.attr("class").includes("attribute-name"))ie+=P;else if(qt.attr("class").includes("attribute-keys"))ie+=P+K;else if(qt.attr("class").includes("attribute-comment"))ie+=P+K+Z}}qt.attr("transform",`translate(${Bt+c/2+ie}, ${Qe+vt+B.height+f/2})`)}),T.select(".name").attr("transform","translate("+-B.width/2+", "+(vt+f/2)+")"),s!=null&&Zp.has(s)){let Mt=i.colorIndex??0;T.attr("data-color-id",`color-${Mt%u.length}`)}let Ht=X.rectangle(Bt,vt,at,st,tt),Yt=T.insert(()=>Ht,":first-child").attr("class","outer-path").attr("style",p.join(""));L.push(0);for(let[Mt,Pt]of D.entries()){let qt=(Mt+1)%2===0&&Pt.yOffset!==0,oe=X.rectangle(Bt,B.height+vt+Pt?.yOffset,at,Pt?.rowHeight,{...tt,fill:qt?a:h,stroke:n});T.insert(()=>oe,"g.label").attr("style",p.join("")).attr("class",`row-rect-${qt?"even":"odd"}`)}let Vt=0.0001,Kt=ui(Bt,B.height+vt,at+Bt,B.height+vt,Vt),It=X.polygon(Kt.map((Mt)=>[Mt.x,Mt.y]),tt);if(T.insert(()=>It).attr("class","divider"),Kt=ui(P+Bt,B.height+vt,P+Bt,st+vt,Vt),It=X.polygon(Kt.map((Mt)=>[Mt.x,Mt.y]),tt),T.insert(()=>It).attr("class","divider"),rt){let Mt=P+K+Bt;Kt=ui(Mt,B.height+vt,Mt,st+vt,Vt),It=X.polygon(Kt.map((Pt)=>[Pt.x,Pt.y]),tt),T.insert(()=>It).attr("class","divider")}if(ht){let Mt=P+K+Z+Bt;Kt=ui(Mt,B.height+vt,Mt,st+vt,Vt),It=X.polygon(Kt.map((Pt)=>[Pt.x,Pt.y]),tt),T.insert(()=>It).attr("class","divider")}for(let Mt of L){let Pt=B.height+vt+Mt;Kt=ui(Bt,Pt,at+Bt,Pt,Vt),It=X.polygon(Kt.map((jt)=>[jt.x,jt.y]),tt),T.insert(()=>It).attr("class","divider")}if(W(e,Yt),k&&e.look!=="handDrawn")if(s!=null&&_1.has(s))T.selectAll("path").attr("style",k);else{let Pt=k.split(";")?.filter((jt)=>jt.includes("stroke"))?.map((jt)=>`${jt}`).join("; ");T.selectAll("path").attr("style",Pt??""),T.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(Mt){return R.rect(e,Mt)},T}t(Fc,"erBox");async function ci(r,e,i,s=0,o=0,a=[],h=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",h);if(e!==No(e))e=No(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let u=n.node().appendChild(await bn(n,e,{width:rr(e,i)+100,style:h,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let c=u.children[0];c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(c.childNodes[0])c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let d=u.getBBox();if(ta(i.htmlLabels)){let c=u.children[0];c.style.textAlign="start";let f=b(u);d=c.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return d}t(ci,"addText");function ui(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(ui,"lineToPolygon");async function hy(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,h=r.insert("g").attr("class",Et(e)).attr("id",e.domId||e.id),n=null,u=null,d=null,c=null,f=0,p=0,x=0;if(n=h.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let _=e.annotations[0];await xo(n,{text:`«${_}»`},0),f=n.node().getBBox().height}u=h.insert("g").attr("class","label-group text"),await xo(u,e,0,["font-weight: bolder"]);let k=u.node().getBBox();p=k.height,d=h.insert("g").attr("class","members-group text");let S=0;for(let _ of e.members){let L=await xo(d,_,S,[_.parseClassifier()]);S+=L+a}if(x=d.node().getBBox().height,x<=0)x=o/2;c=h.insert("g").attr("class","methods-group text");let T=0;for(let _ of e.methods){let L=await xo(c,_,T,[_.parseClassifier()]);T+=L+a}let B=h.node().getBBox();if(n!==null){let _=n.node().getBBox();n.attr("transform",`translate(${-_.width/2})`)}return u.attr("transform",`translate(${-k.width/2}, ${f})`),B=h.node().getBBox(),d.attr("transform",`translate(0, ${f+p+o*2})`),B=h.node().getBBox(),c.attr("transform",`translate(0, ${f+p+(x?x+o*4:o*2)})`),B=h.node().getBBox(),{shapeSvg:h,bbox:B}}t(hy,"textHelper");async function xo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=E(),h="useHtmlLabels"in e?e.useHtmlLabels:ta(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!h&&n.startsWith("\\"))n=n.substring(1);if(Lt(n))h=!0;let u=await bn(o,Po(ro(n)),{width:rr(n,a)+50,classes:"markdown-node-label",useHtmlLabels:h},a),d,c=1;if(!h){if(s.includes("font-weight: bolder"))b(u).selectAll("tspan").attr("font-weight","");c=u.children.length;let f=u.children[0];if(u.textContent===""||u.textContent.includes("&gt")){if(f.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")f.textContent=f.textContent[0]+" "+f.textContent.substring(1)}if(f.textContent==="undefined")f.textContent="";d=u.getBBox()}else{let f=u.children[0],p=b(u);if(c=f.innerHTML.split("<br>").length,f.innerHTML.includes("</math>"))c+=f.innerHTML.split("<mrow>").length-1;await fc(f),d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return o.attr("transform","translate(0,"+(-d.height/(2*c)+i)+")"),d.height}t(xo,"addText");async function cy(r,e){let i=m(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:h}=o,n=i.class.padding??12,u=n,d=e.useHtmlLabels??ta(i.htmlLabels)??!0,c=e;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:f,bbox:p}=await hy(r,e,i,d,u);or(f,e.colorIndex,s,h);let{labelStyles:x,nodeStyles:k}=M(e);e.labelStyle=x,e.cssStyles=c.styles||"";let S=c.styles?.join(";")||k||"";if(!e.cssStyles)e.cssStyles=S.replaceAll("!important","").split(";");let T=c.members.length===0&&c.methods.length===0&&!i.class?.hideEmptyMembersBox,B=y.svg(f),_=_t(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let L=Math.max(e.width??0,p.width),D=Math.max(e.height??0,p.height),P=(e.height??0)>p.height;if(c.members.length===0&&c.methods.length===0)D+=u;else if(c.members.length>0&&c.methods.length===0)D+=u*2;let K=-L/2,Z=-D/2,J=T?n*2:c.members.length===0&&c.methods.length===0?-n:0;if(P)J=n*2;let rt=B.rectangle(K-n,Z-n-(T?n:c.members.length===0&&c.methods.length===0?-n/2:0),L+2*n,D+2*n+J,_),ht=f.insert(()=>rt,":first-child");ht.attr("class","basic label-container outer-path");let nt=ht.node().getBBox(),ot=f.select(".annotation-group").node().getBBox().height-(T?n/2:0)||0,N=f.select(".label-group").node().getBBox().height-(T?n/2:0)||0,X=f.select(".members-group").node().getBBox().height-(T?n/2:0)||0,tt=(ot+N+Z+n-(Z-n-(T?n:c.members.length===0&&c.methods.length===0?-n/2:0)))/2;if(f.selectAll(".text").each((U,at,st)=>{let Bt=b(st[at]),vt=Bt.attr("transform"),Ht=0;if(vt){let It=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(vt);if(It)Ht=parseFloat(It[2])}let Yt=Ht+Z+n-(T?n:c.members.length===0&&c.methods.length===0?-n/2:0);if(Bt.attr("class").includes("methods-group")){let Kt=Math.max(X,u/2);if(P)Yt=Math.max(tt,ot+N+Kt+Z+u*2+n)+u*2;else Yt=ot+N+Kt+Z+u*4+n}if(c.members.length===0&&c.methods.length===0&&i.class?.hideEmptyMembersBox)if(c.annotations.length>0)Yt=Ht-u;else Yt=Ht;if(!d)Yt-=4;let Vt=K;if(Bt.attr("class").includes("label-group")||Bt.attr("class").includes("annotation-group"))Vt=-Bt.node()?.getBBox().width/2||0,f.selectAll("text").each(function(Kt,It,Mt){if(window.getComputedStyle(Mt[It]).textAnchor==="middle")Vt=0});Bt.attr("transform",`translate(${Vt}, ${Yt})`)}),c.members.length>0||c.methods.length>0||T){let U=ot+N+Z+n,at=B.line(nt.x,U,nt.x+nt.width,U+0.001,_);f.insert(()=>at).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",S)}if(T||c.members.length>0||c.methods.length>0){let U=ot+N+X+Z+u*2+n,at=B.line(nt.x,P?Math.max(tt,U):U,nt.x+nt.width,(P?Math.max(tt,U):U)+0.001,_);f.insert(()=>at).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",S)}if(c.look!=="handDrawn")f.selectAll("path").attr("style",S);if(ht.select(":nth-child(2)").attr("style",S),f.selectAll(".divider").select("path").attr("style",S),e.labelStyle)f.selectAll("span").attr("style",e.labelStyle);else f.selectAll("span").attr("style",S);if(!d){let U=RegExp(/color\s*:\s*([^;]*)/),at=U.exec(S);if(at){let st=at[0].replace("color","fill");f.selectAll("tspan").attr("style",st)}else if(x){let st=U.exec(x);if(st){let Bt=st[0].replace("color","fill");f.selectAll("tspan").attr("style",Bt)}}}return W(e,ht),e.intersect=function(U){return R.rect(e,U)},f}t(cy,"classBox");async function uy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e,a=e,h=20,n=20,u="verifyMethod"in e,d=Et(e),c=m(),{themeVariables:f}=c,{borderColorArray:p,requirementEdgeLabelBackground:x}=f,k=c.layout==="elk"?"start":"center",S=r.insert("g").attr("class",d).attr("id",e.domId??e.id),T;if(u)T=await Ge(S,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else T=await Ge(S,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let B=T,_=await Ge(S,o.name,B,e.labelStyle+"; font-weight: bold;");if(B+=_+n,u){let nt=await Ge(S,`${o.requirementId?`ID: ${o.requirementId}`:""}`,B,e.labelStyle,k);B+=nt;let ot=await Ge(S,`${o.text?`Text: ${o.text}`:""}`,B,e.labelStyle,k);B+=ot;let N=await Ge(S,`${o.risk?`Risk: ${o.risk}`:""}`,B,e.labelStyle,k);B+=N,await Ge(S,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,B,e.labelStyle,k)}else{let nt=await Ge(S,`${a.type?`Type: ${a.type}`:""}`,B,e.labelStyle,k);B+=nt,await Ge(S,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,B,e.labelStyle,k)}let L=(S.node()?.getBBox().width??200)+h,D=(S.node()?.getBBox().height??200)+h,P=-L/2,K=-D/2,Z=y.svg(S),J=_t(e,{});if(e.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let rt=Z.rectangle(P,K,L,D,J),ht=S.insert(()=>rt,":first-child");if(ht.attr("class","basic label-container outer-path").attr("style",s),p?.length){let nt=e.colorIndex??0;S.attr("data-color-id",`color-${nt%p.length}`)}if(S.selectAll(".label").each((nt,ot,N)=>{let X=b(N[ot]),tt=X.attr("transform"),U=0,at=0;if(tt){let Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(tt);if(Ht)U=parseFloat(Ht[1]),at=parseFloat(Ht[2])}let st=at-D/2,Bt=P+h/2;if(ot===0||ot===1)Bt=U;X.attr("transform",`translate(${Bt}, ${st+h})`)}),B>T+_+n){let nt=K+T+_+n,ot;if(e.look==="neo"){let tt=[[P,nt],[P+L,nt],[P+L,nt+0.001],[P,nt+0.001]];ot=Z.polygon(tt,J)}else ot=Z.line(P,nt,P+L,nt,J);S.insert(()=>ot).attr("class","divider")}if(W(e,ht),e.intersect=function(nt){return R.rect(e,nt)},s&&e.look!=="handDrawn"&&(x||p?.length))S.selectAll("path").attr("style",s);return S}t(uy,"requirementBox");async function Ge(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),h=m(),n=h.htmlLabels??!0,u=await bn(a,Po(ro(e)),{width:rr(e,h)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},h),d;if(!n){let c=u.children[0];for(let f of c.children)if(s)f.setAttribute("style",s);if(o==="start"){c.setAttribute("text-anchor","start");for(let f of c.children)f.setAttribute("text-anchor","start")}d=u.getBBox(),d.height+=6}else{let c=u.children[0],f=b(u);if(o==="start")b(c).style("text-align","left");d=c.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return a.attr("transform",`translate(${-d.width/2},${-d.height/2+i})`),d.height}t(Ge,"addText");var v1=t((r)=>{switch(r){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function dy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s||"";let a=10,h=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=e.padding||10,f="",p;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)f=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank");let x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},k,S;if(p)({label:k,bbox:S}=await Ir(p,"ticket"in e&&e.ticket||"",x));else({label:k,bbox:S}=await Ir(n,"ticket"in e&&e.ticket||"",x));let{label:T,bbox:B}=await Ir(n,"assigned"in e&&e.assigned||"",x);e.width=h;let _=10,L=e?.width||0,D=Math.max(S.height,B.height)/2,P=Math.max(u.height+_*2,e?.height||0)+D,K=-L/2,Z=-P/2;d.attr("transform","translate("+(c-L/2)+", "+(-D-u.height/2)+")"),k.attr("transform","translate("+(c-L/2)+", "+(-D+u.height/2)+")"),T.attr("transform","translate("+(c+L/2-B.width-2*a)+", "+(-D+u.height/2)+")");let J,{rx:rt,ry:ht}=e,{cssStyles:nt}=e;if(e.look==="handDrawn"){let ot=y.svg(n),N=_t(e,{}),X=rt||ht?ot.path(Le(K,Z,L,P,rt||0),N):ot.rectangle(K,Z,L,P,N);J=n.insert(()=>X,":first-child"),J.attr("class","basic label-container").attr("style",nt?nt:null)}else{J=n.insert("rect",":first-child"),J.attr("class","basic label-container __APA__").attr("style",o).attr("rx",rt??5).attr("ry",ht??5).attr("x",K).attr("y",Z).attr("width",L).attr("height",P);let ot="priority"in e&&e.priority;if(ot){let N=n.append("line"),X=K+2,tt=Z+Math.floor((rt??0)/2),U=Z+P-Math.floor((rt??0)/2);N.attr("x1",X).attr("y1",tt).attr("x2",X).attr("y2",U).attr("stroke-width","4").attr("stroke",v1(ot))}}return W(e,J),e.height=P,e.intersect=function(ot){return R.rect(e,ot)},n}t(dy,"kanbanItem");async function fy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await ee(r,e,Et(e)),u=a.width+10*h,d=a.height+8*h,c=0.15*u,{cssStyles:f}=e,p=a.width+20,x=a.height+20,k=Math.max(u,p),S=Math.max(d,x);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let T,B=`M0 0
239
- a${c},${c} 1 0,0 ${k*0.25},${-1*S*0.1}
240
- a${c},${c} 1 0,0 ${k*0.25},0
241
- a${c},${c} 1 0,0 ${k*0.25},0
242
- a${c},${c} 1 0,0 ${k*0.25},${S*0.1}
236
+ l${-i},0`,"createCylinderPathD"),b1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),k1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Xp=5,Gp=10;async function Zm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,h=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Xp)e.height=Xp}if(e.width){let _=h/2/(2.5+h/50);if(e.width=e.width-a-_*3,e.width<Gp)e.width=Gp}let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=Math.max(e.height??0,u.height)+a,f=c/2,p=f/(2.5+c/50),x=Math.max(e.width??0,u.width)+p+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=b1(0,0,x,c,p,f),v=k1(0,0,x,c,p,f),E=B.path(_,_t(e,{})),O=B.path(v,_t(e,{fill:"none"}));if(T=n.insert(()=>O,":first-child"),T=n.insert(()=>E,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=C1(0,0,x,c,p,f);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",ae(S)).attr("style",s),T.attr("class","basic label-container outer-path"),S)T.selectAll("path").attr("style",S);if(s)T.selectAll("path").attr("style",s)}return T.attr("label-offset-x",p),T.attr("transform",`translate(${-x/2}, ${c/2} )`),d.attr("transform",`translate(${-(u.width/2)-p-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),K(e,T),e.intersect=function(B){let _=R.rect(e,B),v=_.y-(e.y??0);if(f!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-p)){let E=p*p*(1-v*v/(f*f));if(E!=0)E=Math.sqrt(Math.abs(E));if(E=p-E,B.x-(e.x??0)>0)E=-E;_.x+=E}return _},n}t(Zm,"tiltedCylinder");async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,h=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=Math.max(u.height+a,e.height??0),c=Math.max(u.width+h,(e.width??0)-d),f=[{x:-3*d/6,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:0,y:-d}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=Zt(f),_=S.path(B,T);if(p=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),x)p.attr("style",x)}else p=Ke(n,c,d,f);if(s)p.attr("style",s);return e.width=c,e.height=d,K(e,p),e.intersect=function(S){return R.polygon(e,f,S)},n}t(Jm,"trapezoid");async function ty(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=15,u=5;if(e.width||e.height){if(e.height=(e.height??0)-h*2,e.height<u)e.height=u;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:d,bbox:c}=await ee(r,e,Et(e)),f=(e?.width?e?.width:c.width)+a*2,p=(e?.height?e?.height:c.height)+h*2,{cssStyles:x}=e,S=y.svg(d),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2*0.8,y:-p/2},{x:f/2*0.8,y:-p/2},{x:f/2,y:-p/2*0.6},{x:f/2,y:p/2},{x:-f/2,y:p/2},{x:-f/2,y:-p/2*0.6}],_=Zt(B),v=S.path(_,T),E=d.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")E.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return K(e,E),e.intersect=function(O){return R.polygon(e,B,O)},d}t(ty,"trapezoidalPentagon");var Vp=10,Kp=10;async function ey(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<Kp)e.width=Kp;if(e.height=e?.height??0,e.height<Vp)e.height=Vp}let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=aa(m().flowchart?.htmlLabels),c=(e?.width?e?.width:n.width)+a,f=e?.height?e?.height:c+n.height,p=f,x=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:S}=e,T=y.svg(h),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=Zt(x),v=T.path(_,B),E=h.insert(()=>v,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")E.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return e.width=c,e.height=f,K(e,E),u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${f/2-(n.height+(e.padding??0)/(d?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(O){return l.info("Triangle intersect",e,x,O),R.polygon(e,x,O)},h}t(ey,"triangle");async function ry(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-h*2,e.height<10)e.height=10}let{shapeSvg:u,bbox:d,label:c}=await ee(r,e,Et(e)),f=(e?.width?e?.width:d.width)+(a??0)*2,p=(e?.height?e?.height:d.height)+(h??0)*2,x=e.look==="neo"?p/4:p/8,S=p+(n?x:-x),{cssStyles:T}=e,_=14-f,v=_>0?_/2:0,E=y.svg(u),O=_t(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let D=[{x:-f/2-v,y:S/2},...kr(-f/2-v,S/2,f/2+v,S/2,x,0.8),{x:f/2+v,y:-S/2},{x:-f/2-v,y:-S/2}],G=Zt(D),Z=E.path(G,O),J=u.insert(()=>Z,":first-child");if(J.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")J.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(0,${-x/2})`),c.attr("transform",`translate(${-f/2+(e.padding??0)-(d.x-(d.left??0))},${-p/2+(e.padding??0)-x-(d.y-(d.top??0))})`),K(e,J),e.intersect=function(rt){return R.polygon(e,D,rt)},u}t(ry,"waveEdgedRectangle");async function iy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,h=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let O=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-h-O*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:u}=await ee(r,e,Et(e)),d=(e?.width?e?.width:u.width)+a*2,c=(e?.height?e?.height:u.height)+h,f=c/8,p=c+f*2,{cssStyles:x}=e,S=y.svg(n),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-d/2,y:p/2},...kr(-d/2,p/2,d/2,p/2,f,1),{x:d/2,y:-p/2},...kr(d/2,-p/2,-d/2,-p/2,f,-1)],_=Zt(B),v=S.path(_,T),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container"),x&&e.look!=="handDrawn")E.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return K(e,E),e.intersect=function(O){return R.polygon(e,B,O)},n}t(iy,"waveRectangle");var he=10;async function oy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-he,10),e.height=Math.max((e?.height??0)-a*2-he,10);let{shapeSvg:h,bbox:n,label:u}=await ee(r,e,Et(e)),d=(e?.width?e?.width:n.width)+o*2+he,c=(e?.height?e?.height:n.height)+a*2+he,f=d-he,p=c-he,x=-f/2,S=-p/2,{cssStyles:T}=e,B=y.svg(h),_=_t(e,{}),v=[{x:x-he,y:S-he},{x:x-he,y:S+p},{x:x+f,y:S+p},{x:x+f,y:S-he}],E=`M${x-he},${S-he} L${x+f},${S-he} L${x+f},${S+p} L${x-he},${S+p} L${x-he},${S-he}
237
+ M${x-he},${S} L${x+f},${S}
238
+ M${x},${S-he} L${x},${S+p}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let O=B.path(E,_),D=h.insert(()=>O,":first-child");if(D.attr("transform",`translate(${he/2}, ${he/2})`),D.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")D.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(n.width/2)+he/2-(n.x-(n.left??0))}, ${-(n.height/2)+he/2-(n.y-(n.top??0))})`),K(e,D),e.intersect=function(G){return R.polygon(e,v,G)},h}t(oy,"windowPane");var Zp=new Set(["redux-color","redux-dark-color"]),w1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:h,nodeBorder:n,borderColorArray:u}=o;if(e.look==="handDrawn"){let{themeVariables:Mt}=C(),{background:Dt}=Mt,Ht={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Dt}`]};await Fc(r,Ht)}let d=C();e.useHtmlLabels=d.htmlLabels;let c=d.er?.diagramPadding??10,f=d.er?.entityPadding??6,{cssStyles:p}=e,{labelStyles:x,nodeStyles:S}=M(e);if(i.attributes.length===0&&e.label){let Mt={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5,classes:""};if(ar(e.label,d)+Mt.labelPaddingX*2<d.er.minEntityWidth)e.width=d.er.minEntityWidth;let Dt=await di(r,e,Mt);if(s!=null&&Zp.has(s)){let Ht=i.colorIndex??0;Dt.attr("data-color-id",`color-${Ht%u.length}`)}if(!aa(d.htmlLabels)){let Ht=Dt.select("text"),Rt=Ht.node()?.getBBox();Ht.attr("transform",`translate(${-Rt.width/2}, 0)`)}return Dt}if(!d.htmlLabels)c*=1.25,f*=1.25;let T=Et(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await ci(B,e.label??"",d,0,0,["name"],x);_.height+=f;let v=0,E=[],O=[],D=0,G=0,Z=0,J=0,rt=!0,ht=!0;for(let Mt of i.attributes){let Dt=await ci(B,Mt.type,d,0,v,["attribute-type"],x);D=Math.max(D,Dt.width+c);let Ht=await ci(B,Mt.name,d,0,v,["attribute-name"],x);G=Math.max(G,Ht.width+c);let Rt=await ci(B,Mt.keys.join(),d,0,v,["attribute-keys"],x);Z=Math.max(Z,Rt.width+c);let ie=await ci(B,Mt.comment,d,0,v,["attribute-comment"],x);J=Math.max(J,ie.width+c);let re=Math.max(Dt.height,Ht.height,Rt.height,ie.height)+f;O.push({yOffset:v,rowHeight:re}),v+=re}let nt=4;if(Z<=c)rt=!1,Z=0,nt--;if(J<=c)ht=!1,J=0,nt--;let ot=B.node().getBBox();if(_.width+c*2-(D+G+Z+J)>0){let Mt=_.width+c*2-(D+G+Z+J);if(D+=Mt/nt,G+=Mt/nt,Z>0)Z+=Mt/nt;if(J>0)J+=Mt/nt}let P=D+G+Z+J,X=y.svg(B),tt=_t(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let N=0;if(O.length>0)N=O.reduce((Mt,Dt)=>Mt+(Dt?.rowHeight??0),0);let at=Math.max(ot.width+c*2,e?.width||0,P),st=Math.max((N??0)+_.height,e?.height||0),Bt=-at/2,vt=-st/2;if(B.selectAll("g:not(:first-child)").each((Mt,Dt,Ht)=>{let Rt=b(Ht[Dt]),ie=Rt.attr("transform"),re=0,Ze=0;if(ie){let qe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ie);if(qe){if(re=parseFloat(qe[1]),Ze=parseFloat(qe[2]),Rt.attr("class").includes("attribute-name"))re+=D;else if(Rt.attr("class").includes("attribute-keys"))re+=D+G;else if(Rt.attr("class").includes("attribute-comment"))re+=D+G+Z}}Rt.attr("transform",`translate(${Bt+c/2+re}, ${Ze+vt+_.height+f/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(vt+f/2)+")"),s!=null&&Zp.has(s)){let Mt=i.colorIndex??0;B.attr("data-color-id",`color-${Mt%u.length}`)}let Wt=X.rectangle(Bt,vt,at,st,tt),Nt=B.insert(()=>Wt,":first-child").attr("class","outer-path").attr("style",p.join(""));E.push(0);for(let[Mt,Dt]of O.entries()){let Rt=(Mt+1)%2===0&&Dt.yOffset!==0,ie=X.rectangle(Bt,_.height+vt+Dt?.yOffset,at,Dt?.rowHeight,{...tt,fill:Rt?a:h,stroke:n});B.insert(()=>ie,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Rt?"even":"odd"}`)}let jt=0.0001,Xt=ui(Bt,_.height+vt,at+Bt,_.height+vt,jt),$t=X.polygon(Xt.map((Mt)=>[Mt.x,Mt.y]),tt);if(B.insert(()=>$t).attr("class","divider"),Xt=ui(D+Bt,_.height+vt,D+Bt,st+vt,jt),$t=X.polygon(Xt.map((Mt)=>[Mt.x,Mt.y]),tt),B.insert(()=>$t).attr("class","divider"),rt){let Mt=D+G+Bt;Xt=ui(Mt,_.height+vt,Mt,st+vt,jt),$t=X.polygon(Xt.map((Dt)=>[Dt.x,Dt.y]),tt),B.insert(()=>$t).attr("class","divider")}if(ht){let Mt=D+G+Z+Bt;Xt=ui(Mt,_.height+vt,Mt,st+vt,jt),$t=X.polygon(Xt.map((Dt)=>[Dt.x,Dt.y]),tt),B.insert(()=>$t).attr("class","divider")}for(let Mt of E){let Dt=_.height+vt+Mt;Xt=ui(Bt,Dt,at+Bt,Dt,jt),$t=X.polygon(Xt.map((Ht)=>[Ht.x,Ht.y]),tt),B.insert(()=>$t).attr("class","divider")}if(K(e,Nt),S&&e.look!=="handDrawn")if(s!=null&&w1.has(s))B.selectAll("path").attr("style",S);else{let Dt=S.split(";")?.filter((Ht)=>Ht.includes("stroke"))?.map((Ht)=>`${Ht}`).join("; ");B.selectAll("path").attr("style",Dt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(Mt){return R.rect(e,Mt)},B}t(Fc,"erBox");async function ci(r,e,i,s=0,o=0,a=[],h=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",h);if(e!==Lo(e))e=Lo(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let u=n.node().appendChild(await bn(n,e,{width:ar(e,i)+100,style:h,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let c=u.children[0];c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(c.childNodes[0])c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let d=u.getBBox();if(aa(i.htmlLabels)){let c=u.children[0];c.style.textAlign="start";let f=b(u);d=c.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return d}t(ci,"addText");function ui(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(ui,"lineToPolygon");async function sy(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,h=r.insert("g").attr("class",Et(e)).attr("id",e.domId||e.id),n=null,u=null,d=null,c=null,f=0,p=0,x=0;if(n=h.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await yo(n,{text:`«${v}»`},0),f=n.node().getBBox().height}u=h.insert("g").attr("class","label-group text"),await yo(u,e,0,["font-weight: bolder"]);let S=u.node().getBBox();p=S.height,d=h.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let E=await yo(d,v,T,[v.parseClassifier()]);T+=E+a}if(x=d.node().getBBox().height,x<=0)x=o/2;c=h.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let E=await yo(c,v,B,[v.parseClassifier()]);B+=E+a}let _=h.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return u.attr("transform",`translate(${-S.width/2}, ${f})`),_=h.node().getBBox(),d.attr("transform",`translate(0, ${f+p+o*2})`),_=h.node().getBBox(),c.attr("transform",`translate(0, ${f+p+(x?x+o*4:o*2)})`),_=h.node().getBBox(),{shapeSvg:h,bbox:_}}t(sy,"textHelper");async function yo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),h="useHtmlLabels"in e?e.useHtmlLabels:aa(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!h&&n.startsWith("\\"))n=n.substring(1);if(Lt(n))h=!0;let u=await bn(o,Do(oo(n)),{width:ar(n,a)+50,classes:"markdown-node-label",useHtmlLabels:h},a),d,c=1;if(!h){if(s.includes("font-weight: bolder"))b(u).selectAll("tspan").attr("font-weight","");c=u.children.length;let f=u.children[0];if(u.textContent===""||u.textContent.includes("&gt")){if(f.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")f.textContent=f.textContent[0]+" "+f.textContent.substring(1)}if(f.textContent==="undefined")f.textContent="";d=u.getBBox()}else{let f=u.children[0],p=b(u);if(c=f.innerHTML.split("<br>").length,f.innerHTML.includes("</math>"))c+=f.innerHTML.split("<mrow>").length-1;await fc(f),d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return o.attr("transform","translate(0,"+(-d.height/(2*c)+i)+")"),d.height}t(yo,"addText");async function ay(r,e){let i=m(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:h}=o,n=i.class.padding??12,u=n,d=e.useHtmlLabels??aa(i.htmlLabels)??!0,c=e;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:f,bbox:p}=await sy(r,e,i,d,u);ir(f,e.colorIndex,s,h);let{labelStyles:x,nodeStyles:S}=M(e);e.labelStyle=x,e.cssStyles=c.styles||"";let T=c.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=c.members.length===0&&c.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(f),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=Math.max(e.width??0,p.width),O=Math.max(e.height??0,p.height),D=(e.height??0)>p.height;if(c.members.length===0&&c.methods.length===0)O+=u;else if(c.members.length>0&&c.methods.length===0)O+=u*2;let G=-E/2,Z=-O/2,J=B?n*2:c.members.length===0&&c.methods.length===0?-n:0;if(D)J=n*2;let rt=_.rectangle(G-n,Z-n-(B?n:c.members.length===0&&c.methods.length===0?-n/2:0),E+2*n,O+2*n+J,v),ht=f.insert(()=>rt,":first-child");ht.attr("class","basic label-container outer-path");let nt=ht.node().getBBox(),ot=f.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,P=f.select(".label-group").node().getBBox().height-(B?n/2:0)||0,X=f.select(".members-group").node().getBBox().height-(B?n/2:0)||0,tt=(ot+P+Z+n-(Z-n-(B?n:c.members.length===0&&c.methods.length===0?-n/2:0)))/2;if(f.selectAll(".text").each((N,at,st)=>{let Bt=b(st[at]),vt=Bt.attr("transform"),Wt=0;if(vt){let $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(vt);if($t)Wt=parseFloat($t[2])}let Nt=Wt+Z+n-(B?n:c.members.length===0&&c.methods.length===0?-n/2:0);if(Bt.attr("class").includes("methods-group")){let Xt=Math.max(X,u/2);if(D)Nt=Math.max(tt,ot+P+Xt+Z+u*2+n)+u*2;else Nt=ot+P+Xt+Z+u*4+n}if(c.members.length===0&&c.methods.length===0&&i.class?.hideEmptyMembersBox)if(c.annotations.length>0)Nt=Wt-u;else Nt=Wt;if(!d)Nt-=4;let jt=G;if(Bt.attr("class").includes("label-group")||Bt.attr("class").includes("annotation-group"))jt=-Bt.node()?.getBBox().width/2||0,f.selectAll("text").each(function(Xt,$t,Mt){if(window.getComputedStyle(Mt[$t]).textAnchor==="middle")jt=0});Bt.attr("transform",`translate(${jt}, ${Nt})`)}),c.members.length>0||c.methods.length>0||B){let N=ot+P+Z+n,at=_.line(nt.x,N,nt.x+nt.width,N+0.001,v);f.insert(()=>at).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||c.members.length>0||c.methods.length>0){let N=ot+P+X+Z+u*2+n,at=_.line(nt.x,D?Math.max(tt,N):N,nt.x+nt.width,(D?Math.max(tt,N):N)+0.001,v);f.insert(()=>at).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(c.look!=="handDrawn")f.selectAll("path").attr("style",T);if(ht.select(":nth-child(2)").attr("style",T),f.selectAll(".divider").select("path").attr("style",T),e.labelStyle)f.selectAll("span").attr("style",e.labelStyle);else f.selectAll("span").attr("style",T);if(!d){let N=RegExp(/color\s*:\s*([^;]*)/),at=N.exec(T);if(at){let st=at[0].replace("color","fill");f.selectAll("tspan").attr("style",st)}else if(x){let st=N.exec(x);if(st){let Bt=st[0].replace("color","fill");f.selectAll("tspan").attr("style",Bt)}}}return K(e,ht),e.intersect=function(N){return R.rect(e,N)},f}t(ay,"classBox");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e,a=e,h=20,n=20,u="verifyMethod"in e,d=Et(e),c=m(),{themeVariables:f}=c,{borderColorArray:p,requirementEdgeLabelBackground:x}=f,S=c.layout==="elk"?"start":"center",T=r.insert("g").attr("class",d).attr("id",e.domId??e.id),B;if(u)B=await Xe(T,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else B=await Xe(T,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=B,v=await Xe(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,u){let nt=await Xe(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=nt;let ot=await Xe(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=ot;let P=await Xe(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=P,await Xe(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let nt=await Xe(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=nt,await Xe(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let E=(T.node()?.getBBox().width??200)+h,O=(T.node()?.getBBox().height??200)+h,D=-E/2,G=-O/2,Z=y.svg(T),J=_t(e,{});if(e.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let rt=Z.rectangle(D,G,E,O,J),ht=T.insert(()=>rt,":first-child");if(ht.attr("class","basic label-container outer-path").attr("style",s),p?.length){let nt=e.colorIndex??0;T.attr("data-color-id",`color-${nt%p.length}`)}if(T.selectAll(".label").each((nt,ot,P)=>{let X=b(P[ot]),tt=X.attr("transform"),N=0,at=0;if(tt){let Wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(tt);if(Wt)N=parseFloat(Wt[1]),at=parseFloat(Wt[2])}let st=at-O/2,Bt=D+h/2;if(ot===0||ot===1)Bt=N;X.attr("transform",`translate(${Bt}, ${st+h})`)}),_>B+v+n){let nt=G+B+v+n,ot;if(e.look==="neo"){let tt=[[D,nt],[D+E,nt],[D+E,nt+0.001],[D,nt+0.001]];ot=Z.polygon(tt,J)}else ot=Z.line(D,nt,D+E,nt,J);T.insert(()=>ot).attr("class","divider")}if(K(e,ht),e.intersect=function(nt){return R.rect(e,nt)},s&&e.look!=="handDrawn"&&(x||p?.length))T.selectAll("path").attr("style",s);return T}t(ny,"requirementBox");async function Xe(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),h=m(),n=h.htmlLabels??!0,u=await bn(a,Do(oo(e)),{width:ar(e,h)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},h),d;if(!n){let c=u.children[0];for(let f of c.children)if(s)f.setAttribute("style",s);if(o==="start"){c.setAttribute("text-anchor","start");for(let f of c.children)f.setAttribute("text-anchor","start")}d=u.getBBox(),d.height+=6}else{let c=u.children[0],f=b(u);if(o==="start")b(c).style("text-align","left");d=c.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return a.attr("transform",`translate(${-d.width/2},${-d.height/2+i})`),d.height}t(Xe,"addText");var S1=t((r)=>{switch(r){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ly(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s||"";let a=10,h=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:u,label:d}=await ee(r,e,Et(e)),c=e.padding||10,f="",p;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)f=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank");let x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(p)({label:S,bbox:T}=await $r(p,"ticket"in e&&e.ticket||"",x));else({label:S,bbox:T}=await $r(n,"ticket"in e&&e.ticket||"",x));let{label:B,bbox:_}=await $r(n,"assigned"in e&&e.assigned||"",x);e.width=h;let v=10,E=e?.width||0,O=Math.max(T.height,_.height)/2,D=Math.max(u.height+v*2,e?.height||0)+O,G=-E/2,Z=-D/2;d.attr("transform","translate("+(c-E/2)+", "+(-O-u.height/2)+")"),S.attr("transform","translate("+(c-E/2)+", "+(-O+u.height/2)+")"),B.attr("transform","translate("+(c+E/2-_.width-2*a)+", "+(-O+u.height/2)+")");let J,{rx:rt,ry:ht}=e,{cssStyles:nt}=e;if(e.look==="handDrawn"){let ot=y.svg(n),P=_t(e,{}),X=rt||ht?ot.path(_e(G,Z,E,D,rt||0),P):ot.rectangle(G,Z,E,D,P);J=n.insert(()=>X,":first-child"),J.attr("class","basic label-container").attr("style",nt?nt:null)}else{J=n.insert("rect",":first-child"),J.attr("class","basic label-container __APA__").attr("style",o).attr("rx",rt??5).attr("ry",ht??5).attr("x",G).attr("y",Z).attr("width",E).attr("height",D);let ot="priority"in e&&e.priority;if(ot){let P=n.append("line"),X=G+2,tt=Z+Math.floor((rt??0)/2),N=Z+D-Math.floor((rt??0)/2);P.attr("x1",X).attr("y1",tt).attr("x2",X).attr("y2",N).attr("stroke-width","4").attr("stroke",S1(ot))}}return K(e,J),e.height=D,e.intersect=function(ot){return R.rect(e,ot)},n}t(ly,"kanbanItem");async function hy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await ee(r,e,Et(e)),u=a.width+10*h,d=a.height+8*h,c=0.15*u,{cssStyles:f}=e,p=a.width+20,x=a.height+20,S=Math.max(u,p),T=Math.max(d,x);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
239
+ a${c},${c} 1 0,0 ${S*0.25},${-1*T*0.1}
240
+ a${c},${c} 1 0,0 ${S*0.25},0
241
+ a${c},${c} 1 0,0 ${S*0.25},0
242
+ a${c},${c} 1 0,0 ${S*0.25},${T*0.1}
243
243
 
244
- a${c},${c} 1 0,0 ${k*0.15},${S*0.33}
245
- a${c*0.8},${c*0.8} 1 0,0 0,${S*0.34}
246
- a${c},${c} 1 0,0 ${-1*k*0.15},${S*0.33}
244
+ a${c},${c} 1 0,0 ${S*0.15},${T*0.33}
245
+ a${c*0.8},${c*0.8} 1 0,0 0,${T*0.34}
246
+ a${c},${c} 1 0,0 ${-1*S*0.15},${T*0.33}
247
247
 
248
- a${c},${c} 1 0,0 ${-1*k*0.25},${S*0.15}
249
- a${c},${c} 1 0,0 ${-1*k*0.25},0
250
- a${c},${c} 1 0,0 ${-1*k*0.25},0
251
- a${c},${c} 1 0,0 ${-1*k*0.25},${-1*S*0.15}
248
+ a${c},${c} 1 0,0 ${-1*S*0.25},${T*0.15}
249
+ a${c},${c} 1 0,0 ${-1*S*0.25},0
250
+ a${c},${c} 1 0,0 ${-1*S*0.25},0
251
+ a${c},${c} 1 0,0 ${-1*S*0.25},${-1*T*0.15}
252
252
 
253
- a${c},${c} 1 0,0 ${-1*k*0.1},${-1*S*0.33}
254
- a${c*0.8},${c*0.8} 1 0,0 0,${-1*S*0.34}
255
- a${c},${c} 1 0,0 ${k*0.1},${-1*S*0.33}
256
- H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),L=_t(e,{}),D=_.path(B,L);T=o.insert(()=>D,":first-child"),T.attr("class","basic label-container").attr("style",le(f))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return T.attr("transform",`translate(${-k/2}, ${-S/2})`),W(e,T),e.calcIntersect=function(_,L){return R.rect(_,L)},e.intersect=function(_){return l.info("Bang intersect",e,_),R.rect(e,_)},o}t(fy,"bang");async function py(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await ee(r,e,Et(e)),u=a.width+2*h,d=a.height+2*h,c=0.15*u,f=0.25*u,p=0.35*u,x=0.2*u,{cssStyles:k}=e,S,T=`M0 0
253
+ a${c},${c} 1 0,0 ${-1*S*0.1},${-1*T*0.33}
254
+ a${c*0.8},${c*0.8} 1 0,0 0,${-1*T*0.34}
255
+ a${c},${c} 1 0,0 ${S*0.1},${-1*T*0.33}
256
+ H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),E=_t(e,{}),O=v.path(_,E);B=o.insert(()=>O,":first-child"),B.attr("class","basic label-container").attr("style",ae(f))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),K(e,B),e.calcIntersect=function(v,E){return R.rect(v,E)},e.intersect=function(v){return l.info("Bang intersect",e,v),R.rect(e,v)},o}t(hy,"bang");async function cy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await ee(r,e,Et(e)),u=a.width+2*h,d=a.height+2*h,c=0.15*u,f=0.25*u,p=0.35*u,x=0.2*u,{cssStyles:S}=e,T,B=`M0 0
257
257
  a${c},${c} 0 0,1 ${u*0.25},${-1*u*0.1}
258
258
  a${p},${p} 1 0,1 ${u*0.4},${-1*u*0.1}
259
259
  a${f},${f} 1 0,1 ${u*0.35},${u*0.2}
@@ -267,7 +267,7 @@ ${o.join(`
267
267
 
268
268
  a${c},${c} 1 0,1 ${-1*u*0.1},${-1*d*0.35}
269
269
  a${x},${x} 1 0,1 ${u*0.1},${-1*d*0.65}
270
- H0 V0 Z`;if(e.look==="handDrawn"){let B=y.svg(o),_=_t(e,{}),L=B.path(T,_);S=o.insert(()=>L,":first-child"),S.attr("class","basic label-container").attr("style",le(k))}else S=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",T);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),S.attr("transform",`translate(${-u/2}, ${-d/2})`),W(e,S),e.calcIntersect=function(B,_){return R.rect(B,_)},e.intersect=function(B){return l.info("Cloud intersect",e,B),R.rect(e,B)},o}t(py,"cloud");async function gy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await ee(r,e,Et(e)),u=a.width+8*h,d=a.height+2*h,c=5,f=e.look==="neo"?`
270
+ H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=_t(e,{}),E=_.path(B,v);T=o.insert(()=>E,":first-child"),T.attr("class","basic label-container").attr("style",ae(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-u/2}, ${-d/2})`),K(e,T),e.calcIntersect=function(_,v){return R.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),R.rect(e,_)},o}t(cy,"cloud");async function uy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:h,label:n}=await ee(r,e,Et(e)),u=a.width+8*h,d=a.height+2*h,c=5,f=e.look==="neo"?`
271
271
  M${-u/2} ${d/2-c}
272
272
  v${-d+2*c}
273
273
  q0,-${c} ${c},-${c}
@@ -287,16 +287,16 @@ ${o.join(`
287
287
  h${-(u-2*c)}
288
288
  q${-c},0 ${-c},${-c}
289
289
  Z
290
- `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let p=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",f);return o.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,p),e.calcIntersect=function(x,k){return R.rect(x,k)},e.intersect=function(x){return R.rect(e,x)},o}t(gy,"defaultMindmapNode");async function my(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(my,"mindmapCircle");var L1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Um},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Hm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Xm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Zm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Sg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Tg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Mg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ng},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:gg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ug},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:wg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:fy},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:py},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:qm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:$g},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Ug},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:jg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:iy},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:zg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_g},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ey},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:dg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ym},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Km},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Vm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ag},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ig},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:xg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Cg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:bg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Gg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ay},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Eg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ry},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Qg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Bg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:sy},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ly},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Lg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:oy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Om},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$m},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ag},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:yg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ty},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ny},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Wm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tm}],F1=t(()=>{let e=[...Object.entries({state:Gm,choice:fg,note:Pm,composite:pg,rectWithTitle:zm,labelRect:Hg,block_arrow:cg,collapsedGroup:hg,iconSquare:Rg,iconCircle:Dg,icon:Og,iconRounded:Pg,imageSquare:Ng,anchor:og,kanbanItem:dy,mindmapCircle:my,defaultMindmapNode:gy,classBox:cy,erBox:Fc,requirementBox:uy,usecaseActor:em,usecaseActorHollow:nm,usecaseActorAwesome:rm,usecaseActorIcon:Lm,usecaseBusiness:Fm,usecaseEllipse:vg,usecaseJsonTable:Mm}),...L1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),_d=F1();function Dc(r){return r in _d}t(Dc,"isValidShape");var Ea=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),Js=new Map;async function Ba(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?_d[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let h;if(i.config.securityLevel==="sandbox")h="_top";else if(e.linkTarget)h=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",h??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",le(e.look)),e.tooltip)o.attr("title",e.tooltip);if(Js.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Ba,"insertNode");var Ih=t((r,e)=>{Js.set(e.id,r)},"setNodeElem"),_h=t(()=>{Js.clear()},"clear"),oa=t((r)=>{let e=Js.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var M1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,d=n,{labelStyles:c,nodeStyles:f,borderStyles:p,backgroundStyles:x}=M(e),k=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);or(k,e.colorIndex,s,u);let S=ta(i.flowchart.htmlLabels),T=e.direction==="LR",B=k.insert("g").attr("class","cluster-label swimlane-label"),_=await bn(B,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}),L=_.getBBox();if(S){let tt=_.children[0],U=b(_);L=tt.getBoundingClientRect(),U.attr("width",L.width),U.attr("height",L.height)}let D=e.padding??0,P=e.width<=L.width+D?L.width+D:e.width;if(e.width<=L.width+D)e.diff=(P-e.width)/2-D;else e.diff=-D;let K=e.height,Z=e.y-K/2,J=e.y+K/2,rt=e.x-P/2,ht=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+K/3,nt=T?4:0,ot=L.height+2*nt,N,X;if(T){let tt=Math.max(ot,L.height+2*nt),U=rt+tt,at=Math.max(0,P-tt);if(e.look==="handDrawn"){let vt=y.svg(k),Ht=_t(e,{roughness:0.7,fill:h,stroke:d,seed:a}),Yt=_t(e,{roughness:0.7,fill:"none",stroke:d,seed:a}),Vt=vt.rectangle(rt,Z,tt,K,Ht);N=k.insert(()=>Vt,":first-child").attr("class","swimlane-title");let Kt=vt.rectangle(U,Z,at,K,Yt);X=k.insert(()=>Kt,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",p.join(";")),N.select("path").attr("style",x.join(";").replace("fill","stroke"))}else N=k.insert("rect",":first-child"),X=k.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",f).attr("x",rt).attr("y",Z).attr("width",tt).attr("height",K).attr("fill",h).attr("stroke",d),X.attr("class","swimlane-body").attr("style",f).attr("x",U).attr("y",Z).attr("width",at).attr("height",K).attr("fill","none").attr("stroke",d);let st=rt+tt/2,Bt=e.y;B.attr("transform",`translate(${st}, ${Bt}) rotate(-90) translate(${-L.width/2}, ${-L.height/2})`)}else{let tt=Math.max(0,ht-Z),U=Math.min(ot,tt),at=Z+U,st=Math.max(0,J-at),Bt=e.x-P/2;if(e.look==="handDrawn"){let Yt=y.svg(k),Vt=_t(e,{roughness:0.7,fill:h,stroke:d,fillWeight:3,seed:a}),Kt=_t(e,{roughness:0.7,fill:"none",stroke:d,seed:a}),It=Yt.rectangle(Bt,Z,P,U,Vt);N=k.insert(()=>It,":first-child").attr("class","swimlane-title");let Mt=Yt.rectangle(Bt,at,P,st,Kt);X=k.insert(()=>Mt,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",p.join(";")),N.select("path").attr("style",x.join(";").replace("fill","stroke"))}else N=k.insert("rect",":first-child"),X=k.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",f).attr("x",Bt).attr("y",Z).attr("width",P).attr("height",U).attr("fill",h).attr("stroke",d),X.attr("class","swimlane-body").attr("style",f).attr("x",Bt).attr("y",at).attr("width",P).attr("height",st).attr("fill","none").attr("stroke",d);let vt=e.x-L.width/2,Ht=Z+(U-L.height)/2;B.attr("transform",`translate(${vt}, ${Ht})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),c){let tt=B.select("span");if(tt)tt.attr("style",c)}return e.offsetX=0,e.width=P,e.height=K,e.offsetY=L.height-D/2,e.intersect=function(tt){return Ke(e,tt)},{cluster:k,labelBBox:L}},"swimlane"),yy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,{labelStyles:d,nodeStyles:c,borderStyles:f,backgroundStyles:p}=M(e),x=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);or(x,e.colorIndex,s,u);let k=en(i),S=x.insert("g").attr("class","cluster-label "),T;if(e.labelType==="markdown")T=await bn(S,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width});else T=await qe(S,e.label,e.labelStyle||"",!1,!0);let B=T.getBBox();if(en(i)){let rt=T.children[0],ht=b(T);B=rt.getBoundingClientRect(),ht.attr("width",B.width),ht.attr("height",B.height)}let _=e.width<=B.width+e.padding?B.width+e.padding:e.width;if(e.width<=B.width+e.padding)e.diff=(_-e.width)/2-e.padding;else e.diff=-e.padding;let L=e.height,D=e.x-_/2,P=e.y-L/2;l.trace("Data ",e,JSON.stringify(e));let K;if(e.look==="handDrawn"){let rt=y.svg(x),ht=_t(e,{roughness:0.7,fill:h,stroke:n,fillWeight:3,seed:a}),nt=rt.path(Le(D,P,_,L,0),ht);K=x.insert(()=>(l.debug("Rough node insert CXC",nt),nt),":first-child"),K.select("path:nth-child(2)").attr("style",f.join(";")),K.select("path").attr("style",p.join(";").replace("fill","stroke"))}else K=x.insert("rect",":first-child"),K.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",D).attr("y",P).attr("width",_).attr("height",L);let{subGraphTitleTopMargin:Z}=Ea(i);if(S.attr("transform",`translate(${e.x-B.width/2}, ${e.y-e.height/2+Z})`),d){let rt=S.select("span");if(rt)rt.attr("style",d)}let J=K.node().getBBox();return e.offsetX=0,e.width=J.width,e.height=J.height,e.offsetY=B.height-e.padding/2,e.intersect=function(rt){return Ke(e,rt)},{cluster:x,labelBBox:B}},"rect"),A1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let h=s.node().getBBox();return e.width=h.width,e.height=h.height,e.intersect=function(n){return Ke(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),E1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:h,borderColorArray:n,compositeBackground:u,compositeTitleBackground:d,nodeBorder:c}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);or(f,e.colorIndex,s,n);let p=f.insert("g",":first-child"),x=f.insert("g").attr("class","cluster-label"),k=f.append("rect"),S=await qe(x,e.label,e.labelStyle,void 0,!0),T=S.getBBox();if(en(i)){let nt=S.children[0],ot=b(S);T=nt.getBoundingClientRect(),ot.attr("width",T.width),ot.attr("height",T.height)}let B=0*e.padding,_=B/2,L=(e.width<=T.width+e.padding?T.width+e.padding:e.width)+B;if(e.width<=T.width+e.padding)e.diff=(L-e.width)/2-e.padding;else e.diff=-e.padding;let D=e.height+B,P=e.height+B-T.height-6,K=e.x-L/2,Z=e.y-D/2;e.width=L;let J=e.y-e.height/2-_+T.height+2,rt;if(e.look==="handDrawn"){let nt=e.cssClasses.includes("statediagram-cluster-alt"),ot=y.svg(f),N=e.rx||e.ry?ot.path(Le(K,Z,L,D,10),{roughness:0.7,fill:d,fillStyle:"solid",stroke:c,seed:a}):ot.rectangle(K,Z,L,D,{seed:a});rt=f.insert(()=>N,":first-child");let X=ot.rectangle(K,J,L,P,{fill:nt?h:u,fillStyle:nt?"hachure":"solid",stroke:c,seed:a});rt=f.insert(()=>N,":first-child"),k=f.insert(()=>X),rt.attr("class","outer"),k.attr("class","inner")}else{rt=p.insert("rect",":first-child");let nt="outer";rt.attr("class",nt).attr("x",K).attr("y",Z).attr("width",L).attr("height",D).attr("data-look",e.look),k.attr("class","inner").attr("x",K).attr("y",J).attr("width",L).attr("height",P)}x.attr("transform",`translate(${e.x-T.width/2}, ${Z+1-(en(i)?0:3)})`);let ht=rt.node().getBBox();return e.height=ht.height,e.offsetX=0,e.offsetY=T.height-e.padding/2,e.labelBBox=T,e.intersect=function(nt){return Ke(e,nt)},{cluster:f,labelBBox:T}},"roundedWithTitle"),$1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:h}=s,{labelStyles:n,nodeStyles:u,borderStyles:d,backgroundStyles:c}=M(e),f=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),p=en(i),x=f.insert("g").attr("class","cluster-label "),k=await bn(x,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),S=k.getBBox();if(en(i)){let Z=k.children[0],J=b(k);S=Z.getBoundingClientRect(),J.attr("width",S.width),J.attr("height",S.height)}let T=e.width<=S.width+e.padding?S.width+e.padding:e.width;if(e.width<=S.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,L=e.y-B/2;l.trace("Data ",e,JSON.stringify(e));let D;if(e.look==="handDrawn"){let Z=y.svg(f),J=_t(e,{roughness:0.7,fill:a,stroke:h,fillWeight:4,seed:o}),rt=Z.path(Le(_,L,T,B,e.rx),J);D=f.insert(()=>(l.debug("Rough node insert CXC",rt),rt),":first-child"),D.select("path:nth-child(2)").attr("style",d.join(";")),D.select("path").attr("style",c.join(";").replace("fill","stroke"))}else D=f.insert("rect",":first-child"),D.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",_).attr("y",L).attr("width",T).attr("height",B);let{subGraphTitleTopMargin:P}=Ea(i);if(x.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+P})`),n){let Z=x.select("span");if(Z)Z.attr("style",n)}let K=D.node().getBBox();return e.offsetX=0,e.width=K.width,e.height=K.height,e.offsetY=S.height-e.padding/2,e.intersect=function(Z){return Ke(e,Z)},{cluster:f,labelBBox:S}},"kanbanSection"),I1=t((r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:h,nodeBorder:n,borderColorArray:u}=o,d=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);or(d,e.colorIndex,s,u);let c=d.insert("g",":first-child"),f=0*e.padding,p=e.width+f;e.diff=-e.padding;let x=e.height+f,k=e.x-p/2,S=e.y-x/2;e.width=p;let T;if(e.look==="handDrawn"){let L=y.svg(d).rectangle(k,S,p,x,{fill:h??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});T=d.insert(()=>L,":first-child").attr("class","divider")}else{T=c.insert("rect",":first-child");let _="outer";if(e.look==="neo")_="divider";else _="divider";T.attr("class",_).attr("x",k).attr("y",S).attr("width",p).attr("height",x).attr("data-look",e.look)}let B=T.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=0,e.intersect=function(_){return Ke(e,_)},{cluster:d,labelBBox:{}}},"divider"),O1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=m(),{theme:o,themeVariables:a,handDrawnSeed:h}=s,{borderColorArray:n}=a,{labelStyles:u,borderStyles:d}=M(e),c=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);or(c,e.colorIndex,o,n);let f=en(s),p=c.insert("g").attr("class","cluster-label"),x={width:0,height:0},k=e.label?.trim();if(k){let P;if(e.labelType==="markdown")P=await bn(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});else P=await qe(p,e.label,e.labelStyle||"",!1,!0);if(x=P.getBBox(),f){let K=P.children[0],Z=b(P);x=K.getBoundingClientRect(),Z.attr("width",x.width),Z.attr("height",x.height)}}let S=e.width<=x.width+e.padding?x.width+e.padding:e.width;if(e.width<=x.width+e.padding)e.diff=(S-e.width)/2-e.padding;else e.diff=-e.padding;let T=e.height,B=e.x-S/2,_=e.y-T/2,L;if(e.look==="handDrawn"){let P=y.svg(c),K=_t(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:h,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=P.path(Le(B,_,S,T,i.rx),K);L=c.insert(()=>Z,":first-child"),L.select("path:nth-child(2)").attr("style",d.join(";"))}else if(L=c.insert("rect",":first-child"),L.attr("rx",i.rx).attr("ry",i.rx).attr("x",B).attr("y",_).attr("width",S).attr("height",T).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)L.attr("stroke-dasharray",i.strokeDash.join(", "));if(k){let{subGraphTitleTopMargin:P}=Ea(s);if(p.attr("transform",`translate(${e.x-x.width/2}, ${e.y-e.height/2+P})`),u){let K=p.select("span");if(K)K.attr("style",u)}}let D=L.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=x.height-e.padding/2,e.intersect=function(P){return Ke(e,P)},{cluster:c,labelBBox:x}},"createContainerGroup"),D1=t(async(r,e)=>{let{themeVariables:i}=m(),s=i.flowContainerStroke||i.secondaryBorderColor;return O1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),P1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),h=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,u=r.y-h/2;return{boundaryType:i,width:a,height:h,x:n,y:u,bodyY:u+o,bodyHeight:h-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),R1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,{labelStyles:d,nodeStyles:c}=M(e),{stylesMap:f}=Ue(e),p=e.boundaryType||"rect",x=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${p} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",p).attr("data-look",e.look);or(x,e.colorIndex,s,u);let k=en(i),S=x.insert("g").attr("class","cluster-label system-boundary-title"),T=await bn(S,e.label,{style:d,useHtmlLabels:k,isNode:!0}),B=T.getBBox();if(k){let N=T.children[0],X=b(T);B=N.getBoundingClientRect(),X.attr("width",B.width),X.attr("height",B.height)}let _=P1(e,B),{width:L,height:D,x:P,y:K,bodyY:Z,bodyHeight:J,tabHeight:rt,tabWidth:ht}=_;e.diff=e.width<=B.width+e.padding?(L-e.width)/2-e.padding:-e.padding;let nt=_t(e,{fill:f.get("fill")||h,stroke:f.get("stroke")||n,strokeWidth:f.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let N=y.svg(x),X=N.rectangle(P,Z,L,J,nt);if(x.insert(()=>X,":first-child").attr("class","boundary-body label-container"),p==="package"){let tt=N.rectangle(P,K,ht,rt,nt);x.insert(()=>tt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(x.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",c).attr("x",P).attr("y",Z).attr("width",L).attr("height",J),p==="package")x.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",c).attr("x",P).attr("y",K).attr("width",ht).attr("height",rt);let{subGraphTitleTopMargin:ot}=Ea(i);if(p==="package")S.attr("transform",`translate(${P+(ht-B.width)/2}, ${K+(rt-B.height)/2})`);else S.attr("transform",`translate(${e.x-B.width/2}, ${K+ot})`);if(d)S.attr("style",d),S.select("span").attr("style",d);return e.offsetX=0,e.width=L,e.height=D,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(N){return Ke(e,N)},{cluster:x,labelBBox:B}},"usecaseSystemBoundary"),q1=yy,W1={rect:yy,squareRect:q1,roundedWithTitle:E1,noteGroup:A1,divider:I1,kanbanSection:$1,flowGroup:D1,usecaseSystemBoundary:R1,swimlane:M1},N1=new Set(["noteGroup","divider"]),aA=t((r)=>!N1.has(r??"rect"),"clusterPaintsTitle"),xy=new Map,Ro=t(async(r,e)=>{let i=e.shape||"rect",s=await W1[i](r,e);return xy.set(e.id,s),s},"insertCluster"),Sh=t(()=>{xy=new Map},"clear");var bo=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),tn={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Rm={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function wo(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ae(r),e=ae(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],h=o-i,n=a-s;return{angle:Math.atan(n/h),deltaX:h,deltaY:n}}t(wo,"calculateDeltaAndAngle");var ae=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),z1=t((r)=>({x:t(function(e,i,s){let o=0,a=ae(s[0]).x<ae(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(tn,r.arrowTypeStart)){let{angle:x,deltaX:k}=wo(s[0],s[1]);o=tn[r.arrowTypeStart]*Math.cos(x)*(k>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(tn,r.arrowTypeEnd)){let{angle:x,deltaX:k}=wo(s[s.length-1],s[s.length-2]);o=tn[r.arrowTypeEnd]*Math.cos(x)*(k>=0?1:-1)}let h=Math.abs(ae(e).x-ae(s[s.length-1]).x),n=Math.abs(ae(e).y-ae(s[s.length-1]).y),u=Math.abs(ae(e).x-ae(s[0]).x),d=Math.abs(ae(e).y-ae(s[0]).y),c=tn[r.arrowTypeStart],f=tn[r.arrowTypeEnd],p=1;if(h<f&&h>0&&n<f){let x=f+p-h;x*=a==="right"?-1:1,o-=x}if(u<c&&u>0&&d<c){let x=c+p-u;x*=a==="right"?-1:1,o+=x}return ae(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ae(s[0]).y<ae(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(tn,r.arrowTypeStart)){let{angle:x,deltaY:k}=wo(s[0],s[1]);o=tn[r.arrowTypeStart]*Math.abs(Math.sin(x))*(k>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(tn,r.arrowTypeEnd)){let{angle:x,deltaY:k}=wo(s[s.length-1],s[s.length-2]);o=tn[r.arrowTypeEnd]*Math.abs(Math.sin(x))*(k>=0?1:-1)}let h=Math.abs(ae(e).y-ae(s[s.length-1]).y),n=Math.abs(ae(e).x-ae(s[s.length-1]).x),u=Math.abs(ae(e).y-ae(s[0]).y),d=Math.abs(ae(e).x-ae(s[0]).x),c=tn[r.arrowTypeStart],f=tn[r.arrowTypeEnd],p=1;if(h<f&&h>0&&n<f){let x=f+p-h;x*=a==="up"?-1:1,o-=x}if(u<c&&u>0&&d<c){let x=c+p-u;x*=a==="up"?-1:1,o+=x}return ae(e).y+o},"y")}),"getLineFunctionsWithOffset"),H1=t((r,e,i,s,o,a=!1,h)=>{if(e.arrowTypeStart)Cy(r,"start",e.arrowTypeStart,i,s,o,a,h);if(e.arrowTypeEnd)Cy(r,"end",e.arrowTypeEnd,i,s,o,a,h)},"addEdgeMarkers"),Y1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},j1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Cy=t((r,e,i,s,o,a,h=!1,n)=>{if(!i||i==="none")return;let u=Y1[i],d=u&&j1.includes(u.type);if(!u){l.warn(`Unknown arrow type: ${i}`);return}let c=u.type,x=`${o}_${a}-${c}${e==="start"?"Start":"End"}${h&&d?"-margin":""}`;if(n&&n.trim()!==""){let k=n.replace(/[^\dA-Za-z]/g,"_"),S=`${x}_${k}`;if(!document.getElementById(S)){let T=document.getElementById(x);if(T){let B=T.cloneNode(!0);B.id=S,B.querySelectorAll("path, circle, line").forEach((L)=>{if(L.setAttribute("stroke",n),u.fill)L.setAttribute("fill",n)}),T.parentNode?.appendChild(B)}}r.attr(`marker-${e}`,`url(${s}#${S})`)}else r.attr(`marker-${e}`,`url(${s}#${x})`)},"addEdgeMarker"),U1=t((r)=>typeof r==="string"?r:m()?.flowchart?.curve,"resolveEdgeCurveType"),gl=new Map,nn=new Map,Th=t(()=>{gl.clear(),nn.clear()},"clear"),oA=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),ko=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),Ia=t(async(r,e)=>{let i=m(),s=en(i),{labelStyles:o}=M(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),h=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",u=void 0,d=await bn(r,e.label,{style:ko(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?u:void 0},i);h.node().appendChild(d),l.info("abc82",e,e.labelType);let c,f;if(s){let x=d.children[0],k=b(d);c=await cr.measure(()=>x.getBoundingClientRect()),f=c,k.attr("width",c.width),k.attr("height",c.height)}else{let x=b(d).select("text").node();await cr.measure(()=>{if(c=d.getBBox(),x&&typeof x.getBBox==="function")f=x.getBBox();else f=c})}h.attr("transform",bo(f,s)),gl.set(e.id,a),e.width=c.width,e.height=c.height;let p;if(e.startLabelLeft){let x=r.insert("g").attr("class","edgeTerminals"),k=x.insert("g").attr("class","inner"),S=await qe(k,e.startLabelLeft,ko(e.labelStyle)||"",!1,!1);p=S;let T=S.getBBox();if(s){let B=S.children[0],_=b(S);T=B.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}if(k.attr("transform",bo(T,s)),!nn.get(e.id))nn.set(e.id,{});nn.get(e.id).startLeft=x,So(p,e.startLabelLeft)}if(e.startLabelRight){let x=r.insert("g").attr("class","edgeTerminals"),k=x.insert("g").attr("class","inner"),S=await qe(k,e.startLabelRight,ko(e.labelStyle)||"",!1,!1);p=S;let T=S.getBBox();if(s){let B=S.children[0],_=b(S);T=B.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}if(k.attr("transform",bo(T,s)),!nn.get(e.id))nn.set(e.id,{});nn.get(e.id).startRight=x,So(p,e.startLabelRight)}if(e.endLabelLeft){let x=r.insert("g").attr("class","edgeTerminals"),k=x.insert("g").attr("class","inner"),S=await qe(x,e.endLabelLeft,ko(e.labelStyle)||"",!1,!1);p=S;let T=S.getBBox();if(s){let B=S.children[0],_=b(S);T=B.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}if(k.attr("transform",bo(T,s)),!nn.get(e.id))nn.set(e.id,{});nn.get(e.id).endLeft=x,So(p,e.endLabelLeft)}if(e.endLabelRight){let x=r.insert("g").attr("class","edgeTerminals"),k=x.insert("g").attr("class","inner"),S=await qe(x,e.endLabelRight,ko(e.labelStyle)||"",!1,!1);p=S;let T=S.getBBox();if(s){let B=S.children[0],_=b(S);T=B.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}if(k.attr("transform",bo(T,s)),!nn.get(e.id))nn.set(e.id,{});nn.get(e.id).endRight=x,So(p,e.endLabelRight)}return d},"insertEdgeLabel");function So(r,e){if(en(m())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(So,"setTerminalWidth");var Al=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,gl.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=m(),{subGraphTitleTotalMargin:o}=Ea(s);if(r.label){let a=gl.get(r.id),{x:h,y:n}=r;if(i){let u=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",h,",",n,") to (",u.x,",",u.y,") abc88"),e.updatedPath)h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n+o/2})`)}if(r.startLabelLeft){let a=nn.get(r.id).startLeft,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.startLabelRight){let a=nn.get(r.id).startRight,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.endLabelLeft){let a=nn.get(r.id).endLeft,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.endLabelRight){let a=nn.get(r.id).endRight,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}},"positionEdgeLabel"),X1=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),G1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),h=r.width/2,n=r.height/2;return o>=h||a>=n},"outsideNode"),V1=t((r,e,i)=>{l.debug(`intersection calc abc89:
290
+ `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let p=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",f);return o.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),K(e,p),e.calcIntersect=function(x,S){return R.rect(x,S)},e.intersect=function(x){return R.rect(e,x)},o}t(uy,"defaultMindmapNode");async function dy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(dy,"mindmapCircle");var T1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:zm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Hm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Xm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Sg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Tg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Mg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ng},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:gg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ug},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:wg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:hy},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:cy},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:nm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:$g},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Hg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:zg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Jm},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Wg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_g},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Km},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:dg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Um},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:jm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ag},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ig},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:xg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Cg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:bg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:jg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ry},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Eg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Zm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ug},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Bg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ey},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:oy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Lg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ty},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Wm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:om},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:im},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ag},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:yg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Gm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:iy},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:$m},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Gg}],B1=t(()=>{let e=[...Object.entries({state:Ym,choice:fg,note:am,composite:pg,rectWithTitle:Om,labelRect:Ng,block_arrow:cg,collapsedGroup:hg,iconSquare:Rg,iconCircle:Dg,icon:Og,iconRounded:Pg,imageSquare:qg,anchor:og,kanbanItem:ly,mindmapCircle:dy,defaultMindmapNode:uy,classBox:ay,erBox:Fc,requirementBox:ny,usecaseActor:Vg,usecaseActorHollow:Qg,usecaseActorAwesome:Kg,usecaseActorIcon:tm,usecaseBusiness:em,usecaseEllipse:vg,usecaseJsonTable:rm}),...T1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),_d=B1();function Dc(r){return r in _d}t(Dc,"isValidShape");var _a=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),Qs=new Map;async function Sa(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?_d[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let h;if(i.config.securityLevel==="sandbox")h="_top";else if(e.linkTarget)h=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",h??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",ae(e.look)),e.tooltip)o.attr("title",e.tooltip);if(Qs.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Sa,"insertNode");var Nh=t((r,e)=>{Qs.set(e.id,r)},"setNodeElem"),Qh=t(()=>{Qs.clear()},"clear"),la=t((r)=>{let e=Qs.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var _1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,d=n,{labelStyles:c,nodeStyles:f,borderStyles:p,backgroundStyles:x}=M(e),S=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);ir(S,e.colorIndex,s,u);let T=aa(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await bn(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),E=v.getBBox();if(T){let tt=v.children[0],N=b(v);E=tt.getBoundingClientRect(),N.attr("width",E.width),N.attr("height",E.height)}let O=e.padding??0,D=e.width<=E.width+O?E.width+O:e.width;if(e.width<=E.width+O)e.diff=(D-e.width)/2-O;else e.diff=-O;let G=e.height,Z=e.y-G/2,J=e.y+G/2,rt=e.x-D/2,ht=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+G/3,nt=B?4:0,ot=E.height+2*nt,P,X;if(B){let tt=Math.max(ot,E.height+2*nt),N=rt+tt,at=Math.max(0,D-tt);if(e.look==="handDrawn"){let vt=y.svg(S),Wt=_t(e,{roughness:0.7,fill:h,stroke:d,seed:a}),Nt=_t(e,{roughness:0.7,fill:"none",stroke:d,seed:a}),jt=vt.rectangle(rt,Z,tt,G,Wt);P=S.insert(()=>jt,":first-child").attr("class","swimlane-title");let Xt=vt.rectangle(N,Z,at,G,Nt);X=S.insert(()=>Xt,":first-child").attr("class","swimlane-body"),P.select("path:nth-child(2)").attr("style",p.join(";")),P.select("path").attr("style",x.join(";").replace("fill","stroke"))}else P=S.insert("rect",":first-child"),X=S.insert("rect",":first-child"),P.attr("class","swimlane-title").attr("style",f).attr("x",rt).attr("y",Z).attr("width",tt).attr("height",G).attr("fill",h).attr("stroke",d),X.attr("class","swimlane-body").attr("style",f).attr("x",N).attr("y",Z).attr("width",at).attr("height",G).attr("fill","none").attr("stroke",d);let st=rt+tt/2,Bt=e.y;_.attr("transform",`translate(${st}, ${Bt}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let tt=Math.max(0,ht-Z),N=Math.min(ot,tt),at=Z+N,st=Math.max(0,J-at),Bt=e.x-D/2;if(e.look==="handDrawn"){let Nt=y.svg(S),jt=_t(e,{roughness:0.7,fill:h,stroke:d,fillWeight:3,seed:a}),Xt=_t(e,{roughness:0.7,fill:"none",stroke:d,seed:a}),$t=Nt.rectangle(Bt,Z,D,N,jt);P=S.insert(()=>$t,":first-child").attr("class","swimlane-title");let Mt=Nt.rectangle(Bt,at,D,st,Xt);X=S.insert(()=>Mt,":first-child").attr("class","swimlane-body"),P.select("path:nth-child(2)").attr("style",p.join(";")),P.select("path").attr("style",x.join(";").replace("fill","stroke"))}else P=S.insert("rect",":first-child"),X=S.insert("rect",":first-child"),P.attr("class","swimlane-title").attr("style",f).attr("x",Bt).attr("y",Z).attr("width",D).attr("height",N).attr("fill",h).attr("stroke",d),X.attr("class","swimlane-body").attr("style",f).attr("x",Bt).attr("y",at).attr("width",D).attr("height",st).attr("fill","none").attr("stroke",d);let vt=e.x-E.width/2,Wt=Z+(N-E.height)/2;_.attr("transform",`translate(${vt}, ${Wt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),c){let tt=_.select("span");if(tt)tt.attr("style",c)}return e.offsetX=0,e.width=D,e.height=G,e.offsetY=E.height-O/2,e.intersect=function(tt){return Ve(e,tt)},{cluster:S,labelBBox:E}},"swimlane"),fy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,{labelStyles:d,nodeStyles:c,borderStyles:f,backgroundStyles:p}=M(e),x=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);ir(x,e.colorIndex,s,u);let S=tn(i),T=x.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await bn(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await Re(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(tn(i)){let rt=B.children[0],ht=b(B);_=rt.getBoundingClientRect(),ht.attr("width",_.width),ht.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let E=e.height,O=e.x-v/2,D=e.y-E/2;l.trace("Data ",e,JSON.stringify(e));let G;if(e.look==="handDrawn"){let rt=y.svg(x),ht=_t(e,{roughness:0.7,fill:h,stroke:n,fillWeight:3,seed:a}),nt=rt.path(_e(O,D,v,E,0),ht);G=x.insert(()=>(l.debug("Rough node insert CXC",nt),nt),":first-child"),G.select("path:nth-child(2)").attr("style",f.join(";")),G.select("path").attr("style",p.join(";").replace("fill","stroke"))}else G=x.insert("rect",":first-child"),G.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",O).attr("y",D).attr("width",v).attr("height",E);let{subGraphTitleTopMargin:Z}=_a(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Z})`),d){let rt=T.select("span");if(rt)rt.attr("style",d)}let J=G.node().getBBox();return e.offsetX=0,e.width=J.width,e.height=J.height,e.offsetY=_.height-e.padding/2,e.intersect=function(rt){return Ve(e,rt)},{cluster:x,labelBBox:_}},"rect"),v1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let h=s.node().getBBox();return e.width=h.width,e.height=h.height,e.intersect=function(n){return Ve(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),L1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:h,borderColorArray:n,compositeBackground:u,compositeTitleBackground:d,nodeBorder:c}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);ir(f,e.colorIndex,s,n);let p=f.insert("g",":first-child"),x=f.insert("g").attr("class","cluster-label"),S=f.append("rect"),T=await Re(x,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(tn(i)){let nt=T.children[0],ot=b(T);B=nt.getBoundingClientRect(),ot.attr("width",B.width),ot.attr("height",B.height)}let _=0*e.padding,v=_/2,E=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(E-e.width)/2-e.padding;else e.diff=-e.padding;let O=e.height+_,D=e.height+_-B.height-6,G=e.x-E/2,Z=e.y-O/2;e.width=E;let J=e.y-e.height/2-v+B.height+2,rt;if(e.look==="handDrawn"){let nt=e.cssClasses.includes("statediagram-cluster-alt"),ot=y.svg(f),P=e.rx||e.ry?ot.path(_e(G,Z,E,O,10),{roughness:0.7,fill:d,fillStyle:"solid",stroke:c,seed:a}):ot.rectangle(G,Z,E,O,{seed:a});rt=f.insert(()=>P,":first-child");let X=ot.rectangle(G,J,E,D,{fill:nt?h:u,fillStyle:nt?"hachure":"solid",stroke:c,seed:a});rt=f.insert(()=>P,":first-child"),S=f.insert(()=>X),rt.attr("class","outer"),S.attr("class","inner")}else{rt=p.insert("rect",":first-child");let nt="outer";rt.attr("class",nt).attr("x",G).attr("y",Z).attr("width",E).attr("height",O).attr("data-look",e.look),S.attr("class","inner").attr("x",G).attr("y",J).attr("width",E).attr("height",D)}x.attr("transform",`translate(${e.x-B.width/2}, ${Z+1-(tn(i)?0:3)})`);let ht=rt.node().getBBox();return e.height=ht.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(nt){return Ve(e,nt)},{cluster:f,labelBBox:B}},"roundedWithTitle"),F1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:h}=s,{labelStyles:n,nodeStyles:u,borderStyles:d,backgroundStyles:c}=M(e),f=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),p=tn(i),x=f.insert("g").attr("class","cluster-label "),S=await bn(x,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),T=S.getBBox();if(tn(i)){let Z=S.children[0],J=b(S);T=Z.getBoundingClientRect(),J.attr("width",T.width),J.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,E=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let O;if(e.look==="handDrawn"){let Z=y.svg(f),J=_t(e,{roughness:0.7,fill:a,stroke:h,fillWeight:4,seed:o}),rt=Z.path(_e(v,E,B,_,e.rx),J);O=f.insert(()=>(l.debug("Rough node insert CXC",rt),rt),":first-child"),O.select("path:nth-child(2)").attr("style",d.join(";")),O.select("path").attr("style",c.join(";").replace("fill","stroke"))}else O=f.insert("rect",":first-child"),O.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",E).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:D}=_a(i);if(x.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+D})`),n){let Z=x.select("span");if(Z)Z.attr("style",n)}let G=O.node().getBBox();return e.offsetX=0,e.width=G.width,e.height=G.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Z){return Ve(e,Z)},{cluster:f,labelBBox:T}},"kanbanSection"),M1=t((r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:h,nodeBorder:n,borderColorArray:u}=o,d=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);ir(d,e.colorIndex,s,u);let c=d.insert("g",":first-child"),f=0*e.padding,p=e.width+f;e.diff=-e.padding;let x=e.height+f,S=e.x-p/2,T=e.y-x/2;e.width=p;let B;if(e.look==="handDrawn"){let E=y.svg(d).rectangle(S,T,p,x,{fill:h??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=d.insert(()=>E,":first-child").attr("class","divider")}else{B=c.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",p).attr("height",x).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Ve(e,v)},{cluster:d,labelBBox:{}}},"divider"),A1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=m(),{theme:o,themeVariables:a,handDrawnSeed:h}=s,{borderColorArray:n}=a,{labelStyles:u,borderStyles:d}=M(e),c=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);ir(c,e.colorIndex,o,n);let f=tn(s),p=c.insert("g").attr("class","cluster-label"),x={width:0,height:0},S=e.label?.trim();if(S){let D;if(e.labelType==="markdown")D=await bn(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});else D=await Re(p,e.label,e.labelStyle||"",!1,!0);if(x=D.getBBox(),f){let G=D.children[0],Z=b(D);x=G.getBoundingClientRect(),Z.attr("width",x.width),Z.attr("height",x.height)}}let T=e.width<=x.width+e.padding?x.width+e.padding:e.width;if(e.width<=x.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,E;if(e.look==="handDrawn"){let D=y.svg(c),G=_t(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:h,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=D.path(_e(_,v,T,B,i.rx),G);E=c.insert(()=>Z,":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";"))}else if(E=c.insert("rect",":first-child"),E.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)E.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:D}=_a(s);if(p.attr("transform",`translate(${e.x-x.width/2}, ${e.y-e.height/2+D})`),u){let G=p.select("span");if(G)G.attr("style",u)}}let O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=x.height-e.padding/2,e.intersect=function(D){return Ve(e,D)},{cluster:c,labelBBox:x}},"createContainerGroup"),E1=t(async(r,e)=>{let{themeVariables:i}=m(),s=i.flowContainerStroke||i.secondaryBorderColor;return A1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),$1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),h=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,u=r.y-h/2;return{boundaryType:i,width:a,height:h,x:n,y:u,bodyY:u+o,bodyHeight:h-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),I1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:h,clusterBorder:n,borderColorArray:u}=o,{labelStyles:d,nodeStyles:c}=M(e),{stylesMap:f}=je(e),p=e.boundaryType||"rect",x=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${p} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",p).attr("data-look",e.look);ir(x,e.colorIndex,s,u);let S=tn(i),T=x.insert("g").attr("class","cluster-label system-boundary-title"),B=await bn(T,e.label,{style:d,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let P=B.children[0],X=b(B);_=P.getBoundingClientRect(),X.attr("width",_.width),X.attr("height",_.height)}let v=$1(e,_),{width:E,height:O,x:D,y:G,bodyY:Z,bodyHeight:J,tabHeight:rt,tabWidth:ht}=v;e.diff=e.width<=_.width+e.padding?(E-e.width)/2-e.padding:-e.padding;let nt=_t(e,{fill:f.get("fill")||h,stroke:f.get("stroke")||n,strokeWidth:f.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let P=y.svg(x),X=P.rectangle(D,Z,E,J,nt);if(x.insert(()=>X,":first-child").attr("class","boundary-body label-container"),p==="package"){let tt=P.rectangle(D,G,ht,rt,nt);x.insert(()=>tt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(x.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",c).attr("x",D).attr("y",Z).attr("width",E).attr("height",J),p==="package")x.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",c).attr("x",D).attr("y",G).attr("width",ht).attr("height",rt);let{subGraphTitleTopMargin:ot}=_a(i);if(p==="package")T.attr("transform",`translate(${D+(ht-_.width)/2}, ${G+(rt-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${G+ot})`);if(d)T.attr("style",d),T.select("span").attr("style",d);return e.offsetX=0,e.width=E,e.height=O,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(P){return Ve(e,P)},{cluster:x,labelBBox:_}},"usecaseSystemBoundary"),O1=fy,D1={rect:fy,squareRect:O1,roundedWithTitle:L1,noteGroup:v1,divider:M1,kanbanSection:F1,flowGroup:E1,usecaseSystemBoundary:I1,swimlane:_1},P1=new Set(["noteGroup","divider"]),lA=t((r)=>!P1.has(r??"rect"),"clusterPaintsTitle"),py=new Map,Fo=t(async(r,e)=>{let i=e.shape||"rect",s=await D1[i](r,e);return py.set(e.id,s),s},"insertCluster"),Rh=t(()=>{py=new Map},"clear");var Co=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),nn={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Fm={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ko(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=se(r),e=se(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],h=o-i,n=a-s;return{angle:Math.atan(n/h),deltaX:h,deltaY:n}}t(ko,"calculateDeltaAndAngle");var se=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),R1=t((r)=>({x:t(function(e,i,s){let o=0,a=se(s[0]).x<se(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(nn,r.arrowTypeStart)){let{angle:x,deltaX:S}=ko(s[0],s[1]);o=nn[r.arrowTypeStart]*Math.cos(x)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(nn,r.arrowTypeEnd)){let{angle:x,deltaX:S}=ko(s[s.length-1],s[s.length-2]);o=nn[r.arrowTypeEnd]*Math.cos(x)*(S>=0?1:-1)}let h=Math.abs(se(e).x-se(s[s.length-1]).x),n=Math.abs(se(e).y-se(s[s.length-1]).y),u=Math.abs(se(e).x-se(s[0]).x),d=Math.abs(se(e).y-se(s[0]).y),c=nn[r.arrowTypeStart],f=nn[r.arrowTypeEnd],p=1;if(h<f&&h>0&&n<f){let x=f+p-h;x*=a==="right"?-1:1,o-=x}if(u<c&&u>0&&d<c){let x=c+p-u;x*=a==="right"?-1:1,o+=x}return se(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=se(s[0]).y<se(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(nn,r.arrowTypeStart)){let{angle:x,deltaY:S}=ko(s[0],s[1]);o=nn[r.arrowTypeStart]*Math.abs(Math.sin(x))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(nn,r.arrowTypeEnd)){let{angle:x,deltaY:S}=ko(s[s.length-1],s[s.length-2]);o=nn[r.arrowTypeEnd]*Math.abs(Math.sin(x))*(S>=0?1:-1)}let h=Math.abs(se(e).y-se(s[s.length-1]).y),n=Math.abs(se(e).x-se(s[s.length-1]).x),u=Math.abs(se(e).y-se(s[0]).y),d=Math.abs(se(e).x-se(s[0]).x),c=nn[r.arrowTypeStart],f=nn[r.arrowTypeEnd],p=1;if(h<f&&h>0&&n<f){let x=f+p-h;x*=a==="up"?-1:1,o-=x}if(u<c&&u>0&&d<c){let x=c+p-u;x*=a==="up"?-1:1,o+=x}return se(e).y+o},"y")}),"getLineFunctionsWithOffset"),q1=t((r,e,i,s,o,a=!1,h)=>{if(e.arrowTypeStart)gy(r,"start",e.arrowTypeStart,i,s,o,a,h);if(e.arrowTypeEnd)gy(r,"end",e.arrowTypeEnd,i,s,o,a,h)},"addEdgeMarkers"),W1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},N1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],gy=t((r,e,i,s,o,a,h=!1,n)=>{if(!i||i==="none")return;let u=W1[i],d=u&&N1.includes(u.type);if(!u){l.warn(`Unknown arrow type: ${i}`);return}let c=u.type,x=`${o}_${a}-${c}${e==="start"?"Start":"End"}${h&&d?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${x}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(x);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((E)=>{if(E.setAttribute("stroke",n),u.fill)E.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${x})`)},"addEdgeMarker"),z1=t((r)=>typeof r==="string"?r:m()?.flowchart?.curve,"resolveEdgeCurveType"),fl=new Map,rn=new Map,Lh=t(()=>{fl.clear(),rn.clear()},"clear"),cA=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),bo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),Ta=t(async(r,e)=>{let i=m(),s=tn(i),{labelStyles:o}=M(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),h=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",u=void 0,d=await bn(r,e.label,{style:bo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?u:void 0},i);h.node().appendChild(d),l.info("abc82",e,e.labelType);let c,f;if(s){let x=d.children[0],S=b(d);c=await lr.measure(()=>x.getBoundingClientRect()),f=c,S.attr("width",c.width),S.attr("height",c.height)}else{let x=b(d).select("text").node();await lr.measure(()=>{if(c=d.getBBox(),x&&typeof x.getBBox==="function")f=x.getBBox();else f=c})}h.attr("transform",Co(f,s)),fl.set(e.id,a),e.width=c.width,e.height=c.height;let p;if(e.startLabelLeft){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await Re(S,e.startLabelLeft,bo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Co(B,s)),!rn.get(e.id))rn.set(e.id,{});rn.get(e.id).startLeft=x,wo(p,e.startLabelLeft)}if(e.startLabelRight){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await Re(S,e.startLabelRight,bo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Co(B,s)),!rn.get(e.id))rn.set(e.id,{});rn.get(e.id).startRight=x,wo(p,e.startLabelRight)}if(e.endLabelLeft){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await Re(x,e.endLabelLeft,bo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Co(B,s)),!rn.get(e.id))rn.set(e.id,{});rn.get(e.id).endLeft=x,wo(p,e.endLabelLeft)}if(e.endLabelRight){let x=r.insert("g").attr("class","edgeTerminals"),S=x.insert("g").attr("class","inner"),T=await Re(x,e.endLabelRight,bo(e.labelStyle)||"",!1,!1);p=T;let B=T.getBBox();if(s){let _=T.children[0],v=b(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Co(B,s)),!rn.get(e.id))rn.set(e.id,{});rn.get(e.id).endRight=x,wo(p,e.endLabelRight)}return d},"insertEdgeLabel");function wo(r,e){if(tn(m())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(wo,"setTerminalWidth");var gl=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,fl.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=m(),{subGraphTitleTotalMargin:o}=_a(s);if(r.label){let a=fl.get(r.id),{x:h,y:n}=r;if(i){let u=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",h,",",n,") to (",u.x,",",u.y,") abc88"),e.updatedPath)h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n+o/2})`)}if(r.startLabelLeft){let a=rn.get(r.id).startLeft,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.startLabelRight){let a=rn.get(r.id).startRight,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.endLabelLeft){let a=rn.get(r.id).endLeft,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}if(r.endLabelRight){let a=rn.get(r.id).endRight,{x:h,y:n}=r;if(i){let u=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);h=u.x,n=u.y}a.attr("transform",`translate(${h}, ${n})`)}},"positionEdgeLabel"),H1=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),Y1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),h=r.width/2,n=r.height/2;return o>=h||a>=n},"outsideNode"),j1=t((r,e,i)=>{l.debug(`intersection calc abc89:
291
291
  outsidePoint: ${JSON.stringify(e)}
292
292
  insidePoint : ${JSON.stringify(i)}
293
- node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),h=r.width/2,n=i.x<e.x?h-a:h+a,u=r.height/2,d=Math.abs(e.y-i.y),c=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*h>Math.abs(s-e.x)*u){let f=i.y<e.y?e.y-u-o:o-u-e.y;n=c*f/d;let p={x:i.x<e.x?i.x+n:i.x-c+n,y:i.y<e.y?i.y+d-f:i.y-d+f};if(n===0)p.x=e.x,p.y=e.y;if(c===0)p.x=e.x;if(d===0)p.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${d}, q ${f}, R ${c}, r ${n}`,p),p}else{if(i.x<e.x)n=e.x-h-s;else n=s-h-e.x;let f=d*n/c,p=i.x<e.x?i.x+c-n:i.x-c+n,x=i.y<e.y?i.y+f:i.y-f;if(l.debug(`sides calc abc89, Q ${d}, q ${f}, R ${c}, r ${n}`,{_x:p,_y:x}),n===0)p=e.x,x=e.y;if(c===0)p=e.x;if(d===0)x=e.y;return{x:p,y:x}}},"intersection"),by=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!G1(e,a)&&!o){let h=V1(e,s,a);l.debug("abc88 inside",a,s,h),l.debug("abc88 intersection",h,e);let n=!1;if(i.forEach((u)=>{n=n||u.x===h.x&&u.y===h.y}),!i.some((u)=>u.x===h.x&&u.y===h.y))i.push(h);else l.warn("abc88 no intersect",h,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function wy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],h=r[s+1];if(o.x===a.x&&a.y===h.y&&Math.abs(a.x-h.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===h.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-h.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(wy,"extractCornerPoints");var ky=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),h=i/a;return{x:e.x-h*s,y:e.y-h*o}},"findAdjacentPoint"),K1=t(function(r){let{cornerPointPositions:e}=wy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],h=r[s],n=ky(o,h,5),u=ky(a,h,5),d=u.x-n.x,c=u.y-n.y;i.push(n);let f=Math.sqrt(2)*2,p={x:h.x,y:h.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let x=5;if(h.x===n.x)p={x:d<0?n.x-x+f:n.x+x-f,y:c<0?n.y-f:n.y+f};else p={x:d<0?n.x-f:n.x+f,y:c<0?n.y-x+f:n.y+x-f}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(p,u)}else i.push(r[s]);return i},"fixCorners"),Z1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,h=4,n=Math.floor(s/4),u=Number.isFinite(n)?Math.max(0,n):0,d=Array(u).fill("2 2").join(" ");return`0 ${e} ${d} ${i}`},"generateDashArray"),Lo=t(function(r,e,i,s,o,a,h,n=!1){if(!h)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:d}=m(),c=e.points,f=!1,p=o;var x=a;let k=[];for(let st in e.cssCompiledStyles){if(wd(st))continue;k.push(e.cssCompiledStyles[st])}if(d==="swimlane"){if(x.intersect&&p.intersect&&Array.isArray(c)&&c.length>=2)if(c.length===2)c=[p.intersect(c[0]),x.intersect(c[1])];else{let st=c.slice(1,-1),Bt=st[0],vt=st[st.length-1],Ht=0.5,Yt=Math.abs(c[c.length-1].x-vt.x)<0.5&&Math.abs(c[c.length-1].y-vt.y)<0.5,Vt=p.intersect(Bt),Kt=Yt?vt:x.intersect(vt),It=Math.abs(Kt.x-vt.x)<0.5&&Math.abs(Kt.y-vt.y)<0.5,Pt=Math.abs(Vt.x-Bt.x)<0.5&&Math.abs(Vt.y-Bt.y)<0.5?[]:[Vt],jt=It?[]:[Kt];c=[...Pt,...st,...jt]}c=X1(e,c)}else if(x.intersect&&p.intersect&&!n)c=c.slice(1,e.points.length-1),c.unshift(p.intersect(c[0])),c.push(x.intersect(c[c.length-1]));let S=btoa(JSON.stringify(c));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),c=by(e.points,i.get(e.toCluster).node),f=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(c,null,2)),c=by(c.reverse(),i.get(e.fromCluster).node).reverse(),f=!0;let T=c.filter((st)=>!Number.isNaN(st.y)),B=U1(e.curve);if(B!=="rounded")T=K1(T);let _=Ca;switch(B){case"linear":_=Ca;break;case"basis":_=Lr;break;case"cardinal":_=Qi;break;case"bumpX":_=Vi;break;case"bumpY":_=Ki;break;case"catmullRom":_=to;break;case"monotoneX":_=eo;break;case"monotoneY":_=io;break;case"natural":_=Jr;break;case"step":_=ti;break;case"stepAfter":_=so;break;case"stepBefore":_=oo;break;case"rounded":_=Ca;break;default:_=Lr}let{x:L,y:D}=z1(e),P=ml().x(L).y(D).curve(_),K;switch(e.thickness){case"normal":K="edge-thickness-normal";break;case"thick":K="edge-thickness-thick";break;case"invisible":K="edge-thickness-invisible";break;default:K="edge-thickness-normal"}switch(e.pattern){case"solid":K+=" edge-pattern-solid";break;case"dotted":K+=" edge-pattern-dotted";break;case"dashed":K+=" edge-pattern-dashed";break;default:K+=" edge-pattern-solid"}let Z,J=B==="rounded"?Sy(Ty(T,e),5):P(T),rt=Array.isArray(e.style)?e.style:[e.style],ht=rt.find((st)=>st?.startsWith("stroke:")),nt="";if(e.animate)nt="edge-animation-fast";if(e.animation)nt="edge-animation-"+e.animation;let ot=!1;if(e.look==="handDrawn"){let st=y.svg(r);Object.assign([],T);let Bt=st.path(J,{roughness:0.3,seed:u});K+=" transition",Z=b(Bt).select("path").attr("id",`${h}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(nt?" "+nt:"")).attr("style",rt?rt.reduce((Ht,Yt)=>Ht+";"+Yt,""):"");let vt=Z.attr("d");Z.attr("d",vt),r.node().appendChild(Z.node())}else{let st=k.join(";"),Bt=rt?rt.reduce((It,Mt)=>It+Mt+";",""):"",vt=(st?st+";"+Bt+";":Bt)+";"+(rt?rt.reduce((It,Mt)=>It+";"+Mt,""):"");Z=r.append("path").attr("d",J).attr("id",`${h}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(nt?" "+nt:"")).attr("style",vt),ht=vt.match(/stroke:([^;]+)/)?.[1],ot=e.animate===!0||!!e.animation||st.includes("animation");let Ht=Z.node(),Yt=typeof Ht.getTotalLength==="function"?Ht.getTotalLength():0,Vt=Rm[e.arrowTypeStart]||0,Kt=Rm[e.arrowTypeEnd]||0;if(e.look==="neo"&&!ot){let Mt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?Z1(Yt,Vt,Kt):`0 ${Vt} ${Yt-Vt-Kt} ${Kt}`}; stroke-dashoffset: 0;`;Z.attr("style",Mt+Z.attr("style"))}}if(Z.attr("data-edge",!0),Z.attr("data-et","edge"),Z.attr("data-id",e.id),Z.attr("data-points",S),Z.attr("data-look",le(e.look)),e.showPoints)T.forEach((st)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",st.x).attr("cy",st.y)});let N="";if(m().flowchart.arrowMarkerAbsolute||m().state.arrowMarkerAbsolute)N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let X=!ot&&e?.look==="neo";H1(Z,e,N,h,s,X,ht);let tt=Math.floor(c.length/2),U=c[tt];if(!V.isLabelCoordinateInPath(U,Z.attr("d")))f=!0;let at={};if(f)at.updatedPath=c;return at.originalPath=e.points,at},"insertEdge");function Sy(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let h=r[a],n=r[a-1],u=r[a+1];if(a===0)i+=`M${h.x},${h.y}`;else if(a===s-1)i+=`L${h.x},${h.y}`;else{let d=h.x-n.x,c=h.y-n.y,f=u.x-h.x,p=u.y-h.y,x=Math.hypot(d,c),k=Math.hypot(f,p);if(x<o||k<o){i+=`L${h.x},${h.y}`;continue}let S=d/x,T=c/x,B=f/k,_=p/k,L=S*B+T*_,D=Math.max(-1,Math.min(1,L)),P=Math.acos(D);if(P<o||Math.abs(Math.PI-P)<o){i+=`L${h.x},${h.y}`;continue}let K=Math.min(e/Math.sin(P/2),x/2,k/2),Z=h.x-S*K,J=h.y-T*K,rt=h.x+B*K,ht=h.y+_*K;i+=`L${Z},${J}`,i+=`Q${h.x},${h.y} ${rt},${ht}`}}return i}t(Sy,"generateRoundedPath");function Mc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(Mc,"calculateDeltaAndAngle");function Ty(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&tn[e.arrowTypeStart]){let o=tn[e.arrowTypeStart],a=r[0],h=r[1],{angle:n}=Mc(a,h),u=o*Math.cos(n),d=o*Math.sin(n);i[0].x=a.x+u,i[0].y=a.y+d}let s=r.length;if(s>=2&&tn[e.arrowTypeEnd]){let o=tn[e.arrowTypeEnd],a=r[s-1],h=r[s-2],{angle:n}=Mc(h,a),u=o*Math.cos(n),d=o*Math.sin(n);i[s-1].x=a.x-u,i[s-1].y=a.y-d}return i}t(Ty,"applyMarkerOffsetsToPoints");var Q1=t((r,e,i,s)=>{e.forEach((o)=>{w2[o](r,i,s)})},"insertMarkers"),J1=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),t2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),e2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),r2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),i2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),o2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),s2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),a2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),n2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),l2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),h2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),c2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),u2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),d2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),f2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),p2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:h}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",h??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let u=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",h??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),g2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),m2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:h}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",h??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let u=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",h??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),y2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
293
+ node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),h=r.width/2,n=i.x<e.x?h-a:h+a,u=r.height/2,d=Math.abs(e.y-i.y),c=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*h>Math.abs(s-e.x)*u){let f=i.y<e.y?e.y-u-o:o-u-e.y;n=c*f/d;let p={x:i.x<e.x?i.x+n:i.x-c+n,y:i.y<e.y?i.y+d-f:i.y-d+f};if(n===0)p.x=e.x,p.y=e.y;if(c===0)p.x=e.x;if(d===0)p.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${d}, q ${f}, R ${c}, r ${n}`,p),p}else{if(i.x<e.x)n=e.x-h-s;else n=s-h-e.x;let f=d*n/c,p=i.x<e.x?i.x+c-n:i.x-c+n,x=i.y<e.y?i.y+f:i.y-f;if(l.debug(`sides calc abc89, Q ${d}, q ${f}, R ${c}, r ${n}`,{_x:p,_y:x}),n===0)p=e.x,x=e.y;if(c===0)p=e.x;if(d===0)x=e.y;return{x:p,y:x}}},"intersection"),my=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!Y1(e,a)&&!o){let h=j1(e,s,a);l.debug("abc88 inside",a,s,h),l.debug("abc88 intersection",h,e);let n=!1;if(i.forEach((u)=>{n=n||u.x===h.x&&u.y===h.y}),!i.some((u)=>u.x===h.x&&u.y===h.y))i.push(h);else l.warn("abc88 no intersect",h,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function xy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],h=r[s+1];if(o.x===a.x&&a.y===h.y&&Math.abs(a.x-h.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===h.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-h.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(xy,"extractCornerPoints");var yy=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),h=i/a;return{x:e.x-h*s,y:e.y-h*o}},"findAdjacentPoint"),U1=t(function(r){let{cornerPointPositions:e}=xy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],h=r[s],n=yy(o,h,5),u=yy(a,h,5),d=u.x-n.x,c=u.y-n.y;i.push(n);let f=Math.sqrt(2)*2,p={x:h.x,y:h.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let x=5;if(h.x===n.x)p={x:d<0?n.x-x+f:n.x+x-f,y:c<0?n.y-f:n.y+f};else p={x:d<0?n.x-f:n.x+f,y:c<0?n.y-x+f:n.y+x-f}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(p,u)}else i.push(r[s]);return i},"fixCorners"),X1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,h=4,n=Math.floor(s/4),u=Number.isFinite(n)?Math.max(0,n):0,d=Array(u).fill("2 2").join(" ");return`0 ${e} ${d} ${i}`},"generateDashArray"),Po=t(function(r,e,i,s,o,a,h,n=!1){if(!h)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:d}=m(),c=e.points,f=!1,p=o;var x=a;let S=[];for(let st in e.cssCompiledStyles){if(wd(st))continue;S.push(e.cssCompiledStyles[st])}if(d==="swimlane"){if(x.intersect&&p.intersect&&Array.isArray(c)&&c.length>=2)if(c.length===2)c=[p.intersect(c[0]),x.intersect(c[1])];else{let st=c.slice(1,-1),Bt=st[0],vt=st[st.length-1],Wt=0.5,Nt=Math.abs(c[c.length-1].x-vt.x)<0.5&&Math.abs(c[c.length-1].y-vt.y)<0.5,jt=p.intersect(Bt),Xt=Nt?vt:x.intersect(vt),$t=Math.abs(Xt.x-vt.x)<0.5&&Math.abs(Xt.y-vt.y)<0.5,Dt=Math.abs(jt.x-Bt.x)<0.5&&Math.abs(jt.y-Bt.y)<0.5?[]:[jt],Ht=$t?[]:[Xt];c=[...Dt,...st,...Ht]}c=H1(e,c)}else if(x.intersect&&p.intersect&&!n)c=c.slice(1,e.points.length-1),c.unshift(p.intersect(c[0])),c.push(x.intersect(c[c.length-1]));let T=btoa(JSON.stringify(c));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),c=my(e.points,i.get(e.toCluster).node),f=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(c,null,2)),c=my(c.reverse(),i.get(e.fromCluster).node).reverse(),f=!0;let B=c.filter((st)=>!Number.isNaN(st.y)),_=z1(e.curve);if(_!=="rounded")B=U1(B);let v=Ia;switch(_){case"linear":v=Ia;break;case"basis":v=vr;break;case"cardinal":v=Zi;break;case"bumpX":v=Gi;break;case"bumpY":v=Vi;break;case"catmullRom":v=Ji;break;case"monotoneX":v=to;break;case"monotoneY":v=eo;break;case"natural":v=Qr;break;case"step":v=Jr;break;case"stepAfter":v=io;break;case"stepBefore":v=ro;break;case"rounded":v=Ia;break;default:v=vr}let{x:E,y:O}=R1(e),D=pl().x(E).y(O).curve(v),G;switch(e.thickness){case"normal":G="edge-thickness-normal";break;case"thick":G="edge-thickness-thick";break;case"invisible":G="edge-thickness-invisible";break;default:G="edge-thickness-normal"}switch(e.pattern){case"solid":G+=" edge-pattern-solid";break;case"dotted":G+=" edge-pattern-dotted";break;case"dashed":G+=" edge-pattern-dashed";break;default:G+=" edge-pattern-solid"}let Z,J=_==="rounded"?Cy(by(B,e),5):D(B),rt=Array.isArray(e.style)?e.style:[e.style],ht=rt.find((st)=>st?.startsWith("stroke:")),nt="";if(e.animate)nt="edge-animation-fast";if(e.animation)nt="edge-animation-"+e.animation;let ot=!1;if(e.look==="handDrawn"){let st=y.svg(r);Object.assign([],B);let Bt=st.path(J,{roughness:0.3,seed:u});G+=" transition",Z=b(Bt).select("path").attr("id",`${h}-${e.id}`).attr("class"," "+G+(e.classes?" "+e.classes:"")+(nt?" "+nt:"")).attr("style",rt?rt.reduce((Wt,Nt)=>Wt+";"+Nt,""):"");let vt=Z.attr("d");Z.attr("d",vt),r.node().appendChild(Z.node())}else{let st=S.join(";"),Bt=rt?rt.reduce(($t,Mt)=>$t+Mt+";",""):"",vt=(st?st+";"+Bt+";":Bt)+";"+(rt?rt.reduce(($t,Mt)=>$t+";"+Mt,""):"");Z=r.append("path").attr("d",J).attr("id",`${h}-${e.id}`).attr("class"," "+G+(e.classes?" "+e.classes:"")+(nt?" "+nt:"")).attr("style",vt),ht=vt.match(/stroke:([^;]+)/)?.[1],ot=e.animate===!0||!!e.animation||st.includes("animation");let Wt=Z.node(),Nt=typeof Wt.getTotalLength==="function"?Wt.getTotalLength():0,jt=Fm[e.arrowTypeStart]||0,Xt=Fm[e.arrowTypeEnd]||0;if(e.look==="neo"&&!ot){let Mt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?X1(Nt,jt,Xt):`0 ${jt} ${Nt-jt-Xt} ${Xt}`}; stroke-dashoffset: 0;`;Z.attr("style",Mt+Z.attr("style"))}}if(Z.attr("data-edge",!0),Z.attr("data-et","edge"),Z.attr("data-id",e.id),Z.attr("data-points",T),Z.attr("data-look",ae(e.look)),e.showPoints)B.forEach((st)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",st.x).attr("cy",st.y)});let P="";if(m().flowchart.arrowMarkerAbsolute||m().state.arrowMarkerAbsolute)P=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,P=P.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let X=!ot&&e?.look==="neo";q1(Z,e,P,h,s,X,ht);let tt=Math.floor(c.length/2),N=c[tt];if(!V.isLabelCoordinateInPath(N,Z.attr("d")))f=!0;let at={};if(f)at.updatedPath=c;return at.originalPath=e.points,at},"insertEdge");function Cy(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let h=r[a],n=r[a-1],u=r[a+1];if(a===0)i+=`M${h.x},${h.y}`;else if(a===s-1)i+=`L${h.x},${h.y}`;else{let d=h.x-n.x,c=h.y-n.y,f=u.x-h.x,p=u.y-h.y,x=Math.hypot(d,c),S=Math.hypot(f,p);if(x<o||S<o){i+=`L${h.x},${h.y}`;continue}let T=d/x,B=c/x,_=f/S,v=p/S,E=T*_+B*v,O=Math.max(-1,Math.min(1,E)),D=Math.acos(O);if(D<o||Math.abs(Math.PI-D)<o){i+=`L${h.x},${h.y}`;continue}let G=Math.min(e/Math.sin(D/2),x/2,S/2),Z=h.x-T*G,J=h.y-B*G,rt=h.x+_*G,ht=h.y+v*G;i+=`L${Z},${J}`,i+=`Q${h.x},${h.y} ${rt},${ht}`}}return i}t(Cy,"generateRoundedPath");function Mc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(Mc,"calculateDeltaAndAngle");function by(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&nn[e.arrowTypeStart]){let o=nn[e.arrowTypeStart],a=r[0],h=r[1],{angle:n}=Mc(a,h),u=o*Math.cos(n),d=o*Math.sin(n);i[0].x=a.x+u,i[0].y=a.y+d}let s=r.length;if(s>=2&&nn[e.arrowTypeEnd]){let o=nn[e.arrowTypeEnd],a=r[s-1],h=r[s-2],{angle:n}=Mc(h,a),u=o*Math.cos(n),d=o*Math.sin(n);i[s-1].x=a.x-u,i[s-1].y=a.y-d}return i}t(by,"applyMarkerOffsetsToPoints");var G1=t((r,e,i,s)=>{e.forEach((o)=>{x2[o](r,i,s)})},"insertMarkers"),V1=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),K1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Z1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Q1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),J1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),t2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),e2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),r2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),i2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),o2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),s2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),a2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),n2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),l2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),h2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),c2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:h}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",h??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let u=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",h??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),u2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),d2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:h}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",h??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let u=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",h??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),f2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
294
294
  L20,10
295
295
  M20,10
296
- L0,20`)},"requirement_arrow"),x2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
296
+ L0,20`)},"requirement_arrow"),p2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
297
297
  L20,10
298
298
  M20,10
299
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),C2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),b2=t((r,e,i)=>{let s=E(),{themeVariables:o}=s,{strokeWidth:a}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");h.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),h.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),h.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),h.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),k2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),w2={extension:J1,composition:t2,aggregation:e2,dependency:r2,lollipop:i2,point:o2,circle:s2,cross:a2,barb:n2,barbNeo:l2,hierarchy:k2,only_one:h2,zero_or_one:c2,one_or_more:u2,zero_or_more:d2,only_one_neo:f2,zero_or_one_neo:p2,one_or_more_neo:g2,zero_or_more_neo:m2,requirement_arrow:y2,requirement_contains:C2,requirement_arrow_neo:x2,requirement_contains_neo:b2},hl=Q1;var S2={common:w,getConfig:E,insertCluster:Ro,insertEdge:Lo,insertEdgeLabel:Ia,insertMarkers:hl,insertNode:Ba,interpolateToCurve:Es,labelHelper:ee,log:l,positionEdgeLabel:Al},T2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Bo=Object.create(null),iA=t((r)=>{for(let e of r)Bo[e.name]=e},"registerLayoutLoaders"),B2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-9t6t9kc6.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...T2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),_2=t(()=>{iA([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-a5vgvjsg.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-gd3d04pk.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-j1amnd3m.js"),"loader")},...B2()])},"registerDefaultLayoutLoaders");_2();var $t=t(async(r,e)=>{if(!Object.hasOwn(Bo,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=Bo[r.layoutAlgorithm],s=await i.loader();return um(e,r.config),s.render(r,e,S2,{algorithm:i.algorithm})},"render"),Ac="dagre",zt=t((r="",{fallback:e=Ac}={})=>{if(Object.hasOwn(Bo,r))return r;for(let i of[e,Ac])if(Object.hasOwn(Bo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${Ac} is registered.`)},"getRegisteredLayoutAlgorithm");var Hn=t(()=>`
299
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),g2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),m2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");h.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),h.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),h.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),h.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),y2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),x2={extension:V1,composition:K1,aggregation:Z1,dependency:Q1,lollipop:J1,point:t2,circle:e2,cross:r2,barb:i2,barbNeo:o2,hierarchy:y2,only_one:s2,zero_or_one:a2,one_or_more:n2,zero_or_more:l2,only_one_neo:h2,zero_or_one_neo:c2,one_or_more_neo:u2,zero_or_more_neo:d2,requirement_arrow:f2,requirement_contains:g2,requirement_arrow_neo:p2,requirement_contains_neo:m2},Al=G1;var C2={common:w,getConfig:C,insertCluster:Fo,insertEdge:Po,insertEdgeLabel:Ta,insertMarkers:Al,insertNode:Sa,interpolateToCurve:As,labelHelper:ee,log:l,positionEdgeLabel:gl},b2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],So=Object.create(null),uA=t((r)=>{for(let e of r)So[e.name]=e},"registerLayoutLoaders"),k2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-6s5pggfc.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...b2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),w2=t(()=>{uA([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-k7pyhgzn.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-060q1rep.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-man3fqcj.js"),"loader")},...k2()])},"registerDefaultLayoutLoaders");w2();var zt=t(async(r,e)=>{if(!Object.hasOwn(So,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=So[r.layoutAlgorithm],s=await i.loader();return mm(e,r.config),s.render(r,e,C2,{algorithm:i.algorithm})},"render"),Ac="dagre",Ut=t((r="",{fallback:e=Ac}={})=>{if(Object.hasOwn(So,r))return r;for(let i of[e,Ac])if(Object.hasOwn(So,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${Ac} is registered.`)},"getRegisteredLayoutAlgorithm");var qn=t(()=>`
300
300
  /* Font Awesome icon styling - consolidated */
301
301
  .label-icon {
302
302
  display: inline-block;
@@ -310,5 +310,5 @@ ${o.join(`
310
310
  stroke: revert;
311
311
  stroke-width: revert;
312
312
  }
313
- `,"getIconStyles");var Ut=t((r,e)=>{let i;if(e==="sandbox")i=b("#i"+r);return(e==="sandbox"?b(i.nodes()[0].contentDocument.body):b("body")).select(`[id="${r}"]`)},"getDiagramElement");var Ct=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:h,y:n}=v2(r,e);ne(r,a,o,s);let u=L2(h,n,o,a,e);r.attr("viewBox",u),l.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),v2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),L2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
- export{t,To,am,l,yd,xt,xa,Te,hc,g,A,qg,Wg,ts,bc,om,hh,lt,Xt,Do,Y,Kg,mi,ta,im,bh,yh,vh,Vg,Yg,E,kh,vd,xh,en,dl,te,Jg,No,Lt,yc,vc,w,ne,na,sm,wh,lm,F,O,G,z,j,q,H,m,wa,ns,kc,kd,cm,b,rs,xc,as,no,Zg,Gn,wc,Ch,fi,pl,Mn,Cc,Qo,nr,St,Ec,ra,xd,Ca,ml,Ae,hr,br,um,wd,M,Xg,os,yr,fl,is,gi,dm,Bc,Ic,_c,Sc,pm,mm,fm,gm,Am,hm,bm,ym,vm,km,xm,wm,Cm,Em,Bm,Im,_m,Ai,Tc,Cd,Sm,eA,Eh,Tm,tA,nA,ss,Ed,rr,Bd,Dm,jn,ue,V,Bh,ro,Fn,Nm,Qm,rA,bn,Id,wt,pt,mt,aa,ar,or,y,ee,W,R,_d,Dc,Ea,Ba,Ih,_h,oa,aA,Ro,Sh,tn,Rm,gl,nn,Th,oA,Ia,Al,Lo,hl,iA,$t,zt,Hn,Ut,Ct};
313
+ `,"getIconStyles");var Gt=t((r,e)=>{let i;if(e==="sandbox")i=b("#i"+r);return(e==="sandbox"?b(i.nodes()[0].contentDocument.body):b("body")).select(`[id="${r}"]`)},"getDiagramElement");var Ct=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:h,y:n}=S2(r,e);ne(r,a,o,s);let u=T2(h,n,o,a,e);r.attr("viewBox",u),l.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),S2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),T2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
+ export{t,Qo,sm,l,yd,xt,Ea,De,hc,g,A,Yg,Jg,ns,bc,lm,xh,lt,en,Ro,Y,Zg,hi,aa,cm,wh,Ch,Eh,Xg,eA,C,Bh,vd,Ih,tn,ul,te,tA,Lo,Lt,yc,vc,w,ne,oa,um,_h,dm,F,z,j,U,H,W,q,m,Ba,rs,kc,kd,pm,b,as,xc,os,ao,nA,jn,wc,Sh,bi,dl,Mn,Cc,Mo,rr,St,Ec,ia,xd,Ia,pl,Ae,hr,br,mm,wd,M,rA,is,yr,ml,ss,yi,fm,Bc,Ic,_c,Sc,gm,Am,hm,bm,ym,vm,km,xm,wm,Cm,Em,Bm,Im,_m,Sm,Tm,Dm,ki,Tc,Cd,Nm,aA,Th,Qm,oA,iA,ls,Ed,ar,Bd,Rm,Hn,ue,V,Dh,oo,Fn,Lm,Mm,sA,bn,Id,wt,mt,ft,sa,or,ir,y,ee,K,R,_d,Dc,_a,Sa,Nh,Qh,la,lA,Fo,Rh,nn,Fm,fl,rn,Lh,cA,Ta,gl,Po,Al,uA,zt,Ut,qn,Gt,Ct};