@reqvire-org/reqvire 0.15.2 → 1.0.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 (372) hide show
  1. package/artifacts/reqvire-darwin-arm64.tar.gz +0 -0
  2. package/artifacts/reqvire-darwin-x86_64.tar.gz +0 -0
  3. package/artifacts/reqvire-linux-x86_64.tar.gz +0 -0
  4. package/explorer-dist/assets/android-chrome-192x192.png +0 -0
  5. package/explorer-dist/assets/apple-touch-icon.png +0 -0
  6. package/explorer-dist/assets/browserconfig.xml +9 -0
  7. package/explorer-dist/assets/explorer-abap.js +1 -0
  8. package/explorer-dist/assets/explorer-actionscript-3.js +1 -0
  9. package/explorer-dist/assets/explorer-ada.js +1 -0
  10. package/explorer-dist/assets/explorer-andromeeda.js +1 -0
  11. package/explorer-dist/assets/explorer-angular-html.js +1 -0
  12. package/explorer-dist/assets/explorer-angular-ts.js +1 -0
  13. package/explorer-dist/assets/explorer-apache.js +1 -0
  14. package/explorer-dist/assets/explorer-apex.js +1 -0
  15. package/explorer-dist/assets/explorer-apl.js +1 -0
  16. package/explorer-dist/assets/explorer-applescript.js +1 -0
  17. package/explorer-dist/assets/explorer-ara.js +1 -0
  18. package/explorer-dist/assets/explorer-architectureDiagram-3BPJPVTR.js +36 -0
  19. package/explorer-dist/assets/explorer-asciidoc.js +1 -0
  20. package/explorer-dist/assets/explorer-asm.js +1 -0
  21. package/explorer-dist/assets/explorer-astro.js +1 -0
  22. package/explorer-dist/assets/explorer-aurora-x.js +1 -0
  23. package/explorer-dist/assets/explorer-awk.js +1 -0
  24. package/explorer-dist/assets/explorer-ayu-dark.js +1 -0
  25. package/explorer-dist/assets/explorer-ayu-light.js +1 -0
  26. package/explorer-dist/assets/explorer-ayu-mirage.js +1 -0
  27. package/explorer-dist/assets/explorer-ballerina.js +1 -0
  28. package/explorer-dist/assets/explorer-bat.js +1 -0
  29. package/explorer-dist/assets/explorer-beancount.js +1 -0
  30. package/explorer-dist/assets/explorer-berry.js +1 -0
  31. package/explorer-dist/assets/explorer-bibtex.js +1 -0
  32. package/explorer-dist/assets/explorer-bicep.js +1 -0
  33. package/explorer-dist/assets/explorer-bird2.js +1 -0
  34. package/explorer-dist/assets/explorer-blade.js +1 -0
  35. package/explorer-dist/assets/explorer-blockDiagram-GPEHLZMM.js +132 -0
  36. package/explorer-dist/assets/explorer-bsl.js +1 -0
  37. package/explorer-dist/assets/explorer-c.js +1 -0
  38. package/explorer-dist/assets/explorer-c3.js +1 -0
  39. package/explorer-dist/assets/explorer-c4Diagram-AAUBKEIU.js +10 -0
  40. package/explorer-dist/assets/explorer-cadence.js +1 -0
  41. package/explorer-dist/assets/explorer-cairo.js +1 -0
  42. package/explorer-dist/assets/explorer-catppuccin-frappe.js +1 -0
  43. package/explorer-dist/assets/explorer-catppuccin-latte.js +1 -0
  44. package/explorer-dist/assets/explorer-catppuccin-macchiato.js +1 -0
  45. package/explorer-dist/assets/explorer-catppuccin-mocha.js +1 -0
  46. package/explorer-dist/assets/explorer-channel.js +1 -0
  47. package/explorer-dist/assets/explorer-chunk-2J33WTMH.js +1 -0
  48. package/explorer-dist/assets/explorer-chunk-4BX2VUAB.js +1 -0
  49. package/explorer-dist/assets/explorer-chunk-55IACEB6.js +1 -0
  50. package/explorer-dist/assets/explorer-chunk-727SXJPM.js +206 -0
  51. package/explorer-dist/assets/explorer-chunk-AQP2D5EJ.js +231 -0
  52. package/explorer-dist/assets/explorer-chunk-FMBD7UC4.js +15 -0
  53. package/explorer-dist/assets/explorer-chunk-ND2GUHAM.js +1 -0
  54. package/explorer-dist/assets/explorer-chunk-QZHKN3VN.js +1 -0
  55. package/explorer-dist/assets/explorer-clarity.js +1 -0
  56. package/explorer-dist/assets/explorer-classDiagram-4FO5ZUOK.js +1 -0
  57. package/explorer-dist/assets/explorer-classDiagram-v2-Q7XG4LA2.js +1 -0
  58. package/explorer-dist/assets/explorer-clojure.js +1 -0
  59. package/explorer-dist/assets/explorer-cmake.js +1 -0
  60. package/explorer-dist/assets/explorer-cobol.js +1 -0
  61. package/explorer-dist/assets/explorer-codeowners.js +1 -0
  62. package/explorer-dist/assets/explorer-codeql.js +1 -0
  63. package/explorer-dist/assets/explorer-coffee.js +1 -0
  64. package/explorer-dist/assets/explorer-common-lisp.js +1 -0
  65. package/explorer-dist/assets/explorer-coq.js +1 -0
  66. package/explorer-dist/assets/explorer-cose-bilkent-S5V4N54A.js +1 -0
  67. package/explorer-dist/assets/explorer-cpp.js +1 -0
  68. package/explorer-dist/assets/explorer-crystal.js +1 -0
  69. package/explorer-dist/assets/explorer-csharp.js +1 -0
  70. package/explorer-dist/assets/explorer-css.js +1 -0
  71. package/explorer-dist/assets/explorer-csv.js +1 -0
  72. package/explorer-dist/assets/explorer-cue.js +1 -0
  73. package/explorer-dist/assets/explorer-cypher.js +1 -0
  74. package/explorer-dist/assets/explorer-cytoscape.esm.js +331 -0
  75. package/explorer-dist/assets/explorer-d.js +1 -0
  76. package/explorer-dist/assets/explorer-dagre-BM42HDAG.js +4 -0
  77. package/explorer-dist/assets/explorer-dark-plus.js +1 -0
  78. package/explorer-dist/assets/explorer-dart.js +1 -0
  79. package/explorer-dist/assets/explorer-dax.js +1 -0
  80. package/explorer-dist/assets/explorer-desktop.js +1 -0
  81. package/explorer-dist/assets/explorer-diagram-2AECGRRQ.js +43 -0
  82. package/explorer-dist/assets/explorer-diagram-5GNKFQAL.js +10 -0
  83. package/explorer-dist/assets/explorer-diagram-KO2AKTUF.js +3 -0
  84. package/explorer-dist/assets/explorer-diagram-LMA3HP47.js +24 -0
  85. package/explorer-dist/assets/explorer-diagram-OG6HWLK6.js +24 -0
  86. package/explorer-dist/assets/explorer-diff.js +1 -0
  87. package/explorer-dist/assets/explorer-docker.js +1 -0
  88. package/explorer-dist/assets/explorer-dotenv.js +1 -0
  89. package/explorer-dist/assets/explorer-dracula-soft.js +1 -0
  90. package/explorer-dist/assets/explorer-dracula.js +1 -0
  91. package/explorer-dist/assets/explorer-dream-maker.js +1 -0
  92. package/explorer-dist/assets/explorer-edge.js +1 -0
  93. package/explorer-dist/assets/explorer-elixir.js +1 -0
  94. package/explorer-dist/assets/explorer-elm.js +1 -0
  95. package/explorer-dist/assets/explorer-emacs-lisp.js +1 -0
  96. package/explorer-dist/assets/explorer-erDiagram-TEJ5UH35.js +85 -0
  97. package/explorer-dist/assets/explorer-erb.js +1 -0
  98. package/explorer-dist/assets/explorer-erlang.js +1 -0
  99. package/explorer-dist/assets/explorer-everforest-dark.js +1 -0
  100. package/explorer-dist/assets/explorer-everforest-light.js +1 -0
  101. package/explorer-dist/assets/explorer-fennel.js +1 -0
  102. package/explorer-dist/assets/explorer-fish.js +1 -0
  103. package/explorer-dist/assets/explorer-flowDiagram-I6XJVG4X.js +162 -0
  104. package/explorer-dist/assets/explorer-fluent.js +1 -0
  105. package/explorer-dist/assets/explorer-fortran-fixed-form.js +1 -0
  106. package/explorer-dist/assets/explorer-fortran-free-form.js +1 -0
  107. package/explorer-dist/assets/explorer-fsharp.js +1 -0
  108. package/explorer-dist/assets/explorer-ganttDiagram-6RSMTGT7.js +292 -0
  109. package/explorer-dist/assets/explorer-gdresource.js +1 -0
  110. package/explorer-dist/assets/explorer-gdscript.js +1 -0
  111. package/explorer-dist/assets/explorer-gdshader.js +1 -0
  112. package/explorer-dist/assets/explorer-genie.js +1 -0
  113. package/explorer-dist/assets/explorer-gherkin.js +1 -0
  114. package/explorer-dist/assets/explorer-git-commit.js +1 -0
  115. package/explorer-dist/assets/explorer-git-rebase.js +1 -0
  116. package/explorer-dist/assets/explorer-gitGraphDiagram-PVQCEYII.js +106 -0
  117. package/explorer-dist/assets/explorer-github-dark-default.js +1 -0
  118. package/explorer-dist/assets/explorer-github-dark-dimmed.js +1 -0
  119. package/explorer-dist/assets/explorer-github-dark-high-contrast.js +1 -0
  120. package/explorer-dist/assets/explorer-github-dark.js +1 -0
  121. package/explorer-dist/assets/explorer-github-light-default.js +1 -0
  122. package/explorer-dist/assets/explorer-github-light-high-contrast.js +1 -0
  123. package/explorer-dist/assets/explorer-github-light.js +1 -0
  124. package/explorer-dist/assets/explorer-gleam.js +1 -0
  125. package/explorer-dist/assets/explorer-glimmer-js.js +1 -0
  126. package/explorer-dist/assets/explorer-glimmer-ts.js +1 -0
  127. package/explorer-dist/assets/explorer-glsl.js +1 -0
  128. package/explorer-dist/assets/explorer-gn.js +1 -0
  129. package/explorer-dist/assets/explorer-gnuplot.js +1 -0
  130. package/explorer-dist/assets/explorer-go.js +1 -0
  131. package/explorer-dist/assets/explorer-graph.js +1 -0
  132. package/explorer-dist/assets/explorer-graphql.js +1 -0
  133. package/explorer-dist/assets/explorer-groovy.js +1 -0
  134. package/explorer-dist/assets/explorer-gruvbox-dark-hard.js +1 -0
  135. package/explorer-dist/assets/explorer-gruvbox-dark-medium.js +1 -0
  136. package/explorer-dist/assets/explorer-gruvbox-dark-soft.js +1 -0
  137. package/explorer-dist/assets/explorer-gruvbox-light-hard.js +1 -0
  138. package/explorer-dist/assets/explorer-gruvbox-light-medium.js +1 -0
  139. package/explorer-dist/assets/explorer-gruvbox-light-soft.js +1 -0
  140. package/explorer-dist/assets/explorer-hack.js +1 -0
  141. package/explorer-dist/assets/explorer-haml.js +1 -0
  142. package/explorer-dist/assets/explorer-handlebars.js +1 -0
  143. package/explorer-dist/assets/explorer-haskell.js +1 -0
  144. package/explorer-dist/assets/explorer-haxe.js +1 -0
  145. package/explorer-dist/assets/explorer-hcl.js +1 -0
  146. package/explorer-dist/assets/explorer-hjson.js +1 -0
  147. package/explorer-dist/assets/explorer-hlsl.js +1 -0
  148. package/explorer-dist/assets/explorer-horizon-bright.js +1 -0
  149. package/explorer-dist/assets/explorer-horizon.js +1 -0
  150. package/explorer-dist/assets/explorer-houston.js +1 -0
  151. package/explorer-dist/assets/explorer-html-derivative.js +1 -0
  152. package/explorer-dist/assets/explorer-html.js +1 -0
  153. package/explorer-dist/assets/explorer-http.js +1 -0
  154. package/explorer-dist/assets/explorer-hurl.js +1 -0
  155. package/explorer-dist/assets/explorer-hxml.js +1 -0
  156. package/explorer-dist/assets/explorer-hy.js +1 -0
  157. package/explorer-dist/assets/explorer-imba.js +1 -0
  158. package/explorer-dist/assets/explorer-infoDiagram-5YYISTIA.js +2 -0
  159. package/explorer-dist/assets/explorer-ini.js +1 -0
  160. package/explorer-dist/assets/explorer-ishikawaDiagram-YF4QCWOH.js +70 -0
  161. package/explorer-dist/assets/explorer-java.js +1 -0
  162. package/explorer-dist/assets/explorer-javascript.js +1 -0
  163. package/explorer-dist/assets/explorer-jinja.js +1 -0
  164. package/explorer-dist/assets/explorer-jison.js +1 -0
  165. package/explorer-dist/assets/explorer-journeyDiagram-JHISSGLW.js +139 -0
  166. package/explorer-dist/assets/explorer-json.js +1 -0
  167. package/explorer-dist/assets/explorer-json5.js +1 -0
  168. package/explorer-dist/assets/explorer-jsonc.js +1 -0
  169. package/explorer-dist/assets/explorer-jsonl.js +1 -0
  170. package/explorer-dist/assets/explorer-jsonnet.js +1 -0
  171. package/explorer-dist/assets/explorer-jssm.js +1 -0
  172. package/explorer-dist/assets/explorer-jsx.js +1 -0
  173. package/explorer-dist/assets/explorer-julia.js +1 -0
  174. package/explorer-dist/assets/explorer-just.js +1 -0
  175. package/explorer-dist/assets/explorer-kanagawa-dragon.js +1 -0
  176. package/explorer-dist/assets/explorer-kanagawa-lotus.js +1 -0
  177. package/explorer-dist/assets/explorer-kanagawa-wave.js +1 -0
  178. package/explorer-dist/assets/explorer-kanban-definition-UN3LZRKU.js +89 -0
  179. package/explorer-dist/assets/explorer-katex.js +257 -0
  180. package/explorer-dist/assets/explorer-kdl.js +1 -0
  181. package/explorer-dist/assets/explorer-kotlin.js +1 -0
  182. package/explorer-dist/assets/explorer-kusto.js +1 -0
  183. package/explorer-dist/assets/explorer-laserwave.js +1 -0
  184. package/explorer-dist/assets/explorer-latex.js +1 -0
  185. package/explorer-dist/assets/explorer-layout.js +1 -0
  186. package/explorer-dist/assets/explorer-lean.js +1 -0
  187. package/explorer-dist/assets/explorer-less.js +1 -0
  188. package/explorer-dist/assets/explorer-light-plus.js +1 -0
  189. package/explorer-dist/assets/explorer-liquid.js +1 -0
  190. package/explorer-dist/assets/explorer-llvm.js +1 -0
  191. package/explorer-dist/assets/explorer-log.js +1 -0
  192. package/explorer-dist/assets/explorer-logo.js +1 -0
  193. package/explorer-dist/assets/explorer-lua.js +1 -0
  194. package/explorer-dist/assets/explorer-luau.js +1 -0
  195. package/explorer-dist/assets/explorer-make.js +1 -0
  196. package/explorer-dist/assets/explorer-markdown.js +1 -0
  197. package/explorer-dist/assets/explorer-marko.js +1 -0
  198. package/explorer-dist/assets/explorer-material-theme-darker.js +1 -0
  199. package/explorer-dist/assets/explorer-material-theme-lighter.js +1 -0
  200. package/explorer-dist/assets/explorer-material-theme-ocean.js +1 -0
  201. package/explorer-dist/assets/explorer-material-theme-palenight.js +1 -0
  202. package/explorer-dist/assets/explorer-material-theme.js +1 -0
  203. package/explorer-dist/assets/explorer-matlab.js +1 -0
  204. package/explorer-dist/assets/explorer-mdc.js +1 -0
  205. package/explorer-dist/assets/explorer-mdx.js +1 -0
  206. package/explorer-dist/assets/explorer-mermaid.core.js +309 -0
  207. package/explorer-dist/assets/explorer-mermaid.js +1 -0
  208. package/explorer-dist/assets/explorer-min-dark.js +1 -0
  209. package/explorer-dist/assets/explorer-min-light.js +1 -0
  210. package/explorer-dist/assets/explorer-mindmap-definition-RKZ34NQL.js +96 -0
  211. package/explorer-dist/assets/explorer-mipsasm.js +1 -0
  212. package/explorer-dist/assets/explorer-mojo.js +1 -0
  213. package/explorer-dist/assets/explorer-monokai.js +1 -0
  214. package/explorer-dist/assets/explorer-moonbit.js +1 -0
  215. package/explorer-dist/assets/explorer-move.js +1 -0
  216. package/explorer-dist/assets/explorer-narrat.js +1 -0
  217. package/explorer-dist/assets/explorer-nextflow-groovy.js +1 -0
  218. package/explorer-dist/assets/explorer-nextflow.js +1 -0
  219. package/explorer-dist/assets/explorer-nginx.js +1 -0
  220. package/explorer-dist/assets/explorer-night-owl-light.js +1 -0
  221. package/explorer-dist/assets/explorer-night-owl.js +1 -0
  222. package/explorer-dist/assets/explorer-nim.js +1 -0
  223. package/explorer-dist/assets/explorer-nix.js +1 -0
  224. package/explorer-dist/assets/explorer-nord.js +1 -0
  225. package/explorer-dist/assets/explorer-nushell.js +1 -0
  226. package/explorer-dist/assets/explorer-objective-c.js +1 -0
  227. package/explorer-dist/assets/explorer-objective-cpp.js +1 -0
  228. package/explorer-dist/assets/explorer-ocaml.js +1 -0
  229. package/explorer-dist/assets/explorer-odin.js +1 -0
  230. package/explorer-dist/assets/explorer-one-dark-pro.js +1 -0
  231. package/explorer-dist/assets/explorer-one-light.js +1 -0
  232. package/explorer-dist/assets/explorer-openscad.js +1 -0
  233. package/explorer-dist/assets/explorer-pascal.js +1 -0
  234. package/explorer-dist/assets/explorer-perl.js +1 -0
  235. package/explorer-dist/assets/explorer-php.js +1 -0
  236. package/explorer-dist/assets/explorer-pieDiagram-4H26LBE5.js +30 -0
  237. package/explorer-dist/assets/explorer-pkl.js +1 -0
  238. package/explorer-dist/assets/explorer-plastic.js +1 -0
  239. package/explorer-dist/assets/explorer-plsql.js +1 -0
  240. package/explorer-dist/assets/explorer-po.js +1 -0
  241. package/explorer-dist/assets/explorer-poimandres.js +1 -0
  242. package/explorer-dist/assets/explorer-polar.js +1 -0
  243. package/explorer-dist/assets/explorer-postcss.js +1 -0
  244. package/explorer-dist/assets/explorer-powerquery.js +1 -0
  245. package/explorer-dist/assets/explorer-powershell.js +1 -0
  246. package/explorer-dist/assets/explorer-prisma.js +1 -0
  247. package/explorer-dist/assets/explorer-prolog.js +1 -0
  248. package/explorer-dist/assets/explorer-proto.js +1 -0
  249. package/explorer-dist/assets/explorer-pug.js +1 -0
  250. package/explorer-dist/assets/explorer-puppet.js +1 -0
  251. package/explorer-dist/assets/explorer-purescript.js +1 -0
  252. package/explorer-dist/assets/explorer-python.js +1 -0
  253. package/explorer-dist/assets/explorer-qml.js +1 -0
  254. package/explorer-dist/assets/explorer-qmldir.js +1 -0
  255. package/explorer-dist/assets/explorer-qss.js +1 -0
  256. package/explorer-dist/assets/explorer-quadrantDiagram-W4KKPZXB.js +7 -0
  257. package/explorer-dist/assets/explorer-r.js +1 -0
  258. package/explorer-dist/assets/explorer-racket.js +1 -0
  259. package/explorer-dist/assets/explorer-raku.js +1 -0
  260. package/explorer-dist/assets/explorer-razor.js +1 -0
  261. package/explorer-dist/assets/explorer-red.js +1 -0
  262. package/explorer-dist/assets/explorer-reg.js +1 -0
  263. package/explorer-dist/assets/explorer-regexp.js +1 -0
  264. package/explorer-dist/assets/explorer-rel.js +1 -0
  265. package/explorer-dist/assets/explorer-requirementDiagram-4Y6WPE33.js +84 -0
  266. package/explorer-dist/assets/explorer-riscv.js +1 -0
  267. package/explorer-dist/assets/explorer-ron.js +1 -0
  268. package/explorer-dist/assets/explorer-rose-pine-dawn.js +1 -0
  269. package/explorer-dist/assets/explorer-rose-pine-moon.js +1 -0
  270. package/explorer-dist/assets/explorer-rose-pine.js +1 -0
  271. package/explorer-dist/assets/explorer-rosmsg.js +1 -0
  272. package/explorer-dist/assets/explorer-rst.js +1 -0
  273. package/explorer-dist/assets/explorer-ruby.js +1 -0
  274. package/explorer-dist/assets/explorer-rust.js +1 -0
  275. package/explorer-dist/assets/explorer-sankeyDiagram-5OEKKPKP.js +40 -0
  276. package/explorer-dist/assets/explorer-sas.js +1 -0
  277. package/explorer-dist/assets/explorer-sass.js +1 -0
  278. package/explorer-dist/assets/explorer-scala.js +1 -0
  279. package/explorer-dist/assets/explorer-scheme.js +1 -0
  280. package/explorer-dist/assets/explorer-scss.js +1 -0
  281. package/explorer-dist/assets/explorer-sdbl.js +1 -0
  282. package/explorer-dist/assets/explorer-sequenceDiagram-3UESZ5HK.js +162 -0
  283. package/explorer-dist/assets/explorer-shaderlab.js +1 -0
  284. package/explorer-dist/assets/explorer-shellscript.js +1 -0
  285. package/explorer-dist/assets/explorer-shellsession.js +1 -0
  286. package/explorer-dist/assets/explorer-slack-dark.js +1 -0
  287. package/explorer-dist/assets/explorer-slack-ochin.js +1 -0
  288. package/explorer-dist/assets/explorer-smalltalk.js +1 -0
  289. package/explorer-dist/assets/explorer-snazzy-light.js +1 -0
  290. package/explorer-dist/assets/explorer-solarized-dark.js +1 -0
  291. package/explorer-dist/assets/explorer-solarized-light.js +1 -0
  292. package/explorer-dist/assets/explorer-solidity.js +1 -0
  293. package/explorer-dist/assets/explorer-soy.js +1 -0
  294. package/explorer-dist/assets/explorer-sparql.js +1 -0
  295. package/explorer-dist/assets/explorer-splunk.js +1 -0
  296. package/explorer-dist/assets/explorer-sql.js +1 -0
  297. package/explorer-dist/assets/explorer-ssh-config.js +1 -0
  298. package/explorer-dist/assets/explorer-stata.js +1 -0
  299. package/explorer-dist/assets/explorer-stateDiagram-AJRCARHV.js +1 -0
  300. package/explorer-dist/assets/explorer-stateDiagram-v2-BHNVJYJU.js +1 -0
  301. package/explorer-dist/assets/explorer-stylus.js +1 -0
  302. package/explorer-dist/assets/explorer-surrealql.js +1 -0
  303. package/explorer-dist/assets/explorer-svelte.js +1 -0
  304. package/explorer-dist/assets/explorer-swift.js +1 -0
  305. package/explorer-dist/assets/explorer-synthwave-84.js +1 -0
  306. package/explorer-dist/assets/explorer-system-verilog.js +1 -0
  307. package/explorer-dist/assets/explorer-systemd.js +1 -0
  308. package/explorer-dist/assets/explorer-talonscript.js +1 -0
  309. package/explorer-dist/assets/explorer-tasl.js +1 -0
  310. package/explorer-dist/assets/explorer-tcl.js +1 -0
  311. package/explorer-dist/assets/explorer-templ.js +1 -0
  312. package/explorer-dist/assets/explorer-terraform.js +1 -0
  313. package/explorer-dist/assets/explorer-tex.js +1 -0
  314. package/explorer-dist/assets/explorer-timeline-definition-PNZ67QCA.js +120 -0
  315. package/explorer-dist/assets/explorer-tokyo-night.js +1 -0
  316. package/explorer-dist/assets/explorer-toml.js +1 -0
  317. package/explorer-dist/assets/explorer-ts-tags.js +1 -0
  318. package/explorer-dist/assets/explorer-tsv.js +1 -0
  319. package/explorer-dist/assets/explorer-tsx.js +1 -0
  320. package/explorer-dist/assets/explorer-turtle.js +1 -0
  321. package/explorer-dist/assets/explorer-twig.js +1 -0
  322. package/explorer-dist/assets/explorer-typescript.js +1 -0
  323. package/explorer-dist/assets/explorer-typespec.js +1 -0
  324. package/explorer-dist/assets/explorer-typst.js +1 -0
  325. package/explorer-dist/assets/explorer-v.js +1 -0
  326. package/explorer-dist/assets/explorer-vala.js +1 -0
  327. package/explorer-dist/assets/explorer-vb.js +1 -0
  328. package/explorer-dist/assets/explorer-vennDiagram-CIIHVFJN.js +34 -0
  329. package/explorer-dist/assets/explorer-verilog.js +1 -0
  330. package/explorer-dist/assets/explorer-vesper.js +1 -0
  331. package/explorer-dist/assets/explorer-vhdl.js +1 -0
  332. package/explorer-dist/assets/explorer-viml.js +1 -0
  333. package/explorer-dist/assets/explorer-vitesse-black.js +1 -0
  334. package/explorer-dist/assets/explorer-vitesse-dark.js +1 -0
  335. package/explorer-dist/assets/explorer-vitesse-light.js +1 -0
  336. package/explorer-dist/assets/explorer-vue-html.js +1 -0
  337. package/explorer-dist/assets/explorer-vue-vine.js +1 -0
  338. package/explorer-dist/assets/explorer-vue.js +1 -0
  339. package/explorer-dist/assets/explorer-vyper.js +1 -0
  340. package/explorer-dist/assets/explorer-wardley-L42UT6IY.js +173 -0
  341. package/explorer-dist/assets/explorer-wardleyDiagram-YWT4CUSO.js +78 -0
  342. package/explorer-dist/assets/explorer-wasm.js +1 -0
  343. package/explorer-dist/assets/explorer-wasm2.js +1 -0
  344. package/explorer-dist/assets/explorer-wenyan.js +1 -0
  345. package/explorer-dist/assets/explorer-wgsl.js +1 -0
  346. package/explorer-dist/assets/explorer-wikitext.js +1 -0
  347. package/explorer-dist/assets/explorer-wit.js +1 -0
  348. package/explorer-dist/assets/explorer-wolfram.js +1 -0
  349. package/explorer-dist/assets/explorer-xml.js +1 -0
  350. package/explorer-dist/assets/explorer-xsl.js +1 -0
  351. package/explorer-dist/assets/explorer-xychartDiagram-2RQKCTM6.js +7 -0
  352. package/explorer-dist/assets/explorer-yaml.js +1 -0
  353. package/explorer-dist/assets/explorer-zenscript.js +1 -0
  354. package/explorer-dist/assets/explorer-zig.js +1 -0
  355. package/explorer-dist/assets/explorer.css +1 -0
  356. package/explorer-dist/assets/explorer.js +1158 -0
  357. package/explorer-dist/assets/favicon-16x16.png +0 -0
  358. package/explorer-dist/assets/favicon-32x32.png +0 -0
  359. package/explorer-dist/assets/favicon.ico +0 -0
  360. package/explorer-dist/assets/fonts/Geist-Variable.woff2 +0 -0
  361. package/explorer-dist/assets/fonts/GeistMono-Variable.woff2 +0 -0
  362. package/explorer-dist/assets/icon-192.png +0 -0
  363. package/explorer-dist/assets/icon-512.png +0 -0
  364. package/explorer-dist/assets/logo-mark.svg +28 -0
  365. package/explorer-dist/assets/logo.png +0 -0
  366. package/explorer-dist/assets/mstile-150x150.png +0 -0
  367. package/explorer-dist/assets/searchIndex.worker-BWOUMmPT.js +1 -0
  368. package/explorer-dist/assets/site.webmanifest +22 -0
  369. package/explorer-dist/fonts/Geist-Variable.woff2 +0 -0
  370. package/explorer-dist/fonts/GeistMono-Variable.woff2 +0 -0
  371. package/explorer-dist/index.html +47 -0
  372. package/package.json +7 -2
