@kabmo-labs/kabmo 0.44.0 → 0.45.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 (253) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +1 -1
  3. package/dist/client/static/js/{CsvGrid-1t2q46rg.js → CsvGrid-z74weshk.js} +2 -2
  4. package/dist/client/static/js/{DocxView-301hxnwk.js → DocxView-dpe5x9ab.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-47bwea5t.js → DrawioView-ftzwjf8v.js} +2 -2
  6. package/dist/client/static/js/{ImageView-68zdx5ex.js → ImageView-vchn6wyq.js} +1 -1
  7. package/dist/client/static/js/LayoutWrapper-1x0gnppc.js +2 -0
  8. package/dist/client/static/js/{Modal-fb9b4gq6.js → Modal-tteg7vtb.js} +18 -18
  9. package/dist/client/static/js/{PdfView-m64ksepp.js → PdfView-vjec8z3z.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-zyjwhpzm.js → SessionsView-g7z3fxbp.js} +1 -1
  11. package/dist/client/static/js/{SheetView-e88sqprx.js → SheetView-hhtfkdhe.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-hs9a713t.js → SvgPreview-48n3ex6p.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-fnr5kyqk.js → abnfDiagram-O67JEVCF-bpvzdara.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-bch3nye9.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7v003363.js → architectureDiagram-NJMV4G6O-xw62cr7j.js} +3 -3
  16. package/dist/client/static/js/{astro-t9vjc0mc.js → astro-56b0as3q.js} +1 -1
  17. package/dist/client/static/js/bash-mevzaywf.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-k4mwbw3d.js → blockDiagram-BEXU5L5S-x3a6cgar.js} +4 -4
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-688zq6f4.js → c4Diagram-YGBWAQC7-katvaxbj.js} +2 -2
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-h0s16pxr.js → classDiagram-v2-NBCMYWYE-bjz4mqqh.js} +3 -3
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-qb2t8qq5.js → cose-bilkent-JH36ORCC-fsn80psf.js} +1 -1
  22. package/dist/client/static/js/cpp-wk9z0c5g.js +1 -0
  23. package/dist/client/static/js/css-3w3p9s67.js +1 -0
  24. package/dist/client/static/js/cynefin-OW5HDTMX-vqy5jtnk.js +1 -0
  25. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-syhtcr7b.js → cynefinDiagram-VND7K2PF-cfhbsnkm.js} +2 -2
  26. package/dist/client/static/js/{dagre-6A5THRUB-7wgbx6cm.js → dagre-6A5THRUB-j2wt7ns6.js} +2 -2
  27. package/dist/client/static/js/{diagram-22UHCM2B-951cmp5h.js → diagram-22UHCM2B-abrdj714.js} +8 -8
  28. package/dist/client/static/js/{diagram-3UASUU5V-mvdbqt7b.js → diagram-3UASUU5V-dbn15bxn.js} +1 -1
  29. package/dist/client/static/js/{diagram-ATOU4E4O-hkvdtgdm.js → diagram-ATOU4E4O-y79pwf7w.js} +3 -3
  30. package/dist/client/static/js/{diagram-CDSNMT55-bkkz35ca.js → diagram-CDSNMT55-f8ryt86n.js} +2 -2
  31. package/dist/client/static/js/{diagram-MLGK6HIB-z6pcrkc3.js → diagram-MLGK6HIB-ws7wn3q9.js} +1 -1
  32. package/dist/client/static/js/{diagram-MPIPVDR6-mkwf8j4m.js → diagram-MPIPVDR6-zmznrg13.js} +2 -2
  33. package/dist/client/static/js/{dockerfile-7gd570bm.js → dockerfile-qgc921kw.js} +1 -1
  34. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-trym26ts.js → ebnfDiagram-ZINNZB2B-y5q7hy1v.js} +1 -1
  35. package/dist/client/static/js/{elixir-z77c7tfn.js → elixir-12pgbgtq.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-gkhz67v6.js → elk-276RUBZZ-vddwbn6q.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-gkyr5cqs.js → erDiagram-OPXOYQCR-qdqcx4g4.js} +6 -6
  38. package/dist/client/static/js/{erlang-6vrvh2m6.js → erlang-811btv6p.js} +1 -1
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-65ph4s3m.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-nh2tb65b.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-1qpme6ks.js → ganttDiagram-FUAMR5RP-763hk9rm.js} +1 -1
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-t45ekjb6.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-wbg3kqak.js → gitGraphDiagram-X574FWY7-bgx1q5nw.js} +4 -4
  44. package/dist/client/static/js/graphql-027z8sc0.js +1 -0
  45. package/dist/client/static/js/html-fqda6wxx.js +1 -0
  46. package/dist/client/static/js/{index-ks23y2cd.js → index-03j5j1j0.js} +2 -2
  47. package/dist/client/static/js/{index-czedkbmb.js → index-05hx4ftf.js} +2 -2
  48. package/dist/client/static/js/index-0vk6v4y4.js +2 -0
  49. package/dist/client/static/js/{index-83pwa9c0.js → index-1nwwvv29.js} +1 -1
  50. package/dist/client/static/js/{index-31hntzse.js → index-228yzebd.js} +5 -5
  51. package/dist/client/static/js/{index-xf36nmbm.js → index-2b1wnvez.js} +2 -2
  52. package/dist/client/static/js/{index-6t21c6jt.js → index-34ff2vq6.js} +2 -2
  53. package/dist/client/static/js/{index-1923aj4g.js → index-3d21hpk7.js} +2 -2
  54. package/dist/client/static/js/{index-hfsvwfgw.js → index-3h2mr90j.js} +2 -2
  55. package/dist/client/static/js/{index-svmzgtcx.js → index-3sqndc9n.js} +2 -2
  56. package/dist/client/static/js/{index-6gyk52ff.js → index-47wn2gjx.js} +1 -1
  57. package/dist/client/static/js/{index-6ah5sj5y.js → index-4b5b6g0k.js} +1 -1
  58. package/dist/client/static/js/{index-53ysgsd2.js → index-5b2vsbcf.js} +1 -1
  59. package/dist/client/static/js/{index-qm92sf9w.js → index-5mrqfs82.js} +12 -12
  60. package/dist/client/static/js/{index-62ng8tkj.js → index-61j9qkck.js} +3 -3
  61. package/dist/client/static/js/index-6bm4pw90.css +1 -0
  62. package/dist/client/static/js/{index-fj4k07zt.js → index-6sqmhdyv.js} +2 -2
  63. package/dist/client/static/js/{index-gtkhz0hj.js → index-8dtp7mt0.js} +2 -2
  64. package/dist/client/static/js/index-a11ptyzf.js +1 -0
  65. package/dist/client/static/js/{index-nvevymac.js → index-acphtw1r.js} +2 -2
  66. package/dist/client/static/js/{index-pxm44qfd.js → index-cj39b26c.js} +1 -1
  67. package/dist/client/static/js/{index-wytdbvax.js → index-dgjerk4w.js} +3 -3
  68. package/dist/client/static/js/{index-ad4x44d6.js → index-dn6pqym4.js} +6 -6
  69. package/dist/client/static/js/{index-nr8s5xm9.js → index-ehg2ftnp.js} +2 -2
  70. package/dist/client/static/js/{index-jbkkwa2q.js → index-f51jxezc.js} +2 -2
  71. package/dist/client/static/js/index-f7paep2f.js +2 -0
  72. package/dist/client/static/js/{index-qkjx6521.js → index-f98dhbt4.js} +4 -4
  73. package/dist/client/static/js/{index-92n96mgd.js → index-fbct0jcf.js} +2 -2
  74. package/dist/client/static/js/{index-bjqz7swa.js → index-fqatn0vh.js} +1 -1
  75. package/dist/client/static/js/{index-tzdm1y3z.js → index-gcwmpfr4.js} +2 -2
  76. package/dist/client/static/js/{index-v5npdwy2.js → index-gmq5pbcv.js} +51 -51
  77. package/dist/client/static/js/{index-fbpc1wx6.js → index-gzafyqsr.js} +21 -21
  78. package/dist/client/static/js/{index-4y4hshcx.js → index-gzp4j2h5.js} +2 -2
  79. package/dist/client/static/js/{index-nqjd3hh5.js → index-h0rmkz9n.js} +2 -2
  80. package/dist/client/static/js/{index-8trggh1z.js → index-jpp0zm7t.js} +7 -7
  81. package/dist/client/static/js/{index-qf9x7yet.js → index-kg2sk8cf.js} +1 -1
  82. package/dist/client/static/js/{index-rpzxrr2d.js → index-mrw7qweg.js} +1 -1
  83. package/dist/client/static/js/{index-s8bktzpg.js → index-mwm8aptp.js} +1 -1
  84. package/dist/client/static/js/{index-c3v62nvt.js → index-n1ga63de.js} +2 -2
  85. package/dist/client/static/js/{index-22whvfdw.js → index-nzhwd6t3.js} +2 -2
  86. package/dist/client/static/js/{index-tr2pkfs6.js → index-p21mvqc2.js} +2 -2
  87. package/dist/client/static/js/{index-qsw5edtk.js → index-pfj3sd1n.js} +5 -5
  88. package/dist/client/static/js/{index-pysqpc5n.js → index-pxq4v81r.js} +2 -2
  89. package/dist/client/static/js/{index-07yh7qx0.js → index-q76jfb54.js} +1 -1
  90. package/dist/client/static/js/{index-6s4mrdew.js → index-qt9jc4ck.js} +2 -2
  91. package/dist/client/static/js/{index-ehacfgwm.js → index-r6e44vkx.js} +1 -1
  92. package/dist/client/static/js/{index-232nsp2c.js → index-szk3vk8h.js} +1 -1
  93. package/dist/client/static/js/{index-e6rm5xzj.js → index-t0yv1375.js} +1 -1
  94. package/dist/client/static/js/{index-n0matkz9.js → index-vgcm2g0g.js} +2 -2
  95. package/dist/client/static/js/{index-kwpaz891.js → index-vkerrwpa.js} +2 -2
  96. package/dist/client/static/js/{index-v7bcgh77.js → index-w57zbym7.js} +2 -2
  97. package/dist/client/static/js/{index-yfjvx4yf.js → index-wqrdgt1g.js} +2 -2
  98. package/dist/client/static/js/{index-barbpakv.js → index-x2wvq4ae.js} +2 -2
  99. package/dist/client/static/js/{index-3w845q50.js → index-x7rfmwg8.js} +2 -2
  100. package/dist/client/static/js/{index-cq98p2rb.js → index-xkwybnf3.js} +179 -179
  101. package/dist/client/static/js/info-A6RAGUB7-mw29xbwf.js +1 -0
  102. package/dist/client/static/js/{infoDiagram-VRGFBTTK-yebngg8c.js → infoDiagram-VRGFBTTK-e66pw8d9.js} +1 -1
  103. package/dist/client/static/js/ini-3cx6tmv4.js +1 -0
  104. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-kh4nqj6q.js → ishikawaDiagram-OU5B5YK6-ehc0q24d.js} +1 -1
  105. package/dist/client/static/js/java-zs6qh1dm.js +1 -0
  106. package/dist/client/static/js/javascript-b9mkygak.js +1 -0
  107. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-4khnf8x1.js → journeyDiagram-ZHPQQLJL-hye05qtd.js} +2 -2
  108. package/dist/client/static/js/jsx-gahhfczw.js +1 -0
  109. package/dist/client/static/js/{julia-svwxx41e.js → julia-mgsev9df.js} +1 -1
  110. package/dist/client/static/js/{kanban-definition-PNTS6WVX-snmq3wq4.js → kanban-definition-PNTS6WVX-vce614m8.js} +6 -6
  111. package/dist/client/static/js/lua-d8enp14s.js +1 -0
  112. package/dist/client/static/js/markdown-qetaj4vp.js +1 -0
  113. package/dist/client/static/js/{mermaid.core-yctw30sk.js → mermaid.core-gc79re5p.js} +7 -7
  114. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-atfv66wq.js → mindmap-definition-NLK3R4M7-ft1whaf5.js} +3 -3
  115. package/dist/client/static/js/one-dark-pro-rvg5xm1a.js +1 -0
  116. package/dist/client/static/js/one-light-2b5w3ksh.js +1 -0
  117. package/dist/client/static/js/packet-AYTQ26CC-md85wpjq.js +1 -0
  118. package/dist/client/static/js/{pegDiagram-GJSIUBJH-hpbtxjht.js → pegDiagram-GJSIUBJH-2s4ykhaa.js} +1 -1
  119. package/dist/client/static/js/{perl-mr0ds2ex.js → perl-6n93vjsa.js} +1 -1
  120. package/dist/client/static/js/{php-5h3wt6tv.js → php-w23nmbtc.js} +1 -1
  121. package/dist/client/static/js/pie-WAS4IAKB-4grcqnp8.js +1 -0
  122. package/dist/client/static/js/{pieDiagram-5QR66LMP-9zrtkdr2.js → pieDiagram-5QR66LMP-7h8dp0z3.js} +2 -2
  123. package/dist/client/static/js/properties-g6tpq003.js +1 -0
  124. package/dist/client/static/js/python-cy06fzhg.js +1 -0
  125. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-xq970vx1.js → quadrantDiagram-O4NWA36T-pteyxjxr.js} +2 -2
  126. package/dist/client/static/js/r-vw8berfv.js +1 -0
  127. package/dist/client/static/js/radar-RG4KPBEZ-7j9prhg1.js +1 -0
  128. package/dist/client/static/js/railroad-74A4TZTK-g8x2jps1.js +1 -0
  129. package/dist/client/static/js/railroad-abnf-HS5TGJTU-cbg7k68h.js +1 -0
  130. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-xfvjk9f8.js +1 -0
  131. package/dist/client/static/js/railroad-peg-WCYAUIDC-7w97805z.js +1 -0
  132. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-1g9jchbk.js → railroadDiagram-XR7U4H2S-68z9wdt0.js} +1 -1
  133. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-ntt088y4.js → requirementDiagram-PLB6GJNP-c08nmey6.js} +3 -3
  134. package/dist/client/static/js/{ruby-nn836rtq.js → ruby-ag3b3t9t.js} +1 -1
  135. package/dist/client/static/js/{rust-eygk56y5.js → rust-ke5ec0w5.js} +1 -1
  136. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-95k8c5v6.js → sankeyDiagram-IPEJSGJF-2r3kvjs5.js} +3 -3
  137. package/dist/client/static/js/{sass-c2bk03e4.js → sass-x0eez0kp.js} +1 -1
  138. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-qfvxrwfa.js → sequenceDiagram-PO4LG4MO-ctjycd88.js} +6 -6
  139. package/dist/client/static/js/{sizeCapture-INFHLROL-0m7dc5nd.js → sizeCapture-INFHLROL-97ndea95.js} +1 -1
  140. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-femwcn7n.js → stateDiagram-v2-GCMORJYK-aqnmsb96.js} +3 -3
  141. package/dist/client/static/js/{svelte-bfy1rq5g.js → svelte-tg19by0f.js} +1 -1
  142. package/dist/client/static/js/{swimlanes-2SLR337P-5n1qq48r.js → swimlanes-2SLR337P-v50cx1nx.js} +1 -1
  143. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-e227mz39.js +8 -0
  144. package/dist/client/static/js/{timeline-definition-EJHVYXUP-vdsj18be.js → timeline-definition-EJHVYXUP-1ggrtdcj.js} +4 -4
  145. package/dist/client/static/js/treeView-Q6P3EWNA-xhf1r6c3.js +1 -0
  146. package/dist/client/static/js/treemap-WGGIJYW6-4n3j7ekq.js +1 -0
  147. package/dist/client/static/js/tsx-3dzv8h6k.js +1 -0
  148. package/dist/client/static/js/typescript-44vs0wn4.js +1 -0
  149. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-psjbrprk.js → usecaseDiagram-POWQR4AR-ybcwhpzs.js} +19 -19
  150. package/dist/client/static/js/{vennDiagram-UO4OBE2U-4yn9kac9.js → vennDiagram-UO4OBE2U-p9ggrt07.js} +4 -4
  151. package/dist/client/static/js/{vue-0fwtgwj4.js → vue-mhj4sme0.js} +1 -1
  152. package/dist/client/static/js/wardley-WFR3VGLG-fb0py35r.js +1 -0
  153. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-js0tbpca.js → wardleyDiagram-VNRHLVJA-v79nb9kx.js} +2 -2
  154. package/dist/client/static/js/xml-yvv5fn3k.js +1 -0
  155. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-svr38ygh.js → xychartDiagram-PMCCYNJV-43thqscz.js} +2 -2
  156. package/dist/client/static/js/yaml-avewh7n5.js +1 -0
  157. package/marketplace/marketplace.json +7 -0
  158. package/marketplace/plugins/github-actions/README.md +142 -0
  159. package/marketplace/plugins/github-actions/icon.svg +12 -0
  160. package/marketplace/plugins/github-actions/package.json +30 -0
  161. package/marketplace/plugins/github-actions/settings-schema.json +27 -0
  162. package/marketplace/plugins/github-actions/src/app.tsx +32 -0
  163. package/marketplace/plugins/github-actions/src/panel/Actions.tsx +105 -0
  164. package/marketplace/plugins/github-actions/src/panel/LogView.tsx +76 -0
  165. package/marketplace/plugins/github-actions/src/panel/Row.tsx +59 -0
  166. package/marketplace/plugins/github-actions/src/panel/RunView.tsx +197 -0
  167. package/marketplace/plugins/github-actions/src/panel/format.ts +74 -0
  168. package/marketplace/plugins/github-actions/src/panel/index.test.tsx +86 -0
  169. package/marketplace/plugins/github-actions/src/panel/index.tsx +256 -0
  170. package/marketplace/plugins/github-actions/src/panel/picker.test.tsx +68 -0
  171. package/marketplace/plugins/github-actions/src/panel/test-fixtures.ts +98 -0
  172. package/marketplace/plugins/github-actions/src/panel/test-harness.tsx +175 -0
  173. package/marketplace/plugins/github-actions/src/protocol.ts +156 -0
  174. package/marketplace/plugins/github-actions/src/server/github.test.ts +264 -0
  175. package/marketplace/plugins/github-actions/src/server/github.ts +309 -0
  176. package/marketplace/plugins/github-actions/src/server/http.test.ts +150 -0
  177. package/marketplace/plugins/github-actions/src/server/http.ts +202 -0
  178. package/marketplace/plugins/github-actions/src/server/json.ts +44 -0
  179. package/marketplace/plugins/github-actions/src/server/logtext.test.ts +84 -0
  180. package/marketplace/plugins/github-actions/src/server/logtext.ts +59 -0
  181. package/marketplace/plugins/github-actions/src/server/progress.test.ts +96 -0
  182. package/marketplace/plugins/github-actions/src/server/progress.ts +62 -0
  183. package/marketplace/plugins/github-actions/src/server/remote.ts +84 -0
  184. package/marketplace/plugins/github-actions/src/server/scope.ts +51 -0
  185. package/marketplace/plugins/github-actions/src/server/token.ts +84 -0
  186. package/marketplace/plugins/github-actions/src/server.ts +163 -0
  187. package/marketplace/plugins/github-actions/src/state.test.ts +55 -0
  188. package/marketplace/plugins/github-actions/src/state.ts +63 -0
  189. package/marketplace/plugins/github-actions/tsconfig.json +16 -0
  190. package/package.json +1 -1
  191. package/src/client/components/mobile/RightSidebar.tsx +164 -66
  192. package/src/client/components/mobile/header-titlebar.test.tsx +92 -0
  193. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +179 -0
  194. package/src/client/components/mobile/panel-chips.test.tsx +12 -0
  195. package/src/client/components/mobile/panel-chips.tsx +5 -1
  196. package/src/client/components/mobile/right-drawer-nav.test.tsx +258 -0
  197. package/src/client/components/settings/apply-side-effects.ts +6 -0
  198. package/src/client/components/settings/categories/appearance-settings/PanelNavSection.tsx +123 -2
  199. package/src/client/components/workspace/panel-tabs/Home.tsx +14 -2
  200. package/src/client/components/workspace/panel-tabs/TabChip.tsx +173 -0
  201. package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +118 -0
  202. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +89 -102
  203. package/src/client/components/workspace/panel-tabs/index.tsx +9 -1
  204. package/src/client/hooks/workspace/mobile-right-panel-nav.ts +63 -0
  205. package/src/client/hooks/workspace/panel-nav.test.ts +39 -1
  206. package/src/client/lib/ui/control-plate.ts +33 -0
  207. package/src/server/lib/bundler/titlebar-css.test.ts +5 -3
  208. package/src/shared/lib/settings/defaults.ts +2 -1
  209. package/src/shared/lib/workspace/panel-nav.test.ts +36 -0
  210. package/src/shared/lib/workspace/panel-nav.ts +43 -0
  211. package/src/shared/types/settings/state.ts +9 -1
  212. package/dist/client/static/js/LayoutWrapper-vw54s8ra.js +0 -2
  213. package/dist/client/static/js/architecture-7GRP2DOG-mq93vqx9.js +0 -1
  214. package/dist/client/static/js/bash-fjzhxy10.js +0 -1
  215. package/dist/client/static/js/cpp-9f6zkdd4.js +0 -1
  216. package/dist/client/static/js/css-y4y3qtsb.js +0 -1
  217. package/dist/client/static/js/cynefin-OW5HDTMX-qyg5rjr5.js +0 -1
  218. package/dist/client/static/js/eventmodeling-NTZA5JFV-15yz245z.js +0 -1
  219. package/dist/client/static/js/flowDiagram-KWPJA3E3-n1sapfye.js +0 -1
  220. package/dist/client/static/js/gitGraph-4MIJSDKK-xtjwv160.js +0 -1
  221. package/dist/client/static/js/graphql-amk52c95.js +0 -1
  222. package/dist/client/static/js/html-2y935m7r.js +0 -1
  223. package/dist/client/static/js/index-19ffgf9a.js +0 -2
  224. package/dist/client/static/js/index-204ae4vs.js +0 -2
  225. package/dist/client/static/js/index-n6fbd265.js +0 -1
  226. package/dist/client/static/js/index-sc7r305t.css +0 -1
  227. package/dist/client/static/js/info-A6RAGUB7-e31s2xvj.js +0 -1
  228. package/dist/client/static/js/ini-kemnmt16.js +0 -1
  229. package/dist/client/static/js/java-caqpfm88.js +0 -1
  230. package/dist/client/static/js/javascript-zegm06a1.js +0 -1
  231. package/dist/client/static/js/jsx-bvterpm5.js +0 -1
  232. package/dist/client/static/js/lua-1hcfm8ya.js +0 -1
  233. package/dist/client/static/js/markdown-n6na4ykv.js +0 -1
  234. package/dist/client/static/js/one-dark-pro-c1vnxka7.js +0 -1
  235. package/dist/client/static/js/one-light-mbxx52p5.js +0 -1
  236. package/dist/client/static/js/packet-AYTQ26CC-mtzmsrk4.js +0 -1
  237. package/dist/client/static/js/pie-WAS4IAKB-85nwadmj.js +0 -1
  238. package/dist/client/static/js/properties-nxcks67c.js +0 -1
  239. package/dist/client/static/js/python-58p0gqn0.js +0 -1
  240. package/dist/client/static/js/r-eyn8en0g.js +0 -1
  241. package/dist/client/static/js/radar-RG4KPBEZ-ae3jdajx.js +0 -1
  242. package/dist/client/static/js/railroad-74A4TZTK-3m0s7cse.js +0 -1
  243. package/dist/client/static/js/railroad-abnf-HS5TGJTU-pz22c3eb.js +0 -1
  244. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-cgqgqq15.js +0 -1
  245. package/dist/client/static/js/railroad-peg-WCYAUIDC-ts0nmcxb.js +0 -1
  246. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-n85hawg8.js +0 -8
  247. package/dist/client/static/js/treeView-Q6P3EWNA-fvpt3hm8.js +0 -1
  248. package/dist/client/static/js/treemap-WGGIJYW6-4z9s24je.js +0 -1
  249. package/dist/client/static/js/tsx-fnzxsv25.js +0 -1
  250. package/dist/client/static/js/typescript-0ppbqrb6.js +0 -1
  251. package/dist/client/static/js/wardley-WFR3VGLG-73mrhkmy.js +0 -1
  252. package/dist/client/static/js/xml-v1ytr8qz.js +0 -1
  253. package/dist/client/static/js/yaml-txrqz62t.js +0 -1
@@ -1,7 +1,7 @@
1
- import{Ot}from"./index-cq98p2rb.js";import{fn,Tn}from"./index-tzdm1y3z.js";var ep=Tn(function(ha,ca){(function(r,e){typeof ha=="object"&&typeof ca<"u"?ca.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ha,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",m="year",x="date",b="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(nt){var D=["th","st","nd","rd"],U=nt%100;return"["+nt+(D[(U-20)%10]||D[U]||D[0])+"]"}},_=function(nt,D,U){var it=String(nt);return!it||it.length>=D?nt:""+Array(D+1-it.length).join(U)+nt},v={s:_,z:function(nt){var D=-nt.utcOffset(),U=Math.abs(D),it=Math.floor(U/60),P=U%60;return(D<=0?"+":"-")+_(it,2,"0")+":"+_(P,2,"0")},m:function nt(D,U){if(D.date()<U.date())return-nt(U,D);var it=12*(U.year()-D.year())+(U.month()-D.month()),P=D.clone().add(it,f),ht=U-P<0,lt=D.clone().add(it+(ht?-1:1),f);return+(-(it+(U-P)/(ht?P-lt:lt-P))||0)},a:function(nt){return nt<0?Math.ceil(nt)||0:Math.floor(nt)},p:function(nt){return{M:f,y:m,w:d,d:n,D:x,h:c,m:a,s:o,ms:s,Q:u}[nt]||String(nt||"").toLowerCase().replace(/s$/,"")},u:function(nt){return nt===void 0}},F="en",I={};I[F]=B;var O="$isDayjsObject",K=function(nt){return nt instanceof ut||!(!nt||!nt[O])},Z=function nt(D,U,it){var P;if(!D)return F;if(typeof D=="string"){var ht=D.toLowerCase();I[ht]&&(P=ht),U&&(I[ht]=U,P=ht);var lt=D.split("-");if(!P&&lt.length>1)return nt(lt[0])}else{var Bt=D.name;I[Bt]=D,P=Bt}return!it&&P&&(F=P),P||!it&&F},rt=function(nt,D){if(K(nt))return nt.clone();var U=typeof D=="object"?D:{};return U.date=nt,U.args=arguments,new ut(U)},st=v;st.l=Z,st.i=K,st.w=function(nt,D){return rt(nt,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var ut=function(){function nt(U){this.$L=Z(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[O]=!0}var D=nt.prototype;return D.parse=function(U){this.$d=function(it){var{date:P,utc:ht}=it;if(P===null)return new Date(NaN);if(st.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var lt=P.match(S);if(lt){var Bt=lt[2]-1||0,vt=(lt[7]||"0").substring(0,3);return ht?new Date(Date.UTC(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,vt)):new Date(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,vt)}}return new Date(P)}(U),this.init()},D.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},D.$utils=function(){return st},D.isValid=function(){return this.$d.toString()!==b},D.isSame=function(U,it){var P=rt(U);return this.startOf(it)<=P&&P<=this.endOf(it)},D.isAfter=function(U,it){return rt(U)<this.startOf(it)},D.isBefore=function(U,it){return this.endOf(it)<rt(U)},D.$g=function(U,it,P){return st.u(U)?this[it]:this.set(P,U)},D.unix=function(){return Math.floor(this.valueOf()/1000)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(U,it){var P=this,ht=!!st.u(it)||it,lt=st.p(U),Bt=function(Nt,Kt){var Yt=st.w(P.$u?Date.UTC(P.$y,Kt,Nt):new Date(P.$y,Kt,Nt),P);return ht?Yt:Yt.endOf(n)},vt=function(Nt,Kt){return st.w(P.toDate()[Nt].apply(P.toDate("s"),(ht?[0,0,0,0]:[23,59,59,999]).slice(Kt)),P)},Xt=this.$W,Vt=this.$M,Qt=this.$D,Jt="set"+(this.$u?"UTC":"");switch(lt){case m:return ht?Bt(1,0):Bt(31,11);case f:return ht?Bt(1,Vt):Bt(0,Vt+1);case d:var Dt=this.$locale().weekStart||0,At=(Xt<Dt?Xt+7:Xt)-Dt;return Bt(ht?Qt-At:Qt+(6-At),Vt);case n:case x:return vt(Jt+"Hours",0);case c:return vt(Jt+"Minutes",1);case a:return vt(Jt+"Seconds",2);case o:return vt(Jt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(U){return this.startOf(U,!1)},D.$set=function(U,it){var P,ht=st.p(U),lt="set"+(this.$u?"UTC":""),Bt=(P={},P[n]=lt+"Date",P[x]=lt+"Date",P[f]=lt+"Month",P[m]=lt+"FullYear",P[c]=lt+"Hours",P[a]=lt+"Minutes",P[o]=lt+"Seconds",P[s]=lt+"Milliseconds",P)[ht],vt=ht===n?this.$D+(it-this.$W):it;if(ht===f||ht===m){var Xt=this.clone().set(x,1);Xt.$d[Bt](vt),Xt.init(),this.$d=Xt.set(x,Math.min(this.$D,Xt.daysInMonth())).$d}else Bt&&this.$d[Bt](vt);return this.init(),this},D.set=function(U,it){return this.clone().$set(U,it)},D.get=function(U){return this[st.p(U)]()},D.add=function(U,it){var P,ht=this;U=Number(U);var lt=st.p(it),Bt=function(Vt){var Qt=rt(ht);return st.w(Qt.date(Qt.date()+Math.round(Vt*U)),ht)};if(lt===f)return this.set(f,this.$M+U);if(lt===m)return this.set(m,this.$y+U);if(lt===n)return Bt(1);if(lt===d)return Bt(7);var vt=(P={},P[a]=e,P[c]=i,P[o]=r,P)[lt]||1,Xt=this.$d.getTime()+U*vt;return st.w(Xt,this)},D.subtract=function(U,it){return this.add(-1*U,it)},D.format=function(U){var it=this,P=this.$locale();if(!this.isValid())return P.invalidDate||b;var ht=U||"YYYY-MM-DDTHH:mm:ssZ",lt=st.z(this),Bt=this.$H,vt=this.$m,Xt=this.$M,{weekdays:Vt,months:Qt,meridiem:Jt}=P,Dt=function(Kt,Yt,le,ne){return Kt&&(Kt[Yt]||Kt(it,ht))||le[Yt].slice(0,ne)},At=function(Kt){return st.s(Bt%12||12,Kt,"0")},Nt=Jt||function(Kt,Yt,le){var ne=Kt<12?"AM":"PM";return le?ne.toLowerCase():ne};return ht.replace(T,function(Kt,Yt){return Yt||function(le){switch(le){case"YY":return String(it.$y).slice(-2);case"YYYY":return st.s(it.$y,4,"0");case"M":return Xt+1;case"MM":return st.s(Xt+1,2,"0");case"MMM":return Dt(P.monthsShort,Xt,Qt,3);case"MMMM":return Dt(Qt,Xt);case"D":return it.$D;case"DD":return st.s(it.$D,2,"0");case"d":return String(it.$W);case"dd":return Dt(P.weekdaysMin,it.$W,Vt,2);case"ddd":return Dt(P.weekdaysShort,it.$W,Vt,3);case"dddd":return Vt[it.$W];case"H":return String(Bt);case"HH":return st.s(Bt,2,"0");case"h":return At(1);case"hh":return At(2);case"a":return Nt(Bt,vt,!0);case"A":return Nt(Bt,vt,!1);case"m":return String(vt);case"mm":return st.s(vt,2,"0");case"s":return String(it.$s);case"ss":return st.s(it.$s,2,"0");case"SSS":return st.s(it.$ms,3,"0");case"Z":return lt}return null}(Kt)||lt.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(U,it,P){var ht,lt=this,Bt=st.p(it),vt=rt(U),Xt=(vt.utcOffset()-this.utcOffset())*e,Vt=this-vt,Qt=function(){return st.m(lt,vt)};switch(Bt){case m:ht=Qt()/12;break;case f:ht=Qt();break;case u:ht=Qt()/3;break;case d:ht=(Vt-Xt)/604800000;break;case n:ht=(Vt-Xt)/86400000;break;case c:ht=Vt/i;break;case a:ht=Vt/e;break;case o:ht=Vt/r;break;default:ht=Vt}return P?ht:st.a(ht)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return I[this.$L]},D.locale=function(U,it){if(!U)return this.$L;var P=this.clone(),ht=Z(U,it,!0);return ht&&(P.$L=ht),P},D.clone=function(){return st.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},nt}(),ct=ut.prototype;return rt.prototype=ct,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",m],["$D",x]].forEach(function(nt){ct[nt[1]]=function(D){return this.$g(D,nt[0],nt[1])}}),rt.extend=function(nt,D){return nt.$i||(nt(D,ut,rt),nt.$i=!0),rt},rt.locale=Z,rt.isDayjs=K,rt.unix=function(nt){return rt(1000*nt)},rt.en=I[F],rt.Ls=I,rt.p={},rt})});var Vd=Tn(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.BLANK_URL=Xd.relativeFirstCharacters=Xd.whitespaceEscapeCharsRegex=Xd.urlSchemeRegex=Xd.ctrlCharactersRegex=Xd.htmlCtrlEntityRegex=Xd.htmlEntitiesRegex=Xd.invalidProtocolRegex=void 0;Xd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xd.urlSchemeRegex=/^.+(:|&colon;)/gim;Xd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xd.relativeFirstCharacters=[".","/"];Xd.BLANK_URL="about:blank"});var Ps=Tn(function(Zd){Object.defineProperty(Zd,"__esModule",{value:!0});Zd.sanitizeUrl=Eb;var _e=Vd();function Fb(r){return _e.relativeFirstCharacters.indexOf(r[0])>-1}function Mb(r){var e=r.replace(_e.ctrlCharactersRegex,"");return e.replace(_e.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function Ab(r){return URL.canParse(r)}function Kd(r){try{return decodeURIComponent(r)}catch(e){return r}}function Eb(r){if(!r)return _e.BLANK_URL;var e,i=Kd(r.trim());do i=Mb(i).replace(_e.htmlCtrlEntityRegex,"").replace(_e.ctrlCharactersRegex,"").replace(_e.whitespaceEscapeCharsRegex,"").trim(),i=Kd(i),e=i.match(_e.ctrlCharactersRegex)||i.match(_e.htmlEntitiesRegex)||i.match(_e.htmlCtrlEntityRegex)||i.match(_e.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return _e.BLANK_URL;if(Fb(s))return s;var o=s.trimStart(),a=o.match(_e.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(_e.invalidProtocolRegex.test(c))return _e.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!Ab(n))return _e.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),co=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var Sc=fn(ep(),1),rr={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")},Su=t(function(r="fatal"){let e=rr.fatal;if(typeof r==="string"){if(r.toLowerCase()in rr)e=rr[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=rr.fatal)l.fatal=console.error?console.error.bind(console,Ie("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ie("FATAL"));if(e<=rr.error)l.error=console.error?console.error.bind(console,Ie("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ie("ERROR"));if(e<=rr.warn)l.warn=console.warn?console.warn.bind(console,Ie("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ie("WARN"));if(e<=rr.info)l.info=console.info?console.info.bind(console,Ie("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ie("INFO"));if(e<=rr.debug)l.debug=console.debug?console.debug.bind(console,Ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("DEBUG"));if(e<=rr.trace)l.trace=console.debug?console.debug.bind(console,Ie("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("TRACE"))},"setLogLevel"),Ie=t((r)=>`%c${Sc.default().format("ss.SSS")} : ${r} : `,"format");var Do={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 Do.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Do.hue2rgb(a,o,r)*255;case"b":return Do.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),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*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}}},Tc=Do;var Ey={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},Bc=Ey;var $y={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},_c=$y;var Iy={channel:Tc,lang:Bc,unit:_c},Wt=Iy;var ir={};for(let r=0;r<=255;r++)ir[r]=Wt.unit.dec2hex(r);var me={ALL:0,RGB:1,HSL:2};class vc{constructor(){this.type=me.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=me.ALL}is(r){return this.type===r}}var Lc=vc;class Fc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Lc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=me.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Wt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Wt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Wt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Wt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Wt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Wt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Wt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Wt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Wt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Wt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Wt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Wt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(me.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(me.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(me.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(me.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(me.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(me.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Mc=Fc;var Oy=new Mc({r:0,g:0,b:0,a:0},"transparent"),pr=Oy;var Ac={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Ac.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return pr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}${ir[Math.round(o*255)]}`;else return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}`}},wr=Ac;var Po={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(Po.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Wt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Wt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Wt.channel.clamp.h(parseFloat(i)*360)}}return Wt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Po.re);if(!i)return;let[,s,o,a,c,n]=i;return pr.set({h:Po._hue2deg(s),s:Wt.channel.clamp.s(parseFloat(o)),l:Wt.channel.clamp.l(parseFloat(a)),a:c?Wt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Wt.lang.round(e)}, ${Wt.lang.round(i)}%, ${Wt.lang.round(s)}%, ${o})`;else return`hsl(${Wt.lang.round(e)}, ${Wt.lang.round(i)}%, ${Wt.lang.round(s)}%)`}},Bi=Po;var Ro={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=Ro.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in Ro.colors)if(Ro.colors[i]===e)return i;return}},ya=Ro;var Ec={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(Ec.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return pr.set({r:Wt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Wt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Wt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Wt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Wt.lang.round(e)}, ${Wt.lang.round(i)}, ${Wt.lang.round(s)}, ${Wt.lang.round(o)})`;else return`rgb(${Wt.lang.round(e)}, ${Wt.lang.round(i)}, ${Wt.lang.round(s)})`}},_i=Ec;var Dy={format:{keyword:ya,hex:wr,rgb:_i,rgba:_i,hsl:Bi,hsla:Bi},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||_i.parse(r)||Bi.parse(r)||ya.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(me.HSL)||r.data.r===void 0)return Bi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return _i.stringify(r);else return wr.stringify(r)}},ye=Dy;var Py=(r,e)=>{let i=ye.parse(r);for(let s in e)i[s]=Wt.channel.clamp[s](e[s]);return ye.stringify(i)},qo=Py;var Ry=(r,e,i=0,s=1)=>{if(typeof r!=="number")return qo(r,{a:e});let o=pr.set({r:Wt.channel.clamp.r(r),g:Wt.channel.clamp.g(e),b:Wt.channel.clamp.b(i),a:Wt.channel.clamp.a(s)});return ye.stringify(o)},pt=Ry;var qy=(r,e)=>Wt.lang.round(ye.parse(r)[e]),ua=qy;var Wy=(r)=>{let{r:e,g:i,b:s}=ye.parse(r),o=0.2126*Wt.channel.toLinear(e)+0.7152*Wt.channel.toLinear(i)+0.0722*Wt.channel.toLinear(s);return Wt.lang.round(o)},$c=Wy;var Ny=(r)=>$c(r)>=0.5,Ic=Ny;var zy=(r)=>!Ic(r),Be=zy;var Hy=(r,e,i)=>{let s=ye.parse(r),o=s[e],a=Wt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return ye.stringify(s)},Ol=Hy;var Yy=(r,e)=>Ol(r,"l",e),g=Yy;var jy=(r,e)=>Ol(r,"l",-e),A=jy;var Uy=(r,e)=>{let i=ye.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return qo(r,s)},L=Uy;var Xy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=ye.parse(r),{r:n,g:d,b:f,a:u}=ye.parse(e),m=i/100,x=m*2-1,b=c-u,T=((x*b===-1?x:(x+b)/(1+x*b))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,F=a*T+f*B,I=c*m+u*(1-m);return pt(_,v,F,I)},Oc=Xy;var Gy=(r,e=100)=>{let i=ye.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Oc(i,r,e)},J=Gy;var Lf=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Hr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vy=/\s/,Ky=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 c=o;while(c>i&&Vy.test(r[c-1]))c--;e+=r.slice(i,c)+`
3
- `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Mf=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Qi={},$l=t(function(r,e){r=Ky(r.replace(Lf,"").replace(Hr,""));for(let[i,{detector:s}]of Object.entries(Qi))if(s(r,e))return i;throw new Mf(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),tp=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)Wc(e,i,s)},"registerLazyLoadedDiagrams"),Wc=t((r,e,i)=>{if(Qi[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Qi[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),Og=t((r)=>Qi[r].loader,"getDiagramLoader"),xa=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>xa(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,c])=>{if(typeof c==="object"){if(c===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(c)?[]:{};if(typeof o[a]==="object")o[a]=xa(o[a],c,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=c;else Object.defineProperty(r,a,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),Ve=xa,Ye="#ffffff",je="#f2f2f2",Zt=t((r,e)=>e?L(r,{s:-40,l:10}):L(r,{s:-40,l:-10}),"mkBorder"),Zy=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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je,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}},Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=pt(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=pt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=pt(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=J(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=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=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Zt(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=pt(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||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(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||Be(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(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},Gt=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),rx=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=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},ix=t((r)=>{let e=new rx;return e.calculate(r),e},"getThemeVariables"),ox=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=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},sx=t((r)=>{let e=new ox;return e.calculate(r),e},"getThemeVariables"),ax=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=Zt(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Be(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},nx=t((r)=>{let e=new ax;return e.calculate(r),e},"getThemeVariables"),lx=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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 hx=t((r)=>{let e=new lx;return e.calculate(r),e},"getThemeVariables"),cx=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=Zt("#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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Be(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},ux=t((r)=>{let e=new cx;return e.calculate(r),e},"getThemeVariables"),dx=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},fx=t((r)=>{let e=new dx;return e.calculate(r),e},"getThemeVariables"),px=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=Zt("#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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Be(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},gx=t((r)=>{let e=new px;return e.calculate(r),e},"getThemeVariables"),mx=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Be(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},yx=t((r)=>{let e=new mx;return e.calculate(r),e},"getThemeVariables"),uo={base:{getThemeVariables:Qy},dark:{getThemeVariables:tx},default:{getThemeVariables:Gt},forest:{getThemeVariables:ix},neutral:{getThemeVariables:sx},neo:{getThemeVariables:nx},"neo-dark":{getThemeVariables:hx},redux:{getThemeVariables:ux},"redux-dark":{getThemeVariables:fx},"redux-color":{getThemeVariables:gx},"redux-dark-color":{getThemeVariables:yx}},ge={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},Nc={...ge,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:uo.default.getThemeVariables(),sequence:{...ge.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:ge.class?.theme,look:ge.class?.look,layout:ge.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ge.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ge.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:{...ge.pie,useWidth:984},xyChart:{...ge.xyChart,useWidth:void 0},requirement:{...ge.requirement,useWidth:void 0},packet:{...ge.packet},eventmodeling:{...ge.eventmodeling},treeView:{...ge.treeView,useWidth:void 0},radar:{...ge.radar},usecase:{...ge.usecase},railroad:{...ge.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:{...ge.ishikawa},sankey:{...ge.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:{...ge.venn},cynefin:{...ge.cynefin}},zc=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,...zc(r[s],"")];return[...i,e+s]},[]),"keyify"),xx=new Set(zc(Nc,"")),Y=Nc,Cx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},bx=t((r)=>Cx[r]??r,"getDiagramConfigKey"),kx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},wx=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"),Ei=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Ei(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=kx[e];if(s)wx(r[e],s);else l.debug("sanitizing object",e),Ei(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]=Pf(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"),Pf=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"),Vo=Object.freeze(Y),Sx=["theme","look","layout"],Tx=new Set(["classic","handDrawn","neo"]),Bx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(uo,e);return r!=="look"||Tx.has(e)},"isUsableAppearance"),_x=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Bx(i,o))},"readAppearance"),Or=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),ve=Ve({},Vo),zo,Ho={},or=[],vi=Ve({},Vo),Ai,vx=t((r,e)=>{if(!Ai)return;let i=[e,...[...or].reverse(),Ho,Vo],s=r[Ai];for(let o of Sx)for(let a of i){let c=_x(a,Ai,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),Yr=t((r,e)=>{let i=Ve({},r),s={};for(let a of e)Hc(a),s=Ve(s,a);if(i=Ve(i,s),vx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(uo,i.theme)){let a=Ve({},zo),c=Ve(a.themeVariables||{},s.themeVariables);i.themeVariables=uo[i.theme].getThemeVariables(c)}return vi=i,Fx(vi),vi},"updateCurrentConfig"),np=t((r)=>{Ai=r===void 0?void 0:bx(r),Yr(ve,or)},"setDiagramConfigScope"),$g=t((r)=>{if(ve=Ve({},Vo),ve=Ve(ve,r),Ho=Ve({},r),r.theme&&Object.hasOwn(uo,r.theme))ve.themeVariables=uo[r.theme].getThemeVariables(r.themeVariables);return Yr(ve,or),ve},"setSiteConfig"),zg=t((r)=>{zo=Ve({},r)},"saveConfigFromInitialize"),Ug=t((r)=>(ve=Ve(ve,r),Ho=Ve(Ho,r),Yr(ve,or),ve),"updateSiteConfig"),Of=t(()=>Ve({},ve),"getSiteConfig"),$f=t((r)=>(Yr(vi,[r]),C()),"setConfig"),C=t(()=>Ve({},vi),"getConfig"),Hc=t((r)=>{if(!r)return;["secure",...ve.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")Hc(r[e])})},"sanitize"),Gg=t((r)=>{if(Ei(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};or.push(r),Yr(ve,or)},"addDirective"),Tu=t((r=ve)=>{or=[],Ai=void 0,Yr(r,or)},"reset"),Lx={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."},Dc={},Yc=t((r)=>{if(Dc[r])return;l.warn(Lx[r]),Dc[r]=!0},"issueWarning"),Fx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Yc("LAZY_LOAD_DEPRECATED")},"checkConfig"),jg=t(()=>{let r={};if(zo)r=Ve(r,zo);for(let e of or)r=Ve(r,e);return r},"getUserDefinedConfig"),jt=t((r)=>{if(r.flowchart?.htmlLabels!=null)Yc("FLOWCHART_HTML_LABELS_DEPRECATED");return Or(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Fs=/<\/?br\s*\/?>/gi,Mx=new RegExp(Fs.source,"i"),Ax=t((r)=>{if(!r)return[""];return Xc(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ex=(()=>{let r=!1;return()=>{if(!r)jc(),r=!0}})();function jc(){Ot.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Ot.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(jc,"setupDompurifyHooks");var Uc=t((r)=>(Ex(),Ot.sanitize(r)),"removeScript"),Pc=t((r,e)=>{if(jt(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=Uc(r);else if(i!=="loose")r=Xc(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Dx(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Ot.sanitize(Pc(r,e),e.dompurifyConfig).toString();else r=Ot.sanitize(Pc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),$x=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),Ix=t((r)=>Mx.test(r),"hasBreaks"),Ox=t((r)=>r.split(Fs),"splitBreaks"),Dx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=t((r)=>r.replace(Fs,"#br#"),"breakToPlaceholder"),zf=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"),Px=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Rx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),po=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],c=e[s+1];if(qx(a,c))o=a+","+c,s++,i.pop()}i.push(Wx(o))}return i.join("")},"parseGenericTypes"),Ca=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),qx=t((r,e)=>{let i=Ca(r,"~"),s=Ca(e,"~");return i===1&&s===1},"shouldCombineSets"),Wx=t((r)=>{let e=Ca(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"),Rc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wo=/\$\$(.*?)\$\$/g,It=t((r)=>(r.match(Wo)?.length??0)>0,"hasKatex"),zl=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await Ul(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"),Nx=t(async(r,e)=>{if(!It(r))return r;if(!(Rc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Wo,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Rc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Fs).map((o)=>It(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Wo,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Wo,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),Ul=t(async(r,e)=>ee(await Nx(r,e),e),"renderKatexSanitized"),w={getRows:Ax,sanitizeText:ee,sanitizeTextOrArray:$x,hasBreaks:Ix,splitBreaks:Ox,lineBreakRegex:Fs,removeScript:Uc,getUrl:zf,evaluate:Or,getMax:Px,getMin:Rx},zx=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Hx=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"),te=t(function(r,e,i,s){let o=Hx(e,i,s);zx(r,o)},"configureSvgSize"),$r=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:c}=o;l.info(`SVG bounds: ${a}x${c}`,o);let n=0,d=0;l.info(`Graph bounds: ${n}x${d}`,r),n=a+i*2,d=c+i*2,l.info(`Calculated bounds: ${n}x${d}`),te(e,d,n,s);let f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",f)},"setupGraphViewbox"),No={};function rp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
- `)}t(rp,"cssStyleSheetToString");var Yx=t((r,e,i,s)=>{let o="";if(r in No&&No[r])o=No[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
1
+ import{$t}from"./index-xkwybnf3.js";import{fn,Tn}from"./index-gcwmpfr4.js";var ap=Tn(function(ha,ca){(function(r,e){typeof ha=="object"&&typeof ca<"u"?ca.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ha,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",m="year",x="date",b="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(nt){var D=["th","st","nd","rd"],U=nt%100;return"["+nt+(D[(U-20)%10]||D[U]||D[0])+"]"}},_=function(nt,D,U){var it=String(nt);return!it||it.length>=D?nt:""+Array(D+1-it.length).join(U)+nt},v={s:_,z:function(nt){var D=-nt.utcOffset(),U=Math.abs(D),it=Math.floor(U/60),P=U%60;return(D<=0?"+":"-")+_(it,2,"0")+":"+_(P,2,"0")},m:function nt(D,U){if(D.date()<U.date())return-nt(U,D);var it=12*(U.year()-D.year())+(U.month()-D.month()),P=D.clone().add(it,f),ht=U-P<0,lt=D.clone().add(it+(ht?-1:1),f);return+(-(it+(U-P)/(ht?P-lt:lt-P))||0)},a:function(nt){return nt<0?Math.ceil(nt)||0:Math.floor(nt)},p:function(nt){return{M:f,y:m,w:d,d:n,D:x,h:c,m:a,s:o,ms:s,Q:u}[nt]||String(nt||"").toLowerCase().replace(/s$/,"")},u:function(nt){return nt===void 0}},F="en",I={};I[F]=B;var O="$isDayjsObject",K=function(nt){return nt instanceof ut||!(!nt||!nt[O])},Z=function nt(D,U,it){var P;if(!D)return F;if(typeof D=="string"){var ht=D.toLowerCase();I[ht]&&(P=ht),U&&(I[ht]=U,P=ht);var lt=D.split("-");if(!P&&lt.length>1)return nt(lt[0])}else{var Bt=D.name;I[Bt]=D,P=Bt}return!it&&P&&(F=P),P||!it&&F},rt=function(nt,D){if(K(nt))return nt.clone();var U=typeof D=="object"?D:{};return U.date=nt,U.args=arguments,new ut(U)},st=v;st.l=Z,st.i=K,st.w=function(nt,D){return rt(nt,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var ut=function(){function nt(U){this.$L=Z(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[O]=!0}var D=nt.prototype;return D.parse=function(U){this.$d=function(it){var{date:P,utc:ht}=it;if(P===null)return new Date(NaN);if(st.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var lt=P.match(S);if(lt){var Bt=lt[2]-1||0,At=(lt[7]||"0").substring(0,3);return ht?new Date(Date.UTC(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,At)):new Date(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,At)}}return new Date(P)}(U),this.init()},D.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},D.$utils=function(){return st},D.isValid=function(){return this.$d.toString()!==b},D.isSame=function(U,it){var P=rt(U);return this.startOf(it)<=P&&P<=this.endOf(it)},D.isAfter=function(U,it){return rt(U)<this.startOf(it)},D.isBefore=function(U,it){return this.endOf(it)<rt(U)},D.$g=function(U,it,P){return st.u(U)?this[it]:this.set(P,U)},D.unix=function(){return Math.floor(this.valueOf()/1000)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(U,it){var P=this,ht=!!st.u(it)||it,lt=st.p(U),Bt=function(zt,Kt){var Ut=st.w(P.$u?Date.UTC(P.$y,Kt,zt):new Date(P.$y,Kt,zt),P);return ht?Ut:Ut.endOf(n)},At=function(zt,Kt){return st.w(P.toDate()[zt].apply(P.toDate("s"),(ht?[0,0,0,0]:[23,59,59,999]).slice(Kt)),P)},Gt=this.$W,Vt=this.$M,Qt=this.$D,Jt="set"+(this.$u?"UTC":"");switch(lt){case m:return ht?Bt(1,0):Bt(31,11);case f:return ht?Bt(1,Vt):Bt(0,Vt+1);case d:var Pt=this.$locale().weekStart||0,It=(Gt<Pt?Gt+7:Gt)-Pt;return Bt(ht?Qt-It:Qt+(6-It),Vt);case n:case x:return At(Jt+"Hours",0);case c:return At(Jt+"Minutes",1);case a:return At(Jt+"Seconds",2);case o:return At(Jt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(U){return this.startOf(U,!1)},D.$set=function(U,it){var P,ht=st.p(U),lt="set"+(this.$u?"UTC":""),Bt=(P={},P[n]=lt+"Date",P[x]=lt+"Date",P[f]=lt+"Month",P[m]=lt+"FullYear",P[c]=lt+"Hours",P[a]=lt+"Minutes",P[o]=lt+"Seconds",P[s]=lt+"Milliseconds",P)[ht],At=ht===n?this.$D+(it-this.$W):it;if(ht===f||ht===m){var Gt=this.clone().set(x,1);Gt.$d[Bt](At),Gt.init(),this.$d=Gt.set(x,Math.min(this.$D,Gt.daysInMonth())).$d}else Bt&&this.$d[Bt](At);return this.init(),this},D.set=function(U,it){return this.clone().$set(U,it)},D.get=function(U){return this[st.p(U)]()},D.add=function(U,it){var P,ht=this;U=Number(U);var lt=st.p(it),Bt=function(Vt){var Qt=rt(ht);return st.w(Qt.date(Qt.date()+Math.round(Vt*U)),ht)};if(lt===f)return this.set(f,this.$M+U);if(lt===m)return this.set(m,this.$y+U);if(lt===n)return Bt(1);if(lt===d)return Bt(7);var At=(P={},P[a]=e,P[c]=i,P[o]=r,P)[lt]||1,Gt=this.$d.getTime()+U*At;return st.w(Gt,this)},D.subtract=function(U,it){return this.add(-1*U,it)},D.format=function(U){var it=this,P=this.$locale();if(!this.isValid())return P.invalidDate||b;var ht=U||"YYYY-MM-DDTHH:mm:ssZ",lt=st.z(this),Bt=this.$H,At=this.$m,Gt=this.$M,{weekdays:Vt,months:Qt,meridiem:Jt}=P,Pt=function(Kt,Ut,le,ne){return Kt&&(Kt[Ut]||Kt(it,ht))||le[Ut].slice(0,ne)},It=function(Kt){return st.s(Bt%12||12,Kt,"0")},zt=Jt||function(Kt,Ut,le){var ne=Kt<12?"AM":"PM";return le?ne.toLowerCase():ne};return ht.replace(T,function(Kt,Ut){return Ut||function(le){switch(le){case"YY":return String(it.$y).slice(-2);case"YYYY":return st.s(it.$y,4,"0");case"M":return Gt+1;case"MM":return st.s(Gt+1,2,"0");case"MMM":return Pt(P.monthsShort,Gt,Qt,3);case"MMMM":return Pt(Qt,Gt);case"D":return it.$D;case"DD":return st.s(it.$D,2,"0");case"d":return String(it.$W);case"dd":return Pt(P.weekdaysMin,it.$W,Vt,2);case"ddd":return Pt(P.weekdaysShort,it.$W,Vt,3);case"dddd":return Vt[it.$W];case"H":return String(Bt);case"HH":return st.s(Bt,2,"0");case"h":return It(1);case"hh":return It(2);case"a":return zt(Bt,At,!0);case"A":return zt(Bt,At,!1);case"m":return String(At);case"mm":return st.s(At,2,"0");case"s":return String(it.$s);case"ss":return st.s(it.$s,2,"0");case"SSS":return st.s(it.$ms,3,"0");case"Z":return lt}return null}(Kt)||lt.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(U,it,P){var ht,lt=this,Bt=st.p(it),At=rt(U),Gt=(At.utcOffset()-this.utcOffset())*e,Vt=this-At,Qt=function(){return st.m(lt,At)};switch(Bt){case m:ht=Qt()/12;break;case f:ht=Qt();break;case u:ht=Qt()/3;break;case d:ht=(Vt-Gt)/604800000;break;case n:ht=(Vt-Gt)/86400000;break;case c:ht=Vt/i;break;case a:ht=Vt/e;break;case o:ht=Vt/r;break;default:ht=Vt}return P?ht:st.a(ht)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return I[this.$L]},D.locale=function(U,it){if(!U)return this.$L;var P=this.clone(),ht=Z(U,it,!0);return ht&&(P.$L=ht),P},D.clone=function(){return st.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},nt}(),ct=ut.prototype;return rt.prototype=ct,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",m],["$D",x]].forEach(function(nt){ct[nt[1]]=function(D){return this.$g(D,nt[0],nt[1])}}),rt.extend=function(nt,D){return nt.$i||(nt(D,ut,rt),nt.$i=!0),rt},rt.locale=Z,rt.isDayjs=K,rt.unix=function(nt){return rt(1000*nt)},rt.en=I[F],rt.Ls=I,rt.p={},rt})});var Vd=Tn(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.BLANK_URL=Xd.relativeFirstCharacters=Xd.whitespaceEscapeCharsRegex=Xd.urlSchemeRegex=Xd.ctrlCharactersRegex=Xd.htmlCtrlEntityRegex=Xd.htmlEntitiesRegex=Xd.invalidProtocolRegex=void 0;Xd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xd.urlSchemeRegex=/^.+(:|&colon;)/gim;Xd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xd.relativeFirstCharacters=[".","/"];Xd.BLANK_URL="about:blank"});var $s=Tn(function(Zd){Object.defineProperty(Zd,"__esModule",{value:!0});Zd.sanitizeUrl=_b;var Be=Vd();function Sb(r){return Be.relativeFirstCharacters.indexOf(r[0])>-1}function Tb(r){var e=r.replace(Be.ctrlCharactersRegex,"");return e.replace(Be.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function Bb(r){return URL.canParse(r)}function Kd(r){try{return decodeURIComponent(r)}catch(e){return r}}function _b(r){if(!r)return Be.BLANK_URL;var e,i=Kd(r.trim());do i=Tb(i).replace(Be.htmlCtrlEntityRegex,"").replace(Be.ctrlCharactersRegex,"").replace(Be.whitespaceEscapeCharsRegex,"").trim(),i=Kd(i),e=i.match(Be.ctrlCharactersRegex)||i.match(Be.htmlEntitiesRegex)||i.match(Be.htmlCtrlEntityRegex)||i.match(Be.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Be.BLANK_URL;if(Sb(s))return s;var o=s.trimStart(),a=o.match(Be.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(Be.invalidProtocolRegex.test(c))return Be.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!Bb(n))return Be.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),po=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var Sc=fn(ap(),1),rr={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")},Qu=t(function(r="fatal"){let e=rr.fatal;if(typeof r==="string"){if(r.toLowerCase()in rr)e=rr[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=rr.fatal)l.fatal=console.error?console.error.bind(console,$e("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",$e("FATAL"));if(e<=rr.error)l.error=console.error?console.error.bind(console,$e("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",$e("ERROR"));if(e<=rr.warn)l.warn=console.warn?console.warn.bind(console,$e("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",$e("WARN"));if(e<=rr.info)l.info=console.info?console.info.bind(console,$e("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",$e("INFO"));if(e<=rr.debug)l.debug=console.debug?console.debug.bind(console,$e("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$e("DEBUG"));if(e<=rr.trace)l.trace=console.debug?console.debug.bind(console,$e("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$e("TRACE"))},"setLogLevel"),$e=t((r)=>`%c${Sc.default().format("ss.SSS")} : ${r} : `,"format");var Do={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 Do.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Do.hue2rgb(a,o,r)*255;case"b":return Do.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),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*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}}},Tc=Do;var _y={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},Bc=_y;var vy={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},_c=vy;var Ly={channel:Tc,lang:Bc,unit:_c},Nt=Ly;var ir={};for(let r=0;r<=255;r++)ir[r]=Nt.unit.dec2hex(r);var me={ALL:0,RGB:1,HSL:2};class vc{constructor(){this.type=me.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=me.ALL}is(r){return this.type===r}}var Lc=vc;class Fc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Lc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=me.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Nt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Nt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Nt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Nt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Nt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Nt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Nt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Nt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Nt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Nt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Nt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Nt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(me.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(me.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(me.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(me.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(me.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(me.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Mc=Fc;var Fy=new Mc({r:0,g:0,b:0,a:0},"transparent"),pr=Fy;var Ac={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Ac.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return pr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}${ir[Math.round(o*255)]}`;else return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}`}},wr=Ac;var Po={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(Po.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Nt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Nt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Nt.channel.clamp.h(parseFloat(i)*360)}}return Nt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Po.re);if(!i)return;let[,s,o,a,c,n]=i;return pr.set({h:Po._hue2deg(s),s:Nt.channel.clamp.s(parseFloat(o)),l:Nt.channel.clamp.l(parseFloat(a)),a:c?Nt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Nt.lang.round(e)}, ${Nt.lang.round(i)}%, ${Nt.lang.round(s)}%, ${o})`;else return`hsl(${Nt.lang.round(e)}, ${Nt.lang.round(i)}%, ${Nt.lang.round(s)}%)`}},Bi=Po;var Ro={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=Ro.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in Ro.colors)if(Ro.colors[i]===e)return i;return}},ya=Ro;var Ec={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(Ec.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return pr.set({r:Nt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Nt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Nt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Nt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Nt.lang.round(e)}, ${Nt.lang.round(i)}, ${Nt.lang.round(s)}, ${Nt.lang.round(o)})`;else return`rgb(${Nt.lang.round(e)}, ${Nt.lang.round(i)}, ${Nt.lang.round(s)})`}},_i=Ec;var My={format:{keyword:ya,hex:wr,rgb:_i,rgba:_i,hsl:Bi,hsla:Bi},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||_i.parse(r)||Bi.parse(r)||ya.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(me.HSL)||r.data.r===void 0)return Bi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return _i.stringify(r);else return wr.stringify(r)}},ye=My;var Ay=(r,e)=>{let i=ye.parse(r);for(let s in e)i[s]=Nt.channel.clamp[s](e[s]);return ye.stringify(i)},qo=Ay;var Ey=(r,e,i=0,s=1)=>{if(typeof r!=="number")return qo(r,{a:e});let o=pr.set({r:Nt.channel.clamp.r(r),g:Nt.channel.clamp.g(e),b:Nt.channel.clamp.b(i),a:Nt.channel.clamp.a(s)});return ye.stringify(o)},pt=Ey;var $y=(r,e)=>Nt.lang.round(ye.parse(r)[e]),ua=$y;var Iy=(r)=>{let{r:e,g:i,b:s}=ye.parse(r),o=0.2126*Nt.channel.toLinear(e)+0.7152*Nt.channel.toLinear(i)+0.0722*Nt.channel.toLinear(s);return Nt.lang.round(o)},$c=Iy;var Oy=(r)=>$c(r)>=0.5,Ic=Oy;var Dy=(r)=>!Ic(r),Ie=Dy;var Py=(r,e,i)=>{let s=ye.parse(r),o=s[e],a=Nt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return ye.stringify(s)},Ul=Py;var Ry=(r,e)=>Ul(r,"l",e),g=Ry;var qy=(r,e)=>Ul(r,"l",-e),A=qy;var Wy=(r,e)=>{let i=ye.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return qo(r,s)},L=Wy;var Ny=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=ye.parse(r),{r:n,g:d,b:f,a:u}=ye.parse(e),m=i/100,x=m*2-1,b=c-u,T=((x*b===-1?x:(x+b)/(1+x*b))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,F=a*T+f*B,I=c*m+u*(1-m);return pt(_,v,F,I)},Oc=Ny;var zy=(r,e=100)=>{let i=ye.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Oc(i,r,e)},J=zy;var $f=/^([^\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,Hy=/\s/,Yy=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 c=o;while(c>i&&Hy.test(r[c-1]))c--;e+=r.slice(i,c)+`
3
+ `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),zf=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Qi={},Gl=t(function(r,e){r=Yy(r.replace($f,"").replace(Nr,""));for(let[i,{detector:s}]of Object.entries(Qi))if(s(r,e))return i;throw new zf(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),op=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)Wc(e,i,s)},"registerLazyLoadedDiagrams"),Wc=t((r,e,i)=>{if(Qi[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Qi[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),Hg=t((r)=>Qi[r].loader,"getDiagramLoader"),xa=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>xa(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,c])=>{if(typeof c==="object"){if(c===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(c)?[]:{};if(typeof o[a]==="object")o[a]=xa(o[a],c,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=c;else Object.defineProperty(r,a,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),Ve=xa,Ye="#ffffff",je="#f2f2f2",Zt=t((r,e)=>e?L(r,{s:-40,l:10}):L(r,{s:-40,l:-10}),"mkBorder"),jy=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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je,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}},Uy=t((r)=>{let e=new jy;return e.calculate(r),e},"getThemeVariables"),Xy=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=pt(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=pt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=pt(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=J(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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]})}},Gy=t((r)=>{let e=new Xy;return e.calculate(r),e},"getThemeVariables"),Vy=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=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Zt(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=pt(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||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(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||Ie(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(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},jt=t((r)=>{let e=new Vy;return e.calculate(r),e},"getThemeVariables"),Ky=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=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},Zy=t((r)=>{let e=new Ky;return e.calculate(r),e},"getThemeVariables"),Qy=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=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},Jy=t((r)=>{let e=new Qy;return e.calculate(r),e},"getThemeVariables"),tx=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=Zt(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ie(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},ex=t((r)=>{let e=new tx;return e.calculate(r),e},"getThemeVariables"),rx=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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 ix=t((r)=>{let e=new rx;return e.calculate(r),e},"getThemeVariables"),ox=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=Zt("#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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ie(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},sx=t((r)=>{let e=new ox;return e.calculate(r),e},"getThemeVariables"),ax=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},nx=t((r)=>{let e=new ax;return e.calculate(r),e},"getThemeVariables"),lx=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=Zt("#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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ie(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},hx=t((r)=>{let e=new lx;return e.calculate(r),e},"getThemeVariables"),cx=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=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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||J(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]||J(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||Ie(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}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]})}},ux=t((r)=>{let e=new cx;return e.calculate(r),e},"getThemeVariables"),mo={base:{getThemeVariables:Uy},dark:{getThemeVariables:Gy},default:{getThemeVariables:jt},forest:{getThemeVariables:Zy},neutral:{getThemeVariables:Jy},neo:{getThemeVariables:ex},"neo-dark":{getThemeVariables:ix},redux:{getThemeVariables:sx},"redux-dark":{getThemeVariables:nx},"redux-color":{getThemeVariables:hx},"redux-dark-color":{getThemeVariables:ux}},ge={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},Nc={...ge,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:mo.default.getThemeVariables(),sequence:{...ge.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:ge.class?.theme,look:ge.class?.look,layout:ge.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ge.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ge.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:{...ge.pie,useWidth:984},xyChart:{...ge.xyChart,useWidth:void 0},requirement:{...ge.requirement,useWidth:void 0},packet:{...ge.packet},eventmodeling:{...ge.eventmodeling},treeView:{...ge.treeView,useWidth:void 0},radar:{...ge.radar},usecase:{...ge.usecase},railroad:{...ge.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:{...ge.ishikawa},sankey:{...ge.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:{...ge.venn},cynefin:{...ge.cynefin}},zc=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,...zc(r[s],"")];return[...i,e+s]},[]),"keyify"),dx=new Set(zc(Nc,"")),Y=Nc,fx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},px=t((r)=>fx[r]??r,"getDiagramConfigKey"),gx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},mx=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"),Ei=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Ei(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!dx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=gx[e];if(s)mx(r[e],s);else l.debug("sanitizing object",e),Ei(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]=Uf(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"),Uf=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"),Vo=Object.freeze(Y),yx=["theme","look","layout"],xx=new Set(["classic","handDrawn","neo"]),Cx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(mo,e);return r!=="look"||xx.has(e)},"isUsableAppearance"),bx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Cx(i,o))},"readAppearance"),$r=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),_e=Ve({},Vo),zo,Ho={},or=[],vi=Ve({},Vo),Ai,kx=t((r,e)=>{if(!Ai)return;let i=[e,...[...or].reverse(),Ho,Vo],s=r[Ai];for(let o of yx)for(let a of i){let c=bx(a,Ai,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),Hr=t((r,e)=>{let i=Ve({},r),s={};for(let a of e)Hc(a),s=Ve(s,a);if(i=Ve(i,s),kx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(mo,i.theme)){let a=Ve({},zo),c=Ve(a.themeVariables||{},s.themeVariables);i.themeVariables=mo[i.theme].getThemeVariables(c)}return vi=i,Sx(vi),vi},"updateCurrentConfig"),ip=t((r)=>{Ai=r===void 0?void 0:px(r),Hr(_e,or)},"setDiagramConfigScope"),Wg=t((r)=>{if(_e=Ve({},Vo),_e=Ve(_e,r),Ho=Ve({},r),r.theme&&Object.hasOwn(mo,r.theme))_e.themeVariables=mo[r.theme].getThemeVariables(r.themeVariables);return Hr(_e,or),_e},"setSiteConfig"),Kg=t((r)=>{zo=Ve({},r)},"saveConfigFromInitialize"),Vg=t((r)=>(_e=Ve(_e,r),Ho=Ve(Ho,r),Hr(_e,or),_e),"updateSiteConfig"),Gf=t(()=>Ve({},_e),"getSiteConfig"),jf=t((r)=>(Hr(vi,[r]),C()),"setConfig"),C=t(()=>Ve({},vi),"getConfig"),Hc=t((r)=>{if(!r)return;["secure",..._e.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")Hc(r[e])})},"sanitize"),Yg=t((r)=>{if(Ei(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};or.push(r),Hr(_e,or)},"addDirective"),Ru=t((r=_e)=>{or=[],Ai=void 0,Hr(r,or)},"reset"),wx={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."},Dc={},Yc=t((r)=>{if(Dc[r])return;l.warn(wx[r]),Dc[r]=!0},"issueWarning"),Sx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Yc("LAZY_LOAD_DEPRECATED")},"checkConfig"),Jg=t(()=>{let r={};if(zo)r=Ve(r,zo);for(let e of or)r=Ve(r,e);return r},"getUserDefinedConfig"),qt=t((r)=>{if(r.flowchart?.htmlLabels!=null)Yc("FLOWCHART_HTML_LABELS_DEPRECATED");return $r(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Ms=/<\/?br\s*\/?>/gi,Tx=new RegExp(Ms.source,"i"),Bx=t((r)=>{if(!r)return[""];return Xc(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),_x=(()=>{let r=!1;return()=>{if(!r)jc(),r=!0}})();function jc(){$t.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),$t.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(jc,"setupDompurifyHooks");var Uc=t((r)=>(_x(),$t.sanitize(r)),"removeScript"),Pc=t((r,e)=>{if(qt(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=Uc(r);else if(i!=="loose")r=Xc(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Mx(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=$t.sanitize(Pc(r,e),e.dompurifyConfig).toString();else r=$t.sanitize(Pc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),vx=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),Lx=t((r)=>Tx.test(r),"hasBreaks"),Fx=t((r)=>r.split(Ms),"splitBreaks"),Mx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=t((r)=>r.replace(Ms,"#br#"),"breakToPlaceholder"),qf=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"),Ax=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Ex=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),fo=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],c=e[s+1];if($x(a,c))o=a+","+c,s++,i.pop()}i.push(Ix(o))}return i.join("")},"parseGenericTypes"),Ca=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),$x=t((r,e)=>{let i=Ca(r,"~"),s=Ca(e,"~");return i===1&&s===1},"shouldCombineSets"),Ix=t((r)=>{let e=Ca(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"),Rc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wo=/\$\$(.*?)\$\$/g,_t=t((r)=>(r.match(Wo)?.length??0)>0,"hasKatex"),jl=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await ql(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"),Ox=t(async(r,e)=>{if(!_t(r))return r;if(!(Rc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Wo,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Rc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Ms).map((o)=>_t(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Wo,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Wo,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),ql=t(async(r,e)=>ee(await Ox(r,e),e),"renderKatexSanitized"),w={getRows:Bx,sanitizeText:ee,sanitizeTextOrArray:vx,hasBreaks:Lx,splitBreaks:Fx,lineBreakRegex:Ms,removeScript:Uc,getUrl:qf,evaluate:$r,getMax:Ax,getMin:Ex},Dx=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Px=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"),te=t(function(r,e,i,s){let o=Px(e,i,s);Dx(r,o)},"configureSvgSize"),zr=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:c}=o;l.info(`SVG bounds: ${a}x${c}`,o);let n=0,d=0;l.info(`Graph bounds: ${n}x${d}`,r),n=a+i*2,d=c+i*2,l.info(`Calculated bounds: ${n}x${d}`),te(e,d,n,s);let f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",f)},"setupGraphViewbox"),No={};function sp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
+ `)}t(sp,"cssStyleSheetToString");var Rx=t((r,e,i,s)=>{let o="";if(r in No&&No[r])o=No[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,45 +122,45 @@ import{Ot}from"./index-cq98p2rb.js";import{fn,Tn}from"./index-tzdm1y3z.js";var e
122
122
  }
123
123
 
124
124
  ${e}
125
- `},"getStyles"),jx=t((r,e)=>{if(e!==void 0)No[r]=e},"addStylesForDiagram"),qg=Yx,ap={};co(ap,{clear:()=>R,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>q,setAccDescription:()=>z,setAccTitle:()=>M,setDiagramTitle:()=>H});var ba="",ka="",wa="",Sa=t((r)=>ee(r,C()),"sanitizeText"),R=t(()=>{ba="",wa="",ka=""},"clear"),M=t((r)=>{ba=Sa(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>ba,"getAccTitle"),z=t((r)=>{wa=Sa(r).replace(/\n\s+/g,`
126
- `)},"setAccDescription"),j=t(()=>wa,"getAccDescription"),H=t((r)=>{ka=Sa(r)},"setDiagramTitle"),q=t(()=>ka,"getDiagramTitle"),qc=l,Ux=Su,p=C,da=$f,Ri=Vo,Uo=t((r)=>ee(r,p()),"sanitizeText"),Gl=$r,Xx=t(()=>ap,"getCommonDb"),jo={},Du=t((r,e,i)=>{if(jo[r])qc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(jo[r]=e,i)Wc(r,i);jx(r,e.styles),e.injectUtils?.(qc,Ux,p,Uo,Gl,Xx(),()=>{})},"registerDiagram"),op=t((r)=>{if(r in jo)return jo[r];throw new Gx(r)},"getDiagram"),Gx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class $i extends Map{constructor(r,e=Zx){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(Gc(this,r))}has(r){return super.has(Gc(this,r))}set(r,e){return super.set(Vx(this,r),e)}delete(r){return super.delete(Kx(this,r))}}function Gc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Vx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Kx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Zx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Qx={value:()=>{}};function Kc(){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 Xo(i)}function Xo(r){this._=r}function Jx(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}})}Xo.prototype=Kc.prototype={constructor:Xo,on:function(r,e){var i=this._,s=Jx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=t0(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=Vc(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Vc(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 Xo(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 t0(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Vc(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Qx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Ta=Kc;var Go="http://www.w3.org/1999/xhtml",Ba={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ue(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Ba.hasOwnProperty(e)?{space:Ba[e],local:r}:r}function e0(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Go&&e.documentElement.namespaceURI===Go?e.createElement(r):e.createElementNS(i,r)}}function r0(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Ii(r){var e=Ue(r);return(e.local?r0:e0)(e)}function i0(){}function gr(r){return r==null?i0:function(){return this.querySelector(r)}}function _a(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new fe(s,this._parents)}function va(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function o0(){return[]}function jr(r){return r==null?o0:function(){return this.querySelectorAll(r)}}function s0(r){return function(){return va(r.apply(this,arguments))}}function La(r){if(typeof r==="function")r=s0(r);else r=jr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new fe(s,o)}function Xr(r){return function(){return this.matches(r)}}function Ko(r){return function(e){return e.matches(r)}}var a0=Array.prototype.find;function n0(r){return function(){return a0.call(this.children,r)}}function l0(){return this.firstElementChild}function Fa(r){return this.select(r==null?l0:n0(typeof r==="function"?r:Ko(r)))}var h0=Array.prototype.filter;function c0(){return Array.from(this.children)}function u0(r){return function(){return h0.call(this.children,r)}}function Ma(r){return this.selectAll(r==null?c0:u0(typeof r==="function"?r:Ko(r)))}function Aa(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new fe(s,this._parents)}function Di(r){return Array(r.length)}function Ea(){return new fe(this._enter||this._groups.map(Di),this._parents)}function qi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}qi.prototype={constructor:qi,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 Ia(r){return function(){return r}}function d0(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new qi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function f0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,m=a.length,x=Array(u),b;for(n=0;n<u;++n)if(d=e[n])if(x[n]=b=c.call(d,d.__data__,n,e)+"",f.has(b))o[n]=d;else f.set(b,d);for(n=0;n<m;++n)if(b=c.call(r,a[n],n,a)+"",d=f.get(b))s[n]=d,d.__data__=a[n],f.delete(b);else i[n]=new qi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(x[n])===d)o[n]=d}function p0(r){return r.__data__}function Da(r,e){if(!arguments.length)return Array.from(this,p0);var i=e?f0:d0,s=this._parents,o=this._groups;if(typeof r!=="function")r=Ia(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],m=o[f],x=m.length,b=g0(r.call(u,u&&u.__data__,f,s)),S=b.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(x);i(u,m,T,B,_,b,e);for(var v=0,F=0,I,O;v<S;++v)if(I=T[v]){if(v>=F)F=v+1;while(!(O=B[F])&&++F<S);I._next=O||null}}return c=new fe(c,s),c._enter=n,c._exit=d,c}function g0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Pa(){return new fe(this._exit||this._groups.map(Di),this._parents)}function Ra(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 qa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],m=f.length,x=n[d]=Array(m),b,S=0;S<m;++S)if(b=f[S]||u[S])x[S]=b;for(;d<o;++d)n[d]=i[d];return new fe(n,this._parents)}function Wa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function Na(r){if(!r)r=m0;function e(m,x){return m&&x?r(m.__data__,x.__data__):!m-!x}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new fe(o,this._parents).order()}function m0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function za(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ha(){return Array.from(this)}function Ya(){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 c=s[o];if(c)return c}return null}function ja(){let r=0;for(let e of this)++r;return r}function Ua(){return!this.node()}function Xa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function y0(r){return function(){this.removeAttribute(r)}}function x0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function C0(r,e){return function(){this.setAttribute(r,e)}}function b0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function k0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function w0(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 Ga(r,e){var i=Ue(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?x0:y0:typeof e==="function"?i.local?w0:k0:i.local?b0:C0)(i,e))}function Wi(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function S0(r){return function(){this.style.removeProperty(r)}}function T0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function B0(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 Va(r,e,i){return arguments.length>1?this.each((e==null?S0:typeof e==="function"?B0:T0)(r,e,i==null?"":i)):mr(this.node(),r)}function mr(r,e){return r.style.getPropertyValue(e)||Wi(r).getComputedStyle(r,null).getPropertyValue(e)}function _0(r){return function(){delete this[r]}}function v0(r,e){return function(){this[r]=e}}function L0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ka(r,e){return arguments.length>1?this.each((e==null?_0:typeof e==="function"?L0:v0)(r,e)):this.node()[r]}function Zc(r){return r.trim().split(/^|\s+/)}function Za(r){return r.classList||new Qc(r)}function Qc(r){this._node=r,this._names=Zc(r.getAttribute("class")||"")}Qc.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 Jc(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function tu(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function F0(r){return function(){Jc(this,r)}}function M0(r){return function(){tu(this,r)}}function A0(r,e){return function(){(e.apply(this,arguments)?Jc:tu)(this,r)}}function Qa(r,e){var i=Zc(r+"");if(arguments.length<2){var s=Za(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"?A0:e?F0:M0)(i,e))}function E0(){this.textContent=""}function $0(r){return function(){this.textContent=r}}function I0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ja(r){return arguments.length?this.each(r==null?E0:(typeof r==="function"?I0:$0)(r)):this.node().textContent}function O0(){this.innerHTML=""}function D0(r){return function(){this.innerHTML=r}}function P0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function tn(r){return arguments.length?this.each(r==null?O0:(typeof r==="function"?P0:D0)(r)):this.node().innerHTML}function R0(){if(this.nextSibling)this.parentNode.appendChild(this)}function en(){return this.each(R0)}function q0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rn(){return this.each(q0)}function on(r){var e=typeof r==="function"?r:Ii(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function W0(){return null}function an(r,e){var i=typeof r==="function"?r:Ii(r),s=e==null?W0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function N0(){var r=this.parentNode;if(r)r.removeChild(this)}function nn(){return this.each(N0)}function z0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function H0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function ln(r){return this.select(r?H0:z0)}function hn(r){return arguments.length?this.property("__data__",r):this.node().__data__}function Y0(r){return function(e){r.call(this,e,this.__data__)}}function j0(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 U0(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 X0(r,e,i){return function(){var s=this.__on,o,a=Y0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).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 cn(r,e,i){var s=j0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?X0:U0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function eu(r,e,i){var s=Wi(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 G0(r,e){return function(){return eu(this,r,e)}}function V0(r,e){return function(){return eu(this,r,e.apply(this,arguments))}}function un(r,e){return this.each((typeof e==="function"?V0:G0)(r,e))}function*dn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var pn=[null];function fe(r,e){this._groups=r,this._parents=e}function ru(){return new fe([[document.documentElement]],pn)}function K0(){return this}fe.prototype=ru.prototype={constructor:fe,select:_a,selectAll:La,selectChild:Fa,selectChildren:Ma,filter:Aa,data:Da,enter:Ea,exit:Pa,join:Ra,merge:qa,selection:K0,order:Wa,sort:Na,call:za,nodes:Ha,node:Ya,size:ja,empty:Ua,each:Xa,attr:Ga,style:Va,property:Ka,classed:Qa,text:Ja,html:tn,raise:en,lower:rn,append:on,insert:an,remove:nn,clone:ln,datum:hn,on:cn,dispatch:un,[Symbol.iterator]:dn};var ar=ru;function h(r){return typeof r==="string"?new fe([[document.querySelector(r)]],[document.documentElement]):new fe([[r]],pn)}function Fi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function jl(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Li(){}var Ni=0.7,es=1/Ni,Vr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Z0=/^#([0-9a-f]{3,8})$/,Q0=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),J0=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),tC=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${zi}\\)$`),eC=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${zi}\\)$`),rC=new RegExp(`^hsl\\(${zi},${Xe},${Xe}\\)$`),iC=new RegExp(`^hsla\\(${zi},${Xe},${Xe},${zi}\\)$`),iu={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};Fi(Li,Oa,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:ou,formatHex:ou,formatHex8:oC,formatHsl:sC,formatRgb:su,toString:su});function ou(){return this.rgb().formatHex()}function oC(){return this.rgb().formatHex8()}function sC(){return uu(this).formatHsl()}function su(){return this.rgb().formatRgb()}function Oa(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Z0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?au(e):i===3?new Dn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(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=Q0.exec(r))?new Dn(e[1],e[2],e[3],1):(e=J0.exec(r))?new Dn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tC.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=eC.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rC.exec(r))?hu(e[1],e[2]/100,e[3]/100,1):(e=iC.exec(r))?hu(e[1],e[2]/100,e[3]/100,e[4]):iu.hasOwnProperty(r)?au(iu[r]):r==="transparent"?new Dn(NaN,NaN,NaN,0):null}function au(r){return new Dn(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new Dn(r,e,i,s)}function Uf(r){if(!(r instanceof Li))r=Oa(r);if(!r)return new Dn;return r=r.rgb(),new Dn(r.r,r.g,r.b,r.opacity)}function Kr(r,e,i,s){return arguments.length===1?Uf(r):new Dn(r,e,i,s==null?1:s)}function Dn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Fi(Dn,Kr,jl(Li,{brighter(r){return r=r==null?es:Math.pow(es,r),new Dn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Ni:Math.pow(Ni,r),new Dn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Dn(Tr(this.r),Tr(this.g),Tr(this.b),rs(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:nu,formatHex:nu,formatHex8:aC,formatRgb:lu,toString:lu}));function nu(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function aC(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function rs(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 hu(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 Pe(r,e,i,s)}function uu(r){if(r instanceof Pe)return new Pe(r.h,r.s,r.l,r.opacity);if(!(r instanceof Li))r=Oa(r);if(!r)return new Pe;if(r instanceof Pe)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),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Pe(c,n,d,r.opacity)}function du(r,e,i,s){return arguments.length===1?uu(r):new Pe(r,e,i,s==null?1:s)}function Pe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Fi(Pe,du,jl(Li,{brighter(r){return r=r==null?es:Math.pow(es,r),new Pe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Ni:Math.pow(Ni,r),new Pe(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 Dn(gn(r>=240?r-240:r+120,o,s),gn(r,o,s),gn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Pe(cu(this.h),ts(this.s),ts(this.l),rs(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=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${cu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function cu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function gn(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 mn(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function yn(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],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return mn((i-s/e)*e,c,o,a,n)}}function xn(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],c=r[(s+1)%e],n=r[(s+2)%e];return mn((i-s/e)*e,o,a,c,n)}}var ql=(r)=>()=>r;function fu(r,e){return function(i){return r+i*e}}function nC(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 Hg(r,e){var i=e-r;return i?fu(r,i>180||i<-180?i-360*Math.round(i/360):i):ql(isNaN(r)?e:r)}function pu(r){return(r=+r)===1?Yo:function(e,i){return i-e?nC(e,i,r):ql(isNaN(e)?i:e)}}function Yo(r,e){var i=e-r;return i?fu(r,i):ql(isNaN(r)?e:r)}var Ls=function r(e){var i=pu(e);function s(o,a){var c=i((o=Kr(o)).r,(a=Kr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Yo(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function gu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Kr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var lC=gu(yn),hC=gu(xn);function En(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var bn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(bn.source,"g");function cC(r){return function(){return r}}function uC(r){return function(e){return r(e)+""}}function Hl(r,e){var i=bn.lastIndex=Cn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=bn.exec(r))&&(o=Cn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:En(s,o)});i=Cn.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?uC(d[0].x):cC(e):(e=d.length,function(f){for(var u=0,m;u<e;++u)n[(m=d[u]).i]=m.x(f);return n.join("")})}var mu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*mu,skewX:Math.atan(d)*mu,scaleX:c,scaleY:n}}var ss;function yu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Cu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push("translate(",null,e,null,i);S.push({i:T-4,x:En(f,m)},{i:T-2,x:En(u,x)})}else if(m||x)b.push("translate("+m+e+x+i)}function c(f,u,m,x){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;x.push({i:m.push(o(m)+"rotate(",null,s)-2,x:En(f,u)})}else if(u)m.push(o(m)+"rotate("+u+s)}function n(f,u,m,x){if(f!==u)x.push({i:m.push(o(m)+"skewX(",null,s)-2,x:En(f,u)});else if(u)m.push(o(m)+"skewX("+u+s)}function d(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push(o(b)+"scale(",null,",",null,")");S.push({i:T-4,x:En(f,m)},{i:T-2,x:En(u,x)})}else if(m!==1||x!==1)b.push(o(b)+"scale("+m+","+x+")")}return function(f,u){var m=[],x=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,m,x),c(f.rotate,u.rotate,m,x),n(f.skewX,u.skewX,m,x),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,m,x),f=u=null,function(b){var S=-1,T=x.length,B;while(++S<T)m[(B=x[S]).i]=B.x(b);return m.join("")}}}var kn=Cu(yu,"px, ","px)","deg)"),wn=Cu(xu,", ",")",")");var Zr=0,Yi=0,Hi=0,ku=1000,as,ji,ns=0,Br=0,ls=0,Ui=typeof performance==="object"&&performance.now?performance:Date,wu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Gi(){return Br||(wu(dC),Br=Ui.now()+ls)}function dC(){Br=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=hs.prototype={constructor:Xi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Gi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,Sn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Sn()}};function hs(r,e,i){var s=new Xi;return s.restart(r,e,i),s}function Bu(){Gi(),++Zr;var r=as,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Zr}function bu(){Br=(ns=Ui.now())+ls,Zr=Yi=0;try{Bu()}finally{Zr=0,pC(),Br=0}}function fC(){var r=Ui.now(),e=r-ns;if(e>ku)ls-=e,ns=r}function pC(){var r,e=as,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:as=i;ji=r,Sn(s)}function Sn(r){if(Zr)return;if(Yi)Yi=clearTimeout(Yi);var e=r-Br;if(e>24){if(r<1/0)Yi=setTimeout(bu,r-Ui.now()-ls);if(Hi)Hi=clearInterval(Hi)}else{if(!Hi)ns=Ui.now(),Hi=setInterval(fC,ku);Zr=1,wu(bu)}}function Vi(r,e,i){var s=new Xi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var gC=Ta("start","end","cancel","interrupt"),mC=[],Au=0,_u=1,us=2,cs=3,vu=4,ds=5,Ki=6;function nr(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;yC(r,i,{name:e,index:s,group:o,on:gC,tween:mC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Au})}function Zi(r,e){var i=xe(r,e);if(i.state>Au)throw Error("too late; already scheduled");return i}function be(r,e){var i=xe(r,e);if(i.state>cs)throw Error("too late; already running");return i}function xe(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function yC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=_u,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,m,x,b;if(i.state!==_u)return d();for(u in s){if(b=s[u],b.name!==i.name)continue;if(b.state===cs)return Vi(c);if(b.state===vu)b.state=Ki,b.timer.stop(),b.on.call("interrupt",r,r.__data__,b.index,b.group),delete s[u];else if(+u<e)b.state=Ki,b.timer.stop(),b.on.call("cancel",r,r.__data__,b.index,b.group),delete s[u]}if(Vi(function(){if(i.state===cs)i.state=vu,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(x=i.tween.length);for(u=0,m=-1;u<x;++u)if(b=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++m]=b;o.length=m+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),m=-1,x=o.length;while(++m<x)o[m].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Ki,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function Ji(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=Ki,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function _n(r){return this.each(function(){Ji(this,r)})}function xC(r,e){var i,s;return function(){var o=be(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function CC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=be(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function vn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=xe(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?xC:CC)(i,r,e))}function Qr(r,e,i){var s=r._id;return r.each(function(){var o=be(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return xe(o,s).value[e]}}function to(r,e){var i;return(typeof e==="number"?En:e instanceof Oa?Ls:(i=Oa(e))?(e=i,Ls):Hl)(r,e)}function bC(r){return function(){this.removeAttribute(r)}}function kC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function wC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function SC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function TC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function BC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function Ln(r,e){var i=Ue(r),s=i==="transform"?wn:to;return this.attrTween(r,typeof e==="function"?(i.local?BC:TC)(i,s,Qr(this,"attr."+r,e)):e==null?(i.local?kC:bC)(i):(i.local?SC:wC)(i,s,e))}function _C(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function vC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function LC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&vC(r,a);return i}return o._value=e,o}function FC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&_C(r,a);return i}return o._value=e,o}function Fn(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=Ue(r);return this.tween(i,(s.local?LC:FC)(s,e))}function MC(r,e){return function(){Zi(this,r).delay=+e.apply(this,arguments)}}function AC(r,e){return e=+e,function(){Zi(this,r).delay=e}}function Mn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?MC:AC)(e,r)):xe(this.node(),e).delay}function EC(r,e){return function(){be(this,r).duration=+e.apply(this,arguments)}}function $C(r,e){return e=+e,function(){be(this,r).duration=e}}function An(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?EC:$C)(e,r)):xe(this.node(),e).duration}function IC(r,e){if(typeof e!=="function")throw Error();return function(){be(this,r).ease=e}}function $n(r){var e=this._id;return arguments.length?this.each(IC(e,r)):xe(this.node(),e).ease}function OC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();be(this,r).ease=i}}function In(r){if(typeof r!=="function")throw Error();return this.each(OC(this._id,r))}function On(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new Le(s,this._parents,this._name,this._id)}function Pn(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),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,m=c[n]=Array(u),x,b=0;b<u;++b)if(x=d[b]||f[b])m[b]=x;for(;n<s;++n)c[n]=e[n];return new Le(c,this._parents,this._name,this._id)}function DC(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 PC(r,e,i){var s,o,a=DC(e)?Zi:be;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function Rn(r,e){var i=this._id;return arguments.length<2?xe(this.node(),i).on.on(r):this.each(PC(i,r,e))}function RC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function qn(){return this.on("end.remove",RC(this._id))}function zn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,m,x=0;x<d;++x)if((u=n[x])&&(m=r.call(u,u.__data__,x,n))){if("__data__"in u)m.__data__=u.__data__;f[x]=m,nr(f[x],e,i,x,f,xe(u,i))}return new Le(a,this._parents,e,i)}function Yn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=jr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,m=0;m<f;++m)if(u=d[m]){for(var x=r.call(u,u.__data__,m,d),b,S=xe(u,i),T=0,B=x.length;T<B;++T)if(b=x[T])nr(b,e,i,T,x,S);a.push(x),c.push(u)}return new Le(a,c,e,i)}var qC=ar.prototype.constructor;function jn(){return new qC(this._groups,this._parents)}function WC(r,e){var i,s,o;return function(){var a=mr(this,r),c=(this.style.removeProperty(r),mr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function Eu(r){return function(){this.style.removeProperty(r)}}function NC(r,e,i){var s,o=i+"",a;return function(){var c=mr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function zC(r,e,i){var s,o,a;return function(){var c=mr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),mr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function HC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=be(this,r),f=d.on,u=d.value[a]==null?n||(n=Eu(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function Un(r,e,i){var s=(r+="")==="transform"?kn:to;return e==null?this.styleTween(r,WC(r,s)).on("end.style."+r,Eu(r)):typeof e==="function"?this.styleTween(r,zC(r,s,Qr(this,"style."+r,e))).each(HC(this._id,r)):this.styleTween(r,NC(r,s,e),i).on("end.style."+r,null)}function YC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function jC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&YC(r,c,i);return s}return a._value=e,a}function Xn(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,jC(r,e,i==null?"":i))}function UC(r){return function(){this.textContent=r}}function XC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Gn(r){return this.tween("text",typeof r==="function"?XC(Qr(this,"text",r)):UC(r==null?"":r+""))}function GC(r){return function(e){this.textContent=r.call(this,e)}}function VC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&GC(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,VC(r))}function Jn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=xe(d,e);nr(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Le(s,this._parents,r,i)}function tl(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=be(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var KC=0;function Le(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function $u(r){return ar().transition(r)}function fs(){return++KC}var hr=ar.prototype;Le.prototype=$u.prototype={constructor:Le,select:zn,selectAll:Yn,selectChild:hr.selectChild,selectChildren:hr.selectChildren,filter:On,merge:Pn,selection:jn,transition:Jn,call:hr.call,nodes:hr.nodes,node:hr.node,size:hr.size,empty:hr.empty,each:hr.each,on:Rn,attr:Ln,attrTween:Fn,style:Un,styleTween:Xn,text:Gn,textTween:Zn,remove:qn,tween:vn,delay:Mn,duration:An,ease:$n,easeVarying:In,end:tl,[Symbol.iterator]:hr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var ZC={time:null,delay:0,duration:250,ease:ps};function QC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function el(r){var e,i;if(r instanceof Le)e=r._id,r=r._name;else e=fs(),(i=ZC).time=Gi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])nr(d,r,e,f,c,i||QC(d,e));return new Le(s,this._parents,r,e)}ar.prototype.interrupt=_n;ar.prototype.transition=el;var{abs:cF,max:uF,min:dF}=Math;function Iu(r){return[+r[0],+r[1]]}function JC(r){return[Iu(r[0]),Iu(r[1])]}var fF={name:"x",handles:["w","e"].map(rl),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]]}},pF={name:"y",handles:["n","s"].map(rl),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]]}},gF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rl),input:function(r){return r==null?null:JC(r)},output:function(r){return r}};function rl(r){return{type:r}}var il=Math.PI,ol=2*il;var tb=ol-0.000001;function Ou(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function eb(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Ou;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 Jr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Ou:eb(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,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,m=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(m>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let x=i-a,b=s-c,S=n*n+d*d,T=x*x+b*b,B=Math.sqrt(S),_=Math.sqrt(m),v=o*Math.tan((il-Math.acos((S+m-T)/(2*B*_)))/2),F=v/_,I=v/B;if(Math.abs(F-1)>0.000001)this._append`L${r+F*f},${e+F*u}`;this._append`A${o},${o},0,0,${+(u*x>f*b)},${this._x1=r+I*n},${this._y1=e+I*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,m=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(m<0)m=m%ol+ol;if(m>tb)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(m>0.000001)this._append`A${i},${i},0,${+(m>=il)},${u},${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 qu(){return new Jr}qu.prototype=Jr.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 sl=Symbol("implicit");function Hn(){var r=new $i,e=[],i=[],s=sl;function o(a){let c=r.get(a);if(c===void 0){if(s!==sl)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new $i;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-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 Hn(e,i).unknown(s)},mo.apply(o,arguments),o}function yt(r){return function(){return r}}var{abs:al,atan2:ke,cos:yr,max:Wu,min:gs,sin:Re,sqrt:_r}=Math,Ce=0.000000000001,ti=Math.PI,eo=ti/2,Wl=2*ti;function zu(r){return r>1?0:r<-1?ti:Math.acos(r)}function nl(r){return r>=1?eo:r<=-1?-eo:Math.asin(r)}function ms(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 Jr(e)}function rb(r){return r.innerRadius}function ib(r){return r.outerRadius}function ob(r){return r.startAngle}function sb(r){return r.endAngle}function ab(r){return r&&r.padAngle}function nb(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,m=n-a,x=m*d-u*f;if(x*x<Ce)return;return x=(u*(e-a)-m*(r-o))/x,[r+x*d,e+x*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/_r(n*n+d*d),u=f*d,m=-f*n,x=r+u,b=e+m,S=i+u,T=s+m,B=(x+S)/2,_=(b+T)/2,v=S-x,F=T-b,I=v*v+F*F,O=o-a,K=x*T-S*b,Z=(F<0?-1:1)*_r(Wu(0,O*O*I-K*K)),rt=(K*F-v*Z)/I,st=(-K*v-F*Z)/I,ut=(K*F+v*Z)/I,ct=(-K*v+F*Z)/I,nt=rt-B,D=st-_,U=ut-B,it=ct-_;if(nt*nt+D*D>U*U+it*it)rt=ut,st=ct;return{cx:rt,cy:st,x01:-u,y01:-m,x11:rt*(o/O-1),y11:st*(o/O-1)}}function zr(){var r=rb,e=ib,i=yt(0),s=null,o=ob,a=sb,c=ab,n=null,d=ms(f);function f(){var u,m,x=+r.apply(this,arguments),b=+e.apply(this,arguments),S=o.apply(this,arguments)-eo,T=a.apply(this,arguments)-eo,B=al(T-S),_=T>S;if(!n)n=u=d();if(b<x)m=b,b=x,x=m;if(!(b>Ce))n.moveTo(0,0);else if(B>Wl-Ce){if(n.moveTo(b*yr(S),b*Re(S)),n.arc(0,0,b,S,T,!_),x>Ce)n.moveTo(x*yr(T),x*Re(T)),n.arc(0,0,x,T,S,_)}else{var v=S,F=T,I=S,O=T,K=B,Z=B,rt=c.apply(this,arguments)/2,st=rt>Ce&&(s?+s.apply(this,arguments):_r(x*x+b*b)),ut=gs(al(b-x)/2,+i.apply(this,arguments)),ct=ut,nt=ut,D,U;if(st>Ce){var it=nl(st/x*Re(rt)),P=nl(st/b*Re(rt));if((K-=it*2)>Ce)it*=_?1:-1,I+=it,O-=it;else K=0,I=O=(S+T)/2;if((Z-=P*2)>Ce)P*=_?1:-1,v+=P,F-=P;else Z=0,v=F=(S+T)/2}var ht=b*yr(v),lt=b*Re(v),Bt=x*yr(O),vt=x*Re(O);if(ut>Ce){var Xt=b*yr(F),Vt=b*Re(F),Qt=x*yr(I),Jt=x*Re(I),Dt;if(B<ti)if(Dt=nb(ht,lt,Qt,Jt,Xt,Vt,Bt,vt)){var At=ht-Dt[0],Nt=lt-Dt[1],Kt=Xt-Dt[0],Yt=Vt-Dt[1],le=1/Re(zu((At*Kt+Nt*Yt)/(_r(At*At+Nt*Nt)*_r(Kt*Kt+Yt*Yt)))/2),ne=_r(Dt[0]*Dt[0]+Dt[1]*Dt[1]);ct=gs(ut,(x-ne)/(le-1)),nt=gs(ut,(b-ne)/(le+1))}else ct=nt=0}if(!(Z>Ce))n.moveTo(ht,lt);else if(nt>Ce)if(D=ys(Qt,Jt,ht,lt,b,nt,_),U=ys(Xt,Vt,Bt,vt,b,nt,_),n.moveTo(D.cx+D.x01,D.cy+D.y01),nt<ut)n.arc(D.cx,D.cy,nt,ke(D.y01,D.x01),ke(U.y01,U.x01),!_);else n.arc(D.cx,D.cy,nt,ke(D.y01,D.x01),ke(D.y11,D.x11),!_),n.arc(0,0,b,ke(D.cy+D.y11,D.cx+D.x11),ke(U.cy+U.y11,U.cx+U.x11),!_),n.arc(U.cx,U.cy,nt,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.moveTo(ht,lt),n.arc(0,0,b,v,F,!_);if(!(x>Ce)||!(K>Ce))n.lineTo(Bt,vt);else if(ct>Ce)if(D=ys(Bt,vt,Xt,Vt,x,-ct,_),U=ys(ht,lt,Qt,Jt,x,-ct,_),n.lineTo(D.cx+D.x01,D.cy+D.y01),ct<ut)n.arc(D.cx,D.cy,ct,ke(D.y01,D.x01),ke(U.y01,U.x01),!_);else n.arc(D.cx,D.cy,ct,ke(D.y01,D.x01),ke(D.y11,D.x11),!_),n.arc(0,0,x,ke(D.cy+D.y11,D.cx+D.x11),ke(U.cy+U.y11,U.cx+U.x11),_),n.arc(U.cx,U.cy,ct,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.arc(0,0,x,O,I,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,m=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[yr(m)*u,Re(m)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:yt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:yt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:yt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:yt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:yt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:yt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:yt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var GF=Array.prototype.slice;function Nu(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Hu(r){this._context=r}Hu.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 pa(r){return new Hu(r)}function Yu(r){return r[0]}function ju(r){return r[1]}function Ms(r,e){var i=yt(!0),s=null,o=pa,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Yu:yt(r),e=typeof e==="function"?e:e===void 0?ju:yt(e);function n(d){var f,u=(d=Nu(d)).length,m,x=!1,b;if(s==null)a=o(b=c());for(f=0;f<=u;++f){if(!(f<u&&i(m=d[f],f,d))===x)if(x=!x)a.lineStart();else a.lineEnd();if(x)a.point(+r(m,f,d),+e(m,f,d))}if(b)return a=null,b+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:yt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:yt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:yt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class ll{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 ro(r){return new ll(r,!0)}function io(r){return new ll(r,!1)}function Ee(){}function ei(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 oo(r){this._context=r}oo.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:ei(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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new oo(r)}function Uu(r){this._context=r}Uu.prototype={areaStart:Ee,areaEnd:Ee,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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new Uu(r)}function Xu(r){this._context=r}Xu.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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Gu(r,e){this._basis=new oo(r),this._beta=e}Gu.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,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var hl=function r(e){function i(s){return e===1?new oo(s):new Gu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(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 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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ri(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:ri(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 so=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:Ee,areaEnd:Ee,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:ri(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 cl=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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:ri(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 ul=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ao(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>Ce){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>Ce){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function Vu(r,e){this._context=r,this._alpha=e}Vu.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:ao(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 no=function r(e){function i(s){return e?new Vu(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ku(r,e){this._context=r,this._alpha=e}Ku.prototype={areaStart:Ee,areaEnd:Ee,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:ao(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 dl=function r(e){function i(s){return e?new Ku(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.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:ao(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 fl=function r(e){function i(s){return e?new Zu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ju(r){this._context=r}Ju.prototype={areaStart:Ee,areaEnd:Ee,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 Ss(r){return new Ju(r)}function td(r){return r<0?-1:1}function ed(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(td(a)+td(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function rd(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function pl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:pl(this,this._t0,rd(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,pl(this,rd(this,i=ed(this,r,e)),i);break;default:pl(this,this._t0,i=ed(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function id(r){this._context=new od(r)}(id.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function od(r){this._context=r}od.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 lo(r){return new Ts(r)}function ho(r){return new id(r)}function ad(r){this._context=r}ad.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=sd(r),o=sd(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}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 sd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[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 ii(r){return new ad(r)}function Bs(r,e){this._context=r,this._t=e}Bs.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 oi(r){return new Bs(r,0.5)}function go(r){return new Bs(r,0)}function yo(r){return new Bs(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 gl=new xr(1,0,0);ml.prototype=xr.prototype;function ml(r){while(!r.__zoom)if(!(r=r.parentNode))return gl;return r.__zoom}var de=t((r)=>{let{securityLevel:e}=p(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ed(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ed,"getDefaultExportFromCjs");var Se={},_s={},Cr={},nd;function si(){if(nd)return Cr;nd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let m=d[f];c[m]=n[m]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(si,"requireCommon");var yl,ld;function ai(){if(ld)return yl;ld=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"),qx=t((r,e)=>{if(e!==void 0)No[r]=e},"addStylesForDiagram"),Zg=Rx,lp={};po(lp,{clear:()=>R,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>q,setAccDescription:()=>z,setAccTitle:()=>M,setDiagramTitle:()=>H});var ba="",ka="",wa="",Sa=t((r)=>ee(r,C()),"sanitizeText"),R=t(()=>{ba="",wa="",ka=""},"clear"),M=t((r)=>{ba=Sa(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>ba,"getAccTitle"),z=t((r)=>{wa=Sa(r).replace(/\n\s+/g,`
126
+ `)},"setAccDescription"),j=t(()=>wa,"getAccDescription"),H=t((r)=>{ka=Sa(r)},"setDiagramTitle"),q=t(()=>ka,"getDiagramTitle"),qc=l,Wx=Qu,p=C,da=jf,Ri=Vo,Uo=t((r)=>ee(r,p()),"sanitizeText"),Hl=zr,Nx=t(()=>lp,"getCommonDb"),jo={},Fu=t((r,e,i)=>{if(jo[r])qc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(jo[r]=e,i)Wc(r,i);qx(r,e.styles),e.injectUtils?.(qc,Wx,p,Uo,Hl,Nx(),()=>{})},"registerDiagram"),cp=t((r)=>{if(r in jo)return jo[r];throw new zx(r)},"getDiagram"),zx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class $i extends Map{constructor(r,e=jx){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(Gc(this,r))}has(r){return super.has(Gc(this,r))}set(r,e){return super.set(Hx(this,r),e)}delete(r){return super.delete(Yx(this,r))}}function Gc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Hx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Yx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function jx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Ux={value:()=>{}};function Kc(){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 Xo(i)}function Xo(r){this._=r}function Xx(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}})}Xo.prototype=Kc.prototype={constructor:Xo,on:function(r,e){var i=this._,s=Xx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=Gx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=Vc(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Vc(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 Xo(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 Gx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Vc(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Ux,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Ta=Kc;var Go="http://www.w3.org/1999/xhtml",Ba={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ue(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Ba.hasOwnProperty(e)?{space:Ba[e],local:r}:r}function Vx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Go&&e.documentElement.namespaceURI===Go?e.createElement(r):e.createElementNS(i,r)}}function Kx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Ii(r){var e=Ue(r);return(e.local?Kx:Vx)(e)}function Zx(){}function gr(r){return r==null?Zx:function(){return this.querySelector(r)}}function _a(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new fe(s,this._parents)}function va(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Qx(){return[]}function Yr(r){return r==null?Qx:function(){return this.querySelectorAll(r)}}function Jx(r){return function(){return va(r.apply(this,arguments))}}function La(r){if(typeof r==="function")r=Jx(r);else r=Yr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new fe(s,o)}function Xr(r){return function(){return this.matches(r)}}function Ko(r){return function(e){return e.matches(r)}}var t0=Array.prototype.find;function e0(r){return function(){return t0.call(this.children,r)}}function r0(){return this.firstElementChild}function Fa(r){return this.select(r==null?r0:e0(typeof r==="function"?r:Ko(r)))}var i0=Array.prototype.filter;function o0(){return Array.from(this.children)}function s0(r){return function(){return i0.call(this.children,r)}}function Ma(r){return this.selectAll(r==null?o0:s0(typeof r==="function"?r:Ko(r)))}function Aa(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new fe(s,this._parents)}function Di(r){return Array(r.length)}function Ea(){return new fe(this._enter||this._groups.map(Di),this._parents)}function qi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}qi.prototype={constructor:qi,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 Ia(r){return function(){return r}}function a0(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new qi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function n0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,m=a.length,x=Array(u),b;for(n=0;n<u;++n)if(d=e[n])if(x[n]=b=c.call(d,d.__data__,n,e)+"",f.has(b))o[n]=d;else f.set(b,d);for(n=0;n<m;++n)if(b=c.call(r,a[n],n,a)+"",d=f.get(b))s[n]=d,d.__data__=a[n],f.delete(b);else i[n]=new qi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(x[n])===d)o[n]=d}function l0(r){return r.__data__}function Da(r,e){if(!arguments.length)return Array.from(this,l0);var i=e?n0:a0,s=this._parents,o=this._groups;if(typeof r!=="function")r=Ia(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],m=o[f],x=m.length,b=h0(r.call(u,u&&u.__data__,f,s)),S=b.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(x);i(u,m,T,B,_,b,e);for(var v=0,F=0,I,O;v<S;++v)if(I=T[v]){if(v>=F)F=v+1;while(!(O=B[F])&&++F<S);I._next=O||null}}return c=new fe(c,s),c._enter=n,c._exit=d,c}function h0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Pa(){return new fe(this._exit||this._groups.map(Di),this._parents)}function Ra(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 qa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],m=f.length,x=n[d]=Array(m),b,S=0;S<m;++S)if(b=f[S]||u[S])x[S]=b;for(;d<o;++d)n[d]=i[d];return new fe(n,this._parents)}function Wa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function Na(r){if(!r)r=c0;function e(m,x){return m&&x?r(m.__data__,x.__data__):!m-!x}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new fe(o,this._parents).order()}function c0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function za(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ha(){return Array.from(this)}function Ya(){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 c=s[o];if(c)return c}return null}function ja(){let r=0;for(let e of this)++r;return r}function Ua(){return!this.node()}function Xa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function u0(r){return function(){this.removeAttribute(r)}}function d0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function f0(r,e){return function(){this.setAttribute(r,e)}}function p0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function g0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function m0(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 Ga(r,e){var i=Ue(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?d0:u0:typeof e==="function"?i.local?m0:g0:i.local?p0:f0)(i,e))}function Wi(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function y0(r){return function(){this.style.removeProperty(r)}}function x0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function C0(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 Va(r,e,i){return arguments.length>1?this.each((e==null?y0:typeof e==="function"?C0:x0)(r,e,i==null?"":i)):mr(this.node(),r)}function mr(r,e){return r.style.getPropertyValue(e)||Wi(r).getComputedStyle(r,null).getPropertyValue(e)}function b0(r){return function(){delete this[r]}}function k0(r,e){return function(){this[r]=e}}function w0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ka(r,e){return arguments.length>1?this.each((e==null?b0:typeof e==="function"?w0:k0)(r,e)):this.node()[r]}function Zc(r){return r.trim().split(/^|\s+/)}function Za(r){return r.classList||new Qc(r)}function Qc(r){this._node=r,this._names=Zc(r.getAttribute("class")||"")}Qc.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 Jc(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function tu(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function S0(r){return function(){Jc(this,r)}}function T0(r){return function(){tu(this,r)}}function B0(r,e){return function(){(e.apply(this,arguments)?Jc:tu)(this,r)}}function Qa(r,e){var i=Zc(r+"");if(arguments.length<2){var s=Za(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?S0:T0)(i,e))}function _0(){this.textContent=""}function v0(r){return function(){this.textContent=r}}function L0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ja(r){return arguments.length?this.each(r==null?_0:(typeof r==="function"?L0:v0)(r)):this.node().textContent}function F0(){this.innerHTML=""}function M0(r){return function(){this.innerHTML=r}}function A0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function tn(r){return arguments.length?this.each(r==null?F0:(typeof r==="function"?A0:M0)(r)):this.node().innerHTML}function E0(){if(this.nextSibling)this.parentNode.appendChild(this)}function en(){return this.each(E0)}function $0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rn(){return this.each($0)}function on(r){var e=typeof r==="function"?r:Ii(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function I0(){return null}function sn(r,e){var i=typeof r==="function"?r:Ii(r),s=e==null?I0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function O0(){var r=this.parentNode;if(r)r.removeChild(this)}function an(){return this.each(O0)}function D0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function P0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function nn(r){return this.select(r?P0:D0)}function hn(r){return arguments.length?this.property("__data__",r):this.node().__data__}function R0(r){return function(e){r.call(this,e,this.__data__)}}function q0(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 W0(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 N0(r,e,i){return function(){var s=this.__on,o,a=R0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).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 cn(r,e,i){var s=q0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?N0:W0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function eu(r,e,i){var s=Wi(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 z0(r,e){return function(){return eu(this,r,e)}}function H0(r,e){return function(){return eu(this,r,e.apply(this,arguments))}}function un(r,e){return this.each((typeof e==="function"?H0:z0)(r,e))}function*dn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var pn=[null];function fe(r,e){this._groups=r,this._parents=e}function ru(){return new fe([[document.documentElement]],pn)}function Y0(){return this}fe.prototype=ru.prototype={constructor:fe,select:_a,selectAll:La,selectChild:Fa,selectChildren:Ma,filter:Aa,data:Da,enter:Ea,exit:Pa,join:Ra,merge:qa,selection:Y0,order:Wa,sort:Na,call:za,nodes:Ha,node:Ya,size:ja,empty:Ua,each:Xa,attr:Ga,style:Va,property:Ka,classed:Qa,text:Ja,html:tn,raise:en,lower:rn,append:on,insert:sn,remove:an,clone:nn,datum:hn,on:cn,dispatch:un,[Symbol.iterator]:dn};var sr=ru;function h(r){return typeof r==="string"?new fe([[document.querySelector(r)]],[document.documentElement]):new fe([[r]],pn)}function Fi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Wl(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Li(){}var Ni=0.7,es=1/Ni,Vr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",j0=/^#([0-9a-f]{3,8})$/,U0=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),X0=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),G0=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${zi}\\)$`),V0=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${zi}\\)$`),K0=new RegExp(`^hsl\\(${zi},${Xe},${Xe}\\)$`),Z0=new RegExp(`^hsla\\(${zi},${Xe},${Xe},${zi}\\)$`),iu={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};Fi(Li,Oa,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:ou,formatHex:ou,formatHex8:Q0,formatHsl:J0,formatRgb:su,toString:su});function ou(){return this.rgb().formatHex()}function Q0(){return this.rgb().formatHex8()}function J0(){return uu(this).formatHsl()}function su(){return this.rgb().formatRgb()}function Oa(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=j0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?au(e):i===3?new Dn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(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=U0.exec(r))?new Dn(e[1],e[2],e[3],1):(e=X0.exec(r))?new Dn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=G0.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=V0.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=K0.exec(r))?hu(e[1],e[2]/100,e[3]/100,1):(e=Z0.exec(r))?hu(e[1],e[2]/100,e[3]/100,e[4]):iu.hasOwnProperty(r)?au(iu[r]):r==="transparent"?new Dn(NaN,NaN,NaN,0):null}function au(r){return new Dn(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new Dn(r,e,i,s)}function Hf(r){if(!(r instanceof Li))r=Oa(r);if(!r)return new Dn;return r=r.rgb(),new Dn(r.r,r.g,r.b,r.opacity)}function Kr(r,e,i,s){return arguments.length===1?Hf(r):new Dn(r,e,i,s==null?1:s)}function Dn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Fi(Dn,Kr,Wl(Li,{brighter(r){return r=r==null?es:Math.pow(es,r),new Dn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Ni:Math.pow(Ni,r),new Dn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Dn(Tr(this.r),Tr(this.g),Tr(this.b),rs(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:nu,formatHex:nu,formatHex8:tC,formatRgb:lu,toString:lu}));function nu(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function tC(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function rs(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 hu(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 Pe(r,e,i,s)}function uu(r){if(r instanceof Pe)return new Pe(r.h,r.s,r.l,r.opacity);if(!(r instanceof Li))r=Oa(r);if(!r)return new Pe;if(r instanceof Pe)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),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Pe(c,n,d,r.opacity)}function du(r,e,i,s){return arguments.length===1?uu(r):new Pe(r,e,i,s==null?1:s)}function Pe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Fi(Pe,du,Wl(Li,{brighter(r){return r=r==null?es:Math.pow(es,r),new Pe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Ni:Math.pow(Ni,r),new Pe(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 Dn(gn(r>=240?r-240:r+120,o,s),gn(r,o,s),gn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Pe(cu(this.h),ts(this.s),ts(this.l),rs(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=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${cu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function cu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function gn(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 mn(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function yn(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],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return mn((i-s/e)*e,c,o,a,n)}}function xn(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],c=r[(s+1)%e],n=r[(s+2)%e];return mn((i-s/e)*e,o,a,c,n)}}var Kl=(r)=>()=>r;function fu(r,e){return function(i){return r+i*e}}function eC(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 Xg(r,e){var i=e-r;return i?fu(r,i>180||i<-180?i-360*Math.round(i/360):i):Kl(isNaN(r)?e:r)}function pu(r){return(r=+r)===1?Yo:function(e,i){return i-e?eC(e,i,r):Kl(isNaN(e)?i:e)}}function Yo(r,e){var i=e-r;return i?fu(r,i):Kl(isNaN(r)?e:r)}var Ps=function r(e){var i=pu(e);function s(o,a){var c=i((o=Kr(o)).r,(a=Kr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Yo(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function gu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Kr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var rC=gu(yn),iC=gu(xn);function En(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var bn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(bn.source,"g");function oC(r){return function(){return r}}function sC(r){return function(e){return r(e)+""}}function Vl(r,e){var i=bn.lastIndex=Cn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=bn.exec(r))&&(o=Cn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:En(s,o)});i=Cn.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?sC(d[0].x):oC(e):(e=d.length,function(f){for(var u=0,m;u<e;++u)n[(m=d[u]).i]=m.x(f);return n.join("")})}var mu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*mu,skewX:Math.atan(d)*mu,scaleX:c,scaleY:n}}var ss;function yu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Cu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push("translate(",null,e,null,i);S.push({i:T-4,x:En(f,m)},{i:T-2,x:En(u,x)})}else if(m||x)b.push("translate("+m+e+x+i)}function c(f,u,m,x){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;x.push({i:m.push(o(m)+"rotate(",null,s)-2,x:En(f,u)})}else if(u)m.push(o(m)+"rotate("+u+s)}function n(f,u,m,x){if(f!==u)x.push({i:m.push(o(m)+"skewX(",null,s)-2,x:En(f,u)});else if(u)m.push(o(m)+"skewX("+u+s)}function d(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push(o(b)+"scale(",null,",",null,")");S.push({i:T-4,x:En(f,m)},{i:T-2,x:En(u,x)})}else if(m!==1||x!==1)b.push(o(b)+"scale("+m+","+x+")")}return function(f,u){var m=[],x=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,m,x),c(f.rotate,u.rotate,m,x),n(f.skewX,u.skewX,m,x),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,m,x),f=u=null,function(b){var S=-1,T=x.length,B;while(++S<T)m[(B=x[S]).i]=B.x(b);return m.join("")}}}var kn=Cu(yu,"px, ","px)","deg)"),wn=Cu(xu,", ",")",")");var Zr=0,Yi=0,Hi=0,ku=1000,as,ji,ns=0,Br=0,ls=0,Ui=typeof performance==="object"&&performance.now?performance:Date,wu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Gi(){return Br||(wu(aC),Br=Ui.now()+ls)}function aC(){Br=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=hs.prototype={constructor:Xi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Gi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,Sn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Sn()}};function hs(r,e,i){var s=new Xi;return s.restart(r,e,i),s}function Su(){Gi(),++Zr;var r=as,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Zr}function bu(){Br=(ns=Ui.now())+ls,Zr=Yi=0;try{Su()}finally{Zr=0,lC(),Br=0}}function nC(){var r=Ui.now(),e=r-ns;if(e>ku)ls-=e,ns=r}function lC(){var r,e=as,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:as=i;ji=r,Sn(s)}function Sn(r){if(Zr)return;if(Yi)Yi=clearTimeout(Yi);var e=r-Br;if(e>24){if(r<1/0)Yi=setTimeout(bu,r-Ui.now()-ls);if(Hi)Hi=clearInterval(Hi)}else{if(!Hi)ns=Ui.now(),Hi=setInterval(nC,ku);Zr=1,wu(bu)}}function Vi(r,e,i){var s=new Xi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var hC=Ta("start","end","cancel","interrupt"),cC=[],_u=0,Tu=1,us=2,cs=3,Bu=4,ds=5,Ki=6;function ar(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;uC(r,i,{name:e,index:s,group:o,on:hC,tween:cC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:_u})}function Zi(r,e){var i=xe(r,e);if(i.state>_u)throw Error("too late; already scheduled");return i}function be(r,e){var i=xe(r,e);if(i.state>cs)throw Error("too late; already running");return i}function xe(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function uC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=Tu,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,m,x,b;if(i.state!==Tu)return d();for(u in s){if(b=s[u],b.name!==i.name)continue;if(b.state===cs)return Vi(c);if(b.state===Bu)b.state=Ki,b.timer.stop(),b.on.call("interrupt",r,r.__data__,b.index,b.group),delete s[u];else if(+u<e)b.state=Ki,b.timer.stop(),b.on.call("cancel",r,r.__data__,b.index,b.group),delete s[u]}if(Vi(function(){if(i.state===cs)i.state=Bu,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(x=i.tween.length);for(u=0,m=-1;u<x;++u)if(b=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++m]=b;o.length=m+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),m=-1,x=o.length;while(++m<x)o[m].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Ki,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function Ji(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=Ki,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function _n(r){return this.each(function(){Ji(this,r)})}function dC(r,e){var i,s;return function(){var o=be(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function fC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=be(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function vn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=xe(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?dC:fC)(i,r,e))}function Qr(r,e,i){var s=r._id;return r.each(function(){var o=be(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return xe(o,s).value[e]}}function to(r,e){var i;return(typeof e==="number"?En:e instanceof Oa?Ps:(i=Oa(e))?(e=i,Ps):Vl)(r,e)}function pC(r){return function(){this.removeAttribute(r)}}function gC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function mC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function yC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function xC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function CC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function Ln(r,e){var i=Ue(r),s=i==="transform"?wn:to;return this.attrTween(r,typeof e==="function"?(i.local?CC:xC)(i,s,Qr(this,"attr."+r,e)):e==null?(i.local?gC:pC)(i):(i.local?yC:mC)(i,s,e))}function bC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function kC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function wC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&kC(r,a);return i}return o._value=e,o}function SC(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 Fn(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=Ue(r);return this.tween(i,(s.local?wC:SC)(s,e))}function TC(r,e){return function(){Zi(this,r).delay=+e.apply(this,arguments)}}function BC(r,e){return e=+e,function(){Zi(this,r).delay=e}}function Mn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?TC:BC)(e,r)):xe(this.node(),e).delay}function _C(r,e){return function(){be(this,r).duration=+e.apply(this,arguments)}}function vC(r,e){return e=+e,function(){be(this,r).duration=e}}function An(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?_C:vC)(e,r)):xe(this.node(),e).duration}function LC(r,e){if(typeof e!=="function")throw Error();return function(){be(this,r).ease=e}}function $n(r){var e=this._id;return arguments.length?this.each(LC(e,r)):xe(this.node(),e).ease}function FC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();be(this,r).ease=i}}function In(r){if(typeof r!=="function")throw Error();return this.each(FC(this._id,r))}function On(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new ve(s,this._parents,this._name,this._id)}function Pn(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),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,m=c[n]=Array(u),x,b=0;b<u;++b)if(x=d[b]||f[b])m[b]=x;for(;n<s;++n)c[n]=e[n];return new ve(c,this._parents,this._name,this._id)}function MC(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 AC(r,e,i){var s,o,a=MC(e)?Zi:be;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function Rn(r,e){var i=this._id;return arguments.length<2?xe(this.node(),i).on.on(r):this.each(AC(i,r,e))}function EC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function qn(){return this.on("end.remove",EC(this._id))}function zn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,m,x=0;x<d;++x)if((u=n[x])&&(m=r.call(u,u.__data__,x,n))){if("__data__"in u)m.__data__=u.__data__;f[x]=m,ar(f[x],e,i,x,f,xe(u,i))}return new ve(a,this._parents,e,i)}function Hn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Yr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,m=0;m<f;++m)if(u=d[m]){for(var x=r.call(u,u.__data__,m,d),b,S=xe(u,i),T=0,B=x.length;T<B;++T)if(b=x[T])ar(b,e,i,T,x,S);a.push(x),c.push(u)}return new ve(a,c,e,i)}var $C=sr.prototype.constructor;function jn(){return new $C(this._groups,this._parents)}function IC(r,e){var i,s,o;return function(){var a=mr(this,r),c=(this.style.removeProperty(r),mr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function vu(r){return function(){this.style.removeProperty(r)}}function OC(r,e,i){var s,o=i+"",a;return function(){var c=mr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function DC(r,e,i){var s,o,a;return function(){var c=mr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),mr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function PC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=be(this,r),f=d.on,u=d.value[a]==null?n||(n=vu(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function Un(r,e,i){var s=(r+="")==="transform"?kn:to;return e==null?this.styleTween(r,IC(r,s)).on("end.style."+r,vu(r)):typeof e==="function"?this.styleTween(r,DC(r,s,Qr(this,"style."+r,e))).each(PC(this._id,r)):this.styleTween(r,OC(r,s,e),i).on("end.style."+r,null)}function RC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function qC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&RC(r,c,i);return s}return a._value=e,a}function Xn(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,qC(r,e,i==null?"":i))}function WC(r){return function(){this.textContent=r}}function NC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Gn(r){return this.tween("text",typeof r==="function"?NC(Qr(this,"text",r)):WC(r==null?"":r+""))}function zC(r){return function(e){this.textContent=r.call(this,e)}}function HC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&zC(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,HC(r))}function Jn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=xe(d,e);ar(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ve(s,this._parents,r,i)}function tl(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=be(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var YC=0;function ve(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Au(r){return sr().transition(r)}function fs(){return++YC}var nr=sr.prototype;ve.prototype=Au.prototype={constructor:ve,select:zn,selectAll:Hn,selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:On,merge:Pn,selection:jn,transition:Jn,call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:Rn,attr:Ln,attrTween:Fn,style:Un,styleTween:Xn,text:Gn,textTween:Zn,remove:qn,tween:vn,delay:Mn,duration:An,ease:$n,easeVarying:In,end:tl,[Symbol.iterator]:nr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var jC={time:null,delay:0,duration:250,ease:ps};function UC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function el(r){var e,i;if(r instanceof ve)e=r._id,r=r._name;else e=fs(),(i=jC).time=Gi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])ar(d,r,e,f,c,i||UC(d,e));return new ve(s,this._parents,r,e)}sr.prototype.interrupt=_n;sr.prototype.transition=el;var{abs:oF,max:sF,min:aF}=Math;function Eu(r){return[+r[0],+r[1]]}function XC(r){return[Eu(r[0]),Eu(r[1])]}var nF={name:"x",handles:["w","e"].map(rl),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]]}},lF={name:"y",handles:["n","s"].map(rl),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]]}},hF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rl),input:function(r){return r==null?null:XC(r)},output:function(r){return r}};function rl(r){return{type:r}}var il=Math.PI,ol=2*il;var GC=ol-0.000001;function Iu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function VC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Iu;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 Jr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Iu:VC(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,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,m=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(m>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let x=i-a,b=s-c,S=n*n+d*d,T=x*x+b*b,B=Math.sqrt(S),_=Math.sqrt(m),v=o*Math.tan((il-Math.acos((S+m-T)/(2*B*_)))/2),F=v/_,I=v/B;if(Math.abs(F-1)>0.000001)this._append`L${r+F*f},${e+F*u}`;this._append`A${o},${o},0,0,${+(u*x>f*b)},${this._x1=r+I*n},${this._y1=e+I*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,m=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(m<0)m=m%ol+ol;if(m>GC)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(m>0.000001)this._append`A${i},${i},0,${+(m>=il)},${u},${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 Du(){return new Jr}Du.prototype=Jr.prototype;function Ao(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var sl=Symbol("implicit");function Wn(){var r=new $i,e=[],i=[],s=sl;function o(a){let c=r.get(a);if(c===void 0){if(s!==sl)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new $i;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-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 Wn(e,i).unknown(s)},Ao.apply(o,arguments),o}function yt(r){return function(){return r}}var{abs:al,atan2:ke,cos:yr,max:qu,min:gs,sin:Re,sqrt:_r}=Math,Ce=0.000000000001,ti=Math.PI,eo=ti/2,Yl=2*ti;function Wu(r){return r>1?0:r<-1?ti:Math.acos(r)}function nl(r){return r>=1?eo:r<=-1?-eo:Math.asin(r)}function ms(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 Jr(e)}function KC(r){return r.innerRadius}function ZC(r){return r.outerRadius}function QC(r){return r.startAngle}function JC(r){return r.endAngle}function tb(r){return r&&r.padAngle}function eb(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,m=n-a,x=m*d-u*f;if(x*x<Ce)return;return x=(u*(e-a)-m*(r-o))/x,[r+x*d,e+x*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/_r(n*n+d*d),u=f*d,m=-f*n,x=r+u,b=e+m,S=i+u,T=s+m,B=(x+S)/2,_=(b+T)/2,v=S-x,F=T-b,I=v*v+F*F,O=o-a,K=x*T-S*b,Z=(F<0?-1:1)*_r(qu(0,O*O*I-K*K)),rt=(K*F-v*Z)/I,st=(-K*v-F*Z)/I,ut=(K*F+v*Z)/I,ct=(-K*v+F*Z)/I,nt=rt-B,D=st-_,U=ut-B,it=ct-_;if(nt*nt+D*D>U*U+it*it)rt=ut,st=ct;return{cx:rt,cy:st,x01:-u,y01:-m,x11:rt*(o/O-1),y11:st*(o/O-1)}}function Ur(){var r=KC,e=ZC,i=yt(0),s=null,o=QC,a=JC,c=tb,n=null,d=ms(f);function f(){var u,m,x=+r.apply(this,arguments),b=+e.apply(this,arguments),S=o.apply(this,arguments)-eo,T=a.apply(this,arguments)-eo,B=al(T-S),_=T>S;if(!n)n=u=d();if(b<x)m=b,b=x,x=m;if(!(b>Ce))n.moveTo(0,0);else if(B>Yl-Ce){if(n.moveTo(b*yr(S),b*Re(S)),n.arc(0,0,b,S,T,!_),x>Ce)n.moveTo(x*yr(T),x*Re(T)),n.arc(0,0,x,T,S,_)}else{var v=S,F=T,I=S,O=T,K=B,Z=B,rt=c.apply(this,arguments)/2,st=rt>Ce&&(s?+s.apply(this,arguments):_r(x*x+b*b)),ut=gs(al(b-x)/2,+i.apply(this,arguments)),ct=ut,nt=ut,D,U;if(st>Ce){var it=nl(st/x*Re(rt)),P=nl(st/b*Re(rt));if((K-=it*2)>Ce)it*=_?1:-1,I+=it,O-=it;else K=0,I=O=(S+T)/2;if((Z-=P*2)>Ce)P*=_?1:-1,v+=P,F-=P;else Z=0,v=F=(S+T)/2}var ht=b*yr(v),lt=b*Re(v),Bt=x*yr(O),At=x*Re(O);if(ut>Ce){var Gt=b*yr(F),Vt=b*Re(F),Qt=x*yr(I),Jt=x*Re(I),Pt;if(B<ti)if(Pt=eb(ht,lt,Qt,Jt,Gt,Vt,Bt,At)){var It=ht-Pt[0],zt=lt-Pt[1],Kt=Gt-Pt[0],Ut=Vt-Pt[1],le=1/Re(Wu((It*Kt+zt*Ut)/(_r(It*It+zt*zt)*_r(Kt*Kt+Ut*Ut)))/2),ne=_r(Pt[0]*Pt[0]+Pt[1]*Pt[1]);ct=gs(ut,(x-ne)/(le-1)),nt=gs(ut,(b-ne)/(le+1))}else ct=nt=0}if(!(Z>Ce))n.moveTo(ht,lt);else if(nt>Ce)if(D=ys(Qt,Jt,ht,lt,b,nt,_),U=ys(Gt,Vt,Bt,At,b,nt,_),n.moveTo(D.cx+D.x01,D.cy+D.y01),nt<ut)n.arc(D.cx,D.cy,nt,ke(D.y01,D.x01),ke(U.y01,U.x01),!_);else n.arc(D.cx,D.cy,nt,ke(D.y01,D.x01),ke(D.y11,D.x11),!_),n.arc(0,0,b,ke(D.cy+D.y11,D.cx+D.x11),ke(U.cy+U.y11,U.cx+U.x11),!_),n.arc(U.cx,U.cy,nt,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.moveTo(ht,lt),n.arc(0,0,b,v,F,!_);if(!(x>Ce)||!(K>Ce))n.lineTo(Bt,At);else if(ct>Ce)if(D=ys(Bt,At,Gt,Vt,x,-ct,_),U=ys(ht,lt,Qt,Jt,x,-ct,_),n.lineTo(D.cx+D.x01,D.cy+D.y01),ct<ut)n.arc(D.cx,D.cy,ct,ke(D.y01,D.x01),ke(U.y01,U.x01),!_);else n.arc(D.cx,D.cy,ct,ke(D.y01,D.x01),ke(D.y11,D.x11),!_),n.arc(0,0,x,ke(D.cy+D.y11,D.cx+D.x11),ke(U.cy+U.y11,U.cx+U.x11),_),n.arc(U.cx,U.cy,ct,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.arc(0,0,x,O,I,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,m=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[yr(m)*u,Re(m)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:yt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:yt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:yt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:yt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:yt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:yt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:yt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var zF=Array.prototype.slice;function Lu(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Nu(r){this._context=r}Nu.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 pa(r){return new Nu(r)}function Hu(r){return r[0]}function Yu(r){return r[1]}function Os(r,e){var i=yt(!0),s=null,o=pa,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Hu:yt(r),e=typeof e==="function"?e:e===void 0?Yu:yt(e);function n(d){var f,u=(d=Lu(d)).length,m,x=!1,b;if(s==null)a=o(b=c());for(f=0;f<=u;++f){if(!(f<u&&i(m=d[f],f,d))===x)if(x=!x)a.lineStart();else a.lineEnd();if(x)a.point(+r(m,f,d),+e(m,f,d))}if(b)return a=null,b+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:yt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:yt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:yt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class ll{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 ro(r){return new ll(r,!0)}function io(r){return new ll(r,!1)}function Ae(){}function ei(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 oo(r){this._context=r}oo.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:ei(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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new oo(r)}function ju(r){this._context=r}ju.prototype={areaStart:Ae,areaEnd:Ae,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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new ju(r)}function Xu(r){this._context=r}Xu.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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Gu(r,e){this._basis=new oo(r),this._beta=e}Gu.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,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var hl=function r(e){function i(s){return e===1?new oo(s):new Gu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(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 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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ri(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:ri(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 so=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:Ae,areaEnd:Ae,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:ri(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 cl=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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:ri(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 ul=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ao(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>Ce){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>Ce){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function Vu(r,e){this._context=r,this._alpha=e}Vu.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:ao(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 no=function r(e){function i(s){return e?new Vu(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ku(r,e){this._context=r,this._alpha=e}Ku.prototype={areaStart:Ae,areaEnd:Ae,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:ao(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 dl=function r(e){function i(s){return e?new Ku(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.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:ao(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 fl=function r(e){function i(s){return e?new Zu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ju(r){this._context=r}Ju.prototype={areaStart:Ae,areaEnd:Ae,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 Ss(r){return new Ju(r)}function td(r){return r<0?-1:1}function ed(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(td(a)+td(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function rd(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function pl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:pl(this,this._t0,rd(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,pl(this,rd(this,i=ed(this,r,e)),i);break;default:pl(this,this._t0,i=ed(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function id(r){this._context=new od(r)}(id.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function od(r){this._context=r}od.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 lo(r){return new Ts(r)}function co(r){return new id(r)}function ad(r){this._context=r}ad.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=sd(r),o=sd(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}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 sd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[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 ii(r){return new ad(r)}function Bs(r,e){this._context=r,this._t=e}Bs.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 oi(r){return new Bs(r,0.5)}function uo(r){return new Bs(r,0)}function go(r){return new Bs(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 gl=new xr(1,0,0);ml.prototype=xr.prototype;function ml(r){while(!r.__zoom)if(!(r=r.parentNode))return gl;return r.__zoom}var de=t((r)=>{let{securityLevel:e}=p(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ed(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ed,"getDefaultExportFromCjs");var Se={},_s={},Cr={},nd;function si(){if(nd)return Cr;nd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let m=d[f];c[m]=n[m]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(si,"requireCommon");var yl,ld;function ai(){if(ld)return yl;ld=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
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"),yl=e,yl}t(ai,"requireException");var xl,hd;function $d(){if(hd)return xl;hd=1;let r=si();function e(o,a,c,n,d){let f="",u="",m=Math.floor(d/2)-1;if(n-a>m)f=" ... ",a=n-m+f.length;if(c-n>m)u=" ...",c=n+m-u.length;return{str:f+o.slice(a,c).replace(/\t/g,"→")+u,pos:n-a+f.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 c=/\r?\n|\r|\0/g,n=[0],d=[],f,u=-1;while(f=c.exec(o.buffer))if(d.push(f.index),n.push(f.index+f[0].length),o.position<=f.index&&u<0)u=n.length-2;if(u<0)u=n.length-1;let m="",x=Math.min(o.line+a.linesAfter,d.length).toString().length,b=a.maxLength-(a.indent+x+3);for(let T=1;T<=a.linesBefore;T++){if(u-T<0)break;let B=e(o.buffer,n[u-T],d[u-T],o.position-(n[u]-n[u-T]),b);m=r.repeat(" ",a.indent)+i((o.line-T+1).toString(),x)+" | "+B.str+`
129
129
  `+m}let S=e(o.buffer,n[u],d[u],o.position,b);m+=r.repeat(" ",a.indent)+i((o.line+1).toString(),x)+" | "+S.str+`
130
130
  `,m+=r.repeat("-",a.indent+x+3+S.pos)+`^
131
131
  `;for(let T=1;T<=a.linesAfter;T++){if(u+T>=d.length)break;let B=e(o.buffer,n[u+T],d[u+T],o.position-(n[u]-n[u+T]),b);m+=r.repeat(" ",a.indent)+i((o.line+T+1).toString(),x)+" | "+B.str+`
132
- `}return m.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t($d,"requireSnippet");var Cl,cd;function Te(){if(cd)return Cl;cd=1;let r=ai(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let c={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(d){c[String(d)]=n})});return c}t(s,"compileStyleAliases");function o(a,c){if(c=c||{},Object.keys(c).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(n){return n},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(Te,"requireType");var bl,ud;function th(){if(ud)return bl;ud=1;let r=ai(),e=Te();function i(a,c){let n=[];return a[c].forEach(function(d){let f=n.length;n.forEach(function(u,m){if(u.tag===d.tag&&u.kind===d.kind&&u.multi===d.multi)f=m}),n[f]=d}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(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(c,"collectType");for(let n=0,d=arguments.length;n<d;n+=1)arguments[n].forEach(c);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let n=[],d=[];if(c instanceof e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)n=n.concat(c.implicit);if(c.explicit)d=d.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.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(u.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(n),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},"extend"),bl=o,bl}t(th,"requireSchema");var kl,dd;function eh(){if(dd)return kl;return dd=1,kl=new(Te())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(eh,"requireStr");var wl,fd;function rh(){if(fd)return wl;return fd=1,wl=new(Te())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(rh,"requireSeq");var Sl,pd;function ih(){if(pd)return Sl;return pd=1,Sl=new(Te())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(ih,"requireMap");var Tl,gd;function oh(){if(gd)return Tl;return gd=1,Tl=new(th())({explicit:[eh(),rh(),ih()]}),Tl}t(oh,"requireFailsafe");var Bl,md;function sh(){if(md)return Bl;md=1;let r=Te();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"),Bl=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"}),Bl}t(sh,"require_null");var _l,yd;function ah(){if(yd)return _l;yd=1;let r=Te();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"),_l=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"}),_l}t(ah,"requireBool");var vl,xd;function nh(){if(xd)return vl;xd=1;let r=si(),e=Te();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}t(i,"isHexCode");function s(f){return f>=48&&f<=55}t(s,"isOctCode");function o(f){return f>=48&&f<=57}t(o,"isDecCode");function a(f){if(f===null)return!1;let u=f.length,m=0,x=!1;if(!u)return!1;let b=f[m];if(b==="-"||b==="+")b=f[++m];if(b==="0"){if(m+1===u)return!0;if(b=f[++m],b==="b"){m++;for(;m<u;m++){if(b=f[m],b!=="0"&&b!=="1")return!1;x=!0}return x&&isFinite(c(f))}if(b==="x"){m++;for(;m<u;m++){if(!i(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}if(b==="o"){m++;for(;m<u;m++){if(!s(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}}for(;m<u;m++){if(!o(f.charCodeAt(m)))return!1;x=!0}if(!x)return!1;return isFinite(c(f))}t(a,"resolveYamlInteger");function c(f){let u=f,m=1,x=u[0];if(x==="-"||x==="+"){if(x==="-")m=-1;u=u.slice(1),x=u[0]}if(u==="0")return 0;if(x==="0"){if(u[1]==="b")return m*parseInt(u.slice(2),2);if(u[1]==="x")return m*parseInt(u.slice(2),16);if(u[1]==="o")return m*parseInt(u.slice(2),8)}return m*parseInt(u,10)}t(c,"parseYamlInteger");function n(f){return c(f)}t(n,"constructYamlInteger");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!r.isNegativeZero(f))}return t(d,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:d,represent:{binary:t(function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},"binary"),octal:t(function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},"octal"),decimal:t(function(f){return f.toString(10)},"decimal"),hexadecimal:t(function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(nh,"requireInt");var Ll,Cd;function lh(){if(Cd)return Ll;Cd=1;let r=si(),e=Te(),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(f){if(f===null)return!1;if(!i.test(f))return!1;if(isFinite(parseFloat(f,10)))return!0;return s.test(f)}t(o,"resolveYamlFloat");function a(f){let u=f.toLowerCase(),m=u[0]==="-"?-1:1;if("+-".indexOf(u[0])>=0)u=u.slice(1);if(u===".inf")return m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(u===".nan")return NaN;return m*parseFloat(u,10)}t(a,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function n(f,u){if(isNaN(f))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return c.test(m)?m.replace("e",".e"):m}t(n,"representYamlFloat");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}return t(d,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),Ll}t(lh,"requireFloat");var Fl,bd;function hh(){if(bd)return Fl;return bd=1,Fl=oh().extend({implicit:[sh(),ah(),nh(),lh()]}),Fl}t(hh,"requireJson");var Ml,kd;function ch(){if(kd)return Ml;return kd=1,Ml=hh(),Ml}t(ch,"requireCore");var Al,wd;function uh(){if(wd)return Al;wd=1;let r=Te(),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(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let n=0,d=null,f=e.exec(c);if(f===null)f=i.exec(c);if(f===null)throw Error("Date resolve error");let u=+f[1],m=+f[2]-1,x=+f[3];if(!f[4])return new Date(Date.UTC(u,m,x));let b=+f[4],S=+f[5],T=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let _=+f[10],v=+(f[11]||0);if(d=(_*60+v)*60000,f[9]==="-")d=-d}let B=new Date(Date.UTC(u,m,x,b,S,T,n));if(d)B.setTime(B.getTime()-d);return B}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),Al=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Al}t(uh,"requireTimestamp");var El,Sd;function dh(){if(Sd)return El;Sd=1;let r=Te();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(dh,"requireMerge");var Il,Td;function fh(){if(Td)return Il;Td=1;let r=Te(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
- \r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let m=f.indexOf(c.charAt(u));if(m>64)continue;if(m<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,m=[];for(let b=0;b<d;b++){if(b%4===0&&b)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);u=u<<6|f.indexOf(n.charAt(b))}let x=d%4*6;if(x===0)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);else if(x===18)m.push(u>>10&255),m.push(u>>2&255);else if(x===12)m.push(u>>4&255);return new Uint8Array(m)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let x=0;x<f;x++){if(x%3===0&&x)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[x]}let m=f%3;if(m===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(m===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(m===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(a,"isBinary"),Il=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),Il}t(fh,"requireBinary");var Dl,Bd;function ph(){if(Bd)return Dl;Bd=1;let r=Te(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],m=!1;if(i.call(u)!=="[object Object]")return!1;let x;for(x in u)if(e.call(u,x))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(x)===-1)c.push(x);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Dl=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Dl}t(ph,"requireOmap");var Pl,_d;function gh(){if(_d)return Pl;_d=1;let r=Te(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Pl=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Pl}t(gh,"requirePairs");var Rl,vd;function mh(){if(vd)return Rl;vd=1;let r=Te(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Rl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Rl}t(mh,"requireSet");var Nl,Ld;function vs(){if(Ld)return Nl;return Ld=1,Nl=ch().extend({implicit:[uh(),dh()],explicit:[fh(),ph(),gh(),mh()]}),Nl}t(vs,"require_default");var Fd;function Id(){if(Fd)return _s;Fd=1;let r=si(),e=ai(),i=$d(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,m=3,x=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/[\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 F(k){return k===9||k===32}t(F,"isWhiteSpace");function I(k){return k===9||k===32||k===10||k===13}t(I,"isWsOrEol");function O(k){return k===44||k===91||k===93||k===123||k===125}t(O,"isFlowIndicator");function K(k){if(k>=48&&k<=57)return k-48;let ot=k|32;if(ot>=97&&ot<=102)return ot-97+10;return-1}t(K,"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 rt(k){if(k>=48&&k<=57)return k-48;return-1}t(rt,"fromDecimalCode");function st(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(st,"simpleEscapeSequence");function ut(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ut,"charFromCodepoint");function ct(k,ot,gt){if(ot==="__proto__")Object.defineProperty(k,ot,{configurable:!0,enumerable:!0,writable:!0,value:gt});else k[ot]=gt}t(ct,"setProperty");let nt=Array(256),D=Array(256);for(let k=0;k<256;k++)nt[k]=st(k)?1:0,D[k]=st(k);function U(k,ot){this.input=k,this.filename=ot.filename||null,this.schema=ot.schema||s,this.onWarning=ot.onWarning||null,this.legacy=ot.legacy||!1,this.json=ot.json||!1,this.listener=ot.listener||null,this.maxDepth=typeof ot.maxDepth==="number"?ot.maxDepth:100,this.maxTotalMergeKeys=typeof ot.maxTotalMergeKeys==="number"?ot.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(U,"State");function it(k,ot){let gt={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return gt.snippet=i(gt),new e(ot,gt)}t(it,"generateError");function P(k,ot){throw it(k,ot)}t(P,"throwError");function ht(k,ot){if(k.onWarning)k.onWarning.call(null,it(k,ot))}t(ht,"throwWarning");function lt(k,ot,gt){let bt=k.anchorMapTransactions;if(bt.length!==0){let dt=bt[bt.length-1];if(!o.call(dt,ot))dt[ot]={existed:o.call(k.anchorMap,ot),value:k.anchorMap[ot]}}k.anchorMap[ot]=gt}t(lt,"storeAnchor");function Bt(k){k.anchorMapTransactions.push(Object.create(null))}t(Bt,"beginAnchorTransaction");function vt(k){let ot=k.anchorMapTransactions.pop(),gt=k.anchorMapTransactions;if(gt.length===0)return;let bt=gt[gt.length-1],dt=Object.keys(ot);for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt[Tt];if(!o.call(bt,at))bt[at]=ot[at]}}t(vt,"commitAnchorTransaction");function Xt(k){let ot=k.anchorMapTransactions.pop(),gt=Object.keys(ot);for(let bt=gt.length-1;bt>=0;bt-=1){let dt=ot[gt[bt]];if(dt.existed)k.anchorMap[gt[bt]]=dt.value;else delete k.anchorMap[gt[bt]]}}t(Xt,"rollbackAnchorTransaction");function Vt(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(Vt,"snapshotState");function Qt(k,ot){k.position=ot.position,k.line=ot.line,k.lineStart=ot.lineStart,k.lineIndent=ot.lineIndent,k.firstTabInLine=ot.firstTabInLine,k.tag=ot.tag,k.anchor=ot.anchor,k.kind=ot.kind,k.result=ot.result}t(Qt,"restoreState");let Jt={YAML:t(function(ot,gt,bt){if(ot.version!==null)P(ot,"duplication of %YAML directive");if(bt.length!==1)P(ot,"YAML directive accepts exactly one argument");let dt=/^([0-9]+)\.([0-9]+)$/.exec(bt[0]);if(dt===null)P(ot,"ill-formed argument of the YAML directive");let Tt=parseInt(dt[1],10),E=parseInt(dt[2],10);if(Tt!==1)P(ot,"unacceptable YAML version of the document");if(ot.version=bt[0],ot.checkLineBreaks=E<2,E!==1&&E!==2)ht(ot,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(ot,gt,bt){let dt;if(bt.length!==2)P(ot,"TAG directive accepts exactly two arguments");let Tt=bt[0];if(dt=bt[1],!T.test(Tt))P(ot,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(ot.tagMap,Tt))P(ot,'there is a previously declared suffix for "'+Tt+'" tag handle');if(!B.test(dt))P(ot,"ill-formed tag prefix (second argument) of the TAG directive");try{dt=decodeURIComponent(dt)}catch(E){P(ot,"tag prefix is malformed: "+dt)}ot.tagMap[Tt]=dt},"handleTagDirective")};function Dt(k,ot,gt,bt){if(ot<gt){let dt=k.input.slice(ot,gt);if(bt)for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt.charCodeAt(Tt);if(!(at===9||at>=32&&at<=1114111))P(k,"expected valid JSON character")}else if(x.test(dt))P(k,"the stream contains non-printable characters");k.result+=dt}}t(Dt,"captureSegment");function At(k,ot,gt,bt){if(!r.isObject(gt))P(k,"cannot merge mappings; the provided source object is unacceptable");let dt=Object.keys(gt);for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt[Tt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)P(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(ot,at))ct(ot,at,gt[at]),bt[at]=!0}}t(At,"mergeMappings");function Nt(k,ot,gt,bt,dt,Tt,E,at,wt){if(Array.isArray(dt)){dt=Array.prototype.slice.call(dt);for(let xt=0,Ct=dt.length;xt<Ct;xt+=1){if(Array.isArray(dt[xt]))P(k,"nested arrays are not supported inside keys");if(typeof dt==="object"&&_(dt[xt])==="[object Object]")dt[xt]="[object Object]"}}if(typeof dt==="object"&&_(dt)==="[object Object]")dt="[object Object]";if(dt=String(dt),ot===null)ot={};if(bt==="tag:yaml.org,2002:merge")if(Array.isArray(Tt))for(let xt=0,Ct=Tt.length;xt<Ct;xt+=1)At(k,ot,Tt[xt],gt);else At(k,ot,Tt,gt);else{if(!k.json&&!o.call(gt,dt)&&o.call(ot,dt))k.line=E||k.line,k.lineStart=at||k.lineStart,k.position=wt||k.position,P(k,"duplicated mapping key");ct(ot,dt,Tt),delete gt[dt]}return ot}t(Nt,"storeMappingPair");function Kt(k){let ot=k.input.charCodeAt(k.position);if(ot===10)k.position++;else if(ot===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else P(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Kt,"readLineBreak");function Yt(k,ot,gt){let bt=0,dt=k.input.charCodeAt(k.position);while(dt!==0){while(F(dt)){if(dt===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;dt=k.input.charCodeAt(++k.position)}if(ot&&dt===35)do dt=k.input.charCodeAt(++k.position);while(dt!==10&&dt!==13&&dt!==0);if(v(dt)){Kt(k),dt=k.input.charCodeAt(k.position),bt++,k.lineIndent=0;while(dt===32)k.lineIndent++,dt=k.input.charCodeAt(++k.position)}else break}if(gt!==-1&&bt!==0&&k.lineIndent<gt)ht(k,"deficient indentation");return bt}t(Yt,"skipSeparationSpace");function le(k){let ot=k.position,gt=k.input.charCodeAt(ot);if((gt===45||gt===46)&&gt===k.input.charCodeAt(ot+1)&&gt===k.input.charCodeAt(ot+2)){if(ot+=3,gt=k.input.charCodeAt(ot),gt===0||I(gt))return!0}return!1}t(le,"testDocumentSeparator");function ne(k,ot){if(ot===1)k.result+=" ";else if(ot>1)k.result+=r.repeat(`
135
- `,ot-1)}t(ne,"writeFoldedLines");function er(k,ot,gt){let bt,dt,Tt,E,at,wt,{kind:xt,result:Ct}=k,St=k.input.charCodeAt(k.position);if(I(St)||O(St)||St===35||St===38||St===42||St===33||St===124||St===62||St===39||St===34||St===37||St===64||St===96)return!1;if(St===63||St===45){let kt=k.input.charCodeAt(k.position+1);if(I(kt)||gt&&O(kt))return!1}k.kind="scalar",k.result="",bt=dt=k.position,Tt=!1;while(St!==0){if(St===58){let kt=k.input.charCodeAt(k.position+1);if(I(kt)||gt&&O(kt))break}else if(St===35){let kt=k.input.charCodeAt(k.position-1);if(I(kt))break}else if(k.position===k.lineStart&&le(k)||gt&&O(St))break;else if(v(St))if(E=k.line,at=k.lineStart,wt=k.lineIndent,Yt(k,!1,-1),k.lineIndent>=ot){Tt=!0,St=k.input.charCodeAt(k.position);continue}else{k.position=dt,k.line=E,k.lineStart=at,k.lineIndent=wt;break}if(Tt)Dt(k,bt,dt,!1),ne(k,k.line-E),bt=dt=k.position,Tt=!1;if(!F(St))dt=k.position+1;St=k.input.charCodeAt(++k.position)}if(Dt(k,bt,dt,!1),k.result)return!0;return k.kind=xt,k.result=Ct,!1}t(er,"readPlainScalar");function Dr(k,ot){let gt,bt,dt=k.input.charCodeAt(k.position);if(dt!==39)return!1;k.kind="scalar",k.result="",k.position++,gt=bt=k.position;while((dt=k.input.charCodeAt(k.position))!==0)if(dt===39)if(Dt(k,gt,k.position,!0),dt=k.input.charCodeAt(++k.position),dt===39)gt=k.position,k.position++,bt=k.position;else return!0;else if(v(dt))Dt(k,gt,bt,!0),ne(k,Yt(k,!1,ot)),gt=bt=k.position;else if(k.position===k.lineStart&&le(k))P(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!F(dt))bt=k.position;P(k,"unexpected end of the stream within a single quoted scalar")}t(Dr,"readSingleQuotedScalar");function ze(k,ot){let gt,bt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==34)return!1;k.kind="scalar",k.result="",k.position++,gt=bt=k.position;while((Tt=k.input.charCodeAt(k.position))!==0)if(Tt===34)return Dt(k,gt,k.position,!0),k.position++,!0;else if(Tt===92){if(Dt(k,gt,k.position,!0),Tt=k.input.charCodeAt(++k.position),v(Tt))Yt(k,!1,ot);else if(Tt<256&&nt[Tt])k.result+=D[Tt],k.position++;else if((dt=Z(Tt))>0){let E=dt,at=0;for(;E>0;E--)if(Tt=k.input.charCodeAt(++k.position),(dt=K(Tt))>=0)at=(at<<4)+dt;else P(k,"expected hexadecimal character");k.result+=ut(at),k.position++}else P(k,"unknown escape sequence");gt=bt=k.position}else if(v(Tt))Dt(k,gt,bt,!0),ne(k,Yt(k,!1,ot)),gt=bt=k.position;else if(k.position===k.lineStart&&le(k))P(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!F(Tt))bt=k.position;P(k,"unexpected end of the stream within a double quoted scalar")}t(ze,"readDoubleQuotedScalar");function yi(k,ot){let gt=!0,bt,dt,Tt,E=k.tag,at,wt=k.anchor,xt,Ct,St,kt,Et=Object.create(null),Mt,Pt,zt,re=k.input.charCodeAt(k.position);if(re===91)xt=93,kt=!1,at=[];else if(re===123)xt=125,kt=!0,at={};else return!1;if(k.anchor!==null)lt(k,k.anchor,at);re=k.input.charCodeAt(++k.position);while(re!==0){if(Yt(k,!0,ot),re=k.input.charCodeAt(k.position),re===xt)return k.position++,k.tag=E,k.anchor=wt,k.kind=kt?"mapping":"sequence",k.result=at,!0;else if(!gt)P(k,"missed comma between flow collection entries");else if(re===44)P(k,"expected the node content, but found ','");if(Pt=Mt=zt=null,Ct=St=!1,re===63){let he=k.input.charCodeAt(k.position+1);if(I(he))Ct=St=!0,k.position++,Yt(k,!0,ot)}if(bt=k.line,dt=k.lineStart,Tt=k.position,De(k,ot,a,!1,!0),Pt=k.tag,Mt=k.result,Yt(k,!0,ot),re=k.input.charCodeAt(k.position),(St||k.line===bt)&&re===58)Ct=!0,re=k.input.charCodeAt(++k.position),Yt(k,!0,ot),De(k,ot,a,!1,!0),zt=k.result;if(kt)Nt(k,at,Et,Pt,Mt,zt,bt,dt,Tt);else if(Ct)at.push(Nt(k,null,Et,Pt,Mt,zt,bt,dt,Tt));else at.push(Mt);if(Yt(k,!0,ot),re=k.input.charCodeAt(k.position),re===44)gt=!0,re=k.input.charCodeAt(++k.position);else gt=!1}P(k,"unexpected end of the stream within a flow collection")}t(yi,"readFlowCollection");function xi(k,ot){let gt,bt=f,dt=!1,Tt=!1,E=ot,at=0,wt=!1,xt,Ct=k.input.charCodeAt(k.position);if(Ct===124)gt=!1;else if(Ct===62)gt=!0;else return!1;k.kind="scalar",k.result="";while(Ct!==0)if(Ct=k.input.charCodeAt(++k.position),Ct===43||Ct===45)if(f===bt)bt=Ct===43?m:u;else P(k,"repeat of a chomping mode identifier");else if((xt=rt(Ct))>=0)if(xt===0)P(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Tt)E=ot+xt-1,Tt=!0;else P(k,"repeat of an indentation width identifier");else break;if(F(Ct)){do Ct=k.input.charCodeAt(++k.position);while(F(Ct));if(Ct===35)do Ct=k.input.charCodeAt(++k.position);while(!v(Ct)&&Ct!==0)}while(Ct!==0){Kt(k),k.lineIndent=0,Ct=k.input.charCodeAt(k.position);while((!Tt||k.lineIndent<E)&&Ct===32)k.lineIndent++,Ct=k.input.charCodeAt(++k.position);if(!Tt&&k.lineIndent>E)E=k.lineIndent;if(v(Ct)){at++;continue}if(!Tt&&E===0)P(k,"missing indentation for block scalar");if(k.lineIndent<E){if(bt===m)k.result+=r.repeat(`
132
+ `}return m.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t($d,"requireSnippet");var Cl,cd;function Te(){if(cd)return Cl;cd=1;let r=ai(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let c={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(d){c[String(d)]=n})});return c}t(s,"compileStyleAliases");function o(a,c){if(c=c||{},Object.keys(c).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(n){return n},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(Te,"requireType");var bl,ud;function Nl(){if(ud)return bl;ud=1;let r=ai(),e=Te();function i(a,c){let n=[];return a[c].forEach(function(d){let f=n.length;n.forEach(function(u,m){if(u.tag===d.tag&&u.kind===d.kind&&u.multi===d.multi)f=m}),n[f]=d}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(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(c,"collectType");for(let n=0,d=arguments.length;n<d;n+=1)arguments[n].forEach(c);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let n=[],d=[];if(c instanceof e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)n=n.concat(c.implicit);if(c.explicit)d=d.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.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(u.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(n),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},"extend"),bl=o,bl}t(Nl,"requireSchema");var kl,dd;function zl(){if(dd)return kl;return dd=1,kl=new(Te())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(zl,"requireStr");var wl,fd;function Ql(){if(fd)return wl;return fd=1,wl=new(Te())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(Ql,"requireSeq");var Sl,pd;function th(){if(pd)return Sl;return pd=1,Sl=new(Te())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(th,"requireMap");var Tl,gd;function eh(){if(gd)return Tl;return gd=1,Tl=new(Nl())({explicit:[zl(),Ql(),th()]}),Tl}t(eh,"requireFailsafe");var Bl,md;function rh(){if(md)return Bl;md=1;let r=Te();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"),Bl=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"}),Bl}t(rh,"require_null");var _l,yd;function ih(){if(yd)return _l;yd=1;let r=Te();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"),_l=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"}),_l}t(ih,"requireBool");var vl,xd;function oh(){if(xd)return vl;xd=1;let r=si(),e=Te();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}t(i,"isHexCode");function s(f){return f>=48&&f<=55}t(s,"isOctCode");function o(f){return f>=48&&f<=57}t(o,"isDecCode");function a(f){if(f===null)return!1;let u=f.length,m=0,x=!1;if(!u)return!1;let b=f[m];if(b==="-"||b==="+")b=f[++m];if(b==="0"){if(m+1===u)return!0;if(b=f[++m],b==="b"){m++;for(;m<u;m++){if(b=f[m],b!=="0"&&b!=="1")return!1;x=!0}return x&&isFinite(c(f))}if(b==="x"){m++;for(;m<u;m++){if(!i(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}if(b==="o"){m++;for(;m<u;m++){if(!s(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}}for(;m<u;m++){if(!o(f.charCodeAt(m)))return!1;x=!0}if(!x)return!1;return isFinite(c(f))}t(a,"resolveYamlInteger");function c(f){let u=f,m=1,x=u[0];if(x==="-"||x==="+"){if(x==="-")m=-1;u=u.slice(1),x=u[0]}if(u==="0")return 0;if(x==="0"){if(u[1]==="b")return m*parseInt(u.slice(2),2);if(u[1]==="x")return m*parseInt(u.slice(2),16);if(u[1]==="o")return m*parseInt(u.slice(2),8)}return m*parseInt(u,10)}t(c,"parseYamlInteger");function n(f){return c(f)}t(n,"constructYamlInteger");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!r.isNegativeZero(f))}return t(d,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:d,represent:{binary:t(function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},"binary"),octal:t(function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},"octal"),decimal:t(function(f){return f.toString(10)},"decimal"),hexadecimal:t(function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(oh,"requireInt");var Ll,Cd;function sh(){if(Cd)return Ll;Cd=1;let r=si(),e=Te(),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(f){if(f===null)return!1;if(!i.test(f))return!1;if(isFinite(parseFloat(f,10)))return!0;return s.test(f)}t(o,"resolveYamlFloat");function a(f){let u=f.toLowerCase(),m=u[0]==="-"?-1:1;if("+-".indexOf(u[0])>=0)u=u.slice(1);if(u===".inf")return m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(u===".nan")return NaN;return m*parseFloat(u,10)}t(a,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function n(f,u){if(isNaN(f))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return c.test(m)?m.replace("e",".e"):m}t(n,"representYamlFloat");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}return t(d,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),Ll}t(sh,"requireFloat");var Fl,bd;function ah(){if(bd)return Fl;return bd=1,Fl=eh().extend({implicit:[rh(),ih(),oh(),sh()]}),Fl}t(ah,"requireJson");var Ml,kd;function nh(){if(kd)return Ml;return kd=1,Ml=ah(),Ml}t(nh,"requireCore");var Al,wd;function lh(){if(wd)return Al;wd=1;let r=Te(),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(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let n=0,d=null,f=e.exec(c);if(f===null)f=i.exec(c);if(f===null)throw Error("Date resolve error");let u=+f[1],m=+f[2]-1,x=+f[3];if(!f[4])return new Date(Date.UTC(u,m,x));let b=+f[4],S=+f[5],T=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let _=+f[10],v=+(f[11]||0);if(d=(_*60+v)*60000,f[9]==="-")d=-d}let B=new Date(Date.UTC(u,m,x,b,S,T,n));if(d)B.setTime(B.getTime()-d);return B}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),Al=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Al}t(lh,"requireTimestamp");var El,Sd;function hh(){if(Sd)return El;Sd=1;let r=Te();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(hh,"requireMerge");var $l,Td;function ch(){if(Td)return $l;Td=1;let r=Te(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
+ \r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let m=f.indexOf(c.charAt(u));if(m>64)continue;if(m<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,m=[];for(let b=0;b<d;b++){if(b%4===0&&b)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);u=u<<6|f.indexOf(n.charAt(b))}let x=d%4*6;if(x===0)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);else if(x===18)m.push(u>>10&255),m.push(u>>2&255);else if(x===12)m.push(u>>4&255);return new Uint8Array(m)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let x=0;x<f;x++){if(x%3===0&&x)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[x]}let m=f%3;if(m===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(m===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(m===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[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(ch,"requireBinary");var Il,Bd;function uh(){if(Bd)return Il;Bd=1;let r=Te(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],m=!1;if(i.call(u)!=="[object Object]")return!1;let x;for(x in u)if(e.call(u,x))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(x)===-1)c.push(x);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(uh,"requireOmap");var Ol,_d;function dh(){if(_d)return Ol;_d=1;let r=Te(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(dh,"requirePairs");var Dl,vd;function fh(){if(vd)return Dl;vd=1;let r=Te(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==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(fh,"requireSet");var Pl,Ld;function vs(){if(Ld)return Pl;return Ld=1,Pl=nh().extend({implicit:[lh(),hh()],explicit:[ch(),uh(),dh(),fh()]}),Pl}t(vs,"require_default");var Fd;function Id(){if(Fd)return _s;Fd=1;let r=si(),e=ai(),i=$d(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,m=3,x=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/[\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 F(k){return k===9||k===32}t(F,"isWhiteSpace");function I(k){return k===9||k===32||k===10||k===13}t(I,"isWsOrEol");function O(k){return k===44||k===91||k===93||k===123||k===125}t(O,"isFlowIndicator");function K(k){if(k>=48&&k<=57)return k-48;let ot=k|32;if(ot>=97&&ot<=102)return ot-97+10;return-1}t(K,"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 rt(k){if(k>=48&&k<=57)return k-48;return-1}t(rt,"fromDecimalCode");function st(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(st,"simpleEscapeSequence");function ut(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ut,"charFromCodepoint");function ct(k,ot,gt){if(ot==="__proto__")Object.defineProperty(k,ot,{configurable:!0,enumerable:!0,writable:!0,value:gt});else k[ot]=gt}t(ct,"setProperty");let nt=Array(256),D=Array(256);for(let k=0;k<256;k++)nt[k]=st(k)?1:0,D[k]=st(k);function U(k,ot){this.input=k,this.filename=ot.filename||null,this.schema=ot.schema||s,this.onWarning=ot.onWarning||null,this.legacy=ot.legacy||!1,this.json=ot.json||!1,this.listener=ot.listener||null,this.maxDepth=typeof ot.maxDepth==="number"?ot.maxDepth:100,this.maxTotalMergeKeys=typeof ot.maxTotalMergeKeys==="number"?ot.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(U,"State");function it(k,ot){let gt={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return gt.snippet=i(gt),new e(ot,gt)}t(it,"generateError");function P(k,ot){throw it(k,ot)}t(P,"throwError");function ht(k,ot){if(k.onWarning)k.onWarning.call(null,it(k,ot))}t(ht,"throwWarning");function lt(k,ot,gt){let bt=k.anchorMapTransactions;if(bt.length!==0){let dt=bt[bt.length-1];if(!o.call(dt,ot))dt[ot]={existed:o.call(k.anchorMap,ot),value:k.anchorMap[ot]}}k.anchorMap[ot]=gt}t(lt,"storeAnchor");function Bt(k){k.anchorMapTransactions.push(Object.create(null))}t(Bt,"beginAnchorTransaction");function At(k){let ot=k.anchorMapTransactions.pop(),gt=k.anchorMapTransactions;if(gt.length===0)return;let bt=gt[gt.length-1],dt=Object.keys(ot);for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt[Tt];if(!o.call(bt,at))bt[at]=ot[at]}}t(At,"commitAnchorTransaction");function Gt(k){let ot=k.anchorMapTransactions.pop(),gt=Object.keys(ot);for(let bt=gt.length-1;bt>=0;bt-=1){let dt=ot[gt[bt]];if(dt.existed)k.anchorMap[gt[bt]]=dt.value;else delete k.anchorMap[gt[bt]]}}t(Gt,"rollbackAnchorTransaction");function Vt(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(Vt,"snapshotState");function Qt(k,ot){k.position=ot.position,k.line=ot.line,k.lineStart=ot.lineStart,k.lineIndent=ot.lineIndent,k.firstTabInLine=ot.firstTabInLine,k.tag=ot.tag,k.anchor=ot.anchor,k.kind=ot.kind,k.result=ot.result}t(Qt,"restoreState");let Jt={YAML:t(function(ot,gt,bt){if(ot.version!==null)P(ot,"duplication of %YAML directive");if(bt.length!==1)P(ot,"YAML directive accepts exactly one argument");let dt=/^([0-9]+)\.([0-9]+)$/.exec(bt[0]);if(dt===null)P(ot,"ill-formed argument of the YAML directive");let Tt=parseInt(dt[1],10),E=parseInt(dt[2],10);if(Tt!==1)P(ot,"unacceptable YAML version of the document");if(ot.version=bt[0],ot.checkLineBreaks=E<2,E!==1&&E!==2)ht(ot,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(ot,gt,bt){let dt;if(bt.length!==2)P(ot,"TAG directive accepts exactly two arguments");let Tt=bt[0];if(dt=bt[1],!T.test(Tt))P(ot,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(ot.tagMap,Tt))P(ot,'there is a previously declared suffix for "'+Tt+'" tag handle');if(!B.test(dt))P(ot,"ill-formed tag prefix (second argument) of the TAG directive");try{dt=decodeURIComponent(dt)}catch(E){P(ot,"tag prefix is malformed: "+dt)}ot.tagMap[Tt]=dt},"handleTagDirective")};function Pt(k,ot,gt,bt){if(ot<gt){let dt=k.input.slice(ot,gt);if(bt)for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt.charCodeAt(Tt);if(!(at===9||at>=32&&at<=1114111))P(k,"expected valid JSON character")}else if(x.test(dt))P(k,"the stream contains non-printable characters");k.result+=dt}}t(Pt,"captureSegment");function It(k,ot,gt,bt){if(!r.isObject(gt))P(k,"cannot merge mappings; the provided source object is unacceptable");let dt=Object.keys(gt);for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt[Tt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)P(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(ot,at))ct(ot,at,gt[at]),bt[at]=!0}}t(It,"mergeMappings");function zt(k,ot,gt,bt,dt,Tt,E,at,wt){if(Array.isArray(dt)){dt=Array.prototype.slice.call(dt);for(let xt=0,Ct=dt.length;xt<Ct;xt+=1){if(Array.isArray(dt[xt]))P(k,"nested arrays are not supported inside keys");if(typeof dt==="object"&&_(dt[xt])==="[object Object]")dt[xt]="[object Object]"}}if(typeof dt==="object"&&_(dt)==="[object Object]")dt="[object Object]";if(dt=String(dt),ot===null)ot={};if(bt==="tag:yaml.org,2002:merge")if(Array.isArray(Tt))for(let xt=0,Ct=Tt.length;xt<Ct;xt+=1)It(k,ot,Tt[xt],gt);else It(k,ot,Tt,gt);else{if(!k.json&&!o.call(gt,dt)&&o.call(ot,dt))k.line=E||k.line,k.lineStart=at||k.lineStart,k.position=wt||k.position,P(k,"duplicated mapping key");ct(ot,dt,Tt),delete gt[dt]}return ot}t(zt,"storeMappingPair");function Kt(k){let ot=k.input.charCodeAt(k.position);if(ot===10)k.position++;else if(ot===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else P(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Kt,"readLineBreak");function Ut(k,ot,gt){let bt=0,dt=k.input.charCodeAt(k.position);while(dt!==0){while(F(dt)){if(dt===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;dt=k.input.charCodeAt(++k.position)}if(ot&&dt===35)do dt=k.input.charCodeAt(++k.position);while(dt!==10&&dt!==13&&dt!==0);if(v(dt)){Kt(k),dt=k.input.charCodeAt(k.position),bt++,k.lineIndent=0;while(dt===32)k.lineIndent++,dt=k.input.charCodeAt(++k.position)}else break}if(gt!==-1&&bt!==0&&k.lineIndent<gt)ht(k,"deficient indentation");return bt}t(Ut,"skipSeparationSpace");function le(k){let ot=k.position,gt=k.input.charCodeAt(ot);if((gt===45||gt===46)&&gt===k.input.charCodeAt(ot+1)&&gt===k.input.charCodeAt(ot+2)){if(ot+=3,gt=k.input.charCodeAt(ot),gt===0||I(gt))return!0}return!1}t(le,"testDocumentSeparator");function ne(k,ot){if(ot===1)k.result+=" ";else if(ot>1)k.result+=r.repeat(`
135
+ `,ot-1)}t(ne,"writeFoldedLines");function er(k,ot,gt){let bt,dt,Tt,E,at,wt,{kind:xt,result:Ct}=k,St=k.input.charCodeAt(k.position);if(I(St)||O(St)||St===35||St===38||St===42||St===33||St===124||St===62||St===39||St===34||St===37||St===64||St===96)return!1;if(St===63||St===45){let kt=k.input.charCodeAt(k.position+1);if(I(kt)||gt&&O(kt))return!1}k.kind="scalar",k.result="",bt=dt=k.position,Tt=!1;while(St!==0){if(St===58){let kt=k.input.charCodeAt(k.position+1);if(I(kt)||gt&&O(kt))break}else if(St===35){let kt=k.input.charCodeAt(k.position-1);if(I(kt))break}else if(k.position===k.lineStart&&le(k)||gt&&O(St))break;else if(v(St))if(E=k.line,at=k.lineStart,wt=k.lineIndent,Ut(k,!1,-1),k.lineIndent>=ot){Tt=!0,St=k.input.charCodeAt(k.position);continue}else{k.position=dt,k.line=E,k.lineStart=at,k.lineIndent=wt;break}if(Tt)Pt(k,bt,dt,!1),ne(k,k.line-E),bt=dt=k.position,Tt=!1;if(!F(St))dt=k.position+1;St=k.input.charCodeAt(++k.position)}if(Pt(k,bt,dt,!1),k.result)return!0;return k.kind=xt,k.result=Ct,!1}t(er,"readPlainScalar");function Or(k,ot){let gt,bt,dt=k.input.charCodeAt(k.position);if(dt!==39)return!1;k.kind="scalar",k.result="",k.position++,gt=bt=k.position;while((dt=k.input.charCodeAt(k.position))!==0)if(dt===39)if(Pt(k,gt,k.position,!0),dt=k.input.charCodeAt(++k.position),dt===39)gt=k.position,k.position++,bt=k.position;else return!0;else if(v(dt))Pt(k,gt,bt,!0),ne(k,Ut(k,!1,ot)),gt=bt=k.position;else if(k.position===k.lineStart&&le(k))P(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!F(dt))bt=k.position;P(k,"unexpected end of the stream within a single quoted scalar")}t(Or,"readSingleQuotedScalar");function ze(k,ot){let gt,bt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==34)return!1;k.kind="scalar",k.result="",k.position++,gt=bt=k.position;while((Tt=k.input.charCodeAt(k.position))!==0)if(Tt===34)return Pt(k,gt,k.position,!0),k.position++,!0;else if(Tt===92){if(Pt(k,gt,k.position,!0),Tt=k.input.charCodeAt(++k.position),v(Tt))Ut(k,!1,ot);else if(Tt<256&&nt[Tt])k.result+=D[Tt],k.position++;else if((dt=Z(Tt))>0){let E=dt,at=0;for(;E>0;E--)if(Tt=k.input.charCodeAt(++k.position),(dt=K(Tt))>=0)at=(at<<4)+dt;else P(k,"expected hexadecimal character");k.result+=ut(at),k.position++}else P(k,"unknown escape sequence");gt=bt=k.position}else if(v(Tt))Pt(k,gt,bt,!0),ne(k,Ut(k,!1,ot)),gt=bt=k.position;else if(k.position===k.lineStart&&le(k))P(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!F(Tt))bt=k.position;P(k,"unexpected end of the stream within a double quoted scalar")}t(ze,"readDoubleQuotedScalar");function yi(k,ot){let gt=!0,bt,dt,Tt,E=k.tag,at,wt=k.anchor,xt,Ct,St,kt,Ot=Object.create(null),Et,Rt,Yt,re=k.input.charCodeAt(k.position);if(re===91)xt=93,kt=!1,at=[];else if(re===123)xt=125,kt=!0,at={};else return!1;if(k.anchor!==null)lt(k,k.anchor,at);re=k.input.charCodeAt(++k.position);while(re!==0){if(Ut(k,!0,ot),re=k.input.charCodeAt(k.position),re===xt)return k.position++,k.tag=E,k.anchor=wt,k.kind=kt?"mapping":"sequence",k.result=at,!0;else if(!gt)P(k,"missed comma between flow collection entries");else if(re===44)P(k,"expected the node content, but found ','");if(Rt=Et=Yt=null,Ct=St=!1,re===63){let he=k.input.charCodeAt(k.position+1);if(I(he))Ct=St=!0,k.position++,Ut(k,!0,ot)}if(bt=k.line,dt=k.lineStart,Tt=k.position,De(k,ot,a,!1,!0),Rt=k.tag,Et=k.result,Ut(k,!0,ot),re=k.input.charCodeAt(k.position),(St||k.line===bt)&&re===58)Ct=!0,re=k.input.charCodeAt(++k.position),Ut(k,!0,ot),De(k,ot,a,!1,!0),Yt=k.result;if(kt)zt(k,at,Ot,Rt,Et,Yt,bt,dt,Tt);else if(Ct)at.push(zt(k,null,Ot,Rt,Et,Yt,bt,dt,Tt));else at.push(Et);if(Ut(k,!0,ot),re=k.input.charCodeAt(k.position),re===44)gt=!0,re=k.input.charCodeAt(++k.position);else gt=!1}P(k,"unexpected end of the stream within a flow collection")}t(yi,"readFlowCollection");function xi(k,ot){let gt,bt=f,dt=!1,Tt=!1,E=ot,at=0,wt=!1,xt,Ct=k.input.charCodeAt(k.position);if(Ct===124)gt=!1;else if(Ct===62)gt=!0;else return!1;k.kind="scalar",k.result="";while(Ct!==0)if(Ct=k.input.charCodeAt(++k.position),Ct===43||Ct===45)if(f===bt)bt=Ct===43?m:u;else P(k,"repeat of a chomping mode identifier");else if((xt=rt(Ct))>=0)if(xt===0)P(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Tt)E=ot+xt-1,Tt=!0;else P(k,"repeat of an indentation width identifier");else break;if(F(Ct)){do Ct=k.input.charCodeAt(++k.position);while(F(Ct));if(Ct===35)do Ct=k.input.charCodeAt(++k.position);while(!v(Ct)&&Ct!==0)}while(Ct!==0){Kt(k),k.lineIndent=0,Ct=k.input.charCodeAt(k.position);while((!Tt||k.lineIndent<E)&&Ct===32)k.lineIndent++,Ct=k.input.charCodeAt(++k.position);if(!Tt&&k.lineIndent>E)E=k.lineIndent;if(v(Ct)){at++;continue}if(!Tt&&E===0)P(k,"missing indentation for block scalar");if(k.lineIndent<E){if(bt===m)k.result+=r.repeat(`
136
136
  `,dt?1+at:at);else if(bt===f){if(dt)k.result+=`
137
137
  `}break}if(gt)if(F(Ct))wt=!0,k.result+=r.repeat(`
138
138
  `,dt?1+at:at);else if(wt)wt=!1,k.result+=r.repeat(`
139
139
  `,at+1);else if(at===0){if(dt)k.result+=" "}else k.result+=r.repeat(`
140
140
  `,at);else k.result+=r.repeat(`
141
- `,dt?1+at:at);dt=!0,Tt=!0,at=0;let St=k.position;while(!v(Ct)&&Ct!==0)Ct=k.input.charCodeAt(++k.position);Dt(k,St,k.position,!1)}return!0}t(xi,"readBlockScalar");function He(k,ot){let{tag:gt,anchor:bt}=k,dt=[],Tt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,dt);let E=k.input.charCodeAt(k.position);while(E!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,P(k,"tab characters must not be used in indentation");if(E!==45)break;let at=k.input.charCodeAt(k.position+1);if(!I(at))break;if(Tt=!0,k.position++,Yt(k,!0,-1)){if(k.lineIndent<=ot){dt.push(null),E=k.input.charCodeAt(k.position);continue}}let wt=k.line;if(De(k,ot,n,!1,!0),dt.push(k.result),Yt(k,!0,-1),E=k.input.charCodeAt(k.position),(k.line===wt||k.lineIndent>ot)&&E!==0)P(k,"bad indentation of a sequence entry");else if(k.lineIndent<ot)break}if(Tt)return k.tag=gt,k.anchor=bt,k.kind="sequence",k.result=dt,!0;return!1}t(He,"readBlockSequence");function Pr(k,ot,gt){let bt,dt,Tt,E,{tag:at,anchor:wt}=k,xt={},Ct=Object.create(null),St=null,kt=null,Et=null,Mt=!1,Pt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,xt);let zt=k.input.charCodeAt(k.position);while(zt!==0){if(!Mt&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,P(k,"tab characters must not be used in indentation");let re=k.input.charCodeAt(k.position+1),he=k.line;if((zt===63||zt===58)&&I(re)){if(zt===63){if(Mt)Nt(k,xt,Ct,St,kt,null,dt,Tt,E),St=kt=Et=null;Pt=!0,Mt=!0,bt=!0}else if(Mt)Mt=!1,bt=!0;else P(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,zt=re}else{if(dt=k.line,Tt=k.lineStart,E=k.position,!De(k,gt,c,!1,!0))break;if(k.line===he){zt=k.input.charCodeAt(k.position);while(F(zt))zt=k.input.charCodeAt(++k.position);if(zt===58){if(zt=k.input.charCodeAt(++k.position),!I(zt))P(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Mt)Nt(k,xt,Ct,St,kt,null,dt,Tt,E),St=kt=Et=null;Pt=!0,Mt=!1,bt=!1,St=k.tag,kt=k.result}else if(Pt)P(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=at,k.anchor=wt,!0}else if(Pt)P(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=at,k.anchor=wt,!0}if(k.line===he||k.lineIndent>ot){if(Mt)dt=k.line,Tt=k.lineStart,E=k.position;if(De(k,ot,d,!0,bt))if(Mt)kt=k.result;else Et=k.result;if(!Mt)Nt(k,xt,Ct,St,kt,Et,dt,Tt,E),St=kt=Et=null;Yt(k,!0,-1),zt=k.input.charCodeAt(k.position)}if((k.line===he||k.lineIndent>ot)&&zt!==0)P(k,"bad indentation of a mapping entry");else if(k.lineIndent<ot)break}if(Mt)Nt(k,xt,Ct,St,kt,null,dt,Tt,E);if(Pt)k.tag=at,k.anchor=wt,k.kind="mapping",k.result=xt;return Pt}t(Pr,"readBlockMapping");function Ci(k){let ot=!1,gt=!1,bt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==33)return!1;if(k.tag!==null)P(k,"duplication of a tag property");if(Tt=k.input.charCodeAt(++k.position),Tt===60)ot=!0,Tt=k.input.charCodeAt(++k.position);else if(Tt===33)gt=!0,bt="!!",Tt=k.input.charCodeAt(++k.position);else bt="!";let E=k.position;if(ot){do Tt=k.input.charCodeAt(++k.position);while(Tt!==0&&Tt!==62);if(k.position<k.length)dt=k.input.slice(E,k.position),Tt=k.input.charCodeAt(++k.position);else P(k,"unexpected end of the stream within a verbatim tag")}else{while(Tt!==0&&!I(Tt)){if(Tt===33)if(!gt){if(bt=k.input.slice(E-1,k.position+1),!T.test(bt))P(k,"named tag handle cannot contain such characters");gt=!0,E=k.position+1}else P(k,"tag suffix cannot contain exclamation marks");Tt=k.input.charCodeAt(++k.position)}if(dt=k.input.slice(E,k.position),S.test(dt))P(k,"tag suffix cannot contain flow indicator characters")}if(dt&&!B.test(dt))P(k,"tag name cannot contain such characters: "+dt);try{dt=decodeURIComponent(dt)}catch(at){P(k,"tag name is malformed: "+dt)}if(ot)k.tag=dt;else if(o.call(k.tagMap,bt))k.tag=k.tagMap[bt]+dt;else if(bt==="!")k.tag="!"+dt;else if(bt==="!!")k.tag="tag:yaml.org,2002:"+dt;else P(k,'undeclared tag handle "'+bt+'"');return!0}t(Ci,"readTagProperty");function Rr(k){let ot=k.input.charCodeAt(k.position);if(ot!==38)return!1;if(k.anchor!==null)P(k,"duplication of an anchor property");ot=k.input.charCodeAt(++k.position);let gt=k.position;while(ot!==0&&!I(ot)&&!O(ot))ot=k.input.charCodeAt(++k.position);if(k.position===gt)P(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(gt,k.position),!0}t(Rr,"readAnchorProperty");function qr(k){let ot=k.input.charCodeAt(k.position);if(ot!==42)return!1;ot=k.input.charCodeAt(++k.position);let gt=k.position;while(ot!==0&&!I(ot)&&!O(ot))ot=k.input.charCodeAt(++k.position);if(k.position===gt)P(k,"name of an alias node must contain at least one character");let bt=k.input.slice(gt,k.position);if(!o.call(k.anchorMap,bt))P(k,'unidentified alias "'+bt+'"');return k.result=k.anchorMap[bt],Yt(k,!0,-1),!0}t(qr,"readAlias");function bi(k,ot,gt,bt){let dt=Vt(k);if(Bt(k),Qt(k,ot),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Pr(k,gt,bt)&&k.kind==="mapping")return vt(k),!0;return Xt(k),Qt(k,dt),!1}t(bi,"tryReadBlockMappingFromProperty");function De(k,ot,gt,bt,dt){let Tt,E,at=1,wt=!1,xt=!1,Ct=null,St,kt,Et;if(k.depth>=k.maxDepth)P(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 Mt=Tt=E=d===gt||n===gt;if(bt){if(Yt(k,!0,-1)){if(wt=!0,k.lineIndent>ot)at=1;else if(k.lineIndent===ot)at=0;else if(k.lineIndent<ot)at=-1}}if(at===1)while(!0){let Pt=k.input.charCodeAt(k.position),zt=Vt(k);if(wt&&(Pt===33&&k.tag!==null||Pt===38&&k.anchor!==null))break;if(!Ci(k)&&!Rr(k))break;if(Ct===null)Ct=zt;if(Yt(k,!0,-1)){if(wt=!0,E=Mt,k.lineIndent>ot)at=1;else if(k.lineIndent===ot)at=0;else if(k.lineIndent<ot)at=-1}else E=!1}if(E)E=wt||dt;if(at===1||d===gt){if(a===gt||c===gt)kt=ot;else kt=ot+1;if(Et=k.position-k.lineStart,at===1)if(E&&(He(k,Et)||Pr(k,Et,kt))||yi(k,kt))xt=!0;else{let Pt=k.input.charCodeAt(k.position);if(Ct!==null&&Mt&&!E&&Pt!==124&&Pt!==62&&bi(k,Ct,Ct.position-Ct.lineStart,kt))xt=!0;else if(Tt&&xi(k,kt)||Dr(k,kt)||ze(k,kt))xt=!0;else if(qr(k)){if(xt=!0,k.tag!==null||k.anchor!==null)P(k,"alias node should not have any properties")}else if(er(k,kt,a===gt)){if(xt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(at===0)xt=E&&He(k,Et)}if(k.tag===null){if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")P(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let Pt=0,zt=k.implicitTypes.length;Pt<zt;Pt+=1)if(St=k.implicitTypes[Pt],St.resolve(k.result)){if(k.result=St.construct(k.result),k.tag=St.tag,k.anchor!==null)lt(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))St=k.typeMap[k.kind||"fallback"][k.tag];else{St=null;let Pt=k.typeMap.multi[k.kind||"fallback"];for(let zt=0,re=Pt.length;zt<re;zt+=1)if(k.tag.slice(0,Pt[zt].tag.length)===Pt[zt].tag){St=Pt[zt];break}}if(!St)P(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&St.kind!==k.kind)P(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+St.kind+'", not "'+k.kind+'"');if(!St.resolve(k.result,k.tag))P(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=St.construct(k.result,k.tag),k.anchor!==null)lt(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||xt}t(De,"composeNode");function ki(k){let ot=k.position,gt=!1,bt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((bt=k.input.charCodeAt(k.position))!==0){if(Yt(k,!0,-1),bt=k.input.charCodeAt(k.position),k.lineIndent>0||bt!==37)break;gt=!0,bt=k.input.charCodeAt(++k.position);let dt=k.position;while(bt!==0&&!I(bt))bt=k.input.charCodeAt(++k.position);let Tt=k.input.slice(dt,k.position),E=[];if(Tt.length<1)P(k,"directive name must not be less than one character in length");while(bt!==0){while(F(bt))bt=k.input.charCodeAt(++k.position);if(bt===35){do bt=k.input.charCodeAt(++k.position);while(bt!==0&&!v(bt));break}if(v(bt))break;dt=k.position;while(bt!==0&&!I(bt))bt=k.input.charCodeAt(++k.position);E.push(k.input.slice(dt,k.position))}if(bt!==0)Kt(k);if(o.call(Jt,Tt))Jt[Tt](k,Tt,E);else ht(k,'unknown document directive "'+Tt+'"')}if(Yt(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,Yt(k,!0,-1);else if(gt)P(k,"directives end mark is expected");if(De(k,k.lineIndent-1,d,!1,!0),Yt(k,!0,-1),k.checkLineBreaks&&b.test(k.input.slice(ot,k.position)))ht(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&le(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,Yt(k,!0,-1);return}if(k.position<k.length-1)P(k,"end of the stream or a document separator is expected")}t(ki,"readDocument");function Wr(k,ot){if(k=String(k),ot=ot||{},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 gt=new U(k,ot),bt=k.indexOf("\x00");if(bt!==-1)gt.position=bt,P(gt,"null byte is not allowed in input");gt.input+="\x00";while(gt.input.charCodeAt(gt.position)===32)gt.lineIndent+=1,gt.position+=1;while(gt.position<gt.length-1)ki(gt);return gt.documents}t(Wr,"loadDocuments");function Nr(k,ot,gt){if(ot!==null&&typeof ot==="object"&&typeof gt>"u")gt=ot,ot=null;let bt=Wr(k,gt);if(typeof ot!=="function")return bt;for(let dt=0,Tt=bt.length;dt<Tt;dt+=1)ot(bt[dt])}t(Nr,"loadAll2");function wi(k,ot){let gt=Wr(k,ot);if(gt.length===0)return;else if(gt.length===1)return gt[0];throw new e("expected a single document in the stream, but found more")}return t(wi,"load2"),_s.loadAll=Nr,_s.load=wi,_s}t(Id,"requireLoader");var Ql={},Md;function Od(){if(Md)return Ql;Md=1;let r=si(),e=ai(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,m=34,x=35,b=37,S=38,T=39,B=42,_=44,v=45,F=58,I=61,O=62,K=63,Z=64,rt=91,st=93,ut=96,ct=123,nt=124,D=125,U={};U[0]="\\0",U[7]="\\a",U[8]="\\b",U[9]="\\t",U[10]="\\n",U[11]="\\v",U[12]="\\f",U[13]="\\r",U[27]="\\e",U[34]="\\\"",U[92]="\\\\",U[133]="\\N",U[160]="\\_",U[8232]="\\L",U[8233]="\\P";let it=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],P=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ht(E,at){if(at===null)return{};let wt={},xt=Object.keys(at);for(let Ct=0,St=xt.length;Ct<St;Ct+=1){let kt=xt[Ct],Et=String(at[kt]);if(kt.slice(0,2)==="!!")kt="tag:yaml.org,2002:"+kt.slice(2);let Mt=E.compiledTypeMap.fallback[kt];if(Mt&&o.call(Mt.styleAliases,Et))Et=Mt.styleAliases[Et];wt[kt]=Et}return wt}t(ht,"compileStyleMap");function lt(E){let at,wt,xt=E.toString(16).toUpperCase();if(E<=255)at="x",wt=2;else if(E<=65535)at="u",wt=4;else if(E<=4294967295)at="U",wt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+at+r.repeat("0",wt-xt.length)+xt}t(lt,"encodeHex");let Bt=1,vt=2;function Xt(E){this.schema=E.schema||i,this.indent=Math.max(1,E.indent||2),this.noArrayIndent=E.noArrayIndent||!1,this.skipInvalid=E.skipInvalid||!1,this.flowLevel=r.isNothing(E.flowLevel)?-1:E.flowLevel,this.styleMap=ht(this.schema,E.styles||null),this.sortKeys=E.sortKeys||!1,this.lineWidth=E.lineWidth||80,this.noRefs=E.noRefs||!1,this.noCompatMode=E.noCompatMode||!1,this.condenseFlow=E.condenseFlow||!1,this.quotingType=E.quotingType==='"'?vt:Bt,this.forceQuotes=E.forceQuotes||!1,this.replacer=typeof E.replacer==="function"?E.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Xt,"State");function Vt(E,at){let wt=r.repeat(" ",at),xt=0,Ct="",St=E.length;while(xt<St){let kt,Et=E.indexOf(`
143
- `,xt);if(Et===-1)kt=E.slice(xt),xt=St;else kt=E.slice(xt,Et+1),xt=Et+1;if(kt.length&&kt!==`
141
+ `,dt?1+at:at);dt=!0,Tt=!0,at=0;let St=k.position;while(!v(Ct)&&Ct!==0)Ct=k.input.charCodeAt(++k.position);Pt(k,St,k.position,!1)}return!0}t(xi,"readBlockScalar");function He(k,ot){let{tag:gt,anchor:bt}=k,dt=[],Tt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,dt);let E=k.input.charCodeAt(k.position);while(E!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,P(k,"tab characters must not be used in indentation");if(E!==45)break;let at=k.input.charCodeAt(k.position+1);if(!I(at))break;if(Tt=!0,k.position++,Ut(k,!0,-1)){if(k.lineIndent<=ot){dt.push(null),E=k.input.charCodeAt(k.position);continue}}let wt=k.line;if(De(k,ot,n,!1,!0),dt.push(k.result),Ut(k,!0,-1),E=k.input.charCodeAt(k.position),(k.line===wt||k.lineIndent>ot)&&E!==0)P(k,"bad indentation of a sequence entry");else if(k.lineIndent<ot)break}if(Tt)return k.tag=gt,k.anchor=bt,k.kind="sequence",k.result=dt,!0;return!1}t(He,"readBlockSequence");function Dr(k,ot,gt){let bt,dt,Tt,E,{tag:at,anchor:wt}=k,xt={},Ct=Object.create(null),St=null,kt=null,Ot=null,Et=!1,Rt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,xt);let Yt=k.input.charCodeAt(k.position);while(Yt!==0){if(!Et&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,P(k,"tab characters must not be used in indentation");let re=k.input.charCodeAt(k.position+1),he=k.line;if((Yt===63||Yt===58)&&I(re)){if(Yt===63){if(Et)zt(k,xt,Ct,St,kt,null,dt,Tt,E),St=kt=Ot=null;Rt=!0,Et=!0,bt=!0}else if(Et)Et=!1,bt=!0;else P(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,Yt=re}else{if(dt=k.line,Tt=k.lineStart,E=k.position,!De(k,gt,c,!1,!0))break;if(k.line===he){Yt=k.input.charCodeAt(k.position);while(F(Yt))Yt=k.input.charCodeAt(++k.position);if(Yt===58){if(Yt=k.input.charCodeAt(++k.position),!I(Yt))P(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Et)zt(k,xt,Ct,St,kt,null,dt,Tt,E),St=kt=Ot=null;Rt=!0,Et=!1,bt=!1,St=k.tag,kt=k.result}else if(Rt)P(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=at,k.anchor=wt,!0}else if(Rt)P(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=at,k.anchor=wt,!0}if(k.line===he||k.lineIndent>ot){if(Et)dt=k.line,Tt=k.lineStart,E=k.position;if(De(k,ot,d,!0,bt))if(Et)kt=k.result;else Ot=k.result;if(!Et)zt(k,xt,Ct,St,kt,Ot,dt,Tt,E),St=kt=Ot=null;Ut(k,!0,-1),Yt=k.input.charCodeAt(k.position)}if((k.line===he||k.lineIndent>ot)&&Yt!==0)P(k,"bad indentation of a mapping entry");else if(k.lineIndent<ot)break}if(Et)zt(k,xt,Ct,St,kt,null,dt,Tt,E);if(Rt)k.tag=at,k.anchor=wt,k.kind="mapping",k.result=xt;return Rt}t(Dr,"readBlockMapping");function Ci(k){let ot=!1,gt=!1,bt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==33)return!1;if(k.tag!==null)P(k,"duplication of a tag property");if(Tt=k.input.charCodeAt(++k.position),Tt===60)ot=!0,Tt=k.input.charCodeAt(++k.position);else if(Tt===33)gt=!0,bt="!!",Tt=k.input.charCodeAt(++k.position);else bt="!";let E=k.position;if(ot){do Tt=k.input.charCodeAt(++k.position);while(Tt!==0&&Tt!==62);if(k.position<k.length)dt=k.input.slice(E,k.position),Tt=k.input.charCodeAt(++k.position);else P(k,"unexpected end of the stream within a verbatim tag")}else{while(Tt!==0&&!I(Tt)){if(Tt===33)if(!gt){if(bt=k.input.slice(E-1,k.position+1),!T.test(bt))P(k,"named tag handle cannot contain such characters");gt=!0,E=k.position+1}else P(k,"tag suffix cannot contain exclamation marks");Tt=k.input.charCodeAt(++k.position)}if(dt=k.input.slice(E,k.position),S.test(dt))P(k,"tag suffix cannot contain flow indicator characters")}if(dt&&!B.test(dt))P(k,"tag name cannot contain such characters: "+dt);try{dt=decodeURIComponent(dt)}catch(at){P(k,"tag name is malformed: "+dt)}if(ot)k.tag=dt;else if(o.call(k.tagMap,bt))k.tag=k.tagMap[bt]+dt;else if(bt==="!")k.tag="!"+dt;else if(bt==="!!")k.tag="tag:yaml.org,2002:"+dt;else P(k,'undeclared tag handle "'+bt+'"');return!0}t(Ci,"readTagProperty");function Pr(k){let ot=k.input.charCodeAt(k.position);if(ot!==38)return!1;if(k.anchor!==null)P(k,"duplication of an anchor property");ot=k.input.charCodeAt(++k.position);let gt=k.position;while(ot!==0&&!I(ot)&&!O(ot))ot=k.input.charCodeAt(++k.position);if(k.position===gt)P(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(gt,k.position),!0}t(Pr,"readAnchorProperty");function Rr(k){let ot=k.input.charCodeAt(k.position);if(ot!==42)return!1;ot=k.input.charCodeAt(++k.position);let gt=k.position;while(ot!==0&&!I(ot)&&!O(ot))ot=k.input.charCodeAt(++k.position);if(k.position===gt)P(k,"name of an alias node must contain at least one character");let bt=k.input.slice(gt,k.position);if(!o.call(k.anchorMap,bt))P(k,'unidentified alias "'+bt+'"');return k.result=k.anchorMap[bt],Ut(k,!0,-1),!0}t(Rr,"readAlias");function bi(k,ot,gt,bt){let dt=Vt(k);if(Bt(k),Qt(k,ot),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Dr(k,gt,bt)&&k.kind==="mapping")return At(k),!0;return Gt(k),Qt(k,dt),!1}t(bi,"tryReadBlockMappingFromProperty");function De(k,ot,gt,bt,dt){let Tt,E,at=1,wt=!1,xt=!1,Ct=null,St,kt,Ot;if(k.depth>=k.maxDepth)P(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 Et=Tt=E=d===gt||n===gt;if(bt){if(Ut(k,!0,-1)){if(wt=!0,k.lineIndent>ot)at=1;else if(k.lineIndent===ot)at=0;else if(k.lineIndent<ot)at=-1}}if(at===1)while(!0){let Rt=k.input.charCodeAt(k.position),Yt=Vt(k);if(wt&&(Rt===33&&k.tag!==null||Rt===38&&k.anchor!==null))break;if(!Ci(k)&&!Pr(k))break;if(Ct===null)Ct=Yt;if(Ut(k,!0,-1)){if(wt=!0,E=Et,k.lineIndent>ot)at=1;else if(k.lineIndent===ot)at=0;else if(k.lineIndent<ot)at=-1}else E=!1}if(E)E=wt||dt;if(at===1||d===gt){if(a===gt||c===gt)kt=ot;else kt=ot+1;if(Ot=k.position-k.lineStart,at===1)if(E&&(He(k,Ot)||Dr(k,Ot,kt))||yi(k,kt))xt=!0;else{let Rt=k.input.charCodeAt(k.position);if(Ct!==null&&Et&&!E&&Rt!==124&&Rt!==62&&bi(k,Ct,Ct.position-Ct.lineStart,kt))xt=!0;else if(Tt&&xi(k,kt)||Or(k,kt)||ze(k,kt))xt=!0;else if(Rr(k)){if(xt=!0,k.tag!==null||k.anchor!==null)P(k,"alias node should not have any properties")}else if(er(k,kt,a===gt)){if(xt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(at===0)xt=E&&He(k,Ot)}if(k.tag===null){if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")P(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let Rt=0,Yt=k.implicitTypes.length;Rt<Yt;Rt+=1)if(St=k.implicitTypes[Rt],St.resolve(k.result)){if(k.result=St.construct(k.result),k.tag=St.tag,k.anchor!==null)lt(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))St=k.typeMap[k.kind||"fallback"][k.tag];else{St=null;let Rt=k.typeMap.multi[k.kind||"fallback"];for(let Yt=0,re=Rt.length;Yt<re;Yt+=1)if(k.tag.slice(0,Rt[Yt].tag.length)===Rt[Yt].tag){St=Rt[Yt];break}}if(!St)P(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&St.kind!==k.kind)P(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+St.kind+'", not "'+k.kind+'"');if(!St.resolve(k.result,k.tag))P(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=St.construct(k.result,k.tag),k.anchor!==null)lt(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||xt}t(De,"composeNode");function ki(k){let ot=k.position,gt=!1,bt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((bt=k.input.charCodeAt(k.position))!==0){if(Ut(k,!0,-1),bt=k.input.charCodeAt(k.position),k.lineIndent>0||bt!==37)break;gt=!0,bt=k.input.charCodeAt(++k.position);let dt=k.position;while(bt!==0&&!I(bt))bt=k.input.charCodeAt(++k.position);let Tt=k.input.slice(dt,k.position),E=[];if(Tt.length<1)P(k,"directive name must not be less than one character in length");while(bt!==0){while(F(bt))bt=k.input.charCodeAt(++k.position);if(bt===35){do bt=k.input.charCodeAt(++k.position);while(bt!==0&&!v(bt));break}if(v(bt))break;dt=k.position;while(bt!==0&&!I(bt))bt=k.input.charCodeAt(++k.position);E.push(k.input.slice(dt,k.position))}if(bt!==0)Kt(k);if(o.call(Jt,Tt))Jt[Tt](k,Tt,E);else ht(k,'unknown document directive "'+Tt+'"')}if(Ut(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,Ut(k,!0,-1);else if(gt)P(k,"directives end mark is expected");if(De(k,k.lineIndent-1,d,!1,!0),Ut(k,!0,-1),k.checkLineBreaks&&b.test(k.input.slice(ot,k.position)))ht(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&le(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,Ut(k,!0,-1);return}if(k.position<k.length-1)P(k,"end of the stream or a document separator is expected")}t(ki,"readDocument");function qr(k,ot){if(k=String(k),ot=ot||{},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 gt=new U(k,ot),bt=k.indexOf("\x00");if(bt!==-1)gt.position=bt,P(gt,"null byte is not allowed in input");gt.input+="\x00";while(gt.input.charCodeAt(gt.position)===32)gt.lineIndent+=1,gt.position+=1;while(gt.position<gt.length-1)ki(gt);return gt.documents}t(qr,"loadDocuments");function Wr(k,ot,gt){if(ot!==null&&typeof ot==="object"&&typeof gt>"u")gt=ot,ot=null;let bt=qr(k,gt);if(typeof ot!=="function")return bt;for(let dt=0,Tt=bt.length;dt<Tt;dt+=1)ot(bt[dt])}t(Wr,"loadAll2");function wi(k,ot){let gt=qr(k,ot);if(gt.length===0)return;else if(gt.length===1)return gt[0];throw new e("expected a single document in the stream, but found more")}return t(wi,"load2"),_s.loadAll=Wr,_s.load=wi,_s}t(Id,"requireLoader");var Rl={},Md;function Od(){if(Md)return Rl;Md=1;let r=si(),e=ai(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,m=34,x=35,b=37,S=38,T=39,B=42,_=44,v=45,F=58,I=61,O=62,K=63,Z=64,rt=91,st=93,ut=96,ct=123,nt=124,D=125,U={};U[0]="\\0",U[7]="\\a",U[8]="\\b",U[9]="\\t",U[10]="\\n",U[11]="\\v",U[12]="\\f",U[13]="\\r",U[27]="\\e",U[34]="\\\"",U[92]="\\\\",U[133]="\\N",U[160]="\\_",U[8232]="\\L",U[8233]="\\P";let it=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],P=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ht(E,at){if(at===null)return{};let wt={},xt=Object.keys(at);for(let Ct=0,St=xt.length;Ct<St;Ct+=1){let kt=xt[Ct],Ot=String(at[kt]);if(kt.slice(0,2)==="!!")kt="tag:yaml.org,2002:"+kt.slice(2);let Et=E.compiledTypeMap.fallback[kt];if(Et&&o.call(Et.styleAliases,Ot))Ot=Et.styleAliases[Ot];wt[kt]=Ot}return wt}t(ht,"compileStyleMap");function lt(E){let at,wt,xt=E.toString(16).toUpperCase();if(E<=255)at="x",wt=2;else if(E<=65535)at="u",wt=4;else if(E<=4294967295)at="U",wt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+at+r.repeat("0",wt-xt.length)+xt}t(lt,"encodeHex");let Bt=1,At=2;function Gt(E){this.schema=E.schema||i,this.indent=Math.max(1,E.indent||2),this.noArrayIndent=E.noArrayIndent||!1,this.skipInvalid=E.skipInvalid||!1,this.flowLevel=r.isNothing(E.flowLevel)?-1:E.flowLevel,this.styleMap=ht(this.schema,E.styles||null),this.sortKeys=E.sortKeys||!1,this.lineWidth=E.lineWidth||80,this.noRefs=E.noRefs||!1,this.noCompatMode=E.noCompatMode||!1,this.condenseFlow=E.condenseFlow||!1,this.quotingType=E.quotingType==='"'?At:Bt,this.forceQuotes=E.forceQuotes||!1,this.replacer=typeof E.replacer==="function"?E.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Gt,"State");function Vt(E,at){let wt=r.repeat(" ",at),xt=0,Ct="",St=E.length;while(xt<St){let kt,Ot=E.indexOf(`
143
+ `,xt);if(Ot===-1)kt=E.slice(xt),xt=St;else kt=E.slice(xt,Ot+1),xt=Ot+1;if(kt.length&&kt!==`
144
144
  `)Ct+=wt;Ct+=kt}return Ct}t(Vt,"indentString");function Qt(E,at){return`
145
- `+r.repeat(" ",E.indent*at)}t(Qt,"generateNextLine");function Jt(E,at){for(let wt=0,xt=E.implicitTypes.length;wt<xt;wt+=1)if(E.implicitTypes[wt].resolve(at))return!0;return!1}t(Jt,"testImplicitResolving");function Dt(E){return E===f||E===c}t(Dt,"isWhitespace");function At(E){return E>=32&&E<=126||E>=161&&E<=55295&&E!==8232&&E!==8233||E>=57344&&E<=65533&&E!==a||E>=65536&&E<=1114111}t(At,"isPrintable");function Nt(E){return At(E)&&E!==a&&E!==d&&E!==n}t(Nt,"isNsCharOrWhitespace");function Kt(E,at,wt){let xt=Nt(E),Ct=xt&&!Dt(E);return(wt?xt:xt&&E!==_&&E!==rt&&E!==st&&E!==ct&&E!==D)&&E!==x&&!(at===F&&!Ct)||Nt(at)&&!Dt(at)&&E===x||at===F&&Ct}t(Kt,"isPlainSafe");function Yt(E){return At(E)&&E!==a&&!Dt(E)&&E!==v&&E!==K&&E!==F&&E!==_&&E!==rt&&E!==st&&E!==ct&&E!==D&&E!==x&&E!==S&&E!==B&&E!==u&&E!==nt&&E!==I&&E!==O&&E!==T&&E!==m&&E!==b&&E!==Z&&E!==ut}t(Yt,"isPlainSafeFirst");function le(E){return!Dt(E)&&E!==F}t(le,"isPlainSafeLast");function ne(E,at){let wt=E.charCodeAt(at),xt;if(wt>=55296&&wt<=56319&&at+1<E.length){if(xt=E.charCodeAt(at+1),xt>=56320&&xt<=57343)return(wt-55296)*1024+xt-56320+65536}return wt}t(ne,"codePointAt");function er(E){return/^\n* /.test(E)}t(er,"needIndentIndicator");let Dr=1,ze=2,yi=3,xi=4,He=5;function Pr(E,at,wt,xt,Ct,St,kt,Et){let Mt,Pt=0,zt=null,re=!1,he=!1,kc=xt!==-1,Si=-1,Ti=Yt(ne(E,0))&&le(ne(E,E.length-1));if(at||kt)for(Mt=0;Mt<E.length;Pt>=65536?Mt+=2:Mt++){if(Pt=ne(E,Mt),!At(Pt))return He;Ti=Ti&&Kt(Pt,zt,Et),zt=Pt}else{for(Mt=0;Mt<E.length;Pt>=65536?Mt+=2:Mt++){if(Pt=ne(E,Mt),Pt===n){if(re=!0,kc)he=he||Mt-Si-1>xt&&E[Si+1]!==" ",Si=Mt}else if(!At(Pt))return He;Ti=Ti&&Kt(Pt,zt,Et),zt=Pt}he=he||kc&&(Mt-Si-1>xt&&E[Si+1]!==" ")}if(!re&&!he){if(Ti&&!kt&&!Ct(E))return Dr;return St===vt?He:ze}if(wt>9&&er(E))return He;if(!kt)return he?xi:yi;return St===vt?He:ze}t(Pr,"chooseScalarStyle");function Ci(E,at,wt,xt,Ct){E.dump=function(){if(at.length===0)return E.quotingType===vt?'""':"''";if(!E.noCompatMode){if(it.indexOf(at)!==-1||P.test(at))return E.quotingType===vt?'"'+at+'"':"'"+at+"'"}let St=E.indent*Math.max(1,wt),kt=E.lineWidth===-1?-1:Math.max(Math.min(E.lineWidth,40),E.lineWidth-St),Et=xt||E.flowLevel>-1&&wt>=E.flowLevel;function Mt(Pt){return Jt(E,Pt)}switch(t(Mt,"testAmbiguity"),Pr(at,Et,E.indent,kt,Mt,E.quotingType,E.forceQuotes&&!xt,Ct)){case Dr:return at;case ze:return"'"+at.replace(/'/g,"''")+"'";case yi:return"|"+Rr(at,E.indent)+qr(Vt(at,St));case xi:return">"+Rr(at,E.indent)+qr(Vt(bi(at,kt),St));case He:return'"'+ki(at)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Ci,"writeScalar");function Rr(E,at){let wt=er(E)?String(at):"",xt=E[E.length-1]===`
145
+ `+r.repeat(" ",E.indent*at)}t(Qt,"generateNextLine");function Jt(E,at){for(let wt=0,xt=E.implicitTypes.length;wt<xt;wt+=1)if(E.implicitTypes[wt].resolve(at))return!0;return!1}t(Jt,"testImplicitResolving");function Pt(E){return E===f||E===c}t(Pt,"isWhitespace");function It(E){return E>=32&&E<=126||E>=161&&E<=55295&&E!==8232&&E!==8233||E>=57344&&E<=65533&&E!==a||E>=65536&&E<=1114111}t(It,"isPrintable");function zt(E){return It(E)&&E!==a&&E!==d&&E!==n}t(zt,"isNsCharOrWhitespace");function Kt(E,at,wt){let xt=zt(E),Ct=xt&&!Pt(E);return(wt?xt:xt&&E!==_&&E!==rt&&E!==st&&E!==ct&&E!==D)&&E!==x&&!(at===F&&!Ct)||zt(at)&&!Pt(at)&&E===x||at===F&&Ct}t(Kt,"isPlainSafe");function Ut(E){return It(E)&&E!==a&&!Pt(E)&&E!==v&&E!==K&&E!==F&&E!==_&&E!==rt&&E!==st&&E!==ct&&E!==D&&E!==x&&E!==S&&E!==B&&E!==u&&E!==nt&&E!==I&&E!==O&&E!==T&&E!==m&&E!==b&&E!==Z&&E!==ut}t(Ut,"isPlainSafeFirst");function le(E){return!Pt(E)&&E!==F}t(le,"isPlainSafeLast");function ne(E,at){let wt=E.charCodeAt(at),xt;if(wt>=55296&&wt<=56319&&at+1<E.length){if(xt=E.charCodeAt(at+1),xt>=56320&&xt<=57343)return(wt-55296)*1024+xt-56320+65536}return wt}t(ne,"codePointAt");function er(E){return/^\n* /.test(E)}t(er,"needIndentIndicator");let Or=1,ze=2,yi=3,xi=4,He=5;function Dr(E,at,wt,xt,Ct,St,kt,Ot){let Et,Rt=0,Yt=null,re=!1,he=!1,kc=xt!==-1,Si=-1,Ti=Ut(ne(E,0))&&le(ne(E,E.length-1));if(at||kt)for(Et=0;Et<E.length;Rt>=65536?Et+=2:Et++){if(Rt=ne(E,Et),!It(Rt))return He;Ti=Ti&&Kt(Rt,Yt,Ot),Yt=Rt}else{for(Et=0;Et<E.length;Rt>=65536?Et+=2:Et++){if(Rt=ne(E,Et),Rt===n){if(re=!0,kc)he=he||Et-Si-1>xt&&E[Si+1]!==" ",Si=Et}else if(!It(Rt))return He;Ti=Ti&&Kt(Rt,Yt,Ot),Yt=Rt}he=he||kc&&(Et-Si-1>xt&&E[Si+1]!==" ")}if(!re&&!he){if(Ti&&!kt&&!Ct(E))return Or;return St===At?He:ze}if(wt>9&&er(E))return He;if(!kt)return he?xi:yi;return St===At?He:ze}t(Dr,"chooseScalarStyle");function Ci(E,at,wt,xt,Ct){E.dump=function(){if(at.length===0)return E.quotingType===At?'""':"''";if(!E.noCompatMode){if(it.indexOf(at)!==-1||P.test(at))return E.quotingType===At?'"'+at+'"':"'"+at+"'"}let St=E.indent*Math.max(1,wt),kt=E.lineWidth===-1?-1:Math.max(Math.min(E.lineWidth,40),E.lineWidth-St),Ot=xt||E.flowLevel>-1&&wt>=E.flowLevel;function Et(Rt){return Jt(E,Rt)}switch(t(Et,"testAmbiguity"),Dr(at,Ot,E.indent,kt,Et,E.quotingType,E.forceQuotes&&!xt,Ct)){case Or:return at;case ze:return"'"+at.replace(/'/g,"''")+"'";case yi:return"|"+Pr(at,E.indent)+Rr(Vt(at,St));case xi:return">"+Pr(at,E.indent)+Rr(Vt(bi(at,kt),St));case He:return'"'+ki(at)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Ci,"writeScalar");function Pr(E,at){let wt=er(E)?String(at):"",xt=E[E.length-1]===`
146
146
  `,St=xt&&(E[E.length-2]===`
147
147
  `||E===`
148
148
  `)?"+":xt?"":"-";return wt+St+`
149
- `}t(Rr,"blockHeader");function qr(E){return E[E.length-1]===`
150
- `?E.slice(0,-1):E}t(qr,"dropEndingNewline");function bi(E,at){let wt=/(\n+)([^\n]*)/g,xt=function(){let Et=E.indexOf(`
151
- `);return Et=Et!==-1?Et:E.length,wt.lastIndex=Et,De(E.slice(0,Et),at)}(),Ct=E[0]===`
152
- `||E[0]===" ",St,kt;while(kt=wt.exec(E)){let Et=kt[1],Mt=kt[2];St=Mt[0]===" ",xt+=Et+(!Ct&&!St&&Mt!==""?`
153
- `:"")+De(Mt,at),Ct=St}return xt}t(bi,"foldString");function De(E,at){if(E===""||E[0]===" ")return E;let wt=/ [^ ]/g,xt,Ct=0,St,kt=0,Et=0,Mt="";while(xt=wt.exec(E)){if(Et=xt.index,Et-Ct>at)St=kt>Ct?kt:Et,Mt+=`
154
- `+E.slice(Ct,St),Ct=St+1;kt=Et}if(Mt+=`
155
- `,E.length-Ct>at&&kt>Ct)Mt+=E.slice(Ct,kt)+`
156
- `+E.slice(kt+1);else Mt+=E.slice(Ct);return Mt.slice(1)}t(De,"foldLine");function ki(E){let at="",wt=0;for(let xt=0;xt<E.length;wt>=65536?xt+=2:xt++){wt=ne(E,xt);let Ct=U[wt];if(!Ct&&At(wt)){if(at+=E[xt],wt>=65536)at+=E[xt+1]}else at+=Ct||lt(wt)}return at}t(ki,"escapeString");function Wr(E,at,wt){let xt="",Ct=E.tag;for(let St=0,kt=wt.length;St<kt;St+=1){let Et=wt[St];if(E.replacer)Et=E.replacer.call(wt,String(St),Et);if(gt(E,at,Et,!1,!1)||typeof Et>"u"&&gt(E,at,null,!1,!1)){if(xt!=="")xt+=","+(!E.condenseFlow?" ":"");xt+=E.dump}}E.tag=Ct,E.dump="["+xt+"]"}t(Wr,"writeFlowSequence");function Nr(E,at,wt,xt){let Ct="",St=E.tag;for(let kt=0,Et=wt.length;kt<Et;kt+=1){let Mt=wt[kt];if(E.replacer)Mt=E.replacer.call(wt,String(kt),Mt);if(gt(E,at+1,Mt,!0,!0,!1,!0)||typeof Mt>"u"&&gt(E,at+1,null,!0,!0,!1,!0)){if(!xt||Ct!=="")Ct+=Qt(E,at);if(E.dump&&n===E.dump.charCodeAt(0))Ct+="-";else Ct+="- ";Ct+=E.dump}}E.tag=St,E.dump=Ct||"[]"}t(Nr,"writeBlockSequence");function wi(E,at,wt){let xt="",Ct=E.tag,St=Object.keys(wt);for(let kt=0,Et=St.length;kt<Et;kt+=1){let Mt="";if(xt!=="")Mt+=", ";if(E.condenseFlow)Mt+='"';let Pt=St[kt],zt=wt[Pt];if(E.replacer)zt=E.replacer.call(wt,Pt,zt);if(!gt(E,at,Pt,!1,!1))continue;if(E.dump.length>1024)Mt+="? ";if(Mt+=E.dump+(E.condenseFlow?'"':"")+":"+(E.condenseFlow?"":" "),!gt(E,at,zt,!1,!1))continue;Mt+=E.dump,xt+=Mt}E.tag=Ct,E.dump="{"+xt+"}"}t(wi,"writeFlowMapping");function k(E,at,wt,xt){let Ct="",St=E.tag,kt=Object.keys(wt);if(E.sortKeys===!0)kt.sort();else if(typeof E.sortKeys==="function")kt.sort(E.sortKeys);else if(E.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Et=0,Mt=kt.length;Et<Mt;Et+=1){let Pt="";if(!xt||Ct!=="")Pt+=Qt(E,at);let zt=kt[Et],re=wt[zt];if(E.replacer)re=E.replacer.call(wt,zt,re);if(!gt(E,at+1,zt,!0,!0,!0))continue;let he=E.tag!==null&&E.tag!=="?"||E.dump&&E.dump.length>1024;if(he)if(E.dump&&n===E.dump.charCodeAt(0))Pt+="?";else Pt+="? ";if(Pt+=E.dump,he)Pt+=Qt(E,at);if(!gt(E,at+1,re,!0,he))continue;if(E.dump&&n===E.dump.charCodeAt(0))Pt+=":";else Pt+=": ";Pt+=E.dump,Ct+=Pt}E.tag=St,E.dump=Ct||"{}"}t(k,"writeBlockMapping");function ot(E,at,wt){let xt=wt?E.explicitTypes:E.implicitTypes;for(let Ct=0,St=xt.length;Ct<St;Ct+=1){let kt=xt[Ct];if((kt.instanceOf||kt.predicate)&&(!kt.instanceOf||typeof at==="object"&&at instanceof kt.instanceOf)&&(!kt.predicate||kt.predicate(at))){if(wt)if(kt.multi&&kt.representName)E.tag=kt.representName(at);else E.tag=kt.tag;else E.tag="?";if(kt.represent){let Et=E.styleMap[kt.tag]||kt.defaultStyle,Mt;if(s.call(kt.represent)==="[object Function]")Mt=kt.represent(at,Et);else if(o.call(kt.represent,Et))Mt=kt.represent[Et](at,Et);else throw new e("!<"+kt.tag+'> tag resolver accepts not "'+Et+'" style');E.dump=Mt}return!0}}return!1}t(ot,"detectType");function gt(E,at,wt,xt,Ct,St,kt){if(E.tag=null,E.dump=wt,!ot(E,wt,!1))ot(E,wt,!0);let Et=s.call(E.dump),Mt=xt;if(xt)xt=E.flowLevel<0||E.flowLevel>at;let Pt=Et==="[object Object]"||Et==="[object Array]",zt,re;if(Pt)zt=E.duplicates.indexOf(wt),re=zt!==-1;if(E.tag!==null&&E.tag!=="?"||re||E.indent!==2&&at>0)Ct=!1;if(re&&E.usedDuplicates[zt])E.dump="*ref_"+zt;else{if(Pt&&re&&!E.usedDuplicates[zt])E.usedDuplicates[zt]=!0;if(Et==="[object Object]"){if(xt&&Object.keys(E.dump).length!==0){if(k(E,at,E.dump,Ct),re)E.dump="&ref_"+zt+E.dump}else if(wi(E,at,E.dump),re)E.dump="&ref_"+zt+" "+E.dump}else if(Et==="[object Array]"){if(xt&&E.dump.length!==0){if(E.noArrayIndent&&!kt&&at>0)Nr(E,at-1,E.dump,Ct);else Nr(E,at,E.dump,Ct);if(re)E.dump="&ref_"+zt+E.dump}else if(Wr(E,at,E.dump),re)E.dump="&ref_"+zt+" "+E.dump}else if(Et==="[object String]"){if(E.tag!=="?")Ci(E,E.dump,at,St,Mt)}else if(Et==="[object Undefined]")return!1;else{if(E.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Et)}if(E.tag!==null&&E.tag!=="?"){let he=encodeURI(E.tag[0]==="!"?E.tag.slice(1):E.tag).replace(/!/g,"%21");if(E.tag[0]==="!")he="!"+he;else if(he.slice(0,18)==="tag:yaml.org,2002:")he="!!"+he.slice(18);else he="!<"+he+">";E.dump=he+" "+E.dump}}return!0}t(gt,"writeNode");function bt(E,at){let wt=[],xt=[];dt(E,wt,xt);let Ct=xt.length;for(let St=0;St<Ct;St+=1)at.duplicates.push(wt[xt[St]]);at.usedDuplicates=Array(Ct)}t(bt,"getDuplicateReferences");function dt(E,at,wt){if(E!==null&&typeof E==="object"){let xt=at.indexOf(E);if(xt!==-1){if(wt.indexOf(xt)===-1)wt.push(xt)}else if(at.push(E),Array.isArray(E))for(let Ct=0,St=E.length;Ct<St;Ct+=1)dt(E[Ct],at,wt);else{let Ct=Object.keys(E);for(let St=0,kt=Ct.length;St<kt;St+=1)dt(E[Ct[St]],at,wt)}}}t(dt,"inspectNode");function Tt(E,at){at=at||{};let wt=new Xt(at);if(!wt.noRefs)bt(E,wt);let xt=E;if(wt.replacer)xt=wt.replacer.call({"":xt},"",xt);if(gt(wt,0,xt,!0,!0))return wt.dump+`
157
- `;return""}return t(Tt,"dump2"),Ql.dump=Tt,Ql}t(Od,"requireDumper");var Ad;function Dd(){if(Ad)return Se;Ad=1;let r=Id(),e=Od();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"),Se.Type=Te(),Se.Schema=th(),Se.FAILSAFE_SCHEMA=oh(),Se.JSON_SCHEMA=hh(),Se.CORE_SCHEMA=ch(),Se.DEFAULT_SCHEMA=vs(),Se.load=r.load,Se.loadAll=r.loadAll,Se.dump=e.dump,Se.YAMLException=ai(),Se.types={binary:fh(),float:lh(),map:ih(),null:sh(),pairs:gh(),set:mh(),timestamp:uh(),bool:ah(),int:nh(),merge:dh(),omap:ph(),seq:rh(),str:eh()},Se.safeLoad=i("safeLoad","load"),Se.safeLoadAll=i("safeLoadAll","loadAll"),Se.safeDump=i("safeDump","dump"),Se}t(Dd,"requireJsYaml");var lb=Dd(),hb=Ed(lb),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:sr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:lr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=hb;var ip=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:c}=s??{},n=r.attr("id"),d=i?.includes("dark")?"#FFFFFF":"#000000",f=t((m,x,b)=>r.append("defs").append("filter").attr("id",m).attr("height",x).attr("width",x).append("feDropShadow").attr("dx",b).attr("dy",b).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",d),"dropShadow");if(f(`${n}-drop-shadow`,"130%","4"),f(`${n}-drop-shadow-small`,"150%","2"),!o)return;let u=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Pd=t((r)=>{let{handDrawnSeed:e}=p();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),cb=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ge=t((r)=>{let e=ub([...r.cssCompiledStyles||[],...r.cssStyles||[],...cb(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),ub=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Qu=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"),Q=t((r)=>{let{stylesArray:e}=Ge(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(Qu(n))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),n.includes("stroke"))o.push(c.join(":")+" !important");if(n==="fill")a.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),_t=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=p(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=Ge(r);return Object.assign({roughness:0.7,fill:c.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:db(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),db=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 yh=(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(),d=o.pop(),f={provider:o.length>0?o[0]:s,prefix:d,name:n};return e&&!As(f)?null:f}let a=o[0],c=a.split("-");if(c.length>1){let n={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!As(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!As(n,i)?null:n}return null},As=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var fb=Object.freeze({left:0,top:0,width:16,height:16}),ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xh=Object.freeze({...fb,...ni}),Rd=Object.freeze({...xh,body:"",hidden:!1});function qd(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 Ch(r,e){let i=qd(r,e);for(let s in Rd)if(s in ni){if(s in r&&!(s in i))i[s]=ni[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Wd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let n=s[c]&&s[c].parent,d=n&&a(n);if(d)o[c]=[n].concat(d)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Nd(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=Ch(s[n]||o[n],a)}return c(e),i.forEach(c),Ch(r,a)}function bh(r,e){if(r.icons[e])return Nd(r,e,[]);let i=Wd(r,[e])[e];return i?Nd(r,e,i):null}var pb=Object.freeze({width:null,height:null}),zd=Object.freeze({...pb,...ni});var gb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kh(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(gb);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=mb.test(a);while(!0){if(c){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("");c=!c}}function yb(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 c=r.indexOf(">",a);if(c===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function xb(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Hd(r,e,i){let s=yb(r);return xb(s.defs,e+s.content+i)}var Cb=(r)=>r==="unset"||r==="undefined"||r==="none";function wh(r,e){let i={...xh,...r},s={...zd,...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:F}=T;if(_)if(v)F+=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 I;if(F<0)F-=Math.floor(F/4)*4;switch(F=F%4,F){case 1:I=o.height/2+o.top,B.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:I=o.width/2+o.left,B.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")")}if(F%2===1){if(o.left!==o.top)I=o.left,o.left=o.top,o.top=I;if(o.width!==o.height)I=o.width,o.width=o.height,o.height=I}if(B.length)a=Hd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:c,height:n}=s,{width:d,height:f}=o,u,m;if(c===null)m=n===null?"1em":n==="auto"?f:n,u=kh(m,d/f);else u=c==="auto"?d:c,m=n===null?kh(u,f/d):n==="auto"?f:n;let x={},b=(T,B)=>{if(!Cb(B))x[T]=B.toString()};b("width",u),b("height",m);let S=[o.left,o.top,d,f];return x.viewBox=S.join(" "),{attributes:x,viewBox:S,body:a}}var bb=/\sid="(\S+)"/g,Yd=new Map;function kb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Yd.get(r)||0;return Yd.set(r,e+1),e?`${r}${e}`:r}function Sh(r){let e=[],i;while(i=bb.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=kb(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function Th(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 Gf={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},Bh=new Map,jd=new Map,Mi=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)jd.set(e.name,e.loader);else if("icons"in e)Bh.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"),Ud=t(async(r,e)=>{let i=yh(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=Bh.get(s);if(!o){let c=jd.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},Bh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=bh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Es=t(async(r)=>{try{return await Ud(r),!0}catch{return!1}},"isIconAvailable"),cr=t(async(r,e,i)=>{let s;try{s=await Ud(r,e?.fallbackPrefix)}catch(c){l.error(c),s=Gf}let o=wh(s,e),a=Th(Sh(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var hf=fn(Ps(),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 c=r.apply(this,s);return i.cache=a.set(o,c)||a,c};return i.cache=new(Lr.Cache||Map),i}Lr.Cache=Map;function Pi(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function Jo(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var sp="[object RegExp]",Kl="[object String]",Vl="[object Number]",Yl="[object Boolean]",Jl="[object Arguments]",lp="[object Symbol]",cp="[object Date]",up="[object Map]",dp="[object Set]",pp="[object Array]";var mp="[object ArrayBuffer]",fp="[object Object]";var gp="[object DataView]",Ap="[object Uint8Array]",hp="[object Uint8ClampedArray]",bp="[object Uint16Array]",yp="[object Uint32Array]";var vp="[object Int8Array]",kp="[object Int16Array]",xp="[object Int32Array]";var wp="[object Float32Array]",Cp="[object Float64Array]";function li(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Zo(r){return li(r)}function Qd(){}function Jd(r){if(Pi(r))return r;if(Array.isArray(r)||li(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 Is(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var _h=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Zl(r){return typeof _h.Buffer<"u"&&_h.Buffer.isBuffer(r)}function tf(r){return r==="__proto__"}function Ds(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 ef(r,e){return hi(r,void 0,r,new Map,e)}function hi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(Pi(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[n,d]of r)c.set(n,hi(d,n,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let n of r)c.add(hi(n,void 0,i,s,o));return c}if(Zl(r))return r.subarray();if(li(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,Oe(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof r==="object"&&Ib(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),Oe(c,r,i,s,o),c}return r}function Oe(r,e,i=r,s,o){let a=[...Object.keys(e),...Is(e)];for(let c=0;c<a.length;c++){let n=a[c],d=Object.getOwnPropertyDescriptor(r,n);if(d==null||d.writable)r[n]=hi(e[n],n,i,s,o)}}function Ib(r){switch(Jo(r)){case Jl:case pp:case mp:case gp:case Yl:case cp:case wp:case Cp:case vp:case kp:case xp:case up:case Vl:case fp:case sp:case dp:case Kl:case lp:case Ap:case hp:case bp:case yp:return!0;default:return!1}}function rf(r,e){return ef(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(Jo(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),Oe(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Vl:case Kl:case Yl:{let n=new r.constructor(r?.valueOf());return Oe(n,r),n}case Jl:{let n={};return Oe(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function vh(r){return rf(r)}function Ru(r){return r!==null&&typeof r==="object"&&Jo(r)==="[object Arguments]"}function xo(r){return typeof r==="object"&&r!==null}function of(r){return Number.isSafeInteger(r)&&r>=0}function Ep(r){return r!=null&&typeof r!=="function"&&of(r.length)}function sf(r){return xo(r)&&Ep(r)}function af(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let c=i[a];o=Rs(o,c,s,new Map)}return o}function Rs(r,e,i,s){if(Pi(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return Jd(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),...Is(e)];for(let a=0;a<o.length;a++){let c=o[a];if(tf(c))continue;let n=e[c],d=r[c];if(Ru(n))n={...n};if(Ru(d))d={...d};if(Zl(n))n=vh(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],m=Reflect.ownKeys(d);for(let x=0;x<m.length;x++){let b=m[x];u[b]=d[b]}d=u}else if(sf(d)){let u=[];for(let m=0;m<d.length;m++)u[m]=d[m];d=u}else d=[];let f=i(d,n,c,r,e,s);if(f!==void 0)r[c]=f;else if(Array.isArray(n))r[c]=Rs(d,n,i,s);else if(xo(d)&&xo(n)&&(Ds(d)||Ds(n)||Zo(d)||Zo(n)))r[c]=Rs(d,n,i,s);else if(d==null&&Ds(n))r[c]=Rs({},n,i,s);else if(d==null&&Zo(n))r[c]=vh(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function Lh(r,...e){return af(r,...e,Qd)}var jf="​",Ob={curveBasis:vr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:ro,curveBumpY:io,curveBundle:hl,curveCardinalClosed:cl,curveCardinalOpen:ul,curveCardinal:so,curveCatmullRomClosed:dl,curveCatmullRomOpen:fl,curveCatmullRom:no,curveLinear:pa,curveLinearClosed:Ss,curveMonotoneX:lo,curveMonotoneY:ho,curveNatural:ii,curveStep:oi,curveStepAfter:yo,curveStepBefore:go},Db=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Pb=t(function(r,e){let i=cf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);Ei(c),s=Ve(s,[...c])}else s=i.args;if(!s)return;let o=$l(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"),cf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Db.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=Hr.exec(r))!==null){if(s.index===Hr.lastIndex)Hr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}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"),Wg=t(function(r){return r.replace(Hr,"")},"removeDirectives"),Rb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Ws(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Ob[i]??e}t(Ws,"interpolateToCurve");function uf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return hf.sanitizeUrl(i);return i}t(uf,"formatUrl");var qb=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function Fh(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(Fh,"distance");function df(r){let e,i=0;r.forEach((o)=>{i+=Fh(o,e),e=o});let s=i/2;return Mh(r,s)}t(df,"traverseEdge");function ff(r){if(r.length===1)return r[0];return df(r)}t(ff,"calcLabelPosition");var nf=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=Fh(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:nf((1-c)*i.x+c*o.x,5),y:nf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Wb=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,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function pf(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),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(pf,"calcTerminalLabelPosition");function Bp(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(Bp,"getStylesFromArray");var lf=0,qf=t(()=>(lf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lf),"generateId");function gf(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(gf,"makeRandomHex");var Hf=t((r)=>gf(r.length),"random"),Nb=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"),zb=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=Nn(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"),Oi=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((c,n)=>{let d=Wn(`${c} `,i),f=Wn(a,i);if(d>e){let{hyphenatedStrings:x,remainingWord:b}=Hb(c,e,"-",i);o.push(a,...x),a=b}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Hb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(Wn(f,s)>=e){let m=d+1,x=o.length===m,b=`${f}${i}`;a.push(x?f:b),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Fu(r,e){return Lu(r,e).height}t(Fu,"calculateTextHeight");function Wn(r,e){return Lu(r,e).width}t(Wn,"calculateTextWidth");var Lu=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Nn(i),c=["sans-serif",s],n=r.split(w.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let x of c){let b=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Nb();B.text=T||jf;let _=zb(u,B).style("font-size",a).style("font-weight",o).style("font-family",x),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)),b=Math.round(v.height),S.height+=b,S.lineHeight=Math.round(Math.max(S.lineHeight,b))}d.push(S)}u.remove();let m=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[m]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Yb=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")}},qs,jb=t(function(r){return qs=qs||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qs.innerHTML=r,unescape(qs.textContent)},"entityDecode");function Ip(r){return"str"in r}t(Ip,"isDetailedError");var Ub=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"),Nn=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 ie(r,e){return Lh({},r,e)}t(ie,"cleanAndMerge");var V={assignWithDepth:Ve,wrapLabel:Oi,calculateTextHeight:Fu,calculateTextWidth:Wn,calculateTextDimensions:Lu,cleanAndMerge:ie,detectInit:Pb,detectDirective:cf,isSubstringInArray:Rb,interpolateToCurve:Ws,calcLabelPosition:ff,calcCardinalityPosition:Wb,calcTerminalLabelPosition:pf,formatUrl:uf,getStylesFromArray:Bp,generateId:qf,random:Hf,runFunc:qb,entityDecode:jb,insertTitle:Ub,isLabelCoordinateInPath:mf,parseFontSize:Nn,InitIDGenerator:Yb},Kg=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"),$a=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Bn=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 ue(r){return r??null}t(ue,"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 Eh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=Eh();function Sf(r){Mr=r}var wo={exec:()=>null};function se(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Fe.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Xb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Fe={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")},Gb=/^(?:[ \t]*(?:\n|$))+/,Vb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Kb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,So=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Zb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$h=/(?:[*+-]|\d{1,9}[.)])/,Tf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bf=se(Tf).replace(/bull/g,$h).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(),Qb=se(Tf).replace(/bull/g,$h).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(),Ih=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jb=/^[^\n]+/,Oh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tk=se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Oh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ek=se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$h).getRegex(),Us="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",Dh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rk=se("^ {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",Dh).replace("tag",Us).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f=se(Ih).replace("hr",So).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",Us).getRegex(),ik=se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_f).getRegex(),Ph={blockquote:ik,code:Vb,def:tk,fences:Kb,heading:Zb,hr:So,html:rk,lheading:Bf,list:ek,newline:Gb,paragraph:_f,table:wo,text:Jb},yf=se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",So).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",Us).getRegex(),ok={...Ph,lheading:Qb,table:yf,paragraph:se(Ih).replace("hr",So).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yf).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",Us).getRegex()},sk={...Ph,html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dh).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:wo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:se(Ih).replace("hr",So).replace("heading",` *#{1,6} *[^
159
- ]`).replace("lheading",Bf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ak=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vf=/^( {2,}|\\)\n(?!\s*$)/,lk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xs=/[\p{P}\p{S}]/u,Rh=/[\s\p{P}\p{S}]/u,Ff=/[^\s\p{P}\p{S}]/u,hk=se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rh).getRegex(),Af=/(?!~)[\p{P}\p{S}]/u,ck=/(?!~)[\s\p{P}\p{S}]/u,uk=/(?:[^\s\p{P}\p{S}]|~)/u,dk=se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ef=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fk=se(Ef,"u").replace(/punct/g,Xs).getRegex(),pk=se(Ef,"u").replace(/punct/g,Af).getRegex(),If="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gk=se(If,"gu").replace(/notPunctSpace/g,Ff).replace(/punctSpace/g,Rh).replace(/punct/g,Xs).getRegex(),mk=se(If,"gu").replace(/notPunctSpace/g,uk).replace(/punctSpace/g,ck).replace(/punct/g,Af).getRegex(),yk=se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ff).replace(/punctSpace/g,Rh).replace(/punct/g,Xs).getRegex(),xk=se(/\\(punct)/,"gu").replace(/punct/g,Xs).getRegex(),Ck=se(/^<(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(),bk=se(Dh).replace("(?:-->|$)","-->").getRegex(),kk=se("^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",bk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,wk=se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Hs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Df=se(/^!?\[(label)\]\[(ref)\]/).replace("label",Hs).replace("ref",Oh).getRegex(),Rf=se(/^!?\[(ref)\](?:\[\])?/).replace("ref",Oh).getRegex(),Sk=se("reflink|nolink(?!\\()","g").replace("reflink",Df).replace("nolink",Rf).getRegex(),xf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,qh={_backpedal:wo,anyPunctuation:xk,autolink:Ck,blockSkip:dk,br:vf,code:nk,del:wo,emStrongLDelim:fk,emStrongRDelimAst:gk,emStrongRDelimUnd:yk,escape:ak,link:wk,nolink:Rf,punctuation:hk,reflink:Df,reflinkSearch:Sk,tag:kk,text:lk,url:wo},Tk={...qh,link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",Hs).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hs).getRegex()},Ah={...qh,emStrongRDelimAst:mk,emStrongLDelim:pk,url:se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xf).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:se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",xf).getRegex()},Bk={...Ah,br:se(vf).replace("{2,}","*").getRegex(),text:se(Ah.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ns={normal:Ph,gfm:ok,pedantic:sk},Co={normal:qh,gfm:Ah,breaks:Bk,pedantic:Tk},_k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cf=(r)=>_k[r];function Ke(r,e){if(e){if(Fe.escapeTest.test(r))return r.replace(Fe.escapeReplace,Cf)}else if(Fe.escapeTestNoEncode.test(r))return r.replace(Fe.escapeReplaceNoEncode,Cf);return r}function bf(r){try{r=encodeURI(r).replace(Fe.percentDecode,"%")}catch{return null}return r}function kf(r,e){let i=r.replace(Fe.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(Fe.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(Fe.slashPipe,"|");return s}function bo(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 vk(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 wf(r,e,i,s,o){let a=e.href,c=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:c,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,d}function Lk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
149
+ `}t(Pr,"blockHeader");function Rr(E){return E[E.length-1]===`
150
+ `?E.slice(0,-1):E}t(Rr,"dropEndingNewline");function bi(E,at){let wt=/(\n+)([^\n]*)/g,xt=function(){let Ot=E.indexOf(`
151
+ `);return Ot=Ot!==-1?Ot:E.length,wt.lastIndex=Ot,De(E.slice(0,Ot),at)}(),Ct=E[0]===`
152
+ `||E[0]===" ",St,kt;while(kt=wt.exec(E)){let Ot=kt[1],Et=kt[2];St=Et[0]===" ",xt+=Ot+(!Ct&&!St&&Et!==""?`
153
+ `:"")+De(Et,at),Ct=St}return xt}t(bi,"foldString");function De(E,at){if(E===""||E[0]===" ")return E;let wt=/ [^ ]/g,xt,Ct=0,St,kt=0,Ot=0,Et="";while(xt=wt.exec(E)){if(Ot=xt.index,Ot-Ct>at)St=kt>Ct?kt:Ot,Et+=`
154
+ `+E.slice(Ct,St),Ct=St+1;kt=Ot}if(Et+=`
155
+ `,E.length-Ct>at&&kt>Ct)Et+=E.slice(Ct,kt)+`
156
+ `+E.slice(kt+1);else Et+=E.slice(Ct);return Et.slice(1)}t(De,"foldLine");function ki(E){let at="",wt=0;for(let xt=0;xt<E.length;wt>=65536?xt+=2:xt++){wt=ne(E,xt);let Ct=U[wt];if(!Ct&&It(wt)){if(at+=E[xt],wt>=65536)at+=E[xt+1]}else at+=Ct||lt(wt)}return at}t(ki,"escapeString");function qr(E,at,wt){let xt="",Ct=E.tag;for(let St=0,kt=wt.length;St<kt;St+=1){let Ot=wt[St];if(E.replacer)Ot=E.replacer.call(wt,String(St),Ot);if(gt(E,at,Ot,!1,!1)||typeof Ot>"u"&&gt(E,at,null,!1,!1)){if(xt!=="")xt+=","+(!E.condenseFlow?" ":"");xt+=E.dump}}E.tag=Ct,E.dump="["+xt+"]"}t(qr,"writeFlowSequence");function Wr(E,at,wt,xt){let Ct="",St=E.tag;for(let kt=0,Ot=wt.length;kt<Ot;kt+=1){let Et=wt[kt];if(E.replacer)Et=E.replacer.call(wt,String(kt),Et);if(gt(E,at+1,Et,!0,!0,!1,!0)||typeof Et>"u"&&gt(E,at+1,null,!0,!0,!1,!0)){if(!xt||Ct!=="")Ct+=Qt(E,at);if(E.dump&&n===E.dump.charCodeAt(0))Ct+="-";else Ct+="- ";Ct+=E.dump}}E.tag=St,E.dump=Ct||"[]"}t(Wr,"writeBlockSequence");function wi(E,at,wt){let xt="",Ct=E.tag,St=Object.keys(wt);for(let kt=0,Ot=St.length;kt<Ot;kt+=1){let Et="";if(xt!=="")Et+=", ";if(E.condenseFlow)Et+='"';let Rt=St[kt],Yt=wt[Rt];if(E.replacer)Yt=E.replacer.call(wt,Rt,Yt);if(!gt(E,at,Rt,!1,!1))continue;if(E.dump.length>1024)Et+="? ";if(Et+=E.dump+(E.condenseFlow?'"':"")+":"+(E.condenseFlow?"":" "),!gt(E,at,Yt,!1,!1))continue;Et+=E.dump,xt+=Et}E.tag=Ct,E.dump="{"+xt+"}"}t(wi,"writeFlowMapping");function k(E,at,wt,xt){let Ct="",St=E.tag,kt=Object.keys(wt);if(E.sortKeys===!0)kt.sort();else if(typeof E.sortKeys==="function")kt.sort(E.sortKeys);else if(E.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Ot=0,Et=kt.length;Ot<Et;Ot+=1){let Rt="";if(!xt||Ct!=="")Rt+=Qt(E,at);let Yt=kt[Ot],re=wt[Yt];if(E.replacer)re=E.replacer.call(wt,Yt,re);if(!gt(E,at+1,Yt,!0,!0,!0))continue;let he=E.tag!==null&&E.tag!=="?"||E.dump&&E.dump.length>1024;if(he)if(E.dump&&n===E.dump.charCodeAt(0))Rt+="?";else Rt+="? ";if(Rt+=E.dump,he)Rt+=Qt(E,at);if(!gt(E,at+1,re,!0,he))continue;if(E.dump&&n===E.dump.charCodeAt(0))Rt+=":";else Rt+=": ";Rt+=E.dump,Ct+=Rt}E.tag=St,E.dump=Ct||"{}"}t(k,"writeBlockMapping");function ot(E,at,wt){let xt=wt?E.explicitTypes:E.implicitTypes;for(let Ct=0,St=xt.length;Ct<St;Ct+=1){let kt=xt[Ct];if((kt.instanceOf||kt.predicate)&&(!kt.instanceOf||typeof at==="object"&&at instanceof kt.instanceOf)&&(!kt.predicate||kt.predicate(at))){if(wt)if(kt.multi&&kt.representName)E.tag=kt.representName(at);else E.tag=kt.tag;else E.tag="?";if(kt.represent){let Ot=E.styleMap[kt.tag]||kt.defaultStyle,Et;if(s.call(kt.represent)==="[object Function]")Et=kt.represent(at,Ot);else if(o.call(kt.represent,Ot))Et=kt.represent[Ot](at,Ot);else throw new e("!<"+kt.tag+'> tag resolver accepts not "'+Ot+'" style');E.dump=Et}return!0}}return!1}t(ot,"detectType");function gt(E,at,wt,xt,Ct,St,kt){if(E.tag=null,E.dump=wt,!ot(E,wt,!1))ot(E,wt,!0);let Ot=s.call(E.dump),Et=xt;if(xt)xt=E.flowLevel<0||E.flowLevel>at;let Rt=Ot==="[object Object]"||Ot==="[object Array]",Yt,re;if(Rt)Yt=E.duplicates.indexOf(wt),re=Yt!==-1;if(E.tag!==null&&E.tag!=="?"||re||E.indent!==2&&at>0)Ct=!1;if(re&&E.usedDuplicates[Yt])E.dump="*ref_"+Yt;else{if(Rt&&re&&!E.usedDuplicates[Yt])E.usedDuplicates[Yt]=!0;if(Ot==="[object Object]"){if(xt&&Object.keys(E.dump).length!==0){if(k(E,at,E.dump,Ct),re)E.dump="&ref_"+Yt+E.dump}else if(wi(E,at,E.dump),re)E.dump="&ref_"+Yt+" "+E.dump}else if(Ot==="[object Array]"){if(xt&&E.dump.length!==0){if(E.noArrayIndent&&!kt&&at>0)Wr(E,at-1,E.dump,Ct);else Wr(E,at,E.dump,Ct);if(re)E.dump="&ref_"+Yt+E.dump}else if(qr(E,at,E.dump),re)E.dump="&ref_"+Yt+" "+E.dump}else if(Ot==="[object String]"){if(E.tag!=="?")Ci(E,E.dump,at,St,Et)}else if(Ot==="[object Undefined]")return!1;else{if(E.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Ot)}if(E.tag!==null&&E.tag!=="?"){let he=encodeURI(E.tag[0]==="!"?E.tag.slice(1):E.tag).replace(/!/g,"%21");if(E.tag[0]==="!")he="!"+he;else if(he.slice(0,18)==="tag:yaml.org,2002:")he="!!"+he.slice(18);else he="!<"+he+">";E.dump=he+" "+E.dump}}return!0}t(gt,"writeNode");function bt(E,at){let wt=[],xt=[];dt(E,wt,xt);let Ct=xt.length;for(let St=0;St<Ct;St+=1)at.duplicates.push(wt[xt[St]]);at.usedDuplicates=Array(Ct)}t(bt,"getDuplicateReferences");function dt(E,at,wt){if(E!==null&&typeof E==="object"){let xt=at.indexOf(E);if(xt!==-1){if(wt.indexOf(xt)===-1)wt.push(xt)}else if(at.push(E),Array.isArray(E))for(let Ct=0,St=E.length;Ct<St;Ct+=1)dt(E[Ct],at,wt);else{let Ct=Object.keys(E);for(let St=0,kt=Ct.length;St<kt;St+=1)dt(E[Ct[St]],at,wt)}}}t(dt,"inspectNode");function Tt(E,at){at=at||{};let wt=new Gt(at);if(!wt.noRefs)bt(E,wt);let xt=E;if(wt.replacer)xt=wt.replacer.call({"":xt},"",xt);if(gt(wt,0,xt,!0,!0))return wt.dump+`
157
+ `;return""}return t(Tt,"dump2"),Rl.dump=Tt,Rl}t(Od,"requireDumper");var Ad;function Dd(){if(Ad)return Se;Ad=1;let r=Id(),e=Od();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"),Se.Type=Te(),Se.Schema=Nl(),Se.FAILSAFE_SCHEMA=eh(),Se.JSON_SCHEMA=ah(),Se.CORE_SCHEMA=nh(),Se.DEFAULT_SCHEMA=vs(),Se.load=r.load,Se.loadAll=r.loadAll,Se.dump=e.dump,Se.YAMLException=ai(),Se.types={binary:ch(),float:sh(),map:th(),null:rh(),pairs:dh(),set:fh(),timestamp:lh(),bool:ih(),int:oh(),merge:hh(),omap:uh(),seq:Ql(),str:zl()},Se.safeLoad=i("safeLoad","load"),Se.safeLoadAll=i("safeLoadAll","loadAll"),Se.safeDump=i("safeDump","dump"),Se}t(Dd,"requireJsYaml");var rb=Dd(),ib=Ed(rb),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:lr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:cr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=ib;var up=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:c}=s??{},n=r.attr("id"),d=i?.includes("dark")?"#FFFFFF":"#000000",f=t((m,x,b)=>r.append("defs").append("filter").attr("id",m).attr("height",x).attr("width",x).append("feDropShadow").attr("dx",b).attr("dy",b).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",d),"dropShadow");if(f(`${n}-drop-shadow`,"130%","4"),f(`${n}-drop-shadow-small`,"150%","2"),!o)return;let u=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Pd=t((r)=>{let{handDrawnSeed:e}=p();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),ob=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ge=t((r)=>{let e=sb([...r.cssCompiledStyles||[],...r.cssStyles||[],...ob(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),sb=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Mu=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"),Q=t((r)=>{let{stylesArray:e}=Ge(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(Mu(n))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),n.includes("stroke"))o.push(c.join(":")+" !important");if(n==="fill")a.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),vt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=p(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=Ge(r);return Object.assign({roughness:0.7,fill:c.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:ab(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),ab=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 ph=(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(),d=o.pop(),f={provider:o.length>0?o[0]:s,prefix:d,name:n};return e&&!Ls(f)?null:f}let a=o[0],c=a.split("-");if(c.length>1){let n={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!Ls(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Ls(n,i)?null:n}return null},Ls=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var nb=Object.freeze({left:0,top:0,width:16,height:16}),ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),gh=Object.freeze({...nb,...ni}),Rd=Object.freeze({...gh,body:"",hidden:!1});function qd(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 mh(r,e){let i=qd(r,e);for(let s in Rd)if(s in ni){if(s in r&&!(s in i))i[s]=ni[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Wd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let n=s[c]&&s[c].parent,d=n&&a(n);if(d)o[c]=[n].concat(d)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Nd(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=mh(s[n]||o[n],a)}return c(e),i.forEach(c),mh(r,a)}function yh(r,e){if(r.icons[e])return Nd(r,e,[]);let i=Wd(r,[e])[e];return i?Nd(r,e,i):null}var lb=Object.freeze({width:null,height:null}),zd=Object.freeze({...lb,...ni});var hb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,cb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function xh(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(hb);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=cb.test(a);while(!0){if(c){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("");c=!c}}function ub(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 c=r.indexOf(">",a);if(c===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function db(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Hd(r,e,i){let s=ub(r);return db(s.defs,e+s.content+i)}var fb=(r)=>r==="unset"||r==="undefined"||r==="none";function Ch(r,e){let i={...gh,...r},s={...zd,...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:F}=T;if(_)if(v)F+=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 I;if(F<0)F-=Math.floor(F/4)*4;switch(F=F%4,F){case 1:I=o.height/2+o.top,B.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:I=o.width/2+o.left,B.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")")}if(F%2===1){if(o.left!==o.top)I=o.left,o.left=o.top,o.top=I;if(o.width!==o.height)I=o.width,o.width=o.height,o.height=I}if(B.length)a=Hd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:c,height:n}=s,{width:d,height:f}=o,u,m;if(c===null)m=n===null?"1em":n==="auto"?f:n,u=xh(m,d/f);else u=c==="auto"?d:c,m=n===null?xh(u,f/d):n==="auto"?f:n;let x={},b=(T,B)=>{if(!fb(B))x[T]=B.toString()};b("width",u),b("height",m);let S=[o.left,o.top,d,f];return x.viewBox=S.join(" "),{attributes:x,viewBox:S,body:a}}var pb=/\sid="(\S+)"/g,Yd=new Map;function gb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Yd.get(r)||0;return Yd.set(r,e+1),e?`${r}${e}`:r}function bh(r){let e=[],i;while(i=pb.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=gb(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function kh(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 Wf={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},wh=new Map,jd=new Map,Mi=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)jd.set(e.name,e.loader);else if("icons"in e)wh.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"),Ud=t(async(r,e)=>{let i=ph(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=wh.get(s);if(!o){let c=jd.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},wh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=yh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Fs=t(async(r)=>{try{return await Ud(r),!0}catch{return!1}},"isIconAvailable"),ur=t(async(r,e,i)=>{let s;try{s=await Ud(r,e?.fallbackPrefix)}catch(c){l.error(c),s=Wf}let o=Ch(s,e),a=kh(bh(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var hf=fn($s(),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 c=r.apply(this,s);return i.cache=a.set(o,c)||a,c};return i.cache=new(Lr.Cache||Map),i}Lr.Cache=Map;function Pi(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function Jo(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var dp="[object RegExp]",Jl="[object String]",Zl="[object Number]",Xl="[object Boolean]",ec="[object Arguments]",pp="[object Symbol]",mp="[object Date]",fp="[object Map]",gp="[object Set]",Ap="[object Array]";var hp="[object ArrayBuffer]",bp="[object Object]";var yp="[object DataView]",vp="[object Uint8Array]",kp="[object Uint8ClampedArray]",xp="[object Uint16Array]",wp="[object Uint32Array]";var Cp="[object Int8Array]",Ep="[object Int16Array]",Bp="[object Int32Array]";var Ip="[object Float32Array]",_p="[object Float64Array]";function li(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Zo(r){return li(r)}function Qd(){}function Jd(r){if(Pi(r))return r;if(Array.isArray(r)||li(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 As(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var Sh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function tc(r){return typeof Sh.Buffer<"u"&&Sh.Buffer.isBuffer(r)}function tf(r){return r==="__proto__"}function Es(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 ef(r,e){return hi(r,void 0,r,new Map,e)}function hi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(Pi(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[n,d]of r)c.set(n,hi(d,n,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let n of r)c.add(hi(n,void 0,i,s,o));return c}if(tc(r))return r.subarray();if(li(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,Oe(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof r==="object"&&Lb(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),Oe(c,r,i,s,o),c}return r}function Oe(r,e,i=r,s,o){let a=[...Object.keys(e),...As(e)];for(let c=0;c<a.length;c++){let n=a[c],d=Object.getOwnPropertyDescriptor(r,n);if(d==null||d.writable)r[n]=hi(e[n],n,i,s,o)}}function Lb(r){switch(Jo(r)){case ec:case Ap:case hp:case yp:case Xl:case mp:case Ip:case _p:case Cp:case Ep:case Bp:case fp:case Zl:case bp:case dp:case gp:case Jl:case pp:case vp:case kp:case xp:case wp:return!0;default:return!1}}function rf(r,e){return ef(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(Jo(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),Oe(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Zl:case Jl:case Xl:{let n=new r.constructor(r?.valueOf());return Oe(n,r),n}case ec:{let n={};return Oe(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function Th(r){return rf(r)}function Pu(r){return r!==null&&typeof r==="object"&&Jo(r)==="[object Arguments]"}function yo(r){return typeof r==="object"&&r!==null}function of(r){return Number.isSafeInteger(r)&&r>=0}function Sp(r){return r!=null&&typeof r!=="function"&&of(r.length)}function sf(r){return yo(r)&&Sp(r)}function af(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let c=i[a];o=Is(o,c,s,new Map)}return o}function Is(r,e,i,s){if(Pi(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return Jd(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),...As(e)];for(let a=0;a<o.length;a++){let c=o[a];if(tf(c))continue;let n=e[c],d=r[c];if(Pu(n))n={...n};if(Pu(d))d={...d};if(tc(n))n=Th(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],m=Reflect.ownKeys(d);for(let x=0;x<m.length;x++){let b=m[x];u[b]=d[b]}d=u}else if(sf(d)){let u=[];for(let m=0;m<d.length;m++)u[m]=d[m];d=u}else d=[];let f=i(d,n,c,r,e,s);if(f!==void 0)r[c]=f;else if(Array.isArray(n))r[c]=Is(d,n,i,s);else if(yo(d)&&yo(n)&&(Es(d)||Es(n)||Zo(d)||Zo(n)))r[c]=Is(d,n,i,s);else if(d==null&&Es(n))r[c]=Is({},n,i,s);else if(d==null&&Zo(n))r[c]=Th(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function Bh(r,...e){return af(r,...e,Qd)}var Kf="​",Fb={curveBasis:vr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:ro,curveBumpY:io,curveBundle:hl,curveCardinalClosed:cl,curveCardinalOpen:ul,curveCardinal:so,curveCatmullRomClosed:dl,curveCatmullRomOpen:fl,curveCatmullRom:no,curveLinear:pa,curveLinearClosed:Ss,curveMonotoneX:lo,curveMonotoneY:co,curveNatural:ii,curveStep:oi,curveStepAfter:go,curveStepBefore:uo},Mb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ab=t(function(r,e){let i=cf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);Ei(c),s=Ve(s,[...c])}else s=i.args;if(!s)return;let o=Gl(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"),cf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Mb.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],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}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"),eA=t(function(r){return r.replace(Nr,"")},"removeDirectives"),Eb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Rs(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Fb[i]??e}t(Rs,"interpolateToCurve");function uf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return hf.sanitizeUrl(i);return i}t(uf,"formatUrl");var $b=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function _h(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(_h,"distance");function df(r){let e,i=0;r.forEach((o)=>{i+=_h(o,e),e=o});let s=i/2;return vh(r,s)}t(df,"traverseEdge");function ff(r){if(r.length===1)return r[0];return df(r)}t(ff,"calcLabelPosition");var nf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),vh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=_h(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:nf((1-c)*i.x+c*o.x,5),y:nf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ib=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=vh(e,25),a=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function pf(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=vh(s,o),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(pf,"calcTerminalLabelPosition");function Tp(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(Tp,"getStylesFromArray");var lf=0,Vf=t(()=>(lf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lf),"generateId");function gf(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(gf,"makeRandomHex");var Yf=t((r)=>gf(r.length),"random"),Ob=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"),Db=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=Nn(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"),Oi=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((c,n)=>{let d=Kn(`${c} `,i),f=Kn(a,i);if(d>e){let{hyphenatedStrings:x,remainingWord:b}=Pb(c,e,"-",i);o.push(a,...x),a=b}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Pb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(Kn(f,s)>=e){let m=d+1,x=o.length===m,b=`${f}${i}`;a.push(x?f:b),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Ou(r,e){return $u(r,e).height}t(Ou,"calculateTextHeight");function Kn(r,e){return $u(r,e).width}t(Kn,"calculateTextWidth");var $u=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Nn(i),c=["sans-serif",s],n=r.split(w.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let x of c){let b=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Ob();B.text=T||Kf;let _=Db(u,B).style("font-size",a).style("font-weight",o).style("font-family",x),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)),b=Math.round(v.height),S.height+=b,S.lineHeight=Math.round(Math.max(S.lineHeight,b))}d.push(S)}u.remove();let m=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[m]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Rb=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")}},Ds,qb=t(function(r){return Ds=Ds||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ds.innerHTML=r,unescape(Ds.textContent)},"entityDecode");function Dp(r){return"str"in r}t(Dp,"isDetailedError");var Wb=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"),Nn=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 ie(r,e){return Bh({},r,e)}t(ie,"cleanAndMerge");var V={assignWithDepth:Ve,wrapLabel:Oi,calculateTextHeight:Ou,calculateTextWidth:Kn,calculateTextDimensions:$u,cleanAndMerge:ie,detectInit:Ab,detectDirective:cf,isSubstringInArray:Eb,interpolateToCurve:Rs,calcLabelPosition:ff,calcCardinalityPosition:Ib,calcTerminalLabelPosition:pf,formatUrl:uf,getStylesFromArray:Tp,generateId:Vf,random:Yf,runFunc:$b,entityDecode:qb,insertTitle:Wb,isLabelCoordinateInPath:mf,parseFontSize:Nn,InitIDGenerator:Rb},tA=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"),$a=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Bn=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 ue(r){return r??null}t(ue,"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 Mr=Fh();function Sf(r){Mr=r}var wo={exec:()=>null};function se(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Le.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Nb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Le={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")},zb=/^(?:[ \t]*(?:\n|$))+/,Hb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,So=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mh=/(?:[*+-]|\d{1,9}[.)])/,Tf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bf=se(Tf).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(),Ub=se(Tf).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]+)*)/,Xb=/^[^\n]+/,Eh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Gb=se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vb=se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Mh).getRegex(),Ys="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",$h=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kb=se("^ {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",$h).replace("tag",Ys).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f=se(Ah).replace("hr",So).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",Ys).getRegex(),Zb=se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_f).getRegex(),Ih={blockquote:Zb,code:Hb,def:Gb,fences:Yb,heading:jb,hr:So,html:Kb,lheading:Bf,list:Vb,newline:zb,paragraph:_f,table:wo,text:Xb},yf=se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",So).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",Ys).getRegex(),Qb={...Ih,lheading:Ub,table:yf,paragraph:se(Ah).replace("hr",So).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yf).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",Ys).getRegex()},Jb={...Ih,html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$h).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:wo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:se(Ah).replace("hr",So).replace("heading",` *#{1,6} *[^
159
+ ]`).replace("lheading",Bf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ek=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vf=/^( {2,}|\\)\n(?!\s*$)/,rk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,js=/[\p{P}\p{S}]/u,Oh=/[\s\p{P}\p{S}]/u,Lf=/[^\s\p{P}\p{S}]/u,ik=se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Oh).getRegex(),Ff=/(?!~)[\p{P}\p{S}]/u,ok=/(?!~)[\s\p{P}\p{S}]/u,sk=/(?:[^\s\p{P}\p{S}]|~)/u,ak=se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Nb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Mf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nk=se(Mf,"u").replace(/punct/g,js).getRegex(),lk=se(Mf,"u").replace(/punct/g,Ff).getRegex(),Af="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hk=se(Af,"gu").replace(/notPunctSpace/g,Lf).replace(/punctSpace/g,Oh).replace(/punct/g,js).getRegex(),ck=se(Af,"gu").replace(/notPunctSpace/g,sk).replace(/punctSpace/g,ok).replace(/punct/g,Ff).getRegex(),uk=se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Lf).replace(/punctSpace/g,Oh).replace(/punct/g,js).getRegex(),dk=se(/\\(punct)/,"gu").replace(/punct/g,js).getRegex(),fk=se(/^<(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(),pk=se($h).replace("(?:-->|$)","-->").getRegex(),gk=se("^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",pk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ws=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mk=se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ws).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ef=se(/^!?\[(label)\]\[(ref)\]/).replace("label",Ws).replace("ref",Eh).getRegex(),If=se(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eh).getRegex(),yk=se("reflink|nolink(?!\\()","g").replace("reflink",Ef).replace("nolink",If).getRegex(),xf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dh={_backpedal:wo,anyPunctuation:dk,autolink:fk,blockSkip:ak,br:vf,code:ek,del:wo,emStrongLDelim:nk,emStrongRDelimAst:hk,emStrongRDelimUnd:uk,escape:tk,link:mk,nolink:If,punctuation:ik,reflink:Ef,reflinkSearch:yk,tag:gk,text:rk,url:wo},xk={...Dh,link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",Ws).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ws).getRegex()},Lh={...Dh,emStrongRDelimAst:ck,emStrongLDelim:lk,url:se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xf).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:se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",xf).getRegex()},Ck={...Lh,br:se(vf).replace("{2,}","*").getRegex(),text:se(Lh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qs={normal:Ih,gfm:Qb,pedantic:Jb},xo={normal:Dh,gfm:Lh,breaks:Ck,pedantic:xk},bk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cf=(r)=>bk[r];function Ke(r,e){if(e){if(Le.escapeTest.test(r))return r.replace(Le.escapeReplace,Cf)}else if(Le.escapeTestNoEncode.test(r))return r.replace(Le.escapeReplaceNoEncode,Cf);return r}function bf(r){try{r=encodeURI(r).replace(Le.percentDecode,"%")}catch{return null}return r}function kf(r,e){let i=r.replace(Le.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(Le.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(Le.slashPipe,"|");return s}function Co(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 kk(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 wf(r,e,i,s,o){let a=e.href,c=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:c,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,d}function wk(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 c=a.match(i.other.beginningSpace);if(c===null)return a;let[n]=c;return n.length>=o.length?a.slice(o.length):a}).join(`
161
- `)}var Ys=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:bo(i,`
162
- `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=Lk(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=bo(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:bo(e[0],`
163
- `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=bo(e[0],`
161
+ `)}var Ns=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:Co(i,`
162
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=wk(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=Co(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:Co(e[0],`
163
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=Co(e[0],`
164
164
  `).split(`
165
165
  `),s="",o="",a=[];for(;i.length>0;){let c=!1,n=[],d;for(d=0;d<i.length;d++)if(this.rules.other.blockquoteStart.test(i[d]))n.push(i[d]),c=!0;else if(!c)n.push(i[d]);else break;i=i.slice(d);let f=n.join(`
166
166
  `),u=f.replace(this.rules.other.blockquoteSetextReplace,`
@@ -180,8 +180,8 @@ ${u}`:u;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
180
180
  `+x}!b&&!x.trim()&&(b=!0),f+=K+`
181
181
  `,r=r.substring(K.length+1),m=Z.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let T=null,B;this.options.gfm&&(T=this.rules.other.listIsTask.exec(u),T&&(B=T[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!T,checked:B,loose:!1,text:u,tokens:[]}),o.raw+=f}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 d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter((m)=>m.type==="space"),u=f.length>0&&f.some((m)=>this.rules.other.anyLine.test(m.raw));o.loose=u}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].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=kf(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 c of s)this.rules.other.tableAlignRight.test(c)?a.align.push("right"):this.rules.other.tableAlignCenter.test(c)?a.align.push("center"):this.rules.other.tableAlignLeft.test(c)?a.align.push("left"):a.align.push(null);for(let c=0;c<i.length;c++)a.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:a.align[c]});for(let c of o)a.rows.push(kf(c,a.header.length).map((n,d)=>({text:n,tokens:this.lexer.inline(n),header:!1,align:a.align[d]})));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=bo(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=vk(e[2],"()");if(a===-2)return;if(a>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,c).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)),wf(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 wf(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,c,n=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(s=f.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(c=[...a].length,s[3]||s[4]){n+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(n-=c,n>0)continue;c=Math.min(c,c+n+d);let u=[...s[0]][0].length,m=r.slice(0,o+s.index+u+c);if(Math.min(o,c)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let x=m.slice(2,-2);return{type:"strong",raw:m,text:x,tokens:this.lexer.inlineTokens(x)}}}}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}}}},qe=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 Ys,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:Fe,block:Ns.normal,inline:Co.normal};this.options.pedantic?(i.block=Ns.pedantic,i.inline=Co.pedantic):this.options.gfm&&(i.block=Ns.gfm,this.options.breaks?i.inline=Co.breaks:i.inline=Co.gfm),this.tokenizer.rules=i}static get rules(){return{block:Ns,inline:Co}}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(Fe.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(Fe.tabCharGlobal," ").replace(Fe.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.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 c=i.at(-1);o.raw.length===1&&c!==void 0?c.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=Co(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=kk(e[2],"()");if(a===-2)return;if(a>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,c).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)),wf(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 wf(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,c,n=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(s=f.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(c=[...a].length,s[3]||s[4]){n+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(n-=c,n>0)continue;c=Math.min(c,c+n+d);let u=[...s[0]][0].length,m=r.slice(0,o+s.index+u+c);if(Math.min(o,c)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let x=m.slice(2,-2);return{type:"strong",raw:m,text:x,tokens:this.lexer.inlineTokens(x)}}}}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}}}},qe=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 Ns,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:Le,block:qs.normal,inline:xo.normal};this.options.pedantic?(i.block=qs.pedantic,i.inline=xo.pedantic):this.options.gfm&&(i.block=qs.gfm,this.options.breaks?i.inline=xo.breaks:i.inline=xo.gfm),this.tokenizer.rules=i}static get rules(){return{block:qs,inline:xo}}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(Le.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(Le.tabCharGlobal," ").replace(Le.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.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 c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
185
185
  `:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
186
186
  `)?"":`
187
187
  `)+o.raw,c.text+=`
@@ -194,7 +194,7 @@ ${u}`:u;let m=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=c.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 c=i.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
195
195
  `)?"":`
196
196
  `)+o.raw,c.text+=`
197
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);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 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 d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.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 c=!1,n="";for(;e;){c||(n=""),c=!1;let d;if(this.options.extensions?.inline?.some((u)=>(d=u.call({lexer:this},e,i))?(e=e.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let u=i.at(-1);d.type==="text"&&u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(d=this.tokenizer.emStrong(e,s,n)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),i.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),i.push(d);continue}let f=e;if(this.options.extensions?.startInline){let u=1/0,m=e.slice(1),x;this.options.extensions.startInline.forEach((b)=>{x=b.call({lexer:this},m),typeof x=="number"&&x>=0&&(u=Math.min(u,x))}),u<1/0&&u>=0&&(f=e.substring(0,u+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),c=!0;let u=i.at(-1);u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw Error(u)}}return i}},js=class{options;parser;constructor(r){this.options=r||Mr}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Fe.notSpaceStart)?.[0],o=r.replace(Fe.endingNewline,"")+`
197
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);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 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 d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.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 c=!1,n="";for(;e;){c||(n=""),c=!1;let d;if(this.options.extensions?.inline?.some((u)=>(d=u.call({lexer:this},e,i))?(e=e.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let u=i.at(-1);d.type==="text"&&u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(d=this.tokenizer.emStrong(e,s,n)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),i.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),i.push(d);continue}let f=e;if(this.options.extensions?.startInline){let u=1/0,m=e.slice(1),x;this.options.extensions.startInline.forEach((b)=>{x=b.call({lexer:this},m),typeof x=="number"&&x>=0&&(u=Math.min(u,x))}),u<1/0&&u>=0&&(f=e.substring(0,u+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),c=!0;let u=i.at(-1);u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw Error(u)}}return i}},Hs=class{options;parser;constructor(r){this.options=r||Mr}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Le.notSpaceStart)?.[0],o=r.replace(Le.endingNewline,"")+`
198
198
  `;return s?'<pre><code class="language-'+Ke(s)+'">'+(i?o:Ke(o,!0))+`</code></pre>
199
199
  `:"<pre><code>"+(i?o:Ke(o,!0))+`</code></pre>
200
200
  `}blockquote({tokens:r}){return`<blockquote>
@@ -212,30 +212,30 @@ ${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>${Ke(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=bf(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ke(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=bf(r);if(o===null)return Ke(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ke(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ke(r.text)}},Wh=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""}},We=class r{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new js,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wh}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,d=this.options.extensions.renderers[n.type].call({parser:this},n);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=d||"";continue}}let c=a;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let n=c,d=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],d+=`
216
- `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):s+=d;continue}default:{let n='Token with "'+c.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 c=a;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},ko=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?qe.lex:qe.lexInline}provideParser(){return this.block?We.parse:We.parseInline}},Fk=class{defaults=Eh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=We;Renderer=js;TextRenderer=Wh;Lexer=qe;Tokenizer=Ys;Hooks=ko;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 c of a)i=i.concat(this.walkTokens(c.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 c=o[a].flat(1/0);i=i.concat(this.walkTokens(c,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(...c){let n=o.renderer.apply(this,c);return n===!1&&(n=a.apply(this,c)),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 js(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 c=a,n=i.renderer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ys(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 c=a,n=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ko;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,n=i.hooks[c],d=o[c];ko.passThroughHooks.has(a)?o[c]=(f)=>{if(this.defaults.async&&ko.passThroughHooksRespectAsync.has(a))return(async()=>{let m=await n.call(o,f);return d.call(o,m)})();let u=n.call(o,f);return d.call(o,u)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await n.apply(o,f);return m===!1&&(m=await d.apply(o,f)),m})();let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(c){let n=[];return n.push(a.call(this,c)),o&&(n=n.concat(o.call(this,c))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return qe.lex(r,e??this.defaults)}parser(r,e){return We.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 c=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?qe.lex:qe.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():r?We.parse:We.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?qe.lex:qe.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?We.parse:We.parseInline)(c,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(c){return a(c)}}}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>"+Ke(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Fr=new Fk;function ae(r,e){return Fr.parse(r,e)}ae.options=ae.setOptions=function(r){return Fr.setOptions(r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.getDefaults=Eh;ae.defaults=Mr;ae.use=function(...r){return Fr.use(...r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.walkTokens=function(r,e){return Fr.walkTokens(r,e)};ae.parseInline=Fr.parseInline;ae.Parser=We;ae.parser=We.parse;ae.Renderer=js;ae.TextRenderer=Wh;ae.Lexer=qe;ae.lexer=qe.lex;ae.Tokenizer=Ys;ae.Hooks=ko;ae.parse=ae;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=ae;var Cz=We.parse,bz=qe.lex;function _p(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,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);if(f)return n.concat(f.map(function(u){var m,x;return(x=(m=u.match(/[\t ]/g))===null||m===void 0?void 0:m.length)!==null&&x!==void 0?x: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>${Ke(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=bf(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ke(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=bf(r);if(o===null)return Ke(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ke(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ke(r.text)}},Ph=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""}},We=class r{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new Hs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ph}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,d=this.options.extensions.renderers[n.type].call({parser:this},n);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=d||"";continue}}let c=a;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let n=c,d=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],d+=`
216
+ `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):s+=d;continue}default:{let n='Token with "'+c.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 c=a;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},ko=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?qe.lex:qe.lexInline}provideParser(){return this.block?We.parse:We.parseInline}},Sk=class{defaults=Fh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=We;Renderer=Hs;TextRenderer=Ph;Lexer=qe;Tokenizer=Ns;Hooks=ko;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 c of a)i=i.concat(this.walkTokens(c.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 c=o[a].flat(1/0);i=i.concat(this.walkTokens(c,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(...c){let n=o.renderer.apply(this,c);return n===!1&&(n=a.apply(this,c)),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 Hs(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 c=a,n=i.renderer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ns(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 c=a,n=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ko;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,n=i.hooks[c],d=o[c];ko.passThroughHooks.has(a)?o[c]=(f)=>{if(this.defaults.async&&ko.passThroughHooksRespectAsync.has(a))return(async()=>{let m=await n.call(o,f);return d.call(o,m)})();let u=n.call(o,f);return d.call(o,u)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await n.apply(o,f);return m===!1&&(m=await d.apply(o,f)),m})();let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(c){let n=[];return n.push(a.call(this,c)),o&&(n=n.concat(o.call(this,c))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return qe.lex(r,e??this.defaults)}parser(r,e){return We.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 c=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?qe.lex:qe.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():r?We.parse:We.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?qe.lex:qe.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?We.parse:We.parseInline)(c,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(c){return a(c)}}}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>"+Ke(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Fr=new Sk;function ae(r,e){return Fr.parse(r,e)}ae.options=ae.setOptions=function(r){return Fr.setOptions(r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.getDefaults=Fh;ae.defaults=Mr;ae.use=function(...r){return Fr.use(...r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.walkTokens=function(r,e){return Fr.walkTokens(r,e)};ae.parseInline=Fr.parseInline;ae.Parser=We;ae.parser=We.parse;ae.Renderer=Hs;ae.TextRenderer=Ph;ae.Lexer=qe;ae.lexer=qe.lex;ae.Tokenizer=Ns;ae.Hooks=ko;ae.parse=ae;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=ae;var Cz=We.parse,bz=qe.lex;function Np(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,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);if(f)return n.concat(f.map(function(u){var m,x;return(x=(m=u.match(/[\t ]/g))===null||m===void 0?void 0:m.length)!==null&&x!==void 0?x: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 c=s[0];return e.forEach(function(n,d){var f=c.match(/(?:^|\n)( *)$/),u=f?f[1]:"",m=n;if(typeof n==="string"&&n.includes(`
220
220
  `))m=String(n).split(`
221
221
  `).map(function(x,b){return b===0?x:"".concat(u).concat(x)}).join(`
222
- `);c+=m+s[d+1]}),c}var zh=typeof performance<"u"&&typeof performance.now==="function",ci=t(()=>zh?performance.now():0,"now"),Nh="\uD83E\uDDDC ",Mk="Mermaid render",Ak="Mermaid",Ek={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=ci();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-i)}}async tick(r,e){if(!this.enabled)return e();let i=ci();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-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:ci(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),zh&&typeof performance.mark==="function")try{performance.mark(`${Nh}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=ci();if(r.duration=e-r.start,zh&&typeof performance.measure==="function")try{performance.measure(`${Nh}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:Mk,trackGroup:Ak,color:Ek[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,d)=>{let f=" ".repeat(d),u=n.duration.toFixed(1).padStart(8),m=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${u} ${m} ${f}${n.name}`);for(let x of n.children)a(x,d+1);if(n.children.length>0){let x=n.children.reduce((S,T)=>S+T.duration,0),b=n.duration-x;if(b>0.5){let S=b.toFixed(1).padStart(8);o.push(`${S} ${f} (self)`)}}},"walk");a(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let n of c)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Nh}mermaid render profile · ${s}
222
+ `);c+=m+s[d+1]}),c}var qh=typeof performance<"u"&&typeof performance.now==="function",ci=t(()=>qh?performance.now():0,"now"),Rh="\uD83E\uDDDC ",Tk="Mermaid render",Bk="Mermaid",_k={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=ci();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-i)}}async tick(r,e){if(!this.enabled)return e();let i=ci();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-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:ci(),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(`${Rh}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=ci();if(r.duration=e-r.start,qh&&typeof performance.measure==="function")try{performance.measure(`${Rh}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:Tk,trackGroup:Bk,color:_k[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,d)=>{let f=" ".repeat(d),u=n.duration.toFixed(1).padStart(8),m=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${u} ${m} ${f}${n.name}`);for(let x of n.children)a(x,d+1);if(n.children.length>0){let x=n.children.reduce((S,T)=>S+T.duration,0),b=n.duration-x;if(b>0.5){let S=b.toFixed(1).padStart(8);o.push(`${S} ${f} (self)`)}}},"walk");a(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let n of c)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Rh}mermaid render profile · ${s}
223
223
  ${o.join(`
224
- `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Xf(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
224
+ `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Df(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
225
225
  `).replace(/\n{2,}/g,`
226
- `);return _p(s)}t(Xf,"preprocessMarkdown");function Zf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Zf,"nonMarkdownToLines");function Sp(r,e={}){let i=Xf(r,e),s=ae.lexer(i),o=[[]],a=0;function c(n,d="normal"){if(n.type==="text")n.text.split(`
227
- `).forEach((u,m)=>{if(m!==0)a++,o.push([]);u.split(" ").forEach((x)=>{if(x=x.replace(/&#39;/g,"'"),x)o[a].push({content:x,type:d})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((f)=>{c(f,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(c,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((d)=>{c(d)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Sp,"markdownToLines");function Qf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Qf,"nonMarkdownToHTML");function Jf(r,{markdownAutoWrap:e}={}){let i=ae.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(Jf,"markdownToHTML");var $k=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function s(){var f=this;f.reads=[],f.writes=[],f.raf=i.bind(r),e("initialized",f)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(f){e("run tasks");var u;while(u=f.shift())u()},"runTasks"),measure:t(function(f,u){e("measure");var m=!u?f:f.bind(u);return this.reads.push(m),o(this),m},"measure"),mutate:t(function(f,u){e("mutate");var m=!u?f:f.bind(u);return this.writes.push(m),o(this),m},"mutate"),clear:t(function(f){return e("clear",f),c(this.reads,f)||c(this.writes,f)},"clear"),extend:t(function(f){if(e("extend",f),typeof f!="object")throw Error("expected object");var u=Object.create(this);if(n(u,f),u.fastdom=this,u.initialize)u.initialize();return u},"extend"),catch:null};function o(f){if(!f.scheduled)f.scheduled=!0,f.raf(a.bind(null,f)),e("flush scheduled")}t(o,"scheduleFlush");function a(f){e("flush");var{writes:u,reads:m}=f,x;try{e("flushing reads",m.length),f.runTasks(m),e("flushing writes",u.length),f.runTasks(u)}catch(b){x=b}if(f.scheduled=!1,m.length||u.length)o(f);if(x)if(e("task errored",x.message),f.catch)f.catch(x);else throw x}t(a,"flush");function c(f,u){var m=f.indexOf(u);return!!~m&&!!f.splice(m,1)}t(c,"remove");function n(f,u){for(var m in u)if(u.hasOwnProperty(m))f[m]=u[m]}t(n,"mixin");var d=r.fastdom=r.fastdom||new s;return d}(typeof window<"u"?window:globalThis),Lp={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Hh(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Hh(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 Hh(r,e,i,s){var{_tasks:o,fastdom:a}=r,c,n=new Promise(function(d,f){c=a[e](function(){o.delete(n);try{d(s?i.call(s):i())}catch(u){f(u)}},s)});return o.set(n,c),n}t(Hh,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Lp,Ik=Lp,Ok=$k.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Ik),ur=Ok;function Fp(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Fp,"splitTextToChars");function Mp(r,e){let i=Fp(e.content);return Uh(r,[],i,e.type)}t(Mp,"splitWordToFitWidth");function Uh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Uh(r,c,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Uh,"splitWordToFitWidthRecursion");function $p(r,e){if(r.some(({content:i})=>i.includes(`
228
- `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Gs(r,e)}t($p,"splitLineToFitWidth");function Gs(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"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(a),e(c))return Gs(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=Mp(e,a);if(i.push([n]),d.content)r.unshift(d)}return Gs(r,e,i)}t(Gs,"splitLineToFitWidthRecursion");function Yh(r,e){if(e)r.attr("style",e)}t(Yh,"applyStyle");var Nf=16384;async function Op(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Nf)}px`),n.attr("height",`${Math.min(10*i,Nf)}px`);let d=n.append("xhtml:div"),f=It(e.label)?await Ul(e.label.replace(w.lineBreakRegex,`
229
- `),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",m=d.append("span");if(m.html(f),Yh(m,e.labelStyle),m.attr("class",`${u} ${s}`),Yh(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let x=await ur.measure(()=>d.node().getBoundingClientRect());if(x.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(x.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(Op,"addHtmlSpan");function Vs(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(Vs,"createTspan");function Dp(r,e,i){let s=r.append("text"),o=Vs(s,1,e);Ks(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Dp,"computeWidthOfText");function Wf(r,e,i){let s=r.append("text"),o=Vs(s,1,e);Ks(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(Wf,"computeDimensionOfText");function Pp(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let m=t((b)=>Dp(c,1.1,b)<=r,"checkWidth"),x=m(u)?[u]:$p(u,m);for(let b of x){let S=Vs(d,f,1.1,o);Ks(S,b),f++}}if(s){let u=d.node().getBBox(),m=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Pp,"createFormattedText");function jh(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(jh,"decodeHTMLEntities");function Ks(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(jh(i.content));else o.text(" "+jh(i.content))})}t(Ks,"updateTextContentAndStyles");async function Rp(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Es(n))return await cr(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Rp,"replaceIconSubstring");var sn=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},m)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let x=c?Jf(e,m):Qf(e),b=await Rp($a(x),m),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:It(e)?S:b,labelStyle:i.replace("fill:","color:")};return await Op(r,T,d,o,u,m,f)}else{let x=$a(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?Sp(x.replace("<br>","<br/>"),m):Zf(x),S=Pp(d,r,b,e?u:!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:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(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:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var Mu=new Set(["redux-color","redux-dark-color"]),Dk=12,Pk=64,mt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),et=t((r,e)=>r!=null&&Mu.has(r)&&mt(e),"isColorTheme"),Rk=/^[\w-]+$/,tt=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Rk.test(e)?e:"classic"},"safeLook"),Ur=t((r)=>mt(r)?r.length:0,"paletteSlotCount"),Kn=t((r,e)=>{if(mt(e))return Ur(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Pk?r:Dk},"colorSlotCount"),Vn=t((r,e,i,s)=>{if(e===void 0||!et(i,s))return;let o=e%Ur(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Xh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function qk(r,e){return r[0]===e[0]&&r[1]===e[1]}function Wk(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Xh(f,n,o);let d=function(f,u,m){let x=[];for(let v of f){let F=[...v];qk(F[0],F[F.length-1])||F.push([F[0][0],F[0][1]]),F.length>2&&x.push(F)}let b=[];u=Math.max(u,0.1);let S=[];for(let v of x)for(let F=0;F<v.length-1;F++){let I=v[F],O=v[F+1];if(I[1]!==O[1]){let K=Math.min(I[1],O[1]);S.push({ymin:K,ymax:Math.max(I[1],O[1]),x:K===I[1]?I[0]:O[0],islope:(O[0]-I[0])/(O[1]-I[1])})}}if(S.sort((v,F)=>v.ymin<F.ymin?-1:v.ymin>F.ymin?1:v.x<F.x?-1:v.x>F.x?1:v.ymax===F.ymax?0:(v.ymax-F.ymax)/Math.abs(v.ymax-F.ymax)),!S.length)return b;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let F=0;F<S.length&&!(S[F].ymin>B);F++)v=F;S.splice(0,v+1).forEach((F)=>{T.push({s:B,edge:F})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,F)=>v.edge.x===F.edge.x?0:(v.edge.x-F.edge.x)/Math.abs(v.edge.x-F.edge.x)),(m!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let F=v+1;if(F>=T.length)break;let I=T[v].edge,O=T[F].edge;b.push([[Math.round(I.x),B],[Math.round(O.x),B]])}B+=m,T.forEach((v)=>{v.edge.x=v.edge.x+m*v.edge.islope}),_++}return b}(c,a,s);if(o){for(let f of c)Xh(f,n,-o);(function(f,u,m){let x=[];f.forEach((b)=>x.push(...b)),Xh(x,u,m)})(d,n,-o)}return d}function vo(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),Wk(r,o,s,a||1)}class sa{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=vo(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 aa(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 Xp extends sa{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=vo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)aa([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Gp extends sa{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 Vp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(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 c of r){let n=aa(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,m=(c[0][0]+c[1][0])/2-s/4,x=Math.min(c[0][1],c[1][1]);for(let b=0;b<f;b++){let S=x+u+b*s,T=m-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 Kp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(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 c=aa(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let m=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let x=0;x<n;x++){let b=x*(i+s),S=b+i,T=[f[0]+b*Math.cos(m)+d*Math.cos(m),f[1]+b*Math.sin(m)+d*Math.sin(m)],B=[f[0]+S*Math.cos(m)+d*Math.cos(m),f[1]+S*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class Zp{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=vo(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=aa(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let m=2*u*e,x=2*(u+1)*e,b=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+m*Math.cos(f),n[1]+m*Math.sin(f)],T=[n[0]+x*Math.cos(f),n[1]+x*Math.sin(f)],B=[S[0]+b*Math.cos(f+Math.PI/4),S[1]+b*Math.sin(f+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 Me={};class Qp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Nk=0,Gh=1,qp=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 Vh(r,e){return r.type===e}function ec(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Nk,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Gh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:qp,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Vh(a,qp);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return ec("M0,0"+r);o++,c=Zs[a.text],s=a.text}else Vh(a,Gh)?c=Zs[s]:(o++,c=Zs[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!Vh(f,Gh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Zs[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function Jp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){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 d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[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 d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[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 tg(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let m=0,x=0;i==="C"||i==="S"?(m=s+(s-n),x=o+(o-d)):(m=s,x=o),e.push({key:"C",data:[m,x,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[m,x]=u,b=0,S=0;i==="Q"||i==="T"?(b=s+(s-n),S=o+(o-d)):(b=s,S=o);let T=s+2*(b-s)/3,B=o+2*(S-o)/3,_=m+2*(b-m)/3,v=x+2*(S-x)/3;e.push({key:"C",data:[T,B,_,v,m,x]}),n=b,d=S,s=m,o=x;break}case"Q":{let[m,x,b,S]=u,T=s+2*(m-s)/3,B=o+2*(x-o)/3,_=b+2*(m-b)/3,v=S+2*(x-S)/3;e.push({key:"C",data:[T,B,_,v,b,S]}),n=m,d=x,s=b,o=S;break}case"A":{let m=Math.abs(u[0]),x=Math.abs(u[1]),b=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(m===0||x===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)eg(s,o,B,_,m,x,b,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=c}i=f}return e}function To(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function eg(r,e,i,s,o,a,c,n,d,f){let u=(m=c,Math.PI*m/180);var m;let x=[],b=0,S=0,T=0,B=0;if(f)[b,S,T,B]=f;else{[r,e]=To(r,e,-u),[i,s]=To(i,s,-u);let D=(r-i)/2,U=(e-s)/2,it=D*D/(o*o)+U*U/(a*a);it>1&&(it=Math.sqrt(it),o*=it,a*=it);let P=o*o,ht=a*a,lt=P*ht-P*U*U-ht*D*D,Bt=P*U*U+ht*D*D,vt=(n===d?-1:1)*Math.sqrt(Math.abs(lt/Bt));T=vt*o*U/a+(r+i)/2,B=vt*-a*D/o+(e+s)/2,b=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(b=Math.PI-b),i<T&&(S=Math.PI-S),b<0&&(b=2*Math.PI+b),S<0&&(S=2*Math.PI+S),d&&b>S&&(b-=2*Math.PI),!d&&S>b&&(S-=2*Math.PI)}let _=S-b;if(Math.abs(_)>120*Math.PI/180){let D=S,U=i,it=s;S=d&&S>b?b+120*Math.PI/180*1:b+120*Math.PI/180*-1,x=eg(i=T+o*Math.cos(S),s=B+a*Math.sin(S),U,it,o,a,c,0,d,[S,D,T,B])}_=S-b;let v=Math.cos(b),F=Math.sin(b),I=Math.cos(S),O=Math.sin(S),K=Math.tan(_/4),Z=1.3333333333333333*o*K,rt=1.3333333333333333*a*K,st=[r,e],ut=[r+Z*F,e-rt*v],ct=[i+Z*O,s-rt*I],nt=[i,s];if(ut[0]=2*st[0]-ut[0],ut[1]=2*st[1]-ut[1],f)return[ut,ct,nt].concat(x);{x=[ut,ct,nt].concat(x);let D=[];for(let U=0;U<x.length;U+=3){let it=To(x[U][0],x[U][1],u),P=To(x[U+1][0],x[U+1][1],u),ht=To(x[U+2][0],x[U+2][1],u);D.push([it[0],it[1],P[0],P[1],ht[0],ht[1]])}return D}}var zk={randOffset:function(r,e){return Ut(r,e)},randOffsetWithRange:function(r,e,i){return ra(r,e,i)},ellipse:function(r,e,i,s,o){let a=ig(i,s,o);return Qh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return br(r,e,i,s,o,!0)}};function rg(r,e,i,s,o){return{type:"path",ops:br(r,e,i,s,o)}}function ta(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...br(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...br(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?rg(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Hk(r,e,i,s,o){return function(a,c){return ta(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Wp(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Qs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Qs(i[0],1.5*(1+0.22*e.roughness),Hp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=Qs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:Qs(c,1.5*(1+0.22*e.roughness),Hp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function ig(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,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Ut(c*d,i),n+=Ut(n*d,i),{increment:a,rx:c,ry:n}}function Qh(r,e,i,s){let[o,a]=Yp(s.increment,r,e,s.rx,s.ry,1,s.increment*ra(0.1,ra(0.4,1,i),i),i),c=ia(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=Yp(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=ia(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function Np(r,e,i,s,o,a,c,n,d){let f=r,u=e,m=Math.abs(i/2),x=Math.abs(s/2);m+=Ut(0.01*m,d),x+=Ut(0.01*x,d);let b=o,S=a;for(;b<0;)b+=2*Math.PI,S+=2*Math.PI;S-b>2*Math.PI&&(b=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-b)/2),_=jp(B,f,u,m,x,b,S,1,d);if(!d.disableMultiStroke){let v=jp(B,f,u,m,x,b,S,1.5,d);_.push(...v)}return c&&(n?_.push(...br(f,u,f+m*Math.cos(b),u+x*Math.sin(b),d),...br(f,u,f+m*Math.cos(S),u+x*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+m*Math.cos(b),u+x*Math.sin(b)]})),{type:"path",ops:_}}function zp(r,e){let i=tg(Jp(ec(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...br(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,m,x,b]=n;s.push(...Yk(d,f,u,m,x,b,a,e)),a=[x,b];break}case"Z":s.push(...br(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Kh(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]+Ut(o,e),s[0][1]+Ut(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Ut(o,e),s[c][1]+Ut(o,e)]})}}return{type:"fillPath",ops:i}}function ui(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Me[o])switch(o){case"zigzag":Me[o]||(Me[o]=new Xp(s));break;case"cross-hatch":Me[o]||(Me[o]=new Gp(s));break;case"dots":Me[o]||(Me[o]=new Vp(s));break;case"dashed":Me[o]||(Me[o]=new Kp(s));break;case"zigzag-line":Me[o]||(Me[o]=new Zp(s));break;default:o="hachure",Me[o]||(Me[o]=new sa(s))}return Me[o]}(e,zk).fillPolygons(r,e)}function Hp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function og(r){return r.randomizer||(r.randomizer=new Qp(r.seed||0)),r.randomizer.next()}function ra(r,e,i,s=1){return i.roughness*s*(og(i)*(e-r)+r)}function Ut(r,e,i=1){return ra(-r,r,e,i)}function br(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Jh(r,e,i,s,o,!0,!1);if(c)return n;let d=Jh(r,e,i,s,o,!0,!0);return n.concat(d)}function Jh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let m=u/2,x=0.2+0.2*og(o),b=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;b=Ut(b,o,f),S=Ut(S,o,f);let T=[],B=()=>Ut(m,o,f),_=()=>Ut(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Ut(u,o,f)),e+(v?0:Ut(u,o,f))]})),c?T.push({op:"bcurveTo",data:[b+r+(i-r)*x+B(),S+e+(s-e)*x+B(),b+r+2*(i-r)*x+B(),S+e+2*(s-e)*x+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[b+r+(i-r)*x+_(),S+e+(s-e)*x+_(),b+r+2*(i-r)*x+_(),S+e+2*(s-e)*x+_(),i+(v?0:_()),s+(v?0:_())]}),T}function Qs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Ut(e,i),r[0][1]+Ut(e,i)]),s.push([r[0][0]+Ut(e,i),r[0][1]+Ut(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Ut(e,i),r[o][1]+Ut(e,i)]),o===r.length-1&&s.push([r[o][0]+Ut(e,i),r[o][1]+Ut(e,i)]);return ia(s,null,i)}function ia(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*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]+Ut(n,i),e[1]+Ut(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(...Jh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function Yp(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let m=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(m),f.push(m)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Ut(0.5,n)-Math.PI/2;f.push([Ut(a,n)+e+0.9*s*Math.cos(u-r),Ut(a,n)+i+0.9*o*Math.sin(u-r)]);let m=2*Math.PI+u-0.01;for(let x=u;x<m;x+=r){let b=[Ut(a,n)+e+s*Math.cos(x),Ut(a,n)+i+o*Math.sin(x)];d.push(b),f.push(b)}f.push([Ut(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Ut(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Ut(a,n)+e+0.98*s*Math.cos(u+c),Ut(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Ut(a,n)+e+0.9*s*Math.cos(u+0.5*c),Ut(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function jp(r,e,i,s,o,a,c,n,d){let f=a+Ut(0.1,d),u=[];u.push([Ut(n,d)+e+0.9*s*Math.cos(f-r),Ut(n,d)+i+0.9*o*Math.sin(f-r)]);for(let m=f;m<=c;m+=r)u.push([Ut(n,d)+e+s*Math.cos(m),Ut(n,d)+i+o*Math.sin(m)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ia(u,null,d)}function Yk(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],m=n.disableMultiStroke?1:2,x=n.preserveVertices;for(let b=0;b<m;b++)b===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Ut(f[0],n)),c[1]+(x?0:Ut(f[0],n))]}),u=x?[o,a]:[o+Ut(f[b],n),a+Ut(f[b],n)],d.push({op:"bcurveTo",data:[r+Ut(f[b],n),e+Ut(f[b],n),i+Ut(f[b],n),s+Ut(f[b],n),u[0],u[1]]});return d}function Bo(r){return[...r]}function Up(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(Bo(r[0]),Bo(r[1]),Bo(r[2]),Bo(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=[],c=1-e;s.push(Bo(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*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 ea(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function jk(r,e,i){let s=ea(e,i);if(s===0)return ea(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)),ea(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 tc(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],m=n[d+2],x=n[d+3],b=3*u[0]-2*f[0]-x[0];b*=b;let S=3*u[1]-2*f[1]-x[1];S*=S;let T=3*m[0]-2*x[0]-f[0];T*=T;let B=3*m[1]-2*x[1]-f[1];return B*=B,b<T&&(b=T),S<B&&(S=B),b+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(ea(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],m=r[e+3],x=Ar(d,f,0.5),b=Ar(f,u,0.5),S=Ar(u,m,0.5),T=Ar(x,b,0.5),B=Ar(b,S,0.5),_=Ar(T,B,0.5);tc([d,x,T,_],0,i,o),tc([_,B,S,m],0,i,o)}var a,c;return o}function Uk(r,e){return oa(r,0,r.length,e)}function oa(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let m=jk(r[u],c,n);m>d&&(d=m,f=u)}return Math.sqrt(d)>s?(oa(r,e,f+1,s,a),oa(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Zh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)tc(r,3*a,e,s);return i&&i>0?oa(s,0,s.length,i):s}var $e="none";class _o{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",[rg(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Hk(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Kh([d],a)):c.push(ui([d],a))}return a.stroke!==$e&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=ig(i,s,a),d=Qh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=Qh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(ui([d.estimatedPoints],a));return a.stroke!==$e&&c.push(d.opset),this._d("ellipse",c,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",[ta(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=Np(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let m=Object.assign({},d);m.disableMultiStroke=!0;let x=Np(r,e,i,s,o,a,!0,!1,m);x.type="fillPath",f.push(x)}else f.push(function(m,x,b,S,T,B,_){let v=m,F=x,I=Math.abs(b/2),O=Math.abs(S/2);I+=Ut(0.01*I,_),O+=Ut(0.01*O,_);let K=T,Z=B;for(;K<0;)K+=2*Math.PI,Z+=2*Math.PI;Z-K>2*Math.PI&&(K=0,Z=2*Math.PI);let rt=(Z-K)/_.curveStepCount,st=[];for(let ut=K;ut<=Z;ut+=rt)st.push([v+I*Math.cos(ut),F+O*Math.sin(ut)]);return st.push([v+I*Math.cos(Z),F+O*Math.sin(Z)]),st.push([v,F]),ui([st],_)}(r,e,i,s,o,a,d));return d.stroke!==$e&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Wp(r,i);if(i.fill&&i.fill!==$e)if(i.fillStyle==="solid"){let a=Wp(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=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...Zh(Up([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Zh(Up(d),10,(1+i.roughness)/2))}a.length&&s.push(ui([a],i))}return i.stroke!==$e&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=ta(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Kh([r],i)):s.push(ui([r],i))),i.stroke!==$e&&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!==$e,a=i.stroke!==$e,c=!!(i.simplification&&i.simplification<1),n=function(f,u,m){let x=tg(Jp(ec(f))),b=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Zh(B,u)),B=[]},v=()=>{_(),S.length&&(b.push(S),S=[])};for(let{key:I,data:O}of x)switch(I){case"M":v(),T=[O[0],O[1]],S.push(T);break;case"L":_(),S.push([O[0],O[1]]);break;case"C":if(!B.length){let K=S.length?S[S.length-1]:T;B.push([K[0],K[1]])}B.push([O[0],O[1]]),B.push([O[2],O[3]]),B.push([O[4],O[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!m)return b;let F=[];for(let I of b){let O=Uk(I,m);O.length&&F.push(O)}return F}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=zp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=zp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Kh(n,i));else s.push(ui(n,i));return a&&(c?n.forEach((f)=>{s.push(ta(f,!1,i))}):s.push(d)),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:$e};break;case"fillPath":a={d:this.opsToPath(o),stroke:$e,strokeWidth:0,fill:i.fill||$e};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||$e,strokeWidth:i,fill:$e}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class sg{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new _o(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 c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),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((c)=>+c.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,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}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 Js="http://www.w3.org/2000/svg";class ag{constructor(r,e){this.svg=r,this.gen=new _o(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Js,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,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(Js,"path"),n.setAttribute("d",this.opsToPath(c,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,c,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(Js,"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,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}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 sg(r,e),svg:(r,e)=>new ag(r,e),generator:(r)=>new _o(r),newSeed:()=>_o.newSeed()};var Xk=1,Gk=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 c=p().fontSize?p().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=Y.fontSize]=Nn(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}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===Gk)return r.textContent?.trim()!=="";if(r.nodeType!==Xk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var ng=3,Vk=32,Kk=t(async(r,e,i)=>{let s=p(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",ue(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),d=e.width?Math.max(e.width-2*(e.padding??0),Vk):p().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,m=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),F=await sn(v,ee($a(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(F).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(F).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),x=Math.max(...m.map(({box:_})=>_.width),0),b=0;for(let{el:_,box:v}of m)_.attr("transform",`translate(${x/2-v.x-v.width/2}, ${b-v.y})`),b+=v.height+ng;let S=m.length>0?b-ng:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-x/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),lg=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"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Kk(r,e,i);let s,o=e.useHtmlLabels||Or(p()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",ue(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,m=await sn(c,ee($a(n),p()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||p().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},p()),x=(e?.padding??0)/2,b;if(o){let S=m.children[0],T=h(m);await fc(S),b=await ur.measure(()=>S.getBoundingClientRect()),b=lg(b,u),T.attr("width",b.width),T.attr("height",b.height)}else b=await ur.measure(()=>m.getBBox()),b=lg(b,u);if(o)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");else c.attr("transform","translate(0, "+-b.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:b,halfPadding:x,label:c}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??jt(p()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await sn(o,ee($a(e),p()),{useHtmlLabels:s,width:i.width||p()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(jt(p())){let d=a.children[0],f=h(a);n=await ur.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await ur.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:c,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"),$t=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function oe(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(oe,"createPathFromPoints");function kr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,m=2*Math.PI/u,x=e+f/2;for(let b=0;b<=50;b++){let S=b/50,T=r+S*d,B=x+o*Math.sin(m*(T-r));c.push({x:T,y:B})}return c}t(kr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(Qe,"generateCirclePoints");function hc(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(hc,"mergePaths");var Zk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=Zk;function Mg(r,e){return r.intersect(e)}t(Mg,"intersectNode");var Qk=Mg;function Ag(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(Ag,"intersectEllipse");var Eg=Ag;function Ig(r,e,i){return Eg(r,e,e,i)}t(Ig,"intersectCircle");var Jk=Ig;function Dg(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&cc(n,d))return;let u=s.y-i.y,m=i.x-s.x,x=s.x*i.y-i.x*s.y,b=u*r.x+m*r.y+x,S=u*e.x+m*e.y+x;if(Math.abs(b)<0.000001&&Math.abs(S)<0.000001&&cc(b,S))return;let T=o*m-u*a;if(T===0)return;let B=(a*x-m*c)/T,_=(u*c-o*x)/T;return{x:B,y:_}}}t(Dg,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var t1=Dg;function Pg(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let m=e[u],x=e[u<e.length-1?u+1:0],b=t1(r,i,{x:d+m.x,y:f+m.y},{x:d+x.x,y:f+x.y});if(b)a.push(b)}if(!a.length)return r;if(a.length>1)a.sort(function(u,m){let x=u.x-i.x,b=u.y-i.y,S=Math.sqrt(x*x+b*b),T=m.x-i.x,B=m.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(Pg,"intersectPolygon");var e1=Pg,N={node:Qk,circle:Jk,ellipse:Eg,polygon:e1,rect:Je},Ae=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"),r1=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=p(),n=jt(c);return await sn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ne=r1;function Rg(r,e){let{labelStyles:i}=Q(e);e.labelStyle=i;let s=$t(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=_t(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),m=a.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",ue(n)),W(e,m),e.intersect=function(x){return l.info("Circle intersect",e,c,x),N.circle(e,c,x)},a}t(Rg,"anchor");function uc(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),m=(i-r)/2,x=(s-e)/2,b=m/o,S=x/a,T=Math.sqrt(b**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),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),F=Math.atan2((e-v)/a,(r-_)/o),O=Math.atan2((s-v)/a,(i-_)/o)-F;if(c&&O<0)O+=2*Math.PI;if(!c&&O>0)O-=2*Math.PI;let K=[];for(let Z=0;Z<20;Z++){let rt=Z/19,st=F+rt*O,ut=_+o*Math.cos(st),ct=v+a*Math.sin(st);K.push({x:ut,y:ct})}return K}t(uc,"generateArcPoints");function Ng(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(Ng,"calculateArcSagitta");async function Xg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((st)=>st+c,"calcTotalHeight"),d=t((st)=>{let ut=st/2;return[ut/(2.5+st/50),ut]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await X(r,e,$t(e)),m=n(e?.height?e?.height:u.height),[x,b]=d(m),S=Ng(m,x,b),B=(e?.width?e?.width:u.width)+a*2+S-S,_=m,{cssStyles:v}=e,F=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,x,b,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,x,b,!0)],I=y.svg(f),O=_t(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let K=oe(F),Z=I.path(K,O),rt=f.insert(()=>Z,":first-child");if(rt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")rt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(${x/2}, 0)`),W(e,rt),e.intersect=function(st){return N.polygon(e,F,st)},f}t(Xg,"bowTieRect");async function Qg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,$t(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),m=Math.max(Math.min(u*0.08,12),5),x=Math.max(c.height+f*2+m,e.height??0),b=-x/2+m,S=x/2,T=u*0.72,B=[`M${-u/2},${b}`,`L${-T/2},${S}`,`A${T/2},${m} 0 0 0 ${T/2},${S}`,`L${u/2},${b}`,`A${u/2},${m} 0 0 0 ${-u/2},${b}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let rt=y.svg(a).path(B,_t(e,{}));if(v.node()?.appendChild(rt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",b).attr("rx",u/2).attr("ry",m).attr("style",`fill:none;stroke:${d};stroke-width:1px`),W(e,v);let F=b+(S-b)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${F-c.height/2-(c.y-(c.top??0))})`);let I=12,O=t((Z,rt,st)=>Array.from({length:I+1},(ut,ct)=>{let nt=Math.PI-ct*Math.PI/I;return{x:Z*Math.cos(nt),y:rt+st*m*Math.sin(nt)}}),"arc"),K=[...O(u/2,b,-1),...O(T/2,S,1).reverse()];return e.intersect=function(Z){return N.polygon(e,K,Z)},a}t(Qg,"bucket");var rc=20,ic=8,i1=80,o1=8;function tm(r){let{themeVariables:e}=p(),{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:o1,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(tm,"getCollapsedStyle");async function em(r,e){let i=tm(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=Q(e),{shapeSvg:c,bbox:n}=await X(r,e,$t(e)),{theme:d,themeVariables:f}=p();Vn(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,m=n.height,x=Math.max(n.width+u*2,i1,e?.width??0),b=Math.max(m+ic+rc+u*2,e?.height??0),S=-x/2,T=-b/2,B=-(ic+rc)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??jt(p()))_.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(c),rt=_t(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),st=Z.path(Ae(S,T,x,b,i.rx),rt);v=c.insert(()=>st,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",ue(e.cssStyles))}else if(v=c.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",x).attr("height",b).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let F=T+u+m+ic;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",F).attr("x2",S+x-8).attr("y2",F).attr("stroke",o).attr("stroke-dasharray","3, 3");let I=F+rc/2,O=2.5,K=10;for(let Z=-1;Z<=1;Z++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Z*K).attr("cy",I).attr("r",O).attr("fill",o);return W(e,v),e.calcIntersect=function(Z,rt){return N.rect(Z,rt)},e.intersect=function(Z){return N.rect(e,Z)},c}t(em,"collapsedGroup");function tr(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(tr,"insertPolygonShape");var s1=["right","left","up","down"],gc="point",a1=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"),n1=t((r)=>s1.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),hg={"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}]},l1=t((r,e,i,s)=>{let o=a1(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=n1(o);return(hg[f]??hg[gc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function rm(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,$t(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,m=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,x=l1(i.directions??[],o,i,m),b=tr(s,m,c,x);return b.attr("style",i.style??null),W(i,b),i.intersect=function(S){return N.polygon(i,x,S)},s}t(rm,"block_arrow");async function im(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,$t(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let F=y.svg(a).path(Ae(-x/2,S,x,b,m),_t(e,{}));if(B.node()?.appendChild(F),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("line").attr("x1",-x/2).attr("y1",S+u).attr("x2",x/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-x/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-x/2+44).attr("y",S+4).attr("width",Math.max(x-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(im,"browser");var na=12;async function om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+na),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),m=0,x=f,b=-u,S=0,T=[{x:m+na,y:b},{x,y:b},{x,y:S},{x:m,y:S},{x:m,y:b+na},{x:m+na,y:b}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),F=_t(e,{}),I=oe(T),O=v.path(I,F);if(B=n.insert(()=>O,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},n}t(om,"card");function sm(r,e){let{nodeStyles:i}=Q(e);e.label="";let s=r.insert("g").attr("class",$t(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=_t(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=oe(c),u=n.path(f,d),m=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")m.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")m.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(x){return N.polygon(e,c,x)},s}t(sm,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await X(r,e,$t(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,m=e.look==="neo"?u+d*2:u+f,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=_t(e,{}),B=S.circle(0,0,m*2,T);x=a.insert(()=>B,":first-child"),x.attr("class","basic label-container").attr("style",ue(b))}else x=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0);return W(e,x),e.calcIntersect=function(S,T){let B=S.width/2;return N.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,m,S),N.circle(e,m,S)},a}t(mc,"circle");async function am(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,m=i.positioned?-f/2:-a.width/2-c,x=i.positioned?-u/2:-a.height/2-c;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",m).attr("y",x).attr("width",f).attr("height",u),W(i,n),i.intersect=function(b){return N.rect(i,b)},o}t(am,"composite");async function nm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,$t(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let F=y.svg(a).path(Ae(-x/2,S,x,b,m),_t(e,{}));if(B.node()?.appendChild(F),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("text").attr("x",-x/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(nm,"consoleWindow");function lm(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},c={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 ${c.x},${c.y}`}t(lm,"createLine");function hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",$t(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=_t(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=lm(a),m=n.path(u,d),x=o.insert(()=>f,":first-child");if(x.insert(()=>m),x.attr("class","outer-path"),c&&e.look!=="handDrawn")x.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")x.selectAll("path").attr("style",s);return W(e,x),e.intersect=function(b){return l.info("crossedCircle intersect",e,{radius:a,point:b}),N.circle(e,a,b)},o}t(hm,"crossedCircle");function dr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(dr,"generateCirclePoints");async function cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...dr(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...dr(f/2+m*2,-m,m,20,-180,-270),...dr(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...dr(f/2,u/2,m,20,0,90)],S=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...dr(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...dr(f/2+f*0.1,-m,m,20,-180,-270),...dr(f/2+f*0.1,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...dr(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2,y:u/2+m}],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),F=T.path(v,B),I=oe(S),O=T.path(I,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>O,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${m}, 0)`),c.attr("transform",`translate(${-f/2+m-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(cm,"curlyBraceLeft");function fr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:b,y:S})}return c}t(fr,"generateCirclePoints");async function um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90)],S=[{x:-f/2,y:-u/2-m},{x:f/2,y:-u/2-m},...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90),{x:f/2,y:u/2+m},{x:-f/2,y:u/2+m}],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),F=T.path(v,B),I=oe(S),O=T.path(I,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>O,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${-m}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(um,"curlyBraceRight");function we(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(we,"generateCirclePoints");async function dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...we(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...we(f/2,u/2,m,20,0,90)],S=[...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],T=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...we(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...we(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2-m-m/2,y:u/2+m},...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],B=y.svg(o),_=_t(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let F=oe(b).replace("Z",""),I=B.path(F,_),K=oe(S).replace("Z",""),Z=B.path(K,_),rt=oe(T),st=B.path(rt,{..._}),ut=o.insert("g",":first-child");if(ut.insert(()=>st,":first-child").attr("stroke-opacity",0),ut.insert(()=>I,":first-child"),ut.insert(()=>Z,":first-child"),ut.attr("class","text"),x&&e.look!=="handDrawn")ut.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return ut.attr("transform",`translate(${m-m/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,T,ct)},o}t(dm,"curlyBraces");async function fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await X(r,e,$t(e)),m=Math.max(d,u.height+c*2,e?.height??0),x=m/2,b=x-Math.sqrt(Math.max(0,x**2-(u.height/2)**2)),S=Math.max(m/4,b),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=T,I=m,O=F-x,K=I/4,Z=[{x:O,y:0},{x:K,y:0},{x:0,y:I/2},{x:K,y:I},{x:O,y:I},...Qe(-O,-I/2,x,50,270,90)],rt=oe(Z),st=_.path(rt,v),ut=f.insert(()=>st,":first-child");if(ut.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",s);return ut.attr("transform",`translate(${-T/2}, ${-m/2})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,Z,ct)},f}t(fm,"curvedTrapezoid");async function pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,m=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),x=Math.min(d*0.177,m*0.45),b=m+2*f-u,S=-b/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let rt=y.svg(o),st=_t(e,{}),ut=rt.path(Ae(-d/2,T,d,m,x),st),ct=rt.circle(0,S+f,f*2,st);if(B.insert(()=>ct,":first-child"),B.insert(()=>ut,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",m).attr("rx",x).attr("ry",x).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);W(e,B);let v=T+m/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let F=S+f,I=Math.asin(Math.min(1,(T-F)/f))*180/Math.PI,O=24,Z=[...Qe(0,-F,f,O,180+I,-I),...Qe(-(-d/2+x),-(T+x),x,12,90,0),...Qe(-(-d/2+x),-(b/2-x),x,12,360,270),...Qe(-(d/2-x),-(b/2-x),x,12,270,180),...Qe(-(d/2-x),-(T+x),x,12,180,90)];return e.intersect=function(rt){return N.polygon(e,Z,rt)},o}t(pm,"person");var h1=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"),c1=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"),u1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),cg=8,ug=8;async function gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<ug)e.width=ug}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<cg)e.height=cg}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,$t(e)),m=Math.max(e.width??0,f.width)+c,x=m/2,b=x/(2.5+m/50),S=Math.max(e.height??0,f.height)+a+b,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=c1(0,0,m,S,x,b),F=u1(0,b,m,S,x,b),I=_t(e,{}),O=_.path(v,I),K=_.path(F,_t(e,{fill:"none"}));if(T=d.insert(()=>K,":first-child"),T=d.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=h1(0,0,m,S,x,b);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-m/2}, ${-(S/2+b)})`),W(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),F=v.x-(e.x??0);if(x!=0&&(Math.abs(F)<(e.width??0)/2||Math.abs(F)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let I=b*b*(1-F*F/(x*x));if(I>0)I=Math.sqrt(I);if(I=b-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},d}t(gm,"cylinder");async function mi(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await X(r,e,$t(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,m,{rx:x,ry:b}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)x=i.rx,b=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=_t(e,{}),_=x||b?T.path(Ae(f,u,n,d,x||0),B):T.rectangle(f,u,n,d,B);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",ue(S))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",o).attr("rx",ue(x)).attr("ry",ue(b)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return W(e,m,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return N.rect(T,B)},e.intersect=function(T){return N.rect(e,T)},a}t(mi,"drawRect");async function mm(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await mi(r,e,d);if(e.look==="handDrawn"){let b=y.svg(f),S=_t(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>b.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>b.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),m=(Number(u.attr("width"))||c)??0,x=(Number(u.attr("height"))||n)??0;if(m>0&&x>0)u.attr("stroke-dasharray",`${m} ${x}`);return f}t(mm,"datastore");async function ym(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e)),f=n.width+o,u=n.height+a,m=u*0.2,x=-f/2,b=-u/2-m/2,{cssStyles:S}=e,T=y.svg(c),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x,y:b+m},{x:-x,y:b+m},{x:-x,y:-b},{x,y:-b},{x,y:b},{x:-x,y:b},{x:-x,y:b+m}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),F=c.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")F.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return d.attr("transform",`translate(${x+(e.padding??0)/2-(n.x-(n.left??0))}, ${b+m+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,F),e.intersect=function(I){return N.rect(e,I)},c}t(ym,"dividedRectangle");async function xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),m=u+o,x,{cssStyles:b}=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,m*2,T),v=S.circle(0,0,u*2,B);x=n.insert("g",":first-child"),x.attr("class",ue(e.cssClasses)).attr("style",ue(b)),x.node()?.appendChild(_),x.node()?.appendChild(v)}else{x=n.insert("g",":first-child");let S=x.insert("circle",":first-child"),T=x.insert("circle");x.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return W(e,x),e.intersect=function(S){return l.info("DoubleCircle intersect",e,m,S),N.circle(e,m,S)},n}t(xm,"doublecircle");async function Cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,e,$t(e)),{theme:n,themeVariables:d}=p();Vn(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,m=a.height/2+f*2,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=_t(e,{}),B=S.ellipse(0,0,u*2,m*2,T);if(x=o.insert(()=>B,":first-child"),x.attr("class","basic label-container"),b)x.attr("style",b)}else x=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",m).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=m*2,W(e,x),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return N.ellipse(S,B,_,T)},e.intersect=function(S){return N.ellipse(e,u,m,S)},o}t(Cm,"usecaseEllipse");function bm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",$t(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=_t(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let m=d.circle(0,0,c*2,u),x=a.insert(()=>m,":first-child");if(x.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")x.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")x.selectAll("path").attr("style",o);return W(e,x),e.intersect=function(b){return l.info("filledCircle intersect",e,{radius:c,point:b}),N.circle(e,c,b)},a}t(bm,"filledCircle");var dg=10,fg=10;async function km(r,e){let{labelStyles:i,nodeStyles:s}=Q(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<dg)e.height=dg;if(e.width=(e?.width??0)-a-a/2,e.width<fg)e.width=fg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,m=u,x=[{x:0,y:-u},{x:m,y:-u},{x:m/2,y:0}],{cssStyles:b}=e,S=y.svg(c),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=oe(x),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,W(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(F){return l.info("Triangle intersect",e,x,F),N.polygon(e,x,F)},c}t(km,"flippedTriangle");async function wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),m=Math.max(f+u,e.height??0),x=m-u,b=Math.max(d*0.38,28),S=-m/2,T=[{x:-d/2,y:S},{x:-d/2+b,y:S},{x:-d/2+b,y:S+u},{x:d/2,y:S+u},{x:d/2,y:m/2},{x:-d/2,y:m/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((I)=>`L${I.x},${I.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let O=y.svg(o).path(B,_t(e,{}));if(v=o.insert(()=>O,":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")W(e,v);else W(e,v,{width:d,height:m});let F=S+u+x/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${F-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(I){return N.polygon(e,T,I)},o}t(wm,"folder");function Sm(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=Q(e);e.label="";let c=r.insert("g").attr("class",$t(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,m=-1*f/2,x=y.svg(c),b=_t(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let S=x.rectangle(u,m,d,f,b),T=c.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);W(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 N.rect(e,_)},c}t(Sm,"forkJoin");async function Tm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=15,a=10,c=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)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await X(r,e,$t(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,m=u/2,x=m-Math.sqrt(Math.max(0,m**2-(f.height/2)**2)),b=(e?.width?e?.width:Math.max(o,f.width)+x*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-b/2,y:-u/2},{x:b/2-m,y:-u/2},...Qe(-b/2+m,0,m,50,90,270),{x:b/2-m,y:u/2},{x:-b/2,y:u/2}],v=oe(_),F=T.path(v,B),I=d.insert(()=>F,":first-child");if(I.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")I.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return W(e,I),e.intersect=function(O){return l.info("Pill intersect",e,{radius:m,point:O}),N.polygon(e,_,O)},d}t(Tm,"halfRoundedRectangle");var d1=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 Bm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let F=(e.height??0)/o;e.width=(e?.width??0)-2*F-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:m}=await X(r,e,$t(e)),x=(e?.height?e?.height:m.height)+d,b=x/o,S=(e?.width?e?.width:m.width)+2*b+f,T=[{x:b,y:0},{x:S-b,y:0},{x:S,y:-x/2},{x:S-b,y:-x},{x:b,y:-x},{x:0,y:-x/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),F=_t(e,{}),I=d1(0,0,S,x,b),O=v.path(I,F);if(B=u.insert(()=>O,":first-child").attr("transform",`translate(${-S/2}, ${x/2})`),_)B.attr("style",_)}else B=tr(u,S,x,T);if(s)B.attr("style",s);return e.width=S,e.height=x,W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},u}t(Bm,"hexagon");async function _m(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,$t(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=_t(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],m=oe(u),x=d.path(m,f),b=o.insert(()=>x,":first-child");if(b.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")b.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")b.selectChildren("path").attr("style",s);return b.attr("transform",`translate(${-a/2}, ${-c/2})`),W(e,b),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),N.polygon(e,u,S)},o}t(_m,"hourglass");async function vm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=e.pos==="t",b=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ge(e),_=-S/2,v=-b/2,F=e.label?8:0,I=y.svg(f),O=_t(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let K=I.rectangle(_,v,S,b,O),Z=Math.max(S,u.width),rt=b+u.height+F,st=I.rectangle(-Z/2,-rt/2,Z,rt,{...O,fill:"transparent",stroke:"none"}),ut=f.insert(()=>K,":first-child"),ct=f.insert(()=>st);if(e.icon){let nt=f.append("g");nt.html(`<g>${await cr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let D=nt.node().getBBox(),{width:U,height:it,x:P,y:ht}=D;nt.attr("transform",`translate(${-U/2-P},${x?u.height/2+F/2-it/2-ht:-u.height/2-F/2-it/2-ht})`),nt.attr("style",`color: ${B.get("stroke")??T};`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${x?-rt/2:rt/2-u.height})`),ut.attr("transform",`translate(0,${x?u.height/2+F/2:-u.height/2-F/2})`),W(e,ct),e.intersect=function(nt){if(l.info("iconSquare intersect",e,nt),!e.label)return N.rect(e,nt);let D=e.x??0,U=e.y??0,it=e.height??0,P=[];if(x)P=[{x:D-u.width/2,y:U-it/2},{x:D+u.width/2,y:U-it/2},{x:D+u.width/2,y:U-it/2+u.height+F},{x:D+S/2,y:U-it/2+u.height+F},{x:D+S/2,y:U+it/2},{x:D-S/2,y:U+it/2},{x:D-S/2,y:U-it/2+u.height+F},{x:D-u.width/2,y:U-it/2+u.height+F}];else P=[{x:D-S/2,y:U-it/2},{x:D+S/2,y:U-it/2},{x:D+S/2,y:U-it/2+b},{x:D+u.width/2,y:U-it/2+b},{x:D+u.width/2/2,y:U+it/2},{x:D-u.width/2,y:U+it/2},{x:D-u.width/2,y:U-it/2+b},{x:D-S/2,y:U-it/2+b}];return N.polygon(e,P,nt)},f}t(vm,"icon");async function Lm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=20,b=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ge(e),v=y.svg(f),F=_t(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let I=_.get("fill");F.stroke=I??B;let O=f.append("g");if(e.icon)O.html(`<g>${await cr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let K=O.node().getBBox(),{width:Z,height:rt,x:st,y:ut}=K,ct=Math.max(Z,rt)*Math.SQRT2+x*2,nt=v.circle(0,0,ct,F),D=Math.max(ct,u.width),U=ct+u.height+b,it=v.rectangle(-D/2,-U/2,D,U,{...F,fill:"transparent",stroke:"none"}),P=f.insert(()=>nt,":first-child"),ht=f.insert(()=>it);return O.attr("transform",`translate(${-Z/2-st},${S?u.height/2+b/2-rt/2-ut:-u.height/2-b/2-rt/2-ut})`),O.attr("style",`color: ${_.get("stroke")??T};`),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-U/2:U/2-u.height})`),P.attr("transform",`translate(0,${S?u.height/2+b/2:-u.height/2-b/2})`),W(e,ht),e.intersect=function(lt){return l.info("iconSquare intersect",e,lt),N.rect(e,lt)},f}t(Lm,"iconCircle");async function Fm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ge(e),F=-T/2,I=-S/2,O=e.label?8:0,K=y.svg(f),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let rt=v.get("fill");Z.stroke=rt??_;let st=K.path(Ae(F,I,T,S,5),Z),ut=Math.max(T,u.width),ct=S+u.height+O,nt=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>st,":first-child").attr("class","icon-shape2"),U=f.insert(()=>nt);if(e.icon){let it=f.append("g");it.html(`<g>${await cr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=it.node().getBBox(),{width:ht,height:lt,x:Bt,y:vt}=P;it.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+O/2-lt/2-vt:-u.height/2-O/2-lt/2-vt})`),it.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),D.attr("transform",`translate(0,${b?u.height/2+O/2:-u.height/2-O/2})`),W(e,U),e.intersect=function(it){if(l.info("iconSquare intersect",e,it),!e.label)return N.rect(e,it);let P=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:P-u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht+lt/2},{x:P-T/2,y:ht+lt/2},{x:P-T/2,y:ht-lt/2+u.height+O},{x:P-u.width/2,y:ht-lt/2+u.height+O}];else Bt=[{x:P-T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2+S},{x:P+u.width/2,y:ht-lt/2+S},{x:P+u.width/2/2,y:ht+lt/2},{x:P-u.width/2,y:ht+lt/2},{x:P-u.width/2,y:ht-lt/2+S},{x:P-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,it)},f}t(Fm,"iconRounded");async function Mm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ge(e),F=-T/2,I=-S/2,O=e.label?8:0,K=y.svg(f),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let rt=v.get("fill");Z.stroke=rt??_;let st=K.path(Ae(F,I,T,S,0.1),Z),ut=Math.max(T,u.width),ct=S+u.height+O,nt=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>st,":first-child"),U=f.insert(()=>nt);if(e.icon){let it=f.append("g");it.html(`<g>${await cr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=it.node().getBBox(),{width:ht,height:lt,x:Bt,y:vt}=P;it.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+O/2-lt/2-vt:-u.height/2-O/2-lt/2-vt})`),it.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),D.attr("transform",`translate(0,${b?u.height/2+O/2:-u.height/2-O/2})`),W(e,U),e.intersect=function(it){if(l.info("iconSquare intersect",e,it),!e.label)return N.rect(e,it);let P=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:P-u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht+lt/2},{x:P-T/2,y:ht+lt/2},{x:P-T/2,y:ht-lt/2+u.height+O},{x:P-u.width/2,y:ht-lt/2+u.height+O}];else Bt=[{x:P-T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2+S},{x:P+u.width/2,y:ht-lt/2+S},{x:P+u.width/2/2,y:ht+lt/2},{x:P-u.width/2,y:ht+lt/2},{x:P-u.width/2,y:ht-lt/2+S},{x:P-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,it)},f}t(Mm,"iconSquare");async function Am(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:c}=Q(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:m,bbox:x,label:b}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(m),F=_t(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let I=v.rectangle(T,B,f,u,F),O=Math.max(f,x.width),K=u+x.height+_,Z=v.rectangle(-O/2,-K/2,O,K,{...F,fill:"none",stroke:"none"}),rt=m.insert(()=>I,":first-child"),st=m.insert(()=>Z);if(e.img){let ut=m.append("image");ut.attr("href",e.img),ut.attr("width",f),ut.attr("height",u),ut.attr("preserveAspectRatio","none"),ut.attr("transform",`translate(${-f/2},${S?K/2-u:-K/2})`)}return b.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${S?-u/2-x.height/2-_/2:u/2-x.height/2+_/2})`),rt.attr("transform",`translate(0,${S?x.height/2+_/2:-x.height/2-_/2})`),W(e,st),e.intersect=function(ut){if(l.info("iconSquare intersect",e,ut),!e.label)return N.rect(e,ut);let ct=e.x??0,nt=e.y??0,D=e.height??0,U=[];if(S)U=[{x:ct-x.width/2,y:nt-D/2},{x:ct+x.width/2,y:nt-D/2},{x:ct+x.width/2,y:nt-D/2+x.height+_},{x:ct+f/2,y:nt-D/2+x.height+_},{x:ct+f/2,y:nt+D/2},{x:ct-f/2,y:nt+D/2},{x:ct-f/2,y:nt-D/2+x.height+_},{x:ct-x.width/2,y:nt-D/2+x.height+_}];else U=[{x:ct-f/2,y:nt-D/2},{x:ct+f/2,y:nt-D/2},{x:ct+f/2,y:nt-D/2+u},{x:ct+x.width/2,y:nt-D/2+u},{x:ct+x.width/2/2,y:nt+D/2},{x:ct-x.width/2,y:nt+D/2},{x:ct-x.width/2,y:nt-D/2+u},{x:ct-f/2,y:nt-D/2+u}];return N.polygon(e,U,ut)},m}t(Am,"imageSquare");async function Em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),m=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Em,"inv_trapezoid");async function $m(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),c=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(d){return N.rect(e,d)},i}t($m,"labelRect");async function Im(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Im,"lean_left");async function Om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Om,"lean_right");function Dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",$t(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),m=_t(e,{});if(e.look!=="handDrawn")m.roughness=0,m.fillStyle="solid";let x=oe(f),b=u.path(x,m),S=o.insert(()=>b,":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(-${c/2},${-n})`),W(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),N.polygon(e,f,T)},o}t(Dm,"lightningBolt");var f1=t((r,e,i,s,o,a,c)=>[`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+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),p1=t((r,e,i,s,o,a,c)=>[`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+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),g1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),pg=10,gg=10;async function Pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<gg)e.width=gg;let F=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-F*3,e.height<pg)e.height=pg}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,$t(e)),u=(e?.width?e?.width:d.width)+a*2,m=u/2,x=m/(2.5+u/50),b=(e?.height?e?.height:d.height)+x+c*2,S=b*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=p1(0,0,u,b,m,x,S),F=g1(0,x,u,b,m,x),I=_t(e,{}),O=_.path(v,I),K=_.path(F,I);if(n.insert(()=>K,":first-child").attr("class","line"),T=n.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=f1(0,0,u,b,m,x,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-u/2}, ${-(b/2+x)})`),W(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),F=v.x-(e.x??0);if(m!=0&&(Math.abs(F)<(e.width??0)/2||Math.abs(F)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let I=x*x*(1-F*F/(m*m));if(I>0)I=Math.sqrt(I);if(I=x-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},n}t(Pm,"linedCylinder");async function Rm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let I=e.width;if(e.width=(I??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,$t(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,m=(e?.height?e?.height:d.height)+(c??0)*2,x=e.look==="neo"?m/4:m/8,b=m+x,{cssStyles:S}=e,T=y.svg(n),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:b/2},...kr(-u/2-u/2*0.1,b/2,u/2+u/2*0.1,b/2,x,0.8),{x:u/2+u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2,y:-b/2},{x:-u/2,y:b/2*1.1},{x:-u/2,y:-b/2}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),F=n.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")F.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return F.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-m/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,F),e.intersect=function(I){return N.polygon(e,_,I)},n}t(Rm,"linedWaveEdgedRect");var m1=56,oc=72,mg=8,yg=2,y1=8,x1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},xg=Math.PI/3,Cg=0.6,sc=t((r,e)=>{let i=e*Cg,s=e*Math.sqrt(1-Cg**2),o=Math.cos(xg),a=-Math.sin(xg),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),C1={normal:sc(-24,12),hollow:sc(-23,9),awesome:sc(-21,13),icon:"M 12 -8 L 26 -26"},bg=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"),yc=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"),b1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,_t(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var k1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",C1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Fo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=Q(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await X(r,c,$t(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:m,themeVariables:x}=p();Vn(n,e.colorIndex,m,x.borderColorArray);let b,S;if(e.stereotype){let rt=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=rt.label.attr("class","label usecase-stereotype"),S=rt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${x1[i]}`).attr("style",a||null);await s(T,e),k1(T,e,i);let B=e.padding??y1,_=S?.height??0,v=oc+mg+d.height+(S?_+yg:0),F=Math.max(m1,d.width,S?.width??0)+B*2,I=v+B*2,O=-v/2;T.attr("transform",`translate(0,${O+oc/2})`);let K=O+oc+mg;if(b&&S)K+=_/2,bg(b,S,K),K+=_/2+yg;bg(f,d,K+d.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-F/2).attr("y",-I/2).attr("width",F).attr("height",I).attr("opacity",0).attr("aria-hidden","true");return W(e,Z),e.intersect=(rt)=>N.rect(e,rt),n}t(Fo,"renderUsecaseActor");var w1=["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 qm(r,e){return Fo(r,e,"normal",(i,s)=>{yc(i,s,w1,"usecase-actor-stick")})}t(qm,"usecaseActor");var S1=["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 Wm(r,e){return Fo(r,e,"awesome",(i,s)=>{yc(i,s,S1,"usecase-actor-awesome-silhouette")})}t(Wm,"usecaseActorAwesome");var T1=["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 Fo(r,e,"hollow",(i,s)=>{b1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),yc(i,s,T1,"usecase-actor-hollow-body",!0)})}t(Nm,"usecaseActorHollow");var di=52,kg=42,wg=-2,B1=t(async(r,e)=>{let i=-di/2,s=wg-di/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,di,di,_t(e,{}));r.insert(()=>u,":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",di).attr("height",di).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Es(o.includes(":")?o:`fa:${o}`),c=await cr(o,{height:kg,width:kg,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${wg-d.height/2-d.y})`)},"drawIconActor");async function zm(r,e){return Fo(r,e,"icon",B1)}t(zm,"usecaseActorIcon");var Sg=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 Hm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await X(r,a,$t(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:m}=p();Vn(c,e.colorIndex,u,m.borderColorArray);let x,b;if(i.stereotype){let D=await Ir(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=D.label.attr("class","label usecase-stereotype"),b=D.bbox}let S=b?2:0,T=n.height+(b?.height??0)+S,B=Math.max(n.width,b?.width??0),_=d??10,v=B/2+_*2,F=T/2+_*2,I=Math.min(Math.max(_/5,1),_/2),O=B/2+I,K=v-I,Z=O/v,rt=K/v,st=F*Math.sqrt(Math.max(0,1-Z*Z)),ut=-F*Math.sqrt(Math.max(0,1-rt*rt));if(x&&b)Sg(x,b,-T/2+b.height/2);Sg(f,n,T/2-n.height/2);let ct;if(e.look==="handDrawn"){let U=y.svg(c).ellipse(0,0,v*2,F*2,_t(e,{}));ct=c.insert(()=>U,":first-child").attr("class","basic label-container usecase-business-ellipse")}else ct=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",F).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${O} ${st} L ${K} ${ut}`).attr("fill","none").attr("style",o||null);let nt=i.accessibleName??i.label;if(nt)c.attr("role","img").attr("aria-label",nt);return W(e,ct),e.calcIntersect=(D,U)=>N.ellipse(D,D.width/2,D.height/2,U),e.intersect=(D)=>N.ellipse(e,v,F,D),c}t(Hm,"usecaseBusiness");var ac=8,Tg=4,_1=1,nc=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"),v1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:_1},"numericStrokeWidth");async function Ym(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e),{stylesMap:a}=Ge(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let D of i.jsonRows??[]){let U=await Ir(f,D.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),it=await Ir(f,D.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:U.label.attr("class","label usecase-json-key"),bbox:U.bbox},value:{label:it.label.attr("class","label usecase-json-value"),bbox:it.bbox}})}let m=Math.max(0,...u.map(({key:D})=>D.bbox.width))+ac*2,x=Math.max(0,...u.map(({value:D})=>D.bbox.width))+ac*2,b=n.width+ac*2,S=Math.max(b,m+x),T=x+Math.max(0,S-m-x),B=n.height+Tg*2,_=u.map(({key:D,value:U})=>Math.max(D.bbox.height,U.bbox.height)+Tg*2),v=B+_.reduce((D,U)=>D+U,0),F=v1(a.get("stroke-width")),I=S+F*2,O=v+F*2,K=-S/2,Z=-v/2,rt=e.look==="handDrawn"?y.svg(c):void 0,st=rt?_t(e,{}):void 0,ut=t((D,U,it,P,ht,lt)=>{if(rt&&st){let Bt=rt.rectangle(it,P,ht,lt,st);return D.insert(()=>Bt,":first-child").attr("class",U)}return D.insert("rect",":first-child").attr("class",U).attr("x",it).attr("y",P).attr("width",ht).attr("height",lt).attr("style",o)},"insertCell"),ct=ut(c,"label-container usecase-json-border",-I/2,-O/2,I,O);ut(f,"usecase-json-cell usecase-json-title-cell",K,Z,S,B),f.node()?.append(d.node()),nc(d,n,0,Z+B/2);let nt=Z+B;return u.forEach(({key:D,value:U},it)=>{let P=_[it],ht=f.append("g").attr("class","usecase-json-row").attr("data-row-index",it).attr("transform",`translate(0,${nt})`);ut(ht,"usecase-json-cell usecase-json-key-cell",K,0,m,P),ut(ht,"usecase-json-cell usecase-json-value-cell",K+m,0,T,P),ht.node()?.append(D.label.node(),U.label.node()),nc(D.label,D.bbox,K+m/2,P/2),nc(U.label,U.bbox,K+m+T/2,P/2),nt+=P}),W(e,ct),e.intersect=(D)=>N.rect(e,D),c}t(Ym,"usecaseJsonTable");async function jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await X(r,e,$t(e)),m=(e?.width?e?.width:f.width)+a*2+2*n,x=(e?.height?e?.height:f.height)+c*2+2*n,b=m-2*n,S=x-2*n,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),F=_t(e,{}),I=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+b-n,y:B+S+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B+S-n},{x:T+b+n,y:B+S-n},{x:T+b+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],O=[{x:T,y:B+n},{x:T+b-n,y:B+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B},{x:T,y:B}];if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let K=oe(I),Z=v.path(K,F),rt=oe(O),st=v.path(rt,F);if(e.look!=="handDrawn")Z=hc(Z),st=hc(st);let ut=d.insert("g",":first-child");if(ut.insert(()=>Z),ut.insert(()=>st),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,I,ct)},d}t(jm,"multiRect");async function Um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let m=Math.max(a.width,e?.width??0)+d*2,x=Math.max(a.height,e?.height??0)+f*3,b=e.look==="neo"?x/4:x/8,S=x+(u?b/2:-b/2),T=-m/2,B=-S/2,_=10,{cssStyles:v}=e,F=kr(T-_,B+S+_,T+m-_,B+S+_,b,0.8),I=F?.[F.length-1],O=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...F,{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:I.y-2*_},{x:T+m+_,y:I.y-2*_},{x:T+m+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],K=[{x:T,y:B+_},{x:T+m-_,y:B+_},{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:B},{x:T,y:B}],Z=y.svg(o),rt=_t(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let st=oe(O),ut=Z.path(st,rt),ct=oe(K),nt=Z.path(ct,rt),D=o.insert(()=>ut,":first-child");if(D.insert(()=>nt),D.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")D.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return D.attr("transform",`translate(0,${-b/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-b-(a.y-(a.top??0))})`),W(e,D),e.intersect=function(U){return N.polygon(e,O,U)},o}t(Um,"multiWaveEdgedRectangle");async function Xm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);if(e.labelStyle=s,!(e.useHtmlLabels||jt(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=-f/2,x=-u/2,{cssStyles:b}=e,S=y.svg(c),T=_t(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(m,x,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),b&&e.look!=="handDrawn")_.selectAll("path").attr("style",b);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,_),e.intersect=function(v){return N.rect(e,v)},c}t(Xm,"note");var L1=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 Gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,$t(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],m,{cssStyles:x}=e;if(e.look==="handDrawn"){let b=y.svg(o),S=_t(e,{}),T=L1(0,0,d),B=b.path(T,S);if(m=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x)m.attr("style",x)}else m=tr(o,d,d,u),m.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)m.attr("style",s);return W(e,m),e.calcIntersect=function(b,S){let T=b.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return N.polygon(b,B,S)},e.intersect=function(b){return this.calcIntersect(e,b)},o}t(Gm,"question");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await X(r,e,$t(e)),u=d.width+(e.look==="neo"?a*2:a),m=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),x=m/4,S=-Math.max(u,(e.width??0)-x)/2,T=-m/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,F=y.svg(n),I=_t(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=oe(_),K=F.path(O,I),Z=n.insert(()=>K,":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)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,Z),e.intersect=function(rt){return N.polygon(e,_,rt)},n}t(Vm,"rect_left_inv_arrow");async function Km(r,e){let{labelStyles:i,nodeStyles:s}=Q(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),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await Ne(n,f,e.labelStyle,!0,!0),m={width:0,height:0};if(jt(p())){let rt=u.children[0],st=h(u);m=rt.getBoundingClientRect(),st.attr("width",m.width),st.attr("height",m.height)}l.info("Text 2",d);let x=d||[],b=u.getBBox(),S=await Ne(n,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),T=S.children[0],B=h(S);m=T.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+_+5)+")"),h(u).attr("transform","translate( "+(m.width<b.width?0:-(b.width-m.width)/2)+", 0)"),m=n.node().getBBox(),n.attr("transform","translate("+-m.width/2+", "+(-m.height/2-_+3)+")");let v=m.width+(e.padding||0),F=m.height+(e.padding||0),I=-m.width/2-_,O=-m.height/2-_,K,Z;if(e.look==="handDrawn"){let rt=y.svg(a),st=_t(e,{}),ut=rt.path(Ae(I,O,v,F,e.rx||0),st),ct=rt.line(-m.width/2-_,-m.height/2-_+b.height+_,m.width/2+_,-m.height/2-_+b.height+_,st);Z=a.insert(()=>(l.debug("Rough node insert CXC",ut),ct),":first-child"),K=a.insert(()=>(l.debug("Rough node insert CXC",ut),ut),":first-child")}else K=c.insert("rect",":first-child"),Z=c.insert("line"),K.attr("class","outer title-state").attr("style",s).attr("x",-m.width/2-_).attr("y",-m.height/2-_).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-m.width/2-_).attr("x2",m.width/2+_).attr("y1",-m.height/2-_+b.height+_).attr("y2",-m.height/2-_+b.height+_);return W(e,K),e.intersect=function(rt){return N.rect(e,rt)},a}t(Km,"rectWithTitle");async function Zm(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 mi(r,e,o)}t(Zm,"roundedRect");var Er=8;async function Qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,m=f-Er,x=u,b=Er-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=_t(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:b,y:S},{x:b+m,y:S},{x:b+m,y:S+x},{x:b-Er,y:S+x},{x:b-Er,y:S},{x:b,y:S},{x:b,y:S+x}],F=B.polygon(v.map((O)=>[O.x,O.y]),_),I=c.insert(()=>F,":first-child");if(I.attr("class","basic label-container outer-path").attr("style",ue(T)),s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,I),e.intersect=function(O){return N.rect(e,O)},c}t(Qm,"shadedProcess");async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await X(r,e,$t(e)),u=(e?.width?e?.width:d.width)+a*2,m=((e?.height?e?.height:d.height)+c*2)*1.5,x=u,b=m/1.5,S=-x/2,T=-b/2,{cssStyles:B}=e,_=y.svg(n),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=[{x:S,y:T},{x:S,y:T+b},{x:S+x,y:T+b},{x:S+x,y:T-b/2}],I=oe(F),O=_.path(I,v),K=n.insert(()=>O,":first-child");if(K.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")K.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return K.attr("transform",`translate(0, ${b/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(d.x-(d.left??0))}, ${-b/4+(e.padding??0)-(d.y-(d.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,F,Z)},n}t(Jm,"slopedRect");async function ty(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},c=await mi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=p();Vn(c,e.colorIndex,n,d.borderColorArray)}return c}t(ty,"squareRect");var dc=50,F1=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 ey(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),{w:f,h:u}=F1(d,a,c),m=u/2,{cssStyles:x}=e,b=y.svg(n),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+m,y:-u/2},{x:f/2-m,y:-u/2},...Qe(-f/2+m,0,m,dc,90,270),{x:f/2-m,y:u/2},...Qe(f/2-m,0,m,dc,270,450)],B=oe(T),_=b.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return W(e,v),e.intersect=function(F){return N.polygon(e,T,F)},n}t(ey,"stadium");async function ry(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return mi(r,e,i)}t(ry,"state");function iy(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=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 u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),m=y.svg(u),x=_t(e,{});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let b=m.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=m.circle(0,0,T,{...x,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>b,":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&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",F=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${F})`)}return W(e,_),e.intersect=function(v){return N.circle(e,(e.width??0)/2,v)},u}t(iy,"stateEnd");function oy(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),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,Pd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.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??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return W(e,c),e.intersect=function(n){return N.circle(e,(e.width??7)/2,n)},a}t(oy,"stateStart");var fi=8;async function sy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=Math.max(d.width+2*fi+a,e.width??0),u=Math.max(d.height+c,e.height??0),m=f-2*fi,x=u,b=-f/2,S=-u/2,T=[{x:0,y:0},{x:m,y:0},{x:m,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=_t(e,{}),v=B.rectangle(b,S,m+16,x,_),F=B.line(b+fi,S,b+fi,S+x,_),I=B.line(b+fi+m,S,b+fi+m,S+x,_);n.insert(()=>F,":first-child"),n.insert(()=>I,":first-child");let O=n.insert(()=>v,":first-child"),{cssStyles:K}=e;O.attr("class","basic label-container").attr("style",ue(K)),W(e,O)}else{let B=tr(n,m,x,T);if(s)B.attr("style",s);W(e,B)}return e.intersect=function(B){return N.polygon(e,T,B)},n}t(sy,"subroutine");var lc=0.2;async function ay(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-lc*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=(e?.height?e?.height:d.height)+c*2,u=lc*f,m=lc*f,b=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),F=_t(e,{}),I=[{x:T-u/2,y:B},{x:T+b+u/2,y:B},{x:T+b+u/2,y:B+S},{x:T-u/2,y:B+S}],O=[{x:T+b-u/2,y:B+S},{x:T+b+u/2,y:B+S},{x:T+b+u/2,y:B+S-m}];if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let K=oe(I),Z=v.path(K,F),rt=oe(O),st=v.path(rt,{...F,fillStyle:"solid"}),ut=n.insert(()=>st,":first-child");if(ut.insert(()=>Z,":first-child"),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return W(e,ut),e.intersect=function(ct){return N.polygon(e,I,ct)},n}t(ay,"taggedRect");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,$t(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,m=0.2*d,x=d+f,{cssStyles:b}=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:x/2},...kr(-n/2-n/2*0.1,x/2,n/2+n/2*0.1,x/2,f,0.8),{x:n/2+n/2*0.1,y:-x/2},{x:-n/2-n/2*0.1,y:-x/2}],_=-n/2+n/2*0.1,v=-x/2-m*0.4,F=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-m},{x:_+n,y:(v+d)*0.9},...kr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],I=oe(B),O=S.path(I,T),K=oe(F),Z=S.path(K,{...T,fillStyle:"solid"}),rt=o.insert(()=>Z,":first-child");if(rt.insert(()=>O,":first-child"),rt.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")rt.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),W(e,rt),e.intersect=function(st){return N.polygon(e,B,st)},o}t(ny,"taggedWaveEdgedRectangle");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,$t(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),W(e,u),e.intersect=function(m){return N.rect(e,m)},o}t(ly,"text");var M1=t((r,e,i,s,o,a)=>`M${r},${e}
226
+ `);return Np(s)}t(Df,"preprocessMarkdown");function Pf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Pf,"nonMarkdownToLines");function Qp(r,e={}){let i=Df(r,e),s=ae.lexer(i),o=[[]],a=0;function c(n,d="normal"){if(n.type==="text")n.text.split(`
227
+ `).forEach((u,m)=>{if(m!==0)a++,o.push([]);u.split(" ").forEach((x)=>{if(x=x.replace(/&#39;/g,"'"),x)o[a].push({content:x,type:d})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((f)=>{c(f,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(c,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((d)=>{c(d)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Qp,"markdownToLines");function Rf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Rf,"nonMarkdownToHTML");function Nf(r,{markdownAutoWrap:e}={}){let i=ae.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(Nf,"markdownToHTML");var vk=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function s(){var f=this;f.reads=[],f.writes=[],f.raf=i.bind(r),e("initialized",f)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(f){e("run tasks");var u;while(u=f.shift())u()},"runTasks"),measure:t(function(f,u){e("measure");var m=!u?f:f.bind(u);return this.reads.push(m),o(this),m},"measure"),mutate:t(function(f,u){e("mutate");var m=!u?f:f.bind(u);return this.writes.push(m),o(this),m},"mutate"),clear:t(function(f){return e("clear",f),c(this.reads,f)||c(this.writes,f)},"clear"),extend:t(function(f){if(e("extend",f),typeof f!="object")throw Error("expected object");var u=Object.create(this);if(n(u,f),u.fastdom=this,u.initialize)u.initialize();return u},"extend"),catch:null};function o(f){if(!f.scheduled)f.scheduled=!0,f.raf(a.bind(null,f)),e("flush scheduled")}t(o,"scheduleFlush");function a(f){e("flush");var{writes:u,reads:m}=f,x;try{e("flushing reads",m.length),f.runTasks(m),e("flushing writes",u.length),f.runTasks(u)}catch(b){x=b}if(f.scheduled=!1,m.length||u.length)o(f);if(x)if(e("task errored",x.message),f.catch)f.catch(x);else throw x}t(a,"flush");function c(f,u){var m=f.indexOf(u);return!!~m&&!!f.splice(m,1)}t(c,"remove");function n(f,u){for(var m in u)if(u.hasOwnProperty(m))f[m]=u[m]}t(n,"mixin");var d=r.fastdom=r.fastdom||new s;return d}(typeof window<"u"?window:globalThis),Qf={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,c,n=new Promise(function(d,f){c=a[e](function(){o.delete(n);try{d(s?i.call(s):i())}catch(u){f(u)}},s)});return o.set(n,c),n}t(Wh,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Qf,Lk=Qf,Fk=vk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Lk),hr=Fk;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 Hh(r,[],i,e.type)}t(ep,"splitWordToFitWidth");function Hh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Hh(r,c,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Hh,"splitWordToFitWidthRecursion");function rp(r,e){if(r.some(({content:i})=>i.includes(`
228
+ `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xs(r,e)}t(rp,"splitLineToFitWidth");function Xs(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"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(a),e(c))return Xs(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=ep(e,a);if(i.push([n]),d.content)r.unshift(d)}return Xs(r,e,i)}t(Xs,"splitLineToFitWidthRecursion");function Nh(r,e){if(e)r.attr("style",e)}t(Nh,"applyStyle");var Of=16384;async function np(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Of)}px`),n.attr("height",`${Math.min(10*i,Of)}px`);let d=n.append("xhtml:div"),f=_t(e.label)?await ql(e.label.replace(w.lineBreakRegex,`
229
+ `),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",m=d.append("span");if(m.html(f),Nh(m,e.labelStyle),m.attr("class",`${u} ${s}`),Nh(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let x=await hr.measure(()=>d.node().getBoundingClientRect());if(x.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(x.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(np,"addHtmlSpan");function Vs(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(Vs,"createTspan");function Lp(r,e,i){let s=r.append("text"),o=Vs(s,1,e);Ks(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Lp,"computeWidthOfText");function Jf(r,e,i){let s=r.append("text"),o=Vs(s,1,e);Ks(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(Jf,"computeDimensionOfText");function Fp(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let m=t((b)=>Lp(c,1.1,b)<=r,"checkWidth"),x=m(u)?[u]:rp(u,m);for(let b of x){let S=Vs(d,f,1.1,o);Ks(S,b),f++}}if(s){let u=d.node().getBBox(),m=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Fp,"createFormattedText");function zh(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(zh,"decodeHTMLEntities");function Ks(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(zh(i.content));else o.text(" "+zh(i.content))})}t(Ks,"updateTextContentAndStyles");async function Mp(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Fs(n))return await ur(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Mp,"replaceIconSubstring");var ln=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},m)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let x=c?Nf(e,m):Rf(e),b=await Mp($a(x),m),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:_t(e)?S:b,labelStyle:i.replace("fill:","color:")};return await np(r,T,d,o,u,m,f)}else{let x=$a(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?Qp(x.replace("<br>","<br/>"),m):Pf(x),S=Fp(d,r,b,e?u:!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:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(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:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var zu=new Set(["redux-color","redux-dark-color"]),Mk=12,Ak=64,mt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),et=t((r,e)=>r!=null&&zu.has(r)&&mt(e),"isColorTheme"),Ek=/^[\w-]+$/,tt=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Ek.test(e)?e:"classic"},"safeLook"),Gr=t((r)=>mt(r)?r.length:0,"paletteSlotCount"),Vn=t((r,e)=>{if(mt(e))return Gr(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Ak?r:Mk},"colorSlotCount"),Yn=t((r,e,i,s)=>{if(e===void 0||!et(i,s))return;let o=e%Gr(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Yh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function $k(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ik(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Yh(f,n,o);let d=function(f,u,m){let x=[];for(let v of f){let F=[...v];$k(F[0],F[F.length-1])||F.push([F[0][0],F[0][1]]),F.length>2&&x.push(F)}let b=[];u=Math.max(u,0.1);let S=[];for(let v of x)for(let F=0;F<v.length-1;F++){let I=v[F],O=v[F+1];if(I[1]!==O[1]){let K=Math.min(I[1],O[1]);S.push({ymin:K,ymax:Math.max(I[1],O[1]),x:K===I[1]?I[0]:O[0],islope:(O[0]-I[0])/(O[1]-I[1])})}}if(S.sort((v,F)=>v.ymin<F.ymin?-1:v.ymin>F.ymin?1:v.x<F.x?-1:v.x>F.x?1:v.ymax===F.ymax?0:(v.ymax-F.ymax)/Math.abs(v.ymax-F.ymax)),!S.length)return b;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let F=0;F<S.length&&!(S[F].ymin>B);F++)v=F;S.splice(0,v+1).forEach((F)=>{T.push({s:B,edge:F})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,F)=>v.edge.x===F.edge.x?0:(v.edge.x-F.edge.x)/Math.abs(v.edge.x-F.edge.x)),(m!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let F=v+1;if(F>=T.length)break;let I=T[v].edge,O=T[F].edge;b.push([[Math.round(I.x),B],[Math.round(O.x),B]])}B+=m,T.forEach((v)=>{v.edge.x=v.edge.x+m*v.edge.islope}),_++}return b}(c,a,s);if(o){for(let f of c)Yh(f,n,-o);(function(f,u,m){let x=[];f.forEach((b)=>x.push(...b)),Yh(x,u,m)})(d,n,-o)}return d}function vo(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),Ik(r,o,s,a||1)}class sa{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=vo(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 aa(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 jp extends sa{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=vo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)aa([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Up extends sa{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 Xp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(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 c of r){let n=aa(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,m=(c[0][0]+c[1][0])/2-s/4,x=Math.min(c[0][1],c[1][1]);for(let b=0;b<f;b++){let S=x+u+b*s,T=m-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 Gp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(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 c=aa(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let m=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let x=0;x<n;x++){let b=x*(i+s),S=b+i,T=[f[0]+b*Math.cos(m)+d*Math.cos(m),f[1]+b*Math.sin(m)+d*Math.sin(m)],B=[f[0]+S*Math.cos(m)+d*Math.cos(m),f[1]+S*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class Vp{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=vo(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=aa(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let m=2*u*e,x=2*(u+1)*e,b=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+m*Math.cos(f),n[1]+m*Math.sin(f)],T=[n[0]+x*Math.cos(f),n[1]+x*Math.sin(f)],B=[S[0]+b*Math.cos(f+Math.PI/4),S[1]+b*Math.sin(f+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 Fe={};class Kp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ok=0,jh=1,$p=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 Uh(r,e){return r.type===e}function Qh(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Ok,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:jh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:$p,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Uh(a,$p);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return Qh("M0,0"+r);o++,c=Zs[a.text],s=a.text}else Uh(a,jh)?c=Zs[s]:(o++,c=Zs[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!Uh(f,jh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Zs[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function Zp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){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 d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[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 d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[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 Jp(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let m=0,x=0;i==="C"||i==="S"?(m=s+(s-n),x=o+(o-d)):(m=s,x=o),e.push({key:"C",data:[m,x,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[m,x]=u,b=0,S=0;i==="Q"||i==="T"?(b=s+(s-n),S=o+(o-d)):(b=s,S=o);let T=s+2*(b-s)/3,B=o+2*(S-o)/3,_=m+2*(b-m)/3,v=x+2*(S-x)/3;e.push({key:"C",data:[T,B,_,v,m,x]}),n=b,d=S,s=m,o=x;break}case"Q":{let[m,x,b,S]=u,T=s+2*(m-s)/3,B=o+2*(x-o)/3,_=b+2*(m-b)/3,v=S+2*(x-S)/3;e.push({key:"C",data:[T,B,_,v,b,S]}),n=m,d=x,s=b,o=S;break}case"A":{let m=Math.abs(u[0]),x=Math.abs(u[1]),b=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(m===0||x===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)tg(s,o,B,_,m,x,b,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=c}i=f}return e}function To(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function tg(r,e,i,s,o,a,c,n,d,f){let u=(m=c,Math.PI*m/180);var m;let x=[],b=0,S=0,T=0,B=0;if(f)[b,S,T,B]=f;else{[r,e]=To(r,e,-u),[i,s]=To(i,s,-u);let D=(r-i)/2,U=(e-s)/2,it=D*D/(o*o)+U*U/(a*a);it>1&&(it=Math.sqrt(it),o*=it,a*=it);let P=o*o,ht=a*a,lt=P*ht-P*U*U-ht*D*D,Bt=P*U*U+ht*D*D,At=(n===d?-1:1)*Math.sqrt(Math.abs(lt/Bt));T=At*o*U/a+(r+i)/2,B=At*-a*D/o+(e+s)/2,b=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(b=Math.PI-b),i<T&&(S=Math.PI-S),b<0&&(b=2*Math.PI+b),S<0&&(S=2*Math.PI+S),d&&b>S&&(b-=2*Math.PI),!d&&S>b&&(S-=2*Math.PI)}let _=S-b;if(Math.abs(_)>120*Math.PI/180){let D=S,U=i,it=s;S=d&&S>b?b+120*Math.PI/180*1:b+120*Math.PI/180*-1,x=tg(i=T+o*Math.cos(S),s=B+a*Math.sin(S),U,it,o,a,c,0,d,[S,D,T,B])}_=S-b;let v=Math.cos(b),F=Math.sin(b),I=Math.cos(S),O=Math.sin(S),K=Math.tan(_/4),Z=1.3333333333333333*o*K,rt=1.3333333333333333*a*K,st=[r,e],ut=[r+Z*F,e-rt*v],ct=[i+Z*O,s-rt*I],nt=[i,s];if(ut[0]=2*st[0]-ut[0],ut[1]=2*st[1]-ut[1],f)return[ut,ct,nt].concat(x);{x=[ut,ct,nt].concat(x);let D=[];for(let U=0;U<x.length;U+=3){let it=To(x[U][0],x[U][1],u),P=To(x[U+1][0],x[U+1][1],u),ht=To(x[U+2][0],x[U+2][1],u);D.push([it[0],it[1],P[0],P[1],ht[0],ht[1]])}return D}}var Dk={randOffset:function(r,e){return Xt(r,e)},randOffsetWithRange:function(r,e,i){return ra(r,e,i)},ellipse:function(r,e,i,s,o){let a=ig(i,s,o);return Vh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return br(r,e,i,s,o,!0)}};function rg(r,e,i,s,o){return{type:"path",ops:br(r,e,i,s,o)}}function ta(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...br(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...br(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?rg(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Pk(r,e,i,s,o){return function(a,c){return ta(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Op(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Qs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Qs(i[0],1.5*(1+0.22*e.roughness),Wp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=Qs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:Qs(c,1.5*(1+0.22*e.roughness),Wp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function ig(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,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Xt(c*d,i),n+=Xt(n*d,i),{increment:a,rx:c,ry:n}}function Vh(r,e,i,s){let[o,a]=zp(s.increment,r,e,s.rx,s.ry,1,s.increment*ra(0.1,ra(0.4,1,i),i),i),c=ia(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=zp(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=ia(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function Pp(r,e,i,s,o,a,c,n,d){let f=r,u=e,m=Math.abs(i/2),x=Math.abs(s/2);m+=Xt(0.01*m,d),x+=Xt(0.01*x,d);let b=o,S=a;for(;b<0;)b+=2*Math.PI,S+=2*Math.PI;S-b>2*Math.PI&&(b=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-b)/2),_=Hp(B,f,u,m,x,b,S,1,d);if(!d.disableMultiStroke){let v=Hp(B,f,u,m,x,b,S,1.5,d);_.push(...v)}return c&&(n?_.push(...br(f,u,f+m*Math.cos(b),u+x*Math.sin(b),d),...br(f,u,f+m*Math.cos(S),u+x*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+m*Math.cos(b),u+x*Math.sin(b)]})),{type:"path",ops:_}}function qp(r,e){let i=Jp(Zp(Qh(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...br(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,m,x,b]=n;s.push(...Rk(d,f,u,m,x,b,a,e)),a=[x,b];break}case"Z":s.push(...br(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Xh(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]+Xt(o,e),s[0][1]+Xt(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Xt(o,e),s[c][1]+Xt(o,e)]})}}return{type:"fillPath",ops:i}}function ui(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Fe[o])switch(o){case"zigzag":Fe[o]||(Fe[o]=new jp(s));break;case"cross-hatch":Fe[o]||(Fe[o]=new Up(s));break;case"dots":Fe[o]||(Fe[o]=new Xp(s));break;case"dashed":Fe[o]||(Fe[o]=new Gp(s));break;case"zigzag-line":Fe[o]||(Fe[o]=new Vp(s));break;default:o="hachure",Fe[o]||(Fe[o]=new sa(s))}return Fe[o]}(e,Dk).fillPolygons(r,e)}function Wp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function og(r){return r.randomizer||(r.randomizer=new Kp(r.seed||0)),r.randomizer.next()}function ra(r,e,i,s=1){return i.roughness*s*(og(i)*(e-r)+r)}function Xt(r,e,i=1){return ra(-r,r,e,i)}function br(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Kh(r,e,i,s,o,!0,!1);if(c)return n;let d=Kh(r,e,i,s,o,!0,!0);return n.concat(d)}function Kh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let m=u/2,x=0.2+0.2*og(o),b=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;b=Xt(b,o,f),S=Xt(S,o,f);let T=[],B=()=>Xt(m,o,f),_=()=>Xt(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Xt(u,o,f)),e+(v?0:Xt(u,o,f))]})),c?T.push({op:"bcurveTo",data:[b+r+(i-r)*x+B(),S+e+(s-e)*x+B(),b+r+2*(i-r)*x+B(),S+e+2*(s-e)*x+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[b+r+(i-r)*x+_(),S+e+(s-e)*x+_(),b+r+2*(i-r)*x+_(),S+e+2*(s-e)*x+_(),i+(v?0:_()),s+(v?0:_())]}),T}function Qs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Xt(e,i),r[0][1]+Xt(e,i)]),s.push([r[0][0]+Xt(e,i),r[0][1]+Xt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Xt(e,i),r[o][1]+Xt(e,i)]),o===r.length-1&&s.push([r[o][0]+Xt(e,i),r[o][1]+Xt(e,i)]);return ia(s,null,i)}function ia(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*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]+Xt(n,i),e[1]+Xt(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(...Kh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function zp(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let m=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(m),f.push(m)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Xt(0.5,n)-Math.PI/2;f.push([Xt(a,n)+e+0.9*s*Math.cos(u-r),Xt(a,n)+i+0.9*o*Math.sin(u-r)]);let m=2*Math.PI+u-0.01;for(let x=u;x<m;x+=r){let b=[Xt(a,n)+e+s*Math.cos(x),Xt(a,n)+i+o*Math.sin(x)];d.push(b),f.push(b)}f.push([Xt(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Xt(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Xt(a,n)+e+0.98*s*Math.cos(u+c),Xt(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Xt(a,n)+e+0.9*s*Math.cos(u+0.5*c),Xt(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function Hp(r,e,i,s,o,a,c,n,d){let f=a+Xt(0.1,d),u=[];u.push([Xt(n,d)+e+0.9*s*Math.cos(f-r),Xt(n,d)+i+0.9*o*Math.sin(f-r)]);for(let m=f;m<=c;m+=r)u.push([Xt(n,d)+e+s*Math.cos(m),Xt(n,d)+i+o*Math.sin(m)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ia(u,null,d)}function Rk(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],m=n.disableMultiStroke?1:2,x=n.preserveVertices;for(let b=0;b<m;b++)b===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Xt(f[0],n)),c[1]+(x?0:Xt(f[0],n))]}),u=x?[o,a]:[o+Xt(f[b],n),a+Xt(f[b],n)],d.push({op:"bcurveTo",data:[r+Xt(f[b],n),e+Xt(f[b],n),i+Xt(f[b],n),s+Xt(f[b],n),u[0],u[1]]});return d}function Bo(r){return[...r]}function Yp(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(Bo(r[0]),Bo(r[1]),Bo(r[2]),Bo(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=[],c=1-e;s.push(Bo(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*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 ea(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function qk(r,e,i){let s=ea(e,i);if(s===0)return ea(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)),ea(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 Zh(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],m=n[d+2],x=n[d+3],b=3*u[0]-2*f[0]-x[0];b*=b;let S=3*u[1]-2*f[1]-x[1];S*=S;let T=3*m[0]-2*x[0]-f[0];T*=T;let B=3*m[1]-2*x[1]-f[1];return B*=B,b<T&&(b=T),S<B&&(S=B),b+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(ea(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],m=r[e+3],x=Ar(d,f,0.5),b=Ar(f,u,0.5),S=Ar(u,m,0.5),T=Ar(x,b,0.5),B=Ar(b,S,0.5),_=Ar(T,B,0.5);Zh([d,x,T,_],0,i,o),Zh([_,B,S,m],0,i,o)}var a,c;return o}function Wk(r,e){return oa(r,0,r.length,e)}function oa(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let m=qk(r[u],c,n);m>d&&(d=m,f=u)}return Math.sqrt(d)>s?(oa(r,e,f+1,s,a),oa(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Gh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Zh(r,3*a,e,s);return i&&i>0?oa(s,0,s.length,i):s}var Ee="none";class _o{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",[rg(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Pk(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Xh([d],a)):c.push(ui([d],a))}return a.stroke!==Ee&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=ig(i,s,a),d=Vh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=Vh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(ui([d.estimatedPoints],a));return a.stroke!==Ee&&c.push(d.opset),this._d("ellipse",c,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",[ta(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=Pp(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let m=Object.assign({},d);m.disableMultiStroke=!0;let x=Pp(r,e,i,s,o,a,!0,!1,m);x.type="fillPath",f.push(x)}else f.push(function(m,x,b,S,T,B,_){let v=m,F=x,I=Math.abs(b/2),O=Math.abs(S/2);I+=Xt(0.01*I,_),O+=Xt(0.01*O,_);let K=T,Z=B;for(;K<0;)K+=2*Math.PI,Z+=2*Math.PI;Z-K>2*Math.PI&&(K=0,Z=2*Math.PI);let rt=(Z-K)/_.curveStepCount,st=[];for(let ut=K;ut<=Z;ut+=rt)st.push([v+I*Math.cos(ut),F+O*Math.sin(ut)]);return st.push([v+I*Math.cos(Z),F+O*Math.sin(Z)]),st.push([v,F]),ui([st],_)}(r,e,i,s,o,a,d));return d.stroke!==Ee&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Op(r,i);if(i.fill&&i.fill!==Ee)if(i.fillStyle==="solid"){let a=Op(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=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...Gh(Yp([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Gh(Yp(d),10,(1+i.roughness)/2))}a.length&&s.push(ui([a],i))}return i.stroke!==Ee&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=ta(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Xh([r],i)):s.push(ui([r],i))),i.stroke!==Ee&&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!==Ee,a=i.stroke!==Ee,c=!!(i.simplification&&i.simplification<1),n=function(f,u,m){let x=Jp(Zp(Qh(f))),b=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Gh(B,u)),B=[]},v=()=>{_(),S.length&&(b.push(S),S=[])};for(let{key:I,data:O}of x)switch(I){case"M":v(),T=[O[0],O[1]],S.push(T);break;case"L":_(),S.push([O[0],O[1]]);break;case"C":if(!B.length){let K=S.length?S[S.length-1]:T;B.push([K[0],K[1]])}B.push([O[0],O[1]]),B.push([O[2],O[3]]),B.push([O[4],O[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!m)return b;let F=[];for(let I of b){let O=Wk(I,m);O.length&&F.push(O)}return F}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=qp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=qp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Xh(n,i));else s.push(ui(n,i));return a&&(c?n.forEach((f)=>{s.push(ta(f,!1,i))}):s.push(d)),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:Ee};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ee,strokeWidth:0,fill:i.fill||Ee};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||Ee,strokeWidth:i,fill:Ee}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class sg{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new _o(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 c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),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((c)=>+c.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,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}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 Js="http://www.w3.org/2000/svg";class ag{constructor(r,e){this.svg=r,this.gen=new _o(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Js,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,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(Js,"path"),n.setAttribute("d",this.opsToPath(c,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,c,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(Js,"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,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}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 sg(r,e),svg:(r,e)=>new ag(r,e),generator:(r)=>new _o(r),newSeed:()=>_o.newSeed()};var Nk=1,zk=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 c=p().fontSize?p().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=Y.fontSize]=Nn(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}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===zk)return r.textContent?.trim()!=="";if(r.nodeType!==Nk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var ng=3,Hk=32,Yk=t(async(r,e,i)=>{let s=p(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",ue(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),d=e.width?Math.max(e.width-2*(e.padding??0),Hk):p().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,m=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),F=await ln(v,ee($a(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(F).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(F).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),x=Math.max(...m.map(({box:_})=>_.width),0),b=0;for(let{el:_,box:v}of m)_.attr("transform",`translate(${x/2-v.x-v.width/2}, ${b-v.y})`),b+=v.height+ng;let S=m.length>0?b-ng:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-x/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),lg=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"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Yk(r,e,i);let s,o=e.useHtmlLabels||$r(p()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",ue(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,m=await ln(c,ee($a(n),p()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||p().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},p()),x=(e?.padding??0)/2,b;if(o){let S=m.children[0],T=h(m);await fc(S),b=await hr.measure(()=>S.getBoundingClientRect()),b=lg(b,u),T.attr("width",b.width),T.attr("height",b.height)}else b=await hr.measure(()=>m.getBBox()),b=lg(b,u);if(o)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");else c.attr("transform","translate(0, "+-b.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:b,halfPadding:x,label:c}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??qt(p()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await ln(o,ee($a(e),p()),{useHtmlLabels:s,width:i.width||p()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(qt(p())){let d=a.children[0],f=h(a);n=await hr.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await hr.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:c,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"),Dt=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function oe(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(oe,"createPathFromPoints");function kr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,m=2*Math.PI/u,x=e+f/2;for(let b=0;b<=50;b++){let S=b/50,T=r+S*d,B=x+o*Math.sin(m*(T-r));c.push({x:T,y:B})}return c}t(kr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(Qe,"generateCirclePoints");function hc(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(hc,"mergePaths");var jk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=jk;function Mg(r,e){return r.intersect(e)}t(Mg,"intersectNode");var Uk=Mg;function Ag(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(Ag,"intersectEllipse");var Eg=Ag;function $g(r,e,i){return Eg(r,e,e,i)}t($g,"intersectCircle");var Xk=$g;function Ig(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&cc(n,d))return;let u=s.y-i.y,m=i.x-s.x,x=s.x*i.y-i.x*s.y,b=u*r.x+m*r.y+x,S=u*e.x+m*e.y+x;if(Math.abs(b)<0.000001&&Math.abs(S)<0.000001&&cc(b,S))return;let T=o*m-u*a;if(T===0)return;let B=(a*x-m*c)/T,_=(u*c-o*x)/T;return{x:B,y:_}}}t(Ig,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var Gk=Ig;function Og(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let m=e[u],x=e[u<e.length-1?u+1:0],b=Gk(r,i,{x:d+m.x,y:f+m.y},{x:d+x.x,y:f+x.y});if(b)a.push(b)}if(!a.length)return r;if(a.length>1)a.sort(function(u,m){let x=u.x-i.x,b=u.y-i.y,S=Math.sqrt(x*x+b*b),T=m.x-i.x,B=m.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(Og,"intersectPolygon");var Vk=Og,N={node:Uk,circle:Xk,ellipse:Eg,polygon:Vk,rect:Je},Me=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"),Kk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=p(),n=qt(c);return await ln(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ne=Kk;function Dg(r,e){let{labelStyles:i}=Q(e);e.labelStyle=i;let s=Dt(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=vt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),m=a.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",ue(n)),W(e,m),e.intersect=function(x){return l.info("Circle intersect",e,c,x),N.circle(e,c,x)},a}t(Dg,"anchor");function uc(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),m=(i-r)/2,x=(s-e)/2,b=m/o,S=x/a,T=Math.sqrt(b**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),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),F=Math.atan2((e-v)/a,(r-_)/o),O=Math.atan2((s-v)/a,(i-_)/o)-F;if(c&&O<0)O+=2*Math.PI;if(!c&&O>0)O-=2*Math.PI;let K=[];for(let Z=0;Z<20;Z++){let rt=Z/19,st=F+rt*O,ut=_+o*Math.cos(st),ct=v+a*Math.sin(st);K.push({x:ut,y:ct})}return K}t(uc,"generateArcPoints");function Pg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(Pg,"calculateArcSagitta");async function Rg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((st)=>st+c,"calcTotalHeight"),d=t((st)=>{let ut=st/2;return[ut/(2.5+st/50),ut]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await X(r,e,Dt(e)),m=n(e?.height?e?.height:u.height),[x,b]=d(m),S=Pg(m,x,b),B=(e?.width?e?.width:u.width)+a*2+S-S,_=m,{cssStyles:v}=e,F=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,x,b,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,x,b,!0)],I=y.svg(f),O=vt(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let K=oe(F),Z=I.path(K,O),rt=f.insert(()=>Z,":first-child");if(rt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")rt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(${x/2}, 0)`),W(e,rt),e.intersect=function(st){return N.polygon(e,F,st)},f}t(Rg,"bowTieRect");async function qg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,Dt(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),m=Math.max(Math.min(u*0.08,12),5),x=Math.max(c.height+f*2+m,e.height??0),b=-x/2+m,S=x/2,T=u*0.72,B=[`M${-u/2},${b}`,`L${-T/2},${S}`,`A${T/2},${m} 0 0 0 ${T/2},${S}`,`L${u/2},${b}`,`A${u/2},${m} 0 0 0 ${-u/2},${b}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let rt=y.svg(a).path(B,vt(e,{}));if(v.node()?.appendChild(rt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",b).attr("rx",u/2).attr("ry",m).attr("style",`fill:none;stroke:${d};stroke-width:1px`),W(e,v);let F=b+(S-b)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${F-c.height/2-(c.y-(c.top??0))})`);let I=12,O=t((Z,rt,st)=>Array.from({length:I+1},(ut,ct)=>{let nt=Math.PI-ct*Math.PI/I;return{x:Z*Math.cos(nt),y:rt+st*m*Math.sin(nt)}}),"arc"),K=[...O(u/2,b,-1),...O(T/2,S,1).reverse()];return e.intersect=function(Z){return N.polygon(e,K,Z)},a}t(qg,"bucket");var Jh=20,rc=8,Zk=80,Qk=8;function Ng(r){let{themeVariables:e}=p(),{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:Qk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(Ng,"getCollapsedStyle");async function zg(r,e){let i=Ng(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=Q(e),{shapeSvg:c,bbox:n}=await X(r,e,Dt(e)),{theme:d,themeVariables:f}=p();Yn(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,m=n.height,x=Math.max(n.width+u*2,Zk,e?.width??0),b=Math.max(m+rc+Jh+u*2,e?.height??0),S=-x/2,T=-b/2,B=-(rc+Jh)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??qt(p()))_.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(c),rt=vt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),st=Z.path(Me(S,T,x,b,i.rx),rt);v=c.insert(()=>st,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",ue(e.cssStyles))}else if(v=c.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",x).attr("height",b).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let F=T+u+m+rc;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",F).attr("x2",S+x-8).attr("y2",F).attr("stroke",o).attr("stroke-dasharray","3, 3");let I=F+Jh/2,O=2.5,K=10;for(let Z=-1;Z<=1;Z++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Z*K).attr("cy",I).attr("r",O).attr("fill",o);return W(e,v),e.calcIntersect=function(Z,rt){return N.rect(Z,rt)},e.intersect=function(Z){return N.rect(e,Z)},c}t(zg,"collapsedGroup");function tr(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(tr,"insertPolygonShape");var Jk=["right","left","up","down"],gc="point",t1=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"),e1=t((r)=>Jk.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),hg={"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}]},r1=t((r,e,i,s)=>{let o=t1(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=e1(o);return(hg[f]??hg[gc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function jg(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,Dt(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,m=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,x=r1(i.directions??[],o,i,m),b=tr(s,m,c,x);return b.attr("style",i.style??null),W(i,b),i.intersect=function(S){return N.polygon(i,x,S)},s}t(jg,"block_arrow");async function Ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,Dt(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let F=y.svg(a).path(Me(-x/2,S,x,b,m),vt(e,{}));if(B.node()?.appendChild(F),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("line").attr("x1",-x/2).attr("y1",S+u).attr("x2",x/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-x/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-x/2+44).attr("y",S+4).attr("width",Math.max(x-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(Ug,"browser");var na=12;async function Gg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+na),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),m=0,x=f,b=-u,S=0,T=[{x:m+na,y:b},{x,y:b},{x,y:S},{x:m,y:S},{x:m,y:b+na},{x:m+na,y:b}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),F=vt(e,{}),I=oe(T),O=v.path(I,F);if(B=n.insert(()=>O,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},n}t(Gg,"card");function Qg(r,e){let{nodeStyles:i}=Q(e);e.label="";let s=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=oe(c),u=n.path(f,d),m=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")m.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")m.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(x){return N.polygon(e,c,x)},s}t(Qg,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await X(r,e,Dt(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,m=e.look==="neo"?u+d*2:u+f,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=vt(e,{}),B=S.circle(0,0,m*2,T);x=a.insert(()=>B,":first-child"),x.attr("class","basic label-container").attr("style",ue(b))}else x=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0);return W(e,x),e.calcIntersect=function(S,T){let B=S.width/2;return N.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,m,S),N.circle(e,m,S)},a}t(mc,"circle");async function tm(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,m=i.positioned?-f/2:-a.width/2-c,x=i.positioned?-u/2:-a.height/2-c;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",m).attr("y",x).attr("width",f).attr("height",u),W(i,n),i.intersect=function(b){return N.rect(i,b)},o}t(tm,"composite");async function em(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,Dt(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let F=y.svg(a).path(Me(-x/2,S,x,b,m),vt(e,{}));if(B.node()?.appendChild(F),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("text").attr("x",-x/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(em,"consoleWindow");function rm(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},c={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 ${c.x},${c.y}`}t(rm,"createLine");function im(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=rm(a),m=n.path(u,d),x=o.insert(()=>f,":first-child");if(x.insert(()=>m),x.attr("class","outer-path"),c&&e.look!=="handDrawn")x.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")x.selectAll("path").attr("style",s);return W(e,x),e.intersect=function(b){return l.info("crossedCircle intersect",e,{radius:a,point:b}),N.circle(e,a,b)},o}t(im,"crossedCircle");function dr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(dr,"generateCirclePoints");async function om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...dr(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...dr(f/2+m*2,-m,m,20,-180,-270),...dr(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...dr(f/2,u/2,m,20,0,90)],S=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...dr(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...dr(f/2+f*0.1,-m,m,20,-180,-270),...dr(f/2+f*0.1,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...dr(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2,y:u/2+m}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),F=T.path(v,B),I=oe(S),O=T.path(I,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>O,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${m}, 0)`),c.attr("transform",`translate(${-f/2+m-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(om,"curlyBraceLeft");function fr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:b,y:S})}return c}t(fr,"generateCirclePoints");async function sm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90)],S=[{x:-f/2,y:-u/2-m},{x:f/2,y:-u/2-m},...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90),{x:f/2,y:u/2+m},{x:-f/2,y:u/2+m}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),F=T.path(v,B),I=oe(S),O=T.path(I,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>O,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${-m}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(sm,"curlyBraceRight");function we(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(we,"generateCirclePoints");async function am(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...we(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...we(f/2,u/2,m,20,0,90)],S=[...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],T=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...we(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...we(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2-m-m/2,y:u/2+m},...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],B=y.svg(o),_=vt(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let F=oe(b).replace("Z",""),I=B.path(F,_),K=oe(S).replace("Z",""),Z=B.path(K,_),rt=oe(T),st=B.path(rt,{..._}),ut=o.insert("g",":first-child");if(ut.insert(()=>st,":first-child").attr("stroke-opacity",0),ut.insert(()=>I,":first-child"),ut.insert(()=>Z,":first-child"),ut.attr("class","text"),x&&e.look!=="handDrawn")ut.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return ut.attr("transform",`translate(${m-m/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,T,ct)},o}t(am,"curlyBraces");async function nm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await X(r,e,Dt(e)),m=Math.max(d,u.height+c*2,e?.height??0),x=m/2,b=x-Math.sqrt(Math.max(0,x**2-(u.height/2)**2)),S=Math.max(m/4,b),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=T,I=m,O=F-x,K=I/4,Z=[{x:O,y:0},{x:K,y:0},{x:0,y:I/2},{x:K,y:I},{x:O,y:I},...Qe(-O,-I/2,x,50,270,90)],rt=oe(Z),st=_.path(rt,v),ut=f.insert(()=>st,":first-child");if(ut.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",s);return ut.attr("transform",`translate(${-T/2}, ${-m/2})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,Z,ct)},f}t(nm,"curvedTrapezoid");async function lm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,m=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),x=Math.min(d*0.177,m*0.45),b=m+2*f-u,S=-b/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let rt=y.svg(o),st=vt(e,{}),ut=rt.path(Me(-d/2,T,d,m,x),st),ct=rt.circle(0,S+f,f*2,st);if(B.insert(()=>ct,":first-child"),B.insert(()=>ut,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",m).attr("rx",x).attr("ry",x).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);W(e,B);let v=T+m/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let F=S+f,I=Math.asin(Math.min(1,(T-F)/f))*180/Math.PI,O=24,Z=[...Qe(0,-F,f,O,180+I,-I),...Qe(-(-d/2+x),-(T+x),x,12,90,0),...Qe(-(-d/2+x),-(b/2-x),x,12,360,270),...Qe(-(d/2-x),-(b/2-x),x,12,270,180),...Qe(-(d/2-x),-(T+x),x,12,180,90)];return e.intersect=function(rt){return N.polygon(e,Z,rt)},o}t(lm,"person");var i1=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"),o1=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"),s1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),cg=8,ug=8;async function hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<ug)e.width=ug}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<cg)e.height=cg}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,Dt(e)),m=Math.max(e.width??0,f.width)+c,x=m/2,b=x/(2.5+m/50),S=Math.max(e.height??0,f.height)+a+b,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=o1(0,0,m,S,x,b),F=s1(0,b,m,S,x,b),I=vt(e,{}),O=_.path(v,I),K=_.path(F,vt(e,{fill:"none"}));if(T=d.insert(()=>K,":first-child"),T=d.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=i1(0,0,m,S,x,b);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-m/2}, ${-(S/2+b)})`),W(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),F=v.x-(e.x??0);if(x!=0&&(Math.abs(F)<(e.width??0)/2||Math.abs(F)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let I=b*b*(1-F*F/(x*x));if(I>0)I=Math.sqrt(I);if(I=b-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},d}t(hm,"cylinder");async function mi(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await X(r,e,Dt(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,m,{rx:x,ry:b}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)x=i.rx,b=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=vt(e,{}),_=x||b?T.path(Me(f,u,n,d,x||0),B):T.rectangle(f,u,n,d,B);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",ue(S))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",o).attr("rx",ue(x)).attr("ry",ue(b)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return W(e,m,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return N.rect(T,B)},e.intersect=function(T){return N.rect(e,T)},a}t(mi,"drawRect");async function cm(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await mi(r,e,d);if(e.look==="handDrawn"){let b=y.svg(f),S=vt(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>b.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>b.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),m=(Number(u.attr("width"))||c)??0,x=(Number(u.attr("height"))||n)??0;if(m>0&&x>0)u.attr("stroke-dasharray",`${m} ${x}`);return f}t(cm,"datastore");async function um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=n.width+o,u=n.height+a,m=u*0.2,x=-f/2,b=-u/2-m/2,{cssStyles:S}=e,T=y.svg(c),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x,y:b+m},{x:-x,y:b+m},{x:-x,y:-b},{x,y:-b},{x,y:b},{x:-x,y:b},{x:-x,y:b+m}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),F=c.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")F.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return d.attr("transform",`translate(${x+(e.padding??0)/2-(n.x-(n.left??0))}, ${b+m+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,F),e.intersect=function(I){return N.rect(e,I)},c}t(um,"dividedRectangle");async function dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),m=u+o,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{roughness:0.2,strokeWidth:2.5}),B=vt(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,m*2,T),v=S.circle(0,0,u*2,B);x=n.insert("g",":first-child"),x.attr("class",ue(e.cssClasses)).attr("style",ue(b)),x.node()?.appendChild(_),x.node()?.appendChild(v)}else{x=n.insert("g",":first-child");let S=x.insert("circle",":first-child"),T=x.insert("circle");x.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return W(e,x),e.intersect=function(S){return l.info("DoubleCircle intersect",e,m,S),N.circle(e,m,S)},n}t(dm,"doublecircle");async function fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,e,Dt(e)),{theme:n,themeVariables:d}=p();Yn(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,m=a.height/2+f*2,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=vt(e,{}),B=S.ellipse(0,0,u*2,m*2,T);if(x=o.insert(()=>B,":first-child"),x.attr("class","basic label-container"),b)x.attr("style",b)}else x=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",m).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=m*2,W(e,x),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return N.ellipse(S,B,_,T)},e.intersect=function(S){return N.ellipse(e,u,m,S)},o}t(fm,"usecaseEllipse");function pm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=vt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let m=d.circle(0,0,c*2,u),x=a.insert(()=>m,":first-child");if(x.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")x.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")x.selectAll("path").attr("style",o);return W(e,x),e.intersect=function(b){return l.info("filledCircle intersect",e,{radius:c,point:b}),N.circle(e,c,b)},a}t(pm,"filledCircle");var dg=10,fg=10;async function gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(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<dg)e.height=dg;if(e.width=(e?.width??0)-a-a/2,e.width<fg)e.width=fg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,m=u,x=[{x:0,y:-u},{x:m,y:-u},{x:m/2,y:0}],{cssStyles:b}=e,S=y.svg(c),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=oe(x),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,W(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(F){return l.info("Triangle intersect",e,x,F),N.polygon(e,x,F)},c}t(gm,"flippedTriangle");async function mm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),m=Math.max(f+u,e.height??0),x=m-u,b=Math.max(d*0.38,28),S=-m/2,T=[{x:-d/2,y:S},{x:-d/2+b,y:S},{x:-d/2+b,y:S+u},{x:d/2,y:S+u},{x:d/2,y:m/2},{x:-d/2,y:m/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((I)=>`L${I.x},${I.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let O=y.svg(o).path(B,vt(e,{}));if(v=o.insert(()=>O,":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")W(e,v);else W(e,v,{width:d,height:m});let F=S+u+x/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${F-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(I){return N.polygon(e,T,I)},o}t(mm,"folder");function ym(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=Q(e);e.label="";let c=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,m=-1*f/2,x=y.svg(c),b=vt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let S=x.rectangle(u,m,d,f,b),T=c.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);W(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 N.rect(e,_)},c}t(ym,"forkJoin");async function xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=15,a=10,c=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)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await X(r,e,Dt(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,m=u/2,x=m-Math.sqrt(Math.max(0,m**2-(f.height/2)**2)),b=(e?.width?e?.width:Math.max(o,f.width)+x*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-b/2,y:-u/2},{x:b/2-m,y:-u/2},...Qe(-b/2+m,0,m,50,90,270),{x:b/2-m,y:u/2},{x:-b/2,y:u/2}],v=oe(_),F=T.path(v,B),I=d.insert(()=>F,":first-child");if(I.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")I.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return W(e,I),e.intersect=function(O){return l.info("Pill intersect",e,{radius:m,point:O}),N.polygon(e,_,O)},d}t(xm,"halfRoundedRectangle");var a1=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 Cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let F=(e.height??0)/o;e.width=(e?.width??0)-2*F-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:m}=await X(r,e,Dt(e)),x=(e?.height?e?.height:m.height)+d,b=x/o,S=(e?.width?e?.width:m.width)+2*b+f,T=[{x:b,y:0},{x:S-b,y:0},{x:S,y:-x/2},{x:S-b,y:-x},{x:b,y:-x},{x:0,y:-x/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),F=vt(e,{}),I=a1(0,0,S,x,b),O=v.path(I,F);if(B=u.insert(()=>O,":first-child").attr("transform",`translate(${-S/2}, ${x/2})`),_)B.attr("style",_)}else B=tr(u,S,x,T);if(s)B.attr("style",s);return e.width=S,e.height=x,W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},u}t(Cm,"hexagon");async function bm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,Dt(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=vt(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],m=oe(u),x=d.path(m,f),b=o.insert(()=>x,":first-child");if(b.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")b.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")b.selectChildren("path").attr("style",s);return b.attr("transform",`translate(${-a/2}, ${-c/2})`),W(e,b),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),N.polygon(e,u,S)},o}t(bm,"hourglass");async function km(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=e.pos==="t",b=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ge(e),_=-S/2,v=-b/2,F=e.label?8:0,I=y.svg(f),O=vt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let K=I.rectangle(_,v,S,b,O),Z=Math.max(S,u.width),rt=b+u.height+F,st=I.rectangle(-Z/2,-rt/2,Z,rt,{...O,fill:"transparent",stroke:"none"}),ut=f.insert(()=>K,":first-child"),ct=f.insert(()=>st);if(e.icon){let nt=f.append("g");nt.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let D=nt.node().getBBox(),{width:U,height:it,x:P,y:ht}=D;nt.attr("transform",`translate(${-U/2-P},${x?u.height/2+F/2-it/2-ht:-u.height/2-F/2-it/2-ht})`),nt.attr("style",`color: ${B.get("stroke")??T};`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${x?-rt/2:rt/2-u.height})`),ut.attr("transform",`translate(0,${x?u.height/2+F/2:-u.height/2-F/2})`),W(e,ct),e.intersect=function(nt){if(l.info("iconSquare intersect",e,nt),!e.label)return N.rect(e,nt);let D=e.x??0,U=e.y??0,it=e.height??0,P=[];if(x)P=[{x:D-u.width/2,y:U-it/2},{x:D+u.width/2,y:U-it/2},{x:D+u.width/2,y:U-it/2+u.height+F},{x:D+S/2,y:U-it/2+u.height+F},{x:D+S/2,y:U+it/2},{x:D-S/2,y:U+it/2},{x:D-S/2,y:U-it/2+u.height+F},{x:D-u.width/2,y:U-it/2+u.height+F}];else P=[{x:D-S/2,y:U-it/2},{x:D+S/2,y:U-it/2},{x:D+S/2,y:U-it/2+b},{x:D+u.width/2,y:U-it/2+b},{x:D+u.width/2/2,y:U+it/2},{x:D-u.width/2,y:U+it/2},{x:D-u.width/2,y:U-it/2+b},{x:D-S/2,y:U-it/2+b}];return N.polygon(e,P,nt)},f}t(km,"icon");async function wm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=20,b=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ge(e),v=y.svg(f),F=vt(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let I=_.get("fill");F.stroke=I??B;let O=f.append("g");if(e.icon)O.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let K=O.node().getBBox(),{width:Z,height:rt,x:st,y:ut}=K,ct=Math.max(Z,rt)*Math.SQRT2+x*2,nt=v.circle(0,0,ct,F),D=Math.max(ct,u.width),U=ct+u.height+b,it=v.rectangle(-D/2,-U/2,D,U,{...F,fill:"transparent",stroke:"none"}),P=f.insert(()=>nt,":first-child"),ht=f.insert(()=>it);return O.attr("transform",`translate(${-Z/2-st},${S?u.height/2+b/2-rt/2-ut:-u.height/2-b/2-rt/2-ut})`),O.attr("style",`color: ${_.get("stroke")??T};`),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-U/2:U/2-u.height})`),P.attr("transform",`translate(0,${S?u.height/2+b/2:-u.height/2-b/2})`),W(e,ht),e.intersect=function(lt){return l.info("iconSquare intersect",e,lt),N.rect(e,lt)},f}t(wm,"iconCircle");async function Sm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ge(e),F=-T/2,I=-S/2,O=e.label?8:0,K=y.svg(f),Z=vt(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let rt=v.get("fill");Z.stroke=rt??_;let st=K.path(Me(F,I,T,S,5),Z),ut=Math.max(T,u.width),ct=S+u.height+O,nt=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>st,":first-child").attr("class","icon-shape2"),U=f.insert(()=>nt);if(e.icon){let it=f.append("g");it.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=it.node().getBBox(),{width:ht,height:lt,x:Bt,y:At}=P;it.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+O/2-lt/2-At:-u.height/2-O/2-lt/2-At})`),it.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),D.attr("transform",`translate(0,${b?u.height/2+O/2:-u.height/2-O/2})`),W(e,U),e.intersect=function(it){if(l.info("iconSquare intersect",e,it),!e.label)return N.rect(e,it);let P=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:P-u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht+lt/2},{x:P-T/2,y:ht+lt/2},{x:P-T/2,y:ht-lt/2+u.height+O},{x:P-u.width/2,y:ht-lt/2+u.height+O}];else Bt=[{x:P-T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2+S},{x:P+u.width/2,y:ht-lt/2+S},{x:P+u.width/2/2,y:ht+lt/2},{x:P-u.width/2,y:ht+lt/2},{x:P-u.width/2,y:ht-lt/2+S},{x:P-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,it)},f}t(Sm,"iconRounded");async function Tm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ge(e),F=-T/2,I=-S/2,O=e.label?8:0,K=y.svg(f),Z=vt(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let rt=v.get("fill");Z.stroke=rt??_;let st=K.path(Me(F,I,T,S,0.1),Z),ut=Math.max(T,u.width),ct=S+u.height+O,nt=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>st,":first-child"),U=f.insert(()=>nt);if(e.icon){let it=f.append("g");it.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=it.node().getBBox(),{width:ht,height:lt,x:Bt,y:At}=P;it.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+O/2-lt/2-At:-u.height/2-O/2-lt/2-At})`),it.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),D.attr("transform",`translate(0,${b?u.height/2+O/2:-u.height/2-O/2})`),W(e,U),e.intersect=function(it){if(l.info("iconSquare intersect",e,it),!e.label)return N.rect(e,it);let P=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:P-u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht+lt/2},{x:P-T/2,y:ht+lt/2},{x:P-T/2,y:ht-lt/2+u.height+O},{x:P-u.width/2,y:ht-lt/2+u.height+O}];else Bt=[{x:P-T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2+S},{x:P+u.width/2,y:ht-lt/2+S},{x:P+u.width/2/2,y:ht+lt/2},{x:P-u.width/2,y:ht+lt/2},{x:P-u.width/2,y:ht-lt/2+S},{x:P-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,it)},f}t(Tm,"iconSquare");async function Bm(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:c}=Q(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:m,bbox:x,label:b}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(m),F=vt(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let I=v.rectangle(T,B,f,u,F),O=Math.max(f,x.width),K=u+x.height+_,Z=v.rectangle(-O/2,-K/2,O,K,{...F,fill:"none",stroke:"none"}),rt=m.insert(()=>I,":first-child"),st=m.insert(()=>Z);if(e.img){let ut=m.append("image");ut.attr("href",e.img),ut.attr("width",f),ut.attr("height",u),ut.attr("preserveAspectRatio","none"),ut.attr("transform",`translate(${-f/2},${S?K/2-u:-K/2})`)}return b.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${S?-u/2-x.height/2-_/2:u/2-x.height/2+_/2})`),rt.attr("transform",`translate(0,${S?x.height/2+_/2:-x.height/2-_/2})`),W(e,st),e.intersect=function(ut){if(l.info("iconSquare intersect",e,ut),!e.label)return N.rect(e,ut);let ct=e.x??0,nt=e.y??0,D=e.height??0,U=[];if(S)U=[{x:ct-x.width/2,y:nt-D/2},{x:ct+x.width/2,y:nt-D/2},{x:ct+x.width/2,y:nt-D/2+x.height+_},{x:ct+f/2,y:nt-D/2+x.height+_},{x:ct+f/2,y:nt+D/2},{x:ct-f/2,y:nt+D/2},{x:ct-f/2,y:nt-D/2+x.height+_},{x:ct-x.width/2,y:nt-D/2+x.height+_}];else U=[{x:ct-f/2,y:nt-D/2},{x:ct+f/2,y:nt-D/2},{x:ct+f/2,y:nt-D/2+u},{x:ct+x.width/2,y:nt-D/2+u},{x:ct+x.width/2/2,y:nt+D/2},{x:ct-x.width/2,y:nt+D/2},{x:ct-x.width/2,y:nt-D/2+u},{x:ct-f/2,y:nt-D/2+u}];return N.polygon(e,U,ut)},m}t(Bm,"imageSquare");async function _m(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),m=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(_m,"inv_trapezoid");async function vm(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),c=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(d){return N.rect(e,d)},i}t(vm,"labelRect");async function Lm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Lm,"lean_left");async function Fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Fm,"lean_right");function Mm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),m=vt(e,{});if(e.look!=="handDrawn")m.roughness=0,m.fillStyle="solid";let x=oe(f),b=u.path(x,m),S=o.insert(()=>b,":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(-${c/2},${-n})`),W(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),N.polygon(e,f,T)},o}t(Mm,"lightningBolt");var n1=t((r,e,i,s,o,a,c)=>[`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+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),l1=t((r,e,i,s,o,a,c)=>[`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+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),h1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),pg=10,gg=10;async function Am(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<gg)e.width=gg;let F=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-F*3,e.height<pg)e.height=pg}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=(e?.width?e?.width:d.width)+a*2,m=u/2,x=m/(2.5+u/50),b=(e?.height?e?.height:d.height)+x+c*2,S=b*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=l1(0,0,u,b,m,x,S),F=h1(0,x,u,b,m,x),I=vt(e,{}),O=_.path(v,I),K=_.path(F,I);if(n.insert(()=>K,":first-child").attr("class","line"),T=n.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=n1(0,0,u,b,m,x,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-u/2}, ${-(b/2+x)})`),W(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),F=v.x-(e.x??0);if(m!=0&&(Math.abs(F)<(e.width??0)/2||Math.abs(F)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let I=x*x*(1-F*F/(m*m));if(I>0)I=Math.sqrt(I);if(I=x-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},n}t(Am,"linedCylinder");async function Em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let I=e.width;if(e.width=(I??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,m=(e?.height?e?.height:d.height)+(c??0)*2,x=e.look==="neo"?m/4:m/8,b=m+x,{cssStyles:S}=e,T=y.svg(n),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:b/2},...kr(-u/2-u/2*0.1,b/2,u/2+u/2*0.1,b/2,x,0.8),{x:u/2+u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2,y:-b/2},{x:-u/2,y:b/2*1.1},{x:-u/2,y:-b/2}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),F=n.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")F.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return F.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-m/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,F),e.intersect=function(I){return N.polygon(e,_,I)},n}t(Em,"linedWaveEdgedRect");var c1=56,ic=72,mg=8,yg=2,u1=8,d1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},xg=Math.PI/3,Cg=0.6,oc=t((r,e)=>{let i=e*Cg,s=e*Math.sqrt(1-Cg**2),o=Math.cos(xg),a=-Math.sin(xg),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),f1={normal:oc(-24,12),hollow:oc(-23,9),awesome:oc(-21,13),icon:"M 12 -8 L 26 -26"},bg=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"),yc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,vt(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"),p1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,vt(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var g1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",f1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Fo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=Q(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await X(r,c,Dt(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:m,themeVariables:x}=p();Yn(n,e.colorIndex,m,x.borderColorArray);let b,S;if(e.stereotype){let rt=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=rt.label.attr("class","label usecase-stereotype"),S=rt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${d1[i]}`).attr("style",a||null);await s(T,e),g1(T,e,i);let B=e.padding??u1,_=S?.height??0,v=ic+mg+d.height+(S?_+yg:0),F=Math.max(c1,d.width,S?.width??0)+B*2,I=v+B*2,O=-v/2;T.attr("transform",`translate(0,${O+ic/2})`);let K=O+ic+mg;if(b&&S)K+=_/2,bg(b,S,K),K+=_/2+yg;bg(f,d,K+d.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-F/2).attr("y",-I/2).attr("width",F).attr("height",I).attr("opacity",0).attr("aria-hidden","true");return W(e,Z),e.intersect=(rt)=>N.rect(e,rt),n}t(Fo,"renderUsecaseActor");var m1=["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 $m(r,e){return Fo(r,e,"normal",(i,s)=>{yc(i,s,m1,"usecase-actor-stick")})}t($m,"usecaseActor");var y1=["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 Im(r,e){return Fo(r,e,"awesome",(i,s)=>{yc(i,s,y1,"usecase-actor-awesome-silhouette")})}t(Im,"usecaseActorAwesome");var x1=["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 Om(r,e){return Fo(r,e,"hollow",(i,s)=>{p1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),yc(i,s,x1,"usecase-actor-hollow-body",!0)})}t(Om,"usecaseActorHollow");var di=52,kg=42,wg=-2,C1=t(async(r,e)=>{let i=-di/2,s=wg-di/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,di,di,vt(e,{}));r.insert(()=>u,":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",di).attr("height",di).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Fs(o.includes(":")?o:`fa:${o}`),c=await ur(o,{height:kg,width:kg,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${wg-d.height/2-d.y})`)},"drawIconActor");async function Dm(r,e){return Fo(r,e,"icon",C1)}t(Dm,"usecaseActorIcon");var Sg=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 Pm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await X(r,a,Dt(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:m}=p();Yn(c,e.colorIndex,u,m.borderColorArray);let x,b;if(i.stereotype){let D=await Ir(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=D.label.attr("class","label usecase-stereotype"),b=D.bbox}let S=b?2:0,T=n.height+(b?.height??0)+S,B=Math.max(n.width,b?.width??0),_=d??10,v=B/2+_*2,F=T/2+_*2,I=Math.min(Math.max(_/5,1),_/2),O=B/2+I,K=v-I,Z=O/v,rt=K/v,st=F*Math.sqrt(Math.max(0,1-Z*Z)),ut=-F*Math.sqrt(Math.max(0,1-rt*rt));if(x&&b)Sg(x,b,-T/2+b.height/2);Sg(f,n,T/2-n.height/2);let ct;if(e.look==="handDrawn"){let U=y.svg(c).ellipse(0,0,v*2,F*2,vt(e,{}));ct=c.insert(()=>U,":first-child").attr("class","basic label-container usecase-business-ellipse")}else ct=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",F).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${O} ${st} L ${K} ${ut}`).attr("fill","none").attr("style",o||null);let nt=i.accessibleName??i.label;if(nt)c.attr("role","img").attr("aria-label",nt);return W(e,ct),e.calcIntersect=(D,U)=>N.ellipse(D,D.width/2,D.height/2,U),e.intersect=(D)=>N.ellipse(e,v,F,D),c}t(Pm,"usecaseBusiness");var sc=8,Tg=4,b1=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"),k1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:b1},"numericStrokeWidth");async function Rm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e),{stylesMap:a}=Ge(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let D of i.jsonRows??[]){let U=await Ir(f,D.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),it=await Ir(f,D.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:U.label.attr("class","label usecase-json-key"),bbox:U.bbox},value:{label:it.label.attr("class","label usecase-json-value"),bbox:it.bbox}})}let m=Math.max(0,...u.map(({key:D})=>D.bbox.width))+sc*2,x=Math.max(0,...u.map(({value:D})=>D.bbox.width))+sc*2,b=n.width+sc*2,S=Math.max(b,m+x),T=x+Math.max(0,S-m-x),B=n.height+Tg*2,_=u.map(({key:D,value:U})=>Math.max(D.bbox.height,U.bbox.height)+Tg*2),v=B+_.reduce((D,U)=>D+U,0),F=k1(a.get("stroke-width")),I=S+F*2,O=v+F*2,K=-S/2,Z=-v/2,rt=e.look==="handDrawn"?y.svg(c):void 0,st=rt?vt(e,{}):void 0,ut=t((D,U,it,P,ht,lt)=>{if(rt&&st){let Bt=rt.rectangle(it,P,ht,lt,st);return D.insert(()=>Bt,":first-child").attr("class",U)}return D.insert("rect",":first-child").attr("class",U).attr("x",it).attr("y",P).attr("width",ht).attr("height",lt).attr("style",o)},"insertCell"),ct=ut(c,"label-container usecase-json-border",-I/2,-O/2,I,O);ut(f,"usecase-json-cell usecase-json-title-cell",K,Z,S,B),f.node()?.append(d.node()),ac(d,n,0,Z+B/2);let nt=Z+B;return u.forEach(({key:D,value:U},it)=>{let P=_[it],ht=f.append("g").attr("class","usecase-json-row").attr("data-row-index",it).attr("transform",`translate(0,${nt})`);ut(ht,"usecase-json-cell usecase-json-key-cell",K,0,m,P),ut(ht,"usecase-json-cell usecase-json-value-cell",K+m,0,T,P),ht.node()?.append(D.label.node(),U.label.node()),ac(D.label,D.bbox,K+m/2,P/2),ac(U.label,U.bbox,K+m+T/2,P/2),nt+=P}),W(e,ct),e.intersect=(D)=>N.rect(e,D),c}t(Rm,"usecaseJsonTable");async function qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await X(r,e,Dt(e)),m=(e?.width?e?.width:f.width)+a*2+2*n,x=(e?.height?e?.height:f.height)+c*2+2*n,b=m-2*n,S=x-2*n,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),F=vt(e,{}),I=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+b-n,y:B+S+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B+S-n},{x:T+b+n,y:B+S-n},{x:T+b+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],O=[{x:T,y:B+n},{x:T+b-n,y:B+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B},{x:T,y:B}];if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let K=oe(I),Z=v.path(K,F),rt=oe(O),st=v.path(rt,F);if(e.look!=="handDrawn")Z=hc(Z),st=hc(st);let ut=d.insert("g",":first-child");if(ut.insert(()=>Z),ut.insert(()=>st),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,I,ct)},d}t(qm,"multiRect");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let m=Math.max(a.width,e?.width??0)+d*2,x=Math.max(a.height,e?.height??0)+f*3,b=e.look==="neo"?x/4:x/8,S=x+(u?b/2:-b/2),T=-m/2,B=-S/2,_=10,{cssStyles:v}=e,F=kr(T-_,B+S+_,T+m-_,B+S+_,b,0.8),I=F?.[F.length-1],O=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...F,{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:I.y-2*_},{x:T+m+_,y:I.y-2*_},{x:T+m+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],K=[{x:T,y:B+_},{x:T+m-_,y:B+_},{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:B},{x:T,y:B}],Z=y.svg(o),rt=vt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let st=oe(O),ut=Z.path(st,rt),ct=oe(K),nt=Z.path(ct,rt),D=o.insert(()=>ut,":first-child");if(D.insert(()=>nt),D.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")D.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return D.attr("transform",`translate(0,${-b/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-b-(a.y-(a.top??0))})`),W(e,D),e.intersect=function(U){return N.polygon(e,O,U)},o}t(Wm,"multiWaveEdgedRectangle");async function Nm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);if(e.labelStyle=s,!(e.useHtmlLabels||qt(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=-f/2,x=-u/2,{cssStyles:b}=e,S=y.svg(c),T=vt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(m,x,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),b&&e.look!=="handDrawn")_.selectAll("path").attr("style",b);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,_),e.intersect=function(v){return N.rect(e,v)},c}t(Nm,"note");var w1=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 zm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,Dt(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],m,{cssStyles:x}=e;if(e.look==="handDrawn"){let b=y.svg(o),S=vt(e,{}),T=w1(0,0,d),B=b.path(T,S);if(m=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x)m.attr("style",x)}else m=tr(o,d,d,u),m.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)m.attr("style",s);return W(e,m),e.calcIntersect=function(b,S){let T=b.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return N.polygon(b,B,S)},e.intersect=function(b){return this.calcIntersect(e,b)},o}t(zm,"question");async function Hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=d.width+(e.look==="neo"?a*2:a),m=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),x=m/4,S=-Math.max(u,(e.width??0)-x)/2,T=-m/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,F=y.svg(n),I=vt(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=oe(_),K=F.path(O,I),Z=n.insert(()=>K,":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)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,Z),e.intersect=function(rt){return N.polygon(e,_,rt)},n}t(Hm,"rect_left_inv_arrow");async function Ym(r,e){let{labelStyles:i,nodeStyles:s}=Q(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),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await Ne(n,f,e.labelStyle,!0,!0),m={width:0,height:0};if(qt(p())){let rt=u.children[0],st=h(u);m=rt.getBoundingClientRect(),st.attr("width",m.width),st.attr("height",m.height)}l.info("Text 2",d);let x=d||[],b=u.getBBox(),S=await Ne(n,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),T=S.children[0],B=h(S);m=T.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+_+5)+")"),h(u).attr("transform","translate( "+(m.width<b.width?0:-(b.width-m.width)/2)+", 0)"),m=n.node().getBBox(),n.attr("transform","translate("+-m.width/2+", "+(-m.height/2-_+3)+")");let v=m.width+(e.padding||0),F=m.height+(e.padding||0),I=-m.width/2-_,O=-m.height/2-_,K,Z;if(e.look==="handDrawn"){let rt=y.svg(a),st=vt(e,{}),ut=rt.path(Me(I,O,v,F,e.rx||0),st),ct=rt.line(-m.width/2-_,-m.height/2-_+b.height+_,m.width/2+_,-m.height/2-_+b.height+_,st);Z=a.insert(()=>(l.debug("Rough node insert CXC",ut),ct),":first-child"),K=a.insert(()=>(l.debug("Rough node insert CXC",ut),ut),":first-child")}else K=c.insert("rect",":first-child"),Z=c.insert("line"),K.attr("class","outer title-state").attr("style",s).attr("x",-m.width/2-_).attr("y",-m.height/2-_).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-m.width/2-_).attr("x2",m.width/2+_).attr("y1",-m.height/2-_+b.height+_).attr("y2",-m.height/2-_+b.height+_);return W(e,K),e.intersect=function(rt){return N.rect(e,rt)},a}t(Ym,"rectWithTitle");async function jm(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 mi(r,e,o)}t(jm,"roundedRect");var Er=8;async function Um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,m=f-Er,x=u,b=Er-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=vt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:b,y:S},{x:b+m,y:S},{x:b+m,y:S+x},{x:b-Er,y:S+x},{x:b-Er,y:S},{x:b,y:S},{x:b,y:S+x}],F=B.polygon(v.map((O)=>[O.x,O.y]),_),I=c.insert(()=>F,":first-child");if(I.attr("class","basic label-container outer-path").attr("style",ue(T)),s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,I),e.intersect=function(O){return N.rect(e,O)},c}t(Um,"shadedProcess");async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=(e?.width?e?.width:d.width)+a*2,m=((e?.height?e?.height:d.height)+c*2)*1.5,x=u,b=m/1.5,S=-x/2,T=-b/2,{cssStyles:B}=e,_=y.svg(n),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=[{x:S,y:T},{x:S,y:T+b},{x:S+x,y:T+b},{x:S+x,y:T-b/2}],I=oe(F),O=_.path(I,v),K=n.insert(()=>O,":first-child");if(K.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")K.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return K.attr("transform",`translate(0, ${b/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(d.x-(d.left??0))}, ${-b/4+(e.padding??0)-(d.y-(d.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,F,Z)},n}t(Xm,"slopedRect");async function Gm(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},c=await mi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=p();Yn(c,e.colorIndex,n,d.borderColorArray)}return c}t(Gm,"squareRect");var dc=50,S1=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 Vm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),{w:f,h:u}=S1(d,a,c),m=u/2,{cssStyles:x}=e,b=y.svg(n),S=vt(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+m,y:-u/2},{x:f/2-m,y:-u/2},...Qe(-f/2+m,0,m,dc,90,270),{x:f/2-m,y:u/2},...Qe(f/2-m,0,m,dc,270,450)],B=oe(T),_=b.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return W(e,v),e.intersect=function(F){return N.polygon(e,T,F)},n}t(Vm,"stadium");async function Km(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return mi(r,e,i)}t(Km,"state");function Zm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=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 u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),m=y.svg(u),x=vt(e,{});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let b=m.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=m.circle(0,0,T,{...x,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>b,":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&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",F=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${F})`)}return W(e,_),e.intersect=function(v){return N.circle(e,(e.width??0)/2,v)},u}t(Zm,"stateEnd");function Qm(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),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,Pd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.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??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return W(e,c),e.intersect=function(n){return N.circle(e,(e.width??7)/2,n)},a}t(Qm,"stateStart");var fi=8;async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.width+2*fi+a,e.width??0),u=Math.max(d.height+c,e.height??0),m=f-2*fi,x=u,b=-f/2,S=-u/2,T=[{x:0,y:0},{x:m,y:0},{x:m,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=vt(e,{}),v=B.rectangle(b,S,m+16,x,_),F=B.line(b+fi,S,b+fi,S+x,_),I=B.line(b+fi+m,S,b+fi+m,S+x,_);n.insert(()=>F,":first-child"),n.insert(()=>I,":first-child");let O=n.insert(()=>v,":first-child"),{cssStyles:K}=e;O.attr("class","basic label-container").attr("style",ue(K)),W(e,O)}else{let B=tr(n,m,x,T);if(s)B.attr("style",s);W(e,B)}return e.intersect=function(B){return N.polygon(e,T,B)},n}t(Jm,"subroutine");var lc=0.2;async function ty(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-lc*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=(e?.height?e?.height:d.height)+c*2,u=lc*f,m=lc*f,b=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),F=vt(e,{}),I=[{x:T-u/2,y:B},{x:T+b+u/2,y:B},{x:T+b+u/2,y:B+S},{x:T-u/2,y:B+S}],O=[{x:T+b-u/2,y:B+S},{x:T+b+u/2,y:B+S},{x:T+b+u/2,y:B+S-m}];if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let K=oe(I),Z=v.path(K,F),rt=oe(O),st=v.path(rt,{...F,fillStyle:"solid"}),ut=n.insert(()=>st,":first-child");if(ut.insert(()=>Z,":first-child"),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return W(e,ut),e.intersect=function(ct){return N.polygon(e,I,ct)},n}t(ty,"taggedRect");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,m=0.2*d,x=d+f,{cssStyles:b}=e,S=y.svg(o),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:x/2},...kr(-n/2-n/2*0.1,x/2,n/2+n/2*0.1,x/2,f,0.8),{x:n/2+n/2*0.1,y:-x/2},{x:-n/2-n/2*0.1,y:-x/2}],_=-n/2+n/2*0.1,v=-x/2-m*0.4,F=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-m},{x:_+n,y:(v+d)*0.9},...kr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],I=oe(B),O=S.path(I,T),K=oe(F),Z=S.path(K,{...T,fillStyle:"solid"}),rt=o.insert(()=>Z,":first-child");if(rt.insert(()=>O,":first-child"),rt.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")rt.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),W(e,rt),e.intersect=function(st){return N.polygon(e,B,st)},o}t(ey,"taggedWaveEdgedRectangle");async function ry(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,Dt(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),W(e,u),e.intersect=function(m){return N.rect(e,m)},o}t(ry,"text");var T1=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"),A1=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"),E1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function hy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Bg)e.height=Bg}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<_g)e.width=_g}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,$t(e)),u=Math.max(e.height??0,d.height)+a,m=u/2,x=m/(2.5+u/50),b=Math.max(e.width??0,d.width)+x+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=A1(0,0,b,u,x,m),v=E1(0,0,b,u,x,m),F=B.path(_,_t(e,{})),I=B.path(v,_t(e,{fill:"none"}));if(T=n.insert(()=>I,":first-child"),T=n.insert(()=>F,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=M1(0,0,b,u,x,m);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",ue(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",x),T.attr("transform",`translate(${-b/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-x-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,T),e.intersect=function(B){let _=N.rect(e,B),v=_.y-(e.y??0);if(m!=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-x)){let F=x*x*(1-v*v/(m*m));if(F!=0)F=Math.sqrt(Math.abs(F));if(F=x-F,B.x-(e.x??0)>0)F=-F;_.x+=F}return _},n}t(hy,"tiltedCylinder");async function cy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(cy,"trapezoid");async function uy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=15,d=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<d)e.height=d;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:f,bbox:u}=await X(r,e,$t(e)),m=(e?.width?e?.width:u.width)+a*2,x=(e?.height?e?.height:u.height)+c*2,{cssStyles:b}=e,S=y.svg(f),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-m/2*0.8,y:-x/2},{x:m/2*0.8,y:-x/2},{x:m/2,y:-x/2*0.6},{x:m/2,y:x/2},{x:-m/2,y:x/2},{x:-m/2,y:-x/2*0.6}],_=oe(B),v=S.path(_,T),F=f.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")F.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")F.selectChildren("path").attr("style",s);return W(e,F),e.intersect=function(I){return N.polygon(e,B,I)},f}t(uy,"trapezoidalPentagon");var vg=10,Lg=10;async function dy(r,e){let{labelStyles:i,nodeStyles:s}=Q(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<Lg)e.width=Lg;if(e.height=e?.height??0,e.height<vg)e.height=vg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e)),f=Or(p().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,m=e?.height?e?.height:u+n.height,x=m,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-m}],{cssStyles:S}=e,T=y.svg(c),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=oe(b),v=T.path(_,B),F=c.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")F.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectChildren("path").attr("style",s);return e.width=u,e.height=m,W(e,F),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(f?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(I){return l.info("Triangle intersect",e,b,I),N.polygon(e,b,I)},c}t(dy,"triangle");async function fy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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)-c*2,e.height<10)e.height=10}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,$t(e)),m=(e?.width?e?.width:f.width)+(a??0)*2,x=(e?.height?e?.height:f.height)+(c??0)*2,b=e.look==="neo"?x/4:x/8,S=x+(n?b:-b),{cssStyles:T}=e,_=14-m,v=_>0?_/2:0,F=y.svg(d),I=_t(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=[{x:-m/2-v,y:S/2},...kr(-m/2-v,S/2,m/2+v,S/2,b,0.8),{x:m/2+v,y:-S/2},{x:-m/2-v,y:-S/2}],K=oe(O),Z=F.path(K,I),rt=d.insert(()=>Z,":first-child");if(rt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")rt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(0,${-b/2})`),u.attr("transform",`translate(${-m/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-b-(f.y-(f.top??0))})`),W(e,rt),e.intersect=function(st){return N.polygon(e,O,st)},d}t(fy,"waveEdgedRectangle");async function py(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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 I=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-I*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:d}=await X(r,e,$t(e)),f=(e?.width?e?.width:d.width)+a*2,u=(e?.height?e?.height:d.height)+c,m=u/8,x=u+m*2,{cssStyles:b}=e,S=y.svg(n),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2,y:x/2},...kr(-f/2,x/2,f/2,x/2,m,1),{x:f/2,y:-x/2},...kr(f/2,-x/2,-f/2,-x/2,m,-1)],_=oe(B),v=S.path(_,T),F=n.insert(()=>v,":first-child");if(F.attr("class","basic label-container"),b&&e.look!=="handDrawn")F.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return W(e,F),e.intersect=function(I){return N.polygon(e,B,I)},n}t(py,"waveRectangle");var pe=10;async function gy(r,e){let{labelStyles:i,nodeStyles:s}=Q(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-pe,10),e.height=Math.max((e?.height??0)-a*2-pe,10);let{shapeSvg:c,bbox:n,label:d}=await X(r,e,$t(e)),f=(e?.width?e?.width:n.width)+o*2+pe,u=(e?.height?e?.height:n.height)+a*2+pe,m=f-pe,x=u-pe,b=-m/2,S=-x/2,{cssStyles:T}=e,B=y.svg(c),_=_t(e,{}),v=[{x:b-pe,y:S-pe},{x:b-pe,y:S+x},{x:b+m,y:S+x},{x:b+m,y:S-pe}],F=`M${b-pe},${S-pe} L${b+m},${S-pe} L${b+m},${S+x} L${b-pe},${S+x} L${b-pe},${S-pe}
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"),_1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function iy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Bg)e.height=Bg}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<_g)e.width=_g}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=Math.max(e.height??0,d.height)+a,m=u/2,x=m/(2.5+u/50),b=Math.max(e.width??0,d.width)+x+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=B1(0,0,b,u,x,m),v=_1(0,0,b,u,x,m),F=B.path(_,vt(e,{})),I=B.path(v,vt(e,{fill:"none"}));if(T=n.insert(()=>I,":first-child"),T=n.insert(()=>F,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=T1(0,0,b,u,x,m);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",ue(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",x),T.attr("transform",`translate(${-b/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-x-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,T),e.intersect=function(B){let _=N.rect(e,B),v=_.y-(e.y??0);if(m!=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-x)){let F=x*x*(1-v*v/(m*m));if(F!=0)F=Math.sqrt(Math.abs(F));if(F=x-F,B.x-(e.x??0)>0)F=-F;_.x+=F}return _},n}t(iy,"tiltedCylinder");async function oy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(oy,"trapezoid");async function sy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=15,d=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<d)e.height=d;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:f,bbox:u}=await X(r,e,Dt(e)),m=(e?.width?e?.width:u.width)+a*2,x=(e?.height?e?.height:u.height)+c*2,{cssStyles:b}=e,S=y.svg(f),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-m/2*0.8,y:-x/2},{x:m/2*0.8,y:-x/2},{x:m/2,y:-x/2*0.6},{x:m/2,y:x/2},{x:-m/2,y:x/2},{x:-m/2,y:-x/2*0.6}],_=oe(B),v=S.path(_,T),F=f.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")F.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")F.selectChildren("path").attr("style",s);return W(e,F),e.intersect=function(I){return N.polygon(e,B,I)},f}t(sy,"trapezoidalPentagon");var vg=10,Lg=10;async function ay(r,e){let{labelStyles:i,nodeStyles:s}=Q(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<Lg)e.width=Lg;if(e.height=e?.height??0,e.height<vg)e.height=vg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=$r(p().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,m=e?.height?e?.height:u+n.height,x=m,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-m}],{cssStyles:S}=e,T=y.svg(c),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=oe(b),v=T.path(_,B),F=c.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")F.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectChildren("path").attr("style",s);return e.width=u,e.height=m,W(e,F),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(f?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(I){return l.info("Triangle intersect",e,b,I),N.polygon(e,b,I)},c}t(ay,"triangle");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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)-c*2,e.height<10)e.height=10}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,Dt(e)),m=(e?.width?e?.width:f.width)+(a??0)*2,x=(e?.height?e?.height:f.height)+(c??0)*2,b=e.look==="neo"?x/4:x/8,S=x+(n?b:-b),{cssStyles:T}=e,_=14-m,v=_>0?_/2:0,F=y.svg(d),I=vt(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=[{x:-m/2-v,y:S/2},...kr(-m/2-v,S/2,m/2+v,S/2,b,0.8),{x:m/2+v,y:-S/2},{x:-m/2-v,y:-S/2}],K=oe(O),Z=F.path(K,I),rt=d.insert(()=>Z,":first-child");if(rt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")rt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(0,${-b/2})`),u.attr("transform",`translate(${-m/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-b-(f.y-(f.top??0))})`),W(e,rt),e.intersect=function(st){return N.polygon(e,O,st)},d}t(ny,"waveEdgedRectangle");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=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 I=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-I*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=(e?.width?e?.width:d.width)+a*2,u=(e?.height?e?.height:d.height)+c,m=u/8,x=u+m*2,{cssStyles:b}=e,S=y.svg(n),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2,y:x/2},...kr(-f/2,x/2,f/2,x/2,m,1),{x:f/2,y:-x/2},...kr(f/2,-x/2,-f/2,-x/2,m,-1)],_=oe(B),v=S.path(_,T),F=n.insert(()=>v,":first-child");if(F.attr("class","basic label-container"),b&&e.look!=="handDrawn")F.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return W(e,F),e.intersect=function(I){return N.polygon(e,B,I)},n}t(ly,"waveRectangle");var pe=10;async function hy(r,e){let{labelStyles:i,nodeStyles:s}=Q(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-pe,10),e.height=Math.max((e?.height??0)-a*2-pe,10);let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=(e?.width?e?.width:n.width)+o*2+pe,u=(e?.height?e?.height:n.height)+a*2+pe,m=f-pe,x=u-pe,b=-m/2,S=-x/2,{cssStyles:T}=e,B=y.svg(c),_=vt(e,{}),v=[{x:b-pe,y:S-pe},{x:b-pe,y:S+x},{x:b+m,y:S+x},{x:b+m,y:S-pe}],F=`M${b-pe},${S-pe} L${b+m},${S-pe} L${b+m},${S+x} L${b-pe},${S+x} L${b-pe},${S-pe}
237
237
  M${b-pe},${S} L${b+m},${S}
238
- M${b},${S-pe} L${b},${S+x}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let I=B.path(F,_),O=c.insert(()=>I,":first-child");if(O.attr("transform",`translate(${pe/2}, ${pe/2})`),O.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")O.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+pe/2-(n.x-(n.left??0))}, ${-(n.height/2)+pe/2-(n.y-(n.top??0))})`),W(e,O),e.intersect=function(K){return N.polygon(e,v,K)},c}t(gy,"windowPane");var Fg=new Set(["redux-color","redux-dark-color"]),$1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:At}=C(),{background:Nt}=At,Kt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Nt}`]};await xc(r,Kt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,m=f.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:b,nodeStyles:S}=Q(e);if(i.attributes.length===0&&e.label){let At={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(Wn(e.label,f)+At.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let Nt=await mi(r,e,At);if(s!=null&&Fg.has(s)){let Kt=i.colorIndex??0;Nt.attr("data-color-id",`color-${Kt%d.length}`)}if(!Or(f.htmlLabels)){let Kt=Nt.select("text"),Yt=Kt.node()?.getBBox();Kt.attr("transform",`translate(${-Yt.width/2}, 0)`)}return Nt}if(!f.htmlLabels)u*=1.25,m*=1.25;let T=$t(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await pi(B,e.label??"",f,0,0,["name"],b);_.height+=m;let v=0,F=[],I=[],O=0,K=0,Z=0,rt=0,st=!0,ut=!0;for(let At of i.attributes){let Nt=await pi(B,At.type,f,0,v,["attribute-type"],b);O=Math.max(O,Nt.width+u);let Kt=await pi(B,At.name,f,0,v,["attribute-name"],b);K=Math.max(K,Kt.width+u);let Yt=await pi(B,At.keys.join(),f,0,v,["attribute-keys"],b);Z=Math.max(Z,Yt.width+u);let le=await pi(B,At.comment,f,0,v,["attribute-comment"],b);rt=Math.max(rt,le.width+u);let ne=Math.max(Nt.height,Kt.height,Yt.height,le.height)+m;I.push({yOffset:v,rowHeight:ne}),v+=ne}let ct=4;if(Z<=u)st=!1,Z=0,ct--;if(rt<=u)ut=!1,rt=0,ct--;let nt=B.node().getBBox();if(_.width+u*2-(O+K+Z+rt)>0){let At=_.width+u*2-(O+K+Z+rt);if(O+=At/ct,K+=At/ct,Z>0)Z+=At/ct;if(rt>0)rt+=At/ct}let D=O+K+Z+rt,U=y.svg(B),it=_t(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let P=0;if(I.length>0)P=I.reduce((At,Nt)=>At+(Nt?.rowHeight??0),0);let ht=Math.max(nt.width+u*2,e?.width||0,D),lt=Math.max((P??0)+_.height,e?.height||0),Bt=-ht/2,vt=-lt/2;if(B.selectAll("g:not(:first-child)").each((At,Nt,Kt)=>{let Yt=h(Kt[Nt]),le=Yt.attr("transform"),ne=0,er=0;if(le){let ze=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);if(ze){if(ne=parseFloat(ze[1]),er=parseFloat(ze[2]),Yt.attr("class").includes("attribute-name"))ne+=O;else if(Yt.attr("class").includes("attribute-keys"))ne+=O+K;else if(Yt.attr("class").includes("attribute-comment"))ne+=O+K+Z}}Yt.attr("transform",`translate(${Bt+u/2+ne}, ${er+vt+_.height+m/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(vt+m/2)+")"),s!=null&&Fg.has(s)){let At=i.colorIndex??0;B.attr("data-color-id",`color-${At%d.length}`)}let Xt=U.rectangle(Bt,vt,ht,lt,it),Vt=B.insert(()=>Xt,":first-child").attr("class","outer-path").attr("style",x.join(""));F.push(0);for(let[At,Nt]of I.entries()){let Yt=(At+1)%2===0&&Nt.yOffset!==0,le=U.rectangle(Bt,_.height+vt+Nt?.yOffset,ht,Nt?.rowHeight,{...it,fill:Yt?a:c,stroke:n});B.insert(()=>le,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Yt?"even":"odd"}`)}let Qt=0.0001,Jt=gi(Bt,_.height+vt,ht+Bt,_.height+vt,Qt),Dt=U.polygon(Jt.map((At)=>[At.x,At.y]),it);if(B.insert(()=>Dt).attr("class","divider"),Jt=gi(O+Bt,_.height+vt,O+Bt,lt+vt,Qt),Dt=U.polygon(Jt.map((At)=>[At.x,At.y]),it),B.insert(()=>Dt).attr("class","divider"),st){let At=O+K+Bt;Jt=gi(At,_.height+vt,At,lt+vt,Qt),Dt=U.polygon(Jt.map((Nt)=>[Nt.x,Nt.y]),it),B.insert(()=>Dt).attr("class","divider")}if(ut){let At=O+K+Z+Bt;Jt=gi(At,_.height+vt,At,lt+vt,Qt),Dt=U.polygon(Jt.map((Nt)=>[Nt.x,Nt.y]),it),B.insert(()=>Dt).attr("class","divider")}for(let At of F){let Nt=_.height+vt+At;Jt=gi(Bt,Nt,ht+Bt,Nt,Qt),Dt=U.polygon(Jt.map((Kt)=>[Kt.x,Kt.y]),it),B.insert(()=>Dt).attr("class","divider")}if(W(e,Vt),S&&e.look!=="handDrawn")if(s!=null&&$1.has(s))B.selectAll("path").attr("style",S);else{let Nt=S.split(";")?.filter((Kt)=>Kt.includes("stroke"))?.map((Kt)=>`${Kt}`).join("; ");B.selectAll("path").attr("style",Nt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(At){return N.rect(e,At)},B}t(xc,"erBox");async function pi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==po(e))e=po(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let d=n.node().appendChild(await sn(n,e,{width:Wn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let u=d.children[0];u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=d.getBBox();if(Or(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let m=h(d);f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return f}t(pi,"addText");function gi(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(gi,"lineToPolygon");async function my(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",$t(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,m=0,x=0,b=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Lo(n,{text:`«${v}»`},0),m=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Lo(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();x=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let F=await Lo(f,v,T,[v.parseClassifier()]);T+=F+a}if(b=f.node().getBBox().height,b<=0)b=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let F=await Lo(u,v,B,[v.parseClassifier()]);B+=F+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${m})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${m+x+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${m+x+(b?b+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(my,"textHelper");async function Lo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:Or(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(It(n))c=!0;let d=await sn(o,Uo($a(n)),{width:Wn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let m=d.children[0];if(d.textContent===""||d.textContent.includes("&gt")){if(m.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")m.textContent=m.textContent[0]+" "+m.textContent.substring(1)}if(m.textContent==="undefined")m.textContent="";f=d.getBBox()}else{let m=d.children[0],x=h(d);if(u=m.innerHTML.split("<br>").length,m.innerHTML.includes("</math>"))u+=m.innerHTML.split("<mrow>").length-1;await fc(m),f=m.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t(Lo,"addText");async function yy(r,e){let i=p(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??Or(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:m,bbox:x}=await my(r,e,i,f,d);Vn(m,e.colorIndex,s,c);let{labelStyles:b,nodeStyles:S}=Q(e);e.labelStyle=b,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(m),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=Math.max(e.width??0,x.width),I=Math.max(e.height??0,x.height),O=(e.height??0)>x.height;if(u.members.length===0&&u.methods.length===0)I+=d;else if(u.members.length>0&&u.methods.length===0)I+=d*2;let K=-F/2,Z=-I/2,rt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(O)rt=n*2;let st=_.rectangle(K-n,Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),F+2*n,I+2*n+rt,v),ut=m.insert(()=>st,":first-child");ut.attr("class","basic label-container outer-path");let ct=ut.node().getBBox(),nt=m.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,D=m.select(".label-group").node().getBBox().height-(B?n/2:0)||0,U=m.select(".members-group").node().getBBox().height-(B?n/2:0)||0,it=(nt+D+Z+n-(Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(m.selectAll(".text").each((P,ht,lt)=>{let Bt=h(lt[ht]),vt=Bt.attr("transform"),Xt=0;if(vt){let Dt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(vt);if(Dt)Xt=parseFloat(Dt[2])}let Vt=Xt+Z+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(Bt.attr("class").includes("methods-group")){let Jt=Math.max(U,d/2);if(O)Vt=Math.max(it,nt+D+Jt+Z+d*2+n)+d*2;else Vt=nt+D+Jt+Z+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Vt=Xt-d;else Vt=Xt;if(!f)Vt-=4;let Qt=K;if(Bt.attr("class").includes("label-group")||Bt.attr("class").includes("annotation-group"))Qt=-Bt.node()?.getBBox().width/2||0,m.selectAll("text").each(function(Jt,Dt,At){if(window.getComputedStyle(At[Dt]).textAnchor==="middle")Qt=0});Bt.attr("transform",`translate(${Qt}, ${Vt})`)}),u.members.length>0||u.methods.length>0||B){let P=nt+D+Z+n,ht=_.line(ct.x,P,ct.x+ct.width,P+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let P=nt+D+U+Z+d*2+n,ht=_.line(ct.x,O?Math.max(it,P):P,ct.x+ct.width,(O?Math.max(it,P):P)+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")m.selectAll("path").attr("style",T);if(ut.select(":nth-child(2)").attr("style",T),m.selectAll(".divider").select("path").attr("style",T),e.labelStyle)m.selectAll("span").attr("style",e.labelStyle);else m.selectAll("span").attr("style",T);if(!f){let P=RegExp(/color\s*:\s*([^;]*)/),ht=P.exec(T);if(ht){let lt=ht[0].replace("color","fill");m.selectAll("tspan").attr("style",lt)}else if(b){let lt=P.exec(b);if(lt){let Bt=lt[0].replace("color","fill");m.selectAll("tspan").attr("style",Bt)}}}return W(e,ut),e.intersect=function(P){return N.rect(e,P)},m}t(yy,"classBox");async function xy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=$t(e),u=p(),{themeVariables:m}=u,{borderColorArray:x,requirementEdgeLabelBackground:b}=m,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ze(T,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else B=await Ze(T,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=B,v=await Ze(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let ct=await Ze(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=ct;let nt=await Ze(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=nt;let D=await Ze(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=D,await Ze(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let ct=await Ze(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=ct,await Ze(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let F=(T.node()?.getBBox().width??200)+c,I=(T.node()?.getBBox().height??200)+c,O=-F/2,K=-I/2,Z=y.svg(T),rt=_t(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let st=Z.rectangle(O,K,F,I,rt),ut=T.insert(()=>st,":first-child");if(ut.attr("class","basic label-container outer-path").attr("style",s),x?.length){let ct=e.colorIndex??0;T.attr("data-color-id",`color-${ct%x.length}`)}if(T.selectAll(".label").each((ct,nt,D)=>{let U=h(D[nt]),it=U.attr("transform"),P=0,ht=0;if(it){let Xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(it);if(Xt)P=parseFloat(Xt[1]),ht=parseFloat(Xt[2])}let lt=ht-I/2,Bt=O+c/2;if(nt===0||nt===1)Bt=P;U.attr("transform",`translate(${Bt}, ${lt+c})`)}),_>B+v+n){let ct=K+B+v+n,nt;if(e.look==="neo"){let it=[[O,ct],[O+F,ct],[O+F,ct+0.001],[O,ct+0.001]];nt=Z.polygon(it,rt)}else nt=Z.line(O,ct,O+F,ct,rt);T.insert(()=>nt).attr("class","divider")}if(W(e,ut),e.intersect=function(ct){return N.rect(e,ct)},s&&e.look!=="handDrawn"&&(b||x?.length))T.selectAll("path").attr("style",s);return T}t(xy,"requirementBox");async function Ze(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=p(),n=c.htmlLabels??!0,d=await sn(a,Uo($a(e)),{width:Wn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let m of u.children)if(s)m.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let m of u.children)m.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],m=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ze,"addText");var I1=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 Cy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await X(r,e,$t(e)),u=e.padding||10,m="",x;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)m=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),x=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank");let b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(x)({label:S,bbox:T}=await Ir(x,"ticket"in e&&e.ticket||"",b));else({label:S,bbox:T}=await Ir(n,"ticket"in e&&e.ticket||"",b));let{label:B,bbox:_}=await Ir(n,"assigned"in e&&e.assigned||"",b);e.width=c;let v=10,F=e?.width||0,I=Math.max(T.height,_.height)/2,O=Math.max(d.height+v*2,e?.height||0)+I,K=-F/2,Z=-O/2;f.attr("transform","translate("+(u-F/2)+", "+(-I-d.height/2)+")"),S.attr("transform","translate("+(u-F/2)+", "+(-I+d.height/2)+")"),B.attr("transform","translate("+(u+F/2-_.width-2*a)+", "+(-I+d.height/2)+")");let rt,{rx:st,ry:ut}=e,{cssStyles:ct}=e;if(e.look==="handDrawn"){let nt=y.svg(n),D=_t(e,{}),U=st||ut?nt.path(Ae(K,Z,F,O,st||0),D):nt.rectangle(K,Z,F,O,D);rt=n.insert(()=>U,":first-child"),rt.attr("class","basic label-container").attr("style",ct?ct:null)}else{rt=n.insert("rect",":first-child"),rt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",st??5).attr("ry",ut??5).attr("x",K).attr("y",Z).attr("width",F).attr("height",O);let nt="priority"in e&&e.priority;if(nt){let D=n.append("line"),U=K+2,it=Z+Math.floor((st??0)/2),P=Z+O-Math.floor((st??0)/2);D.attr("x1",U).attr("y1",it).attr("x2",U).attr("y2",P).attr("stroke-width","4").attr("stroke",I1(nt))}}return W(e,rt),e.height=O,e.intersect=function(nt){return N.rect(e,nt)},n}t(Cy,"kanbanItem");async function by(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,$t(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:m}=e,x=a.width+20,b=a.height+20,S=Math.max(d,x),T=Math.max(f,b);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
238
+ M${b},${S-pe} L${b},${S+x}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let I=B.path(F,_),O=c.insert(()=>I,":first-child");if(O.attr("transform",`translate(${pe/2}, ${pe/2})`),O.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")O.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+pe/2-(n.x-(n.left??0))}, ${-(n.height/2)+pe/2-(n.y-(n.top??0))})`),W(e,O),e.intersect=function(K){return N.polygon(e,v,K)},c}t(hy,"windowPane");var Fg=new Set(["redux-color","redux-dark-color"]),v1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:It}=C(),{background:zt}=It,Kt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${zt}`]};await xc(r,Kt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,m=f.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:b,nodeStyles:S}=Q(e);if(i.attributes.length===0&&e.label){let It={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(Kn(e.label,f)+It.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let zt=await mi(r,e,It);if(s!=null&&Fg.has(s)){let Kt=i.colorIndex??0;zt.attr("data-color-id",`color-${Kt%d.length}`)}if(!$r(f.htmlLabels)){let Kt=zt.select("text"),Ut=Kt.node()?.getBBox();Kt.attr("transform",`translate(${-Ut.width/2}, 0)`)}return zt}if(!f.htmlLabels)u*=1.25,m*=1.25;let T=Dt(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await pi(B,e.label??"",f,0,0,["name"],b);_.height+=m;let v=0,F=[],I=[],O=0,K=0,Z=0,rt=0,st=!0,ut=!0;for(let It of i.attributes){let zt=await pi(B,It.type,f,0,v,["attribute-type"],b);O=Math.max(O,zt.width+u);let Kt=await pi(B,It.name,f,0,v,["attribute-name"],b);K=Math.max(K,Kt.width+u);let Ut=await pi(B,It.keys.join(),f,0,v,["attribute-keys"],b);Z=Math.max(Z,Ut.width+u);let le=await pi(B,It.comment,f,0,v,["attribute-comment"],b);rt=Math.max(rt,le.width+u);let ne=Math.max(zt.height,Kt.height,Ut.height,le.height)+m;I.push({yOffset:v,rowHeight:ne}),v+=ne}let ct=4;if(Z<=u)st=!1,Z=0,ct--;if(rt<=u)ut=!1,rt=0,ct--;let nt=B.node().getBBox();if(_.width+u*2-(O+K+Z+rt)>0){let It=_.width+u*2-(O+K+Z+rt);if(O+=It/ct,K+=It/ct,Z>0)Z+=It/ct;if(rt>0)rt+=It/ct}let D=O+K+Z+rt,U=y.svg(B),it=vt(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let P=0;if(I.length>0)P=I.reduce((It,zt)=>It+(zt?.rowHeight??0),0);let ht=Math.max(nt.width+u*2,e?.width||0,D),lt=Math.max((P??0)+_.height,e?.height||0),Bt=-ht/2,At=-lt/2;if(B.selectAll("g:not(:first-child)").each((It,zt,Kt)=>{let Ut=h(Kt[zt]),le=Ut.attr("transform"),ne=0,er=0;if(le){let ze=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);if(ze){if(ne=parseFloat(ze[1]),er=parseFloat(ze[2]),Ut.attr("class").includes("attribute-name"))ne+=O;else if(Ut.attr("class").includes("attribute-keys"))ne+=O+K;else if(Ut.attr("class").includes("attribute-comment"))ne+=O+K+Z}}Ut.attr("transform",`translate(${Bt+u/2+ne}, ${er+At+_.height+m/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(At+m/2)+")"),s!=null&&Fg.has(s)){let It=i.colorIndex??0;B.attr("data-color-id",`color-${It%d.length}`)}let Gt=U.rectangle(Bt,At,ht,lt,it),Vt=B.insert(()=>Gt,":first-child").attr("class","outer-path").attr("style",x.join(""));F.push(0);for(let[It,zt]of I.entries()){let Ut=(It+1)%2===0&&zt.yOffset!==0,le=U.rectangle(Bt,_.height+At+zt?.yOffset,ht,zt?.rowHeight,{...it,fill:Ut?a:c,stroke:n});B.insert(()=>le,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Ut?"even":"odd"}`)}let Qt=0.0001,Jt=gi(Bt,_.height+At,ht+Bt,_.height+At,Qt),Pt=U.polygon(Jt.map((It)=>[It.x,It.y]),it);if(B.insert(()=>Pt).attr("class","divider"),Jt=gi(O+Bt,_.height+At,O+Bt,lt+At,Qt),Pt=U.polygon(Jt.map((It)=>[It.x,It.y]),it),B.insert(()=>Pt).attr("class","divider"),st){let It=O+K+Bt;Jt=gi(It,_.height+At,It,lt+At,Qt),Pt=U.polygon(Jt.map((zt)=>[zt.x,zt.y]),it),B.insert(()=>Pt).attr("class","divider")}if(ut){let It=O+K+Z+Bt;Jt=gi(It,_.height+At,It,lt+At,Qt),Pt=U.polygon(Jt.map((zt)=>[zt.x,zt.y]),it),B.insert(()=>Pt).attr("class","divider")}for(let It of F){let zt=_.height+At+It;Jt=gi(Bt,zt,ht+Bt,zt,Qt),Pt=U.polygon(Jt.map((Kt)=>[Kt.x,Kt.y]),it),B.insert(()=>Pt).attr("class","divider")}if(W(e,Vt),S&&e.look!=="handDrawn")if(s!=null&&v1.has(s))B.selectAll("path").attr("style",S);else{let zt=S.split(";")?.filter((Kt)=>Kt.includes("stroke"))?.map((Kt)=>`${Kt}`).join("; ");B.selectAll("path").attr("style",zt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(It){return N.rect(e,It)},B}t(xc,"erBox");async function pi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==fo(e))e=fo(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let d=n.node().appendChild(await ln(n,e,{width:Kn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let u=d.children[0];u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=d.getBBox();if($r(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let m=h(d);f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return f}t(pi,"addText");function gi(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(gi,"lineToPolygon");async function cy(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",Dt(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,m=0,x=0,b=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Lo(n,{text:`«${v}»`},0),m=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Lo(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();x=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let F=await Lo(f,v,T,[v.parseClassifier()]);T+=F+a}if(b=f.node().getBBox().height,b<=0)b=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let F=await Lo(u,v,B,[v.parseClassifier()]);B+=F+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${m})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${m+x+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${m+x+(b?b+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(cy,"textHelper");async function Lo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:$r(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(_t(n))c=!0;let d=await ln(o,Uo($a(n)),{width:Kn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let m=d.children[0];if(d.textContent===""||d.textContent.includes("&gt")){if(m.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")m.textContent=m.textContent[0]+" "+m.textContent.substring(1)}if(m.textContent==="undefined")m.textContent="";f=d.getBBox()}else{let m=d.children[0],x=h(d);if(u=m.innerHTML.split("<br>").length,m.innerHTML.includes("</math>"))u+=m.innerHTML.split("<mrow>").length-1;await fc(m),f=m.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t(Lo,"addText");async function uy(r,e){let i=p(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??$r(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:m,bbox:x}=await cy(r,e,i,f,d);Yn(m,e.colorIndex,s,c);let{labelStyles:b,nodeStyles:S}=Q(e);e.labelStyle=b,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(m),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=Math.max(e.width??0,x.width),I=Math.max(e.height??0,x.height),O=(e.height??0)>x.height;if(u.members.length===0&&u.methods.length===0)I+=d;else if(u.members.length>0&&u.methods.length===0)I+=d*2;let K=-F/2,Z=-I/2,rt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(O)rt=n*2;let st=_.rectangle(K-n,Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),F+2*n,I+2*n+rt,v),ut=m.insert(()=>st,":first-child");ut.attr("class","basic label-container outer-path");let ct=ut.node().getBBox(),nt=m.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,D=m.select(".label-group").node().getBBox().height-(B?n/2:0)||0,U=m.select(".members-group").node().getBBox().height-(B?n/2:0)||0,it=(nt+D+Z+n-(Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(m.selectAll(".text").each((P,ht,lt)=>{let Bt=h(lt[ht]),At=Bt.attr("transform"),Gt=0;if(At){let Pt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(At);if(Pt)Gt=parseFloat(Pt[2])}let Vt=Gt+Z+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(Bt.attr("class").includes("methods-group")){let Jt=Math.max(U,d/2);if(O)Vt=Math.max(it,nt+D+Jt+Z+d*2+n)+d*2;else Vt=nt+D+Jt+Z+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Vt=Gt-d;else Vt=Gt;if(!f)Vt-=4;let Qt=K;if(Bt.attr("class").includes("label-group")||Bt.attr("class").includes("annotation-group"))Qt=-Bt.node()?.getBBox().width/2||0,m.selectAll("text").each(function(Jt,Pt,It){if(window.getComputedStyle(It[Pt]).textAnchor==="middle")Qt=0});Bt.attr("transform",`translate(${Qt}, ${Vt})`)}),u.members.length>0||u.methods.length>0||B){let P=nt+D+Z+n,ht=_.line(ct.x,P,ct.x+ct.width,P+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let P=nt+D+U+Z+d*2+n,ht=_.line(ct.x,O?Math.max(it,P):P,ct.x+ct.width,(O?Math.max(it,P):P)+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")m.selectAll("path").attr("style",T);if(ut.select(":nth-child(2)").attr("style",T),m.selectAll(".divider").select("path").attr("style",T),e.labelStyle)m.selectAll("span").attr("style",e.labelStyle);else m.selectAll("span").attr("style",T);if(!f){let P=RegExp(/color\s*:\s*([^;]*)/),ht=P.exec(T);if(ht){let lt=ht[0].replace("color","fill");m.selectAll("tspan").attr("style",lt)}else if(b){let lt=P.exec(b);if(lt){let Bt=lt[0].replace("color","fill");m.selectAll("tspan").attr("style",Bt)}}}return W(e,ut),e.intersect=function(P){return N.rect(e,P)},m}t(uy,"classBox");async function dy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=Dt(e),u=p(),{themeVariables:m}=u,{borderColorArray:x,requirementEdgeLabelBackground:b}=m,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ze(T,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else B=await Ze(T,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=B,v=await Ze(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let ct=await Ze(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=ct;let nt=await Ze(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=nt;let D=await Ze(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=D,await Ze(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let ct=await Ze(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=ct,await Ze(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let F=(T.node()?.getBBox().width??200)+c,I=(T.node()?.getBBox().height??200)+c,O=-F/2,K=-I/2,Z=y.svg(T),rt=vt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let st=Z.rectangle(O,K,F,I,rt),ut=T.insert(()=>st,":first-child");if(ut.attr("class","basic label-container outer-path").attr("style",s),x?.length){let ct=e.colorIndex??0;T.attr("data-color-id",`color-${ct%x.length}`)}if(T.selectAll(".label").each((ct,nt,D)=>{let U=h(D[nt]),it=U.attr("transform"),P=0,ht=0;if(it){let Gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(it);if(Gt)P=parseFloat(Gt[1]),ht=parseFloat(Gt[2])}let lt=ht-I/2,Bt=O+c/2;if(nt===0||nt===1)Bt=P;U.attr("transform",`translate(${Bt}, ${lt+c})`)}),_>B+v+n){let ct=K+B+v+n,nt;if(e.look==="neo"){let it=[[O,ct],[O+F,ct],[O+F,ct+0.001],[O,ct+0.001]];nt=Z.polygon(it,rt)}else nt=Z.line(O,ct,O+F,ct,rt);T.insert(()=>nt).attr("class","divider")}if(W(e,ut),e.intersect=function(ct){return N.rect(e,ct)},s&&e.look!=="handDrawn"&&(b||x?.length))T.selectAll("path").attr("style",s);return T}t(dy,"requirementBox");async function Ze(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=p(),n=c.htmlLabels??!0,d=await ln(a,Uo($a(e)),{width:Kn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let m of u.children)if(s)m.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let m of u.children)m.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],m=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ze,"addText");var L1=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 fy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=e.padding||10,m="",x;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)m=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),x=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank");let b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(x)({label:S,bbox:T}=await Ir(x,"ticket"in e&&e.ticket||"",b));else({label:S,bbox:T}=await Ir(n,"ticket"in e&&e.ticket||"",b));let{label:B,bbox:_}=await Ir(n,"assigned"in e&&e.assigned||"",b);e.width=c;let v=10,F=e?.width||0,I=Math.max(T.height,_.height)/2,O=Math.max(d.height+v*2,e?.height||0)+I,K=-F/2,Z=-O/2;f.attr("transform","translate("+(u-F/2)+", "+(-I-d.height/2)+")"),S.attr("transform","translate("+(u-F/2)+", "+(-I+d.height/2)+")"),B.attr("transform","translate("+(u+F/2-_.width-2*a)+", "+(-I+d.height/2)+")");let rt,{rx:st,ry:ut}=e,{cssStyles:ct}=e;if(e.look==="handDrawn"){let nt=y.svg(n),D=vt(e,{}),U=st||ut?nt.path(Me(K,Z,F,O,st||0),D):nt.rectangle(K,Z,F,O,D);rt=n.insert(()=>U,":first-child"),rt.attr("class","basic label-container").attr("style",ct?ct:null)}else{rt=n.insert("rect",":first-child"),rt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",st??5).attr("ry",ut??5).attr("x",K).attr("y",Z).attr("width",F).attr("height",O);let nt="priority"in e&&e.priority;if(nt){let D=n.append("line"),U=K+2,it=Z+Math.floor((st??0)/2),P=Z+O-Math.floor((st??0)/2);D.attr("x1",U).attr("y1",it).attr("x2",U).attr("y2",P).attr("stroke-width","4").attr("stroke",L1(nt))}}return W(e,rt),e.height=O,e.intersect=function(nt){return N.rect(e,nt)},n}t(fy,"kanbanItem");async function py(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,Dt(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:m}=e,x=a.width+20,b=a.height+20,S=Math.max(d,x),T=Math.max(f,b);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
239
239
  a${u},${u} 1 0,0 ${S*0.25},${-1*T*0.1}
240
240
  a${u},${u} 1 0,0 ${S*0.25},0
241
241
  a${u},${u} 1 0,0 ${S*0.25},0
@@ -253,7 +253,7 @@ ${o.join(`
253
253
  a${u},${u} 1 0,0 ${-1*S*0.1},${-1*T*0.33}
254
254
  a${u*0.8},${u*0.8} 1 0,0 0,${-1*T*0.34}
255
255
  a${u},${u} 1 0,0 ${S*0.1},${-1*T*0.33}
256
- H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),F=_t(e,{}),I=v.path(_,F);B=o.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",ue(m))}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})`),W(e,B),e.calcIntersect=function(v,F){return N.rect(v,F)},e.intersect=function(v){return l.info("Bang intersect",e,v),N.rect(e,v)},o}t(by,"bang");async function ky(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,$t(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,m=0.25*d,x=0.35*d,b=0.2*d,{cssStyles:S}=e,T,B=`M0 0
256
+ H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),F=vt(e,{}),I=v.path(_,F);B=o.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",ue(m))}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})`),W(e,B),e.calcIntersect=function(v,F){return N.rect(v,F)},e.intersect=function(v){return l.info("Bang intersect",e,v),N.rect(e,v)},o}t(py,"bang");async function gy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,Dt(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,m=0.25*d,x=0.35*d,b=0.2*d,{cssStyles:S}=e,T,B=`M0 0
257
257
  a${u},${u} 0 0,1 ${d*0.25},${-1*d*0.1}
258
258
  a${x},${x} 1 0,1 ${d*0.4},${-1*d*0.1}
259
259
  a${m},${m} 1 0,1 ${d*0.35},${d*0.2}
@@ -267,7 +267,7 @@ ${o.join(`
267
267
 
268
268
  a${u},${u} 1 0,1 ${-1*d*0.1},${-1*f*0.35}
269
269
  a${b},${b} 1 0,1 ${d*0.1},${-1*f*0.65}
270
- H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=_t(e,{}),F=_.path(B,v);T=o.insert(()=>F,":first-child"),T.attr("class","basic label-container").attr("style",ue(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(${-d/2}, ${-f/2})`),W(e,T),e.calcIntersect=function(_,v){return N.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),N.rect(e,_)},o}t(ky,"cloud");async function wy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,$t(e)),d=a.width+8*c,f=a.height+2*c,u=5,m=e.look==="neo"?`
270
+ H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=vt(e,{}),F=_.path(B,v);T=o.insert(()=>F,":first-child"),T.attr("class","basic label-container").attr("style",ue(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(${-d/2}, ${-f/2})`),W(e,T),e.calcIntersect=function(_,v){return N.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),N.rect(e,_)},o}t(gy,"cloud");async function my(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,Dt(e)),d=a.width+8*c,f=a.height+2*c,u=5,m=e.look==="neo"?`
271
271
  M${-d/2} ${f/2-u}
272
272
  v${-f+2*u}
273
273
  q0,-${u} ${u},-${u}
@@ -287,16 +287,16 @@ ${o.join(`
287
287
  h${-(d-2*u)}
288
288
  q${-u},0 ${-u},${-u}
289
289
  Z
290
- `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let x=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",m);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,x),e.calcIntersect=function(b,S){return N.rect(b,S)},e.intersect=function(b){return N.rect(e,b)},o}t(wy,"defaultMindmapNode");async function Sy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(Sy,"mindmapCircle");var O1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ty},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ey},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:sy},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:mm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Qg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:nm},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:im},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:pm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:by},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ky},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Gm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Bm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Om},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Im},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:cy},{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:Em},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ly},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:om},{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:oy},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:iy},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Sm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:_m},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:cm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:um},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:dm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Dm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:fy},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Tm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:hy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Pm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ym},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:dy},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:gy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:uy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:km},{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:Um},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:jm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Xg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:hm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ny},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ay},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:py},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Vm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Rm}],D1=t(()=>{let e=[...Object.entries({state:ry,choice:sm,note:Xm,composite:am,rectWithTitle:Km,labelRect:$m,block_arrow:rm,collapsedGroup:em,iconSquare:Mm,iconCircle:Lm,icon:vm,iconRounded:Fm,imageSquare:Am,anchor:Rg,kanbanItem:Cy,mindmapCircle:Sy,defaultMindmapNode:wy,classBox:yy,erBox:xc,requirementBox:xy,usecaseActor:qm,usecaseActorHollow:Nm,usecaseActorAwesome:Wm,usecaseActorIcon:zm,usecaseBusiness:Hm,usecaseEllipse:Cm,usecaseJsonTable:Ym}),...O1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Pu=D1();function Xl(r){return r in Pu}t(Xl,"isValidShape");var ma=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"),la=new Map;async function fa(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?Pu[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",ue(e.look)),e.tooltip)o.attr("title",e.tooltip);if(la.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(fa,"insertNode");var Vg=t((r,e)=>{la.set(e.id,r)},"setNodeElem"),Yg=t(()=>{la.clear()},"clear"),Gr=t((r)=>{let e=la.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 P1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:m,borderStyles:x,backgroundStyles:b}=Q(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);Vn(S,e.colorIndex,s,d);let T=Or(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await sn(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),F=v.getBBox();if(T){let it=v.children[0],P=h(v);F=it.getBoundingClientRect(),P.attr("width",F.width),P.attr("height",F.height)}let I=e.padding??0,O=e.width<=F.width+I?F.width+I:e.width;if(e.width<=F.width+I)e.diff=(O-e.width)/2-I;else e.diff=-I;let K=e.height,Z=e.y-K/2,rt=e.y+K/2,st=e.x-O/2,ut=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+K/3,ct=B?4:0,nt=F.height+2*ct,D,U;if(B){let it=Math.max(nt,F.height+2*ct),P=st+it,ht=Math.max(0,O-it);if(e.look==="handDrawn"){let vt=y.svg(S),Xt=_t(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Vt=_t(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Qt=vt.rectangle(st,Z,it,K,Xt);D=S.insert(()=>Qt,":first-child").attr("class","swimlane-title");let Jt=vt.rectangle(P,Z,ht,K,Vt);U=S.insert(()=>Jt,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",x.join(";")),D.select("path").attr("style",b.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",st).attr("y",Z).attr("width",it).attr("height",K).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",P).attr("y",Z).attr("width",ht).attr("height",K).attr("fill","none").attr("stroke",f);let lt=st+it/2,Bt=e.y;_.attr("transform",`translate(${lt}, ${Bt}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let it=Math.max(0,ut-Z),P=Math.min(nt,it),ht=Z+P,lt=Math.max(0,rt-ht),Bt=e.x-O/2;if(e.look==="handDrawn"){let Vt=y.svg(S),Qt=_t(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Jt=_t(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Dt=Vt.rectangle(Bt,Z,O,P,Qt);D=S.insert(()=>Dt,":first-child").attr("class","swimlane-title");let At=Vt.rectangle(Bt,ht,O,lt,Jt);U=S.insert(()=>At,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",x.join(";")),D.select("path").attr("style",b.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",Bt).attr("y",Z).attr("width",O).attr("height",P).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",Bt).attr("y",ht).attr("width",O).attr("height",lt).attr("fill","none").attr("stroke",f);let vt=e.x-F.width/2,Xt=Z+(P-F.height)/2;_.attr("transform",`translate(${vt}, ${Xt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let it=_.select("span");if(it)it.attr("style",u)}return e.offsetX=0,e.width=O,e.height=K,e.offsetY=F.height-I/2,e.intersect=function(it){return Je(e,it)},{cluster:S,labelBBox:F}},"swimlane"),Ty=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:m,backgroundStyles:x}=Q(e),b=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Vn(b,e.colorIndex,s,d);let S=jt(i),T=b.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await sn(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await Ne(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(jt(i)){let st=B.children[0],ut=h(B);_=st.getBoundingClientRect(),ut.attr("width",_.width),ut.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 F=e.height,I=e.x-v/2,O=e.y-F/2;l.trace("Data ",e,JSON.stringify(e));let K;if(e.look==="handDrawn"){let st=y.svg(b),ut=_t(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),ct=st.path(Ae(I,O,v,F,0),ut);K=b.insert(()=>(l.debug("Rough node insert CXC",ct),ct),":first-child"),K.select("path:nth-child(2)").attr("style",m.join(";")),K.select("path").attr("style",x.join(";").replace("fill","stroke"))}else K=b.insert("rect",":first-child"),K.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",I).attr("y",O).attr("width",v).attr("height",F);let{subGraphTitleTopMargin:Z}=ma(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Z})`),f){let st=T.select("span");if(st)st.attr("style",f)}let rt=K.node().getBBox();return e.offsetX=0,e.width=rt.width,e.height=rt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(st){return Je(e,st)},{cluster:b,labelBBox:_}},"rect"),R1=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 c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),q1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,m=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Vn(m,e.colorIndex,s,n);let x=m.insert("g",":first-child"),b=m.insert("g").attr("class","cluster-label"),S=m.append("rect"),T=await Ne(b,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(jt(i)){let ct=T.children[0],nt=h(T);B=ct.getBoundingClientRect(),nt.attr("width",B.width),nt.attr("height",B.height)}let _=0*e.padding,v=_/2,F=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(F-e.width)/2-e.padding;else e.diff=-e.padding;let I=e.height+_,O=e.height+_-B.height-6,K=e.x-F/2,Z=e.y-I/2;e.width=F;let rt=e.y-e.height/2-v+B.height+2,st;if(e.look==="handDrawn"){let ct=e.cssClasses.includes("statediagram-cluster-alt"),nt=y.svg(m),D=e.rx||e.ry?nt.path(Ae(K,Z,F,I,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):nt.rectangle(K,Z,F,I,{seed:a});st=m.insert(()=>D,":first-child");let U=nt.rectangle(K,rt,F,O,{fill:ct?c:d,fillStyle:ct?"hachure":"solid",stroke:u,seed:a});st=m.insert(()=>D,":first-child"),S=m.insert(()=>U),st.attr("class","outer"),S.attr("class","inner")}else{st=x.insert("rect",":first-child");let ct="outer";st.attr("class",ct).attr("x",K).attr("y",Z).attr("width",F).attr("height",I).attr("data-look",e.look),S.attr("class","inner").attr("x",K).attr("y",rt).attr("width",F).attr("height",O)}b.attr("transform",`translate(${e.x-B.width/2}, ${Z+1-(jt(i)?0:3)})`);let ut=st.node().getBBox();return e.height=ut.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(ct){return Je(e,ct)},{cluster:m,labelBBox:B}},"roundedWithTitle"),W1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=Q(e),m=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=jt(i),b=m.insert("g").attr("class","cluster-label "),S=await sn(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}),T=S.getBBox();if(jt(i)){let Z=S.children[0],rt=h(S);T=Z.getBoundingClientRect(),rt.attr("width",T.width),rt.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,F=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let I;if(e.look==="handDrawn"){let Z=y.svg(m),rt=_t(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),st=Z.path(Ae(v,F,B,_,e.rx),rt);I=m.insert(()=>(l.debug("Rough node insert CXC",st),st),":first-child"),I.select("path:nth-child(2)").attr("style",f.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=m.insert("rect",":first-child"),I.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",F).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:O}=ma(i);if(b.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+O})`),n){let Z=b.select("span");if(Z)Z.attr("style",n)}let K=I.node().getBBox();return e.offsetX=0,e.width=K.width,e.height=K.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Z){return Je(e,Z)},{cluster:m,labelBBox:T}},"kanbanSection"),N1=t((r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Vn(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),m=0*e.padding,x=e.width+m;e.diff=-e.padding;let b=e.height+m,S=e.x-x/2,T=e.y-b/2;e.width=x;let B;if(e.look==="handDrawn"){let F=y.svg(f).rectangle(S,T,x,b,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>F,":first-child").attr("class","divider")}else{B=u.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",x).attr("height",b).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),z1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=p(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=Q(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Vn(u,e.colorIndex,o,n);let m=jt(s),x=u.insert("g").attr("class","cluster-label"),b={width:0,height:0},S=e.label?.trim();if(S){let O;if(e.labelType==="markdown")O=await sn(x,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});else O=await Ne(x,e.label,e.labelStyle||"",!1,!0);if(b=O.getBBox(),m){let K=O.children[0],Z=h(O);b=K.getBoundingClientRect(),Z.attr("width",b.width),Z.attr("height",b.height)}}let T=e.width<=b.width+e.padding?b.width+e.padding:e.width;if(e.width<=b.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,F;if(e.look==="handDrawn"){let O=y.svg(u),K=_t(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=O.path(Ae(_,v,T,B,i.rx),K);F=u.insert(()=>Z,":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";"))}else if(F=u.insert("rect",":first-child"),F.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)F.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:O}=ma(s);if(x.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+O})`),d){let K=x.select("span");if(K)K.attr("style",d)}}let I=F.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=b.height-e.padding/2,e.intersect=function(O){return Je(e,O)},{cluster:u,labelBBox:b}},"createContainerGroup"),H1=t(async(r,e)=>{let{themeVariables:i}=p(),s=i.flowContainerStroke||i.secondaryBorderColor;return z1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),Y1=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),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),j1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=Q(e),{stylesMap:m}=Ge(e),x=e.boundaryType||"rect",b=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${x} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",x).attr("data-look",e.look);Vn(b,e.colorIndex,s,d);let S=jt(i),T=b.insert("g").attr("class","cluster-label system-boundary-title"),B=await sn(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let D=B.children[0],U=h(B);_=D.getBoundingClientRect(),U.attr("width",_.width),U.attr("height",_.height)}let v=Y1(e,_),{width:F,height:I,x:O,y:K,bodyY:Z,bodyHeight:rt,tabHeight:st,tabWidth:ut}=v;e.diff=e.width<=_.width+e.padding?(F-e.width)/2-e.padding:-e.padding;let ct=_t(e,{fill:m.get("fill")||c,stroke:m.get("stroke")||n,strokeWidth:m.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let D=y.svg(b),U=D.rectangle(O,Z,F,rt,ct);if(b.insert(()=>U,":first-child").attr("class","boundary-body label-container"),x==="package"){let it=D.rectangle(O,K,ut,st,ct);b.insert(()=>it,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(b.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",O).attr("y",Z).attr("width",F).attr("height",rt),x==="package")b.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",O).attr("y",K).attr("width",ut).attr("height",st);let{subGraphTitleTopMargin:nt}=ma(i);if(x==="package")T.attr("transform",`translate(${O+(ut-_.width)/2}, ${K+(st-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${K+nt})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=F,e.height=I,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(D){return Je(e,D)},{cluster:b,labelBBox:_}},"usecaseSystemBoundary"),U1=Ty,X1={rect:Ty,squareRect:U1,roundedWithTitle:q1,noteGroup:R1,divider:N1,kanbanSection:W1,flowGroup:H1,usecaseSystemBoundary:j1,swimlane:P1},G1=new Set(["noteGroup","divider"]),Kf=t((r)=>!G1.has(r??"rect"),"clusterPaintsTitle"),By=new Map,fo=t(async(r,e)=>{let i=e.shape||"rect",s=await X1[i](r,e);return By.set(e.id,s),s},"insertCluster"),Jg=t(()=>{By=new Map},"clear");var Mo=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"),qt={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},Tp={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $o(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ce(r),e=ce(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t($o,"calculateDeltaAndAngle");var ce=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),V1=t((r)=>({x:t(function(e,i,s){let o=0,a=ce(s[0]).x<ce(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(qt,r.arrowTypeStart)){let{angle:b,deltaX:S}=$o(s[0],s[1]);o=qt[r.arrowTypeStart]*Math.cos(b)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(qt,r.arrowTypeEnd)){let{angle:b,deltaX:S}=$o(s[s.length-1],s[s.length-2]);o=qt[r.arrowTypeEnd]*Math.cos(b)*(S>=0?1:-1)}let c=Math.abs(ce(e).x-ce(s[s.length-1]).x),n=Math.abs(ce(e).y-ce(s[s.length-1]).y),d=Math.abs(ce(e).x-ce(s[0]).x),f=Math.abs(ce(e).y-ce(s[0]).y),u=qt[r.arrowTypeStart],m=qt[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="right"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="right"?-1:1,o+=b}return ce(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ce(s[0]).y<ce(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(qt,r.arrowTypeStart)){let{angle:b,deltaY:S}=$o(s[0],s[1]);o=qt[r.arrowTypeStart]*Math.abs(Math.sin(b))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(qt,r.arrowTypeEnd)){let{angle:b,deltaY:S}=$o(s[s.length-1],s[s.length-2]);o=qt[r.arrowTypeEnd]*Math.abs(Math.sin(b))*(S>=0?1:-1)}let c=Math.abs(ce(e).y-ce(s[s.length-1]).y),n=Math.abs(ce(e).x-ce(s[s.length-1]).x),d=Math.abs(ce(e).y-ce(s[0]).y),f=Math.abs(ce(e).x-ce(s[0]).x),u=qt[r.arrowTypeStart],m=qt[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="up"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="up"?-1:1,o+=b}return ce(e).y+o},"y")}),"getLineFunctionsWithOffset"),K1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)_y(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)_y(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),Z1={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}},Q1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],_y=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=Z1[i],f=d&&Q1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,b=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${b}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(b);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((F)=>{if(F.setAttribute("stroke",n),d.fill)F.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${b})`)},"addEdgeMarker"),J1=t((r)=>typeof r==="string"?r:p()?.flowchart?.curve,"resolveEdgeCurveType"),Os=new Map,Ht=new Map,Zg=t(()=>{Os.clear(),Ht.clear()},"clear"),Vf=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Eo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),ga=t(async(r,e)=>{let i=p(),s=jt(i),{labelStyles:o}=Q(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await sn(r,e.label,{style:Eo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,m;if(s){let b=f.children[0],S=h(f);u=await ur.measure(()=>b.getBoundingClientRect()),m=u,S.attr("width",u.width),S.attr("height",u.height)}else{let b=h(f).select("text").node();await ur.measure(()=>{if(u=f.getBBox(),b&&typeof b.getBBox==="function")m=b.getBBox();else m=u})}c.attr("transform",Mo(m,s)),Os.set(e.id,a),e.width=u.width,e.height=u.height;let x;if(e.startLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Ht.get(e.id))Ht.set(e.id,{});Ht.get(e.id).startLeft=b,Io(x,e.startLabelLeft)}if(e.startLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Ht.get(e.id))Ht.set(e.id,{});Ht.get(e.id).startRight=b,Io(x,e.startLabelRight)}if(e.endLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Ht.get(e.id))Ht.set(e.id,{});Ht.get(e.id).endLeft=b,Io(x,e.endLabelLeft)}if(e.endLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Ht.get(e.id))Ht.set(e.id,{});Ht.get(e.id).endRight=b,Io(x,e.endLabelRight)}return f},"insertEdgeLabel");function Io(r,e){if(jt(p())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Io,"setTerminalWidth");var $s=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,Os.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=p(),{subGraphTitleTotalMargin:o}=ma(s);if(r.label){let a=Os.get(r.id),{x:c,y:n}=r;if(i){let d=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Ht.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Ht.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Ht.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Ht.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),t2=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"),e2=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),r2=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 x=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",m);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,x),e.calcIntersect=function(b,S){return N.rect(b,S)},e.intersect=function(b){return N.rect(e,b)},o}t(my,"defaultMindmapNode");async function yy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(yy,"mindmapCircle");var F1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Gm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:jm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Vm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Jm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:hm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:cm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:mm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:qg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:em},{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:lm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:py},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:gy},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Cm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:oy},{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:_m},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:dm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ry},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Gg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Um},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Qm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ym},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:om},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:sm},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:am},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Mm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ny},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:xm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:iy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Am},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:um},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ay},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:hy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:pm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:sy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Xm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Wm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:qm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Rg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:im},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ey},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ty},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ly},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Hm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Em}],M1=t(()=>{let e=[...Object.entries({state:Km,choice:Qg,note:Nm,composite:tm,rectWithTitle:Ym,labelRect:vm,block_arrow:jg,collapsedGroup:zg,iconSquare:Tm,iconCircle:wm,icon:km,iconRounded:Sm,imageSquare:Bm,anchor:Dg,kanbanItem:fy,mindmapCircle:yy,defaultMindmapNode:my,classBox:uy,erBox:xc,requirementBox:dy,usecaseActor:$m,usecaseActorHollow:Om,usecaseActorAwesome:Im,usecaseActorIcon:Dm,usecaseBusiness:Pm,usecaseEllipse:fm,usecaseJsonTable:Rm}),...F1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Uu=M1();function nc(r){return r in Uu}t(nc,"isValidShape");var ma=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"),la=new Map;async function fa(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?Uu[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",ue(e.look)),e.tooltip)o.attr("title",e.tooltip);if(la.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(fa,"insertNode");var nA=t((r,e)=>{la.set(e.id,r)},"setNodeElem"),rA=t(()=>{la.clear()},"clear"),jr=t((r)=>{let e=la.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 A1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:m,borderStyles:x,backgroundStyles:b}=Q(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);Yn(S,e.colorIndex,s,d);let T=$r(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await ln(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),F=v.getBBox();if(T){let it=v.children[0],P=h(v);F=it.getBoundingClientRect(),P.attr("width",F.width),P.attr("height",F.height)}let I=e.padding??0,O=e.width<=F.width+I?F.width+I:e.width;if(e.width<=F.width+I)e.diff=(O-e.width)/2-I;else e.diff=-I;let K=e.height,Z=e.y-K/2,rt=e.y+K/2,st=e.x-O/2,ut=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+K/3,ct=B?4:0,nt=F.height+2*ct,D,U;if(B){let it=Math.max(nt,F.height+2*ct),P=st+it,ht=Math.max(0,O-it);if(e.look==="handDrawn"){let At=y.svg(S),Gt=vt(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Vt=vt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Qt=At.rectangle(st,Z,it,K,Gt);D=S.insert(()=>Qt,":first-child").attr("class","swimlane-title");let Jt=At.rectangle(P,Z,ht,K,Vt);U=S.insert(()=>Jt,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",x.join(";")),D.select("path").attr("style",b.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",st).attr("y",Z).attr("width",it).attr("height",K).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",P).attr("y",Z).attr("width",ht).attr("height",K).attr("fill","none").attr("stroke",f);let lt=st+it/2,Bt=e.y;_.attr("transform",`translate(${lt}, ${Bt}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let it=Math.max(0,ut-Z),P=Math.min(nt,it),ht=Z+P,lt=Math.max(0,rt-ht),Bt=e.x-O/2;if(e.look==="handDrawn"){let Vt=y.svg(S),Qt=vt(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Jt=vt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Pt=Vt.rectangle(Bt,Z,O,P,Qt);D=S.insert(()=>Pt,":first-child").attr("class","swimlane-title");let It=Vt.rectangle(Bt,ht,O,lt,Jt);U=S.insert(()=>It,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",x.join(";")),D.select("path").attr("style",b.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",Bt).attr("y",Z).attr("width",O).attr("height",P).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",Bt).attr("y",ht).attr("width",O).attr("height",lt).attr("fill","none").attr("stroke",f);let At=e.x-F.width/2,Gt=Z+(P-F.height)/2;_.attr("transform",`translate(${At}, ${Gt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let it=_.select("span");if(it)it.attr("style",u)}return e.offsetX=0,e.width=O,e.height=K,e.offsetY=F.height-I/2,e.intersect=function(it){return Je(e,it)},{cluster:S,labelBBox:F}},"swimlane"),xy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:m,backgroundStyles:x}=Q(e),b=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Yn(b,e.colorIndex,s,d);let S=qt(i),T=b.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await ln(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await Ne(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(qt(i)){let st=B.children[0],ut=h(B);_=st.getBoundingClientRect(),ut.attr("width",_.width),ut.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 F=e.height,I=e.x-v/2,O=e.y-F/2;l.trace("Data ",e,JSON.stringify(e));let K;if(e.look==="handDrawn"){let st=y.svg(b),ut=vt(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),ct=st.path(Me(I,O,v,F,0),ut);K=b.insert(()=>(l.debug("Rough node insert CXC",ct),ct),":first-child"),K.select("path:nth-child(2)").attr("style",m.join(";")),K.select("path").attr("style",x.join(";").replace("fill","stroke"))}else K=b.insert("rect",":first-child"),K.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",I).attr("y",O).attr("width",v).attr("height",F);let{subGraphTitleTopMargin:Z}=ma(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Z})`),f){let st=T.select("span");if(st)st.attr("style",f)}let rt=K.node().getBBox();return e.offsetX=0,e.width=rt.width,e.height=rt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(st){return Je(e,st)},{cluster:b,labelBBox:_}},"rect"),E1=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 c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),$1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,m=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Yn(m,e.colorIndex,s,n);let x=m.insert("g",":first-child"),b=m.insert("g").attr("class","cluster-label"),S=m.append("rect"),T=await Ne(b,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(qt(i)){let ct=T.children[0],nt=h(T);B=ct.getBoundingClientRect(),nt.attr("width",B.width),nt.attr("height",B.height)}let _=0*e.padding,v=_/2,F=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(F-e.width)/2-e.padding;else e.diff=-e.padding;let I=e.height+_,O=e.height+_-B.height-6,K=e.x-F/2,Z=e.y-I/2;e.width=F;let rt=e.y-e.height/2-v+B.height+2,st;if(e.look==="handDrawn"){let ct=e.cssClasses.includes("statediagram-cluster-alt"),nt=y.svg(m),D=e.rx||e.ry?nt.path(Me(K,Z,F,I,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):nt.rectangle(K,Z,F,I,{seed:a});st=m.insert(()=>D,":first-child");let U=nt.rectangle(K,rt,F,O,{fill:ct?c:d,fillStyle:ct?"hachure":"solid",stroke:u,seed:a});st=m.insert(()=>D,":first-child"),S=m.insert(()=>U),st.attr("class","outer"),S.attr("class","inner")}else{st=x.insert("rect",":first-child");let ct="outer";st.attr("class",ct).attr("x",K).attr("y",Z).attr("width",F).attr("height",I).attr("data-look",e.look),S.attr("class","inner").attr("x",K).attr("y",rt).attr("width",F).attr("height",O)}b.attr("transform",`translate(${e.x-B.width/2}, ${Z+1-(qt(i)?0:3)})`);let ut=st.node().getBBox();return e.height=ut.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(ct){return Je(e,ct)},{cluster:m,labelBBox:B}},"roundedWithTitle"),I1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=Q(e),m=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=qt(i),b=m.insert("g").attr("class","cluster-label "),S=await ln(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}),T=S.getBBox();if(qt(i)){let Z=S.children[0],rt=h(S);T=Z.getBoundingClientRect(),rt.attr("width",T.width),rt.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,F=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let I;if(e.look==="handDrawn"){let Z=y.svg(m),rt=vt(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),st=Z.path(Me(v,F,B,_,e.rx),rt);I=m.insert(()=>(l.debug("Rough node insert CXC",st),st),":first-child"),I.select("path:nth-child(2)").attr("style",f.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=m.insert("rect",":first-child"),I.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",F).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:O}=ma(i);if(b.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+O})`),n){let Z=b.select("span");if(Z)Z.attr("style",n)}let K=I.node().getBBox();return e.offsetX=0,e.width=K.width,e.height=K.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Z){return Je(e,Z)},{cluster:m,labelBBox:T}},"kanbanSection"),O1=t((r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Yn(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),m=0*e.padding,x=e.width+m;e.diff=-e.padding;let b=e.height+m,S=e.x-x/2,T=e.y-b/2;e.width=x;let B;if(e.look==="handDrawn"){let F=y.svg(f).rectangle(S,T,x,b,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>F,":first-child").attr("class","divider")}else{B=u.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",x).attr("height",b).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),D1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=p(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=Q(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Yn(u,e.colorIndex,o,n);let m=qt(s),x=u.insert("g").attr("class","cluster-label"),b={width:0,height:0},S=e.label?.trim();if(S){let O;if(e.labelType==="markdown")O=await ln(x,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});else O=await Ne(x,e.label,e.labelStyle||"",!1,!0);if(b=O.getBBox(),m){let K=O.children[0],Z=h(O);b=K.getBoundingClientRect(),Z.attr("width",b.width),Z.attr("height",b.height)}}let T=e.width<=b.width+e.padding?b.width+e.padding:e.width;if(e.width<=b.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,F;if(e.look==="handDrawn"){let O=y.svg(u),K=vt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=O.path(Me(_,v,T,B,i.rx),K);F=u.insert(()=>Z,":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";"))}else if(F=u.insert("rect",":first-child"),F.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)F.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:O}=ma(s);if(x.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+O})`),d){let K=x.select("span");if(K)K.attr("style",d)}}let I=F.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=b.height-e.padding/2,e.intersect=function(O){return Je(e,O)},{cluster:u,labelBBox:b}},"createContainerGroup"),P1=t(async(r,e)=>{let{themeVariables:i}=p(),s=i.flowContainerStroke||i.secondaryBorderColor;return D1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),R1=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),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),q1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=Q(e),{stylesMap:m}=Ge(e),x=e.boundaryType||"rect",b=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${x} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",x).attr("data-look",e.look);Yn(b,e.colorIndex,s,d);let S=qt(i),T=b.insert("g").attr("class","cluster-label system-boundary-title"),B=await ln(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let D=B.children[0],U=h(B);_=D.getBoundingClientRect(),U.attr("width",_.width),U.attr("height",_.height)}let v=R1(e,_),{width:F,height:I,x:O,y:K,bodyY:Z,bodyHeight:rt,tabHeight:st,tabWidth:ut}=v;e.diff=e.width<=_.width+e.padding?(F-e.width)/2-e.padding:-e.padding;let ct=vt(e,{fill:m.get("fill")||c,stroke:m.get("stroke")||n,strokeWidth:m.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let D=y.svg(b),U=D.rectangle(O,Z,F,rt,ct);if(b.insert(()=>U,":first-child").attr("class","boundary-body label-container"),x==="package"){let it=D.rectangle(O,K,ut,st,ct);b.insert(()=>it,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(b.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",O).attr("y",Z).attr("width",F).attr("height",rt),x==="package")b.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",O).attr("y",K).attr("width",ut).attr("height",st);let{subGraphTitleTopMargin:nt}=ma(i);if(x==="package")T.attr("transform",`translate(${O+(ut-_.width)/2}, ${K+(st-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${K+nt})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=F,e.height=I,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(D){return Je(e,D)},{cluster:b,labelBBox:_}},"usecaseSystemBoundary"),W1=xy,N1={rect:xy,squareRect:W1,roundedWithTitle:$1,noteGroup:E1,divider:O1,kanbanSection:I1,flowGroup:P1,usecaseSystemBoundary:q1,swimlane:A1},z1=new Set(["noteGroup","divider"]),Zf=t((r)=>!z1.has(r??"rect"),"clusterPaintsTitle"),Cy=new Map,ho=t(async(r,e)=>{let i=e.shape||"rect",s=await N1[i](r,e);return Cy.set(e.id,s),s},"insertCluster"),aA=t(()=>{Cy=new Map},"clear");var Mo=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"),Ht={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},Rp={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $o(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ce(r),e=ce(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t($o,"calculateDeltaAndAngle");var ce=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),H1=t((r)=>({x:t(function(e,i,s){let o=0,a=ce(s[0]).x<ce(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:b,deltaX:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.cos(b)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:b,deltaX:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.cos(b)*(S>=0?1:-1)}let c=Math.abs(ce(e).x-ce(s[s.length-1]).x),n=Math.abs(ce(e).y-ce(s[s.length-1]).y),d=Math.abs(ce(e).x-ce(s[0]).x),f=Math.abs(ce(e).y-ce(s[0]).y),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="right"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="right"?-1:1,o+=b}return ce(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ce(s[0]).y<ce(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:b,deltaY:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.abs(Math.sin(b))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:b,deltaY:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.abs(Math.sin(b))*(S>=0?1:-1)}let c=Math.abs(ce(e).y-ce(s[s.length-1]).y),n=Math.abs(ce(e).x-ce(s[s.length-1]).x),d=Math.abs(ce(e).y-ce(s[0]).y),f=Math.abs(ce(e).x-ce(s[0]).x),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="up"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="up"?-1:1,o+=b}return ce(e).y+o},"y")}),"getLineFunctionsWithOffset"),Y1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)by(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)by(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),j1={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}},U1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],by=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=j1[i],f=d&&U1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,b=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${b}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(b);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((F)=>{if(F.setAttribute("stroke",n),d.fill)F.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${b})`)},"addEdgeMarker"),X1=t((r)=>typeof r==="string"?r:p()?.flowchart?.curve,"resolveEdgeCurveType"),zs=new Map,Wt=new Map,oA=t(()=>{zs.clear(),Wt.clear()},"clear"),Xf=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Eo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),ga=t(async(r,e)=>{let i=p(),s=qt(i),{labelStyles:o}=Q(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await ln(r,e.label,{style:Eo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,m;if(s){let b=f.children[0],S=h(f);u=await hr.measure(()=>b.getBoundingClientRect()),m=u,S.attr("width",u.width),S.attr("height",u.height)}else{let b=h(f).select("text").node();await hr.measure(()=>{if(u=f.getBBox(),b&&typeof b.getBBox==="function")m=b.getBBox();else m=u})}c.attr("transform",Mo(m,s)),zs.set(e.id,a),e.width=u.width,e.height=u.height;let x;if(e.startLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startLeft=b,Io(x,e.startLabelLeft)}if(e.startLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startRight=b,Io(x,e.startLabelRight)}if(e.endLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endLeft=b,Io(x,e.endLabelLeft)}if(e.endLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endRight=b,Io(x,e.endLabelRight)}return f},"insertEdgeLabel");function Io(r,e){if(qt(p())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Io,"setTerminalWidth");var Us=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,zs.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=p(),{subGraphTitleTotalMargin:o}=ma(s);if(r.label){let a=zs.get(r.id),{x:c,y:n}=r;if(i){let d=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Wt.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Wt.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Wt.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Wt.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),G1=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"),V1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),K1=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),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let m=i.y<e.y?e.y-d-o:o-d-e.y;n=u*m/f;let x={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-m:i.y-f+m};if(n===0)x.x=e.x,x.y=e.y;if(u===0)x.x=e.x;if(f===0)x.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${m}, R ${u}, r ${n}`,x),x}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let m=f*n/u,x=i.x<e.x?i.x+u-n:i.x-u+n,b=i.y<e.y?i.y+m:i.y-m;if(l.debug(`sides calc abc89, Q ${f}, q ${m}, R ${u}, r ${n}`,{_x:x,_y:b}),n===0)x=e.x,b=e.y;if(u===0)x=e.x;if(f===0)b=e.y;return{x,y:b}}},"intersection"),vy=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),!e2(e,a)&&!o){let c=r2(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,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 Fy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(Fy,"extractCornerPoints");var Ly=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),i2=t(function(r){let{cornerPointPositions:e}=Fy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=Ly(o,c,5),d=Ly(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let m=Math.sqrt(2)*2,x={x:c.x,y:c.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 b=5;if(c.x===n.x)x={x:f<0?n.x-b+m:n.x+b-m,y:u<0?n.y-m:n.y+m};else x={x:f<0?n.x-m:n.x+m,y:u<0?n.y-b+m:n.y+b-m}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(x,d)}else i.push(r[s]);return i},"fixCorners"),o2=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),Ao=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=p(),u=e.points,m=!1,x=o;var b=a;let S=[];for(let lt in e.cssCompiledStyles){if(Qu(lt))continue;S.push(e.cssCompiledStyles[lt])}if(f==="swimlane"){if(b.intersect&&x.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[x.intersect(u[0]),b.intersect(u[1])];else{let lt=u.slice(1,-1),Bt=lt[0],vt=lt[lt.length-1],Xt=0.5,Vt=Math.abs(u[u.length-1].x-vt.x)<0.5&&Math.abs(u[u.length-1].y-vt.y)<0.5,Qt=x.intersect(Bt),Jt=Vt?vt:b.intersect(vt),Dt=Math.abs(Jt.x-vt.x)<0.5&&Math.abs(Jt.y-vt.y)<0.5,Nt=Math.abs(Qt.x-Bt.x)<0.5&&Math.abs(Qt.y-Bt.y)<0.5?[]:[Qt],Kt=Dt?[]:[Jt];u=[...Nt,...lt,...Kt]}u=t2(e,u)}else if(b.intersect&&x.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(x.intersect(u[0])),u.push(b.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=vy(e.points,i.get(e.toCluster).node),m=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=vy(u.reverse(),i.get(e.fromCluster).node).reverse(),m=!0;let B=u.filter((lt)=>!Number.isNaN(lt.y)),_=J1(e.curve);if(_!=="rounded")B=i2(B);let v=pa;switch(_){case"linear":v=pa;break;case"basis":v=vr;break;case"cardinal":v=so;break;case"bumpX":v=ro;break;case"bumpY":v=io;break;case"catmullRom":v=no;break;case"monotoneX":v=lo;break;case"monotoneY":v=ho;break;case"natural":v=ii;break;case"step":v=oi;break;case"stepAfter":v=yo;break;case"stepBefore":v=go;break;case"rounded":v=pa;break;default:v=vr}let{x:F,y:I}=V1(e),O=Ms().x(F).y(I).curve(v),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,rt=_==="rounded"?My(Ay(B,e),5):O(B),st=Array.isArray(e.style)?e.style:[e.style],ut=st.find((lt)=>lt?.startsWith("stroke:")),ct="";if(e.animate)ct="edge-animation-fast";if(e.animation)ct="edge-animation-"+e.animation;let nt=!1;if(e.look==="handDrawn"){let lt=y.svg(r);Object.assign([],B);let Bt=lt.path(rt,{roughness:0.3,seed:d});K+=" transition",Z=h(Bt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",st?st.reduce((Xt,Vt)=>Xt+";"+Vt,""):"");let vt=Z.attr("d");Z.attr("d",vt),r.node().appendChild(Z.node())}else{let lt=S.join(";"),Bt=st?st.reduce((Dt,At)=>Dt+At+";",""):"",vt=(lt?lt+";"+Bt+";":Bt)+";"+(st?st.reduce((Dt,At)=>Dt+";"+At,""):"");Z=r.append("path").attr("d",rt).attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",vt),ut=vt.match(/stroke:([^;]+)/)?.[1],nt=e.animate===!0||!!e.animation||lt.includes("animation");let Xt=Z.node(),Vt=typeof Xt.getTotalLength==="function"?Xt.getTotalLength():0,Qt=Tp[e.arrowTypeStart]||0,Jt=Tp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!nt){let At=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?o2(Vt,Qt,Jt):`0 ${Qt} ${Vt-Qt-Jt} ${Jt}`}; stroke-dashoffset: 0;`;Z.attr("style",At+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",ue(e.look)),e.showPoints)B.forEach((lt)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",lt.x).attr("cy",lt.y)});let D="";if(p().flowchart.arrowMarkerAbsolute||p().state.arrowMarkerAbsolute)D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let U=!nt&&e?.look==="neo";K1(Z,e,D,c,s,U,ut);let it=Math.floor(u.length/2),P=u[it];if(!V.isLabelCoordinateInPath(P,Z.attr("d")))m=!0;let ht={};if(m)ht.updatedPath=u;return ht.originalPath=e.points,ht},"insertEdge");function My(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,m=d.x-c.x,x=d.y-c.y,b=Math.hypot(f,u),S=Math.hypot(m,x);if(b<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/b,B=u/b,_=m/S,v=x/S,F=T*_+B*v,I=Math.max(-1,Math.min(1,F)),O=Math.acos(I);if(O<o||Math.abs(Math.PI-O)<o){i+=`L${c.x},${c.y}`;continue}let K=Math.min(e/Math.sin(O/2),b/2,S/2),Z=c.x-T*K,rt=c.y-B*K,st=c.x+_*K,ut=c.y+v*K;i+=`L${Z},${rt}`,i+=`Q${c.x},${c.y} ${st},${ut}`}}return i}t(My,"generateRoundedPath");function Cc(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(Cc,"calculateDeltaAndAngle");function Ay(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&qt[e.arrowTypeStart]){let o=qt[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=Cc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&qt[e.arrowTypeEnd]){let o=qt[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=Cc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(Ay,"applyMarkerOffsetsToPoints");var s2=t((r,e,i,s)=>{e.forEach((o)=>{F2[o](r,i,s)})},"insertMarkers"),a2=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"),n2=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"),l2=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"),h2=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"),c2=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"),u2=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"),d2=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"),f2=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"),p2=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"),g2=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"),m2=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"),y2=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"),x2=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"),C2=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"),b2=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"),k2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=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",c??"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 d=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");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),w2=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"),S2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=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",c??"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 d=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");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),T2=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),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let m=i.y<e.y?e.y-d-o:o-d-e.y;n=u*m/f;let x={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-m:i.y-f+m};if(n===0)x.x=e.x,x.y=e.y;if(u===0)x.x=e.x;if(f===0)x.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${m}, R ${u}, r ${n}`,x),x}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let m=f*n/u,x=i.x<e.x?i.x+u-n:i.x-u+n,b=i.y<e.y?i.y+m:i.y-m;if(l.debug(`sides calc abc89, Q ${f}, q ${m}, R ${u}, r ${n}`,{_x:x,_y:b}),n===0)x=e.x,b=e.y;if(u===0)x=e.x;if(f===0)b=e.y;return{x,y:b}}},"intersection"),ky=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),!V1(e,a)&&!o){let c=K1(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,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 Sy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(Sy,"extractCornerPoints");var wy=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),Z1=t(function(r){let{cornerPointPositions:e}=Sy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=wy(o,c,5),d=wy(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let m=Math.sqrt(2)*2,x={x:c.x,y:c.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 b=5;if(c.x===n.x)x={x:f<0?n.x-b+m:n.x+b-m,y:u<0?n.y-m:n.y+m};else x={x:f<0?n.x-m:n.x+m,y:u<0?n.y-b+m:n.y+b-m}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(x,d)}else i.push(r[s]);return i},"fixCorners"),Q1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),bo=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=p(),u=e.points,m=!1,x=o;var b=a;let S=[];for(let lt in e.cssCompiledStyles){if(Mu(lt))continue;S.push(e.cssCompiledStyles[lt])}if(f==="swimlane"){if(b.intersect&&x.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[x.intersect(u[0]),b.intersect(u[1])];else{let lt=u.slice(1,-1),Bt=lt[0],At=lt[lt.length-1],Gt=0.5,Vt=Math.abs(u[u.length-1].x-At.x)<0.5&&Math.abs(u[u.length-1].y-At.y)<0.5,Qt=x.intersect(Bt),Jt=Vt?At:b.intersect(At),Pt=Math.abs(Jt.x-At.x)<0.5&&Math.abs(Jt.y-At.y)<0.5,zt=Math.abs(Qt.x-Bt.x)<0.5&&Math.abs(Qt.y-Bt.y)<0.5?[]:[Qt],Kt=Pt?[]:[Jt];u=[...zt,...lt,...Kt]}u=G1(e,u)}else if(b.intersect&&x.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(x.intersect(u[0])),u.push(b.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=ky(e.points,i.get(e.toCluster).node),m=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=ky(u.reverse(),i.get(e.fromCluster).node).reverse(),m=!0;let B=u.filter((lt)=>!Number.isNaN(lt.y)),_=X1(e.curve);if(_!=="rounded")B=Z1(B);let v=pa;switch(_){case"linear":v=pa;break;case"basis":v=vr;break;case"cardinal":v=so;break;case"bumpX":v=ro;break;case"bumpY":v=io;break;case"catmullRom":v=no;break;case"monotoneX":v=lo;break;case"monotoneY":v=co;break;case"natural":v=ii;break;case"step":v=oi;break;case"stepAfter":v=go;break;case"stepBefore":v=uo;break;case"rounded":v=pa;break;default:v=vr}let{x:F,y:I}=H1(e),O=Os().x(F).y(I).curve(v),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,rt=_==="rounded"?Ty(By(B,e),5):O(B),st=Array.isArray(e.style)?e.style:[e.style],ut=st.find((lt)=>lt?.startsWith("stroke:")),ct="";if(e.animate)ct="edge-animation-fast";if(e.animation)ct="edge-animation-"+e.animation;let nt=!1;if(e.look==="handDrawn"){let lt=y.svg(r);Object.assign([],B);let Bt=lt.path(rt,{roughness:0.3,seed:d});K+=" transition",Z=h(Bt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",st?st.reduce((Gt,Vt)=>Gt+";"+Vt,""):"");let At=Z.attr("d");Z.attr("d",At),r.node().appendChild(Z.node())}else{let lt=S.join(";"),Bt=st?st.reduce((Pt,It)=>Pt+It+";",""):"",At=(lt?lt+";"+Bt+";":Bt)+";"+(st?st.reduce((Pt,It)=>Pt+";"+It,""):"");Z=r.append("path").attr("d",rt).attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",At),ut=At.match(/stroke:([^;]+)/)?.[1],nt=e.animate===!0||!!e.animation||lt.includes("animation");let Gt=Z.node(),Vt=typeof Gt.getTotalLength==="function"?Gt.getTotalLength():0,Qt=Rp[e.arrowTypeStart]||0,Jt=Rp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!nt){let It=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?Q1(Vt,Qt,Jt):`0 ${Qt} ${Vt-Qt-Jt} ${Jt}`}; stroke-dashoffset: 0;`;Z.attr("style",It+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",ue(e.look)),e.showPoints)B.forEach((lt)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",lt.x).attr("cy",lt.y)});let D="";if(p().flowchart.arrowMarkerAbsolute||p().state.arrowMarkerAbsolute)D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let U=!nt&&e?.look==="neo";Y1(Z,e,D,c,s,U,ut);let it=Math.floor(u.length/2),P=u[it];if(!V.isLabelCoordinateInPath(P,Z.attr("d")))m=!0;let ht={};if(m)ht.updatedPath=u;return ht.originalPath=e.points,ht},"insertEdge");function Ty(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,m=d.x-c.x,x=d.y-c.y,b=Math.hypot(f,u),S=Math.hypot(m,x);if(b<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/b,B=u/b,_=m/S,v=x/S,F=T*_+B*v,I=Math.max(-1,Math.min(1,F)),O=Math.acos(I);if(O<o||Math.abs(Math.PI-O)<o){i+=`L${c.x},${c.y}`;continue}let K=Math.min(e/Math.sin(O/2),b/2,S/2),Z=c.x-T*K,rt=c.y-B*K,st=c.x+_*K,ut=c.y+v*K;i+=`L${Z},${rt}`,i+=`Q${c.x},${c.y} ${st},${ut}`}}return i}t(Ty,"generateRoundedPath");function Cc(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(Cc,"calculateDeltaAndAngle");function By(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ht[e.arrowTypeStart]){let o=Ht[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=Cc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&Ht[e.arrowTypeEnd]){let o=Ht[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=Cc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(By,"applyMarkerOffsetsToPoints");var J1=t((r,e,i,s)=>{e.forEach((o)=>{S2[o](r,i,s)})},"insertMarkers"),t2=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"),e2=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"),r2=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"),i2=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"),o2=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"),s2=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"),a2=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"),n2=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"),l2=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"),h2=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"),c2=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"),u2=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"),d2=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"),f2=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"),p2=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"),g2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=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",c??"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 d=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");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),m2=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"),y2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=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",c??"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 d=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");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),x2=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"),B2=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
296
+ L0,20`)},"requirement_arrow"),C2=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"),_2=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"),v2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=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");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),L2=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"),F2={extension:a2,composition:n2,aggregation:l2,dependency:h2,lollipop:c2,point:u2,circle:d2,cross:f2,barb:p2,barbNeo:g2,hierarchy:L2,only_one:m2,zero_or_one:y2,one_or_more:x2,zero_or_more:C2,only_one_neo:b2,zero_or_one_neo:k2,one_or_more_neo:w2,zero_or_more_neo:S2,requirement_arrow:T2,requirement_contains:_2,requirement_arrow_neo:B2,requirement_contains_neo:v2},zs=s2;var M2={common:w,getConfig:C,insertCluster:fo,insertEdge:Ao,insertEdgeLabel:ga,insertMarkers:zs,insertNode:fa,interpolateToCurve:Ws,labelHelper:X,log:l,positionEdgeLabel:$s},A2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Oo=Object.create(null),Yf=t((r)=>{for(let e of r)Oo[e.name]=e},"registerLayoutLoaders"),E2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-gkhz67v6.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...A2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),$2=t(()=>{Yf([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-7wgbx6cm.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-5n1qq48r.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-qb2t8qq5.js"),"loader")},...E2()])},"registerDefaultLayoutLoaders");$2();var Rt=t(async(r,e)=>{if(!Object.hasOwn(Oo,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=Oo[r.layoutAlgorithm],s=await i.loader();return ip(e,r.config),s.render(r,e,M2,{algorithm:i.algorithm})},"render"),bc="dagre",Ft=t((r="",{fallback:e=bc}={})=>{if(Object.hasOwn(Oo,r))return r;for(let i of[e,bc])if(Object.hasOwn(Oo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${bc} is registered.`)},"getRegisteredLayoutAlgorithm");var Qn=t(()=>`
299
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),b2=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"),k2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=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");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),w2=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"),S2={extension:t2,composition:e2,aggregation:r2,dependency:i2,lollipop:o2,point:s2,circle:a2,cross:n2,barb:l2,barbNeo:h2,hierarchy:w2,only_one:c2,zero_or_one:u2,one_or_more:d2,zero_or_more:f2,only_one_neo:p2,zero_or_one_neo:g2,one_or_more_neo:m2,zero_or_more_neo:y2,requirement_arrow:x2,requirement_contains:b2,requirement_arrow_neo:C2,requirement_contains_neo:k2},Gs=J1;var T2={common:w,getConfig:C,insertCluster:ho,insertEdge:bo,insertEdgeLabel:ga,insertMarkers:Gs,insertNode:fa,interpolateToCurve:Rs,labelHelper:X,log:l,positionEdgeLabel:Us},B2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Oo=Object.create(null),eg=t((r)=>{for(let e of r)Oo[e.name]=e},"registerLayoutLoaders"),_2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-vddwbn6q.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...B2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),v2=t(()=>{eg([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-j2wt7ns6.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-v50cx1nx.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-fsn80psf.js"),"loader")},..._2()])},"registerDefaultLayoutLoaders");v2();var Ft=t(async(r,e)=>{if(!Object.hasOwn(Oo,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=Oo[r.layoutAlgorithm],s=await i.loader();return up(e,r.config),s.render(r,e,T2,{algorithm:i.algorithm})},"render"),bc="dagre",Lt=t((r="",{fallback:e=bc}={})=>{if(Object.hasOwn(Oo,r))return r;for(let i of[e,bc])if(Object.hasOwn(Oo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${bc} 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 Lt=t((r,e)=>{let i;if(e==="sandbox")i=h("#i"+r);return(e==="sandbox"?h(i.nodes()[0].contentDocument.body):h("body")).select(`[id="${r}"]`)},"getDiagramElement");var ft=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=I2(r,e);te(r,a,o,s);let d=O2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),I2=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"),O2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
- export{t,co,ep,l,Su,pt,ua,Be,Ol,g,A,Lf,Mf,Qi,$l,tp,Og,Ve,Gt,uo,Y,Pf,Vo,Or,np,$g,zg,Ug,Of,$f,C,Gg,Tu,jg,jt,Fs,ee,zf,po,It,zl,Ul,w,te,$r,rp,qg,ap,R,M,G,z,j,H,q,p,da,Ri,Gl,Du,op,h,Fi,jl,Li,Oa,Uf,Dn,ql,Hg,Yo,Ls,En,Hl,mo,Hn,yt,Wl,zr,Nu,pa,Ms,de,sr,lr,ip,Qu,Q,Gf,Mi,cr,Ps,Pi,Jo,sp,Kl,Vl,Yl,Jl,lp,cp,up,dp,pp,mp,fp,gp,Ap,hp,bp,yp,vp,kp,xp,wp,Cp,Zo,Zl,Ru,Ep,jf,Wg,Bp,qf,Hf,Oi,Fu,Wn,Lu,Ip,Nn,ie,V,Kg,$a,Bn,_p,Sp,Wf,sn,Mu,mt,et,tt,Ur,Kn,Vn,y,X,W,N,Pu,Xl,ma,fa,Vg,Yg,Gr,Kf,fo,Jg,qt,Tp,Os,Ht,Zg,Vf,ga,$s,Ao,zs,Yf,Rt,Ft,Qn,Lt,ft};
313
+ `,"getIconStyles");var Mt=t((r,e)=>{let i;if(e==="sandbox")i=h("#i"+r);return(e==="sandbox"?h(i.nodes()[0].contentDocument.body):h("body")).select(`[id="${r}"]`)},"getDiagramElement");var ft=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=L2(r,e);te(r,a,o,s);let d=F2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),L2=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"),F2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
+ export{t,po,ap,l,Qu,pt,ua,Ie,Ul,g,A,$f,zf,Qi,Gl,op,Hg,Ve,jt,mo,Y,Uf,Vo,$r,ip,Wg,Kg,Vg,Gf,jf,C,Yg,Ru,Jg,qt,Ms,ee,qf,fo,_t,jl,ql,w,te,zr,sp,Zg,lp,R,M,G,z,j,H,q,p,da,Ri,Hl,Fu,cp,h,Fi,Wl,Li,Oa,Hf,Dn,Kl,Xg,Yo,Ps,En,Vl,Ao,Wn,yt,Yl,Ur,Lu,pa,Os,de,lr,cr,up,Mu,Q,Wf,Mi,ur,$s,Pi,Jo,dp,Jl,Zl,Xl,ec,pp,mp,fp,gp,Ap,hp,bp,yp,vp,kp,xp,wp,Cp,Ep,Bp,Ip,_p,Zo,tc,Pu,Sp,Kf,eA,Tp,Vf,Yf,Oi,Ou,Kn,$u,Dp,Nn,ie,V,tA,$a,Bn,Np,Qp,Jf,ln,zu,mt,et,tt,Gr,Vn,Yn,y,X,W,N,Uu,nc,ma,fa,nA,rA,jr,Zf,ho,aA,Ht,Rp,zs,Wt,oA,Xf,ga,Us,bo,Gs,eg,Ft,Lt,Qn,Mt,ft};