@@ -0,0 +1,309 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./explorer-dagre-BM42HDAG.js","./explorer-graph.js","./explorer-layout.js","./explorer.js","./explorer.css","./explorer-cose-bilkent-S5V4N54A.js","./explorer-cytoscape.esm.js","./explorer-c4Diagram-AAUBKEIU.js","./explorer-chunk-ND2GUHAM.js","./explorer-flowDiagram-I6XJVG4X.js","./explorer-chunk-FMBD7UC4.js","./explorer-chunk-55IACEB6.js","./explorer-chunk-2J33WTMH.js","./explorer-channel.js","./explorer-erDiagram-TEJ5UH35.js","./explorer-gitGraphDiagram-PVQCEYII.js","./explorer-chunk-4BX2VUAB.js","./explorer-chunk-QZHKN3VN.js","./explorer-wardley-L42UT6IY.js","./explorer-ganttDiagram-6RSMTGT7.js","./explorer-infoDiagram-5YYISTIA.js","./explorer-pieDiagram-4H26LBE5.js","./explorer-quadrantDiagram-W4KKPZXB.js","./explorer-xychartDiagram-2RQKCTM6.js","./explorer-requirementDiagram-4Y6WPE33.js","./explorer-sequenceDiagram-3UESZ5HK.js","./explorer-classDiagram-4FO5ZUOK.js","./explorer-chunk-727SXJPM.js","./explorer-classDiagram-v2-Q7XG4LA2.js","./explorer-stateDiagram-AJRCARHV.js","./explorer-chunk-AQP2D5EJ.js","./explorer-stateDiagram-v2-BHNVJYJU.js","./explorer-journeyDiagram-JHISSGLW.js","./explorer-timeline-definition-PNZ67QCA.js","./explorer-mindmap-definition-RKZ34NQL.js","./explorer-kanban-definition-UN3LZRKU.js","./explorer-sankeyDiagram-5OEKKPKP.js","./explorer-diagram-LMA3HP47.js","./explorer-diagram-2AECGRRQ.js","./explorer-blockDiagram-GPEHLZMM.js","./explorer-diagram-5GNKFQAL.js","./explorer-architectureDiagram-3BPJPVTR.js","./explorer-diagram-KO2AKTUF.js","./explorer-ishikawaDiagram-YF4QCWOH.js","./explorer-vennDiagram-CIIHVFJN.js","./explorer-diagram-OG6HWLK6.js","./explorer-wardleyDiagram-YWT4CUSO.js"])))=>i.map(i=>d[i]);
2
+ var Jp=Object.defineProperty;var tf=(e,t,r)=>t in e?Jp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wt=(e,t,r)=>tf(e,typeof t!="symbol"?t+"":t,r);import{n as ef,_ as pt,s as ht,M as rh,N as ih,O as ah,P as sh,Q as oh,R as lh,T as rf,U as na,V as nh,W as af,X as sf,Y as hh,Z as of,$ as lf,a0 as nf,a1 as ch,a2 as dh,a3 as hf,a4 as cf,e as Ps,c as df}from"./explorer.js";var ha={exports:{}},uf=ha.exports,Nl;function gf(){return Nl||(Nl=1,(function(e,t){(function(r,i){e.exports=i()})(uf,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",l="minute",n="hour",h="day",c="week",d="month",g="quarter",u="year",y="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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(P){var E=["th","st","nd","rd"],F=P%100;return"["+P+(E[(F-20)%10]||E[F]||E[0])+"]"}},k=function(P,E,F){var $=String(P);return!$||$.length>=E?P:""+Array(E+1-$.length).join(F)+P},S={s:k,z:function(P){var E=-P.utcOffset(),F=Math.abs(E),$=Math.floor(F/60),A=F%60;return(E<=0?"+":"-")+k($,2,"0")+":"+k(A,2,"0")},m:function P(E,F){if(E.date()<F.date())return-P(F,E);var $=12*(F.year()-E.year())+(F.month()-E.month()),A=E.clone().add($,d),w=F-A<0,N=E.clone().add($+(w?-1:1),d);return+(-($+(F-A)/(w?A-N:N-A))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:u,w:c,d:h,D:y,h:n,m:l,s:o,ms:s,Q:g}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},B="en",v={};v[B]=b;var M="$isDayjsObject",L=function(P){return P instanceof Y||!(!P||!P[M])},z=function P(E,F,$){var A;if(!E)return B;if(typeof E=="string"){var w=E.toLowerCase();v[w]&&(A=w),F&&(v[w]=F,A=w);var N=E.split("-");if(!A&&N.length>1)return P(N[0])}else{var V=E.name;v[V]=E,A=V}return!$&&A&&(B=A),A||!$&&B},D=function(P,E){if(L(P))return P.clone();var F=typeof E=="object"?E:{};return F.date=P,F.args=arguments,new Y(F)},I=S;I.l=z,I.i=L,I.w=function(P,E){return D(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=(function(){function P(F){this.$L=z(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[M]=!0}var E=P.prototype;return E.parse=function(F){this.$d=(function($){var A=$.date,w=$.utc;if(A===null)return new Date(NaN);if(I.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var N=A.match(m);if(N){var V=N[2]-1||0,dt=(N[7]||"0").substring(0,3);return w?new Date(Date.UTC(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,dt)):new Date(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,dt)}}return new Date(A)})(F),this.init()},E.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},E.$utils=function(){return I},E.isValid=function(){return this.$d.toString()!==f},E.isSame=function(F,$){var A=D(F);return this.startOf($)<=A&&A<=this.endOf($)},E.isAfter=function(F,$){return D(F)<this.startOf($)},E.isBefore=function(F,$){return this.endOf($)<D(F)},E.$g=function(F,$,A){return I.u(F)?this[$]:this.set(A,F)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(F,$){var A=this,w=!!I.u($)||$,N=I.p(F),V=function(ne,et){var X=I.w(A.$u?Date.UTC(A.$y,et,ne):new Date(A.$y,et,ne),A);return w?X:X.endOf(h)},dt=function(ne,et){return I.w(A.toDate()[ne].apply(A.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(et)),A)},ft=this.$W,ut=this.$M,Ct=this.$D,Lt="set"+(this.$u?"UTC":"");switch(N){case u:return w?V(1,0):V(31,11);case d:return w?V(1,ut):V(0,ut+1);case c:var Nt=this.$locale().weekStart||0,se=(ft<Nt?ft+7:ft)-Nt;return V(w?Ct-se:Ct+(6-se),ut);case h:case y:return dt(Lt+"Hours",0);case n:return dt(Lt+"Minutes",1);case l:return dt(Lt+"Seconds",2);case o:return dt(Lt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(F){return this.startOf(F,!1)},E.$set=function(F,$){var A,w=I.p(F),N="set"+(this.$u?"UTC":""),V=(A={},A[h]=N+"Date",A[y]=N+"Date",A[d]=N+"Month",A[u]=N+"FullYear",A[n]=N+"Hours",A[l]=N+"Minutes",A[o]=N+"Seconds",A[s]=N+"Milliseconds",A)[w],dt=w===h?this.$D+($-this.$W):$;if(w===d||w===u){var ft=this.clone().set(y,1);ft.$d[V](dt),ft.init(),this.$d=ft.set(y,Math.min(this.$D,ft.daysInMonth())).$d}else V&&this.$d[V](dt);return this.init(),this},E.set=function(F,$){return this.clone().$set(F,$)},E.get=function(F){return this[I.p(F)]()},E.add=function(F,$){var A,w=this;F=Number(F);var N=I.p($),V=function(ut){var Ct=D(w);return I.w(Ct.date(Ct.date()+Math.round(ut*F)),w)};if(N===d)return this.set(d,this.$M+F);if(N===u)return this.set(u,this.$y+F);if(N===h)return V(1);if(N===c)return V(7);var dt=(A={},A[l]=i,A[n]=a,A[o]=r,A)[N]||1,ft=this.$d.getTime()+F*dt;return I.w(ft,this)},E.subtract=function(F,$){return this.add(-1*F,$)},E.format=function(F){var $=this,A=this.$locale();if(!this.isValid())return A.invalidDate||f;var w=F||"YYYY-MM-DDTHH:mm:ssZ",N=I.z(this),V=this.$H,dt=this.$m,ft=this.$M,ut=A.weekdays,Ct=A.months,Lt=A.meridiem,Nt=function(et,X,St,nt){return et&&(et[X]||et($,w))||St[X].slice(0,nt)},se=function(et){return I.s(V%12||12,et,"0")},ne=Lt||function(et,X,St){var nt=et<12?"AM":"PM";return St?nt.toLowerCase():nt};return w.replace(C,(function(et,X){return X||(function(St){switch(St){case"YY":return String($.$y).slice(-2);case"YYYY":return I.s($.$y,4,"0");case"M":return ft+1;case"MM":return I.s(ft+1,2,"0");case"MMM":return Nt(A.monthsShort,ft,Ct,3);case"MMMM":return Nt(Ct,ft);case"D":return $.$D;case"DD":return I.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Nt(A.weekdaysMin,$.$W,ut,2);case"ddd":return Nt(A.weekdaysShort,$.$W,ut,3);case"dddd":return ut[$.$W];case"H":return String(V);case"HH":return I.s(V,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return ne(V,dt,!0);case"A":return ne(V,dt,!1);case"m":return String(dt);case"mm":return I.s(dt,2,"0");case"s":return String($.$s);case"ss":return I.s($.$s,2,"0");case"SSS":return I.s($.$ms,3,"0");case"Z":return N}return null})(et)||N.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(F,$,A){var w,N=this,V=I.p($),dt=D(F),ft=(dt.utcOffset()-this.utcOffset())*i,ut=this-dt,Ct=function(){return I.m(N,dt)};switch(V){case u:w=Ct()/12;break;case d:w=Ct();break;case g:w=Ct()/3;break;case c:w=(ut-ft)/6048e5;break;case h:w=(ut-ft)/864e5;break;case n:w=ut/a;break;case l:w=ut/i;break;case o:w=ut/r;break;default:w=ut}return A?w:I.a(w)},E.daysInMonth=function(){return this.endOf(d).$D},E.$locale=function(){return v[this.$L]},E.locale=function(F,$){if(!F)return this.$L;var A=this.clone(),w=z(F,$,!0);return w&&(A.$L=w),A},E.clone=function(){return I.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P})(),H=Y.prototype;return D.prototype=H,[["$ms",s],["$s",o],["$m",l],["$H",n],["$W",h],["$M",d],["$y",u],["$D",y]].forEach((function(P){H[P[1]]=function(E){return this.$g(E,P[0],P[1])}})),D.extend=function(P,E){return P.$i||(P(E,Y,D),P.$i=!0),D},D.locale=z,D.isDayjs=L,D.unix=function(P){return D(1e3*P)},D.en=v[B],D.Ls=v,D.p={},D}))})(ha)),ha.exports}var pf=gf();const ff=ef(pf);var uh=Object.defineProperty,p=(e,t)=>uh(e,"name",{value:t,configurable:!0}),mf=(e,t)=>{for(var r in t)uh(e,r,{get:t[r],enumerable:!0})},Ie={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},_o=p(function(e="fatal"){let t=Ie.fatal;typeof e=="string"?e.toLowerCase()in Ie&&(t=Ie[e]):typeof e=="number"&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=Ie.fatal&&(W.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=Ie.error&&(W.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=Ie.warn&&(W.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=Ie.info&&(W.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=Ie.debug&&(W.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=Ie.trace&&(W.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=p(e=>`%c${ff().format("ss.SSS")} : ${e} : `,"format");const ca={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return ca.hue2rgb(s,a,e+1/3)*255;case"g":return ca.hue2rgb(s,a,e)*255;case"b":return ca.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const l=a-s,n=o>.5?l/(2-a-s):l/(a+s);if(i==="s")return n*100;switch(a){case e:return((t-r)/l+(t<r?6:0))*60;case t:return((r-e)/l+2)*60;case r:return((e-t)/l+4)*60;default:return-1}}},yf={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Cf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},lt={channel:ca,lang:yf,unit:Cf},Xe={};for(let e=0;e<=255;e++)Xe[e]=lt.unit.dec2hex(e);const jt={ALL:0,RGB:1,HSL:2};class xf{constructor(){this.type=jt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=jt.ALL}is(t){return this.type===t}}class bf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new xf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=lt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=lt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=lt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=lt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const za=new bf({r:0,g:0,b:0,a:0},"transparent"),Ir={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ir.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,l=o?1:17,n=o?8:4,h=s?0:-1,c=o?255:15;return za.set({r:(i>>n*(h+3)&c)*l,g:(i>>n*(h+2)&c)*l,b:(i>>n*(h+1)&c)*l,a:s?(i&c)*l/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}${Xe[Math.round(a*255)]}`:`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}`}},cr={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:e=>{const t=e.match(cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return lt.channel.clamp.h(parseFloat(r)*360)}}return lt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(cr.re);if(!r)return;const[,i,a,s,o,l]=r;return za.set({h:cr._hue2deg(i),s:lt.channel.clamp.s(parseFloat(a)),l:lt.channel.clamp.l(parseFloat(s)),a:o?lt.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%, ${a})`:`hsl(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%)`}},Bi={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:e=>{e=e.toLowerCase();const t=Bi.colors[e];if(t)return Ir.parse(t)},stringify:e=>{const t=Ir.stringify(e);for(const r in Bi.colors)if(Bi.colors[r]===t)return r}},xi={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(xi.re);if(!r)return;const[,i,a,s,o,l,n,h,c]=r;return za.set({r:lt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:lt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:lt.channel.clamp.b(n?parseFloat(l)*2.55:parseFloat(l)),a:h?lt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(i)}, ${lt.lang.round(a)})`:`rgb(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(i)})`}},Ae={format:{keyword:Bi,hex:Ir,rgb:xi,rgba:xi,hsl:cr,hsla:cr},parse:e=>{if(typeof e!="string")return e;const t=Ir.parse(e)||xi.parse(e)||cr.parse(e)||Bi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(jt.HSL)||e.data.r===void 0?cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?xi.stringify(e):Ir.stringify(e)},gh=(e,t)=>{const r=Ae.parse(e);for(const i in t)r[i]=lt.channel.clamp[i](t[i]);return Ae.stringify(r)},Qe=(e,t,r=0,i=1)=>{if(typeof e!="number")return gh(e,{a:t});const a=za.set({r:lt.channel.clamp.r(e),g:lt.channel.clamp.g(t),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(i)});return Ae.stringify(a)},kf=e=>{const{r:t,g:r,b:i}=Ae.parse(e),a=.2126*lt.channel.toLinear(t)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(i);return lt.lang.round(a)},Tf=e=>kf(e)>=.5,ke=e=>!Tf(e),ph=(e,t,r)=>{const i=Ae.parse(e),a=i[t],s=lt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ae.stringify(i)},R=(e,t)=>ph(e,"l",t),q=(e,t)=>ph(e,"l",-t),x=(e,t)=>{const r=Ae.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return gh(e,i)},Sf=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Ae.parse(e),{r:l,g:n,b:h,a:c}=Ae.parse(t),d=r/100,g=d*2-1,u=o-c,f=((g*u===-1?g:(g+u)/(1+g*u))+1)/2,m=1-f,C=i*f+l*m,b=a*f+n*m,k=s*f+h*m,S=o*d+c*(1-d);return Qe(C,b,k,S)},_=(e,t=100)=>{const r=Ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Sf(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function Wl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function wf(e){if(Array.isArray(e))return e}function Bf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,a,s,o,l=[],n=!0,h=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(n=(i=s.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(c){h=!0,a=c}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw a}}return l}}function vf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lf(e,t){return wf(e)||Bf(e,t)||Ff(e,t)||vf()}function Ff(e,t){if(e){if(typeof e=="string")return Wl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wl(e,t):void 0}}const fh=Object.entries,zl=Object.setPrototypeOf,_f=Object.isFrozen,Af=Object.getPrototypeOf,Ef=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,_r=Object.create,mh=typeof Reflect<"u"&&Reflect,Rs=mh.apply,qs=mh.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});Rs||(Rs=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});qs||(qs=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const ci=Ot(Array.prototype.forEach),Mf=Ot(Array.prototype.lastIndexOf),Hl=Ot(Array.prototype.pop),vr=Ot(Array.prototype.push),Of=Ot(Array.prototype.splice),Ve=Array.isArray,bi=Ot(String.prototype.toLowerCase),bs=Ot(String.prototype.toString),Yl=Ot(String.prototype.match),di=Ot(String.prototype.replace),Ul=Ot(String.prototype.indexOf),$f=Ot(String.prototype.trim),If=Ot(Number.prototype.toString),Df=Ot(Boolean.prototype.toString),jl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),Gl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Rt=Ot(Object.prototype.hasOwnProperty),ui=Ot(Object.prototype.toString),Wt=Ot(RegExp.prototype.test),or=Pf(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Rs(e,t,i)}}function Pf(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return qs(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bi;if(zl&&zl(e,null),!Ve(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(_f(t)||(t[i]=s),a=s)}e[a]=!0}return e}function Rf(e){for(let t=0;t<e.length;t++)Rt(e,t)||(e[t]=null);return e}function Qt(e){const t=_r(null);for(const i of fh(e)){var r=Lf(i,2);const a=r[0],s=r[1];Rt(e,a)&&(Ve(s)?t[a]=Rf(s):s&&typeof s=="object"&&s.constructor===Object?t[a]=Qt(s):t[a]=s)}return t}function qf(e){switch(typeof e){case"string":return e;case"number":return If(e);case"boolean":return Df(e);case"bigint":return jl?jl(e):"0";case"symbol":return Gl?Gl(e):"Symbol()";case"undefined":return ui(e);case"function":case"object":{if(e===null)return ui(e);const t=e,r=ve(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:ui(i)}return ui(e)}default:return ui(e)}}function ve(e,t){for(;e!==null;){const i=Ef(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Af(e)}function r(){return null}return r}function Nf(e){try{return Wt(e,""),!0}catch{return!1}}const Xl=Yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ks=Yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ts=Yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Wf=Yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ss=Yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zf=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vl=Yt(["#text"]),Zl=Yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ws=Yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Kl=Yt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Qi=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Hf=Ut(/{{[\w\W]*|^[\w\W]*}}/g),Yf=Ut(/<%[\w\W]*|^[\w\W]*%>/g),Uf=Ut(/\${[\w\W]*/g),jf=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gf=Ut(/^aria-[\-\w]+$/),Ql=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xf=Ut(/^(?:\w+script|data):/i),Vf=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zf=Ut(/^html$/i),Kf=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i),Jl=Ut(/<[/\w!]/g),Qf=Ut(/<[/\w]/g),Jf=Ut(/<\/no(script|embed|frames)/i),tm=Ut(/\/>/i),Be={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},em=function(){return typeof window>"u"?null:window},rm=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},tn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ge=function(t,r,i,a){return Rt(t,r)&&Ve(t[r])?mt(a.base?Qt(a.base):{},t[r],a.transform):i};function yh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:em();const t=j=>yh(j);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Be.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,a=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,l=e.Element,n=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,g=l.prototype,u=ve(g,"cloneNode"),y=ve(g,"remove"),f=ve(g,"nextSibling"),m=ve(g,"childNodes"),C=ve(g,"parentNode"),b=ve(g,"shadowRoot"),k=ve(g,"attributes"),S=o&&o.prototype?ve(o.prototype,"nodeType"):null,B=o&&o.prototype?ve(o.prototype,"nodeName"):null;if(typeof s=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let v,M="",L,z=!1,D=0;const I=function(){if(D>0)throw or('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Y=function(T){I(),D++;try{return v.createHTML(T)}finally{D--}},H=function(T){I(),D++;try{return v.createScriptURL(T)}finally{D--}},P=function(){return z||(L=rm(d,a),z=!0),L},E=r,F=E.implementation,$=E.createNodeIterator,A=E.createDocumentFragment,w=E.getElementsByTagName,N=i.importNode;let V=tn();t.isSupported=typeof fh=="function"&&typeof C=="function"&&F&&F.createHTMLDocument!==void 0;const dt=Hf,ft=Yf,ut=Uf,Ct=jf,Lt=Gf,Nt=Xf,se=Vf,ne=Kf;let et=Ql,X=null;const St=mt({},[...Xl,...ks,...Ts,...Ss,...Vl]);let nt=null;const Te=mt({},[...Zl,...ws,...Kl,...Qi]);let kt=Object.seal(_r(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ye=null,rs=null;const he=Object.seal(_r(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xl=!0,is=!0,bl=!1,kl=!0,Ue=!1,li=!0,ar=!1,as=!1,ss=null,os=null,ls=!1,kr=!1,Ui=!1,ji=!1,Tl=!0,Sl=!1;const wl="user-content-";let ns=!0,hs=!1,Tr={},Se=null;const cs=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Bl=null;const vl=mt({},["audio","video","img","source","image","track"]);let ds=null;const Ll=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gi="http://www.w3.org/1998/Math/MathML",Xi="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let Sr=we,us=!1,gs=null;const Pp=mt({},[Gi,Xi,we],bs),Fl=Yt(["mi","mo","mn","ms","mtext"]);let ps=mt({},Fl);const _l=Yt(["annotation-xml"]);let fs=mt({},_l);const Rp=mt({},["title","style","font","a","script"]);let ni=null;const qp=["application/xhtml+xml","text/html"],Np="text/html";let Ft=null,wr=null;const Wp=r.createElement("form"),Al=function(T){return T instanceof RegExp||T instanceof Function},ms=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wr&&wr===T)return;(!T||typeof T!="object")&&(T={}),T=Qt(T),ni=qp.indexOf(T.PARSER_MEDIA_TYPE)===-1?Np:T.PARSER_MEDIA_TYPE,Ft=ni==="application/xhtml+xml"?bs:bi,X=Ge(T,"ALLOWED_TAGS",St,{transform:Ft}),nt=Ge(T,"ALLOWED_ATTR",Te,{transform:Ft}),gs=Ge(T,"ALLOWED_NAMESPACES",Pp,{transform:bs}),ds=Ge(T,"ADD_URI_SAFE_ATTR",Ll,{transform:Ft,base:Ll}),Bl=Ge(T,"ADD_DATA_URI_TAGS",vl,{transform:Ft,base:vl}),Se=Ge(T,"FORBID_CONTENTS",cs,{transform:Ft}),Ye=Ge(T,"FORBID_TAGS",Qt({}),{transform:Ft}),rs=Ge(T,"FORBID_ATTR",Qt({}),{transform:Ft}),Tr=Rt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Qt(T.USE_PROFILES):T.USE_PROFILES:!1,xl=T.ALLOW_ARIA_ATTR!==!1,is=T.ALLOW_DATA_ATTR!==!1,bl=T.ALLOW_UNKNOWN_PROTOCOLS||!1,kl=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=T.SAFE_FOR_TEMPLATES||!1,li=T.SAFE_FOR_XML!==!1,ar=T.WHOLE_DOCUMENT||!1,kr=T.RETURN_DOM||!1,Ui=T.RETURN_DOM_FRAGMENT||!1,ji=T.RETURN_TRUSTED_TYPE||!1,ls=T.FORCE_BODY||!1,Tl=T.SANITIZE_DOM!==!1,Sl=T.SANITIZE_NAMED_PROPS||!1,ns=T.KEEP_CONTENT!==!1,hs=T.IN_PLACE||!1,et=Nf(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:Ql,Sr=typeof T.NAMESPACE=="string"?T.NAMESPACE:we,ps=Rt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},Fl),fs=Rt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Qt(T.HTML_INTEGRATION_POINTS):mt({},_l);const O=Rt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Qt(T.CUSTOM_ELEMENT_HANDLING):_r(null);if(kt=_r(null),Rt(O,"tagNameCheck")&&Al(O.tagNameCheck)&&(kt.tagNameCheck=O.tagNameCheck),Rt(O,"attributeNameCheck")&&Al(O.attributeNameCheck)&&(kt.attributeNameCheck=O.attributeNameCheck),Rt(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(kt.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),Ut(kt),Ue&&(is=!1),Ui&&(kr=!0),Tr&&(X=mt({},Vl),nt=_r(null),Tr.html===!0&&(mt(X,Xl),mt(nt,Zl)),Tr.svg===!0&&(mt(X,ks),mt(nt,ws),mt(nt,Qi)),Tr.svgFilters===!0&&(mt(X,Ts),mt(nt,ws),mt(nt,Qi)),Tr.mathMl===!0&&(mt(X,Ss),mt(nt,Kl),mt(nt,Qi))),he.tagCheck=null,he.attributeCheck=null,Rt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?he.tagCheck=T.ADD_TAGS:Ve(T.ADD_TAGS)&&(X===St&&(X=Qt(X)),mt(X,T.ADD_TAGS,Ft))),Rt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?he.attributeCheck=T.ADD_ATTR:Ve(T.ADD_ATTR)&&(nt===Te&&(nt=Qt(nt)),mt(nt,T.ADD_ATTR,Ft))),Rt(T,"ADD_URI_SAFE_ATTR")&&Ve(T.ADD_URI_SAFE_ATTR)&&mt(ds,T.ADD_URI_SAFE_ATTR,Ft),Rt(T,"FORBID_CONTENTS")&&Ve(T.FORBID_CONTENTS)&&(Se===cs&&(Se=Qt(Se)),mt(Se,T.FORBID_CONTENTS,Ft)),Rt(T,"ADD_FORBID_CONTENTS")&&Ve(T.ADD_FORBID_CONTENTS)&&(Se===cs&&(Se=Qt(Se)),mt(Se,T.ADD_FORBID_CONTENTS,Ft)),ns&&(X["#text"]=!0),ar&&mt(X,["html","head","body"]),X.table&&(mt(X,["tbody"]),delete Ye.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=v;v=T.TRUSTED_TYPES_POLICY;try{M=Y("")}catch(tt){throw v=U,tt}}else T.TRUSTED_TYPES_POLICY===null?(v=void 0,M=""):(v===void 0&&(v=P()),v&&typeof M=="string"&&(M=Y("")));Yt&&Yt(T),wr=T},El=mt({},[...ks,...Ts,...Wf]),Ml=mt({},[...Ss,...zf]),zp=function(T,O,U){return O.namespaceURI===we?T==="svg":O.namespaceURI===Gi?T==="svg"&&(U==="annotation-xml"||ps[U]):!!El[T]},Hp=function(T,O,U){return O.namespaceURI===we?T==="math":O.namespaceURI===Xi?T==="math"&&fs[U]:!!Ml[T]},Yp=function(T,O,U){return O.namespaceURI===Xi&&!fs[U]||O.namespaceURI===Gi&&!ps[U]?!1:!Ml[T]&&(Rp[T]||!El[T])},Up=function(T){let O=C(T);(!O||!O.tagName)&&(O={namespaceURI:Sr,tagName:"template"});const U=bi(T.tagName),tt=bi(O.tagName);return gs[T.namespaceURI]?T.namespaceURI===Xi?zp(U,O,tt):T.namespaceURI===Gi?Hp(U,O,tt):T.namespaceURI===we?Yp(U,O,tt):!!(ni==="application/xhtml+xml"&&gs[T.namespaceURI]):!1},je=function(T){vr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(y(T),!C(T))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ol=function(T){const O=m(T);if(O){const tt=[];ci(O,ct=>{vr(tt,ct)}),ci(tt,ct=>{try{y(ct)}catch{}})}const U=k(T);if(U)for(let tt=U.length-1;tt>=0;--tt){const ct=U[tt],yt=ct&&ct.name;if(typeof yt=="string")try{T.removeAttribute(yt)}catch{}}},sr=function(T,O){try{vr(t.removed,{attribute:O.getAttributeNode(T),from:O})}catch{vr(t.removed,{attribute:null,from:O})}if(O.removeAttribute(T),T==="is")if(kr||Ui)try{je(O)}catch{}else try{O.setAttribute(T,"")}catch{}},jp=function(T){const O=k(T);if(O)for(let U=O.length-1;U>=0;--U){const tt=O[U],ct=tt&&tt.name;if(!(typeof ct!="string"||nt[Ft(ct)]))try{T.removeAttribute(ct)}catch{}}},Gp=function(T){const O=[T];for(;O.length>0;){const U=O.pop();(S?S(U):U.nodeType)===Be.element&&jp(U);const ct=m(U);if(ct)for(let yt=ct.length-1;yt>=0;--yt)O.push(ct[yt])}},$l=function(T){let O=null,U=null;if(ls)T="<remove></remove>"+T;else{const yt=Yl(T,/^[\r\n\t ]+/);U=yt&&yt[0]}ni==="application/xhtml+xml"&&Sr===we&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const tt=v?Y(T):T;if(Sr===we)try{O=new c().parseFromString(tt,ni)}catch{}if(!O||!O.documentElement){O=F.createDocument(Sr,"template",null);try{O.documentElement.innerHTML=us?M:tt}catch{}}const ct=O.body||O.documentElement;return T&&U&&ct.insertBefore(r.createTextNode(U),ct.childNodes[0]||null),Sr===we?w.call(O,ar?"html":"body")[0]:ar?O.documentElement:ct},Il=function(T){return $.call(T.ownerDocument||T,T,n.SHOW_ELEMENT|n.SHOW_COMMENT|n.SHOW_TEXT|n.SHOW_PROCESSING_INSTRUCTION|n.SHOW_CDATA_SECTION,null)},Vi=function(T){return T=di(T,dt," "),T=di(T,ft," "),T=di(T,ut," "),T},ys=function(T){var O;T.normalize();const U=$.call(T.ownerDocument||T,T,n.SHOW_TEXT|n.SHOW_COMMENT|n.SHOW_CDATA_SECTION|n.SHOW_PROCESSING_INSTRUCTION,null);let tt=U.nextNode();for(;tt;)tt.data=Vi(tt.data),tt=U.nextNode();const ct=(O=T.querySelectorAll)===null||O===void 0?void 0:O.call(T,"template");ct&&ci(ct,yt=>{Br(yt.content)&&ys(yt.content)})},Zi=function(T){const O=B?B(T):null;return typeof O!="string"||Ft(O)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==S(T)||T.childNodes!==m(T)},Br=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return S(T)===Be.documentFragment}catch{return!1}},hi=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return typeof S(T)=="number"}catch{return!1}};function $e(j,T,O){j.length!==0&&ci(j,U=>{U.call(t,T,O,wr)})}const Xp=function(T,O){return!!(li&&T.hasChildNodes()&&!hi(T.firstElementChild)&&Wt(Jl,T.textContent)&&Wt(Jl,T.innerHTML)||li&&T.namespaceURI===we&&O==="style"&&hi(T.firstElementChild)||T.nodeType===Be.processingInstruction||li&&T.nodeType===Be.comment&&Wt(Qf,T.data))},Vp=function(T,O){if(!Ye[O]&&Rl(O)&&(kt.tagNameCheck instanceof RegExp&&Wt(kt.tagNameCheck,O)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(O)))return!1;if(ns&&!Se[O]){const U=C(T),tt=m(T);if(tt&&U){const ct=tt.length;for(let yt=ct-1;yt>=0;--yt){const Pt=hs?tt[yt]:u(tt[yt],!0);U.insertBefore(Pt,f(T))}}}return je(T),!0},Dl=function(T){if($e(V.beforeSanitizeElements,T,null),Zi(T))return je(T),!0;const O=Ft(B?B(T):T.nodeName);if($e(V.uponSanitizeElement,T,{tagName:O,allowedTags:X}),Xp(T,O))return je(T),!0;if(Ye[O]||!(he.tagCheck instanceof Function&&he.tagCheck(O))&&!X[O])return Vp(T,O);if((S?S(T):T.nodeType)===Be.element&&!Up(T)||(O==="noscript"||O==="noembed"||O==="noframes")&&Wt(Jf,T.innerHTML))return je(T),!0;if(Ue&&T.nodeType===Be.text){const tt=Vi(T.textContent);T.textContent!==tt&&(vr(t.removed,{element:T.cloneNode()}),T.textContent=tt)}return $e(V.afterSanitizeElements,T,null),!1},Pl=function(T,O,U){if(rs[O]||Tl&&(O==="id"||O==="name")&&(U in r||U in Wp))return!1;const tt=nt[O]||he.attributeCheck instanceof Function&&he.attributeCheck(O,T);if(!(is&&Wt(Ct,O))){if(!(xl&&Wt(Lt,O))){if(tt){if(!ds[O]){if(!Wt(et,di(U,se,""))){if(!((O==="src"||O==="xlink:href"||O==="href")&&T!=="script"&&Ul(U,"data:")===0&&Bl[T])){if(!(bl&&!Wt(Nt,di(U,se,"")))){if(U)return!1}}}}}else if(!(Rl(T)&&(kt.tagNameCheck instanceof RegExp&&Wt(kt.tagNameCheck,T)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(T))&&(kt.attributeNameCheck instanceof RegExp&&Wt(kt.attributeNameCheck,O)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(O,T))||O==="is"&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&Wt(kt.tagNameCheck,U)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(U))))return!1}}return!0},Zp=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rl=function(T){return!Zp[bi(T)]&&Wt(ne,T)},Kp=function(T,O,U,tt){if(v&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!U)switch(d.getAttributeType(T,O)){case"TrustedHTML":return Y(tt);case"TrustedScriptURL":return H(tt)}return tt},Qp=function(T,O,U,tt){try{U?T.setAttributeNS(U,O,tt):T.setAttribute(O,tt),Zi(T)?je(T):Hl(t.removed)}catch{sr(O,T)}},ql=function(T){$e(V.beforeSanitizeAttributes,T,null);const O=T.attributes;if(!O||Zi(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let tt=O.length;const ct=Ft(T.nodeName);for(;tt--;){const yt=O[tt],Pt=yt.name,Et=yt.namespaceURI,ce=yt.value,ge=Ft(Pt),xs=ce;let Zt=Pt==="value"?xs:$f(xs);if(U.attrName=ge,U.attrValue=Zt,U.keepAttr=!0,U.forceKeepAttr=void 0,$e(V.uponSanitizeAttribute,T,U),Zt=U.attrValue,Sl&&(ge==="id"||ge==="name")&&Ul(Zt,wl)!==0&&(sr(Pt,T),Zt=wl+Zt),li&&Wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){sr(Pt,T);continue}if(ge==="attributename"&&Yl(Zt,"href")){sr(Pt,T);continue}if(!U.forceKeepAttr){if(!U.keepAttr){sr(Pt,T);continue}if(!kl&&Wt(tm,Zt)){sr(Pt,T);continue}if(Ue&&(Zt=Vi(Zt)),!Pl(ct,ge,Zt)){sr(Pt,T);continue}Zt=Kp(ct,ge,Et,Zt),Zt!==xs&&Qp(T,Pt,Et,Zt)}}$e(V.afterSanitizeAttributes,T,null)},Ki=function(T){let O=null;const U=Il(T);for($e(V.beforeSanitizeShadowDOM,T,null);O=U.nextNode();)if($e(V.uponSanitizeShadowNode,O,null),Dl(O),ql(O),Br(O.content)&&Ki(O.content),(S?S(O):O.nodeType)===Be.element){const ct=b(O);Br(ct)&&(Cs(ct),Ki(ct))}$e(V.afterSanitizeShadowDOM,T,null)},Cs=function(T){const O=[{node:T,shadow:null}];for(;O.length>0;){const U=O.pop();if(U.shadow){Ki(U.shadow);continue}const tt=U.node,yt=(S?S(tt):tt.nodeType)===Be.element,Pt=m(tt);if(Pt)for(let Et=Pt.length-1;Et>=0;--Et)O.push({node:Pt[Et],shadow:null});if(yt){const Et=B?B(tt):null;if(typeof Et=="string"&&Ft(Et)==="template"){const ce=tt.content;Br(ce)&&O.push({node:ce,shadow:null})}}if(yt){const Et=b(tt);Br(Et)&&O.push({node:null,shadow:Et},{node:Et,shadow:null})}}};return t.sanitize=function(j){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,U=null,tt=null,ct=null;if(us=!j,us&&(j="<!-->"),typeof j!="string"&&!hi(j)&&(j=qf(j),typeof j!="string"))throw or("dirty is not a string, aborting");if(!t.isSupported)return j;as?(X=ss,nt=os):ms(T),(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&(X=Qt(X)),V.uponSanitizeAttribute.length>0&&(nt=Qt(nt)),t.removed=[];const yt=hs&&typeof j!="string"&&hi(j);if(yt){const ce=B?B(j):j.nodeName;if(typeof ce=="string"){const ge=Ft(ce);if(!X[ge]||Ye[ge])throw or("root node is forbidden and cannot be sanitized in-place")}if(Zi(j))throw or("root node is clobbered and cannot be sanitized in-place");try{Cs(j)}catch(ge){throw Ol(j),ge}}else if(hi(j))O=$l("<!---->"),U=O.ownerDocument.importNode(j,!0),U.nodeType===Be.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?O=U:O.appendChild(U),Cs(U);else{if(!kr&&!Ue&&!ar&&j.indexOf("<")===-1)return v&&ji?Y(j):j;if(O=$l(j),!O)return kr?null:ji?M:""}O&&ls&&je(O.firstChild);const Pt=Il(yt?j:O);try{for(;tt=Pt.nextNode();)Dl(tt),ql(tt),Br(tt.content)&&Ki(tt.content)}catch(ce){throw yt&&Ol(j),ce}if(yt)return ci(t.removed,ce=>{ce.element&&Gp(ce.element)}),Ue&&ys(j),j;if(kr){if(Ue&&ys(O),Ui)for(ct=A.call(O.ownerDocument);O.firstChild;)ct.appendChild(O.firstChild);else ct=O;return(nt.shadowroot||nt.shadowrootmode)&&(ct=N.call(i,ct,!0)),ct}let Et=ar?O.outerHTML:O.innerHTML;return ar&&X["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&Wt(Zf,O.ownerDocument.doctype.name)&&(Et="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
4
+ `+Et),Ue&&(Et=Vi(Et)),v&&ji?Y(Et):Et},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ms(j),as=!0,ss=X,os=nt},t.clearConfig=function(){wr=null,as=!1,ss=null,os=null,v=L,M=""},t.isValidAttribute=function(j,T,O){wr||ms({});const U=Ft(j),tt=Ft(T);return Pl(U,tt,O)},t.addHook=function(j,T){typeof T=="function"&&Rt(V,j)&&vr(V[j],T)},t.removeHook=function(j,T){if(Rt(V,j)){if(T!==void 0){const O=Mf(V[j],T);return O===-1?void 0:Of(V[j],O,1)[0]}return Hl(V[j])}},t.removeHooks=function(j){Rt(V,j)&&(V[j]=[])},t.removeAllHooks=function(){V=tn()},t}var Kr=yh(),Ch=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,vi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,im=/\s*%%.*\n/gm,Pr,xh=(Pr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Pr,"UnknownDiagramError"),Pr),pr={},Ao=p(function(e,t){e=e.replace(Ch,"").replace(vi,"").replace(im,`
5
+ `);for(const[r,{detector:i}]of Object.entries(pr))if(i(e,t))return r;throw new xh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ns=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)bh(t,r,i)},"registerLazyLoadedDiagrams"),bh=p((e,t,r)=>{pr[e]&&W.warn(`Detector with key ${e} already exists. Overwriting.`),pr[e]={detector:t,loader:r},W.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),am=p(e=>pr[e].loader,"getDiagramLoader"),Ws=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Ws(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Ws(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),It=Ws,Me="#ffffff",Oe="#f2f2f2",ot=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Rr,sm=(Rr=class{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(){var r,i,a,s,o,l,n,h,c,d,g,u,y,f,m,C,b,k,S,B,v,M,L,z,D,I,Y,H,P,E,F,$,A,w;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?q(this.secondaryColor,30):this.secondaryColor),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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),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||R(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||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,5)),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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=q(this["cScale"+N],75);else for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=q(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||_(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||R(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||q(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(5+N*3)}),this["surfacePeer"+N]=this["surfacePeer"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(8+N*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((l=this.radar)==null?void 0:l.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((u=this.wardley)==null?void 0:u.axisColor)||this.lineColor,axisTextColor:((y=this.wardley)==null?void 0:y.axisTextColor)||this.primaryTextColor,gridColor:((f=this.wardley)==null?void 0:f.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((S=this.wardley)==null?void 0:S.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((B=this.wardley)==null?void 0:B.annotationStroke)||this.lineColor,annotationTextColor:((v=this.wardley)==null?void 0:v.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((L=this.xyChart)==null?void 0:L.backgroundColor)||this.background,titleColor:((z=this.xyChart)==null?void 0:z.titleColor)||this.primaryTextColor,dataLabelColor:((D=this.xyChart)==null?void 0:D.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((I=this.xyChart)==null?void 0:I.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((P=this.xyChart)==null?void 0:P.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((F=this.xyChart)==null?void 0:F.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(($=this.xyChart)==null?void 0:$.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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?q(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Rr,"Theme"),Rr),om=p(e=>{const t=new sm;return t.calculate(e),t},"getThemeVariables"),qr,lm=(qr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(_("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Qe(255,255,255,.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=q("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=q(this.sectionBkgColor,10),this.taskBorderColor=Qe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Qe(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(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(){var t,r,i,a,s,o,l,n,h,c,d,g,u,y,f,m,C,b,k,S,B,v,M,L,z,D,I,Y,H,P,E,F,$,A;this.secondBkg=R(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=R(this.labelBackground,25),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.altSectionBkgColor=this.background,this.taskBkgColor=R(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=_(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||_(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],10);for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{h:30,s:-30,l:-(-10+w*4)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{h:30,s:-30,l:-(-7+w*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["pie"+w]=this["cScale"+w];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 w=0;w<8;w++)this["venn"+(w+1)]=this["venn"+(w+1)]??R(this["cScale"+w],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.mainBkg,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:(($=this.wardley)==null?void 0:$.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.secondaryColor,20),this.git1=R(this.pie2||this.secondaryColor,20),this.git2=R(this.pie3||this.tertiaryColor,20),this.git3=R(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=R(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=R(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=R(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=R(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||R("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||R("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||R("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||R("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||R(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||R(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||R(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(qr,"Theme"),qr),nm=p(e=>{const t=new lm;return t.calculate(e),t},"getThemeVariables"),Nr,hm=(Nr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(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=Qe(102,102,255,.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(){var t,r,i,a,s,o,l,n,h,c,d,g,u,y,f,m,C,b,k,S,B,v,M,L,z,D,I,Y,H,P,E,F,$,A;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=q(this["cScale"+w],10),this["cScalePeer"+w]=this["cScalePeer"+w]||q(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||x(this["cScale"+w],{h:180});for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{h:30,l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{h:30,l:-(7+w*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||_(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||_(this.labelTextColor);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.labelTextColor}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.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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||R(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((n=this.radar)==null?void 0:n.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((z=this.xyChart)==null?void 0:z.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((F=this.xyChart)==null?void 0:F.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||q(_(this.git0),25),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Nr,"Theme"),Nr),cm=p(e=>{const t=new hm;return t.calculate(e),t},"getThemeVariables"),Wr,dm=(Wr=class{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=R("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.primaryColor),this.lineColor=_(this.background),this.textColor=_(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(){var t,r,i,a,s,o,l,n,h,c,d,g,u,y,f,m,C,b,k,S,B,v,M,L,z,D,I,Y,H,P,E,F,$,A;this.actorBorder=q(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=q(this["cScale"+w],10),this["cScalePeer"+w]=this["cScalePeer"+w]||q(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||x(this["cScale"+w],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{h:30,s:-30,l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{h:30,s:-30,l:-(8+w*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,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||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((n=this.radar)==null?void 0:n.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((z=this.xyChart)==null?void 0:z.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((F=this.xyChart)==null?void 0:F.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Wr,"Theme"),Wr),um=p(e=>{const t=new dm;return t.calculate(e),t},"getThemeVariables"),zr,gm=(zr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(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||R(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(){var t,r,i,a,s,o,l,n,h,c,d,g,u,y,f,m,C,b,k,S,B,v,M,L,z,D,I,Y,H,P,E,F,$,A;this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||_(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||q(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{l:-(8+w*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.sectionBkgColor=R(this.contrast,30),this.sectionBkgColor2=R(this.contrast,30),this.taskBorderColor=q(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=R(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=q(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["pie"+w]=this["cScale"+w];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 w=0;w<8;w++)this["venn"+(w+1)]=this["venn"+(w+1)]??this["cScale"+w];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.background,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:(($=this.wardley)==null?void 0:$.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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=q(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(zr,"Theme"),zr),pm=p(e=>{const t=new gm;return t.calculate(e),t},"getThemeVariables"),Hr,fm=(Hr=class{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=ot(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(){var s,o,l,n,h,c,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?q(this.secondaryColor,30):this.secondaryColor),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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||_(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Hr,"Theme"),Hr),mm=p(e=>{const t=new fm;return t.calculate(e),t},"getThemeVariables"),Yr,ym=(Yr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(_("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=_(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(){var r,i,a,s,o,l,n,h,c,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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.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?q(this.secondaryColor,30):this.secondaryColor),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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),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||R(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||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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||_(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?q(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=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Yr,"Theme"),Yr),Cm=p(e=>{const t=new ym;return t.calculate(e),t},"getThemeVariables"),Ur,xm=(Ur=class{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=ot("#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(){var s,o,l,n,h,c,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||_(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ur,"Theme"),Ur),bm=p(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),jr,km=(jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(_("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=_(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(){var r,i,a,s,o,l,n,h,c,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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.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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),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||R(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.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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||_(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?q(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(jr,"Theme"),jr),Tm=p(e=>{const t=new km;return t.calculate(e),t},"getThemeVariables"),Gr,Sm=(Gr=class{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=ot(this.primaryColor,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.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.filterColor="#000000"}updateColors(){var s,o,l,n,h,c,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?q(this.secondaryColor,30):this.secondaryColor),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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,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.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||"#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";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||_(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Gr,"Theme"),Gr),wm=p(e=>{const t=new Sm;return t.calculate(e),t},"getThemeVariables"),Xr,Bm=(Xr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(_("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=_(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.filterColor="#FFFFFF"}updateColors(){var r,i,a,s,o,l,n,h,c,d,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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.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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rootLabelColor="#FFFFFF",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||R(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.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.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||"#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";for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||_(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=q(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?q(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Xr,"Theme"),Xr),vm=p(e=>{const t=new Bm;return t.calculate(e),t},"getThemeVariables"),Re={base:{getThemeVariables:om},dark:{getThemeVariables:nm},default:{getThemeVariables:cm},forest:{getThemeVariables:um},neutral:{getThemeVariables:pm},neo:{getThemeVariables:mm},"neo-dark":{getThemeVariables:Cm},redux:{getThemeVariables:bm},"redux-dark":{getThemeVariables:Tm},"redux-color":{getThemeVariables:wm},"redux-dark-color":{getThemeVariables:vm}},Kt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,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,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,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,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,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:.75},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,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},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},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},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:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,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},kh={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Re.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},ishikawa:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn}},Th=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Th(e[i],"")]:[...r,t+i],[]),"keyify"),Lm=new Set(Th(kh,"")),Sh=kh,ba=p(e=>{if(W.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ba(t));return}for(const t of Object.keys(e)){if(W.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Lm.has(t)||e[t]==null){W.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const a of Object.keys(e[t]))(typeof e[t][a]!="string"||!i.test(e[t][a]))&&(W.debug("sanitize deleting invalid color:",a,e[t][a]),delete e[t][a])}else W.debug("sanitizing object",t),ba(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(W.debug("sanitizing css option",t),e[t]=wh(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}W.debug("After sanitization",e)}},"sanitizeDirective"),wh=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Qr=Object.freeze(Sh),We=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=It({},Qr),ka,fr=[],Li=It({},Qr),Ha=p((e,t)=>{let r=It({},e),i={};for(const a of t)Lh(a),i=It(i,a);if(r=It(r,i),i.theme&&i.theme in Re){const a=It({},ka),s=It(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Re&&(r.themeVariables=Re[r.theme].getThemeVariables(s))}return Li=r,_h(Li),Li},"updateCurrentConfig"),Fm=p(e=>(ie=It({},Qr),ie=It(ie,e),e.theme&&Re[e.theme]&&(ie.themeVariables=Re[e.theme].getThemeVariables(e.themeVariables)),Ha(ie,fr),ie),"setSiteConfig"),_m=p(e=>{ka=It({},e)},"saveConfigFromInitialize"),Am=p(e=>(ie=It(ie,e),Ha(ie,fr),ie),"updateSiteConfig"),Bh=p(()=>It({},ie),"getSiteConfig"),vh=p(e=>(_h(e),It(Li,e),vt()),"setConfig"),vt=p(()=>It({},Li),"getConfig"),Lh=p(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Lh(e[t])}))},"sanitize"),Em=p(e=>{var t;ba(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),fr.push(e),Ha(ie,fr)},"addDirective"),Ta=p((e=ie)=>{fr=[],Ha(e,fr)},"reset"),Mm={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."},en={},Fh=p(e=>{en[e]||(W.warn(Mm[e]),en[e]=!0)},"issueWarning"),_h=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Fh("LAZY_LOAD_DEPRECATED")},"checkConfig"),CT=p(()=>{let e={};ka&&(e=It(e,ka));for(const t of fr)e=It(e,t);return e},"getUserDefinedConfig"),ee=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Fh("FLOWCHART_HTML_LABELS_DEPRECATED"),We(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ri=/<br\s*\/?>/gi,Om=p(e=>e?Mh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),$m=(()=>{let e=!1;return()=>{e||(Ah(),e=!0)}})();function Ah(){const e="data-temp-href-target";Kr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Kr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Ah,"setupDompurifyHooks");var Eh=p(e=>($m(),Kr.sanitize(e)),"removeScript"),rn=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Eh(e):r!=="loose"&&(e=Mh(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Rm(e))}return e},"sanitizeMore"),be=p((e,t)=>e&&(t.dompurifyConfig?e=Kr.sanitize(rn(e,t),t.dompurifyConfig).toString():e=Kr.sanitize(rn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Im=p((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),Dm=p(e=>Ri.test(e),"hasBreaks"),Pm=p(e=>e.split(Ri),"splitBreaks"),Rm=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Mh=p(e=>e.replace(Ri,"#br#"),"breakToPlaceholder"),qm=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Nm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Wm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),an=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];zm(s,o)&&(a=s+","+o,i++,r.pop())}r.push(Hm(a))}return r.join("")},"parseGenericTypes"),zs=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),zm=p((e,t)=>{const r=zs(e,"~"),i=zs(t,"~");return r===1&&i===1},"shouldCombineSets"),Hm=p(e=>{const t=zs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),sn=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Hs=/\$\$(.*)\$\$/g,Ai=p(e=>{var t;return(((t=e.match(Hs))==null?void 0:t.length)??0)>0},"hasKatex"),xT=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Oh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),Ym=p(async(e,t)=>{if(!Ai(e))return e;if(!(sn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Hs,"MathML is unsupported in this environment.");{const{default:r}=await pt(async()=>{const{default:a}=await import("./explorer-katex.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!sn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ri).map(a=>Ai(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Hs,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Oh=p(async(e,t)=>be(await Ym(e,t),t),"renderKatexSanitized"),qi={getRows:Om,sanitizeText:be,sanitizeTextOrArray:Im,hasBreaks:Dm,splitBreaks:Pm,lineBreakRegex:Ri,removeScript:Eh,getUrl:qm,evaluate:We,getMax:Nm,getMin:Wm},Um=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),jm=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),$h=p(function(e,t,r,i){const a=jm(t,r,i);Um(e,a)},"configureSvgSize"),Gm=p(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;W.info(`SVG bounds: ${s}x${o}`,a);let l=0,n=0;W.info(`Graph bounds: ${l}x${n}`,e),l=s+r*2,n=o+r*2,W.info(`Calculated bounds: ${l}x${n}`),$h(t,n,l,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),da={};function Ys(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}p(Ys,"cssStyleSheetToString");var Xm=p((e,t,r,i)=>{let a="";return e in da&&da[e]?a=da[e]({...r,svgId:i}):W.warn(`No theme found for ${e}`),` & {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${a}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
+ }
88
+
89
+
90
+ [data-look="neo"].node path {
91
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
92
+ stroke-width: ${r.strokeWidth??1}px;
93
+ }
94
+
95
+ [data-look="neo"].node .outer-path {
96
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
97
+ }
98
+
99
+ [data-look="neo"].node .neo-line path {
100
+ stroke: ${r.nodeBorder};
101
+ filter: none;
102
+ }
103
+
104
+ [data-look="neo"].node circle{
105
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
106
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
107
+ }
108
+
109
+ [data-look="neo"].node circle .state-start{
110
+ fill: #000000;
111
+ }
112
+
113
+ [data-look="neo"].icon-shape .icon {
114
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
115
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
116
+ }
117
+
118
+ [data-look="neo"].icon-shape .icon-neo path {
119
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
120
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
121
+ }
122
+
123
+ ${t}
124
+ `},"getStyles"),Vm=p((e,t)=>{t!==void 0&&(da[e]=t)},"addStylesForDiagram"),Zm=Xm,Ih={};mf(Ih,{clear:()=>Km,getAccDescription:()=>ey,getAccTitle:()=>Jm,getDiagramTitle:()=>iy,setAccDescription:()=>ty,setAccTitle:()=>Qm,setDiagramTitle:()=>ry});var Eo="",Mo="",Oo="",$o=p(e=>be(e,vt()),"sanitizeText"),Km=p(()=>{Eo="",Oo="",Mo=""},"clear"),Qm=p(e=>{Eo=$o(e).replace(/^\s+/g,"")},"setAccTitle"),Jm=p(()=>Eo,"getAccTitle"),ty=p(e=>{Oo=$o(e).replace(/\n\s+/g,`
125
+ `)},"setAccDescription"),ey=p(()=>Oo,"getAccDescription"),ry=p(e=>{Mo=$o(e)},"setDiagramTitle"),iy=p(()=>Mo,"getDiagramTitle"),on=W,ay=_o,xt=vt,bT=vh,kT=Qr,Io=p(e=>be(e,xt()),"sanitizeText"),sy=Gm,oy=p(()=>Ih,"getCommonDb"),Sa={},wa=p((e,t,r)=>{var i;Sa[e]&&on.warn(`Diagram with id ${e} already registered. Overwriting.`),Sa[e]=t,r&&bh(e,r),Vm(e,t.styles),(i=t.injectUtils)==null||i.call(t,on,ay,xt,Io,sy,oy(),()=>{})},"registerDiagram"),Us=p(e=>{if(e in Sa)return Sa[e];throw new ly(e)},"getDiagram"),Vr,ly=(Vr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Vr,"DiagramNotFoundError"),Vr),ny=p(e=>{var a;const{securityLevel:t}=xt();let r=ht("body");if(t==="sandbox"){const o=((a=ht(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Do(e){return typeof e>"u"||e===null}p(Do,"isNothing");function Dh(e){return typeof e=="object"&&e!==null}p(Dh,"isObject");function Ph(e){return Array.isArray(e)?e:Do(e)?[]:[e]}p(Ph,"toArray");function Rh(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}p(Rh,"extend");function qh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(qh,"repeat");function Nh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Nh,"isNegativeZero");var hy=Do,cy=Dh,dy=Ph,uy=qh,gy=Nh,py=Rh,Dt={isNothing:hy,isObject:cy,toArray:dy,repeat:uy,isNegativeZero:gy,extend:py};function Po(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
126
+
127
+ `+e.mark.snippet),i+" "+r):i}p(Po,"formatError");function Jr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Po(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Jr,"YAMLException$1");Jr.prototype=Object.create(Error.prototype);Jr.prototype.constructor=Jr;Jr.prototype.toString=p(function(t){return this.name+": "+Po(this,t)},"toString");var ae=Jr;function ua(e,t,r,i,a){var s="",o="",l=Math.floor(a/2)-1;return i-t>l&&(s=" ... ",t=i-l+s.length),r-i>l&&(o=" ...",r=i+l-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}p(ua,"getLine");function ga(e,t){return Dt.repeat(" ",t-e.length)+e}p(ga,"padStart");function Wh(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var l="",n,h,c=Math.min(e.line+t.linesAfter,a.length).toString().length,d=t.maxLength-(t.indent+c+3);for(n=1;n<=t.linesBefore&&!(o-n<0);n++)h=ua(e.buffer,i[o-n],a[o-n],e.position-(i[o]-i[o-n]),d),l=Dt.repeat(" ",t.indent)+ga((e.line-n+1).toString(),c)+" | "+h.str+`
128
+ `+l;for(h=ua(e.buffer,i[o],a[o],e.position,d),l+=Dt.repeat(" ",t.indent)+ga((e.line+1).toString(),c)+" | "+h.str+`
129
+ `,l+=Dt.repeat("-",t.indent+c+3+h.pos)+`^
130
+ `,n=1;n<=t.linesAfter&&!(o+n>=a.length);n++)h=ua(e.buffer,i[o+n],a[o+n],e.position-(i[o]-i[o+n]),d),l+=Dt.repeat(" ",t.indent)+ga((e.line+n+1).toString(),c)+" | "+h.str+`
131
+ `;return l.replace(/\n$/,"")}p(Wh,"makeSnippet");var fy=Wh,my=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],yy=["scalar","sequence","mapping"];function zh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(zh,"compileStyleAliases");function Hh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(my.indexOf(r)===-1)throw new ae('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=zh(t.styleAliases||null),yy.indexOf(this.kind)===-1)throw new ae('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Hh,"Type$1");var Xt=Hh;function js(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}p(js,"compileList");function Yh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Yh,"compileMap");function Ba(e){return this.extend(e)}p(Ba,"Schema$1");Ba.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Xt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new ae("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Xt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ae("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ae("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Xt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Ba.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=js(a,"implicit"),a.compiledExplicit=js(a,"explicit"),a.compiledTypeMap=Yh(a.compiledImplicit,a.compiledExplicit),a},"extend");var Cy=Ba,xy=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),by=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),ky=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Ty=new Cy({explicit:[xy,by,ky]});function Uh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Uh,"resolveYamlNull");function jh(){return null}p(jh,"constructYamlNull");function Gh(e){return e===null}p(Gh,"isNull");var Sy=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Uh,construct:jh,predicate:Gh,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Xh(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(Xh,"resolveYamlBoolean");function Vh(e){return e==="true"||e==="True"||e==="TRUE"}p(Vh,"constructYamlBoolean");function Zh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Zh,"isBoolean");var wy=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xh,construct:Vh,predicate:Zh,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Kh(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Kh,"isHexCode");function Qh(e){return 48<=e&&e<=55}p(Qh,"isOctCode");function Jh(e){return 48<=e&&e<=57}p(Jh,"isDecCode");function tc(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Kh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Qh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Jh(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}p(tc,"resolveYamlInteger");function ec(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(ec,"constructYamlInteger");function rc(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Dt.isNegativeZero(e)}p(rc,"isInteger");var By=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:tc,construct:ec,predicate:rc,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vy=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ic(e){return!(e===null||!vy.test(e)||e[e.length-1]==="_")}p(ic,"resolveYamlFloat");function ac(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(ac,"constructYamlFloat");var Ly=/^[-+]?[0-9]+e/;function sc(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Dt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ly.test(r)?r.replace("e",".e"):r}p(sc,"representYamlFloat");function oc(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Dt.isNegativeZero(e))}p(oc,"isFloat");var Fy=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:ic,construct:ac,predicate:oc,represent:sc,defaultStyle:"lowercase"}),lc=Ty.extend({implicit:[Sy,wy,By,Fy]}),_y=lc,nc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),hc=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 cc(e){return e===null?!1:nc.exec(e)!==null||hc.exec(e)!==null}p(cc,"resolveYamlTimestamp");function dc(e){var t,r,i,a,s,o,l,n=0,h=null,c,d,g;if(t=nc.exec(e),t===null&&(t=hc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],o=+t[5],l=+t[6],t[7]){for(n=t[7].slice(0,3);n.length<3;)n+="0";n=+n}return t[9]&&(c=+t[10],d=+(t[11]||0),h=(c*60+d)*6e4,t[9]==="-"&&(h=-h)),g=new Date(Date.UTC(r,i,a,s,o,l,n)),h&&g.setTime(g.getTime()-h),g}p(dc,"constructYamlTimestamp");function uc(e){return e.toISOString()}p(uc,"representYamlTimestamp");var Ay=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:cc,construct:dc,instanceOf:Date,represent:uc});function gc(e){return e==="<<"||e===null}p(gc,"resolveYamlMerge");var Ey=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:gc}),Ro=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
+ \r`;function pc(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=Ro;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(pc,"resolveYamlBinary");function fc(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=Ro,o=0,l=[];for(t=0;t<a;t++)t%4===0&&t&&(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):r===18?(l.push(o>>10&255),l.push(o>>2&255)):r===12&&l.push(o>>4&255),new Uint8Array(l)}p(fc,"constructYamlBinary");function mc(e){var t="",r=0,i,a,s=e.length,o=Ro;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(mc,"representYamlBinary");function yc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(yc,"isBinary");var My=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pc,construct:fc,predicate:yc,represent:mc}),Oy=Object.prototype.hasOwnProperty,$y=Object.prototype.toString;function Cc(e){if(e===null)return!0;var t=[],r,i,a,s,o,l=e;for(r=0,i=l.length;r<i;r+=1){if(a=l[r],o=!1,$y.call(a)!=="[object Object]")return!1;for(s in a)if(Oy.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}p(Cc,"resolveYamlOmap");function xc(e){return e!==null?e:[]}p(xc,"constructYamlOmap");var Iy=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Cc,construct:xc}),Dy=Object.prototype.toString;function bc(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Dy.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}p(bc,"resolveYamlPairs");function kc(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}p(kc,"constructYamlPairs");var Py=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:bc,construct:kc}),Ry=Object.prototype.hasOwnProperty;function Tc(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ry.call(r,t)&&r[t]!==null)return!1;return!0}p(Tc,"resolveYamlSet");function Sc(e){return e!==null?e:{}}p(Sc,"constructYamlSet");var qy=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Tc,construct:Sc}),wc=_y.extend({implicit:[Ay,Ey],explicit:[My,Iy,Py,qy]}),tr=Object.prototype.hasOwnProperty,va=1,Bc=2,vc=3,La=4,Bs=1,Ny=2,ln=3,Wy=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,zy=/[\x85\u2028\u2029]/,Hy=/[,\[\]\{\}]/,Lc=/^(?:!|!!|![a-z\-]+!)$/i,Fc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Gs(e){return Object.prototype.toString.call(e)}p(Gs,"_class");function Ce(e){return e===10||e===13}p(Ce,"is_EOL");function Je(e){return e===9||e===32}p(Je,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}p(Jt,"is_WS_OR_EOL");function dr(e){return e===44||e===91||e===93||e===123||e===125}p(dr,"is_FLOW_INDICATOR");function _c(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(_c,"fromHexCode");function Ac(e){return e===120?2:e===117?4:e===85?8:0}p(Ac,"escapedHexLen");function Ec(e){return 48<=e&&e<=57?e-48:-1}p(Ec,"fromDecimalCode");function Xs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
133
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Xs,"simpleEscapeSequence");function Mc(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Mc,"charFromCodepoint");function qo(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(qo,"setProperty");var Oc=new Array(256),$c=new Array(256);for(lr=0;lr<256;lr++)Oc[lr]=Xs(lr)?1:0,$c[lr]=Xs(lr);var lr;function Ic(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||wc,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Ic,"State$1");function No(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=fy(r),new ae(t,r)}p(No,"generateError");function rt(e,t){throw No(e,t)}p(rt,"throwError");function Ei(e,t){e.onWarning&&e.onWarning.call(null,No(e,t))}p(Ei,"throwWarning");var nn={YAML:p(function(t,r,i){var a,s,o;t.version!==null&&rt(t,"duplication of %YAML directive"),i.length!==1&&rt(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&rt(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Ei(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var a,s;i.length!==2&&rt(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Lc.test(a)||rt(t,"ill-formed tag handle (first argument) of the TAG directive"),tr.call(t.tagMap,a)&&rt(t,'there is a previously declared suffix for "'+a+'" tag handle'),Fc.test(s)||rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{rt(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function qe(e,t,r,i){var a,s,o,l;if(t<r){if(l=e.input.slice(t,r),i)for(a=0,s=l.length;a<s;a+=1)o=l.charCodeAt(a),o===9||32<=o&&o<=1114111||rt(e,"expected valid JSON character");else Wy.test(l)&&rt(e,"the stream contains non-printable characters");e.result+=l}}p(qe,"captureSegment");function Vs(e,t,r,i){var a,s,o,l;for(Dt.isObject(r)||rt(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,l=a.length;o<l;o+=1)s=a[o],tr.call(t,s)||(qo(t,s,r[s]),i[s]=!0)}p(Vs,"mergeMappings");function ur(e,t,r,i,a,s,o,l,n){var h,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,c=a.length;h<c;h+=1)Array.isArray(a[h])&&rt(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Gs(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&Gs(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,c=s.length;h<c;h+=1)Vs(e,t,s[h],r);else Vs(e,t,s,r);else!e.json&&!tr.call(r,a)&&tr.call(t,a)&&(e.line=o||e.line,e.lineStart=l||e.lineStart,e.position=n||e.position,rt(e,"duplicated mapping key")),qo(t,a,s),delete r[a];return t}p(ur,"storeMappingPair");function Ya(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):rt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Ya,"readLineBreak");function At(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Je(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Ce(a))for(Ya(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Ei(e,"deficient indentation"),i}p(At,"skipSeparationSpace");function Ni(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Jt(r)))}p(Ni,"testDocumentSeparator");function Ua(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
134
+ `,t-1))}p(Ua,"writeFoldedLines");function Dc(e,t,r){var i,a,s,o,l,n,h,c,d=e.kind,g=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||dr(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(a=e.input.charCodeAt(e.position+1),Jt(a)||r&&dr(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,l=!1;u!==0;){if(u===58){if(a=e.input.charCodeAt(e.position+1),Jt(a)||r&&dr(a))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&Ni(e)||r&&dr(u))break;if(Ce(u))if(n=e.line,h=e.lineStart,c=e.lineIndent,At(e,!1,-1),e.lineIndent>=t){l=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=n,e.lineStart=h,e.lineIndent=c;break}}l&&(qe(e,s,o,!1),Ua(e,e.line-n),s=o=e.position,l=!1),Je(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return qe(e,s,o,!1),e.result?!0:(e.kind=d,e.result=g,!1)}p(Dc,"readPlainScalar");function Pc(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(qe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else Ce(r)?(qe(e,i,a,!0),Ua(e,At(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Ni(e)?rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);rt(e,"unexpected end of the stream within a single quoted scalar")}p(Pc,"readSingleQuotedScalar");function Rc(e,t){var r,i,a,s,o,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return qe(e,r,e.position,!0),e.position++,!0;if(l===92){if(qe(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),Ce(l))At(e,!1,t);else if(l<256&&Oc[l])e.result+=$c[l],e.position++;else if((o=Ac(l))>0){for(a=o,s=0;a>0;a--)l=e.input.charCodeAt(++e.position),(o=_c(l))>=0?s=(s<<4)+o:rt(e,"expected hexadecimal character");e.result+=Mc(s),e.position++}else rt(e,"unknown escape sequence");r=i=e.position}else Ce(l)?(qe(e,r,i,!0),Ua(e,At(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ni(e)?rt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}rt(e,"unexpected end of the stream within a double quoted scalar")}p(Rc,"readDoubleQuotedScalar");function qc(e,t){var r=!0,i,a,s,o=e.tag,l,n=e.anchor,h,c,d,g,u,y=Object.create(null),f,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,u=!1,l=[];else if(b===123)c=125,u=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),b=e.input.charCodeAt(++e.position);b!==0;){if(At(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=n,e.kind=u?"mapping":"sequence",e.result=l,!0;r?b===44&&rt(e,"expected the node content, but found ','"):rt(e,"missed comma between flow collection entries"),m=f=C=null,d=g=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Jt(h)&&(d=g=!0,e.position++,At(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,mr(e,t,va,!1,!0),m=e.tag,f=e.result,At(e,!0,t),b=e.input.charCodeAt(e.position),(g||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),At(e,!0,t),mr(e,t,va,!1,!0),C=e.result),u?ur(e,l,y,m,f,C,i,a,s):d?l.push(ur(e,null,y,m,f,C,i,a,s)):l.push(f),At(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}rt(e,"unexpected end of the stream within a flow collection")}p(qc,"readFlowCollection");function Nc(e,t){var r,i,a=Bs,s=!1,o=!1,l=t,n=0,h=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Bs===a?a=d===43?ln:Ny:rt(e,"repeat of a chomping mode identifier");else if((c=Ec(d))>=0)c===0?rt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?rt(e,"repeat of an indentation width identifier"):(l=t+c-1,o=!0);else break;if(Je(d)){do d=e.input.charCodeAt(++e.position);while(Je(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ce(d)&&d!==0)}for(;d!==0;){for(Ya(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<l)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>l&&(l=e.lineIndent),Ce(d)){n++;continue}if(e.lineIndent<l){a===ln?e.result+=Dt.repeat(`
135
+ `,s?1+n:n):a===Bs&&s&&(e.result+=`
136
+ `);break}for(i?Je(d)?(h=!0,e.result+=Dt.repeat(`
137
+ `,s?1+n:n)):h?(h=!1,e.result+=Dt.repeat(`
138
+ `,n+1)):n===0?s&&(e.result+=" "):e.result+=Dt.repeat(`
139
+ `,n):e.result+=Dt.repeat(`
140
+ `,s?1+n:n),s=!0,o=!0,n=0,r=e.position;!Ce(d)&&d!==0;)d=e.input.charCodeAt(++e.position);qe(e,r,e.position,!1)}return!0}p(Nc,"readBlockScalar");function Zs(e,t){var r,i=e.tag,a=e.anchor,s=[],o,l=!1,n;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),n=e.input.charCodeAt(e.position);n!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),!(n!==45||(o=e.input.charCodeAt(e.position+1),!Jt(o))));){if(l=!0,e.position++,At(e,!0,-1)&&e.lineIndent<=t){s.push(null),n=e.input.charCodeAt(e.position);continue}if(r=e.line,mr(e,t,vc,!1,!0),s.push(e.result),At(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&n!==0)rt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}p(Zs,"readBlockSequence");function Wc(e,t,r){var i,a,s,o,l,n,h=e.tag,c=e.anchor,d={},g=Object.create(null),u=null,y=null,f=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Jt(i))b===63?(m&&(ur(e,d,g,u,y,null,o,l,n),u=y=f=null),C=!0,m=!0,a=!0):m?(m=!1,a=!0):rt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,l=e.lineStart,n=e.position,!mr(e,r,Bc,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);Je(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||rt(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(ur(e,d,g,u,y,null,o,l,n),u=y=f=null),C=!0,m=!1,a=!1,u=e.tag,y=e.result;else if(C)rt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)rt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(m&&(o=e.line,l=e.lineStart,n=e.position),mr(e,t,La,!0,a)&&(m?y=e.result:f=e.result),m||(ur(e,d,g,u,y,f,o,l,n),u=y=f=null),At(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)rt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&ur(e,d,g,u,y,null,o,l,n),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}p(Wc,"readBlockMapping");function zc(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&rt(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):rt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Jt(o);)o===33&&(i?rt(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Lc.test(a)||rt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Hy.test(s)&&rt(e,"tag suffix cannot contain flow indicator characters")}s&&!Fc.test(s)&&rt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{rt(e,"tag name is malformed: "+s)}return r?e.tag=s:tr.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:rt(e,'undeclared tag handle "'+a+'"'),!0}p(zc,"readTagProperty");function Hc(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&rt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!dr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Hc,"readAnchorProperty");function Yc(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Jt(i)&&!dr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),tr.call(e.anchorMap,r)||rt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],At(e,!0,-1),!0}p(Yc,"readAlias");function mr(e,t,r,i,a){var s,o,l,n=1,h=!1,c=!1,d,g,u,y,f,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=l=La===r||vc===r,i&&At(e,!0,-1)&&(h=!0,e.lineIndent>t?n=1:e.lineIndent===t?n=0:e.lineIndent<t&&(n=-1)),n===1)for(;zc(e)||Hc(e);)At(e,!0,-1)?(h=!0,l=s,e.lineIndent>t?n=1:e.lineIndent===t?n=0:e.lineIndent<t&&(n=-1)):l=!1;if(l&&(l=h||a),(n===1||La===r)&&(va===r||Bc===r?f=t:f=t+1,m=e.position-e.lineStart,n===1?l&&(Zs(e,m)||Wc(e,m,f))||qc(e,f)?c=!0:(o&&Nc(e,f)||Pc(e,f)||Rc(e,f)?c=!0:Yc(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&rt(e,"alias node should not have any properties")):Dc(e,f,va===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):n===0&&(c=l&&Zs(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&rt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,g=e.implicitTypes.length;d<g;d+=1)if(y=e.implicitTypes[d],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(tr.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,g=u.length;d<g;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){y=u[d];break}y||rt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):rt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}p(mr,"composeNode");function Uc(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(At(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&rt(e,"directive name must not be less than one character in length");o!==0;){for(;Je(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Ce(o));break}if(Ce(o))break;for(r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&Ya(e),tr.call(nn,i)?nn[i](e,i,a):Ei(e,'unknown document directive "'+i+'"')}if(At(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,At(e,!0,-1)):s&&rt(e,"directives end mark is expected"),mr(e,e.lineIndent-1,La,!1,!0),At(e,!0,-1),e.checkLineBreaks&&zy.test(e.input.slice(t,e.position))&&Ei(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ni(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,At(e,!0,-1));return}if(e.position<e.length-1)rt(e,"end of the stream or a document separator is expected");else return}p(Uc,"readDocument");function Wo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
141
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Ic(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,rt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Uc(r);return r.documents}p(Wo,"loadDocuments");function Yy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Wo(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}p(Yy,"loadAll$1");function jc(e,t){var r=Wo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ae("expected a single document in the stream, but found more")}}p(jc,"load$1");var Uy=jc,jy={load:Uy},Gc=Object.prototype.toString,Xc=Object.prototype.hasOwnProperty,zo=65279,Gy=9,Mi=10,Xy=13,Vy=32,Zy=33,Ky=34,Ks=35,Qy=37,Jy=38,tC=39,eC=42,Vc=44,rC=45,Fa=58,iC=61,aC=62,sC=63,oC=64,Zc=91,Kc=93,lC=96,Qc=123,nC=124,Jc=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var hC=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],cC=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function td(e,t){var r,i,a,s,o,l,n;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],l=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),n=e.compiledTypeMap.fallback[o],n&&Xc.call(n.styleAliases,l)&&(l=n.styleAliases[l]),r[o]=l;return r}p(td,"compileStyleMap");function ed(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new ae("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-t.length)+t}p(ed,"encodeHex");var dC=1,Oi=2;function rd(e){this.schema=e.schema||wc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Dt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=td(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==='"'?Oi:dC,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}p(rd,"State");function Qs(e,t){for(var r=Dt.repeat(" ",t),i=0,a=-1,s="",o,l=e.length;i<l;)a=e.indexOf(`
142
+ `,i),a===-1?(o=e.slice(i),i=l):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
143
+ `&&(s+=r),s+=o;return s}p(Qs,"indentString");function _a(e,t){return`
144
+ `+Dt.repeat(" ",e.indent*t)}p(_a,"generateNextLine");function id(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}p(id,"testImplicitResolving");function $i(e){return e===Vy||e===Gy}p($i,"isWhitespace");function ti(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==zo||65536<=e&&e<=1114111}p(ti,"isPrintable");function Js(e){return ti(e)&&e!==zo&&e!==Xy&&e!==Mi}p(Js,"isNsCharOrWhitespace");function to(e,t,r){var i=Js(e),a=i&&!$i(e);return(r?i:i&&e!==Vc&&e!==Zc&&e!==Kc&&e!==Qc&&e!==Jc)&&e!==Ks&&!(t===Fa&&!a)||Js(t)&&!$i(t)&&e===Ks||t===Fa&&a}p(to,"isPlainSafe");function ad(e){return ti(e)&&e!==zo&&!$i(e)&&e!==rC&&e!==sC&&e!==Fa&&e!==Vc&&e!==Zc&&e!==Kc&&e!==Qc&&e!==Jc&&e!==Ks&&e!==Jy&&e!==eC&&e!==Zy&&e!==nC&&e!==iC&&e!==aC&&e!==tC&&e!==Ky&&e!==Qy&&e!==oC&&e!==lC}p(ad,"isPlainSafeFirst");function sd(e){return!$i(e)&&e!==Fa}p(sd,"isPlainSafeLast");function Or(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Or,"codePointAt");function Ho(e){var t=/^\n* /;return t.test(e)}p(Ho,"needIndentIndicator");var od=1,eo=2,ld=3,nd=4,Ar=5;function hd(e,t,r,i,a,s,o,l){var n,h=0,c=null,d=!1,g=!1,u=i!==-1,y=-1,f=ad(Or(e,0))&&sd(Or(e,e.length-1));if(t||o)for(n=0;n<e.length;h>=65536?n+=2:n++){if(h=Or(e,n),!ti(h))return Ar;f=f&&to(h,c,l),c=h}else{for(n=0;n<e.length;h>=65536?n+=2:n++){if(h=Or(e,n),h===Mi)d=!0,u&&(g=g||n-y-1>i&&e[y+1]!==" ",y=n);else if(!ti(h))return Ar;f=f&&to(h,c,l),c=h}g=g||u&&n-y-1>i&&e[y+1]!==" "}return!d&&!g?f&&!o&&!a(e)?od:s===Oi?Ar:eo:r>9&&Ho(e)?Ar:o?s===Oi?Ar:eo:g?nd:ld}p(hd,"chooseScalarStyle");function cd(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===Oi?'""':"''";if(!e.noCompatMode&&(hC.indexOf(t)!==-1||cC.test(t)))return e.quotingType===Oi?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=i||e.flowLevel>-1&&r>=e.flowLevel;function n(h){return id(e,h)}switch(p(n,"testAmbiguity"),hd(t,l,e.indent,o,n,e.quotingType,e.forceQuotes&&!i,a)){case od:return t;case eo:return"'"+t.replace(/'/g,"''")+"'";case ld:return"|"+ro(t,e.indent)+io(Qs(t,s));case nd:return">"+ro(t,e.indent)+io(Qs(dd(t,o),s));case Ar:return'"'+ud(t)+'"';default:throw new ae("impossible error: invalid scalar style")}})()}p(cd,"writeScalar");function ro(e,t){var r=Ho(e)?String(t):"",i=e[e.length-1]===`
145
+ `,a=i&&(e[e.length-2]===`
146
+ `||e===`
147
+ `),s=a?"+":i?"":"-";return r+s+`
148
+ `}p(ro,"blockHeader");function io(e){return e[e.length-1]===`
149
+ `?e.slice(0,-1):e}p(io,"dropEndingNewline");function dd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
150
+ `);return h=h!==-1?h:e.length,r.lastIndex=h,ao(e.slice(0,h),t)})(),a=e[0]===`
151
+ `||e[0]===" ",s,o;o=r.exec(e);){var l=o[1],n=o[2];s=n[0]===" ",i+=l+(!a&&!s&&n!==""?`
152
+ `:"")+ao(n,t),a=s}return i}p(dd,"foldString");function ao(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,l=0,n="";i=r.exec(e);)l=i.index,l-a>t&&(s=o>a?o:l,n+=`
153
+ `+e.slice(a,s),a=s+1),o=l;return n+=`
154
+ `,e.length-a>t&&o>a?n+=e.slice(a,o)+`
155
+ `+e.slice(o+1):n+=e.slice(a),n.slice(1)}p(ao,"foldLine");function ud(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Or(e,a),i=Vt[r],!i&&ti(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||ed(r);return t}p(ud,"escapeString");function gd(e,t,r){var i="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(Ee(e,t,l,!1,!1)||typeof l>"u"&&Ee(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}p(gd,"writeFlowSequence");function so(e,t,r,i){var a="",s=e.tag,o,l,n;for(o=0,l=r.length;o<l;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(Ee(e,t+1,n,!0,!0,!1,!0)||typeof n>"u"&&Ee(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=_a(e,t)),e.dump&&Mi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}p(so,"writeBlockSequence");function pd(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,l,n,h,c;for(o=0,l=s.length;o<l;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),n=s[o],h=r[n],e.replacer&&(h=e.replacer.call(r,n,h)),Ee(e,t,n,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ee(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}p(pd,"writeFlowMapping");function fd(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),l,n,h,c,d,g;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ae("sortKeys must be a boolean or a function");for(l=0,n=o.length;l<n;l+=1)g="",(!i||a!=="")&&(g+=_a(e,t)),h=o[l],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Ee(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Mi===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,d&&(g+=_a(e,t)),Ee(e,t+1,c,!0,d)&&(e.dump&&Mi===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,a+=g));e.tag=s,e.dump=a||"{}"}p(fd,"writeBlockMapping");function oo(e,t,r){var i,a,s,o,l,n;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(l=a[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(n=e.styleMap[l.tag]||l.defaultStyle,Gc.call(l.represent)==="[object Function]")i=l.represent(t,n);else if(Xc.call(l.represent,n))i=l.represent[n](t,n);else throw new ae("!<"+l.tag+'> tag resolver accepts not "'+n+'" style');e.dump=i}return!0}return!1}p(oo,"detectType");function Ee(e,t,r,i,a,s,o){e.tag=null,e.dump=r,oo(e,r,!1)||oo(e,r,!0);var l=Gc.call(e.dump),n=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=l==="[object Object]"||l==="[object Array]",d,g;if(c&&(d=e.duplicates.indexOf(r),g=d!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(a=!1),g&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&g&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),l==="[object Object]")i&&Object.keys(e.dump).length!==0?(fd(e,t,e.dump,a),g&&(e.dump="&ref_"+d+e.dump)):(pd(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(l==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?so(e,t-1,e.dump,a):so(e,t,e.dump,a),g&&(e.dump="&ref_"+d+e.dump)):(gd(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&cd(e,e.dump,t,s,n);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ae("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}p(Ee,"writeNode");function md(e,t){var r=[],i=[],a,s;for(Aa(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}p(md,"getDuplicateReferences");function Aa(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Aa(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Aa(e[i[a]],t,r)}p(Aa,"inspectNode");function uC(e,t){t=t||{};var r=new rd(t);r.noRefs||md(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ee(r,0,i,!0,!0)?r.dump+`
156
+ `:""}p(uC,"dump$1");function gC(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(gC,"renamed");var pC=lc,fC=jy.load;/*! Bundled license information:
157
+
158
+ js-yaml/dist/js-yaml.mjs:
159
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
160
+ */var gi=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Gt={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},hn={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ki(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Bt(e),t=Bt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,l=s-i;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}p(ki,"calculateDeltaAndAngle");var Bt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),mC=p(e=>({x:p(function(t,r,i){let a=0;const s=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaX:y}=ki(i[0],i[1]);a=Gt[e.arrowTypeStart]*Math.cos(u)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaX:y}=ki(i[i.length-1],i[i.length-2]);a=Gt[e.arrowTypeEnd]*Math.cos(u)*(y>=0?1:-1)}const o=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[0]).x),h=Math.abs(Bt(t).y-Bt(i[0]).y),c=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],g=1;if(o<d&&o>0&&l<d){let u=d+g-o;u*=s==="right"?-1:1,a-=u}if(n<c&&n>0&&h<c){let u=c+g-n;u*=s==="right"?-1:1,a+=u}return Bt(t).x+a},"x"),y:p(function(t,r,i){let a=0;const s=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaY:y}=ki(i[0],i[1]);a=Gt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaY:y}=ki(i[i.length-1],i[i.length-2]);a=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(y>=0?1:-1)}const o=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[0]).y),h=Math.abs(Bt(t).x-Bt(i[0]).x),c=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],g=1;if(o<d&&o>0&&l<d){let u=d+g-o;u*=s==="up"?-1:1,a-=u}if(n<c&&n>0&&h<c){let u=c+g-n;u*=s==="up"?-1:1,a+=u}return Bt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Ji={},$t={},cn;function yC(){return cn||(cn=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.BLANK_URL=$t.relativeFirstCharacters=$t.whitespaceEscapeCharsRegex=$t.urlSchemeRegex=$t.ctrlCharactersRegex=$t.htmlCtrlEntityRegex=$t.htmlEntitiesRegex=$t.invalidProtocolRegex=void 0,$t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$t.htmlCtrlEntityRegex=/&(newline|tab);/gi,$t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$t.urlSchemeRegex=/^.+(:|&colon;)/gim,$t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$t.relativeFirstCharacters=[".","/"],$t.BLANK_URL="about:blank"),$t}var dn;function CC(){if(dn)return Ji;dn=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.sanitizeUrl=s;var e=yC();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var l=o.replace(e.ctrlCharactersRegex,"");return l.replace(e.htmlEntitiesRegex,function(n,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var l,n=a(o.trim());do n=r(n).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),n=a(n),l=n.match(e.ctrlCharactersRegex)||n.match(e.htmlEntitiesRegex)||n.match(e.htmlCtrlEntityRegex)||n.match(e.whitespaceEscapeCharsRegex);while(l&&l.length>0);var h=n;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),d=c.match(e.urlSchemeRegex);if(!d)return h;var g=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(g))return e.BLANK_URL;var u=c.replace(/\\/g,"/");if(g==="mailto:"||g.includes("://"))return u;if(g==="http:"||g==="https:"){if(!i(u))return e.BLANK_URL;var y=new URL(u);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return u}return Ji}var xC=CC();function vs(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function bC(){}function yd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Yo(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const kC="[object RegExp]",Cd="[object String]",xd="[object Number]",bd="[object Boolean]",kd="[object Arguments]",TC="[object Symbol]",SC="[object Date]",wC="[object Map]",BC="[object Set]",vC="[object Array]",LC="[object ArrayBuffer]",FC="[object Object]",_C="[object DataView]",AC="[object Uint8Array]",EC="[object Uint8ClampedArray]",MC="[object Uint16Array]",OC="[object Uint32Array]",$C="[object Int8Array]",IC="[object Int16Array]",DC="[object Int32Array]",PC="[object Float32Array]",RC="[object Float64Array]",un=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Uo(e){return typeof un.Buffer<"u"&&un.Buffer.isBuffer(e)}function qC(e){return Number.isSafeInteger(e)&&e>=0}function Td(e){return e!=null&&typeof e!="function"&&qC(e.length)}function NC(e){return e==="__proto__"}function jo(e){return e==null||typeof e!="object"&&typeof e!="function"}function Go(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function WC(e,t){return $r(e,void 0,e,new Map,t)}function $r(e,t,r,i=new Map,a=void 0){const s=a==null?void 0:a(e,t,r,i);if(s!==void 0)return s;if(jo(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let l=0;l<e.length;l++)o[l]=$r(e[l],l,r,i,a);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[l,n]of e)o.set(l,$r(n,l,r,i,a));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const l of e)o.add($r(l,void 0,r,i,a));return o}if(Uo(e))return e.subarray();if(Go(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let l=0;l<e.length;l++)o[l]=$r(e[l],l,r,i,a);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),pe(o,e,r,i,a),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),pe(o,e,r,i,a),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),pe(o,e,r,i,a),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,pe(o,e,r,i,a),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),pe(o,e,r,i,a),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),pe(o,e,r,i,a),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),pe(o,e,r,i,a),o}if(typeof e=="object"&&zC(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),pe(o,e,r,i,a),o}return e}function pe(e,t,r=e,i,a){const s=[...Object.keys(t),...yd(t)];for(let o=0;o<s.length;o++){const l=s[o],n=Object.getOwnPropertyDescriptor(e,l);(n==null||n.writable)&&(e[l]=$r(t[l],l,r,i,a))}}function zC(e){switch(Yo(e)){case kd:case vC:case LC:case _C:case bd:case SC:case PC:case RC:case $C:case IC:case DC:case wC:case xd:case FC:case kC:case BC:case Cd:case TC:case AC:case EC:case MC:case OC:return!0;default:return!1}}function HC(e,t){return WC(e,(r,i,a,s)=>{if(typeof e=="object"){if(Yo(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return s.set(e,o),pe(o,e,a,s),o}switch(Object.prototype.toString.call(e)){case xd:case Cd:case bd:{const o=new e.constructor(e==null?void 0:e.valueOf());return pe(o,e),o}case kd:{const o={};return pe(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function gn(e){return HC(e)}function lo(e){return e!==null&&typeof e=="object"&&Yo(e)==="[object Arguments]"}function no(e){return typeof e=="object"&&e!==null}function YC(e){return no(e)&&Td(e)}function Wi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);const o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(Wi.Cache||Map),r}Wi.Cache=Map;function pa(e){return Go(e)}function UC(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function jC(e){if(jo(e))return e;if(Array.isArray(e)||Go(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function GC(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let a=e;for(let s=0;s<r.length;s++){const o=r[s];a=fa(a,o,i,new Map)}return a}function fa(e,t,r,i){if(jo(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return jC(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)t[s]=t[s]??void 0}const a=[...Object.keys(t),...yd(t)];for(let s=0;s<a.length;s++){const o=a[s];if(NC(o))continue;let l=t[o],n=e[o];if(lo(l)&&(l={...l}),lo(n)&&(n={...n}),Uo(l)&&(l=gn(l)),Array.isArray(l))if(Array.isArray(n)){const c=[],d=Reflect.ownKeys(n);for(let g=0;g<d.length;g++){const u=d[g];c[u]=n[u]}n=c}else if(YC(n)){const c=[];for(let d=0;d<n.length;d++)c[d]=n[d];n=c}else n=[];const h=r(n,l,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(l)||no(n)&&no(l)&&(vs(n)||vs(l)||pa(n)||pa(l))?e[o]=fa(n,l,r,i):n==null&&vs(l)?e[o]=fa({},l,r,i):n==null&&pa(l)?e[o]=gn(l):(n===void 0||l!==void 0)&&(e[o]=l)}return e}function XC(e,...t){return GC(e,...t,bC)}function pn(e){if(e==null)return!0;if(Td(e))return typeof e.splice!="function"&&typeof e!="string"&&!Uo(e)&&!pa(e)&&!lo(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return UC(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var VC="​",ZC={curveBasis:Ps,curveBasisClosed:cf,curveBasisOpen:hf,curveBumpX:dh,curveBumpY:ch,curveBundle:nf,curveCardinalClosed:lf,curveCardinalOpen:of,curveCardinal:hh,curveCatmullRomClosed:sf,curveCatmullRomOpen:af,curveCatmullRom:nh,curveLinear:na,curveLinearClosed:rf,curveMonotoneX:lh,curveMonotoneY:oh,curveNatural:sh,curveStep:ah,curveStepAfter:ih,curveStepBefore:rh},KC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,QC=p(function(e,t){const r=Sd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(l=>l.args);ba(o),i=It(i,[...o])}else i=r.args;if(!i)return;let a=Ao(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Sd=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${KC.source})(?=[}][%]{2}).*
161
+ `,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const o=[];for(;(s=vi.exec(e))!==null;)if(s.index===vi.lastIndex&&vi.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const l=s[1]?s[1]:s[2],n=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:l,args:n})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return W.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),JC=p(function(e){return e.replace(vi,"")},"removeDirectives"),t0=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Xo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return ZC[r]??t}p(Xo,"interpolateToCurve");function wd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?xC.sanitizeUrl(r):r}p(wd,"formatUrl");var e0=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){W.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Vo(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Vo,"distance");function Bd(e){let t,r=0;e.forEach(a=>{r+=Vo(a,t),t=a});const i=r/2;return Zo(e,i)}p(Bd,"traverseEdge");function vd(e){return e.length===1?e[0]:Bd(e)}p(vd,"calcLabelPosition");var fn=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Zo=p((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Vo(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:fn((1-o)*r.x+o*a.x,5),y:fn((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),r0=p((e,t,r)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Zo(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(o)*s+(t[0].x+a.x)/2,l.y=-Math.cos(o)*s+(t[0].y+a.y)/2,l},"calcCardinalityPosition");function Ld(e,t,r){const i=structuredClone(r);W.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Zo(i,a),o=10+e*.5,l=Math.atan2(i[0].y-s.y,i[0].x-s.x),n={x:0,y:0};return t==="start_left"?(n.x=Math.sin(l+Math.PI)*o+(i[0].x+s.x)/2,n.y=-Math.cos(l+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(n.x=Math.sin(l-Math.PI)*o+(i[0].x+s.x)/2-5,n.y=-Math.cos(l-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(n.x=Math.sin(l)*o+(i[0].x+s.x)/2-5,n.y=-Math.cos(l)*o+(i[0].y+s.y)/2-5):(n.x=Math.sin(l)*o+(i[0].x+s.x)/2,n.y=-Math.cos(l)*o+(i[0].y+s.y)/2),n}p(Ld,"calcTerminalLabelPosition");function Fd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Fd,"getStylesFromArray");var mn=0,i0=p(()=>(mn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+mn),"generateId");function _d(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(_d,"makeRandomHex");var a0=p(e=>_d(e.length),"random"),s0=p(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"),o0=p(function(e,t){const r=t.text.replace(qi.lineBreakRegex," "),[,i]=ja(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),l0=Wi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),qi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,l)=>{const n=Ne(`${o} `,r),h=Ne(s,r);if(n>t){const{hyphenatedStrings:g,remainingWord:u}=n0(o,t,"-",r);a.push(s,...g),s=u}else h+n>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");l+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),n0=Wi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((l,n)=>{const h=`${o}${l}`;if(Ne(h,i)>=t){const d=n+1,g=a.length===d,u=`${h}${r}`;s.push(g?h:u),o=""}else o=h}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ad(e,t){return Ko(e,t).height}p(Ad,"calculateTextHeight");function Ne(e,t){return Ko(e,t).width}p(Ne,"calculateTextWidth");var Ko=Wi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=ja(r),o=["sans-serif",i],l=e.split(qi.lineBreakRegex),n=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const g of o){let u=0;const y={width:0,height:0,lineHeight:0};for(const f of l){const m=s0();m.text=f||VC;const C=o0(c,m).style("font-size",s).style("font-weight",a).style("font-family",g),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),u=Math.round(b.height),y.height+=u,y.lineHeight=Math.round(Math.max(y.lineHeight,u))}n.push(y)}c.remove();const d=isNaN(n[1].height)||isNaN(n[1].width)||isNaN(n[1].lineHeight)||n[0].height>n[1].height&&n[0].width>n[1].width&&n[0].lineHeight>n[1].lineHeight?0:1;return n[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Zr,h0=(Zr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Zr,"InitIDGenerator"),Zr),ta,c0=p(function(e){return ta=ta||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ta.innerHTML=e,unescape(ta.textContent)},"entityDecode");function Qo(e){return"str"in e}p(Qo,"isDetailedError");var d0=p((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),ja=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Jo(e,t){return XC({},e,t)}p(Jo,"cleanAndMerge");var ye={assignWithDepth:It,wrapLabel:l0,calculateTextHeight:Ad,calculateTextWidth:Ne,calculateTextDimensions:Ko,cleanAndMerge:Jo,detectInit:QC,detectDirective:Sd,isSubstringInArray:t0,interpolateToCurve:Xo,calcLabelPosition:vd,calcCardinalityPosition:r0,calcTerminalLabelPosition:Ld,formatUrl:wd,getStylesFromArray:Fd,generateId:i0,random:a0,runFunc:e0,entityDecode:c0,insertTitle:d0,isLabelCoordinateInPath:Ed,parseFontSize:ja,InitIDGenerator:h0},u0=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),yr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),TT=p((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function qt(e){return e??null}p(qt,"handleUndefinedAttr");function Ed(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(Ed,"isLabelCoordinateInPath");var tl=p(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Md(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const l=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[h=Sh.fontSize]=ja(l),c=h*n+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";s(a)}p(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}p(Md,"configureLabelImages");var g0=p(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ii=p(e=>{const t=p0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),p0=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Od=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Q=p(e=>{const{stylesArray:t}=ii(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const l=o[0];Od(l)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),l.includes("stroke")&&a.push(o.join(":")+" !important"),l==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),K=p((e,t)=>{var n;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=ii(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((n=o.get("stroke-width"))==null?void 0:n.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:f0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),f0=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const m0=Object.freeze({left:0,top:0,width:16,height:16}),Ea=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$d=Object.freeze({...m0,...Ea}),y0=Object.freeze({...$d,body:"",hidden:!1}),C0=Object.freeze({width:null,height:null}),x0=Object.freeze({...C0,...Ea}),b0=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const l=a.pop(),n=a.pop(),h={provider:a.length>0?a[0]:i,prefix:n,name:l};return Ls(h)?h:null}const s=a[0],o=s.split("-");if(o.length>1){const l={provider:i,prefix:o.shift(),name:o.join("-")};return Ls(l)?l:null}if(r&&i===""){const l={provider:i,prefix:"",name:s};return Ls(l,r)?l:null}return null},Ls=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function k0(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function yn(e,t){const r=k0(e,t);for(const i in y0)i in Ea?i in e&&!(i in r)&&(r[i]=Ea[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function T0(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const l=i[o]&&i[o].parent,n=l&&s(l);n&&(a[o]=[l].concat(n))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function Cn(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(l){s=yn(i[l]||a[l],s)}return o(t),r.forEach(o),yn(e,s)}function S0(e,t){if(e.icons[t])return Cn(e,t,[]);const r=T0(e,[t])[t];return r?Cn(e,t,r):null}const w0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,B0=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function xn(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(w0);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=B0.test(s);for(;;){if(o){const l=parseFloat(s);isNaN(l)?a.push(s):a.push(Math.ceil(l*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function v0(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function L0(e,t){return e?"<defs>"+e+"</defs>"+t:t}function F0(e,t,r){const i=v0(e);return L0(i.defs,t+i.content+r)}const _0=e=>e==="unset"||e==="undefined"||e==="none";function A0(e,t){const r={...$d,...e},i={...x0,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(f=>{const m=[],C=f.hFlip,b=f.vFlip;let k=f.rotate;C?b?k+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):b&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=a.height/2+a.top,m.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:S=a.width/2+a.left,m.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(a.left!==a.top&&(S=a.left,a.left=a.top,a.top=S),a.width!==a.height&&(S=a.width,a.width=a.height,a.height=S)),m.length&&(s=F0(s,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,l=i.height,n=a.width,h=a.height;let c,d;o===null?(d=l===null?"1em":l==="auto"?h:l,c=xn(d,n/h)):(c=o==="auto"?n:o,d=l===null?xn(c,h/n):l==="auto"?h:l);const g={},u=(f,m)=>{_0(m)||(g[f]=m.toString())};u("width",c),u("height",d);const y=[a.left,a.top,n,h];return g.viewBox=y.join(" "),{attributes:g,viewBox:y,body:s}}const E0=/\sid="(\S+)"/g,bn=new Map;function M0(e){e=e.replace(/[0-9]+$/,"")||"a";const t=bn.get(e)||0;return bn.set(e,t+1),t?`${e}${t}`:e}function O0(e){const t=[];let r;for(;r=E0.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=M0(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function $0(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function el(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var br=el();function Id(e){br=e}var Fi={exec:()=>null};function bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(te.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var I0=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},D0=/^(?:[ \t]*(?:\n|$))+/,P0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,R0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,q0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rl=/(?:[*+-]|\d{1,9}[.)])/,Dd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pd=bt(Dd).replace(/bull/g,rl).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(),N0=bt(Dd).replace(/bull/g,rl).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(),il=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,W0=/^[^\n]+/,al=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,z0=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",al).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),H0=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rl).getRegex(),Ga="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",sl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Y0=bt("^ {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[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",sl).replace("tag",Ga).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rd=bt(il).replace("hr",zi).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",Ga).getRegex(),U0=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rd).getRegex(),ol={blockquote:U0,code:P0,def:z0,fences:R0,heading:q0,hr:zi,html:Y0,lheading:Pd,list:H0,newline:D0,paragraph:Rd,table:Fi,text:W0},kn=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",Ga).getRegex(),j0={...ol,lheading:N0,table:kn,paragraph:bt(il).replace("hr",zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kn).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",Ga).getRegex()},G0={...ol,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sl).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:Fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(il).replace("hr",zi).replace("heading",` *#{1,6} *[^
162
+ ]`).replace("lheading",Pd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},X0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,V0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qd=/^( {2,}|\\)\n(?!\s*$)/,Z0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xa=/[\p{P}\p{S}]/u,ll=/[\s\p{P}\p{S}]/u,Nd=/[^\s\p{P}\p{S}]/u,K0=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ll).getRegex(),Wd=/(?!~)[\p{P}\p{S}]/u,Q0=/(?!~)[\s\p{P}\p{S}]/u,J0=/(?:[^\s\p{P}\p{S}]|~)/u,tx=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",I0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),zd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ex=bt(zd,"u").replace(/punct/g,Xa).getRegex(),rx=bt(zd,"u").replace(/punct/g,Wd).getRegex(),Hd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ix=bt(Hd,"gu").replace(/notPunctSpace/g,Nd).replace(/punctSpace/g,ll).replace(/punct/g,Xa).getRegex(),ax=bt(Hd,"gu").replace(/notPunctSpace/g,J0).replace(/punctSpace/g,Q0).replace(/punct/g,Wd).getRegex(),sx=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Nd).replace(/punctSpace/g,ll).replace(/punct/g,Xa).getRegex(),ox=bt(/\\(punct)/,"gu").replace(/punct/g,Xa).getRegex(),lx=bt(/^<(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(),nx=bt(sl).replace("(?:-->|$)","-->").getRegex(),hx=bt("^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",nx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ma=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,cx=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ma).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yd=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ma).replace("ref",al).getRegex(),Ud=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",al).getRegex(),dx=bt("reflink|nolink(?!\\()","g").replace("reflink",Yd).replace("nolink",Ud).getRegex(),Tn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,nl={_backpedal:Fi,anyPunctuation:ox,autolink:lx,blockSkip:tx,br:qd,code:V0,del:Fi,emStrongLDelim:ex,emStrongRDelimAst:ix,emStrongRDelimUnd:sx,escape:X0,link:cx,nolink:Ud,punctuation:K0,reflink:Yd,reflinkSearch:dx,tag:hx,text:Z0,url:Fi},ux={...nl,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ma).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ma).getRegex()},ho={...nl,emStrongRDelimAst:ax,emStrongLDelim:rx,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Tn).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:bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Tn).getRegex()},gx={...ho,br:bt(qd).replace("{2,}","*").getRegex(),text:bt(ho.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:ol,gfm:j0,pedantic:G0},pi={normal:nl,gfm:ho,breaks:gx,pedantic:ux},px={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sn=e=>px[e];function Le(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Sn)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Sn);return e}function wn(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Bn(e,t){var s;let r=e.replace(te.findPipe,(o,l,n)=>{let h=!1,c=l;for(;--c>=0&&n[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(te.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(te.slashPipe,"|");return i}function fi(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function fx(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function vn(e,t,r,i,a){let s=t.href,o=t.title||null,l=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let n={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,n}function mx(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
163
+ `).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[l]=o;return l.length>=a.length?s.slice(a.length):s}).join(`
164
+ `)}var Oa=class{constructor(t){wt(this,"options");wt(this,"rules");wt(this,"lexer");this.options=t||br}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:fi(i,`
165
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=mx(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=fi(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:fi(r[0],`
166
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=fi(r[0],`
167
+ `).split(`
168
+ `),a="",s="",o=[];for(;i.length>0;){let l=!1,n=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))n.push(i[h]),l=!0;else if(!l)n.push(i[h]);else break;i=i.slice(h);let c=n.join(`
169
+ `),d=c.replace(this.rules.other.blockquoteSetextReplace,`
170
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
171
+ ${c}`:c,s=s?`${s}
172
+ ${d}`:d;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=g,i.length===0)break;let u=o.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let y=u,f=y.raw+`
173
+ `+i.join(`
174
+ `),m=this.blockquote(f);o[o.length-1]=m,a=a.substring(0,a.length-y.raw.length)+m.raw,s=s.substring(0,s.length-y.text.length)+m.text;break}else if((u==null?void 0:u.type)==="list"){let y=u,f=y.raw+`
175
+ `+i.join(`
176
+ `),m=this.list(f);o[o.length-1]=m,a=a.substring(0,a.length-u.raw.length)+m.raw,s=s.substring(0,s.length-y.raw.length)+m.raw,i=f.substring(o.at(-1).raw.length).split(`
177
+ `);continue}}return{type:"blockquote",raw:a,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;t;){let h=!1,c="",d="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let g=r[2].split(`
178
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
179
+ `,1)[0],y=!g.trim(),f=0;if(this.options.pedantic?(f=2,d=g.trimStart()):y?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=g.slice(f),f+=r[1].length),y&&this.rules.other.blankLine.test(u)&&(c+=u+`
180
+ `,t=t.substring(u.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(f),k=this.rules.other.hrRegex(f),S=this.rules.other.fencesBeginRegex(f),B=this.rules.other.headingBeginRegex(f),v=this.rules.other.htmlBeginRegex(f);for(;t;){let M=t.split(`
181
+ `,1)[0],L;if(u=M,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),L=u):L=u.replace(this.rules.other.tabCharGlobal," "),S.test(u)||B.test(u)||v.test(u)||b.test(u)||k.test(u))break;if(L.search(this.rules.other.nonSpaceChar)>=f||!u.trim())d+=`
182
+ `+L.slice(f);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(g)||B.test(g)||k.test(g))break;d+=`
183
+ `+u}!y&&!u.trim()&&(y=!0),c+=M+`
184
+ `,t=t.substring(M.length+1),g=L.slice(f)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(C=m[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=c}let n=s.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let c=s.items[h].tokens.filter(g=>g.type==="space"),d=c.length>0&&c.some(g=>this.rules.other.anyLine.test(g.raw));s.loose=d}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:s}}}table(t){var l;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Bn(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(l=r[3])!=null&&l.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let n of a)this.rules.other.tableAlignRight.test(n)?o.align.push("right"):this.rules.other.tableAlignCenter.test(n)?o.align.push("center"):this.rules.other.tableAlignLeft.test(n)?o.align.push("left"):o.align.push(null);for(let n=0;n<i.length;n++)o.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:o.align[n]});for(let n of s)o.rows.push(Bn(n,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
186
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=fi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=fx(r[2],"()");if(o===-2)return;if(o>-1){let l=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),vn(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return vn(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,o,l,n=s,h=0,c=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+s);(a=c.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(l=[...o].length,a[3]||a[4]){n+=l;continue}else if((a[5]||a[6])&&s%3&&!((s+l)%3)){h+=l;continue}if(n-=l,n>0)continue;l=Math.min(l,l+n+h);let d=[...a[0]][0].length,g=t.slice(0,s+a.index+d+l);if(Math.min(s,l)%2){let y=g.slice(1,-1);return{type:"em",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}let u=g.slice(2,-2);return{type:"strong",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,s;if(r[2]==="@")a=r[0],s="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},fe=class co{constructor(t){wt(this,"tokens");wt(this,"options");wt(this,"state");wt(this,"tokenizer");wt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||br,this.options.tokenizer=this.options.tokenizer||new Oa,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 r={other:te,block:ea.normal,inline:pi.normal};this.options.pedantic?(r.block=ea.pedantic,r.inline=pi.pedantic):this.options.gfm&&(r.block=ea.gfm,this.options.breaks?r.inline=pi.breaks:r.inline=pi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ea,inline:pi}}static lex(t,r){return new co(r).lex(t)}static lexInline(t,r){return new co(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
187
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,s,o;for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let l;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let h=r.at(-1);l.raw.length===1&&h!==void 0?h.raw+=`
188
+ `:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
189
+ `)?"":`
190
+ `)+l.raw,h.text+=`
191
+ `+l.text,this.inlineQueue.at(-1).src=h.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
192
+ `)?"":`
193
+ `)+l.raw,h.text+=`
194
+ `+l.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},r.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let n=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(g=>{d=g.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(n=t.substring(0,h+1))}if(this.state.top&&(l=this.tokenizer.paragraph(n))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
195
+ `)?"":`
196
+ `)+l.raw,h.text+=`
197
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(l),i=n.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
198
+ `)?"":`
199
+ `)+l.raw,h.text+=`
200
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var n,h,c,d,g;let i=t,a=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(n=this.options.hooks)==null?void 0:n.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,l="";for(;t;){o||(l=""),o=!1;let u;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(f=>(u=f.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=r.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,l)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let y=t;if((g=this.options.extensions)!=null&&g.startInline){let f=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(f=Math.min(f,C))}),f<1/0&&f>=0&&(y=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(y)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(l=u.raw.slice(-1)),o=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},$a=class{constructor(t){wt(this,"options");wt(this,"parser");this.options=t||br}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(te.notSpaceStart))==null?void 0:o[0],s=t.replace(te.endingNewline,"")+`
201
+ `;return a?'<pre><code class="language-'+Le(a)+'">'+(i?s:Le(s,!0))+`</code></pre>
202
+ `:"<pre><code>"+(i?s:Le(s,!0))+`</code></pre>
203
+ `}blockquote({tokens:t}){return`<blockquote>
204
+ ${this.parser.parse(t)}</blockquote>
205
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
206
+ `}hr(t){return`<hr>
207
+ `}list(t){let r=t.ordered,i=t.start,a="";for(let l=0;l<t.items.length;l++){let n=t.items[l];a+=this.listitem(n)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
208
+ `+a+"</"+s+`>
209
+ `}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+Le(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
210
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
211
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let l=0;l<o.length;l++)i+=this.tablecell(o[l]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
212
+ <thead>
213
+ `+r+`</thead>
214
+ `+a+`</table>
215
+ `}tablerow({text:t}){return`<tr>
216
+ ${t}</tr>
217
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
218
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Le(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let a=this.parser.parseInline(i),s=wn(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+Le(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=wn(t);if(s===null)return Le(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Le(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Le(t.text)}},hl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},me=class uo{constructor(t){wt(this,"options");wt(this,"renderer");wt(this,"textRenderer");this.options=t||br,this.options.renderer=this.options.renderer||new $a,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hl}static parse(t,r){return new uo(r).parse(t)}static parseInline(t,r){return new uo(r).parseInline(t)}parse(t,r=!0){var a,s;let i="";for(let o=0;o<t.length;o++){let l=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[l.type]){let h=l,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let n=l;switch(n.type){case"space":{i+=this.renderer.space(n);continue}case"hr":{i+=this.renderer.hr(n);continue}case"heading":{i+=this.renderer.heading(n);continue}case"code":{i+=this.renderer.code(n);continue}case"table":{i+=this.renderer.table(n);continue}case"blockquote":{i+=this.renderer.blockquote(n);continue}case"list":{i+=this.renderer.list(n);continue}case"html":{i+=this.renderer.html(n);continue}case"def":{i+=this.renderer.def(n);continue}case"paragraph":{i+=this.renderer.paragraph(n);continue}case"text":{let h=n,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
219
+ `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var a,s;let i="";for(let o=0;o<t.length;o++){let l=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[l.type]){let h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){i+=h||"";continue}}let n=l;switch(n.type){case"escape":{i+=r.text(n);break}case"html":{i+=r.html(n);break}case"link":{i+=r.link(n);break}case"image":{i+=r.image(n);break}case"strong":{i+=r.strong(n);break}case"em":{i+=r.em(n);break}case"codespan":{i+=r.codespan(n);break}case"br":{i+=r.br(n);break}case"del":{i+=r.del(n);break}case"text":{i+=r.text(n);break}default:{let h='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},la,Ti=(la=class{constructor(t){wt(this,"options");wt(this,"block");this.options=t||br}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?fe.lex:fe.lexInline}provideParser(){return this.block?me.parse:me.parseInline}},wt(la,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),wt(la,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),la),yx=class{constructor(...t){wt(this,"defaults",el());wt(this,"options",this.setOptions);wt(this,"parse",this.parseMarkdown(!0));wt(this,"parseInline",this.parseMarkdown(!1));wt(this,"Parser",me);wt(this,"Renderer",$a);wt(this,"TextRenderer",hl);wt(this,"Lexer",fe);wt(this,"Tokenizer",Oa);wt(this,"Hooks",Ti);this.use(...t)}walkTokens(t,r){var a,s;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let l=o;for(let n of l.header)i=i.concat(this.walkTokens(n.tokens,r));for(let n of l.rows)for(let h of n)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let l=o;i=i.concat(this.walkTokens(l.items,r));break}default:{let l=o;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[l.type]?this.defaults.extensions.childTokens[l.type].forEach(n=>{let h=l[n].flat(1/0);i=i.concat(this.walkTokens(h,r))}):l.tokens&&(i=i.concat(this.walkTokens(l.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...l){let n=s.renderer.apply(this,l);return n===!1&&(n=o.apply(this,l)),n}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new $a(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,n=i.renderer[l],h=s[l];s[l]=(...c)=>{let d=n.apply(s,c);return d===!1&&(d=h.apply(s,c)),d||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Oa(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,n=i.tokenizer[l],h=s[l];s[l]=(...c)=>{let d=n.apply(s,c);return d===!1&&(d=h.apply(s,c)),d}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Ti;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let l=o,n=i.hooks[l],h=s[l];Ti.passThroughHooks.has(o)?s[l]=c=>{if(this.defaults.async&&Ti.passThroughHooksRespectAsync.has(o))return(async()=>{let g=await n.call(s,c);return h.call(s,g)})();let d=n.call(s,c);return h.call(s,d)}:s[l]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await n.apply(s,c);return g===!1&&(g=await h.apply(s,c)),g})();let d=n.apply(s,c);return d===!1&&(d=h.apply(s,c)),d}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(l){let n=[];return n.push(o.call(this,l)),s&&(n=n.concat(s.call(this,l))),n}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return fe.lex(t,r??this.defaults)}parser(t,r){return me.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new 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 r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let l=s.hooks?await s.hooks.preprocess(r):r,n=await(s.hooks?await s.hooks.provideLexer():t?fe.lex:fe.lexInline)(l,s),h=s.hooks?await s.hooks.processAllTokens(n):n;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser():t?me.parse:me.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let l=(s.hooks?s.hooks.provideLexer():t?fe.lex:fe.lexInline)(r,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let n=(s.hooks?s.hooks.provideParser():t?me.parse:me.parseInline)(l,s);return s.hooks&&(n=s.hooks.postprocess(n)),n}catch(l){return o(l)}}}onError(t,r){return i=>{if(i.message+=`
220
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Le(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},Cr=new yx;function Tt(e,t){return Cr.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Cr.setOptions(e),Tt.defaults=Cr.defaults,Id(Tt.defaults),Tt};Tt.getDefaults=el;Tt.defaults=br;Tt.use=function(...e){return Cr.use(...e),Tt.defaults=Cr.defaults,Id(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Cr.walkTokens(e,t)};Tt.parseInline=Cr.parseInline;Tt.Parser=me;Tt.parser=me.parse;Tt.Renderer=$a;Tt.TextRenderer=hl;Tt.Lexer=fe;Tt.lexer=fe.lex;Tt.Tokenizer=Oa;Tt.Hooks=Ti;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;me.parse;fe.lex;function jd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(l,n){var h=n.match(/\n([\t ]+|(?!\s).)/g);return h?l.concat(h.map(function(c){var d,g;return(g=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&g!==void 0?g:0})):l},[]);if(a.length){var s=new RegExp(`
221
+ [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(l){return l.replace(s,`
222
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(l,n){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",d=l;typeof l=="string"&&l.includes(`
223
+ `)&&(d=String(l).split(`
224
+ `).map(function(g,u){return u===0?g:""+c+g}).join(`
225
+ `)),o+=d+i[n+1]}),o}var Cx={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},go=new Map,Gd=new Map,xx=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(W.debug("Registering icon pack:",t.name),"loader"in t)Gd.set(t.name,t.loader);else if("icons"in t)go.set(t.name,t.icons);else throw W.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Xd=p(async(e,t)=>{const r=b0(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=go.get(i);if(!a){const o=Gd.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},go.set(i,a)}catch(l){throw W.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=S0(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),bx=p(async e=>{try{return await Xd(e),!0}catch{return!1}},"isIconAvailable"),Hi=p(async(e,t,r)=>{let i;try{i=await Xd(e,t==null?void 0:t.fallbackPrefix)}catch(o){W.error(o),i=Cx}const a=A0(i,t),s=$0(O0(a.body),{...a.attributes,...r});return be(s,vt())},"getIconSVG");function Vd(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
226
+ `).replace(/\n{2,}/g,`
227
+ `);return jd(i)}p(Vd,"preprocessMarkdown");function Zd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(Zd,"nonMarkdownToLines");function Kd(e,t={}){const r=Vd(e,t),i=Tt.lexer(r),a=[[]];let s=0;function o(l,n="normal"){l.type==="text"?l.text.split(`
228
+ `).forEach((c,d)=>{d!==0&&(s++,a.push([])),c.split(" ").forEach(g=>{g=g.replace(/&#39;/g,"'"),g&&a[s].push({content:g,type:n})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&a[s].push({content:l.text,type:"normal"})}return p(o,"processNode"),i.forEach(l=>{var n;l.type==="paragraph"?(n=l.tokens)==null||n.forEach(h=>{o(h)}):l.type==="html"?a[s].push({content:l.text,type:"normal"}):a[s].push({content:l.raw,type:"normal"})}),a}p(Kd,"markdownToLines");function Qd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Qd,"nonMarkdownToHTML");function Jd(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(a){var s,o,l;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(l=a.tokens)==null?void 0:l.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(W.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(Jd,"markdownToHTML");function tu(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(tu,"splitTextToChars");function eu(e,t){const r=tu(t.content);return cl(e,[],r,t.type)}p(eu,"splitWordToFitWidth");function cl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?cl(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(cl,"splitWordToFitWidthRecursion");function ru(e,t){if(e.some(({content:r})=>r.includes(`
229
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ia(e,t)}p(ru,"splitLineToFitWidth");function Ia(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Ia(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[l,n]=eu(t,s);r.push([l]),n.content&&e.unshift(n)}return Ia(e,t,r)}p(Ia,"splitLineToFitWidthRecursion");function po(e,t){t&&e.attr("style",t)}p(po,"applyStyle");var Ln=16384;async function iu(e,t,r,i,a=!1,s=vt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Ln)}px`),o.attr("height",`${Math.min(10*r,Ln)}px`);const l=o.append("xhtml:div"),n=Ai(t.label)?await Oh(t.label.replace(qi.lineBreakRegex,`
230
+ `),s):be(t.label,s),h=t.isNode?"nodeLabel":"edgeLabel",c=l.append("span");c.html(n),po(c,t.labelStyle),c.attr("class",`${h} ${i}`),po(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),o.node()}p(iu,"addHtmlSpan");function Va(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}p(Va,"createTspan");function au(e,t,r){const i=e.append("text"),a=Va(i,1,t);Za(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}p(au,"computeWidthOfText");function kx(e,t,r){var o;const i=e.append("text"),a=Va(i,1,t);Za(a,[{content:r,type:"normal"}]);const s=(o=a.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}p(kx,"computeDimensionOfText");function su(e,t,r,i=!1,a=!1){const o=t.append("g"),l=o.insert("rect").attr("class","background").attr("style","stroke: none"),n=o.append("text").attr("y","-10.1");a&&n.attr("text-anchor","middle");let h=0;for(const c of r){const d=p(u=>au(o,1.1,u)<=e,"checkWidth"),g=d(c)?[c]:ru(c,d);for(const u of g){const y=Va(n,h,1.1,a);Za(y,u),h++}}if(i){const c=n.node().getBBox(),d=2;return l.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),o.node()}else return n.node()}p(su,"createFormattedText");function fo(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(fo,"decodeHTMLEntities");function Za(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(fo(r.content)):a.text(" "+fo(r.content))})}p(Za,"updateTextContentAndStyles");async function ou(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const l=`${s}:${o}`;return await bx(l)?await Hi(l,void 0,{class:"label-icon"}):`<i class='${be(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(ou,"replaceIconSubstring");var ze=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:l=!0,width:n=200,addSvgBackground:h=!1}={},c)=>{if(W.debug("XYZ createText",t,r,i,a,s,l,"addSvgBackground: ",h),s){const d=o?Jd(t,c):Qd(t),g=await ou(yr(d),c),u=t.replace(/\\\\/g,"\\"),y={isNode:l,label:Ai(t)?u:g,labelStyle:r.replace("fill:","color:")};return await iu(e,y,n,a,h,c)}else{const d=yr(t.replace(/<br\s*\/?>/g,"<br/>")),g=o?Kd(d.replace("<br>","<br/>"),c):Zd(d),u=su(n,e,g,t?h:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(u).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(u).select("rect").attr("style",y.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(u).select("text").attr("style",f)}return i?ht(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Fs(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),l=Math.sin(s);for(const n of e){const[h,c]=n;n[0]=(h-i)*o-(c-a)*l+i,n[1]=(h-i)*l+(c-a)*o+a}}}function Tx(e,t){return e[0]===t[0]&&e[1]===t[1]}function Sx(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(a)for(const h of o)Fs(h,l,a);const n=(function(h,c,d){const g=[];for(const b of h){const k=[...b];Tx(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&g.push(k)}const u=[];c=Math.max(c,.1);const y=[];for(const b of g)for(let k=0;k<b.length-1;k++){const S=b[k],B=b[k+1];if(S[1]!==B[1]){const v=Math.min(S[1],B[1]);y.push({ymin:v,ymax:Math.max(S[1],B[1]),x:v===S[1]?S[0]:B[0],islope:(B[0]-S[0])/(B[1]-S[1])})}}if(y.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!y.length)return u;let f=[],m=y[0].ymin,C=0;for(;f.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach((k=>{f.push({s:m,edge:k})}))}if(f=f.filter((b=>!(b.edge.ymax<=m))),f.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%c==0)&&f.length>1)for(let b=0;b<f.length;b+=2){const k=b+1;if(k>=f.length)break;const S=f[b].edge,B=f[k].edge;u.push([[Math.round(S.x),m],[Math.round(B.x),m]])}m+=d,f.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(o,s,i);if(a){for(const h of o)Fs(h,l,-a);(function(h,c,d){const g=[];h.forEach((u=>g.push(...u))),Fs(g,c,d)})(n,l,-a)}return n}function Yi(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),Sx(e,a,i,s||1)}class dl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Yi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Ka(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class wx extends dl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Yi(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],l=.5*i*Math.cos(s),n=.5*i*Math.sin(s);for(const[h,c]of a)Ka([h,c])&&o.push([[h[0]-l,h[1]+n],[...c]],[[h[0]+l,h[1]-n],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Bx extends dl{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class vx{constructor(t){this.helper=t}fillPolygons(t,r){const i=Yi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const l of t){const n=Ka(l),h=n/a,c=Math.ceil(h)-1,d=n-c*a,g=(l[0][0]+l[1][0])/2-a/4,u=Math.min(l[0][1],l[1][1]);for(let y=0;y<c;y++){const f=u+d+y*a,m=g-o+2*Math.random()*o,C=f-o+2*Math.random()*o,b=this.helper.ellipse(m,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Lx{constructor(t){this.helper=t}fillPolygons(t,r){const i=Yi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const l=Ka(o),n=Math.floor(l/(i+a)),h=(l+a-n*(i+a))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const g=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<n;u++){const y=u*(i+a),f=y+i,m=[c[0]+y*Math.cos(g)+h*Math.cos(g),c[1]+y*Math.sin(g)+h*Math.sin(g)],C=[c[0]+f*Math.cos(g)+h*Math.cos(g),c[1]+f*Math.sin(g)+h*Math.sin(g)];s.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}})),s}}class Fx{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Yi(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=Ka(s),l=Math.round(o/(2*r));let n=s[0],h=s[1];n[0]>h[0]&&(n=s[1],h=s[0]);const c=Math.atan((h[1]-n[1])/(h[0]-n[0]));for(let d=0;d<l;d++){const g=2*d*r,u=2*(d+1)*r,y=Math.sqrt(2*Math.pow(r,2)),f=[n[0]+g*Math.cos(c),n[1]+g*Math.sin(c)],m=[n[0]+u*Math.cos(c),n[1]+u*Math.sin(c)],C=[f[0]+y*Math.cos(c+Math.PI/4),f[1]+y*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}})),a}}const re={};class _x{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Ax=0,_s=1,Fn=2,ra={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 As(e,t){return e.type===t}function ul(e){const t=[],r=(function(o){const l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:Ax,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:_s,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:Fn,text:""},l})(e);let i="BOD",a=0,s=r[a];for(;!As(s,Fn);){let o=0;const l=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return ul("M0,0"+e);a++,o=ra[s.text],i=s.text}else As(s,_s)?o=ra[i]:(a++,o=ra[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let n=a;n<a+o;n++){const h=r[n];if(!As(h,_s))throw new Error("Param not a number: "+i+","+h.text);l[l.length]=+h.text}if(typeof ra[i]!="number")throw new Error("Bad segment: "+i);{const n={key:i,data:l};t.push(n),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function lu(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:l}of e)switch(o){case"M":s.push({key:"M",data:[...l]}),[t,r]=l,[i,a]=l;break;case"m":t+=l[0],r+=l[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...l]}),[t,r]=l;break;case"l":t+=l[0],r+=l[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...l]}),t=l[4],r=l[5];break;case"c":{const n=l.map(((h,c)=>c%2?h+r:h+t));s.push({key:"C",data:n}),t=n[4],r=n[5];break}case"Q":s.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{const n=l.map(((h,c)=>c%2?h+r:h+t));s.push({key:"Q",data:n}),t=n[2],r=n[3];break}case"A":s.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],s.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":s.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{const n=l.map(((h,c)=>c%2?h+r:h+t));s.push({key:"S",data:n}),t=n[2],r=n[3];break}case"T":s.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function nu(e){const t=[];let r="",i=0,a=0,s=0,o=0,l=0,n=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,a]=c,[s,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],l=c[2],n=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,a]});break;case"V":a=c[0],t.push({key:"L",data:[i,a]});break;case"S":{let d=0,g=0;r==="C"||r==="S"?(d=i+(i-l),g=a+(a-n)):(d=i,g=a),t.push({key:"C",data:[d,g,...c]}),l=c[0],n=c[1],i=c[2],a=c[3];break}case"T":{const[d,g]=c;let u=0,y=0;r==="Q"||r==="T"?(u=i+(i-l),y=a+(a-n)):(u=i,y=a);const f=i+2*(u-i)/3,m=a+2*(y-a)/3,C=d+2*(u-d)/3,b=g+2*(y-g)/3;t.push({key:"C",data:[f,m,C,b,d,g]}),l=u,n=y,i=d,a=g;break}case"Q":{const[d,g,u,y]=c,f=i+2*(d-i)/3,m=a+2*(g-a)/3,C=u+2*(d-u)/3,b=y+2*(g-y)/3;t.push({key:"C",data:[f,m,C,b,u,y]}),l=d,n=g,i=u,a=y;break}case"A":{const d=Math.abs(c[0]),g=Math.abs(c[1]),u=c[2],y=c[3],f=c[4],m=c[5],C=c[6];d===0||g===0?(t.push({key:"C",data:[i,a,m,C,m,C]}),i=m,a=C):(i!==m||a!==C)&&(hu(i,a,m,C,d,g,u,y,f).forEach((function(b){t.push({key:"C",data:b})})),i=m,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=h}return t}function mi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function hu(e,t,r,i,a,s,o,l,n,h){const c=(d=o,Math.PI*d/180);var d;let g=[],u=0,y=0,f=0,m=0;if(h)[u,y,f,m]=h;else{[e,t]=mi(e,t,-c),[r,i]=mi(r,i,-c);const H=(e-r)/2,P=(t-i)/2;let E=H*H/(a*a)+P*P/(s*s);E>1&&(E=Math.sqrt(E),a*=E,s*=E);const F=a*a,$=s*s,A=F*$-F*P*P-$*H*H,w=F*P*P+$*H*H,N=(l===n?-1:1)*Math.sqrt(Math.abs(A/w));f=N*a*P/s+(e+r)/2,m=N*-s*H/a+(t+i)/2,u=Math.asin(parseFloat(((t-m)/s).toFixed(9))),y=Math.asin(parseFloat(((i-m)/s).toFixed(9))),e<f&&(u=Math.PI-u),r<f&&(y=Math.PI-y),u<0&&(u=2*Math.PI+u),y<0&&(y=2*Math.PI+y),n&&u>y&&(u-=2*Math.PI),!n&&y>u&&(y-=2*Math.PI)}let C=y-u;if(Math.abs(C)>120*Math.PI/180){const H=y,P=r,E=i;y=n&&y>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,g=hu(r=f+a*Math.cos(y),i=m+s*Math.sin(y),P,E,a,s,o,0,n,[y,H,f,m])}C=y-u;const b=Math.cos(u),k=Math.sin(u),S=Math.cos(y),B=Math.sin(y),v=Math.tan(C/4),M=4/3*a*v,L=4/3*s*v,z=[e,t],D=[e+M*k,t-L*b],I=[r+M*B,i-L*S],Y=[r,i];if(D[0]=2*z[0]-D[0],D[1]=2*z[1]-D[1],h)return[D,I,Y].concat(g);{g=[D,I,Y].concat(g);const H=[];for(let P=0;P<g.length;P+=3){const E=mi(g[P][0],g[P][1],c),F=mi(g[P+1][0],g[P+1][1],c),$=mi(g[P+2][0],g[P+2][1],c);H.push([E[0],E[1],F[0],F[1],$[0],$[1]])}return H}}const Ex={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return Da(e,t,r)},ellipse:function(e,t,r,i,a){const s=du(r,i,a);return mo(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return er(e,t,r,i,a,!0)}};function cu(e,t,r,i,a){return{type:"path",ops:er(e,t,r,i,a)}}function ma(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...er(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...er(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?cu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Mx(e,t,r,i,a){return(function(s,o){return ma(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function _n(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ia(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:ia(r[0],1.5*(1+.22*t.roughness),Mn(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const l=ia(o,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:ia(o,1.5*(1+.22*t.roughness),Mn(t));for(const h of l)h.op!=="move"&&i.push(h);for(const h of n)h.op!=="move"&&a.push(h)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function du(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),l=Math.abs(t/2);const n=1-r.curveFitting;return o+=st(o*n,r),l+=st(l*n,r),{increment:s,rx:o,ry:l}}function mo(e,t,r,i){const[a,s]=On(i.increment,e,t,i.rx,i.ry,1,i.increment*Da(.1,Da(.4,1,r),r),r);let o=Pa(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[l]=On(i.increment,e,t,i.rx,i.ry,1.5,0,r),n=Pa(l,null,r);o=o.concat(n)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function An(e,t,r,i,a,s,o,l,n){const h=e,c=t;let d=Math.abs(r/2),g=Math.abs(i/2);d+=st(.01*d,n),g+=st(.01*g,n);let u=a,y=s;for(;u<0;)u+=2*Math.PI,y+=2*Math.PI;y-u>2*Math.PI&&(u=0,y=2*Math.PI);const f=2*Math.PI/n.curveStepCount,m=Math.min(f/2,(y-u)/2),C=$n(m,h,c,d,g,u,y,1,n);if(!n.disableMultiStroke){const b=$n(m,h,c,d,g,u,y,1.5,n);C.push(...b)}return o&&(l?C.push(...er(h,c,h+d*Math.cos(u),c+g*Math.sin(u),n),...er(h,c,h+d*Math.cos(y),c+g*Math.sin(y),n)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+g*Math.sin(u)]})),{type:"path",ops:C}}function En(e,t){const r=nu(lu(ul(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:l}of r)switch(o){case"M":s=[l[0],l[1]],a=[l[0],l[1]];break;case"L":i.push(...er(s[0],s[1],l[0],l[1],t)),s=[l[0],l[1]];break;case"C":{const[n,h,c,d,g,u]=l;i.push(...Ox(n,h,c,d,g,u,s,t)),s=[g,u];break}case"Z":i.push(...er(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Es(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+st(a,t),i[0][1]+st(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+st(a,t),i[o][1]+st(a,t)]})}}return{type:"fillPath",ops:r}}function Lr(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!re[a])switch(a){case"zigzag":re[a]||(re[a]=new wx(i));break;case"cross-hatch":re[a]||(re[a]=new Bx(i));break;case"dots":re[a]||(re[a]=new vx(i));break;case"dashed":re[a]||(re[a]=new Lx(i));break;case"zigzag-line":re[a]||(re[a]=new Fx(i));break;default:a="hachure",re[a]||(re[a]=new dl(i))}return re[a]})(t,Ex).fillPolygons(e,t)}function Mn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function uu(e){return e.randomizer||(e.randomizer=new _x(e.seed||0)),e.randomizer.next()}function Da(e,t,r,i=1){return r.roughness*i*(uu(r)*(t-e)+e)}function st(e,t,r=1){return Da(-e,e,t,r)}function er(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,l=yo(e,t,r,i,a,!0,!1);if(o)return l;const n=yo(e,t,r,i,a,!0,!0);return l.concat(n)}function yo(e,t,r,i,a,s,o){const l=Math.pow(e-r,2)+Math.pow(t-i,2),n=Math.sqrt(l);let h=1;h=n<200?1:n>500?.4:-.0016668*n+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>l&&(c=n/10);const d=c/2,g=.2+.2*uu(a);let u=a.bowing*a.maxRandomnessOffset*(i-t)/200,y=a.bowing*a.maxRandomnessOffset*(e-r)/200;u=st(u,a,h),y=st(y,a,h);const f=[],m=()=>st(d,a,h),C=()=>st(c,a,h),b=a.preserveVertices;return o?f.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):f.push({op:"move",data:[e+(b?0:st(c,a,h)),t+(b?0:st(c,a,h))]}),o?f.push({op:"bcurveTo",data:[u+e+(r-e)*g+m(),y+t+(i-t)*g+m(),u+e+2*(r-e)*g+m(),y+t+2*(i-t)*g+m(),r+(b?0:m()),i+(b?0:m())]}):f.push({op:"bcurveTo",data:[u+e+(r-e)*g+C(),y+t+(i-t)*g+C(),u+e+2*(r-e)*g+C(),y+t+2*(i-t)*g+C(),r+(b?0:C()),i+(b?0:C())]}),f}function ia(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]),i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+st(t,r),e[a][1]+st(t,r)]),a===e.length-1&&i.push([e[a][0]+st(t,r),e[a][1]+st(t,r)]);return Pa(i,null,r)}function Pa(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+2<i;l++){const n=e[l];s[0]=[n[0],n[1]],s[1]=[n[0]+(o*e[l+1][0]-o*e[l-1][0])/6,n[1]+(o*e[l+1][1]-o*e[l-1][1])/6],s[2]=[e[l+1][0]+(o*e[l][0]-o*e[l+2][0])/6,e[l+1][1]+(o*e[l][1]-o*e[l+2][1])/6],s[3]=[e[l+1][0],e[l+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...yo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function On(e,t,r,i,a,s,o,l){const n=[],h=[];if(l.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+i*Math.cos(c),r+a*Math.sin(c)];n.push(d),h.push(d)}h.push([t+i*Math.cos(0),r+a*Math.sin(0)]),h.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const c=st(.5,l)-Math.PI/2;h.push([st(s,l)+t+.9*i*Math.cos(c-e),st(s,l)+r+.9*a*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let g=c;g<d;g+=e){const u=[st(s,l)+t+i*Math.cos(g),st(s,l)+r+a*Math.sin(g)];n.push(u),h.push(u)}h.push([st(s,l)+t+i*Math.cos(c+2*Math.PI+.5*o),st(s,l)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([st(s,l)+t+.98*i*Math.cos(c+o),st(s,l)+r+.98*a*Math.sin(c+o)]),h.push([st(s,l)+t+.9*i*Math.cos(c+.5*o),st(s,l)+r+.9*a*Math.sin(c+.5*o)])}return[h,n]}function $n(e,t,r,i,a,s,o,l,n){const h=s+st(.1,n),c=[];c.push([st(l,n)+t+.9*i*Math.cos(h-e),st(l,n)+r+.9*a*Math.sin(h-e)]);for(let d=h;d<=o;d+=e)c.push([st(l,n)+t+i*Math.cos(d),st(l,n)+r+a*Math.sin(d)]);return c.push([t+i*Math.cos(o),r+a*Math.sin(o)]),c.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Pa(c,null,n)}function Ox(e,t,r,i,a,s,o,l){const n=[],h=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let c=[0,0];const d=l.disableMultiStroke?1:2,g=l.preserveVertices;for(let u=0;u<d;u++)u===0?n.push({op:"move",data:[o[0],o[1]]}):n.push({op:"move",data:[o[0]+(g?0:st(h[0],l)),o[1]+(g?0:st(h[0],l))]}),c=g?[a,s]:[a+st(h[u],l),s+st(h[u],l)],n.push({op:"bcurveTo",data:[e+st(h[u],l),t+st(h[u],l),r+st(h[u],l),i+st(h[u],l),c[0],c[1]]});return n}function yi(e){return[...e]}function In(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(yi(e[0]),yi(e[1]),yi(e[2]),yi(e[2]));else{const a=[];a.push(e[0],e[0]);for(let l=1;l<e.length;l++)a.push(e[l]),l===e.length-1&&a.push(e[l]);const s=[],o=1-t;i.push(yi(a[0]));for(let l=1;l+2<a.length;l++){const n=a[l];s[0]=[n[0],n[1]],s[1]=[n[0]+(o*a[l+1][0]-o*a[l-1][0])/6,n[1]+(o*a[l+1][1]-o*a[l-1][1])/6],s[2]=[a[l+1][0]+(o*a[l][0]-o*a[l+2][0])/6,a[l+1][1]+(o*a[l][1]-o*a[l+2][1])/6],s[3]=[a[l+1][0],a[l+1][1]],i.push(s[1],s[2],s[3])}}return i}function ya(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function $x(e,t,r){const i=ya(t,r);if(i===0)return ya(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),ya(e,hr(t,r,a))}function hr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Co(e,t,r,i){const a=i||[];if((function(l,n){const h=l[n+0],c=l[n+1],d=l[n+2],g=l[n+3];let u=3*c[0]-2*h[0]-g[0];u*=u;let y=3*c[1]-2*h[1]-g[1];y*=y;let f=3*d[0]-2*g[0]-h[0];f*=f;let m=3*d[1]-2*g[1]-h[1];return m*=m,u<f&&(u=f),y<m&&(y=m),u+y})(e,t)<r){const l=e[t+0];a.length?(s=a[a.length-1],o=l,Math.sqrt(ya(s,o))>1&&a.push(l)):a.push(l),a.push(e[t+3])}else{const n=e[t+0],h=e[t+1],c=e[t+2],d=e[t+3],g=hr(n,h,.5),u=hr(h,c,.5),y=hr(c,d,.5),f=hr(g,u,.5),m=hr(u,y,.5),C=hr(f,m,.5);Co([n,g,f,C],0,r,a),Co([C,m,y,d],0,r,a)}var s,o;return a}function Ix(e,t){return Ra(e,0,e.length,t)}function Ra(e,t,r,i,a){const s=a||[],o=e[t],l=e[r-1];let n=0,h=1;for(let c=t+1;c<r-1;++c){const d=$x(e[c],o,l);d>n&&(n=d,h=c)}return Math.sqrt(n)>i?(Ra(e,t,h+1,i,s),Ra(e,h,r,i,s)):(s.length||s.push(o),s.push(l)),s}function Ms(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Co(e,3*s,t,i);return r&&r>0?Ra(i,0,i.length,r):i}const oe="none";class qa{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.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:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[cu(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),l=[],n=Mx(t,r,i,a,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?l.push(Es([h],o)):l.push(Lr([h],o))}return o.stroke!==oe&&l.push(n),this._d("rectangle",l,o)}ellipse(t,r,i,a,s){const o=this._o(s),l=[],n=du(i,a,o),h=mo(t,r,o,n);if(o.fill)if(o.fillStyle==="solid"){const c=mo(t,r,o,n).opset;c.type="fillPath",l.push(c)}else l.push(Lr([h.estimatedPoints],o));return o.stroke!==oe&&l.push(h.opset),this._d("ellipse",l,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ma(t,!1,i)],i)}arc(t,r,i,a,s,o,l=!1,n){const h=this._o(n),c=[],d=An(t,r,i,a,s,o,l,!0,h);if(l&&h.fill)if(h.fillStyle==="solid"){const g=Object.assign({},h);g.disableMultiStroke=!0;const u=An(t,r,i,a,s,o,!0,!1,g);u.type="fillPath",c.push(u)}else c.push((function(g,u,y,f,m,C,b){const k=g,S=u;let B=Math.abs(y/2),v=Math.abs(f/2);B+=st(.01*B,b),v+=st(.01*v,b);let M=m,L=C;for(;M<0;)M+=2*Math.PI,L+=2*Math.PI;L-M>2*Math.PI&&(M=0,L=2*Math.PI);const z=(L-M)/b.curveStepCount,D=[];for(let I=M;I<=L;I+=z)D.push([k+B*Math.cos(I),S+v*Math.sin(I)]);return D.push([k+B*Math.cos(L),S+v*Math.sin(L)]),D.push([k,S]),Lr([D],b)})(t,r,i,a,s,o,h));return h.stroke!==oe&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],s=_n(t,i);if(i.fill&&i.fill!==oe)if(i.fillStyle==="solid"){const o=_n(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],l=t;if(l.length){const n=typeof l[0][0]=="number"?[l]:l;for(const h of n)h.length<3?o.push(...h):h.length===3?o.push(...Ms(In([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Ms(In(h),10,(1+i.roughness)/2))}o.length&&a.push(Lr([o],i))}return i.stroke!==oe&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=ma(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Es([t],i)):a.push(Lr([t],i))),i.stroke!==oe&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==oe,o=i.stroke!==oe,l=!!(i.simplification&&i.simplification<1),n=(function(c,d,g){const u=nu(lu(ul(c))),y=[];let f=[],m=[0,0],C=[];const b=()=>{C.length>=4&&f.push(...Ms(C,d)),C=[]},k=()=>{b(),f.length&&(y.push(f),f=[])};for(const{key:B,data:v}of u)switch(B){case"M":k(),m=[v[0],v[1]],f.push(m);break;case"L":b(),f.push([v[0],v[1]]);break;case"C":if(!C.length){const M=f.length?f[f.length-1]:m;C.push([M[0],M[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.push([v[4],v[5]]);break;case"Z":b(),f.push([m[0],m[1]])}if(k(),!g)return y;const S=[];for(const B of y){const v=Ix(B,g);v.length&&S.push(v)}return S})(t,1,l?4-4*(i.simplification||1):(1+i.roughness)/2),h=En(t,i);if(s)if(i.fillStyle==="solid")if(n.length===1){const c=En(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else a.push(Es(n,i));else a.push(Lr(n,i));return o&&(l?n.forEach((c=>{a.push(ma(c,!1,i))})):a.push(h)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:oe};break;case"fillPath":o={d:this.opsToPath(s),stroke:oe,strokeWidth:0,fill:i.fill||oe};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||oe,strokeWidth:i,fill:oe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class Dx{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new qa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,l),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((l=>+l.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,l=!1,n){const h=this.gen.arc(t,r,i,a,s,o,l,n);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const aa="http://www.w3.org/2000/svg";class Px{constructor(t,r){this.svg=t,this.gen=new qa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(aa,"g"),o=t.options.fixedDecimalPlaceDigits;for(const l of r){let n=null;switch(l.type){case"path":n=a.createElementNS(aa,"path"),n.setAttribute("d",this.opsToPath(l,o)),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=a.createElementNS(aa,"path"),n.setAttribute("d",this.opsToPath(l,o)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(a,l,i)}n&&s.appendChild(n)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(aa,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,s,o,l=!1,n){const h=this.gen.arc(t,r,i,a,s,o,l,n);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Z={canvas:(e,t)=>new Dx(e,t),svg:(e,t)=>new Px(e,t),generator:e=>new qa(e),newSeed:()=>qa.newSeed()},at=p(async(e,t,r)=>{var u,y;let i;const a=t.useHtmlLabels||We((u=xt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];const n=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await ze(o,be(yr(l),xt()),{useHtmlLabels:a,width:t.width||((y=xt().flowchart)==null?void 0:y.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:h},xt());let d=c.getBBox();const g=((t==null?void 0:t.padding)??0)/2;if(a){const f=c.children[0],m=ht(c);await Md(f,l),d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return a?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:g,label:o}},"labelHelper"),Os=p(async(e,t,r)=>{var n,h;const i=r.useHtmlLabels??ee(xt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await ze(a,be(yr(t),xt()),{useHtmlLabels:i,width:r.width||((h=(n=xt())==null?void 0:n.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const l=r.padding/2;if(ee(xt())){const c=s.children[0],d=ht(s);o=c.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:l,label:a}},"insertLabel"),J=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function gt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(gt,"createPathFromPoints");function rr(e,t,r,i,a,s){const o=[],n=r-e,h=i-t,c=n/s,d=2*Math.PI/c,g=t+h/2;for(let u=0;u<=50;u++){const y=u/50,f=e+y*n,m=g+a*Math.sin(d*(f-e));o.push({x:f,y:m})}return o}p(rr,"generateFullSineWavePoints");function Ii(e,t,r,i,a,s){const o=[],l=a*Math.PI/180,c=(s*Math.PI/180-l)/(i-1);for(let d=0;d<i;d++){const g=l+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:-u,y:-y})}return o}p(Ii,"generateCirclePoints");function xo(e){const t=Array.from(e.childNodes).filter(n=>n.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");r.setAttribute("d",i);const a=t.find(n=>n.getAttribute("fill")!=="none"),s=t.find(n=>n.getAttribute("stroke")!=="none"),o=p((n,h)=>(n==null?void 0:n.getAttribute(h))??void 0,"getAttr");if(a){const n={fill:o(a,"fill"),"fill-opacity":o(a,"fill-opacity")??"1"};Object.entries(n).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(s){const n={stroke:o(s,"stroke"),"stroke-width":o(s,"stroke-width")??"1","stroke-opacity":o(s,"stroke-opacity")??"1"};Object.entries(n).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}p(xo,"mergePaths");var Rx=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,l=e.height/2,n,h;return Math.abs(s)*o>Math.abs(a)*l?(s<0&&(l=-l),n=s===0?0:l*a/s,h=l):(a<0&&(o=-o),n=o,h=a===0?0:o*s/a),{x:r+n,y:i+h}},"intersectRect"),ai=Rx,qx=p(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=xt(),l=ee(o);return await ze(e,s,{style:r,isTitle:i,useHtmlLabels:l,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ze=qx,ir=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),gu=p(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:l,nodeStyles:n,borderStyles:h,backgroundStyles:c}=Q(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=ee(r),u=d.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ze(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):y=await Ze(u,t.label,t.labelStyle||"",!1,!0);let f=y.getBBox();if(ee(r)){const M=y.children[0],L=ht(y);f=M.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=Z.svg(d),L=K(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),z=M.path(ir(b,k,m,C,0),L);S=d.insert(()=>(W.debug("Rough node insert CXC",z),z),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:B}=tl(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+B})`),l){const M=u.select("span");M&&M.attr("style",l)}const v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return ai(t,M)},{cluster:d,labelBBox:f}},"rect"),Nx=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(l){return ai(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Wx=p(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:l,nodeBorder:n}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let g=h.append("rect");const u=await Ze(d,t.label,t.labelStyle,void 0,!0);let y=u.getBBox();if(ee(r)){const z=u.children[0],D=ht(u);y=z.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}const f=0*t.padding,m=f/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,k=t.height+f-y.height-6,S=t.x-C/2,B=t.y-b/2;t.width=C;const v=t.y-t.height/2-m+y.height+2;let M;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),D=Z.svg(h),I=t.rx||t.ry?D.path(ir(S,B,C,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:n,seed:a}):D.rectangle(S,B,C,b,{seed:a});M=h.insert(()=>I,":first-child");const Y=D.rectangle(S,v,C,k,{fill:z?s:o,fillStyle:z?"hachure":"solid",stroke:n,seed:a});M=h.insert(()=>I,":first-child"),g=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",S).attr("y",B).attr("width",C).attr("height",b).attr("data-look",t.look),g.attr("class","inner").attr("x",S).attr("y",v).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-y.width/2}, ${B+1-(ee(r)?0:3)})`);const L=M.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(z){return ai(t,z)},{cluster:h,labelBBox:y}},"roundedWithTitle"),zx=p(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:l,nodeStyles:n,borderStyles:h,backgroundStyles:c}=Q(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=ee(r),u=d.insert("g").attr("class","cluster-label "),y=await ze(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let f=y.getBBox();if(ee(r)){const M=y.children[0],L=ht(y);f=M.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=Z.svg(d),L=K(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),z=M.path(ir(b,k,m,C,t.rx),L);S=d.insert(()=>(W.debug("Rough node insert CXC",z),z),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:B}=tl(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+B})`),l){const M=u.select("span");M&&M.attr("style",l)}const v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return ai(t,M)},{cluster:d,labelBBox:f}},"kanbanSection"),Hx=p((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),l=o.insert("g",":first-child"),n=0*t.padding,h=t.width+n;t.diff=-t.padding;const c=t.height+n,d=t.x-h/2,g=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const m=Z.svg(o).rectangle(d,g,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});u=o.insert(()=>m,":first-child")}else{u=l.insert("rect",":first-child");let f="outer";t.look,f="divider",u.attr("class",f).attr("x",d).attr("y",g).attr("width",h).attr("height",c).attr("data-look",t.look)}const y=u.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return ai(t,f)},{cluster:o,labelBBox:{}}},"divider"),Yx=gu,Ux={rect:gu,squareRect:Yx,roundedWithTitle:Wx,noteGroup:Nx,divider:Hx,kanbanSection:zx},pu=new Map,jx=p(async(e,t)=>{const r=t.shape||"rect",i=await Ux[r](e,t);return pu.set(t.id,i),i},"insertCluster"),FT=p(()=>{pu=new Map},"clear");function fu(e,t){return e.intersect(t)}p(fu,"intersectNode");var Gx=fu;function mu(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,l=s-i.y,n=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/n);i.x<a&&(h=-h);var c=Math.abs(t*r*l/n);return i.y<s&&(c=-c),{x:a+h,y:s+c}}p(mu,"intersectEllipse");var yu=mu;function Cu(e,t,r){return yu(e,t,t,r)}p(Cu,"intersectCircle");var Xx=Cu;function xu(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,l=a*r.x+s*r.y+o,n=a*i.x+s*i.y+o,h=1e-6;if(l!==0&&n!==0&&bo(l,n))return;const c=i.y-r.y,d=r.x-i.x,g=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+g,y=c*t.x+d*t.y+g;if(Math.abs(u)<h&&Math.abs(y)<h&&bo(u,y))return;const f=a*d-c*s;if(f===0)return;const m=Math.abs(f/2);let C=s*g-d*o;const b=C<0?(C-m)/f:(C+m)/f;C=c*o-a*g;const k=C<0?(C-m)/f:(C+m)/f;return{x:b,y:k}}}p(xu,"intersectLine");function bo(e,t){return e*t>0}p(bo,"sameSign");var Vx=xu;function bu(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),l=Math.min(l,c.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let n=i-e.width/2-o,h=a-e.height/2-l;for(let c=0;c<t.length;c++){let d=t[c],g=t[c<t.length-1?c+1:0],u=Vx(e,r,{x:n+d.x,y:h+d.y},{x:n+g.x,y:h+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(c,d){let g=c.x-r.x,u=c.y-r.y,y=Math.sqrt(g*g+u*u),f=d.x-r.x,m=d.y-r.y,C=Math.sqrt(f*f+m*m);return y<C?-1:y===C?0:1}),s[0]):e}p(bu,"intersectPolygon");var Zx=bu,G={node:Gx,circle:Xx,ellipse:yu,polygon:Zx,rect:ai};function ku(e,t){const{labelStyles:r}=Q(t);t.labelStyle=r;const i=it(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:l}=t,n=Z.svg(s),h=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=n.circle(0,0,o*2,h),d=s.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",qt(l)),J(t,d),t.intersect=function(g){return W.info("Circle intersect",t,o,g),G.circle(t,o,g)},s}p(ku,"anchor");function ko(e,t,r,i,a,s,o){const n=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,g=(i-t)/2,u=d/a,y=g/s,f=Math.sqrt(u**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-f**2),C=n+m*s*Math.sin(c)*(o?-1:1),b=h-m*a*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/s,(e-C)/a);let B=Math.atan2((i-b)/s,(r-C)/a)-k;o&&B<0&&(B+=2*Math.PI),!o&&B>0&&(B-=2*Math.PI);const v=[];for(let M=0;M<20;M++){const L=M/19,z=k+L*B,D=C+a*Math.cos(z),I=b+s*Math.sin(z);v.push({x:D,y:I})}return v}p(ko,"generateArcPoints");function Tu(e,t,r){const[i,a]=[t,r].sort((s,o)=>o-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}p(Tu,"calculateArcSagitta");async function Su(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,l=p(z=>z+o,"calcTotalHeight"),n=p(z=>{const D=z/2;return[D/(2.5+z/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await at(e,t,it(t)),d=l(t!=null&&t.height?t==null?void 0:t.height:c.height),[g,u]=n(d),y=Tu(d,g,u),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+y-y,C=d,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...ko(-m/2,-C/2,-m/2,C/2,g,u,!1),{x:m/2,y:C/2},...ko(m/2,C/2,m/2,-C/2,g,u,!0)],S=Z.svg(h),B=K(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const v=gt(k),M=S.path(v,B),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${g/2}, 0)`),J(t,L),t.intersect=function(z){return G.polygon(t,k,z)},h}p(Su,"bowTieRect");function He(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(He,"insertPolygonShape");var sa=12;async function wu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?28:a,o=t.look==="neo"?24:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=((t==null?void 0:t.width)??n.width)+(t.look==="neo"?s*2:s+sa),c=((t==null?void 0:t.height)??n.height)+(t.look==="neo"?o*2:o),d=0,g=h,u=-c,y=0,f=[{x:d+sa,y:u},{x:g,y:u},{x:g,y},{x:d,y},{x:d,y:u+sa},{x:d+sa,y:u}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(l),k=K(t,{}),S=gt(f),B=b.path(S,k);m=l.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=He(l,h,c,f);return i&&m.attr("style",i),J(t,m),t.intersect=function(b){return G.polygon(t,f,b)},l}p(wu,"card");function Bu(e,t){const{nodeStyles:r}=Q(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=Z.svg(i),n=K(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const h=gt(o),c=l.path(h,n),d=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(g){return G.polygon(t,o,g)},i}p(Bu,"choice");async function gl(e,t,r){const{labelStyles:i,nodeStyles:a}=Q(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:l}=await at(e,t,it(t)),n=16,h=(r==null?void 0:r.padding)??l,c=t.look==="neo"?o.width/2+n*2:o.width/2+h;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=Z.svg(s),y=K(t,{}),f=u.circle(0,0,c*2,y);d=s.insert(()=>f,":first-child"),d.attr("class","basic label-container").attr("style",qt(g))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return J(t,d),t.calcIntersect=function(u,y){const f=u.width/2;return G.circle(u,f,y)},t.intersect=function(u){return W.info("Circle intersect",t,c,u),G.circle(t,c,u)},s}p(gl,"circle");function vu(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},l={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${l.x},${l.y}
231
+ M ${a.x},${a.y} L ${o.x},${o.y}`}p(vu,"createLine");function Lu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,l=Z.svg(a),n=K(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const h=l.circle(0,0,s*2,n),c=vu(s),d=l.path(c,n),g=a.insert(()=>h,":first-child");return g.insert(()=>d),g.attr("class","outer-path"),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),J(t,g),t.intersect=function(u){return W.info("crossedCircle intersect",t,{radius:s,point:u}),G.circle(t,s,u)},a}p(Lu,"crossedCircle");function De(e,t,r,i=100,a=0,s=180){const o=[],l=a*Math.PI/180,c=(s*Math.PI/180-l)/(i-1);for(let d=0;d<i;d++){const g=l+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:-u,y:-y})}return o}p(De,"generateCirclePoints");async function Fu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,it(t)),l=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,h=s.width+l,c=s.height+n,d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...De(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...De(h/2+d*2,-d,d,20,-180,-270),...De(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...De(h/2,c/2,d,20,0,90)],y=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...De(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...De(h/2+h*.1,-d,d,20,-180,-270),...De(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...De(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Z.svg(a),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=gt(u).replace("Z",""),k=f.path(b,m),S=gt(y),B=f.path(S,{...m}),v=a.insert("g",":first-child");return v.insert(()=>B,":first-child").attr("stroke-opacity",0),v.insert(()=>k,":first-child"),v.attr("class","text"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-h/2+d-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),J(t,v),t.intersect=function(M){return G.polygon(t,y,M)},a}p(Fu,"curlyBraceLeft");function Pe(e,t,r,i=100,a=0,s=180){const o=[],l=a*Math.PI/180,c=(s*Math.PI/180-l)/(i-1);for(let d=0;d<i;d++){const g=l+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:u,y})}return o}p(Pe,"generateCirclePoints");async function _u(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,it(t)),l=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?l*2:l),c=s.height+(t.look==="neo"?n*2:n),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...Pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Pe(h/2+d*2,-d,d,20,-180,-270),...Pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Pe(h/2,c/2,d,20,0,90)],y=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...Pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Pe(h/2+d*2,-d,d,20,-180,-270),...Pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Pe(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Z.svg(a),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=gt(u).replace("Z",""),k=f.path(b,m),S=gt(y),B=f.path(S,{...m}),v=a.insert("g",":first-child");return v.insert(()=>B,":first-child").attr("stroke-opacity",0),v.insert(()=>k,":first-child"),v.attr("class","text"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),J(t,v),t.intersect=function(M){return G.polygon(t,y,M)},a}p(_u,"curlyBraceRight");function zt(e,t,r,i=100,a=0,s=180){const o=[],l=a*Math.PI/180,c=(s*Math.PI/180-l)/(i-1);for(let d=0;d<i;d++){const g=l+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:-u,y:-y})}return o}p(zt,"generateCirclePoints");async function Au(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,it(t)),l=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?l*2:l),c=s.height+(t.look==="neo"?n*2:n),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...zt(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...zt(h/2+d*2,-d,d,20,-180,-270),...zt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...zt(h/2,c/2,d,20,0,90)],y=[...zt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...zt(-h/2-d/2,-d,d,20,0,90),...zt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...zt(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...zt(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...zt(h/2+d*2,-d,d,20,-180,-270),...zt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...zt(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...zt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...zt(-h/2-d/2,-d,d,20,0,90),...zt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...zt(-h/2+d+d/2,c/2,d,30,-180,-270)],m=Z.svg(a),C=K(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=gt(u).replace("Z",""),S=m.path(k,C),v=gt(y).replace("Z",""),M=m.path(v,C),L=gt(f),z=m.path(L,{...C}),D=a.insert("g",":first-child");return D.insert(()=>z,":first-child").attr("stroke-opacity",0),D.insert(()=>S,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),g&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),J(t,D),t.intersect=function(I){return G.polygon(t,f,I)},a}p(Au,"curlyBraces");async function Eu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,l=20,n=5,{shapeSvg:h,bbox:c}=await at(e,t,it(t)),d=Math.max(l,(c.width+s*2)*1.25,(t==null?void 0:t.width)??0),g=Math.max(n,c.height+o*2,(t==null?void 0:t.height)??0),u=g/2,{cssStyles:y}=t,f=Z.svg(h),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=d,b=g,k=C-u,S=b/4,B=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...Ii(-k,-b/2,u,50,270,90)],v=gt(B),M=f.path(v,m),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-d/2}, ${-g/2})`),J(t,L),t.intersect=function(z){return G.polygon(t,B,z)},h}p(Eu,"curvedTrapezoid");var Kx=p((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Qx=p((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Jx=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Dn=8,Pn=8;async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?24:a,o=t.look==="neo"?24:a;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<Pn&&(t.width=Pn);const b=m/2/(2.5+m/50);t.height=(t.height??0)-s-b*3,t.height<Dn&&(t.height=Dn)}const{shapeSvg:l,bbox:n,label:h}=await at(e,t,it(t)),c=(t.width?t.width:n.width)+o,d=c/2,g=d/(2.5+c/50),u=(t.height?t.height:n.height)+s+g;let y;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=Z.svg(l),C=Qx(0,0,c,u,d,g),b=Jx(0,g,c,u,d,g),k=K(t,{}),S=m.path(C,k),B=m.path(b,K(t,{fill:"none"}));y=l.insert(()=>B,":first-child"),y=l.insert(()=>S,":first-child"),y.attr("class","basic label-container"),f&&y.attr("style",f)}else{const m=Kx(0,0,c,u,d,g);y=l.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",qt(f)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),J(t,y),h.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(m){const C=G.rect(t,m),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-g)){let k=g*g*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=g-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},l}p(Mu,"cylinder");async function si(e,t,r){const{labelStyles:i,nodeStyles:a}=Q(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await at(e,t,it(t)),l=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),n=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-l/2,c=-n/2;let d,{rx:g,ry:u}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(g=r.rx,u=r.ry),t.look==="handDrawn"){const f=Z.svg(s),m=K(t,{}),C=g||u?f.path(ir(h,c,l,n,g||0),m):f.rectangle(h,c,l,n,m);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",qt(y))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",qt(g)).attr("ry",qt(u)).attr("x",h).attr("y",c).attr("width",l).attr("height",n);return J(t,d),t.calcIntersect=function(f,m){return G.rect(f,m)},t.intersect=function(f){return G.rect(t,f)},s}p(si,"drawRect");async function Ou(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:a,padding:s,width:o,height:l}=t,n={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:a??s??0},h=await si(e,t,n);if(t.look==="handDrawn"){const u=Z.svg(h),y=K(t,{}),f=h.select(".basic.label-container > path:nth-child(2)"),m=f.node();if(!m)return h;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return h;return h.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),h.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),f.remove(),h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||o)??0,g=(Number(c.attr("height"))||l)??0;return d>0&&g>0&&c.attr("stroke-dasharray",`${d} ${g}`),h}p(Ou,"datastore");async function $u(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=l.width+a,c=l.height+s,d=c*.2,g=-h/2,u=-c/2-d/2,{cssStyles:y}=t,f=Z.svg(o),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:g,y:u+d},{x:-g,y:u+d},{x:-g,y:-u},{x:g,y:-u},{x:g,y:u},{x:-g,y:u},{x:-g,y:u+d}],b=f.polygon(C.map(S=>[S.x,S.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),n.attr("transform",`translate(${g+(t.padding??0)/2-(l.x-(l.left??0))}, ${u+d+(t.padding??0)/2-(l.y-(l.top??0))})`),J(t,k),t.intersect=function(S){return G.rect(t,S)},o}p($u,"dividedRectangle");async function Iu(e,t){var u,y;const{labelStyles:r,nodeStyles:i}=Q(t),a=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:n.width/2)+(o??0),c=h-a;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=Z.svg(l),m=K(t,{roughness:.2,strokeWidth:2.5}),C=K(t,{roughness:.2,strokeWidth:1.5}),b=f.circle(0,0,h*2,m),k=f.circle(0,0,c*2,C);d=l.insert("g",":first-child"),d.attr("class",qt(t.cssClasses)).attr("style",qt(g)),(u=d.node())==null||u.appendChild(b),(y=d.node())==null||y.appendChild(k)}else{d=l.insert("g",":first-child");const f=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return J(t,d),t.intersect=function(f){return W.info("DoubleCircle intersect",t,h,f),G.circle(t,h,f)},l}p(Iu,"doublecircle");function Du(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Q(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:l}=t,n=Z.svg(s),{nodeBorder:h}=r,c=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=n.circle(0,0,o*2,c),g=s.insert(()=>d,":first-child");return g.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),J(t,g),t.intersect=function(u){return W.info("filledCircle intersect",t,{radius:o,point:u}),G.circle(t,o,u)},s}p(Du,"filledCircle");var Rn=10,qn=10;async function Pu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Rn&&(t.height=Rn),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<qn&&(t.width=qn));const{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0),c=t!=null&&t.height?t==null?void 0:t.height:h+l.height,d=c,g=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,y=Z.svg(o),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=gt(g),C=y.path(m,f),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,J(t,b),n.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-c/2+(t.padding??0)/2+(l.y-(l.top??0))})`),t.intersect=function(k){return W.info("Triangle intersect",t,g,k),G.polygon(t,g,k)},o}p(Pu,"flippedTriangle");function Ru(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=Q(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:l}=t;let n=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(n=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*n/2,d=-1*h/2,g=Z.svg(o),u=K(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const y=g.rectangle(c,d,n,h,u),f=o.insert(()=>y,":first-child");l&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",l),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),J(t,f);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return G.rect(t,C)},o}p(Ru,"forkJoin");async function qu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=15,s=10,o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-l*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<a&&(t.width=a));const{shapeSvg:n,bbox:h}=await at(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,h.height))+l*2,g=d/2,{cssStyles:u}=t,y=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:-d/2},{x:c/2-g,y:-d/2},...Ii(-c/2+g,0,g,50,90,270),{x:c/2-g,y:d/2},{x:-c/2,y:d/2}],C=gt(m),b=y.path(C,f),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(S){return W.info("Pill intersect",t,{radius:g,point:S}),G.polygon(t,m,S)},n}p(qu,"halfRoundedRectangle");var tb=p((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Nu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,o=70,l=32,n=t.look==="neo"?o:s,h=t.look==="neo"?l:s;if(t.width||t.height){const k=(t.height??0)/a;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-n}const{shapeSvg:c,bbox:d}=await at(e,t,it(t)),g=(t!=null&&t.height?t==null?void 0:t.height:d.height)+n,u=g/a,y=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,f=[{x:u,y:0},{x:y-u,y:0},{x:y,y:-g/2},{x:y-u,y:-g},{x:u,y:-g},{x:0,y:-g/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(c),k=K(t,{}),S=tb(0,0,y,g,u),B=b.path(S,k);m=c.insert(()=>B,":first-child").attr("transform",`translate(${-y/2}, ${g/2})`),C&&m.attr("style",C)}else m=He(c,y,g,f);return i&&m.attr("style",i),t.width=y,t.height=g,J(t,m),t.intersect=function(b){return G.polygon(t,f,b)},c}p(Nu,"hexagon");async function Wu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await at(e,t,it(t)),s=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:l}=t,n=Z.svg(a),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],d=gt(c),g=n.path(d,h),u=a.insert(()=>g,":first-child");return u.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-s/2}, ${-o/2})`),J(t,u),t.intersect=function(y){return W.info("Pill intersect",t,{points:c}),G.polygon(t,c,y)},a}p(Wu,"hourglass");async function zu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Q(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),n=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,n??0);const{shapeSvg:h,bbox:c,label:d}=await at(e,t,"icon-shape default"),g=t.pos==="t",u=l,y=l,{nodeBorder:f}=r,{stylesMap:m}=ii(t),C=-y/2,b=-u/2,k=t.label?8:0,S=Z.svg(h),B=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const v=S.rectangle(C,b,y,u,B),M=Math.max(y,c.width),L=u+c.height+k,z=S.rectangle(-M/2,-L/2,M,L,{...B,fill:"transparent",stroke:"none"}),D=h.insert(()=>v,":first-child"),I=h.insert(()=>z);if(t.icon){const Y=h.append("g");Y.html(`<g>${await Hi(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),P=H.width,E=H.height,F=H.x,$=H.y;Y.attr("transform",`translate(${-P/2-F},${g?c.height/2+k/2-E/2-$:-c.height/2-k/2-E/2-$})`),Y.attr("style",`color: ${m.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-L/2:L/2-c.height})`),D.attr("transform",`translate(0,${g?c.height/2+k/2:-c.height/2-k/2})`),J(t,I),t.intersect=function(Y){if(W.info("iconSquare intersect",t,Y),!t.label)return G.rect(t,Y);const H=t.x??0,P=t.y??0,E=t.height??0;let F=[];return g?F=[{x:H-c.width/2,y:P-E/2},{x:H+c.width/2,y:P-E/2},{x:H+c.width/2,y:P-E/2+c.height+k},{x:H+y/2,y:P-E/2+c.height+k},{x:H+y/2,y:P+E/2},{x:H-y/2,y:P+E/2},{x:H-y/2,y:P-E/2+c.height+k},{x:H-c.width/2,y:P-E/2+c.height+k}]:F=[{x:H-y/2,y:P-E/2},{x:H+y/2,y:P-E/2},{x:H+y/2,y:P-E/2+u},{x:H+c.width/2,y:P-E/2+u},{x:H+c.width/2/2,y:P+E/2},{x:H-c.width/2,y:P+E/2},{x:H-c.width/2,y:P-E/2+u},{x:H-y/2,y:P-E/2+u}],G.polygon(t,F,Y)},h}p(zu,"icon");async function Hu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Q(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),n=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,n??0);const{shapeSvg:h,bbox:c,label:d}=await at(e,t,"icon-shape default"),g=20,u=t.label?8:0,y=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:C}=ii(t),b=Z.svg(h),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??m;const B=h.append("g");t.icon&&B.html(`<g>${await Hi(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const v=B.node().getBBox(),M=v.width,L=v.height,z=v.x,D=v.y,I=Math.max(M,L)*Math.SQRT2+g*2,Y=b.circle(0,0,I,k),H=Math.max(I,c.width),P=I+c.height+u,E=b.rectangle(-H/2,-P/2,H,P,{...k,fill:"transparent",stroke:"none"}),F=h.insert(()=>Y,":first-child"),$=h.insert(()=>E);return B.attr("transform",`translate(${-M/2-z},${y?c.height/2+u/2-L/2-D:-c.height/2-u/2-L/2-D})`),B.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${y?-P/2:P/2-c.height})`),F.attr("transform",`translate(0,${y?c.height/2+u/2:-c.height/2-u/2})`),J(t,$),t.intersect=function(A){return W.info("iconSquare intersect",t,A),G.rect(t,A)},h}p(Hu,"iconCircle");async function Yu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Q(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),n=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,n??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:g}=await at(e,t,"icon-shape default"),u=t.pos==="t",y=l+d*2,f=l+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=ii(t),k=-f/2,S=-y/2,B=t.label?8:0,v=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const z=v.path(ir(k,S,f,y,5),M),D=Math.max(f,c.width),I=y+c.height+B,Y=v.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>z,":first-child").attr("class","icon-shape2"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await Hi(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const F=E.node().getBBox(),$=F.width,A=F.height,w=F.x,N=F.y;E.attr("transform",`translate(${-$/2-w},${u?c.height/2+B/2-A/2-N:-c.height/2-B/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??m};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${u?c.height/2+B/2:-c.height/2-B/2})`),J(t,P),t.intersect=function(E){if(W.info("iconSquare intersect",t,E),!t.label)return G.rect(t,E);const F=t.x??0,$=t.y??0,A=t.height??0;let w=[];return u?w=[{x:F-c.width/2,y:$-A/2},{x:F+c.width/2,y:$-A/2},{x:F+c.width/2,y:$-A/2+c.height+B},{x:F+f/2,y:$-A/2+c.height+B},{x:F+f/2,y:$+A/2},{x:F-f/2,y:$+A/2},{x:F-f/2,y:$-A/2+c.height+B},{x:F-c.width/2,y:$-A/2+c.height+B}]:w=[{x:F-f/2,y:$-A/2},{x:F+f/2,y:$-A/2},{x:F+f/2,y:$-A/2+y},{x:F+c.width/2,y:$-A/2+y},{x:F+c.width/2/2,y:$+A/2},{x:F-c.width/2,y:$+A/2},{x:F-c.width/2,y:$-A/2+y},{x:F-f/2,y:$-A/2+y}],G.polygon(t,w,E)},h}p(Yu,"iconRounded");async function Uu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Q(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),n=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,n??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:g}=await at(e,t,"icon-shape default"),u=t.pos==="t",y=l+d*2,f=l+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=ii(t),k=-f/2,S=-y/2,B=t.label?8:0,v=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const z=v.path(ir(k,S,f,y,.1),M),D=Math.max(f,c.width),I=y+c.height+B,Y=v.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>z,":first-child"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await Hi(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const F=E.node().getBBox(),$=F.width,A=F.height,w=F.x,N=F.y;E.attr("transform",`translate(${-$/2-w},${u?c.height/2+B/2-A/2-N:-c.height/2-B/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??m};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${u?c.height/2+B/2:-c.height/2-B/2})`),J(t,P),t.intersect=function(E){if(W.info("iconSquare intersect",t,E),!t.label)return G.rect(t,E);const F=t.x??0,$=t.y??0,A=t.height??0;let w=[];return u?w=[{x:F-c.width/2,y:$-A/2},{x:F+c.width/2,y:$-A/2},{x:F+c.width/2,y:$-A/2+c.height+B},{x:F+f/2,y:$-A/2+c.height+B},{x:F+f/2,y:$+A/2},{x:F-f/2,y:$+A/2},{x:F-f/2,y:$-A/2+c.height+B},{x:F-c.width/2,y:$-A/2+c.height+B}]:w=[{x:F-f/2,y:$-A/2},{x:F+f/2,y:$-A/2},{x:F+f/2,y:$-A/2+y},{x:F+c.width/2,y:$-A/2+y},{x:F+c.width/2/2,y:$+A/2},{x:F-c.width/2,y:$+A/2},{x:F-c.width/2,y:$-A/2+y},{x:F-f/2,y:$-A/2+y}],G.polygon(t,w,E)},h}p(Uu,"iconSquare");async function ju(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=Q(t);t.labelStyle=o;const l=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const n=Math.max(t.label?l??0:0,(t==null?void 0:t.assetWidth)??a),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:n,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(h,l??0);const{shapeSvg:d,bbox:g,label:u}=await at(e,t,"image-shape default"),y=t.pos==="t",f=-h/2,m=-c/2,C=t.label?8:0,b=Z.svg(d),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(f,m,h,c,k),B=Math.max(h,g.width),v=c+g.height+C,M=b.rectangle(-B/2,-v/2,B,v,{...k,fill:"none",stroke:"none"}),L=d.insert(()=>S,":first-child"),z=d.insert(()=>M);if(t.img){const D=d.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${y?v/2-c:-v/2})`)}return u.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${y?-c/2-g.height/2-C/2:c/2-g.height/2+C/2})`),L.attr("transform",`translate(0,${y?g.height/2+C/2:-g.height/2-C/2})`),J(t,z),t.intersect=function(D){if(W.info("iconSquare intersect",t,D),!t.label)return G.rect(t,D);const I=t.x??0,Y=t.y??0,H=t.height??0;let P=[];return y?P=[{x:I-g.width/2,y:Y-H/2},{x:I+g.width/2,y:Y-H/2},{x:I+g.width/2,y:Y-H/2+g.height+C},{x:I+h/2,y:Y-H/2+g.height+C},{x:I+h/2,y:Y+H/2},{x:I-h/2,y:Y+H/2},{x:I-h/2,y:Y-H/2+g.height+C},{x:I-g.width/2,y:Y-H/2+g.height+C}]:P=[{x:I-h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2+c},{x:I+g.width/2,y:Y-H/2+c},{x:I+g.width/2/2,y:Y+H/2},{x:I-g.width/2,y:Y+H/2},{x:I-g.width/2,y:Y-H/2+c},{x:I-h/2,y:Y-H/2+c}],G.polygon(t,P,D)},d}p(ju,"imageSquare");async function Gu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=Math.max(n.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(s??0)*2,(t==null?void 0:t.height)??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(l),f=K(t,{}),m=gt(d),C=y.path(m,f);g=l.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&g.attr("style",u)}else g=He(l,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,J(t,g),t.intersect=function(y){return G.polygon(t,d,y)},l}p(Gu,"inv_trapezoid");async function Xu(e,t){const{shapeSvg:r,bbox:i,label:a}=await at(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),J(t,s),t.intersect=function(n){return G.rect(t,n)},r}p(Xu,"labelRect");async function Vu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=((t==null?void 0:t.height)??n.height)+s,c=((t==null?void 0:t.width)??n.width)+o,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(l),f=K(t,{}),m=gt(d),C=y.path(m,f);g=l.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=He(l,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,J(t,g),t.intersect=function(y){return G.polygon(t,d,y)},l}p(Vu,"lean_left");async function Zu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=((t==null?void 0:t.height)??n.height)+s,c=((t==null?void 0:t.width)??n.width)+o,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(l),f=K(t,{}),m=gt(d),C=y.path(m,f);g=l.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=He(l,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,J(t,g),t.intersect=function(y){return G.polygon(t,d,y)},l}p(Zu,"lean_right");function Ku(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,(t==null?void 0:t.width)??0),l=Math.max(35,(t==null?void 0:t.height)??0),n=7,h=[{x:o,y:0},{x:0,y:l+n/2},{x:o-2*n,y:l+n/2},{x:0,y:2*l},{x:o,y:l-n/2},{x:2*n,y:l-n/2}],c=Z.svg(a),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=gt(h),u=c.path(g,d),y=a.insert(()=>u,":first-child");return y.attr("class","outer-path"),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-l})`),J(t,y),t.intersect=function(f){return W.info("lightningBolt intersect",t,f),G.polygon(t,h,f)},a}p(Ku,"lightningBolt");var eb=p((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),rb=p((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ib=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Nn=10,Wn=10;async function Qu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?24:a;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<Wn&&(t.width=Wn);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<Nn&&(t.height=Nn)}const{shapeSvg:l,bbox:n,label:h}=await at(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2,d=c/2,g=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:n.height)+g+o*2,y=u*.1;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=Z.svg(l),b=rb(0,0,c,u,d,g,y),k=ib(0,g,c,u,d,g),S=K(t,{}),B=C.path(b,S),v=C.path(k,S);l.insert(()=>v,":first-child").attr("class","line"),f=l.insert(()=>B,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const C=eb(0,0,c,u,d,g,y);f=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",qt(m)).attr("style",i)}return f.attr("label-offset-y",g),f.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),J(t,f),h.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+g-(n.y-(n.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-g)){let S=g*g*(1-k*k/(d*d));S>0&&(S=Math.sqrt(S)),S=g-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},l}p(Qu,"linedCylinder");async function Ju(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:l,bbox:n,label:h}=await at(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(s??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:n.height)+(o??0)*2,g=t.look==="neo"?d/4:d/8,u=d+g,{cssStyles:y}=t,f=Z.svg(l),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...rr(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,g,.8),{x:c/2+c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:-u/2},{x:-c/2,y:-u/2},{x:-c/2,y:u/2*1.1},{x:-c/2,y:-u/2}],b=f.polygon(C.map(S=>[S.x,S.y]),m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(n.x-(n.left??0))},${-d/2+(t.padding??0)-g/2-(n.y-(n.top??0))})`),J(t,k),t.intersect=function(S){return G.polygon(t,C,S)},l}p(Ju,"linedWaveEdgedRect");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,l=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*l,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*l,10));const{shapeSvg:n,bbox:h,label:c}=await at(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+2*l,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*l,u=d-2*l,y=g-2*l,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Z.svg(n),k=K(t,{}),S=[{x:f-l,y:m+l},{x:f-l,y:m+y+l},{x:f+u-l,y:m+y+l},{x:f+u-l,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m+y-l},{x:f+u+l,y:m+y-l},{x:f+u+l,y:m-l},{x:f+l,y:m-l},{x:f+l,y:m},{x:f,y:m},{x:f,y:m+l}],B=[{x:f,y:m+l},{x:f+u-l,y:m+l},{x:f+u-l,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m},{x:f,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=gt(S);let M=b.path(v,k);const L=gt(B);let z=b.path(L,k);t.look!=="handDrawn"&&(M=xo(M),z=xo(z));const D=n.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>z),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-l-(h.x-(h.left??0))}, ${-(h.height/2)+l-(h.y-(h.top??0))})`),J(t,D),t.intersect=function(I){return G.polygon(t,S,I)},n}p(tg,"multiRect");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,it(t)),l=t.padding??0,n=t.look==="neo"?16:l,h=t.look==="neo"?12:l;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-n*2,t.height=((t==null?void 0:t.height)??0)-h*3);const d=Math.max(s.width,(t==null?void 0:t.width)??0)+n*2,g=Math.max(s.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?g/4:g/8,y=g+(c?u/2:-u/2),f=-d/2,m=-y/2,C=10,{cssStyles:b}=t,k=rr(f-C,m+y+C,f+d-C,m+y+C,u,.8),S=k==null?void 0:k[k.length-1],B=[{x:f-C,y:m+C},{x:f-C,y:m+y+C},...k,{x:f+d-C,y:S.y-C},{x:f+d,y:S.y-C},{x:f+d,y:S.y-2*C},{x:f+d+C,y:S.y-2*C},{x:f+d+C,y:m-C},{x:f+C,y:m-C},{x:f+C,y:m},{x:f,y:m},{x:f,y:m+C}],v=[{x:f,y:m+C},{x:f+d-C,y:m+C},{x:f+d-C,y:S.y-C},{x:f+d,y:S.y-C},{x:f+d,y:m},{x:f,y:m}],M=Z.svg(a),L=K(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const z=gt(B),D=M.path(z,L),I=gt(v),Y=M.path(I,L),H=a.insert(()=>D,":first-child");return H.insert(()=>Y),H.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",i),H.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-u/2-(s.y-(s.top??0))})`),J(t,H),t.intersect=function(P){return G.polygon(t,B,P)},a}p(eg,"multiWaveEdgedRectangle");async function rg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Q(t);t.labelStyle=i,t.useHtmlLabels||ee(vt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,g=-c/2,{cssStyles:u}=t,y=Z.svg(o),f=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=y.rectangle(d,g,h,c,f),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),n.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,C),t.intersect=function(b){return G.rect(t,b)},o}p(rg,"note");var ab=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await at(e,t,it(t)),o=s.width+(t.padding??0),l=s.height+(t.padding??0),n=o+l,h=.5,c=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=Z.svg(a),y=K(t,{}),f=ab(0,0,n),m=u.path(f,y);d=a.insert(()=>m,":first-child").attr("transform",`translate(${-n/2+h}, ${n/2})`),g&&d.attr("style",g)}else d=He(a,n,n,c),d.attr("transform",`translate(${-n/2+h}, ${n/2})`);return i&&d.attr("style",i),J(t,d),t.calcIntersect=function(u,y){const f=u.width,m=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=G.polygon(u,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},a}p(ig,"question");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?21:a??0,o=t.look==="neo"?12:a??0,{shapeSvg:l,bbox:n,label:h}=await at(e,t,it(t)),c=((t==null?void 0:t.width)??n.width)+(t.look==="neo"?s*2:s),d=((t==null?void 0:t.height)??n.height)+(t.look==="neo"?o*2:o),g=-c/2,u=-d/2,y=u/2,f=[{x:g+y,y:u},{x:g,y:0},{x:g+y,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:m}=t,C=Z.svg(l),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=gt(f),S=C.path(k,b),B=l.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-y/2},0)`),h.attr("transform",`translate(${-y/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,B),t.intersect=function(v){return G.polygon(t,f,v)},l}p(ag,"rect_left_inv_arrow");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),l=s.insert("g").attr("class","label").attr("style",i),n=t.description,h=t.label,c=await Ze(l,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(ee(xt())){const L=c.children[0],z=ht(c);d=L.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}W.info("Text 2",n);const g=n||[],u=c.getBBox(),y=await Ze(l,Array.isArray(g)?g.join("<br/>"):g,t.labelStyle,!0,!0),f=y.children[0],m=ht(y);d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);const C=(t.padding||0)/2;ht(y).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),ht(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=l.node().getBBox(),l.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),S=-d.width/2-C,B=-d.height/2-C;let v,M;if(t.look==="handDrawn"){const L=Z.svg(s),z=K(t,{}),D=L.path(ir(S,B,b,k,t.rx||0),z),I=L.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,z);M=s.insert(()=>(W.debug("Rough node insert CXC",D),I),":first-child"),v=s.insert(()=>(W.debug("Rough node insert CXC",D),D),":first-child")}else v=o.insert("rect",":first-child"),M=o.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),M.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return J(t,v),t.intersect=function(L){return G.rect(t,L)},s}p(sg,"rectWithTitle");async function og(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,a={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return si(e,t,a)}p(og,"roundedRect");var nr=8;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+a*2+(t.look==="neo"?nr:nr*2),c=((t==null?void 0:t.height)??l.height)+s*2,d=h-nr,g=c,u=nr-h/2,y=-c/2,{cssStyles:f}=t,m=Z.svg(o),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y},{x:u+d,y},{x:u+d,y:y+g},{x:u-nr,y:y+g},{x:u-nr,y},{x:u,y},{x:u,y:y+g}],k=m.polygon(b.map(B=>[B.x,B.y]),C),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",qt(f)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),n.attr("transform",`translate(${nr/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,S),t.intersect=function(B){return G.rect(t,B)},o}p(lg,"shadedProcess");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:l,bbox:n,label:h}=await at(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2,d=((t!=null&&t.height?t==null?void 0:t.height:n.height)+o*2)*1.5,g=c,u=d/1.5,y=-g/2,f=-u/2,{cssStyles:m}=t,C=Z.svg(l),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:f},{x:y,y:f+u},{x:y+g,y:f+u},{x:y+g,y:f-u/2}],S=gt(k),B=C.path(S,b),v=l.insert(()=>B,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-g/2+(t.padding??0)-(n.x-(n.left??0))}, ${-u/4+(t.padding??0)-(n.y-(n.top??0))})`),J(t,v),t.intersect=function(M){return G.polygon(t,k,M)},l}p(ng,"slopedRect");async function hg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return si(e,t,s)}p(hg,"squareRect");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?20:a,o=t.look==="neo"?12:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=n.height+(t.look==="neo"?o*2:o),c=n.width+h/4+(t.look==="neo"?s*2:s),d=h/2,{cssStyles:g}=t,u=Z.svg(l),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...Ii(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...Ii(c/2-d,0,d,50,270,450)],m=gt(f),C=u.path(m,y),b=l.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),J(t,b),t.intersect=function(k){return G.polygon(t,f,k)},l}p(cg,"stadium");async function dg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return si(e,t,r)}p(dg,"state");function ug(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:a}=Q(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:l,nodeBorder:n,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=Z.svg(c),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const u=d.circle(0,0,t.width,{...g,stroke:o,strokeWidth:2}),y=l??n,f=(t.width??0)*5/14,m=d.circle(0,0,f,{...g,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),a&&C.selectAll("path").attr("style",a),t.width<25&&h&&t.look!=="handDrawn"){const S=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",B=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${B})`)}return J(t,C),t.intersect=function(S){return G.circle(t,(t.width??0)/2,S)},c}p(ug,"stateEnd");function gg(e,t,{config:{themeVariables:r}}){var l,n;const{lineColor:i,nodeShadow:a}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=Z.svg(s).circle(0,0,t.width,g0(i));o=s.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){const h=((n=(l=e.node())==null?void 0:l.ownerSVGElement)==null?void 0:n.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return J(t,o),t.intersect=function(h){return G.circle(t,(t.width??7)/2,h)},s}p(gg,"stateStart");var Fr=8;async function pg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:a,o=t.look==="neo"?12:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=((t==null?void 0:t.width)??n.width)+2*Fr+s,c=((t==null?void 0:t.height)??n.height)+o,d=h-2*Fr,g=c,u=-h/2,y=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){const m=Z.svg(l),C=K(t,{}),b=m.rectangle(u,y,d+16,g,C),k=m.line(u+Fr,y,u+Fr,y+g,C),S=m.line(u+Fr+d,y,u+Fr+d,y+g,C);l.insert(()=>k,":first-child"),l.insert(()=>S,":first-child");const B=l.insert(()=>b,":first-child"),{cssStyles:v}=t;B.attr("class","basic label-container").attr("style",qt(v)),J(t,B)}else{const m=He(l,d,g,f);i&&m.attr("style",i),J(t,m)}return t.intersect=function(m){return G.polygon(t,f,m)},l}p(pg,"subroutine");var $s=.2;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-$s*(t.height+o*2),10));const{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+o*2,c=$s*h,d=$s*h,u=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+c-c,y=h,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Z.svg(l),k=K(t,{}),S=[{x:f-c/2,y:m},{x:f+u+c/2,y:m},{x:f+u+c/2,y:m+y},{x:f-c/2,y:m+y}],B=[{x:f+u-c/2,y:m+y},{x:f+u+c/2,y:m+y},{x:f+u+c/2,y:m+y-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=gt(S),M=b.path(v,k),L=gt(B),z=b.path(L,{...k,fillStyle:"solid"}),D=l.insert(()=>z,":first-child");return D.insert(()=>M,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),J(t,D),t.intersect=function(I){return G.polygon(t,S,I)},l}p(fg,"taggedRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,it(t)),l=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=n/8,c=.2*l,d=.2*n,g=n+h,{cssStyles:u}=t,y=Z.svg(a),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-l/2-l/2*.1,y:g/2},...rr(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,h,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2}],C=-l/2+l/2*.1,b=-g/2-d*.4,k=[{x:C+l-c,y:(b+n)*1.3},{x:C+l,y:b+n-d},{x:C+l,y:(b+n)*.9},...rr(C+l,(b+n)*1.25,C+l-c,(b+n)*1.3,-n*.02,.5)],S=gt(m),B=y.path(S,f),v=gt(k),M=y.path(v,{...f,fillStyle:"solid"}),L=a.insert(()=>M,":first-child");return L.insert(()=>B,":first-child"),L.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(s.x-(s.left??0))},${-n/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),J(t,L),t.intersect=function(z){return G.polygon(t,m,z)},a}p(mg,"taggedWaveEdgedRectangle");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await at(e,t,it(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),l=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),n=-o/2,h=-l/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",n).attr("y",h).attr("width",o).attr("height",l),J(t,c),t.intersect=function(d){return G.rect(t,d)},a}p(yg,"text");var sb=p((e,t,r,i,a,s)=>`M${e},${t}
232
+ a${a},${s} 0,0,1 0,${-i}
233
+ l${r},0
234
+ a${a},${s} 0,0,1 0,${i}
235
+ M${r},${-i}
236
+ a${a},${s} 0,0,0 0,${i}
237
+ l${-r},0`,"createCylinderPathD"),ob=p((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),lb=p((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),zn=5,Hn=10;async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const f=t.height??0;t.height=(t.height??0)-s,t.height<zn&&(t.height=zn);const C=f/2/(2.5+f/50);t.width=(t.width??0)-s-C*3,t.width<Hn&&(t.width=Hn)}const{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=(t.height?t.height:l.height)+s,c=h/2,d=c/(2.5+h/50),g=(t.width?t.width:l.width)+d+s,{cssStyles:u}=t;let y;if(t.look==="handDrawn"){const f=Z.svg(o),m=ob(0,0,g,h,d,c),C=lb(0,0,g,h,d,c),b=f.path(m,K(t,{})),k=f.path(C,K(t,{fill:"none"}));y=o.insert(()=>k,":first-child"),y=o.insert(()=>b,":first-child"),y.attr("class","basic label-container"),u&&y.attr("style",u)}else{const f=sb(0,0,g,h,d,c);y=o.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",qt(u)).attr("style",i),y.attr("class","basic label-container outer-path"),u&&y.selectAll("path").attr("style",u),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-g/2}, ${h/2} )`),n.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,y),t.intersect=function(f){const m=G.rect(t,f),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,f.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},o}p(Cg,"tiltedCylinder");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=(t.look==="neo",a),o=t.look==="neo"?a*2:a,{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=((t==null?void 0:t.height)??n.height)+s,c=((t==null?void 0:t.width)??n.width)+o,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(l),f=K(t,{}),m=gt(d),C=y.path(m,f);g=l.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=He(l,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,J(t,g),t.intersect=function(y){return G.polygon(t,d,y)},l}p(xg,"trapezoid");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,l=15,n=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<n&&(t.height=n),t.width=(t.width??0)-s*2,t.width<l&&(t.width=l));const{shapeSvg:h,bbox:c}=await at(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2,g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:u}=t,y=Z.svg(h),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-d/2*.8,y:-g/2},{x:d/2*.8,y:-g/2},{x:d/2,y:-g/2*.6},{x:d/2,y:g/2},{x:-d/2,y:g/2},{x:-d/2,y:-g/2*.6}],C=gt(m),b=y.path(C,f),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(S){return G.polygon(t,m,S)},h}p(bg,"trapezoidalPentagon");var Yn=10,Un=10;async function kg(e,t){var S;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<Un&&(t.width=Un),t.height=(t==null?void 0:t.height)??0,t.height<Yn&&(t.height=Yn));const{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=We((S=xt().flowchart)==null?void 0:S.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s,d=t!=null&&t.height?t==null?void 0:t.height:c+l.height,g=d,u=[{x:0,y:0},{x:g,y:0},{x:g/2,y:-d}],{cssStyles:y}=t,f=Z.svg(o),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=gt(u),b=f.path(C,m),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=d,J(t,k),n.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${d/2-(l.height+(t.padding??0)/(h?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(B){return W.info("Triangle intersect",t,u,B),G.polygon(t,u,B)},o}p(kg,"triangle");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;let l=!0;(t.width||t.height)&&(l=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:n,bbox:h,label:c}=await at(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,u=t.look==="neo"?g/4:g/8,y=g+(l?u:-u),{cssStyles:f}=t,C=14-d,b=C>0?C/2:0,k=Z.svg(n),S=K(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=[{x:-d/2-b,y:y/2},...rr(-d/2-b,y/2,d/2+b,y/2,u,.8),{x:d/2+b,y:-y/2},{x:-d/2-b,y:-y/2}],v=gt(B),M=k.path(v,S),L=n.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-g/2+(t.padding??0)-u-(h.y-(h.top??0))})`),J(t,L),t.intersect=function(z){return G.polygon(t,B,z)},n}p(Tg,"waveEdgedRectangle");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?20:a;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-S*(20/9)),t.width=t.width-s*2}const{shapeSvg:l,bbox:n}=await at(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+o,d=c/8,g=c+d*2,{cssStyles:u}=t,y=Z.svg(l),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-h/2,y:g/2},...rr(-h/2,g/2,h/2,g/2,d,1),{x:h/2,y:-g/2},...rr(h/2,-g/2,-h/2,-g/2,d,-1)],C=gt(m),b=y.path(C,f),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),J(t,k),t.intersect=function(S){return G.polygon(t,m,S)},l}p(Sg,"waveRectangle");var _t=10;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-_t,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-_t,10));const{shapeSvg:o,bbox:l,label:n}=await at(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+_t,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+s*2+_t,d=h-_t,g=c-_t,u=-d/2,y=-g/2,{cssStyles:f}=t,m=Z.svg(o),C=K(t,{}),b=[{x:u-_t,y:y-_t},{x:u-_t,y:y+g},{x:u+d,y:y+g},{x:u+d,y:y-_t}],k=`M${u-_t},${y-_t} L${u+d},${y-_t} L${u+d},${y+g} L${u-_t},${y+g} L${u-_t},${y-_t}
238
+ M${u-_t},${y} L${u+d},${y}
239
+ M${u},${y-_t} L${u},${y+g}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=m.path(k,C),B=o.insert(()=>S,":first-child");return B.attr("transform",`translate(${_t/2}, ${_t/2})`),B.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),n.attr("transform",`translate(${-(l.width/2)+_t/2-(l.x-(l.left??0))}, ${-(l.height/2)+_t/2-(l.y-(l.top??0))})`),J(t,B),t.intersect=function(v){return G.polygon(t,b,v)},o}p(wg,"windowPane");var jn=new Set(["redux-color","redux-dark-color"]),nb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function pl(e,t){var Lt,Nt,se,ne;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=vt(),{rowEven:s,rowOdd:o,nodeBorder:l,borderColorArray:n}=a;if(t.look==="handDrawn"){const{themeVariables:et}=vt(),{background:X}=et,St={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await pl(e,St)}const h=vt();t.useHtmlLabels=h.htmlLabels;let c=((Lt=h.er)==null?void 0:Lt.diagramPadding)??10,d=((Nt=h.er)==null?void 0:Nt.entityPadding)??6;const{cssStyles:g}=t,{labelStyles:u,nodeStyles:y}=Q(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ne(t.label,h)+et.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const X=await si(e,t,et);if(i!=null&&jn.has(i)){const St=r.colorIndex??0;X.attr("data-color-id",`color-${St%n.length}`)}if(!We(h.htmlLabels)){const St=X.select("text"),nt=(se=St.node())==null?void 0:se.getBBox();St.attr("transform",`translate(${-nt.width/2}, 0)`)}return X}h.htmlLabels||(c*=1.25,d*=1.25);let f=it(t);f||(f="node default");const m=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await Er(m,t.label??"",h,0,0,["name"],u);C.height+=d;let b=0;const k=[],S=[];let B=0,v=0,M=0,L=0,z=!0,D=!0;for(const et of r.attributes){const X=await Er(m,et.type,h,0,b,["attribute-type"],u);B=Math.max(B,X.width+c);const St=await Er(m,et.name,h,0,b,["attribute-name"],u);v=Math.max(v,St.width+c);const nt=await Er(m,et.keys.join(),h,0,b,["attribute-keys"],u);M=Math.max(M,nt.width+c);const Te=await Er(m,et.comment,h,0,b,["attribute-comment"],u);L=Math.max(L,Te.width+c);const kt=Math.max(X.height,St.height,nt.height,Te.height)+d;S.push({yOffset:b,rowHeight:kt}),b+=kt}let I=4;M<=c&&(z=!1,M=0,I--),L<=c&&(D=!1,L=0,I--);const Y=m.node().getBBox();if(C.width+c*2-(B+v+M+L)>0){const et=C.width+c*2-(B+v+M+L);B+=et/I,v+=et/I,M>0&&(M+=et/I),L>0&&(L+=et/I)}const H=B+v+M+L,P=Z.svg(m),E=K(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let F=0;S.length>0&&(F=S.reduce((et,X)=>et+((X==null?void 0:X.rowHeight)??0),0));const $=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),A=Math.max((F??0)+C.height,(t==null?void 0:t.height)||0),w=-$/2,N=-A/2;if(m.selectAll("g:not(:first-child)").each((et,X,St)=>{const nt=ht(St[X]),Te=nt.attr("transform");let kt=0,Ye=0;if(Te){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Te);he&&(kt=parseFloat(he[1]),Ye=parseFloat(he[2]),nt.attr("class").includes("attribute-name")?kt+=B:nt.attr("class").includes("attribute-keys")?kt+=B+v:nt.attr("class").includes("attribute-comment")&&(kt+=B+v+M))}nt.attr("transform",`translate(${w+c/2+kt}, ${Ye+N+C.height+d/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(N+d/2)+")"),i!=null&&jn.has(i)){const et=r.colorIndex??0;m.attr("data-color-id",`color-${et%n.length}`)}const V=P.rectangle(w,N,$,A,E),dt=m.insert(()=>V,":first-child").attr("class","outer-path").attr("style",g.join(""));k.push(0);for(const[et,X]of S.entries()){const nt=(et+1)%2===0&&X.yOffset!==0,Te=P.rectangle(w,C.height+N+(X==null?void 0:X.yOffset),$,X==null?void 0:X.rowHeight,{...E,fill:nt?s:o,stroke:l});m.insert(()=>Te,"g.label").attr("style",g.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}const ft=1e-4;let ut=Mr(w,C.height+N,$+w,C.height+N,ft),Ct=P.polygon(ut.map(et=>[et.x,et.y]),E);if(m.insert(()=>Ct).attr("class","divider"),ut=Mr(B+w,C.height+N,B+w,A+N,ft),Ct=P.polygon(ut.map(et=>[et.x,et.y]),E),m.insert(()=>Ct).attr("class","divider"),z){const et=B+v+w;ut=Mr(et,C.height+N,et,A+N,ft),Ct=P.polygon(ut.map(X=>[X.x,X.y]),E),m.insert(()=>Ct).attr("class","divider")}if(D){const et=B+v+M+w;ut=Mr(et,C.height+N,et,A+N,ft),Ct=P.polygon(ut.map(X=>[X.x,X.y]),E),m.insert(()=>Ct).attr("class","divider")}for(const et of k){const X=C.height+N+et;ut=Mr(w,X,$+w,X,ft),Ct=P.polygon(ut.map(St=>[St.x,St.y]),E),m.insert(()=>Ct).attr("class","divider")}if(J(t,dt),y&&t.look!=="handDrawn")if(i!=null&&nb.has(i))m.selectAll("path").attr("style",y);else{const et=y.split(";"),X=(ne=et==null?void 0:et.filter(St=>St.includes("stroke")))==null?void 0:ne.map(St=>`${St}`).join("; ");m.selectAll("path").attr("style",X??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(et){return G.rect(t,et)},m}p(pl,"erBox");async function Er(e,t,r,i=0,a=0,s=[],o=""){const l=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==an(t)&&(t=an(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const n=l.node().appendChild(await ze(l,t,{width:Ne(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=n.children[0];for(c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=n.getBBox();if(We(r.htmlLabels)){const c=n.children[0];c.style.textAlign="start";const d=ht(n);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}p(Er,"addText");function Mr(e,t,r,i,a){return e===r?[{x:e-a/2,y:t},{x:e+a/2,y:t},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:e,y:t-a/2},{x:e,y:t+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}p(Mr,"lineToPolygon");async function Bg(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let l=null,n=null,h=null,c=null,d=0,g=0,u=0;if(l=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Si(l,{text:`«${b}»`},0),d=l.node().getBBox().height}n=o.insert("g").attr("class","label-group text"),await Si(n,t,0,["font-weight: bolder"]);const y=n.node().getBBox();g=y.height,h=o.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){const k=await Si(h,b,f,[b.parseClassifier()]);f+=k+s}u=h.node().getBBox().height,u<=0&&(u=a/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Si(c,b,m,[b.parseClassifier()]);m+=k+s}let C=o.node().getBBox();if(l!==null){const b=l.node().getBBox();l.attr("transform",`translate(${-b.width/2})`)}return n.attr("transform",`translate(${-y.width/2}, ${d})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${d+g+a*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${d+g+(u?u+a*4:a*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}p(Bg,"textHelper");async function Si(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=vt();let o="useHtmlLabels"in t?t.useHtmlLabels:We(s.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!o&&l.startsWith("\\")&&(l=l.substring(1)),Ai(l)&&(o=!0);const n=await ze(a,Io(yr(l)),{width:Ne(l,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let h,c=1;if(o){const d=n.children[0],g=ht(n);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const y=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(f=>new Promise(m=>{function C(){var b;if(f.style.display="flex",f.style.flexDirection="column",y){const k=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,B=parseInt(k,10)*5+"px";f.style.minWidth=B,f.style.maxWidth=B}else f.style.width="100%";m(f)}p(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.addEventListener("load",C)})))}h=d.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(n).selectAll("tspan").attr("font-weight",""),c=n.children.length;const d=n.children[0];(n.textContent===""||n.textContent.includes("&gt"))&&(d.textContent=l[0]+l.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),l[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=n.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}p(Si,"addText");async function vg(e,t){var P,E;const r=xt(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,o=s,l=t.useHtmlLabels??We(r.htmlLabels)??!0,n=t;n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[];const{shapeSvg:h,bbox:c}=await Bg(e,t,r,l,o),{labelStyles:d,nodeStyles:g}=Q(t);t.labelStyle=d,t.cssStyles=n.styles||"";const u=((P=n.styles)==null?void 0:P.join(";"))||g||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const y=n.members.length===0&&n.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),f=Z.svg(h),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;n.members.length===0&&n.methods.length===0?b+=o:n.members.length>0&&n.methods.length===0&&(b+=o*2);const S=-C/2,B=-b/2;let v=y?s*2:n.members.length===0&&n.methods.length===0?-s:0;k&&(v=s*2);const M=f.rectangle(S-s,B-s-(y?s:n.members.length===0&&n.methods.length===0?-s/2:0),C+2*s,b+2*s+v,m),L=h.insert(()=>M,":first-child");L.attr("class","basic label-container outer-path");const z=L.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(y?s/2:0)||0,I=h.select(".label-group").node().getBBox().height-(y?s/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(y?s/2:0)||0,H=(D+I+B+s-(B-s-(y?s:n.members.length===0&&n.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((F,$,A)=>{var ut,Ct;const w=ht(A[$]),N=w.attr("transform");let V=0;if(N){const Nt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);Nt&&(V=parseFloat(Nt[2]))}let dt=V+B+s-(y?s:n.members.length===0&&n.methods.length===0?-s/2:0);if(w.attr("class").includes("methods-group")){const Lt=Math.max(Y,o/2);k?dt=Math.max(H,D+I+Lt+B+o*2+s)+o*2:dt=D+I+Lt+B+o*4+s}n.members.length===0&&n.methods.length===0&&((ut=r.class)!=null&&ut.hideEmptyMembersBox)&&(n.annotations.length>0?dt=V-o:dt=V),l||(dt-=4);let ft=S;(w.attr("class").includes("label-group")||w.attr("class").includes("annotation-group"))&&(ft=-((Ct=w.node())==null?void 0:Ct.getBBox().width)/2||0,h.selectAll("text").each(function(Lt,Nt,se){window.getComputedStyle(se[Nt]).textAnchor==="middle"&&(ft=0)})),w.attr("transform",`translate(${ft}, ${dt})`)}),n.members.length>0||n.methods.length>0||y){const F=D+I+B+s,$=f.line(z.x,F,z.x+z.width,F+.001,m);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",u)}if(y||n.members.length>0||n.methods.length>0){const F=D+I+Y+B+o*2+s,$=f.line(z.x,k?Math.max(H,F):F,z.x+z.width,(k?Math.max(H,F):F)+.001,m);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",u)}if(n.look!=="handDrawn"&&h.selectAll("path").attr("style",u),L.select(":nth-child(2)").attr("style",u),h.selectAll(".divider").select("path").attr("style",u),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",u),!l){const F=RegExp(/color\s*:\s*([^;]*)/),$=F.exec(u);if($){const A=$[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(d){const A=F.exec(d);if(A){const w=A[0].replace("color","fill");h.selectAll("tspan").attr("style",w)}}}return J(t,L),t.intersect=function(F){return G.rect(t,F)},h}p(vg,"classBox");async function Lg(e,t){var z,D;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const a=t,s=t,o=20,l=20,n="verifyMethod"in t,h=it(t),{themeVariables:c}=xt(),{borderColorArray:d,requirementEdgeLabelBackground:g}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let y;n?y=await Fe(u,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):y=await Fe(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=y;const m=await Fe(u,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=m+l,n){const I=await Fe(u,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=I;const Y=await Fe(u,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=Y;const H=await Fe(u,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=H,await Fe(u,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const I=await Fe(u,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=I,await Fe(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const C=(((z=u.node())==null?void 0:z.getBBox().width)??200)+o,b=(((D=u.node())==null?void 0:D.getBBox().height)??200)+o,k=-C/2,S=-b/2,B=Z.svg(u),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const M=B.rectangle(k,S,C,b,v),L=u.insert(()=>M,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const I=t.colorIndex??0;u.attr("data-color-id",`color-${I%d.length}`)}if(u.selectAll(".label").each((I,Y,H)=>{const P=ht(H[Y]),E=P.attr("transform");let F=0,$=0;if(E){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);V&&(F=parseFloat(V[1]),$=parseFloat(V[2]))}const A=$-b/2;let w=k+o/2;(Y===0||Y===1)&&(w=F),P.attr("transform",`translate(${w}, ${A+o})`)}),f>y+m+l){const I=S+y+m+l;let Y;if(t.look==="neo"){const E=[[k,I],[k+C,I],[k+C,I+.001],[k,I+.001]];Y=B.polygon(E,v)}else Y=B.line(k,I,k+C,I,v);u.insert(()=>Y).attr("class","divider")}return J(t,L),t.intersect=function(I){return G.rect(t,I)},i&&t.look!=="handDrawn"&&(g||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}p(Lg,"requirementBox");async function Fe(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=xt(),o=s.htmlLabels??!0,l=await ze(a,Io(yr(t)),{width:Ne(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let n;if(o){const h=l.children[0],c=ht(l);n=h.getBoundingClientRect(),c.attr("width",n.width),c.attr("height",n.height)}else{const h=l.children[0];for(const c of h.children)i&&c.setAttribute("style",i);n=l.getBBox(),n.height+=6}return a.attr("transform",`translate(${-n.width/2},${-n.height/2+r})`),n.height}p(Fe,"addText");var hb=p(e=>{switch(e){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 Fg(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:a}=Q(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:l,bbox:n,label:h}=await at(e,t,it(t)),c=t.padding||10;let d="",g;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(d=(H=r==null?void 0:r.kanban)==null?void 0:H.ticketBaseUrl.replace("#TICKET#",t.ticket),g=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,f;g?{label:y,bbox:f}=await Os(g,"ticket"in t&&t.ticket||"",u):{label:y,bbox:f}=await Os(l,"ticket"in t&&t.ticket||"",u);const{label:m,bbox:C}=await Os(l,"assigned"in t&&t.assigned||"",u);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,S=Math.max(f.height,C.height)/2,B=Math.max(n.height+b*2,(t==null?void 0:t.height)||0)+S,v=-k/2,M=-B/2;h.attr("transform","translate("+(c-k/2)+", "+(-S-n.height/2)+")"),y.attr("transform","translate("+(c-k/2)+", "+(-S+n.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*s)+", "+(-S+n.height/2)+")");let L;const{rx:z,ry:D}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const P=Z.svg(l),E=K(t,{}),F=z||D?P.path(ir(v,M,k,B,z||0),E):P.rectangle(v,M,k,B,E);L=l.insert(()=>F,":first-child"),L.attr("class","basic label-container").attr("style",I||null)}else{L=l.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",a).attr("rx",z??5).attr("ry",D??5).attr("x",v).attr("y",M).attr("width",k).attr("height",B);const P="priority"in t&&t.priority;if(P){const E=l.append("line"),F=v+2,$=M+Math.floor((z??0)/2),A=M+B-Math.floor((z??0)/2);E.attr("x1",F).attr("y1",$).attr("x2",F).attr("y2",A).attr("stroke-width","4").attr("stroke",hb(P))}}return J(t,L),t.height=B,t.intersect=function(P){return G.rect(t,P)},l}p(Fg,"kanbanItem");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await at(e,t,it(t)),n=s.width+10*o,h=s.height+8*o,c=.15*n,{cssStyles:d}=t,g=s.width+20,u=s.height+20,y=Math.max(n,g),f=Math.max(h,u);l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let m;const C=`M0 0
240
+ a${c},${c} 1 0,0 ${y*.25},${-1*f*.1}
241
+ a${c},${c} 1 0,0 ${y*.25},0
242
+ a${c},${c} 1 0,0 ${y*.25},0
243
+ a${c},${c} 1 0,0 ${y*.25},${f*.1}
244
+
245
+ a${c},${c} 1 0,0 ${y*.15},${f*.33}
246
+ a${c*.8},${c*.8} 1 0,0 0,${f*.34}
247
+ a${c},${c} 1 0,0 ${-1*y*.15},${f*.33}
248
+
249
+ a${c},${c} 1 0,0 ${-1*y*.25},${f*.15}
250
+ a${c},${c} 1 0,0 ${-1*y*.25},0
251
+ a${c},${c} 1 0,0 ${-1*y*.25},0
252
+ a${c},${c} 1 0,0 ${-1*y*.25},${-1*f*.15}
253
+
254
+ a${c},${c} 1 0,0 ${-1*y*.1},${-1*f*.33}
255
+ a${c*.8},${c*.8} 1 0,0 0,${-1*f*.34}
256
+ a${c},${c} 1 0,0 ${y*.1},${-1*f*.33}
257
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(a),k=K(t,{}),S=b.path(C,k);m=a.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",qt(d))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-y/2}, ${-f/2})`),J(t,m),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return W.info("Bang intersect",t,b),G.rect(t,b)},a}p(_g,"bang");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await at(e,t,it(t)),n=s.width+2*o,h=s.height+2*o,c=.15*n,d=.25*n,g=.35*n,u=.2*n,{cssStyles:y}=t;let f;const m=`M0 0
258
+ a${c},${c} 0 0,1 ${n*.25},${-1*n*.1}
259
+ a${g},${g} 1 0,1 ${n*.4},${-1*n*.1}
260
+ a${d},${d} 1 0,1 ${n*.35},${n*.2}
261
+
262
+ a${c},${c} 1 0,1 ${n*.15},${h*.35}
263
+ a${u},${u} 1 0,1 ${-1*n*.15},${h*.65}
264
+
265
+ a${d},${c} 1 0,1 ${-1*n*.25},${n*.15}
266
+ a${g},${g} 1 0,1 ${-1*n*.5},0
267
+ a${c},${c} 1 0,1 ${-1*n*.25},${-1*n*.15}
268
+
269
+ a${c},${c} 1 0,1 ${-1*n*.1},${-1*h*.35}
270
+ a${u},${u} 1 0,1 ${n*.1},${-1*h*.65}
271
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=Z.svg(a),b=K(t,{}),k=C.path(m,b);f=a.insert(()=>k,":first-child"),f.attr("class","basic label-container").attr("style",qt(y))}else f=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),f.attr("transform",`translate(${-n/2}, ${-h/2})`),J(t,f),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return W.info("Cloud intersect",t,C),G.rect(t,C)},a}p(Ag,"cloud");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await at(e,t,it(t)),n=s.width+8*o,h=s.height+2*o,c=5,d=t.look==="neo"?`
272
+ M${-n/2} ${h/2-c}
273
+ v${-h+2*c}
274
+ q0,-${c} ${c},-${c}
275
+ h${n-2*c}
276
+ q${c},0 ${c},${c}
277
+ v${h-c}
278
+ H${-n/2}
279
+ Z
280
+ `:`
281
+ M${-n/2} ${h/2-c}
282
+ v${-h+2*c}
283
+ q0,-${c} ${c},-${c}
284
+ h${n-2*c}
285
+ q${c},0 ${c},${c}
286
+ v${h-2*c}
287
+ q0,${c} ${-c},${c}
288
+ h${-(n-2*c)}
289
+ q${-c},0 ${-c},${-c}
290
+ Z
291
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",h/2).attr("x2",n/2).attr("y2",h/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>l.node()),J(t,g),t.calcIntersect=function(u,y){return G.rect(u,y)},t.intersect=function(u){return G.rect(t,u)},a}p(Eg,"defaultMindmapNode");async function Mg(e,t){const r={padding:t.padding??0};return gl(e,t,r)}p(Mg,"mindmapCircle");var cb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:hg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:og},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:cg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:pg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Mu},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Ou},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:gl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:_g},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Ag},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:ig},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Nu},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Zu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Vu},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:xg},{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:Gu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Iu},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:yg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:wu},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:lg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:gg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ug},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ru},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Wu},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Fu},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:_u},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Au},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ku},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Tg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:qu},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Cg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Qu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Eu},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:$u},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:kg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:wg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Du},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:bg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Pu},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ng},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:eg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Su},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Lu},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:mg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:fg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Sg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ag},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ju}],db=p(()=>{const t=[...Object.entries({state:dg,choice:Bu,note:rg,rectWithTitle:sg,labelRect:Xu,iconSquare:Uu,iconCircle:Hu,icon:zu,iconRounded:Yu,imageSquare:ju,anchor:ku,kanbanItem:Fg,mindmapCircle:Mg,defaultMindmapNode:Eg,classBox:vg,erBox:pl,requirementBox:Lg}),...cb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Og=db();function ub(e){return e in Og}p(ub,"isValidShape");var Qa=new Map;async function $g(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Og[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return i.attr("data-look",qt(t.look)),t.tooltip&&a.attr("title",t.tooltip),Qa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p($g,"insertNode");var _T=p((e,t)=>{Qa.set(t.id,e)},"setNodeElem"),AT=p(()=>{Qa.clear()},"clear"),ET=p(e=>{const t=Qa.get(e.id);W.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),gb=p((e,t,r,i,a,s=!1,o)=>{t.arrowTypeStart&&Gn(e,"start",t.arrowTypeStart,r,i,a,s,o),t.arrowTypeEnd&&Gn(e,"end",t.arrowTypeEnd,r,i,a,s,o)},"addEdgeMarkers"),pb={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},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}},fb=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Gn=p((e,t,r,i,a,s,o=!1,l)=>{var y;const n=pb[r],h=n&&fb.includes(n.type);if(!n){W.warn(`Unknown arrow type: ${r}`);return}const c=n.type,u=`${a}_${s}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(l&&l.trim()!==""){const f=l.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${f}`;if(!document.getElementById(m)){const C=document.getElementById(u);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",l),n.fill&&S.setAttribute("fill",l)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),mb=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=xt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Na=new Map,Ht=new Map,MT=p(()=>{Na.clear(),Ht.clear()},"clear"),Ci=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),yb=p(async(e,t)=>{const r=xt();let i=ee(r);const{labelStyles:a}=Q(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),l=t.labelType==="markdown",h=await ze(e,t.label,{style:Ci(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:l,width:l?void 0:void 0},r);o.node().appendChild(h),W.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],y=ht(h);c=u.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{const u=ht(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}o.attr("transform",gi(d,i)),Na.set(t.id,s),t.width=c.width,t.height=c.height;let g;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(y,t.startLabelLeft,Ci(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",gi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=u,wi(g,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(y,t.startLabelRight,Ci(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",gi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=u,wi(g,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(u,t.endLabelLeft,Ci(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",gi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=u,wi(g,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(u,t.endLabelRight,Ci(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",gi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=u,wi(g,t.endLabelRight)}return h},"insertEdgeLabel");function wi(e,t){ee(xt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(wi,"setTerminalWidth");var Cb=p((e,t)=>{W.debug("Moving label abc88 ",e.id,e.label,Na.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:a}=tl(i);if(e.label){const s=Na.get(e.id);let o=e.x,l=e.y;if(r){const n=ye.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",l,") to (",n.x,",",n.y,") abc88"),t.updatedPath&&(o=n.x,l=n.y)}s.attr("transform",`translate(${o}, ${l+a/2})`)}if(e.startLabelLeft){const s=Ht.get(e.id).startLeft;let o=e.x,l=e.y;if(r){const n=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=n.x,l=n.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){const s=Ht.get(e.id).startRight;let o=e.x,l=e.y;if(r){const n=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=n.x,l=n.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){const s=Ht.get(e.id).endLeft;let o=e.x,l=e.y;if(r){const n=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=n.x,l=n.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){const s=Ht.get(e.id).endRight;let o=e.x,l=e.y;if(r){const n=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=n.x,l=n.y}s.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),xb=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,l=e.height/2;return a>=o||s>=l},"outsideNode"),bb=p((e,t,r)=>{W.debug(`intersection calc abc89:
292
+ outsidePoint: ${JSON.stringify(t)}
293
+ insidePoint : ${JSON.stringify(r)}
294
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let l=r.x<t.x?o-s:o+s;const n=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*n){let d=r.y<t.y?t.y-n-a:a-n-t.y;l=c*d/h;const g={x:r.x<t.x?r.x+l:r.x-c+l,y:r.y<t.y?r.y+h-d:r.y-h+d};return l===0&&(g.x=t.x,g.y=t.y),c===0&&(g.x=t.x),h===0&&(g.y=t.y),W.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${l}`,g),g}else{r.x<t.x?l=t.x-o-i:l=i-o-t.x;let d=h*l/c,g=r.x<t.x?r.x+c-l:r.x-c+l,u=r.y<t.y?r.y+d:r.y-d;return W.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${l}`,{_x:g,_y:u}),l===0&&(g=t.x,u=t.y),c===0&&(g=t.x),h===0&&(u=t.y),{x:g,y:u}}},"intersection"),Xn=p((e,t)=>{W.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(W.info("abc88 checking point",s,t),!xb(t,s)&&!a){const o=bb(t,i,s);W.debug("abc88 inside",s,i,o),W.debug("abc88 intersection",o,t);let l=!1;r.forEach(n=>{l=l||n.x===o.x&&n.y===o.y}),r.some(n=>n.x===o.x&&n.y===o.y)?W.warn("abc88 no intersect",o,r):r.push(o),a=!0}else W.warn("abc88 outside",s,i),i=s,a||r.push(s)}),W.debug("returning points",r),r},"cutPathAtIntersect");function Ig(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Ig,"extractCornerPoints");var Vn=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),kb=p(function(e){const{cornerPointPositions:t}=Ig(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],l=Vn(a,o,5),n=Vn(s,o,5),h=n.x-l.x,c=n.y-l.y;r.push(l);const d=Math.sqrt(2)*2;let g={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){W.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const u=5;o.x===l.x?g={x:h<0?l.x-u+d:l.x+u-d,y:c<0?l.y-d:l.y+d}:g={x:h<0?l.x-d:l.x+d,y:c<0?l.y-u+d:l.y+u-d}}else W.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(g,n)}else r.push(e[i]);return r},"fixCorners"),Tb=p((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,l=Math.floor(i/o),n=Array(l).fill(`${a} ${s}`).join(" ");return`0 ${t} ${n} ${r}`},"generateDashArray"),Sb=p(function(e,t,r,i,a,s,o,l=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:n}=xt();let h=t.points,c=!1;const d=a;var g=s;const u=[];for(const A in t.cssCompiledStyles)Od(A)||u.push(t.cssCompiledStyles[A]);W.debug("UIO intersect check",t.points,g.x,d.x),g.intersect&&d.intersect&&!l&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),W.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],g,g.intersect(h[h.length-1])),h.push(g.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(W.info("to cluster abc88",r.get(t.toCluster)),h=Xn(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(W.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Xn(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=h.filter(A=>!Number.isNaN(A.y));const m=mb(t.curve);m!=="rounded"&&(f=kb(f));let C=na;switch(m){case"linear":C=na;break;case"basis":C=Ps;break;case"cardinal":C=hh;break;case"bumpX":C=dh;break;case"bumpY":C=ch;break;case"catmullRom":C=nh;break;case"monotoneX":C=lh;break;case"monotoneY":C=oh;break;case"natural":C=sh;break;case"step":C=ah;break;case"stepAfter":C=ih;break;case"stepBefore":C=rh;break;case"rounded":C=na;break;default:C=Ps}const{x:b,y:k}=mC(t),S=df().x(b).y(k).curve(C);let B;switch(t.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(t.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let v,M=m==="rounded"?Dg(Pg(f,t),5):S(f);const L=Array.isArray(t.style)?t.style:[t.style];let z=L.find(A=>A==null?void 0:A.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let I=!1;if(t.look==="handDrawn"){const A=Z.svg(e);Object.assign([],f);const w=A.path(M,{roughness:.3,seed:n});B+=" transition",v=ht(w).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",L?L.reduce((V,dt)=>V+";"+dt,""):"");let N=v.attr("d");v.attr("d",N),e.node().appendChild(v.node())}else{const A=u.join(";"),w=L?L.reduce((Ct,Lt)=>Ct+Lt+";",""):"",N=(A?A+";"+w+";":w)+";"+(L?L.reduce((Ct,Lt)=>Ct+";"+Lt,""):"");v=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",N),z=($=N.match(/stroke:([^;]+)/))==null?void 0:$[1],I=t.animate===!0||!!t.animation||A.includes("animation");const V=v.node(),dt=typeof V.getTotalLength=="function"?V.getTotalLength():0,ft=hn[t.arrowTypeStart]||0,ut=hn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const Lt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Tb(dt,ft,ut):`0 ${ft} ${dt-ft-ut} ${ut}`}; stroke-dashoffset: 0;`;v.attr("style",Lt+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",y),v.attr("data-look",qt(t.look)),t.showPoints&&f.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",t.arrowTypeStart),W.info("arrowTypeEnd",t.arrowTypeEnd);const H=!I&&(t==null?void 0:t.look)==="neo";gb(v,t,Y,o,i,H,z);const P=Math.floor(h.length/2),E=h[P];ye.isLabelCoordinateInPath(E,v.attr("d"))||(c=!0);let F={};return c&&(F.updatedPath=h),F.originalPath=t.points,F},"insertEdge");function Dg(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],l=e[s-1],n=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-l.x,c=o.y-l.y,d=n.x-o.x,g=n.y-o.y,u=Math.hypot(h,c),y=Math.hypot(d,g);if(u<a||y<a){r+=`L${o.x},${o.y}`;continue}const f=h/u,m=c/u,C=d/y,b=g/y,k=f*C+m*b,S=Math.max(-1,Math.min(1,k)),B=Math.acos(S);if(B<a||Math.abs(Math.PI-B)<a){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(B/2),u/2,y/2),M=o.x-f*v,L=o.y-m*v,z=o.x+C*v,D=o.y+b*v;r+=`L${M},${L}`,r+=`Q${o.x},${o.y} ${z},${D}`}}return r}p(Dg,"generateRoundedPath");function To(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(To,"calculateDeltaAndAngle");function Pg(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Gt[t.arrowTypeStart]){const a=Gt[t.arrowTypeStart],s=e[0],o=e[1],{angle:l}=To(s,o),n=a*Math.cos(l),h=a*Math.sin(l);r[0].x=s.x+n,r[0].y=s.y+h}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const a=Gt[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:l}=To(o,s),n=a*Math.cos(l),h=a*Math.sin(l);r[i-1].x=s.x-n,r[i-1].y=s.y-h}return r}p(Pg,"applyMarkerOffsetsToPoints");var wb=p((e,t,r,i)=>{t.forEach(a=>{Gb[a](e,r,i)})},"insertMarkers"),Bb=p((e,t,r)=>{W.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).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"),vb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).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"),Lb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).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"),Fb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).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"),_b=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).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"),Ab=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).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"),Eb=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).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"),Mb=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).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),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).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"),Ob=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),$b=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{transitionColor:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-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",`${s}`)},"barbNeo"),Ib=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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"),Db=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Pb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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"),Rb=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),qb=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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",`${s}`)},"only_one_neo"),Nb=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),Wb=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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",`${s}`)},"one_or_more_neo"),zb=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),Hb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
295
+ L20,10
296
+ M20,10
297
+ L0,20`)},"requirement_arrow"),Yb=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
298
+ L20,10
299
+ M20,10
300
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Ub=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),jb=p((e,t,r)=>{const i=vt(),{themeVariables:a}=i,{strokeWidth:s}=a,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),Gb={extension:Bb,composition:vb,aggregation:Lb,dependency:Fb,lollipop:_b,point:Ab,circle:Eb,cross:Mb,barb:Ob,barbNeo:$b,only_one:Ib,zero_or_one:Db,one_or_more:Pb,zero_or_more:Rb,only_one_neo:qb,zero_or_one_neo:Nb,one_or_more_neo:Wb,zero_or_more_neo:zb,requirement_arrow:Hb,requirement_contains:Ub,requirement_arrow_neo:Yb,requirement_contains_neo:jb},Xb=wb,Vb={common:qi,getConfig:vt,insertCluster:jx,insertEdge:Sb,insertEdgeLabel:yb,insertMarkers:Xb,insertNode:$g,interpolateToCurve:Xo,labelHelper:at,log:W,positionEdgeLabel:Cb},Di={},Rg=p(e=>{for(const t of e)Di[t.name]=t},"registerLayoutLoaders"),Zb=p(()=>{Rg([{name:"dagre",loader:p(async()=>await pt(()=>import("./explorer-dagre-BM42HDAG.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await pt(()=>import("./explorer-cose-bilkent-S5V4N54A.js"),__vite__mapDeps([5,6,3,4]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Zb();var OT=p(async(e,t)=>{if(!(e.layoutAlgorithm in Di))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const d=c.domId||c.id;c.domId=`${e.diagramId}-${d}`}const r=Di[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:s}=e.config,{useGradient:o,gradientStart:l,gradientStop:n}=s,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)}return i.render(e,t,Vb,{algorithm:r.algorithm})},"render"),$T=p((e="",{fallback:t="dagre"}={})=>{if(e in Di)return e;if(t in Di)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),fl="comm",qg="rule",Ng="decl",Kb="@media",Qb="@import",Jb="@supports",tk="@namespace",So="@keyframes",Wg="@layer",ek="@scope",rk=Math.abs,_i=String.fromCharCode;function zg(e){return e.trim()}function wo(e,t,r){return e.replace(t,r)}function Dr(e,t){return e.charCodeAt(t)|0}function ei(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function Hg(e){return e.length}function oa(e,t){return t.push(e),e}var Ja=1,ri=1,Yg=0,ue=0,Mt=0,oi="";function ml(e,t,r,i,a,s,o,l){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:Ja,column:ri,length:o,return:"",siblings:l}}function ik(){return Mt}function ak(){return Mt=ue>0?Dr(oi,--ue):0,ri--,Mt===10&&(ri=1,Ja--),Mt}function xe(){return Mt=ue<Yg?Dr(oi,ue++):0,ri++,Mt===10&&(ri=1,Ja++),Mt}function Ke(){return Dr(oi,ue)}function Ca(){return ue}function ts(e,t){return ei(oi,e,t)}function Pi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sk(e){return Ja=ri=1,Yg=_e(oi=e),ue=0,[]}function ok(e){return oi="",e}function Is(e){return zg(ts(ue-1,Bo(e===91?e+2:e===40?e+1:e)))}function lk(e){for(;(Mt=Ke())&&Mt<33;)xe();return Pi(e)>2||Pi(Mt)>3?"":" "}function nk(e,t){for(;--t&&xe()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return ts(e,Ca()+(t<6&&Ke()==32&&xe()==32))}function Bo(e){for(;xe();)switch(Mt){case e:return ue;case 34:case 39:e!==34&&e!==39&&Bo(Mt);break;case 40:e===41&&Bo(e);break;case 92:xe();break}return ue}function hk(e,t){for(;xe()&&e+Mt!==57;)if(e+Mt===84&&Ke()===47)break;return"/*"+ts(t,ue-1)+"*"+_i(e===47?e:xe())}function ck(e){for(;!Pi(Ke());)xe();return ts(e,ue)}function dk(e){return ok(xa("",null,null,null,[""],e=sk(e),0,[0],e))}function xa(e,t,r,i,a,s,o,l,n){for(var h=0,c=0,d=o,g=0,u=0,y=0,f=1,m=1,C=1,b=0,k=0,S="",B=a,v=s,M=i,L=S;m;)switch(y=k,k=xe()){case 40:y!=108&&Dr(L,d-1)==58?(b++,L+="("):L+=Is(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=Is(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=_i(k);break}L+=lk(y);break;case 92:L+=nk(Ca()-1,7);continue;case 47:switch(Ke()){case 42:case 47:oa(uk(hk(xe(),Ca()),t,r,n),n),(Pi(y||1)==5||Pi(Ke()||1)==5)&&_e(L)&&ei(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*f:l[h++]=_e(L)*C;case 125*f:case 59:case 0:if(b>0&&k){L+=_i(k);break}switch(k){case 0:case 125:m=0;case 59+c:C==-1&&(L=wo(L,/\f/g,"")),u>0&&(_e(L)-d||f===0)&&oa(u>32?Kn(L+";",i,r,d-1,n):Kn(wo(L," ","")+";",i,r,d-2,n),n);break;case 59:L+=";";default:if(oa(M=Zn(L,t,r,h,c,a,l,S,B=[],v=[],d,s),s),k===123)if(c===0)xa(L,t,M,M,B,s,d,l,v);else{switch(g){case 99:if(Dr(L,3)===110)break;case 108:if(Dr(L,2)===97)break;default:c=0;case 100:case 109:case 115:}c?xa(e,M,M,i&&oa(Zn(e,M,M,0,0,a,l,S,a,B=[],d,v),v),a,v,d,l,i?B:v):xa(L,M,M,M,[""],v,0,l,v)}}h=c=u=0,f=C=1,S=L="",d=o;break;case 58:d=1+_e(L),u=y;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&ak()==125)continue}switch(L+=_i(k),k*f){case 38:C=c>0?1:(L+="\f",-1);break;case 44:if(b>0)break;l[h++]=(_e(L)-1)*C,C=1;break;case 64:Ke()===45&&(L+=Is(xe())),g=Ke(),c=d=_e(S=L+=ck(Ca())),k++;break;case 45:y===45&&_e(L)==2&&(f=0)}}return s}function Zn(e,t,r,i,a,s,o,l,n,h,c,d){for(var g=a-1,u=a===0?s:[""],y=Hg(u),f=0,m=0,C=0;f<i;++f)for(var b=0,k=ei(e,g+1,g=rk(m=o[f])),S=e;b<y;++b)(S=zg(m>0?u[b]+" "+k:wo(k,/&\f/g,u[b])))&&(n[C++]=S);return ml(e,t,r,a===0?qg:l,n,h,c,d)}function uk(e,t,r,i){return ml(e,t,r,fl,_i(ik()),ei(e,2,-2),0,i)}function Kn(e,t,r,i,a){return ml(e,t,r,Ng,ei(e,0,i),ei(e,i+1,-1),i,a)}function vo(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function gk(e,t,r,i){switch(e.type){case Wg:if(e.children.length)break;case Qb:case tk:case Ng:return e.return=e.return||e.value;case fl:return"";case So:return e.return=e.value+"{"+vo(e.children,i)+"}";case qg:if(!_e(e.value=e.props.join(",")))return""}return _e(r=vo(e.children,i))?e.return=e.value+"{"+r+"}":""}function pk(e){var t=Hg(e);return function(r,i,a,s){for(var o="",l=0;l<t;l++)o+=e[l](r,i,a,s)||"";return o}}var Ug="c4",fk=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),mk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-c4Diagram-AAUBKEIU.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]),import.meta.url);return{id:Ug,diagram:e}},"loader"),yk={id:Ug,detector:fk,loader:mk},Ck=yk,jg="flowchart",xk=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),bk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-I6XJVG4X.js");return{diagram:t}},__vite__mapDeps([9,10,8,3,4,11,12,13]),import.meta.url);return{id:jg,diagram:e}},"loader"),kk={id:jg,detector:xk,loader:bk},Tk=kk,Gg="flowchart-v2",Sk=p((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),wk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-I6XJVG4X.js");return{diagram:t}},__vite__mapDeps([9,10,8,3,4,11,12,13]),import.meta.url);return{id:Gg,diagram:e}},"loader"),Bk={id:Gg,detector:Sk,loader:wk},vk=Bk,Xg="er",Lk=p(e=>/^\s*erDiagram/.test(e),"detector"),Fk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-erDiagram-TEJ5UH35.js");return{diagram:t}},__vite__mapDeps([14,11,3,4,12,13]),import.meta.url);return{id:Xg,diagram:e}},"loader"),_k={id:Xg,detector:Lk,loader:Fk},Ak=_k,Vg="gitGraph",Ek=p(e=>/^\s*gitGraph/.test(e),"detector"),Mk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-gitGraphDiagram-PVQCEYII.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]),import.meta.url);return{id:Vg,diagram:e}},"loader"),Ok={id:Vg,detector:Ek,loader:Mk},$k=Ok,Zg="gantt",Ik=p(e=>/^\s*gantt/.test(e),"detector"),Dk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-ganttDiagram-6RSMTGT7.js");return{diagram:t}},__vite__mapDeps([19,3,4]),import.meta.url);return{id:Zg,diagram:e}},"loader"),Pk={id:Zg,detector:Ik,loader:Dk},Rk=Pk,Kg="info",qk=p(e=>/^\s*info/.test(e),"detector"),Nk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-infoDiagram-5YYISTIA.js");return{diagram:t}},__vite__mapDeps([20,18,3,4]),import.meta.url);return{id:Kg,diagram:e}},"loader"),Wk={id:Kg,detector:qk,loader:Nk},Qg="pie",zk=p(e=>/^\s*pie/.test(e),"detector"),Hk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-pieDiagram-4H26LBE5.js");return{diagram:t}},__vite__mapDeps([21,16,18,3,4]),import.meta.url);return{id:Qg,diagram:e}},"loader"),Yk={id:Qg,detector:zk,loader:Hk},Jg="quadrantChart",Uk=p(e=>/^\s*quadrantChart/.test(e),"detector"),jk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-quadrantDiagram-W4KKPZXB.js");return{diagram:t}},__vite__mapDeps([22,3,4]),import.meta.url);return{id:Jg,diagram:e}},"loader"),Gk={id:Jg,detector:Uk,loader:jk},Xk=Gk,tp="xychart",Vk=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Zk=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-xychartDiagram-2RQKCTM6.js");return{diagram:t}},__vite__mapDeps([23,3,4]),import.meta.url);return{id:tp,diagram:e}},"loader"),Kk={id:tp,detector:Vk,loader:Zk},Qk=Kk,ep="requirement",Jk=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),t1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-requirementDiagram-4Y6WPE33.js");return{diagram:t}},__vite__mapDeps([24,11,3,4,12]),import.meta.url);return{id:ep,diagram:e}},"loader"),e1={id:ep,detector:Jk,loader:t1},r1=e1,rp="sequence",i1=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),a1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-sequenceDiagram-3UESZ5HK.js");return{diagram:t}},__vite__mapDeps([25,8,3,4,17]),import.meta.url);return{id:rp,diagram:e}},"loader"),s1={id:rp,detector:i1,loader:a1},o1=s1,ip="class",l1=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),n1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-classDiagram-4FO5ZUOK.js");return{diagram:t}},__vite__mapDeps([26,27,10,8,3,4,11,12]),import.meta.url);return{id:ip,diagram:e}},"loader"),h1={id:ip,detector:l1,loader:n1},c1=h1,ap="classDiagram",d1=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),u1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-classDiagram-v2-Q7XG4LA2.js");return{diagram:t}},__vite__mapDeps([28,27,10,8,3,4,11,12]),import.meta.url);return{id:ap,diagram:e}},"loader"),g1={id:ap,detector:d1,loader:u1},p1=g1,sp="state",f1=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),m1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-AJRCARHV.js");return{diagram:t}},__vite__mapDeps([29,30,11,3,4,12,1,2]),import.meta.url);return{id:sp,diagram:e}},"loader"),y1={id:sp,detector:f1,loader:m1},C1=y1,op="stateDiagram",x1=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),b1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-v2-BHNVJYJU.js");return{diagram:t}},__vite__mapDeps([31,30,11,3,4,12]),import.meta.url);return{id:op,diagram:e}},"loader"),k1={id:op,detector:x1,loader:b1},T1=k1,lp="journey",S1=p(e=>/^\s*journey/.test(e),"detector"),w1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-journeyDiagram-JHISSGLW.js");return{diagram:t}},__vite__mapDeps([32,10,8,3,4]),import.meta.url);return{id:lp,diagram:e}},"loader"),B1={id:lp,detector:S1,loader:w1},v1=B1,L1=p((e,t,r)=>{W.debug(`rendering svg for syntax error
301
+ `);const i=ny(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),$h(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),np={draw:L1},F1=np,_1={db:{},renderer:np,parser:{parse:p(()=>{},"parse")}},A1=_1,hp="flowchart-elk",E1=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),M1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-I6XJVG4X.js");return{diagram:t}},__vite__mapDeps([9,10,8,3,4,11,12,13]),import.meta.url);return{id:hp,diagram:e}},"loader"),O1={id:hp,detector:E1,loader:M1},$1=O1,cp="timeline",I1=p(e=>/^\s*timeline/.test(e),"detector"),D1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-timeline-definition-PNZ67QCA.js");return{diagram:t}},__vite__mapDeps([33,3,4]),import.meta.url);return{id:cp,diagram:e}},"loader"),P1={id:cp,detector:I1,loader:D1},R1=P1,dp="mindmap",q1=p(e=>/^\s*mindmap/.test(e),"detector"),N1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-mindmap-definition-RKZ34NQL.js");return{diagram:t}},__vite__mapDeps([34,11,3,4,12]),import.meta.url);return{id:dp,diagram:e}},"loader"),W1={id:dp,detector:q1,loader:N1},z1=W1,up="kanban",H1=p(e=>/^\s*kanban/.test(e),"detector"),Y1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-kanban-definition-UN3LZRKU.js");return{diagram:t}},__vite__mapDeps([35,10,3,4]),import.meta.url);return{id:up,diagram:e}},"loader"),U1={id:up,detector:H1,loader:Y1},j1=U1,gp="sankey",G1=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),X1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-sankeyDiagram-5OEKKPKP.js");return{diagram:t}},__vite__mapDeps([36,3,4]),import.meta.url);return{id:gp,diagram:e}},"loader"),V1={id:gp,detector:G1,loader:X1},Z1=V1,pp="packet",K1=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),Q1=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-diagram-LMA3HP47.js");return{diagram:t}},__vite__mapDeps([37,16,18,3,4]),import.meta.url);return{id:pp,diagram:e}},"loader"),J1={id:pp,detector:K1,loader:Q1},fp="radar",t2=p(e=>/^\s*radar-beta/.test(e),"detector"),e2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-diagram-2AECGRRQ.js");return{diagram:t}},__vite__mapDeps([38,16,18,3,4]),import.meta.url);return{id:fp,diagram:e}},"loader"),r2={id:fp,detector:t2,loader:e2},mp="block",i2=p(e=>/^\s*block(-beta)?/.test(e),"detector"),a2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-blockDiagram-GPEHLZMM.js");return{diagram:t}},__vite__mapDeps([39,10,3,4,1,13]),import.meta.url);return{id:mp,diagram:e}},"loader"),s2={id:mp,detector:i2,loader:a2},o2=s2,yp="treeView",l2=p(e=>/^\s*treeView-beta/.test(e),"detector"),n2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-diagram-5GNKFQAL.js");return{diagram:t}},__vite__mapDeps([40,16,17,18,3,4]),import.meta.url);return{id:yp,diagram:e}},"loader"),h2={id:yp,detector:l2,loader:n2},c2=h2,Cp="architecture",d2=p(e=>/^\s*architecture/.test(e),"detector"),u2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-architectureDiagram-3BPJPVTR.js");return{diagram:t}},__vite__mapDeps([41,16,18,3,4,6]),import.meta.url);return{id:Cp,diagram:e}},"loader"),g2={id:Cp,detector:d2,loader:u2},p2=g2,xp="eventmodeling",f2=p(e=>/^\s*eventmodeling/.test(e),"detector"),m2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-diagram-KO2AKTUF.js");return{diagram:t}},__vite__mapDeps([42,16,18,3,4]),import.meta.url);return{id:xp,diagram:e}},"loader"),y2={id:xp,detector:f2,loader:m2},C2=y2,bp="ishikawa",x2=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),b2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-ishikawaDiagram-YF4QCWOH.js");return{diagram:t}},__vite__mapDeps([43,3,4]),import.meta.url);return{id:bp,diagram:e}},"loader"),k2={id:bp,detector:x2,loader:b2},kp="venn",T2=p(e=>/^\s*venn-beta/.test(e),"detector"),S2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-vennDiagram-CIIHVFJN.js");return{diagram:t}},__vite__mapDeps([44,3,4]),import.meta.url);return{id:kp,diagram:e}},"loader"),w2={id:kp,detector:T2,loader:S2},B2=w2,Tp="treemap",v2=p(e=>/^\s*treemap/.test(e),"detector"),L2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-diagram-OG6HWLK6.js");return{diagram:t}},__vite__mapDeps([45,12,16,18,3,4]),import.meta.url);return{id:Tp,diagram:e}},"loader"),F2={id:Tp,detector:v2,loader:L2},Sp="wardley-beta",_2=p(e=>/^\s*wardley-beta/i.test(e),"detector"),A2=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./explorer-wardleyDiagram-YWT4CUSO.js");return{diagram:t}},__vite__mapDeps([46,16,18,3,4]),import.meta.url);return{id:Sp,diagram:e}},"loader"),E2={id:Sp,detector:_2,loader:A2},M2=E2,Qn=!1,es=p(()=>{Qn||(Qn=!0,wa("error",A1,e=>e.toLowerCase().trim()==="error"),wa("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ns($1,z1,p2),Ns(Ck,j1,p1,c1,Ak,Rk,Wk,Yk,r1,o1,vk,Tk,R1,$k,T1,C1,v1,Xk,Z1,J1,Qk,o2,C2,c2,r2,k2,F2,B2,M2))},"addDiagrams"),O2=p(async()=>{W.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(pr).map(async([r,{detector:i,loader:a}])=>{if(a)try{Us(r)}catch{try{const{diagram:s,id:o}=await a();wa(o,s,i)}catch(s){throw W.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete pr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){W.error(`Failed to load ${t.length} external diagrams`);for(const r of t)W.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),$2="graphics-document document";function wp(e,t){e.attr("role",$2),t!==""&&e.attr("aria-roledescription",t)}p(wp,"setA11yDiagramInfo");function Bp(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Bp,"addSVGa11yTitleDescription");var gr,Lo=(gr=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var h,c;const i=vt(),a=Ao(t,i);t=u0(t)+`
302
+ `;try{Us(a)}catch{const d=am(a);if(!d)throw new xh(`Diagram ${a} not found.`);const{id:g,diagram:u}=await d();wa(g,u)}const{db:s,parser:o,renderer:l,init:n}=Us(a);return o.parser&&(o.parser.yy=s),(h=s.clear)==null||h.call(s),n==null||n(i),r.title&&((c=s.setDiagramTitle)==null||c.call(s,r.title)),await o.parse(t),new gr(a,t,s,o,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(gr,"Diagram"),gr),Jn=[],I2=p(()=>{Jn.forEach(e=>{e()}),Jn=[]},"attachFunctions"),D2=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function vp(e){const t=e.match(Ch);if(!t)return{text:e,metadata:{}};let r=fC(t[1],{schema:pC})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(vp,"extractFrontMatter");var P2=p(e=>e.replace(/\r\n?/g,`
303
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),R2=p(e=>{const{text:t,metadata:r}=vp(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),q2=p(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:JC(e),directive:t}},"processDirectives");function yl(e){const t=P2(e),r=R2(t),i=q2(r.text),a=Jo(r.config,i.directive);return e=D2(i.text),{code:e,title:r.title,config:a}}p(yl,"preprocessDiagram");function Lp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Lp,"toBase64");var N2=5e4,W2="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",z2="sandbox",H2="loose",Y2="http://www.w3.org/2000/svg",U2="http://www.w3.org/1999/xlink",j2="http://www.w3.org/1999/xhtml",G2="100%",X2="100%",V2="border:0;margin:0;",Z2="margin:0",K2="allow-top-navigation-by-user-activation allow-popups",Q2='The "iframe" tag is not supported by your browser.',J2=["foreignobject"],tT=["dominant-baseline"];function Cl(e){const t=yl(e);return Ta(),Em(t.config??{}),t}p(Cl,"processAndSetConfigs");async function Fp(e,t){es();try{const{code:r,config:i}=Cl(e);return{diagramType:(await Ap(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Fp,"parse");var th=p((e,t,r=[])=>{const i=wh(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),eT=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const l=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(n=>{pn(n.styles)||l.forEach(h=>{r.insertRule(th(n.id,h,n.styles),r.cssRules.length)}),pn(n.textStyles)||r.insertRule(th(n.id,"tspan",((n==null?void 0:n.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const a=new CSSStyleSheet;a.replaceSync(e.themeCSS),i=Ys(a)+`
304
+ `}else i+=`${e.themeCSS}
305
+ `;return i+Ys(r)},"createCssStyles"),rT=p((e,t)=>vo(dk(`${e}{${t}}`),pk([p(function(i,a,s,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===So)return;i.props=i.props.map(l=>l.startsWith(e)?l:`${e} ${l}`)}else i.type.startsWith("@")&&([...[Kb,Jb,Wg,ek,"@container","@starting-style"],So].includes(i.type)||(W.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=fl))},"addNamespace"),gk])),"compileCSS"),iT=p((e,t,r,i)=>{const a=eT(e,r),s=Zm(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return rT(i,s)},"createUserStyles"),aT=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=yr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),sT=p((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":X2,i=Lp(`<body style="${Z2}">${e}</body>`);return`<iframe style="width:${G2};height:${r};${V2}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${K2}">
306
+ ${Q2}
307
+ </iframe>`},"putIntoIFrame"),eh=p((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Y2);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function Fo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Fo,"sandboxedIframe");var oT=p((e,t,r,i)=>{var a,s,o;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),lT=p(async function(e,t,r){var Y,H,P,E,F,$;es();const i=Cl(t);t=i.code;const a=vt();W.debug(a),t.length>((a==null?void 0:a.maxTextSize)??N2)&&(t=W2);const s=`#${e}`,o="i"+e,l="#"+o,n="d"+e,h="#"+n,c=p(()=>{const w=ht(g?l:h).node();w&&"remove"in w&&w.remove()},"removeTempElements");let d=ht(document.body);const g=a.securityLevel===z2,u=a.securityLevel===H2,y=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const A=Fo(ht(r),o);d=ht(A.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ht(r);eh(d,e,n,`font-family: ${y}`,U2)}else{if(oT(document,e,n,o),g){const A=Fo(ht(document.body),o);d=ht(A.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ht("body");eh(d,e,n)}let f,m;try{f=await Lo.fromText(t,{title:i.title})}catch(A){if(a.suppressErrorRendering)throw c(),A;f=await Lo.fromText("error"),m=A}const C=d.select(h).node(),b=f.type,k=C.firstChild,S=k.firstChild,B=(H=(Y=f.renderer).getClasses)==null?void 0:H.call(Y,t,f),v=iT(a,b,B,s),M=document.createElement("style");M.innerHTML=v,k.insertBefore(M,S);try{await f.renderer.draw(t,e,"11.15.0",f)}catch(A){throw a.suppressErrorRendering?c():F1.draw(t,e,"11.15.0"),A}const L=d.select(`${h} svg`),z=(E=(P=f.db).getAccTitle)==null?void 0:E.call(P),D=($=(F=f.db).getAccDescription)==null?void 0:$.call(F);Ep(b,L,z,D),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",j2);let I=d.select(h).node().innerHTML;if(W.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),I=aT(I,g,We(a.arrowMarkerAbsolute)),g){const A=d.select(h+" svg").node();I=sT(I,A)}else u||(I=Kr.sanitize(I,{ADD_TAGS:J2,ADD_ATTR:tT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(I2(),m)throw m;return c(),{diagramType:b,svg:I,bindFunctions:f.db.bindFunctions}},"render");function _p(e={}){var i;const t=It({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),_m(t),t!=null&&t.theme&&t.theme in Re?t.themeVariables=Re[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Re.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Fm(t):Bh();_o(r.logLevel),es()}p(_p,"initialize");var Ap=p((e,t={})=>{const{code:r}=yl(e);return Lo.fromText(r,t)},"getDiagramFromText");function Ep(e,t,r,i){wp(t,e),Bp(t,r,i,t.attr("id"))}p(Ep,"addA11yInfo");var xr=Object.freeze({render:lT,parse:Fp,getDiagramFromText:Ap,initialize:_p,getConfig:vt,setConfig:vh,getSiteConfig:Bh,updateSiteConfig:Am,reset:p(()=>{Ta()},"reset"),globalReset:p(()=>{Ta(Qr)},"globalReset"),defaultConfig:Qr});_o(vt().logLevel);Ta(vt());var nT=p((e,t,r)=>{W.warn(e),Qo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Mp=p(async function(e={querySelector:".mermaid"}){try{await hT(e)}catch(t){if(Qo(t)&&W.error(t.str),le.parseError&&le.parseError(t),!e.suppressErrors)throw W.error("Use the suppressErrors option to suppress these errors"),t}},"run"),hT=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=xr.getConfig();W.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");W.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(W.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),xr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const l=[];for(const n of Array.from(a)){if(W.info("Rendering diagram: "+n.id),n.getAttribute("data-processed"))continue;n.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;o=n.innerHTML,o=jd(ye.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=ye.detectInit(o);c&&W.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:g}=await Dp(h,o,n);n.innerHTML=d,e&&await e(h),g&&g(n)}catch(d){nT(d,l,le.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),Op=p(function(e){xr.initialize(e)},"initialize"),cT=p(async function(e,t,r){W.warn("mermaid.init is deprecated. Please use run instead."),e&&Op(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Mp(i)},"init"),dT=p(async(e,{lazyLoad:t=!0}={})=>{es(),Ns(...e),t===!1&&await O2()},"registerExternalDiagrams"),$p=p(function(){if(le.startOnLoad){const{startOnLoad:e}=xr.getConfig();e&&le.run().catch(t=>W.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",$p,!1);var uT=p(function(e){le.parseError=e},"setParseErrorHandler"),Wa=[],Ds=!1,Ip=p(async()=>{if(!Ds){for(Ds=!0;Wa.length>0;){const e=Wa.shift();if(e)try{await e()}catch(t){W.error("Error executing queue",t)}}Ds=!1}},"executeQueue"),gT=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((s,o)=>{xr.parse(e,t).then(l=>{s(l),r(l)},l=>{var n;W.error("Error parsing",l),(n=le.parseError)==null||n.call(le,l),o(l),i(l)})}),"performCall");Wa.push(a),Ip().catch(i)}),"parse"),Dp=p((e,t,r)=>new Promise((i,a)=>{const s=p(()=>new Promise((o,l)=>{xr.render(e,t,r).then(n=>{o(n),i(n)},n=>{var h;W.error("Error parsing",n),(h=le.parseError)==null||h.call(le,n),l(n),a(n)})}),"performCall");Wa.push(s),Ip().catch(a)}),"render"),pT=p(()=>Object.keys(pr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),le={startOnLoad:!0,mermaidAPI:xr,parse:gT,render:Dp,init:cT,run:Mp,registerExternalDiagrams:dT,registerLayoutLoaders:Rg,initialize:Op,parseError:void 0,contentLoaded:$p,setParseErrorHandler:uT,detectType:Ao,registerIconPacks:xx,getRegisteredDiagramsMetadata:pT},fT=le;/*! Check if previously processed *//*!
308
+ * Wait for document loaded before starting the execution
309
+ */const IT=Object.freeze(Object.defineProperty({__proto__:null,default:fT},Symbol.toStringTag,{value:"Module"}));export{Ih as $,kT as A,Qe as B,Ae as C,mf as D,vt as E,sy as F,Jo as G,Sh as H,a0 as I,pC as J,ny as K,ja as L,cm as M,kx as N,Ai as O,xT as P,qm as Q,Oh as R,an as S,i0 as T,lt as U,ke as V,R as W,q as X,Gm as Y,VC as Z,p as _,Jm as a,jx as a0,$g as a1,ET as a2,Ko as a3,Z as a4,Q as a5,Od as a6,jo as a7,Yo as a8,pa as a9,tl as aA,Fd as aB,yr as aC,Md as aD,ph as aE,Xb as aF,AT as aG,MT as aH,FT as aI,J as aJ,_T as aK,Sb as aL,Cb as aM,yb as aN,CT as aO,Hi as aP,xx as aQ,Cx as aR,ff as aS,IT as aT,OC as aa,MC as ab,EC as ac,AC as ad,TC as ae,Cd as af,BC as ag,kC as ah,FC as ai,xd as aj,wC as ak,DC as al,IC as am,$C as an,RC as ao,PC as ap,SC as aq,bd as ar,_C as as,LC as at,vC as au,kd as av,mC as aw,ee as ax,ze as ay,gi as az,Qm as b,xt as c,$h as d,It as e,Ne as f,ey as g,be as h,xC as i,qi as j,Ad as k,W as l,Ri as m,bT as n,$T as o,ry as p,iy as q,OT as r,ty as s,fC as t,ye as u,ub as v,l0 as w,TT as x,Kr as y,Km as z};