@qwen-code/qwen-code 0.19.3 → 0.19.4-nightly.20260702.46814e4f1

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 (308) hide show
  1. package/bundled/loop/SKILL.md +22 -3
  2. package/bundled/loop/SKILL.test.ts +20 -0
  3. package/bundled/loop/autonomous-loop.test.ts +59 -0
  4. package/bundled/loop/autonomous-loop.ts +102 -0
  5. package/bundled/loop/loop-task-file.test.ts +1064 -0
  6. package/bundled/loop/loop-task-file.ts +404 -0
  7. package/bundled/loop/loop-tick-resolver.test.ts +906 -0
  8. package/bundled/loop/loop-tick-resolver.ts +416 -0
  9. package/bundled/qc-helper/SKILL.md +12 -5
  10. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  11. package/bundled/qc-helper/docs/configuration/settings.md +62 -32
  12. package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
  13. package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
  14. package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
  15. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  16. package/bundled/qc-helper/docs/features/code-review.md +17 -61
  17. package/bundled/qc-helper/docs/features/commands.md +42 -40
  18. package/bundled/qc-helper/docs/features/headless.md +19 -18
  19. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  20. package/bundled/qc-helper/docs/features/mcp.md +3 -1
  21. package/bundled/qc-helper/docs/features/memory.md +1 -1
  22. package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
  23. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  24. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
  25. package/bundled/qc-helper/docs/qwen-serve.md +53 -0
  26. package/bundled/qc-helper/docs/support/troubleshooting.md +11 -0
  27. package/bundled/review/DESIGN.md +21 -26
  28. package/bundled/review/SKILL.md +45 -129
  29. package/chunks/MaxSizedBox-GHGRQ2OS.js +69 -0
  30. package/chunks/{StandaloneSessionPicker-Z52JTYST.js → StandaloneSessionPicker-G7YTTM27.js} +49 -42
  31. package/chunks/{acpAgent-7RZUOWOM.js → acpAgent-SDOILBSU.js} +1325 -365
  32. package/chunks/{agent-4FG7WTHJ.js → agent-NTSXGV4L.js} +31 -25
  33. package/chunks/agent-headless-WYURMSAB.js +62 -0
  34. package/chunks/{anthropicContentGenerator-PFITVL7Y.js → anthropicContentGenerator-WL3LJOUB.js} +110 -31
  35. package/chunks/{artifact-tool-D2X7G3C3.js → artifact-tool-W76WC2JX.js} +3 -3
  36. package/chunks/{askUserQuestion-UGETICJQ.js → askUserQuestion-J3P6TH3V.js} +2 -2
  37. package/chunks/bridge-AMOL4W4P.js +73 -0
  38. package/chunks/{ca-IUFWESZL.js → ca-HCMB2I54.js} +10 -9
  39. package/chunks/channel-worker-supervisor-C3IB63V7.js +659 -0
  40. package/chunks/{chunk-STUWFKGD.js → chunk-26JIREA5.js} +466 -543
  41. package/chunks/{chunk-SLNKLLEO.js → chunk-2MRV62AU.js} +37 -8
  42. package/chunks/{chunk-ODLIHNOY.js → chunk-2U4HUMOL.js} +1 -1
  43. package/chunks/{chunk-CKQA6AWF.js → chunk-4D73HUOP.js} +1 -1
  44. package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
  45. package/chunks/{chunk-J7FA27RO.js → chunk-5LKL3PAU.js} +3 -3
  46. package/chunks/chunk-5P5XGNYH.js +93 -0
  47. package/chunks/{chunk-UFLGERMB.js → chunk-6JE32BRB.js} +178 -124
  48. package/chunks/{chunk-FKAVULLM.js → chunk-75AVTQJ2.js} +74 -10
  49. package/chunks/{chunk-I2LYBGNI.js → chunk-7IOMIYOE.js} +1 -1
  50. package/chunks/{chunk-4LUZAKMK.js → chunk-7KXAGQJ2.js} +1 -1
  51. package/chunks/{chunk-BXSHL2SF.js → chunk-7LUOQJ3D.js} +1 -1
  52. package/chunks/{chunk-YAINVQ3Q.js → chunk-A5OPLHFM.js} +18693 -17055
  53. package/chunks/chunk-AHNXYU4O.js +24 -0
  54. package/chunks/{chunk-UX4SGCGN.js → chunk-AVQDCKNF.js} +96 -22
  55. package/chunks/{chunk-HYCC3XM3.js → chunk-B236XPGF.js} +1 -1
  56. package/chunks/chunk-B6SZLQAZ.js +3523 -0
  57. package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
  58. package/chunks/chunk-BPFJQGY7.js +193 -0
  59. package/chunks/{chunk-SKQZZVAV.js → chunk-BZHLWC6T.js} +2 -2
  60. package/chunks/{chunk-U3KSMM7G.js → chunk-D5KISTLW.js} +339 -383
  61. package/chunks/{chunk-GT2FGICD.js → chunk-DE7YXUR7.js} +1 -1
  62. package/chunks/{chunk-BUUQ5HPX.js → chunk-DG573EOO.js} +1 -1
  63. package/chunks/{chunk-VVLOGDB6.js → chunk-DX3TKXNT.js} +2 -2
  64. package/chunks/chunk-E5A7LHNN.js +51 -0
  65. package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
  66. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  67. package/chunks/{chunk-PDE7CSDS.js → chunk-FXKI7OW6.js} +2 -2
  68. package/chunks/{chunk-F3ZYSEY6.js → chunk-FY4TT4L4.js} +3 -3
  69. package/chunks/{chunk-QLDPRILK.js → chunk-G7OQ3RFJ.js} +3 -3
  70. package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
  71. package/chunks/{chunk-KMGMKW5Q.js → chunk-GLPV75ES.js} +9 -3
  72. package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
  73. package/chunks/{chunk-CNLEDYE3.js → chunk-H6TNLOLM.js} +5 -5
  74. package/chunks/{chunk-JVHEVCAU.js → chunk-HLW4EGKR.js} +31 -6
  75. package/chunks/{chunk-I4H7PRWQ.js → chunk-HTWHAN44.js} +1 -1
  76. package/chunks/{chunk-QE6KJYLT.js → chunk-IPYE5BIS.js} +123 -25
  77. package/chunks/{chunk-EJYJYJZ2.js → chunk-IRJWHZWU.js} +3 -70
  78. package/chunks/{chunk-EDMZZFDU.js → chunk-J3YPTTNL.js} +930 -798
  79. package/chunks/{chunk-GGBIN5K7.js → chunk-JGAJMIJZ.js} +1 -1
  80. package/chunks/{chunk-N4EJFBN5.js → chunk-JVLP5US5.js} +427 -263
  81. package/chunks/{chunk-R5OP2ATH.js → chunk-JZG7VB6C.js} +11 -11
  82. package/chunks/{chunk-QI7GOGJR.js → chunk-KKQWC6WS.js} +1 -1
  83. package/chunks/{chunk-ADCIHOQZ.js → chunk-KX5QZRW2.js} +142 -30
  84. package/chunks/{chunk-SBBN4BWR.js → chunk-L7OJ3ZO3.js} +1 -1
  85. package/chunks/{chunk-NDOC6M5S.js → chunk-L7QPM2YD.js} +2 -2
  86. package/chunks/{chunk-BVSVIN45.js → chunk-LKWAVAB5.js} +3 -3
  87. package/chunks/{chunk-T4T2FNV4.js → chunk-LOW52WYZ.js} +2 -2
  88. package/chunks/{chunk-4QK3O43S.js → chunk-LU7BIVWC.js} +4 -4
  89. package/chunks/{chunk-ZP6UKOPB.js → chunk-LWGLBVWA.js} +1 -1
  90. package/chunks/{chunk-L7OKCI7T.js → chunk-M7BLWURA.js} +15 -1
  91. package/chunks/{chunk-PR32FRT6.js → chunk-MIM62IXS.js} +3 -3
  92. package/chunks/{chunk-RD6YJJJ6.js → chunk-MOUXUCXQ.js} +1 -1
  93. package/chunks/{chunk-VBZ452JT.js → chunk-MSNGFH6L.js} +494 -114
  94. package/chunks/{chunk-BX5YO7UW.js → chunk-MTNTVOJR.js} +542 -370
  95. package/chunks/chunk-MX2YXRER.js +44 -0
  96. package/chunks/chunk-NIOPRZNN.js +27 -0
  97. package/chunks/{chunk-SMYQZVZ3.js → chunk-NOGSPTLJ.js} +1 -1
  98. package/chunks/{chunk-DDMOU62Q.js → chunk-NPQWQYU6.js} +1 -1
  99. package/chunks/{chunk-MNF6S5PR.js → chunk-P5THQV6A.js} +4 -4
  100. package/chunks/{chunk-6V4NZFUS.js → chunk-PCYOT4PK.js} +5 -5
  101. package/chunks/{chunk-CF6BB3LT.js → chunk-PPFWEV7G.js} +10 -1
  102. package/chunks/{chunk-FXKVLFFY.js → chunk-PSFDB5FZ.js} +3 -3
  103. package/chunks/{chunk-XJYUPHRC.js → chunk-QOMAHFYI.js} +3 -3
  104. package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
  105. package/chunks/{chunk-RRFZXMYP.js → chunk-QZDBHNMV.js} +691 -164
  106. package/chunks/{chunk-S7AKE7HL.js → chunk-R6RI2HIC.js} +63 -9
  107. package/chunks/{chunk-HZT4UCFB.js → chunk-RB7S52NJ.js} +4 -4
  108. package/chunks/{chunk-J33ZR6OJ.js → chunk-RK22ACPP.js} +16 -16
  109. package/chunks/chunk-RM3PGSGL.js +66 -0
  110. package/chunks/chunk-RNBYOUGV.js +42 -0
  111. package/chunks/chunk-S6RLAIUR.js +23 -0
  112. package/chunks/{chunk-3TV3HUWZ.js → chunk-SCYK2YLI.js} +81 -30
  113. package/chunks/{chunk-HPZTOP4I.js → chunk-SEKRT4SD.js} +133 -23
  114. package/chunks/chunk-SEZC2725.js +36 -0
  115. package/chunks/chunk-SIUQ3YYX.js +78 -0
  116. package/chunks/{chunk-O2VBQ3Y2.js → chunk-SJBIFVD2.js} +2 -2
  117. package/chunks/chunk-SYCJMSIJ.js +82 -0
  118. package/chunks/{chunk-JE5FVRPC.js → chunk-T22H4V4R.js} +48 -23
  119. package/chunks/{chunk-3227DZO4.js → chunk-T42ACHFI.js} +1 -1
  120. package/chunks/{chunk-UO5GVXQE.js → chunk-TENOUWY2.js} +3 -3
  121. package/chunks/{chunk-JOLIREYR.js → chunk-TOAUDIS7.js} +1 -1
  122. package/chunks/{chunk-QNKBEJO2.js → chunk-UA6XBZT7.js} +2776 -1289
  123. package/chunks/{chunk-O75BHFQW.js → chunk-UQTYK5SS.js} +2 -2
  124. package/chunks/{chunk-Y6YMRS3U.js → chunk-UY2TCIZS.js} +17 -3
  125. package/chunks/{chunk-FNJ7BDPH.js → chunk-UY7ZAYTY.js} +10 -7
  126. package/chunks/{chunk-UYT3MWEB.js → chunk-UYHWM24C.js} +30 -2
  127. package/chunks/{chunk-SMXULRAN.js → chunk-VXGPYF7U.js} +1 -1
  128. package/chunks/{chunk-BTLJ2MF5.js → chunk-W7CG5HPC.js} +3 -3
  129. package/chunks/{chunk-JJXWTVSK.js → chunk-XHZKDN7M.js} +34 -1
  130. package/chunks/{chunk-K5XU6E4T.js → chunk-XKSCTXPK.js} +2 -2
  131. package/chunks/chunk-Y4LITCRB.js +367 -0
  132. package/chunks/chunk-YHTNWGRR.js +239 -0
  133. package/chunks/{chunk-BKXBARJZ.js → chunk-YPCPZSZB.js} +1 -1
  134. package/chunks/{chunk-QWFNTRH4.js → chunk-YSM24SCE.js} +1 -1
  135. package/chunks/chunk-YTFBURQD.js +313 -0
  136. package/chunks/{chunk-NL4C3H6C.js → chunk-YXK4GPYO.js} +1 -1
  137. package/chunks/{chunk-RYLJU2DY.js → chunk-ZN5T4BHI.js} +1 -1
  138. package/chunks/{computer-use-JGB36FDW.js → computer-use-MTSVPLPY.js} +34 -28
  139. package/chunks/contextCommand-VGJ3BPTK.js +67 -0
  140. package/chunks/{cron-create-SKEY55RG.js → cron-create-6YTCOX6P.js} +4 -4
  141. package/chunks/{cron-delete-I3NAT32Z.js → cron-delete-E3NIFSUK.js} +4 -4
  142. package/chunks/{cron-list-6XRRL6TH.js → cron-list-Q64MNQNE.js} +4 -4
  143. package/chunks/daemon-EEB2RYOL.js +8453 -0
  144. package/chunks/daemon-status-provider-H5SNMK42.js +71 -0
  145. package/chunks/{de-EOW5PVHF.js → de-PLLFDERI.js} +10 -9
  146. package/chunks/{dist-NHEYYB2B.js → dist-ADMIQGHI.js} +2 -2
  147. package/chunks/{dist-J37VXPLD.js → dist-BCQ7INM7.js} +40 -15
  148. package/chunks/{dist-663NZ6MI.js → dist-KNZFCY5F.js} +116 -11
  149. package/chunks/{dist-LB6OGPVM.js → dist-LHUWC3K6.js} +26 -5
  150. package/chunks/{dist-PQPZ5Q4N.js → dist-WBBZ76JZ.js} +20 -9
  151. package/chunks/{earlyInputCapture-44RISVVJ.js → earlyInputCapture-U4ZIQSQU.js} +32 -26
  152. package/chunks/{edit-NN6GM5DT.js → edit-SYIQ2KBI.js} +41 -38
  153. package/chunks/{en-HPWEJBTR.js → en-M4EBUBNU.js} +32 -10
  154. package/chunks/{enter-worktree-PB3O2C7D.js → enter-worktree-HPPOO244.js} +31 -25
  155. package/chunks/{enterPlanMode-YQFNNSUA.js → enterPlanMode-56YYO52U.js} +41 -25
  156. package/chunks/{errors-LS7XU5DZ.js → errors-EO4SXCFP.js} +33 -27
  157. package/chunks/{exit-worktree-E2FTNSBK.js → exit-worktree-UDM7E6XH.js} +31 -25
  158. package/chunks/{exitPlanMode-GLYK2BUB.js → exitPlanMode-M6P3AWLJ.js} +149 -33
  159. package/chunks/{fast-path-WQ6M7LI7.js → fast-path-42P4QYWI.js} +33 -14
  160. package/chunks/{fast-path-settings-OAGU3X5H.js → fast-path-settings-UQLRFDQP.js} +2 -2
  161. package/chunks/{fr-BN5NKSAC.js → fr-MBMNQSQ6.js} +10 -9
  162. package/chunks/{gemini-2YFLVA2M.js → gemini-NRLXS5J7.js} +84 -70
  163. package/chunks/{geminiContentGenerator-XV6SV6CD.js → geminiContentGenerator-DLJPYYPA.js} +41 -5
  164. package/chunks/{glob-2H6CDDMK.js → glob-JPY3F74Y.js} +31 -25
  165. package/chunks/{grep-VXIUXM3C.js → grep-HW23YES5.js} +31 -25
  166. package/chunks/initializer-HWOZTC4A.js +67 -0
  167. package/chunks/{ja-7DEUB2TS.js → ja-HFV5QCHR.js} +10 -9
  168. package/chunks/{keychain-token-storage-YLMDLKXT.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
  169. package/chunks/list-OZGAGRDG.js +71 -0
  170. package/chunks/loadedSettingsAdapter-RUTZVVIA.js +66 -0
  171. package/chunks/{loop-wakeup-CITGGQHA.js → loop-wakeup-G2EHBRGR.js} +5 -5
  172. package/chunks/{ls-R5WP4BGZ.js → ls-IDHUVSAG.js} +4 -4
  173. package/chunks/{lsp-GSICJMMW.js → lsp-FSRYXGFT.js} +2 -2
  174. package/chunks/{monitor-HKLRS2HQ.js → monitor-QVWEIXU3.js} +33 -26
  175. package/chunks/nonInteractiveCli-RV2WYPML.js +109 -0
  176. package/chunks/{notebook-edit-Y6SKSGTT.js → notebook-edit-B26W3FFH.js} +37 -34
  177. package/chunks/{openaiContentGenerator-J7G2FYJT.js → openaiContentGenerator-6TH7AZGQ.js} +15 -13
  178. package/chunks/pidfile-KW2QQJZI.js +73 -0
  179. package/chunks/{pt-TNZRNLQB.js → pt-2THT3YHA.js} +10 -9
  180. package/chunks/{qwenContentGenerator-5XIEM5GV.js → qwenContentGenerator-5IQAC7RN.js} +33 -27
  181. package/chunks/{qwenOAuth2-AG3PFFLZ.js → qwenOAuth2-LWLA6MQG.js} +5 -4
  182. package/chunks/{read-file-J7D552ZJ.js → read-file-CWFAHOI2.js} +11 -10
  183. package/chunks/{read-mcp-resource-DQQW7H7T.js → read-mcp-resource-PIJF24RO.js} +2 -2
  184. package/chunks/ripGrep-FTZGDKY4.js +60 -0
  185. package/chunks/{ru-NIAUBKCN.js → ru-Z67YJHBG.js} +10 -9
  186. package/chunks/{run-qwen-serve-SGEEVMXD.js → run-qwen-serve-FN2SW5ZI.js} +545 -97
  187. package/chunks/{scheduler-7CQI3S4Q.js → scheduler-BMS23O3I.js} +31 -25
  188. package/chunks/{send-message-EE4TWKVU.js → send-message-33PYFMCT.js} +20 -4
  189. package/chunks/serve-PXFYKL65.js +71 -0
  190. package/chunks/{server-4QMUWXPW.js → server-BRKALJ4F.js} +4132 -1175
  191. package/chunks/{session-NRO7UFOY.js → session-AQMISBP4.js} +205 -64
  192. package/chunks/{settings-SGWRDQSC.js → settings-JCPVUZMB.js} +35 -29
  193. package/chunks/{shell-62ANGIHL.js → shell-POHCRVN2.js} +31 -25
  194. package/chunks/{skill-VWAQAWW6.js → skill-QPEVHS6H.js} +13 -12
  195. package/chunks/spawnChannel-V3QT62TE.js +69 -0
  196. package/chunks/{src-KUV5J5Q2.js → src-IZSP7L6Y.js} +127 -32
  197. package/chunks/{startInteractiveUI-6EYJN3JV.js → startInteractiveUI-63KATISO.js} +16762 -16075
  198. package/chunks/{syntheticOutput-T5YHQ6S2.js → syntheticOutput-YOSWIHDJ.js} +3 -3
  199. package/chunks/{task-create-BLY7RHXX.js → task-create-NHS2NGB3.js} +9 -7
  200. package/chunks/{task-list-3QUYNVYR.js → task-list-5UIB564R.js} +7 -6
  201. package/chunks/{task-stop-U4RATK2V.js → task-stop-HGXZ2VZ3.js} +2 -2
  202. package/chunks/{task-update-U54O7KJX.js → task-update-IYYWUILG.js} +40 -7
  203. package/chunks/{team-create-LPOGCPM7.js → team-create-E5O2F3CA.js} +31 -25
  204. package/chunks/{team-delete-LKBYPASD.js → team-delete-FEKJCU4P.js} +7 -6
  205. package/chunks/team-plan-approval-2TU4YROB.js +202 -0
  206. package/chunks/theme-manager-37KOGPJL.js +64 -0
  207. package/chunks/{todoWrite-OYXKTVYN.js → todoWrite-TKMVZ2HT.js} +4 -4
  208. package/chunks/{tool-search-YPUFJ3ZQ.js → tool-search-4ZTGNSFI.js} +38 -11
  209. package/chunks/{trustedFolders-5B24TMEA.js → trustedFolders-RJ5WXJ6L.js} +32 -26
  210. package/chunks/{validateNonInterActiveAuth-BTDTYOVT.js → validateNonInterActiveAuth-ZWMHZAOK.js} +66 -55
  211. package/chunks/{web-fetch-EEB5LZYU.js → web-fetch-J4PIW36Q.js} +5 -4
  212. package/chunks/{workflow-LAWIW5LI.js → workflow-6PG2PC5M.js} +68 -39
  213. package/chunks/workspace-providers-status-4QIZN2W4.js +68 -0
  214. package/chunks/workspace-service-CYMCOEIO.js +78 -0
  215. package/chunks/{write-file-PCV226DJ.js → write-file-R354LGQF.js} +41 -40
  216. package/chunks/{zh-5EUYXASN.js → zh-SLZNSSZB.js} +32 -10
  217. package/chunks/{zh-TW-TR3XYGE5.js → zh-TW-P53C2SL5.js} +32 -10
  218. package/cli.js +6 -6
  219. package/locales/ca.js +15 -13
  220. package/locales/de.js +15 -13
  221. package/locales/en.js +52 -15
  222. package/locales/fr.js +15 -14
  223. package/locales/ja.js +15 -14
  224. package/locales/pt.js +15 -13
  225. package/locales/ru.js +15 -13
  226. package/locales/zh-TW.js +50 -14
  227. package/locales/zh.js +50 -14
  228. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  229. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  230. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  231. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  232. package/package.json +15 -6
  233. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  234. package/postinstall.js +50 -0
  235. package/web-shell/assets/{arc-DA7r8Ueo.js → arc-Bd3048nX.js} +1 -1
  236. package/web-shell/assets/{architectureDiagram-3BPJPVTR-ZDUxPtZ2.js → architectureDiagram-3BPJPVTR-DyzbzABx.js} +1 -1
  237. package/web-shell/assets/{blockDiagram-GPEHLZMM-vrtOf1kJ.js → blockDiagram-GPEHLZMM-CTjxm9Sy.js} +1 -1
  238. package/web-shell/assets/{c4Diagram-AAUBKEIU-BHFjzIi4.js → c4Diagram-AAUBKEIU-DSOFWNU6.js} +1 -1
  239. package/web-shell/assets/channel-oVoup_Ci.js +1 -0
  240. package/web-shell/assets/{chunk-2J33WTMH-mdeQVz59.js → chunk-2J33WTMH-D_PFdjo2.js} +1 -1
  241. package/web-shell/assets/{chunk-4BX2VUAB-BkKMlwBX.js → chunk-4BX2VUAB-52eG6wOT.js} +1 -1
  242. package/web-shell/assets/{chunk-55IACEB6-B7bnXNfu.js → chunk-55IACEB6-CGTZfKkC.js} +1 -1
  243. package/web-shell/assets/{chunk-727SXJPM-DGz8Mm6i.js → chunk-727SXJPM-CZ-qfRUm.js} +1 -1
  244. package/web-shell/assets/{chunk-AQP2D5EJ-BQAydUNk.js → chunk-AQP2D5EJ-B2dSDcqM.js} +1 -1
  245. package/web-shell/assets/{chunk-FMBD7UC4-GHr2LN_p.js → chunk-FMBD7UC4-Cfy3tyA0.js} +1 -1
  246. package/web-shell/assets/{chunk-ND2GUHAM-7R91lnUx.js → chunk-ND2GUHAM-CApNUpUq.js} +1 -1
  247. package/web-shell/assets/{chunk-QZHKN3VN-aTJD3lSQ.js → chunk-QZHKN3VN-CVBG8kgg.js} +1 -1
  248. package/web-shell/assets/classDiagram-4FO5ZUOK-B8WsaT2G.js +1 -0
  249. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B8WsaT2G.js +1 -0
  250. package/web-shell/assets/{cose-bilkent-S5V4N54A-BTf8t1RL.js → cose-bilkent-S5V4N54A-URd77-_-.js} +1 -1
  251. package/web-shell/assets/{dagre-BM42HDAG-_sgp3WuA.js → dagre-BM42HDAG-C07H4G9-.js} +1 -1
  252. package/web-shell/assets/{diagram-2AECGRRQ-CROtRy1w.js → diagram-2AECGRRQ-CYbpXrSn.js} +1 -1
  253. package/web-shell/assets/{diagram-5GNKFQAL-BqGRzwSc.js → diagram-5GNKFQAL-SI8s6fjX.js} +1 -1
  254. package/web-shell/assets/{diagram-KO2AKTUF-CMrcEtA7.js → diagram-KO2AKTUF-mBkC4RTW.js} +1 -1
  255. package/web-shell/assets/{diagram-LMA3HP47-BRydGNW5.js → diagram-LMA3HP47-CyBPDzWJ.js} +1 -1
  256. package/web-shell/assets/{diagram-OG6HWLK6-D0ilgNjV.js → diagram-OG6HWLK6-DwK7kBCu.js} +1 -1
  257. package/web-shell/assets/{erDiagram-TEJ5UH35-2lnQeJUM.js → erDiagram-TEJ5UH35-Ds1StEUd.js} +1 -1
  258. package/web-shell/assets/{flowDiagram-I6XJVG4X-C_ZMdQiC.js → flowDiagram-I6XJVG4X-BDC4-jHO.js} +1 -1
  259. package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dw9V_Ny0.js → ganttDiagram-6RSMTGT7-CV2aHQqf.js} +1 -1
  260. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-HDXI-F1B.js → gitGraphDiagram-PVQCEYII-B8RcuV_L.js} +1 -1
  261. package/web-shell/assets/index-B5WZ0qP1.js +717 -0
  262. package/web-shell/assets/index-CYE1IMd1.css +5 -0
  263. package/web-shell/assets/{infoDiagram-5YYISTIA-CuB8Ebua.js → infoDiagram-5YYISTIA-DUPoTf50.js} +1 -1
  264. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D_tyhVwh.js → ishikawaDiagram-YF4QCWOH-FDYOx9rf.js} +1 -1
  265. package/web-shell/assets/{journeyDiagram-JHISSGLW-CgCwJQNU.js → journeyDiagram-JHISSGLW-C5_ohMRp.js} +1 -1
  266. package/web-shell/assets/{kanban-definition-UN3LZRKU-PZUtcbPx.js → kanban-definition-UN3LZRKU-Bn4UnOMG.js} +1 -1
  267. package/web-shell/assets/{linear-CZqRdJIU.js → linear-Bl0pKQtY.js} +1 -1
  268. package/web-shell/assets/{mermaid.core-CPW_4UEF.js → mermaid.core-sevQFoji.js} +72 -72
  269. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D_Y75ID7.js → mindmap-definition-RKZ34NQL-DSH4JZF9.js} +1 -1
  270. package/web-shell/assets/{pieDiagram-4H26LBE5-Q4dTyLeF.js → pieDiagram-4H26LBE5-acWvdQTD.js} +1 -1
  271. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-ckw329Ft.js → quadrantDiagram-W4KKPZXB-DlggX4Sm.js} +1 -1
  272. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DbVDm4It.js → requirementDiagram-4Y6WPE33--mMqwmV8.js} +1 -1
  273. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CHuZ_ecH.js → sankeyDiagram-5OEKKPKP-BtV9tZ77.js} +1 -1
  274. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DU2YSpq-.js → sequenceDiagram-3UESZ5HK-iDQzPFlj.js} +1 -1
  275. package/web-shell/assets/{stateDiagram-AJRCARHV-CA9PEBUo.js → stateDiagram-AJRCARHV-CsCyQLZ3.js} +1 -1
  276. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CPapECG9.js +1 -0
  277. package/web-shell/assets/{timeline-definition-PNZ67QCA-Bhlo4WVc.js → timeline-definition-PNZ67QCA-Dl0rnKvr.js} +1 -1
  278. package/web-shell/assets/{vennDiagram-CIIHVFJN-6xtPLsyl.js → vennDiagram-CIIHVFJN-qF7nTZzA.js} +1 -1
  279. package/web-shell/assets/{wardley-L42UT6IY-3eozmXPf.js → wardley-L42UT6IY-fWoK9i7F.js} +1 -1
  280. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BOn6hKss.js → wardleyDiagram-YWT4CUSO-pHGfkMnc.js} +1 -1
  281. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BsP4-I_y.js → xychartDiagram-2RQKCTM6-3Doc4Trz.js} +1 -1
  282. package/web-shell/index.html +18 -2
  283. package/chunks/MaxSizedBox-QNF3EIGU.js +0 -63
  284. package/chunks/agent-headless-RQ5BTX3G.js +0 -56
  285. package/chunks/bridge-JL2PMCIW.js +0 -66
  286. package/chunks/chunk-5GOVVXEV.js +0 -73
  287. package/chunks/chunk-BC3C4F3Q.js +0 -40
  288. package/chunks/chunk-BW4KCQFD.js +0 -1103
  289. package/chunks/chunk-RKIZXJMB.js +0 -13
  290. package/chunks/contextCommand-WYU6OQ2F.js +0 -61
  291. package/chunks/daemon-status-provider-HH2EC5FI.js +0 -65
  292. package/chunks/headlessSafetyWarnings-TBE35GJ4.js +0 -55
  293. package/chunks/initializer-2Y7SLOKV.js +0 -61
  294. package/chunks/list-ZAFHZ7OS.js +0 -65
  295. package/chunks/loadedSettingsAdapter-6KJXD6M3.js +0 -60
  296. package/chunks/nonInteractiveCli-5W4GIZQM.js +0 -96
  297. package/chunks/ripGrep-IEIFIWP4.js +0 -54
  298. package/chunks/serve-V6GVZR6U.js +0 -65
  299. package/chunks/spawnChannel-3VHW5EPY.js +0 -63
  300. package/chunks/theme-manager-LYLGAERF.js +0 -58
  301. package/chunks/workspace-providers-status-PIAFVYHA.js +0 -62
  302. package/chunks/workspace-service-YAIOD4HG.js +0 -71
  303. package/web-shell/assets/channel-iRo68q4Q.js +0 -1
  304. package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +0 -1
  305. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +0 -1
  306. package/web-shell/assets/index-CHmzAWys.css +0 -5
  307. package/web-shell/assets/index-w6GTOHh1.js +0 -713
  308. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +0 -1
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-w6GTOHh1.js","assets/index-CHmzAWys.css","assets/dagre-BM42HDAG-_sgp3WuA.js","assets/graph-qsFoMdT2.js","assets/layout-CNYaLpI5.js","assets/cose-bilkent-S5V4N54A-BTf8t1RL.js","assets/cytoscape.esm-CUqq0XTU.js","assets/c4Diagram-AAUBKEIU-BHFjzIi4.js","assets/chunk-ND2GUHAM-7R91lnUx.js","assets/flowDiagram-I6XJVG4X-C_ZMdQiC.js","assets/chunk-FMBD7UC4-GHr2LN_p.js","assets/chunk-55IACEB6-B7bnXNfu.js","assets/chunk-2J33WTMH-mdeQVz59.js","assets/channel-iRo68q4Q.js","assets/erDiagram-TEJ5UH35-2lnQeJUM.js","assets/gitGraphDiagram-PVQCEYII-HDXI-F1B.js","assets/chunk-4BX2VUAB-BkKMlwBX.js","assets/chunk-QZHKN3VN-aTJD3lSQ.js","assets/wardley-L42UT6IY-3eozmXPf.js","assets/ganttDiagram-6RSMTGT7-Dw9V_Ny0.js","assets/linear-CZqRdJIU.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-CuB8Ebua.js","assets/pieDiagram-4H26LBE5-Q4dTyLeF.js","assets/arc-DA7r8Ueo.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-ckw329Ft.js","assets/xychartDiagram-2RQKCTM6-BsP4-I_y.js","assets/requirementDiagram-4Y6WPE33-DbVDm4It.js","assets/sequenceDiagram-3UESZ5HK-DU2YSpq-.js","assets/classDiagram-4FO5ZUOK-iHF24a8X.js","assets/chunk-727SXJPM-DGz8Mm6i.js","assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js","assets/stateDiagram-AJRCARHV-CA9PEBUo.js","assets/chunk-AQP2D5EJ-BQAydUNk.js","assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js","assets/journeyDiagram-JHISSGLW-CgCwJQNU.js","assets/timeline-definition-PNZ67QCA-Bhlo4WVc.js","assets/mindmap-definition-RKZ34NQL-D_Y75ID7.js","assets/kanban-definition-UN3LZRKU-PZUtcbPx.js","assets/sankeyDiagram-5OEKKPKP-CHuZ_ecH.js","assets/diagram-LMA3HP47-BRydGNW5.js","assets/diagram-2AECGRRQ-CROtRy1w.js","assets/blockDiagram-GPEHLZMM-vrtOf1kJ.js","assets/diagram-5GNKFQAL-BqGRzwSc.js","assets/architectureDiagram-3BPJPVTR-ZDUxPtZ2.js","assets/diagram-KO2AKTUF-CMrcEtA7.js","assets/ishikawaDiagram-YF4QCWOH-D_tyhVwh.js","assets/vennDiagram-CIIHVFJN-6xtPLsyl.js","assets/diagram-OG6HWLK6-D0ilgNjV.js","assets/wardleyDiagram-YWT4CUSO-BOn6hKss.js"])))=>i.map(i=>d[i]);
2
- var sy=Object.defineProperty;var ay=(e,t,r)=>t in e?sy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wt=(e,t,r)=>ay(e,typeof t!="symbol"?t+"":t,r);import{g as oy,c as ny,_ as gt}from"./index-w6GTOHh1.js";var vc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(ny,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",u="month",p="quarter",d="year",m="date",g="Invalid Date",y=/^(\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(I){var E=["th","st","nd","rd"],v=I%100;return"["+I+(E[(v-20)%10]||E[v]||E[0])+"]"}},k=function(I,E,v){var $=String(I);return!$||$.length>=E?I:""+Array(E+1-$.length).join(v)+I},w={s:k,z:function(I){var E=-I.utcOffset(),v=Math.abs(E),$=Math.floor(v/60),A=v%60;return(E<=0?"+":"-")+k($,2,"0")+":"+k(A,2,"0")},m:function I(E,v){if(E.date()<v.date())return-I(v,E);var $=12*(v.year()-E.year())+(v.month()-E.month()),A=E.clone().add($,u),_=v-A<0,q=E.clone().add($+(_?-1:1),u);return+(-($+(v-A)/(_?A-q:q-A))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y:d,w:c,d:h,D:m,h:l,m:n,s:o,ms:a,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},S="en",B={};B[S]=b;var M="$isDayjsObject",L=function(I){return I instanceof Y||!(!I||!I[M])},W=function I(E,v,$){var A;if(!E)return S;if(typeof E=="string"){var _=E.toLowerCase();B[_]&&(A=_),v&&(B[_]=v,A=_);var q=E.split("-");if(!A&&q.length>1)return I(q[0])}else{var ot=E.name;B[ot]=E,A=ot}return!$&&A&&(S=A),A||!$&&S},P=function(I,E){if(L(I))return I.clone();var v=typeof E=="object"?E:{};return v.date=I,v.args=arguments,new Y(v)},O=w;O.l=W,O.i=L,O.w=function(I,E){return P(I,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=function(){function I(v){this.$L=W(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[M]=!0}var E=I.prototype;return E.parse=function(v){this.$d=function($){var A=$.date,_=$.utc;if(A===null)return new Date(NaN);if(O.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var q=A.match(y);if(q){var ot=q[2]-1||0,ut=(q[7]||"0").substring(0,3);return _?new Date(Date.UTC(q[1],ot,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)):new Date(q[1],ot,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)}}return new Date(A)}(v),this.init()},E.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},E.$utils=function(){return O},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(v,$){var A=P(v);return this.startOf($)<=A&&A<=this.endOf($)},E.isAfter=function(v,$){return P(v)<this.startOf($)},E.isBefore=function(v,$){return this.endOf($)<P(v)},E.$g=function(v,$,A){return O.u(v)?this[$]:this.set(A,v)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(v,$){var A=this,_=!!O.u($)||$,q=O.p(v),ot=function(re,U){var st=O.w(A.$u?Date.UTC(A.$y,U,re):new Date(A.$y,U,re),A);return _?st:st.endOf(h)},ut=function(re,U){return O.w(A.toDate()[re].apply(A.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(U)),A)},dt=this.$W,pt=this.$M,mt=this.$D,nt="set"+(this.$u?"UTC":"");switch(q){case d:return _?ot(1,0):ot(31,11);case u:return _?ot(1,pt):ot(0,pt+1);case c:var Ot=this.$locale().weekStart||0,xt=(dt<Ot?dt+7:dt)-Ot;return ot(_?mt-xt:mt+(6-xt),pt);case h:case m:return ut(nt+"Hours",0);case l:return ut(nt+"Minutes",1);case n:return ut(nt+"Seconds",2);case o:return ut(nt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(v){return this.startOf(v,!1)},E.$set=function(v,$){var A,_=O.p(v),q="set"+(this.$u?"UTC":""),ot=(A={},A[h]=q+"Date",A[m]=q+"Date",A[u]=q+"Month",A[d]=q+"FullYear",A[l]=q+"Hours",A[n]=q+"Minutes",A[o]=q+"Seconds",A[a]=q+"Milliseconds",A)[_],ut=_===h?this.$D+($-this.$W):$;if(_===u||_===d){var dt=this.clone().set(m,1);dt.$d[ot](ut),dt.init(),this.$d=dt.set(m,Math.min(this.$D,dt.daysInMonth())).$d}else ot&&this.$d[ot](ut);return this.init(),this},E.set=function(v,$){return this.clone().$set(v,$)},E.get=function(v){return this[O.p(v)]()},E.add=function(v,$){var A,_=this;v=Number(v);var q=O.p($),ot=function(pt){var mt=P(_);return O.w(mt.date(mt.date()+Math.round(pt*v)),_)};if(q===u)return this.set(u,this.$M+v);if(q===d)return this.set(d,this.$y+v);if(q===h)return ot(1);if(q===c)return ot(7);var ut=(A={},A[n]=i,A[l]=s,A[o]=r,A)[q]||1,dt=this.$d.getTime()+v*ut;return O.w(dt,this)},E.subtract=function(v,$){return this.add(-1*v,$)},E.format=function(v){var $=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var _=v||"YYYY-MM-DDTHH:mm:ssZ",q=O.z(this),ot=this.$H,ut=this.$m,dt=this.$M,pt=A.weekdays,mt=A.months,nt=A.meridiem,Ot=function(U,st,kt,St){return U&&(U[st]||U($,_))||kt[st].slice(0,St)},xt=function(U){return O.s(ot%12||12,U,"0")},re=nt||function(U,st,kt){var St=U<12?"AM":"PM";return kt?St.toLowerCase():St};return _.replace(C,function(U,st){return st||function(kt){switch(kt){case"YY":return String($.$y).slice(-2);case"YYYY":return O.s($.$y,4,"0");case"M":return dt+1;case"MM":return O.s(dt+1,2,"0");case"MMM":return Ot(A.monthsShort,dt,mt,3);case"MMMM":return Ot(mt,dt);case"D":return $.$D;case"DD":return O.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Ot(A.weekdaysMin,$.$W,pt,2);case"ddd":return Ot(A.weekdaysShort,$.$W,pt,3);case"dddd":return pt[$.$W];case"H":return String(ot);case"HH":return O.s(ot,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return re(ot,ut,!0);case"A":return re(ot,ut,!1);case"m":return String(ut);case"mm":return O.s(ut,2,"0");case"s":return String($.$s);case"ss":return O.s($.$s,2,"0");case"SSS":return O.s($.$ms,3,"0");case"Z":return q}return null}(U)||q.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(v,$,A){var _,q=this,ot=O.p($),ut=P(v),dt=(ut.utcOffset()-this.utcOffset())*i,pt=this-ut,mt=function(){return O.m(q,ut)};switch(ot){case d:_=mt()/12;break;case u:_=mt();break;case p:_=mt()/3;break;case c:_=(pt-dt)/6048e5;break;case h:_=(pt-dt)/864e5;break;case l:_=pt/s;break;case n:_=pt/i;break;case o:_=pt/r;break;default:_=pt}return A?_:O.a(_)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(v,$){if(!v)return this.$L;var A=this.clone(),_=W(v,$,!0);return _&&(A.$L=_),A},E.clone=function(){return O.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()},I}(),H=Y.prototype;return P.prototype=H,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].forEach(function(I){H[I[1]]=function(E){return this.$g(E,I[0],I[1])}}),P.extend=function(I,E){return I.$i||(I(E,Y,P),I.$i=!0),P},P.locale=W,P.isDayjs=L,P.unix=function(I){return P(1e3*I)},P.en=B[S],P.Ls=B,P.p={},P})})(vc);var ly=vc.exports;const hy=oy(ly);var Lc=Object.defineProperty,f=(e,t)=>Lc(e,"name",{value:t,configurable:!0}),cy=(e,t)=>{for(var r in t)Lc(e,r,{get:t[r],enumerable:!0})},He={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},Ln=f(function(e="fatal"){let t=He.fatal;typeof e=="string"?e.toLowerCase()in He&&(t=He[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=He.fatal&&(z.fatal=console.error?console.error.bind(console,pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pe("FATAL"))),t<=He.error&&(z.error=console.error?console.error.bind(console,pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pe("ERROR"))),t<=He.warn&&(z.warn=console.warn?console.warn.bind(console,pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pe("WARN"))),t<=He.info&&(z.info=console.info?console.info.bind(console,pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pe("INFO"))),t<=He.debug&&(z.debug=console.debug?console.debug.bind(console,pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("DEBUG"))),t<=He.trace&&(z.trace=console.debug?console.debug.bind(console,pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("TRACE")))},"setLogLevel"),pe=f(e=>`%c${hy().format("ss.SSS")} : ${e} : `,"format");const Ps={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 s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return Ps.hue2rgb(a,s,e+1/3)*255;case"g":return Ps.hue2rgb(a,s,e)*255;case"b":return Ps.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},uy={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},dy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:Ps,lang:uy,unit:dy},tr={};for(let e=0;e<=255;e++)tr[e]=at.unit.dec2hex(e);const Ut={ALL:0,RGB:1,HSL:2};class py{constructor(){this.type=Ut.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=Ut.ALL}is(t){return this.type===t}}class fy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new py}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ut.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ut.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ut.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ut.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ut.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ut.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ut.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const La=new fy({r:0,g:0,b:0,a:0},"transparent"),Zr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Zr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return La.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}${tr[Math.round(s*255)]}`:`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[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 at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.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,s,a,o,n]=r;return La.set({h:Cr._hue2deg(i),s:at.channel.clamp.s(parseFloat(s)),l:at.channel.clamp.l(parseFloat(a)),a:o?at.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${s})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Gi={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=Gi.colors[e];if(t)return Zr.parse(t)},stringify:e=>{const t=Zr.stringify(e);for(const r in Gi.colors)if(Gi.colors[r]===t)return r}},Ri={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(Ri.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return La.set({r:at.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?at.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(s)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Re={format:{keyword:Gi,hex:Zr,rgb:Ri,rgba:Ri,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=Zr.parse(e)||Ri.parse(e)||Cr.parse(e)||Gi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ut.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ri.stringify(e):Zr.stringify(e)},Fc=(e,t)=>{const r=Re.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Re.stringify(r)},sr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Fc(e,{a:t});const s=La.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Re.stringify(s)},gy=e=>{const{r:t,g:r,b:i}=Re.parse(e),s=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(s)},my=e=>gy(e)>=.5,Be=e=>!my(e),Ac=(e,t,r)=>{const i=Re.parse(e),s=i[t],a=at.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Re.stringify(i)},D=(e,t)=>Ac(e,"l",t),R=(e,t)=>Ac(e,"l",-t),x=(e,t)=>{const r=Re.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Fc(e,i)},yy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Re.parse(e),{r:n,g:l,b:h,a:c}=Re.parse(t),u=r/100,p=u*2-1,d=o-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-g,C=i*g+n*y,b=s*g+l*y,k=a*g+h*y,w=o*u+c*(1-u);return sr(C,b,k,w)},F=(e,t=100)=>{const r=Re.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,yy(r,e,t)};/*! @license DOMPurify 3.4.8 | (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.8/LICENSE */function jl(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 Cy(e){if(Array.isArray(e))return e}function xy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function by(){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 ky(e,t){return Cy(e)||xy(e,t)||Ty(e,t)||by()}function Ty(e,t){if(e){if(typeof e=="string")return jl(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)?jl(e,t):void 0}}const Ec=Object.entries,Xl=Object.setPrototypeOf,wy=Object.isFrozen,Sy=Object.getPrototypeOf,_y=Object.getOwnPropertyDescriptor;let te=Object.freeze,fe=Object.seal,Yr=Object.create,Mc=typeof Reflect<"u"&&Reflect,vo=Mc.apply,Lo=Mc.construct;te||(te=function(t){return t});fe||(fe=function(t){return t});vo||(vo=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Lo||(Lo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const pr=$t(Array.prototype.forEach),By=$t(Array.prototype.lastIndexOf),Vl=$t(Array.prototype.pop),Pr=$t(Array.prototype.push),vy=$t(Array.prototype.splice),Kt=Array.isArray,Pi=$t(String.prototype.toLowerCase),oo=$t(String.prototype.toString),Zl=$t(String.prototype.match),Nr=$t(String.prototype.replace),Kl=$t(String.prototype.indexOf),Ly=$t(String.prototype.trim),Fy=$t(Number.prototype.toString),Ay=$t(Boolean.prototype.toString),Ql=typeof BigInt>"u"?null:$t(BigInt.prototype.toString),Jl=typeof Symbol>"u"?null:$t(Symbol.prototype.toString),Ft=$t(Object.prototype.hasOwnProperty),Fi=$t(Object.prototype.toString),Wt=$t(RegExp.prototype.test),qr=Ey(TypeError);function $t(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return vo(e,t,i)}}function Ey(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Lo(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pi;if(Xl&&Xl(e,null),!Kt(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(wy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function My(e){for(let t=0;t<e.length;t++)Ft(e,t)||(e[t]=null);return e}function Yt(e){const t=Yr(null);for(const i of Ec(e)){var r=ky(i,2);const s=r[0],a=r[1];Ft(e,s)&&(Kt(a)?t[s]=My(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Yt(a):t[s]=a)}return t}function $y(e){switch(typeof e){case"string":return e;case"number":return Fy(e);case"boolean":return Ay(e);case"bigint":return Ql?Ql(e):"0";case"symbol":return Jl?Jl(e):"Symbol()";case"undefined":return Fi(e);case"function":case"object":{if(e===null)return Fi(e);const t=e,r=Me(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Fi(i)}return Fi(e)}default:return Fi(e)}}function Me(e,t){for(;e!==null;){const i=_y(e,t);if(i){if(i.get)return $t(i.get);if(typeof i.value=="function")return $t(i.value)}e=Sy(e)}function r(){return null}return r}function Oy(e){try{return Wt(e,""),!0}catch{return!1}}const th=te(["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"]),no=te(["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"]),lo=te(["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"]),Iy=te(["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"]),ho=te(["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"]),Dy=te(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),eh=te(["#text"]),rh=te(["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"]),co=te(["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"]),ih=te(["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"]),Bs=te(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ry=fe(/{{[\w\W]*|^[\w\W]*}}/g),Py=fe(/<%[\w\W]*|^[\w\W]*%>/g),Ny=fe(/\${[\w\W]*/g),qy=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wy=fe(/^aria-[\-\w]+$/),sh=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zy=fe(/^(?:\w+script|data):/i),Hy=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yy=fe(/^html$/i),Uy=fe(/^[a-z][.\w]*(-[.\w]+)+$/i),Ee={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Gy=function(){return typeof window>"u"?null:window},jy=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},ah=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $c(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gy();const t=Q=>$c(Q);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==Ee.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Me(p,"cloneNode"),m=Me(p,"remove"),g=Me(p,"nextSibling"),y=Me(p,"childNodes"),C=Me(p,"parentNode"),b=Me(p,"shadowRoot"),k=Me(p,"attributes"),w=o&&o.prototype?Me(o.prototype,"nodeType"):null,S=o&&o.prototype?Me(o.prototype,"nodeName"):null;if(typeof a=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let B,M="",L=0;const W=function(T){if(L>0)throw qr('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');L++;try{return B.createHTML(T)}finally{L--}},P=r,O=P.implementation,Y=P.createNodeIterator,H=P.createDocumentFragment,I=P.getElementsByTagName,E=i.importNode;let v=ah();t.isSupported=typeof Ec=="function"&&typeof C=="function"&&O&&O.createHTMLDocument!==void 0;const $=Ry,A=Py,_=Ny,q=qy,ot=Wy,ut=zy,dt=Hy,pt=Uy;let mt=sh,nt=null;const Ot=lt({},[...th,...no,...lo,...ho,...eh]);let xt=null;const re=lt({},[...rh,...co,...ih,...Bs]);let U=Object.seal(Yr(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}})),st=null,kt=null;const St=Object.seal(Yr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,ce=!0,_i=!1,ja=!0,ue=!1,Bi=!0,ur=!1,Xa=!1,Va=!1,Mr=!1,xs=!1,bs=!1,Al=!0,El=!1;const Ml="user-content-";let Za=!0,vi=!1,$r={},Fe=null;const Ka=lt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $l=null;const Ol=lt({},["audio","video","img","source","image","track"]);let Qa=null;const Il=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ks="http://www.w3.org/1998/Math/MathML",Ts="http://www.w3.org/2000/svg",Ae="http://www.w3.org/1999/xhtml";let Or=Ae,Ja=!1,to=null;const Km=lt({},[ks,Ts,Ae],oo);let eo=lt({},["mi","mo","mn","ms","mtext"]),ro=lt({},["annotation-xml"]);const Qm=lt({},["title","style","font","a","script"]);let Li=null;const Jm=["application/xhtml+xml","text/html"],ty="text/html";let At=null,Ir=null;const ey=r.createElement("form"),Dl=function(T){return T instanceof RegExp||T instanceof Function},io=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ir&&Ir===T)return;(!T||typeof T!="object")&&(T={}),T=Yt(T),Li=Jm.indexOf(T.PARSER_MEDIA_TYPE)===-1?ty:T.PARSER_MEDIA_TYPE,At=Li==="application/xhtml+xml"?oo:Pi,nt=Ft(T,"ALLOWED_TAGS")&&Kt(T.ALLOWED_TAGS)?lt({},T.ALLOWED_TAGS,At):Ot,xt=Ft(T,"ALLOWED_ATTR")&&Kt(T.ALLOWED_ATTR)?lt({},T.ALLOWED_ATTR,At):re,to=Ft(T,"ALLOWED_NAMESPACES")&&Kt(T.ALLOWED_NAMESPACES)?lt({},T.ALLOWED_NAMESPACES,oo):Km,Qa=Ft(T,"ADD_URI_SAFE_ATTR")&&Kt(T.ADD_URI_SAFE_ATTR)?lt(Yt(Il),T.ADD_URI_SAFE_ATTR,At):Il,$l=Ft(T,"ADD_DATA_URI_TAGS")&&Kt(T.ADD_DATA_URI_TAGS)?lt(Yt(Ol),T.ADD_DATA_URI_TAGS,At):Ol,Fe=Ft(T,"FORBID_CONTENTS")&&Kt(T.FORBID_CONTENTS)?lt({},T.FORBID_CONTENTS,At):Ka,st=Ft(T,"FORBID_TAGS")&&Kt(T.FORBID_TAGS)?lt({},T.FORBID_TAGS,At):Yt({}),kt=Ft(T,"FORBID_ATTR")&&Kt(T.FORBID_ATTR)?lt({},T.FORBID_ATTR,At):Yt({}),$r=Ft(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Yt(T.USE_PROFILES):T.USE_PROFILES:!1,Le=T.ALLOW_ARIA_ATTR!==!1,ce=T.ALLOW_DATA_ATTR!==!1,_i=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ja=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=T.SAFE_FOR_TEMPLATES||!1,Bi=T.SAFE_FOR_XML!==!1,ur=T.WHOLE_DOCUMENT||!1,Mr=T.RETURN_DOM||!1,xs=T.RETURN_DOM_FRAGMENT||!1,bs=T.RETURN_TRUSTED_TYPE||!1,Va=T.FORCE_BODY||!1,Al=T.SANITIZE_DOM!==!1,El=T.SANITIZE_NAMED_PROPS||!1,Za=T.KEEP_CONTENT!==!1,vi=T.IN_PLACE||!1,mt=Oy(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:sh,Or=typeof T.NAMESPACE=="string"?T.NAMESPACE:Ae,eo=Ft(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Yt(T.MATHML_TEXT_INTEGRATION_POINTS):lt({},["mi","mo","mn","ms","mtext"]),ro=Ft(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Yt(T.HTML_INTEGRATION_POINTS):lt({},["annotation-xml"]);const N=Ft(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Yt(T.CUSTOM_ELEMENT_HANDLING):Yr(null);if(U=Yr(null),Ft(N,"tagNameCheck")&&Dl(N.tagNameCheck)&&(U.tagNameCheck=N.tagNameCheck),Ft(N,"attributeNameCheck")&&Dl(N.attributeNameCheck)&&(U.attributeNameCheck=N.attributeNameCheck),Ft(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),ue&&(ce=!1),xs&&(Mr=!0),$r&&(nt=lt({},eh),xt=Yr(null),$r.html===!0&&(lt(nt,th),lt(xt,rh)),$r.svg===!0&&(lt(nt,no),lt(xt,co),lt(xt,Bs)),$r.svgFilters===!0&&(lt(nt,lo),lt(xt,co),lt(xt,Bs)),$r.mathMl===!0&&(lt(nt,ho),lt(xt,ih),lt(xt,Bs))),St.tagCheck=null,St.attributeCheck=null,Ft(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?St.tagCheck=T.ADD_TAGS:Kt(T.ADD_TAGS)&&(nt===Ot&&(nt=Yt(nt)),lt(nt,T.ADD_TAGS,At))),Ft(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?St.attributeCheck=T.ADD_ATTR:Kt(T.ADD_ATTR)&&(xt===re&&(xt=Yt(xt)),lt(xt,T.ADD_ATTR,At))),Ft(T,"ADD_URI_SAFE_ATTR")&&Kt(T.ADD_URI_SAFE_ATTR)&&lt(Qa,T.ADD_URI_SAFE_ATTR,At),Ft(T,"FORBID_CONTENTS")&&Kt(T.FORBID_CONTENTS)&&(Fe===Ka&&(Fe=Yt(Fe)),lt(Fe,T.FORBID_CONTENTS,At)),Ft(T,"ADD_FORBID_CONTENTS")&&Kt(T.ADD_FORBID_CONTENTS)&&(Fe===Ka&&(Fe=Yt(Fe)),lt(Fe,T.ADD_FORBID_CONTENTS,At)),Za&&(nt["#text"]=!0),ur&&lt(nt,["html","head","body"]),nt.table&&(lt(nt,["tbody"]),delete st.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw qr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=B;B=T.TRUSTED_TYPES_POLICY;try{M=W("")}catch(bt){throw B=G,bt}}else B===void 0&&T.TRUSTED_TYPES_POLICY!==null&&(B=jy(u,s)),B&&typeof M=="string"&&(M=W(""));(v.uponSanitizeElement.length>0||v.uponSanitizeAttribute.length>0)&&nt===Ot&&(nt=Yt(nt)),v.uponSanitizeAttribute.length>0&&xt===re&&(xt=Yt(xt)),te&&te(T),Ir=T},Rl=lt({},[...no,...lo,...Iy]),Pl=lt({},[...ho,...Dy]),ry=function(T){let N=C(T);(!N||!N.tagName)&&(N={namespaceURI:Or,tagName:"template"});const G=Pi(T.tagName),bt=Pi(N.tagName);return to[T.namespaceURI]?T.namespaceURI===Ts?N.namespaceURI===Ae?G==="svg":N.namespaceURI===ks?G==="svg"&&(bt==="annotation-xml"||eo[bt]):!!Rl[G]:T.namespaceURI===ks?N.namespaceURI===Ae?G==="math":N.namespaceURI===Ts?G==="math"&&ro[bt]:!!Pl[G]:T.namespaceURI===Ae?N.namespaceURI===Ts&&!ro[bt]||N.namespaceURI===ks&&!eo[bt]?!1:!Pl[G]&&(Qm[G]||!Rl[G]):!!(Li==="application/xhtml+xml"&&to[T.namespaceURI]):!1},me=function(T){Pr(t.removed,{element:T});try{C(T).removeChild(T)}catch{m(T)}},dr=function(T,N){try{Pr(t.removed,{attribute:N.getAttributeNode(T),from:N})}catch{Pr(t.removed,{attribute:null,from:N})}if(N.removeAttribute(T),T==="is")if(Mr||xs)try{me(N)}catch{}else try{N.setAttribute(T,"")}catch{}},Nl=function(T){let N=null,G=null;if(Va)T="<remove></remove>"+T;else{const _t=Zl(T,/^[\r\n\t ]+/);G=_t&&_t[0]}Li==="application/xhtml+xml"&&Or===Ae&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const bt=B?W(T):T;if(Or===Ae)try{N=new c().parseFromString(bt,Li)}catch{}if(!N||!N.documentElement){N=O.createDocument(Or,"template",null);try{N.documentElement.innerHTML=Ja?M:bt}catch{}}const ct=N.body||N.documentElement;return T&&G&&ct.insertBefore(r.createTextNode(G),ct.childNodes[0]||null),Or===Ae?I.call(N,ur?"html":"body")[0]:ur?N.documentElement:ct},ql=function(T){return Y.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},so=function(T){var N,G;T.normalize();const bt=Y.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let ct=bt.nextNode();for(;ct;){let It=ct.data;pr([$,A,_],de=>{It=Nr(It,de," ")}),ct.data=It,ct=bt.nextNode()}const _t=(N=(G=T.querySelectorAll)===null||G===void 0?void 0:G.call(T,"template"))!==null&&N!==void 0?N:[];pr(Array.from(_t),It=>{Dr(It.content)&&so(It.content)})},ws=function(T){const N=S?S(T):null;return typeof N!="string"||At(N)!=="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!==w(T)||T.childNodes!==y(T)},Dr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Ee.documentFragment}catch{return!1}},Ss=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function ze(Q,T,N){pr(Q,G=>{G.call(t,T,N,Ir)})}const Wl=function(T){let N=null;if(ze(v.beforeSanitizeElements,T,null),ws(T))return me(T),!0;const G=At(S?S(T):T.nodeName);if(ze(v.uponSanitizeElement,T,{tagName:G,allowedTags:nt}),Bi&&T.hasChildNodes()&&!Ss(T.firstElementChild)&&Wt(/<[/\w!]/g,T.innerHTML)&&Wt(/<[/\w!]/g,T.textContent)||Bi&&T.namespaceURI===Ae&&G==="style"&&Ss(T.firstElementChild)||T.nodeType===Ee.progressingInstruction||Bi&&T.nodeType===Ee.comment&&Wt(/<[/\w]/g,T.data))return me(T),!0;if(st[G]||!(St.tagCheck instanceof Function&&St.tagCheck(G))&&!nt[G]){if(!st[G]&&Hl(G)&&(U.tagNameCheck instanceof RegExp&&Wt(U.tagNameCheck,G)||U.tagNameCheck instanceof Function&&U.tagNameCheck(G)))return!1;if(Za&&!Fe[G]){const ct=C(T),_t=y(T);if(_t&&ct){const It=_t.length;for(let de=It-1;de>=0;--de){const ye=d(_t[de],!0);ct.insertBefore(ye,g(T))}}}return me(T),!0}return(w?w(T):T.nodeType)===Ee.element&&!ry(T)||(G==="noscript"||G==="noembed"||G==="noframes")&&Wt(/<\/no(script|embed|frames)/i,T.innerHTML)?(me(T),!0):(ue&&T.nodeType===Ee.text&&(N=T.textContent,pr([$,A,_],ct=>{N=Nr(N,ct," ")}),T.textContent!==N&&(Pr(t.removed,{element:T.cloneNode()}),T.textContent=N)),ze(v.afterSanitizeElements,T,null),!1)},zl=function(T,N,G){if(kt[N]||Al&&(N==="id"||N==="name")&&(G in r||G in ey))return!1;const bt=xt[N]||St.attributeCheck instanceof Function&&St.attributeCheck(N,T);if(!(ce&&!kt[N]&&Wt(q,N))){if(!(Le&&Wt(ot,N))){if(!bt||kt[N]){if(!(Hl(T)&&(U.tagNameCheck instanceof RegExp&&Wt(U.tagNameCheck,T)||U.tagNameCheck instanceof Function&&U.tagNameCheck(T))&&(U.attributeNameCheck instanceof RegExp&&Wt(U.attributeNameCheck,N)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(N,T))||N==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&Wt(U.tagNameCheck,G)||U.tagNameCheck instanceof Function&&U.tagNameCheck(G))))return!1}else if(!Qa[N]){if(!Wt(mt,Nr(G,dt,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&T!=="script"&&Kl(G,"data:")===0&&$l[T])){if(!(_i&&!Wt(ut,Nr(G,dt,"")))){if(G)return!1}}}}}}return!0},iy=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Hl=function(T){return!iy[Pi(T)]&&Wt(pt,T)},Yl=function(T){ze(v.beforeSanitizeAttributes,T,null);const N=T.attributes;if(!N||ws(T))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt,forceKeepAttr:void 0};let bt=N.length;for(;bt--;){const ct=N[bt],_t=ct.name,It=ct.namespaceURI,de=ct.value,ye=At(_t),ao=de;let Pt=_t==="value"?ao:Ly(ao);if(G.attrName=ye,G.attrValue=Pt,G.keepAttr=!0,G.forceKeepAttr=void 0,ze(v.uponSanitizeAttribute,T,G),Pt=G.attrValue,El&&(ye==="id"||ye==="name")&&Kl(Pt,Ml)!==0&&(dr(_t,T),Pt=Ml+Pt),Bi&&Wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Pt)){dr(_t,T);continue}if(ye==="attributename"&&Zl(Pt,"href")){dr(_t,T);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){dr(_t,T);continue}if(!ja&&Wt(/\/>/i,Pt)){dr(_t,T);continue}ue&&pr([$,A,_],Gl=>{Pt=Nr(Pt,Gl," ")});const Ul=At(T.nodeName);if(!zl(Ul,ye,Pt)){dr(_t,T);continue}if(B&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!It)switch(u.getAttributeType(Ul,ye)){case"TrustedHTML":{Pt=W(Pt);break}case"TrustedScriptURL":{Pt=B.createScriptURL(Pt);break}}if(Pt!==ao)try{It?T.setAttributeNS(It,_t,Pt):T.setAttribute(_t,Pt),ws(T)?me(T):Vl(t.removed)}catch{dr(_t,T)}}ze(v.afterSanitizeAttributes,T,null)},_s=function(T){let N=null;const G=ql(T);for(ze(v.beforeSanitizeShadowDOM,T,null);N=G.nextNode();)if(ze(v.uponSanitizeShadowNode,N,null),Wl(N),Yl(N),Dr(N.content)&&_s(N.content),(w?w(N):N.nodeType)===Ee.element){const ct=b?b(N):N.shadowRoot;Dr(ct)&&(Rr(ct),_s(ct))}ze(v.afterSanitizeShadowDOM,T,null)},Rr=function(T){const N=w?w(T):T.nodeType;if(N===Ee.element){const ct=b?b(T):T.shadowRoot;Dr(ct)&&(Rr(ct),_s(ct))}const G=y?y(T):T.childNodes;if(!G)return;const bt=[];pr(G,ct=>{Pr(bt,ct)});for(const ct of bt)Rr(ct);if(N===Ee.element){const ct=S?S(T):null;if(typeof ct=="string"&&At(ct)==="template"){const _t=T.content;Dr(_t)&&Rr(_t)}}};return t.sanitize=function(Q){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,G=null,bt=null,ct=null;if(Ja=!Q,Ja&&(Q="<!-->"),typeof Q!="string"&&!Ss(Q)&&(Q=$y(Q),typeof Q!="string"))throw qr("dirty is not a string, aborting");if(!t.isSupported)return Q;if(Xa||io(T),t.removed=[],typeof Q=="string"&&(vi=!1),vi){const de=S?S(Q):Q.nodeName;if(typeof de=="string"){const ye=At(de);if(!nt[ye]||st[ye])throw qr("root node is forbidden and cannot be sanitized in-place")}if(ws(Q))throw qr("root node is clobbered and cannot be sanitized in-place");Rr(Q)}else if(Ss(Q))N=Nl("<!---->"),G=N.ownerDocument.importNode(Q,!0),G.nodeType===Ee.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?N=G:N.appendChild(G),Rr(G);else{if(!Mr&&!ue&&!ur&&Q.indexOf("<")===-1)return B&&bs?W(Q):Q;if(N=Nl(Q),!N)return Mr?null:bs?M:""}N&&Va&&me(N.firstChild);const _t=ql(vi?Q:N);for(;bt=_t.nextNode();)Wl(bt),Yl(bt),Dr(bt.content)&&_s(bt.content);if(vi)return ue&&so(Q),Q;if(Mr){if(ue&&so(N),xs)for(ct=H.call(N.ownerDocument);N.firstChild;)ct.appendChild(N.firstChild);else ct=N;return(xt.shadowroot||xt.shadowrootmode)&&(ct=E.call(i,ct,!0)),ct}let It=ur?N.outerHTML:N.innerHTML;return ur&&nt["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&Wt(Yy,N.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
4
- `+It),ue&&pr([$,A,_],de=>{It=Nr(It,de," ")}),B&&bs?W(It):It},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};io(Q),Xa=!0},t.clearConfig=function(){Ir=null,Xa=!1},t.isValidAttribute=function(Q,T,N){Ir||io({});const G=At(Q),bt=At(T);return zl(G,bt,N)},t.addHook=function(Q,T){typeof T=="function"&&Pr(v[Q],T)},t.removeHook=function(Q,T){if(T!==void 0){const N=By(v[Q],T);return N===-1?void 0:vy(v[Q],N,1)[0]}return Vl(v[Q])},t.removeHooks=function(Q){v[Q]=[]},t.removeAllHooks=function(){v=ah()},t}var pi=$c(),Oc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ji=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xy=/\s*%%.*\n/gm,Jr,Ic=(Jr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Jr,"UnknownDiagramError"),Jr),Sr={},Fn=f(function(e,t){e=e.replace(Oc,"").replace(ji,"").replace(Xy,`
5
- `);for(const[r,{detector:i}]of Object.entries(Sr))if(i(e,t))return r;throw new Ic(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Fo=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Dc(t,r,i)},"registerLazyLoadedDiagrams"),Dc=f((e,t,r)=>{Sr[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),Sr[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Vy=f(e=>Sr[e].loader,"getDiagramLoader"),Ao=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Ao(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Ao(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Dt=Ao,Ne="#ffffff",qe="#f2f2f2",it=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),ti,Zy=(ti=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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,L,W,P,O,Y,H,I,E,v,$,A,_;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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 q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||F(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||D(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||R(this["cScale"+q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleLabel"+q]=this["cScaleLabel"+q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let q=0;q<5;q++)this["surface"+q]=this["surface"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+q*3)}),this["surfacePeer"+q]=this["surfacePeer"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+q*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:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((d=this.wardley)==null?void 0:d.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((y=this.wardley)==null?void 0:y.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:((w=this.wardley)==null?void 0:w.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:((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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((P=this.xyChart)==null?void 0:P.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((O=this.xyChart)==null?void 0:O.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:((I=this.xyChart)==null?void 0:I.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(($=this.xyChart)==null?void 0:$.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe,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]})}},f(ti,"Theme"),ti),Ky=f(e=>{const t=new Zy;return t.calculate(e),t},"getThemeVariables"),ei,Qy=(ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=sr(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=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=sr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=sr(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,L,W,P,O,Y,H,I,E,v,$,A;this.secondBkg=D(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=D(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=D(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=F(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||D(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??D(this["cScale"+_],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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.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:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.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:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.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:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((v=this.wardley)==null?void 0:v.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.secondaryColor,20),this.git1=D(this.pie2||this.secondaryColor,20),this.git2=D(this.pie3||this.tertiaryColor,20),this.git3=D(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=D(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=D(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=D(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=D(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||D("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||D("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||D("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||D("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||D(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||D(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||D(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||D(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]})}},f(ei,"Theme"),ei),Jy=f(e=>{const t=new Qy;return t.calculate(e),t},"getThemeVariables"),ri,t0=(ri=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=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=it(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=sr(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,L,W,P,O,Y,H,I,E,v,$,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||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=R(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||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||D(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||D(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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.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:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.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:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((S=this.wardley)==null?void 0:S.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.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:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.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:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||R(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(ri,"Theme"),ri),e0=f(e=>{const t=new t0;return t.calculate(e),t},"getThemeVariables"),ii,r0=(ii=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=D("#cde498",10),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,L,W,P,O,Y,H,I,E,v,$,A;this.actorBorder=R(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||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=R(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(8+_*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||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.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:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.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:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((S=this.wardley)==null?void 0:S.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.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:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.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:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(ii,"Theme"),ii),i0=f(e=>{const t=new r0;return t.calculate(e),t},"getThemeVariables"),si,s0=(si=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=D(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(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||D(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,L,W,P,O,Y,H,I,E,v,$,A;this.secondBkg=D(this.contrast,55),this.border2=this.contrast,this.actorBorder=D(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||D(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{l:-(8+_*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=D(this.contrast,30),this.sectionBkgColor2=D(this.contrast,30),this.taskBorderColor=R(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=D(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??this["cScale"+_];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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.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:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.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:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.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:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((v=this.wardley)==null?void 0:v.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=R(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||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(si,"Theme"),si),a0=f(e=>{const t=new s0;return t.calculate(e),t},"getThemeVariables"),ai,o0=(ai=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=it(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 a,o,n,l,h,c,u,p,d,m,g;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.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||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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(ai,"Theme"),ai),n0=f(e=>{const t=new o0;return t.calculate(e),t},"getThemeVariables"),oi,l0=(oi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(F("#323D47"),10),this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor=F(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,s,a,o,n,l,h,c,u,p;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(oi,"Theme"),oi),h0=f(e=>{const t=new l0;return t.calculate(e),t},"getThemeVariables"),ni,c0=(ni=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=it("#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 a,o,n,l,h,c,u,p,d,m,g;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.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||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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(ni,"Theme"),ni),u0=f(e=>{const t=new c0;return t.calculate(e),t},"getThemeVariables"),li,d0=(li=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(F("#323D47"),10),this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor=F(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,s,a,o,n,l,h,c,u,p;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(li,"Theme"),li),p0=f(e=>{const t=new d0;return t.calculate(e),t},"getThemeVariables"),hi,f0=(hi=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=it(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 a,o,n,l,h,c,u,p,d,m,g;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.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||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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(hi,"Theme"),hi),g0=f(e=>{const t=new f0;return t.calculate(e),t},"getThemeVariables"),ci,m0=(ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(F("#323D47"),10),this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor=F(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,s,a,o,n,l,h,c,u,p;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||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||D(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*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||Be(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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]})}},f(ci,"Theme"),ci),y0=f(e=>{const t=new m0;return t.calculate(e),t},"getThemeVariables"),je={base:{getThemeVariables:Ky},dark:{getThemeVariables:Jy},default:{getThemeVariables:e0},forest:{getThemeVariables:i0},neutral:{getThemeVariables:a0},neo:{getThemeVariables:n0},"neo-dark":{getThemeVariables:h0},redux:{getThemeVariables:u0},"redux-dark":{getThemeVariables:p0},"redux-color":{getThemeVariables:g0},"redux-dark-color":{getThemeVariables:y0}},Zt={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},Rc={...Zt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:je.default.getThemeVariables(),sequence:{...Zt.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Zt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Zt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Zt.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Zt.pie,useWidth:984},xyChart:{...Zt.xyChart,useWidth:void 0},requirement:{...Zt.requirement,useWidth:void 0},packet:{...Zt.packet},eventmodeling:{...Zt.eventmodeling},treeView:{...Zt.treeView,useWidth:void 0},radar:{...Zt.radar},ishikawa:{...Zt.ishikawa},sankey:{...Zt.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:{...Zt.venn}},Pc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Pc(e[i],"")]:[...r,t+i],[]),"keyify"),C0=new Set(Pc(Rc,"")),Nc=Rc,Ks=f(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ks(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!C0.has(t)||e[t]==null){z.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 s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(z.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else z.debug("sanitizing object",t),Ks(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=qc(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]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),qc=f(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"),fi=Object.freeze(Nc),Ke=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),se=Dt({},fi),Qs,_r=[],Xi=Dt({},fi),Fa=f((e,t)=>{let r=Dt({},e),i={};for(const s of t)Hc(s),i=Dt(i,s);if(r=Dt(r,i),i.theme&&i.theme in je){const s=Dt({},Qs),a=Dt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in je&&(r.themeVariables=je[r.theme].getThemeVariables(a))}return Xi=r,Uc(Xi),Xi},"updateCurrentConfig"),x0=f(e=>(se=Dt({},fi),se=Dt(se,e),e.theme&&je[e.theme]&&(se.themeVariables=je[e.theme].getThemeVariables(e.themeVariables)),Fa(se,_r),se),"setSiteConfig"),b0=f(e=>{Qs=Dt({},e)},"saveConfigFromInitialize"),k0=f(e=>(se=Dt(se,e),Fa(se,_r),se),"updateSiteConfig"),Wc=f(()=>Dt({},se),"getSiteConfig"),zc=f(e=>(Uc(e),Dt(Xi,e),vt()),"setConfig"),vt=f(()=>Dt({},Xi),"getConfig"),Hc=f(e=>{e&&(["secure",...se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&Hc(e[t])}))},"sanitize"),T0=f(e=>{var t;Ks(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),_r.push(e),Fa(se,_r)},"addDirective"),Js=f((e=se)=>{_r=[],Fa(e,_r)},"reset"),w0={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."},oh={},Yc=f(e=>{oh[e]||(z.warn(w0[e]),oh[e]=!0)},"issueWarning"),Uc=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Yc("LAZY_LOAD_DEPRECATED")},"checkConfig"),qv=f(()=>{let e={};Qs&&(e=Dt(e,Qs));for(const t of _r)e=Dt(e,t);return e},"getUserDefinedConfig"),ee=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Yc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ke(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),cs=/<br\s*\/?>/gi,S0=f(e=>e?Xc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),_0=(()=>{let e=!1;return()=>{e||(Gc(),e=!0)}})();function Gc(){const e="data-temp-href-target";pi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),pi.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"))})}f(Gc,"setupDompurifyHooks");var jc=f(e=>(_0(),pi.sanitize(e)),"removeScript"),nh=f((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=jc(e):r!=="loose"&&(e=Xc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=F0(e))}return e},"sanitizeMore"),_e=f((e,t)=>e&&(t.dompurifyConfig?e=pi.sanitize(nh(e,t),t.dompurifyConfig).toString():e=pi.sanitize(nh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),B0=f((e,t)=>typeof e=="string"?_e(e,t):e.flat().map(r=>_e(r,t)),"sanitizeTextOrArray"),v0=f(e=>cs.test(e),"hasBreaks"),L0=f(e=>e.split(cs),"splitBreaks"),F0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=f(e=>e.replace(cs,"#br#"),"breakToPlaceholder"),A0=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),E0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),M0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),lh=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];$0(a,o)&&(s=a+","+o,i++,r.pop())}r.push(O0(s))}return r.join("")},"parseGenericTypes"),Eo=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),$0=f((e,t)=>{const r=Eo(e,"~"),i=Eo(t,"~");return r===1&&i===1},"shouldCombineSets"),O0=f(e=>{const t=Eo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),hh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Mo=/\$\$(.*)\$\$/g,Qi=f(e=>{var t;return(((t=e.match(Mo))==null?void 0:t.length)??0)>0},"hasKatex"),Wv=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Vc(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 s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),I0=f(async(e,t)=>{if(!Qi(e))return e;if(!(hh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Mo,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:s}=await import("./index-w6GTOHh1.js").then(a=>a.k);return{default:s}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!hh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(cs).map(s=>Qi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Mo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Vc=f(async(e,t)=>_e(await I0(e,t),t),"renderKatexSanitized"),us={getRows:S0,sanitizeText:_e,sanitizeTextOrArray:B0,hasBreaks:v0,splitBreaks:L0,lineBreakRegex:cs,removeScript:jc,getUrl:A0,evaluate:Ke,getMax:E0,getMin:M0},D0=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),R0=f(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"),Zc=f(function(e,t,r,i){const s=R0(t,r,i);D0(e,s)},"configureSvgSize"),P0=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;z.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,z.info(`Calculated bounds: ${n}x${l}`),Zc(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Ns={};function $o(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
- `)}f($o,"cssStyleSheetToString");var N0=f((e,t,r,i)=>{let s="";return e in Ns&&Ns[e]?s=Ns[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B5WZ0qP1.js","assets/index-CYE1IMd1.css","assets/dagre-BM42HDAG-C07H4G9-.js","assets/graph-qsFoMdT2.js","assets/layout-CNYaLpI5.js","assets/cose-bilkent-S5V4N54A-URd77-_-.js","assets/cytoscape.esm-CUqq0XTU.js","assets/c4Diagram-AAUBKEIU-DSOFWNU6.js","assets/chunk-ND2GUHAM-CApNUpUq.js","assets/flowDiagram-I6XJVG4X-BDC4-jHO.js","assets/chunk-FMBD7UC4-Cfy3tyA0.js","assets/chunk-55IACEB6-CGTZfKkC.js","assets/chunk-2J33WTMH-D_PFdjo2.js","assets/channel-oVoup_Ci.js","assets/erDiagram-TEJ5UH35-Ds1StEUd.js","assets/gitGraphDiagram-PVQCEYII-B8RcuV_L.js","assets/chunk-4BX2VUAB-52eG6wOT.js","assets/chunk-QZHKN3VN-CVBG8kgg.js","assets/wardley-L42UT6IY-fWoK9i7F.js","assets/ganttDiagram-6RSMTGT7-CV2aHQqf.js","assets/linear-Bl0pKQtY.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-DUPoTf50.js","assets/pieDiagram-4H26LBE5-acWvdQTD.js","assets/arc-Bd3048nX.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-DlggX4Sm.js","assets/xychartDiagram-2RQKCTM6-3Doc4Trz.js","assets/requirementDiagram-4Y6WPE33--mMqwmV8.js","assets/sequenceDiagram-3UESZ5HK-iDQzPFlj.js","assets/classDiagram-4FO5ZUOK-B8WsaT2G.js","assets/chunk-727SXJPM-CZ-qfRUm.js","assets/classDiagram-v2-Q7XG4LA2-B8WsaT2G.js","assets/stateDiagram-AJRCARHV-CsCyQLZ3.js","assets/chunk-AQP2D5EJ-B2dSDcqM.js","assets/stateDiagram-v2-BHNVJYJU-CPapECG9.js","assets/journeyDiagram-JHISSGLW-C5_ohMRp.js","assets/timeline-definition-PNZ67QCA-Dl0rnKvr.js","assets/mindmap-definition-RKZ34NQL-DSH4JZF9.js","assets/kanban-definition-UN3LZRKU-Bn4UnOMG.js","assets/sankeyDiagram-5OEKKPKP-BtV9tZ77.js","assets/diagram-LMA3HP47-CyBPDzWJ.js","assets/diagram-2AECGRRQ-CYbpXrSn.js","assets/blockDiagram-GPEHLZMM-CTjxm9Sy.js","assets/diagram-5GNKFQAL-SI8s6fjX.js","assets/architectureDiagram-3BPJPVTR-DyzbzABx.js","assets/diagram-KO2AKTUF-mBkC4RTW.js","assets/ishikawaDiagram-YF4QCWOH-FDYOx9rf.js","assets/vennDiagram-CIIHVFJN-qF7nTZzA.js","assets/diagram-OG6HWLK6-DwK7kBCu.js","assets/wardleyDiagram-YWT4CUSO-pHGfkMnc.js"])))=>i.map(i=>d[i]);
2
+ var _y=Object.defineProperty;var By=(e,t,r)=>t in e?_y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var St=(e,t,r)=>By(e,typeof t!="symbol"?t+"":t,r);import{g as vy,c as Ly,_ as ft}from"./index-B5WZ0qP1.js";var Nc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Ly,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",u="month",p="quarter",d="year",m="date",g="Invalid Date",y=/^(\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"],L=P%100;return"["+P+(E[(L-20)%10]||E[L]||E[0])+"]"}},k=function(P,E,L){var O=String(P);return!O||O.length>=E?P:""+Array(E+1-O.length).join(L)+P},w={s:k,z:function(P){var E=-P.utcOffset(),L=Math.abs(E),O=Math.floor(L/60),A=L%60;return(E<=0?"+":"-")+k(O,2,"0")+":"+k(A,2,"0")},m:function P(E,L){if(E.date()<L.date())return-P(L,E);var O=12*(L.year()-E.year())+(L.month()-E.month()),A=E.clone().add(O,u),_=L-A<0,q=E.clone().add(O+(_?-1:1),u);return+(-(O+(L-A)/(_?A-q:q-A))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:u,y:d,w:c,d:h,D:m,h:l,m:n,s:o,ms:a,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},S="en",B={};B[S]=b;var M="$isDayjsObject",v=function(P){return P instanceof Y||!(!P||!P[M])},W=function P(E,L,O){var A;if(!E)return S;if(typeof E=="string"){var _=E.toLowerCase();B[_]&&(A=_),L&&(B[_]=L,A=_);var q=E.split("-");if(!A&&q.length>1)return P(q[0])}else{var V=E.name;B[V]=E,A=V}return!O&&A&&(S=A),A||!O&&S},D=function(P,E){if(v(P))return P.clone();var L=typeof E=="object"?E:{};return L.date=P,L.args=arguments,new Y(L)},I=w;I.l=W,I.i=v,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(L){this.$L=W(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[M]=!0}var E=P.prototype;return E.parse=function(L){this.$d=function(O){var A=O.date,_=O.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 q=A.match(y);if(q){var V=q[2]-1||0,ut=(q[7]||"0").substring(0,3);return _?new Date(Date.UTC(q[1],V,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)):new Date(q[1],V,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)}}return new Date(A)}(L),this.init()},E.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},E.$utils=function(){return I},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(L,O){var A=D(L);return this.startOf(O)<=A&&A<=this.endOf(O)},E.isAfter=function(L,O){return D(L)<this.startOf(O)},E.isBefore=function(L,O){return this.endOf(O)<D(L)},E.$g=function(L,O,A){return I.u(L)?this[O]:this.set(A,L)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(L,O){var A=this,_=!!I.u(O)||O,q=I.p(L),V=function(ue,et){var X=I.w(A.$u?Date.UTC(A.$y,et,ue):new Date(A.$y,et,ue),A);return _?X:X.endOf(h)},ut=function(ue,et){return I.w(A.toDate()[ue].apply(A.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(et)),A)},gt=this.$W,dt=this.$M,Ct=this.$D,vt="set"+(this.$u?"UTC":"");switch(q){case d:return _?V(1,0):V(31,11);case u:return _?V(1,dt):V(0,dt+1);case c:var qt=this.$locale().weekStart||0,ne=(gt<qt?gt+7:gt)-qt;return V(_?Ct-ne:Ct+(6-ne),dt);case h:case m:return ut(vt+"Hours",0);case l:return ut(vt+"Minutes",1);case n:return ut(vt+"Seconds",2);case o:return ut(vt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(L){return this.startOf(L,!1)},E.$set=function(L,O){var A,_=I.p(L),q="set"+(this.$u?"UTC":""),V=(A={},A[h]=q+"Date",A[m]=q+"Date",A[u]=q+"Month",A[d]=q+"FullYear",A[l]=q+"Hours",A[n]=q+"Minutes",A[o]=q+"Seconds",A[a]=q+"Milliseconds",A)[_],ut=_===h?this.$D+(O-this.$W):O;if(_===u||_===d){var gt=this.clone().set(m,1);gt.$d[V](ut),gt.init(),this.$d=gt.set(m,Math.min(this.$D,gt.daysInMonth())).$d}else V&&this.$d[V](ut);return this.init(),this},E.set=function(L,O){return this.clone().$set(L,O)},E.get=function(L){return this[I.p(L)]()},E.add=function(L,O){var A,_=this;L=Number(L);var q=I.p(O),V=function(dt){var Ct=D(_);return I.w(Ct.date(Ct.date()+Math.round(dt*L)),_)};if(q===u)return this.set(u,this.$M+L);if(q===d)return this.set(d,this.$y+L);if(q===h)return V(1);if(q===c)return V(7);var ut=(A={},A[n]=i,A[l]=s,A[o]=r,A)[q]||1,gt=this.$d.getTime()+L*ut;return I.w(gt,this)},E.subtract=function(L,O){return this.add(-1*L,O)},E.format=function(L){var O=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var _=L||"YYYY-MM-DDTHH:mm:ssZ",q=I.z(this),V=this.$H,ut=this.$m,gt=this.$M,dt=A.weekdays,Ct=A.months,vt=A.meridiem,qt=function(et,X,wt,lt){return et&&(et[X]||et(O,_))||wt[X].slice(0,lt)},ne=function(et){return I.s(V%12||12,et,"0")},ue=vt||function(et,X,wt){var lt=et<12?"AM":"PM";return wt?lt.toLowerCase():lt};return _.replace(C,function(et,X){return X||function(wt){switch(wt){case"YY":return String(O.$y).slice(-2);case"YYYY":return I.s(O.$y,4,"0");case"M":return gt+1;case"MM":return I.s(gt+1,2,"0");case"MMM":return qt(A.monthsShort,gt,Ct,3);case"MMMM":return qt(Ct,gt);case"D":return O.$D;case"DD":return I.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return qt(A.weekdaysMin,O.$W,dt,2);case"ddd":return qt(A.weekdaysShort,O.$W,dt,3);case"dddd":return dt[O.$W];case"H":return String(V);case"HH":return I.s(V,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return ue(V,ut,!0);case"A":return ue(V,ut,!1);case"m":return String(ut);case"mm":return I.s(ut,2,"0");case"s":return String(O.$s);case"ss":return I.s(O.$s,2,"0");case"SSS":return I.s(O.$ms,3,"0");case"Z":return q}return null}(et)||q.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(L,O,A){var _,q=this,V=I.p(O),ut=D(L),gt=(ut.utcOffset()-this.utcOffset())*i,dt=this-ut,Ct=function(){return I.m(q,ut)};switch(V){case d:_=Ct()/12;break;case u:_=Ct();break;case p:_=Ct()/3;break;case c:_=(dt-gt)/6048e5;break;case h:_=(dt-gt)/864e5;break;case l:_=dt/s;break;case n:_=dt/i;break;case o:_=dt/r;break;default:_=dt}return A?_:I.a(_)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(L,O){if(!L)return this.$L;var A=this.clone(),_=W(L,O,!0);return _&&(A.$L=_),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",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].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=W,D.isDayjs=v,D.unix=function(P){return D(1e3*P)},D.en=B[S],D.Ls=B,D.p={},D})})(Nc);var Fy=Nc.exports;const Ay=vy(Fy);var qc=Object.defineProperty,f=(e,t)=>qc(e,"name",{value:t,configurable:!0}),Ey=(e,t)=>{for(var r in t)qc(e,r,{get:t[r],enumerable:!0})},We={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},In=f(function(e="fatal"){let t=We.fatal;typeof e=="string"?e.toLowerCase()in We&&(t=We[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=We.fatal&&(z.fatal=console.error?console.error.bind(console,fe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",fe("FATAL"))),t<=We.error&&(z.error=console.error?console.error.bind(console,fe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",fe("ERROR"))),t<=We.warn&&(z.warn=console.warn?console.warn.bind(console,fe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",fe("WARN"))),t<=We.info&&(z.info=console.info?console.info.bind(console,fe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",fe("INFO"))),t<=We.debug&&(z.debug=console.debug?console.debug.bind(console,fe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fe("DEBUG"))),t<=We.trace&&(z.trace=console.debug?console.debug.bind(console,fe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fe("TRACE")))},"setLogLevel"),fe=f(e=>`%c${Ay().format("ss.SSS")} : ${e} : `,"format");const qs={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 s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return qs.hue2rgb(a,s,e+1/3)*255;case"g":return qs.hue2rgb(a,s,e)*255;case"b":return qs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},My={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},$y={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:qs,lang:My,unit:$y},ir={};for(let e=0;e<=255;e++)ir[e]=nt.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class Oy{constructor(){this.type=Gt.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=Gt.ALL}is(t){return this.type===t}}class Iy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Oy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Aa=new Iy({r:0,g:0,b:0,a:0},"transparent"),Kr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Kr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return Aa.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${ir[Math.round(t)]}${ir[Math.round(r)]}${ir[Math.round(i)]}${ir[Math.round(s*255)]}`:`#${ir[Math.round(t)]}${ir[Math.round(r)]}${ir[Math.round(i)]}`}},Tr={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(Tr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Tr.re);if(!r)return;const[,i,s,a,o,n]=r;return Aa.set({h:Tr._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Xi={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=Xi.colors[e];if(t)return Kr.parse(t)},stringify:e=>{const t=Kr.stringify(e);for(const r in Xi.colors)if(Xi.colors[r]===t)return r}},Ni={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(Ni.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Aa.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?nt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},De={format:{keyword:Xi,hex:Kr,rgb:Ni,rgba:Ni,hsl:Tr,hsla:Tr},parse:e=>{if(typeof e!="string")return e;const t=Kr.parse(e)||Ni.parse(e)||Tr.parse(e)||Xi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?Tr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ni.stringify(e):Kr.stringify(e)},zc=(e,t)=>{const r=De.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return De.stringify(r)},lr=(e,t,r=0,i=1)=>{if(typeof e!="number")return zc(e,{a:t});const s=Aa.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return De.stringify(s)},Dy=e=>{const{r:t,g:r,b:i}=De.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},Py=e=>Dy(e)>=.5,_e=e=>!Py(e),Wc=(e,t,r)=>{const i=De.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),De.stringify(i)},R=(e,t)=>Wc(e,"l",t),N=(e,t)=>Wc(e,"l",-t),x=(e,t)=>{const r=De.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return zc(e,i)},Ry=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=De.parse(e),{r:n,g:l,b:h,a:c}=De.parse(t),u=r/100,p=u*2-1,d=o-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-g,C=i*g+n*y,b=s*g+l*y,k=a*g+h*y,w=o*u+c*(1-u);return lr(C,b,k,w)},F=(e,t=100)=>{const r=De.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ry(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 sh(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 Ny(e){if(Array.isArray(e))return e}function qy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function zy(){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 Wy(e,t){return Ny(e)||qy(e,t)||Hy(e,t)||zy()}function Hy(e,t){if(e){if(typeof e=="string")return sh(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)?sh(e,t):void 0}}const Hc=Object.entries,ah=Object.setPrototypeOf,Yy=Object.isFrozen,Uy=Object.getPrototypeOf,Gy=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,Ur=Object.create,Yc=typeof Reflect<"u"&&Reflect,Oo=Yc.apply,Io=Yc.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});Oo||(Oo=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Io||(Io=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Fi=$t(Array.prototype.forEach),jy=$t(Array.prototype.lastIndexOf),oh=$t(Array.prototype.pop),zr=$t(Array.prototype.push),Xy=$t(Array.prototype.splice),ar=Array.isArray,qi=$t(String.prototype.toLowerCase),fo=$t(String.prototype.toString),nh=$t(String.prototype.match),Ai=$t(String.prototype.replace),lh=$t(String.prototype.indexOf),Vy=$t(String.prototype.trim),Zy=$t(Number.prototype.toString),Ky=$t(Boolean.prototype.toString),hh=typeof BigInt>"u"?null:$t(BigInt.prototype.toString),ch=typeof Symbol>"u"?null:$t(Symbol.prototype.toString),Pt=$t(Object.prototype.hasOwnProperty),Ei=$t(Object.prototype.toString),zt=$t(RegExp.prototype.test),yr=Qy(TypeError);function $t(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return Oo(e,t,i)}}function Qy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Io(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qi;if(ah&&ah(e,null),!ar(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(Yy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function Jy(e){for(let t=0;t<e.length;t++)Pt(e,t)||(e[t]=null);return e}function Jt(e){const t=Ur(null);for(const i of Hc(e)){var r=Wy(i,2);const s=r[0],a=r[1];Pt(e,s)&&(ar(a)?t[s]=Jy(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Jt(a):t[s]=a)}return t}function t0(e){switch(typeof e){case"string":return e;case"number":return Zy(e);case"boolean":return Ky(e);case"bigint":return hh?hh(e):"0";case"symbol":return ch?ch(e):"Symbol()";case"undefined":return Ei(e);case"function":case"object":{if(e===null)return Ei(e);const t=e,r=Ee(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Ei(i)}return Ei(e)}default:return Ei(e)}}function Ee(e,t){for(;e!==null;){const i=Gy(e,t);if(i){if(i.get)return $t(i.get);if(typeof i.value=="function")return $t(i.value)}e=Uy(e)}function r(){return null}return r}function e0(e){try{return zt(e,""),!0}catch{return!1}}const uh=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"]),go=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"]),mo=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"]),r0=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"]),yo=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"]),i0=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dh=Yt(["#text"]),ph=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"]),Co=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"]),fh=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"]),Ls=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),s0=Ut(/{{[\w\W]*|^[\w\W]*}}/g),a0=Ut(/<%[\w\W]*|^[\w\W]*%>/g),o0=Ut(/\${[\w\W]*/g),n0=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),l0=Ut(/^aria-[\-\w]+$/),gh=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),h0=Ut(/^(?:\w+script|data):/i),c0=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),u0=Ut(/^html$/i),d0=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i),mh=Ut(/<[/\w!]/g),p0=Ut(/<[/\w]/g),f0=Ut(/<\/no(script|embed|frames)/i),g0=Ut(/\/>/i),Ae={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},m0=function(){return typeof window>"u"?null:window},y0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},yh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rr=function(t,r,i,s){return Pt(t,r)&&ar(t[r])?mt(s.base?Jt(s.base):{},t[r],s.transform):i};function Uc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m0();const t=G=>Uc(G);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Ae.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Ee(p,"cloneNode"),m=Ee(p,"remove"),g=Ee(p,"nextSibling"),y=Ee(p,"childNodes"),C=Ee(p,"parentNode"),b=Ee(p,"shadowRoot"),k=Ee(p,"attributes"),w=o&&o.prototype?Ee(o.prototype,"nodeType"):null,S=o&&o.prototype?Ee(o.prototype,"nodeName"):null;if(typeof a=="function"){const G=r.createElement("template");G.content&&G.content.ownerDocument&&(r=G.content.ownerDocument)}let B,M="",v,W=!1,D=0;const I=function(){if(D>0)throw yr('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 B.createHTML(T)}finally{D--}},H=function(T){I(),D++;try{return B.createScriptURL(T)}finally{D--}},P=function(){return W||(v=y0(u,s),W=!0),v},E=r,L=E.implementation,O=E.createNodeIterator,A=E.createDocumentFragment,_=E.getElementsByTagName,q=i.importNode;let V=yh();t.isSupported=typeof Hc=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const ut=s0,gt=a0,dt=o0,Ct=n0,vt=l0,qt=h0,ne=c0,ue=d0;let et=gh,X=null;const wt=mt({},[...uh,...go,...mo,...yo,...dh]);let lt=null;const ve=mt({},[...ph,...Co,...fh,...Ls]);let kt=Object.seal(Ur(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}})),Je=null,Va=null;const de=Object.seal(Ur(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pl=!0,Za=!0,Rl=!1,Nl=!0,tr=!1,Bi=!0,gr=!1,Ka=!1,Qa=null,Ja=null,to=!1,Dr=!1,ks=!1,Ts=!1,ql=!0,zl=!1;const Wl="user-content-";let eo=!0,ro=!1,Pr={},Le=null;const io=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 Hl=null;const Yl=mt({},["audio","video","img","source","image","track"]);let so=null;const Ul=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ws="http://www.w3.org/1998/Math/MathML",Ss="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let Rr=Fe,ao=!1,oo=null;const hy=mt({},[ws,Ss,Fe],fo),Gl=Yt(["mi","mo","mn","ms","mtext"]);let no=mt({},Gl);const jl=Yt(["annotation-xml"]);let lo=mt({},jl);const cy=mt({},["title","style","font","a","script"]);let vi=null;const uy=["application/xhtml+xml","text/html"],dy="text/html";let Lt=null,Nr=null;const py=r.createElement("form"),Xl=function(T){return T instanceof RegExp||T instanceof Function},ho=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Nr&&Nr===T)return;(!T||typeof T!="object")&&(T={}),T=Jt(T),vi=uy.indexOf(T.PARSER_MEDIA_TYPE)===-1?dy:T.PARSER_MEDIA_TYPE,Lt=vi==="application/xhtml+xml"?fo:qi,X=rr(T,"ALLOWED_TAGS",wt,{transform:Lt}),lt=rr(T,"ALLOWED_ATTR",ve,{transform:Lt}),oo=rr(T,"ALLOWED_NAMESPACES",hy,{transform:fo}),so=rr(T,"ADD_URI_SAFE_ATTR",Ul,{transform:Lt,base:Ul}),Hl=rr(T,"ADD_DATA_URI_TAGS",Yl,{transform:Lt,base:Yl}),Le=rr(T,"FORBID_CONTENTS",io,{transform:Lt}),Je=rr(T,"FORBID_TAGS",Jt({}),{transform:Lt}),Va=rr(T,"FORBID_ATTR",Jt({}),{transform:Lt}),Pr=Pt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Jt(T.USE_PROFILES):T.USE_PROFILES:!1,Pl=T.ALLOW_ARIA_ATTR!==!1,Za=T.ALLOW_DATA_ATTR!==!1,Rl=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Nl=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tr=T.SAFE_FOR_TEMPLATES||!1,Bi=T.SAFE_FOR_XML!==!1,gr=T.WHOLE_DOCUMENT||!1,Dr=T.RETURN_DOM||!1,ks=T.RETURN_DOM_FRAGMENT||!1,Ts=T.RETURN_TRUSTED_TYPE||!1,to=T.FORCE_BODY||!1,ql=T.SANITIZE_DOM!==!1,zl=T.SANITIZE_NAMED_PROPS||!1,eo=T.KEEP_CONTENT!==!1,ro=T.IN_PLACE||!1,et=e0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:gh,Rr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Fe,no=Pt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Jt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},Gl),lo=Pt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Jt(T.HTML_INTEGRATION_POINTS):mt({},jl);const $=Pt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Jt(T.CUSTOM_ELEMENT_HANDLING):Ur(null);if(kt=Ur(null),Pt($,"tagNameCheck")&&Xl($.tagNameCheck)&&(kt.tagNameCheck=$.tagNameCheck),Pt($,"attributeNameCheck")&&Xl($.attributeNameCheck)&&(kt.attributeNameCheck=$.attributeNameCheck),Pt($,"allowCustomizedBuiltInElements")&&typeof $.allowCustomizedBuiltInElements=="boolean"&&(kt.allowCustomizedBuiltInElements=$.allowCustomizedBuiltInElements),Ut(kt),tr&&(Za=!1),ks&&(Dr=!0),Pr&&(X=mt({},dh),lt=Ur(null),Pr.html===!0&&(mt(X,uh),mt(lt,ph)),Pr.svg===!0&&(mt(X,go),mt(lt,Co),mt(lt,Ls)),Pr.svgFilters===!0&&(mt(X,mo),mt(lt,Co),mt(lt,Ls)),Pr.mathMl===!0&&(mt(X,yo),mt(lt,fh),mt(lt,Ls))),de.tagCheck=null,de.attributeCheck=null,Pt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?de.tagCheck=T.ADD_TAGS:ar(T.ADD_TAGS)&&(X===wt&&(X=Jt(X)),mt(X,T.ADD_TAGS,Lt))),Pt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?de.attributeCheck=T.ADD_ATTR:ar(T.ADD_ATTR)&&(lt===ve&&(lt=Jt(lt)),mt(lt,T.ADD_ATTR,Lt))),Pt(T,"ADD_URI_SAFE_ATTR")&&ar(T.ADD_URI_SAFE_ATTR)&&mt(so,T.ADD_URI_SAFE_ATTR,Lt),Pt(T,"FORBID_CONTENTS")&&ar(T.FORBID_CONTENTS)&&(Le===io&&(Le=Jt(Le)),mt(Le,T.FORBID_CONTENTS,Lt)),Pt(T,"ADD_FORBID_CONTENTS")&&ar(T.ADD_FORBID_CONTENTS)&&(Le===io&&(Le=Jt(Le)),mt(Le,T.ADD_FORBID_CONTENTS,Lt)),eo&&(X["#text"]=!0),gr&&mt(X,["html","head","body"]),X.table&&(mt(X,["tbody"]),delete Je.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=B;B=T.TRUSTED_TYPES_POLICY;try{M=Y("")}catch(tt){throw B=U,tt}}else T.TRUSTED_TYPES_POLICY===null?(B=void 0,M=""):(B===void 0&&(B=P()),B&&typeof M=="string"&&(M=Y("")));Yt&&Yt(T),Nr=T},Vl=mt({},[...go,...mo,...r0]),Zl=mt({},[...yo,...i0]),fy=function(T,$,U){return $.namespaceURI===Fe?T==="svg":$.namespaceURI===ws?T==="svg"&&(U==="annotation-xml"||no[U]):!!Vl[T]},gy=function(T,$,U){return $.namespaceURI===Fe?T==="math":$.namespaceURI===Ss?T==="math"&&lo[U]:!!Zl[T]},my=function(T,$,U){return $.namespaceURI===Ss&&!lo[U]||$.namespaceURI===ws&&!no[U]?!1:!Zl[T]&&(cy[T]||!Vl[T])},yy=function(T){let $=C(T);(!$||!$.tagName)&&($={namespaceURI:Rr,tagName:"template"});const U=qi(T.tagName),tt=qi($.tagName);return oo[T.namespaceURI]?T.namespaceURI===Ss?fy(U,$,tt):T.namespaceURI===ws?gy(U,$,tt):T.namespaceURI===Fe?my(U,$,tt):!!(vi==="application/xhtml+xml"&&oo[T.namespaceURI]):!1},er=function(T){zr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(m(T),!C(T))throw yr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Kl=function(T){const $=y(T);if($){const tt=[];Fi($,ct=>{zr(tt,ct)}),Fi(tt,ct=>{try{m(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{}}},mr=function(T,$){try{zr(t.removed,{attribute:$.getAttributeNode(T),from:$})}catch{zr(t.removed,{attribute:null,from:$})}if($.removeAttribute(T),T==="is")if(Dr||ks)try{er($)}catch{}else try{$.setAttribute(T,"")}catch{}},Cy=function(T){const $=k(T);if($)for(let U=$.length-1;U>=0;--U){const tt=$[U],ct=tt&&tt.name;if(!(typeof ct!="string"||lt[Lt(ct)]))try{T.removeAttribute(ct)}catch{}}},xy=function(T){const $=[T];for(;$.length>0;){const U=$.pop();(w?w(U):U.nodeType)===Ae.element&&Cy(U);const ct=y(U);if(ct)for(let yt=ct.length-1;yt>=0;--yt)$.push(ct[yt])}},Ql=function(T){let $=null,U=null;if(to)T="<remove></remove>"+T;else{const yt=nh(T,/^[\r\n\t ]+/);U=yt&&yt[0]}vi==="application/xhtml+xml"&&Rr===Fe&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const tt=B?Y(T):T;if(Rr===Fe)try{$=new c().parseFromString(tt,vi)}catch{}if(!$||!$.documentElement){$=L.createDocument(Rr,"template",null);try{$.documentElement.innerHTML=ao?M:tt}catch{}}const ct=$.body||$.documentElement;return T&&U&&ct.insertBefore(r.createTextNode(U),ct.childNodes[0]||null),Rr===Fe?_.call($,gr?"html":"body")[0]:gr?$.documentElement:ct},Jl=function(T){return O.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},_s=function(T){return T=Ai(T,ut," "),T=Ai(T,gt," "),T=Ai(T,dt," "),T},co=function(T){var $;T.normalize();const U=O.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let tt=U.nextNode();for(;tt;)tt.data=_s(tt.data),tt=U.nextNode();const ct=($=T.querySelectorAll)===null||$===void 0?void 0:$.call(T,"template");ct&&Fi(ct,yt=>{qr(yt.content)&&co(yt.content)})},Bs=function(T){const $=S?S(T):null;return typeof $!="string"||Lt($)!=="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!==w(T)||T.childNodes!==y(T)},qr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Ae.documentFragment}catch{return!1}},Li=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function ze(G,T,$){G.length!==0&&Fi(G,U=>{U.call(t,T,$,Nr)})}const by=function(T,$){return!!(Bi&&T.hasChildNodes()&&!Li(T.firstElementChild)&&zt(mh,T.textContent)&&zt(mh,T.innerHTML)||Bi&&T.namespaceURI===Fe&&$==="style"&&Li(T.firstElementChild)||T.nodeType===Ae.processingInstruction||Bi&&T.nodeType===Ae.comment&&zt(p0,T.data))},ky=function(T,$){if(!Je[$]&&rh($)&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,$)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck($)))return!1;if(eo&&!Le[$]){const U=C(T),tt=y(T);if(tt&&U){const ct=tt.length;for(let yt=ct-1;yt>=0;--yt){const Dt=ro?tt[yt]:d(tt[yt],!0);U.insertBefore(Dt,g(T))}}}return er(T),!0},th=function(T){if(ze(V.beforeSanitizeElements,T,null),Bs(T))return er(T),!0;const $=Lt(S?S(T):T.nodeName);if(ze(V.uponSanitizeElement,T,{tagName:$,allowedTags:X}),by(T,$))return er(T),!0;if(Je[$]||!(de.tagCheck instanceof Function&&de.tagCheck($))&&!X[$])return ky(T,$);if((w?w(T):T.nodeType)===Ae.element&&!yy(T)||($==="noscript"||$==="noembed"||$==="noframes")&&zt(f0,T.innerHTML))return er(T),!0;if(tr&&T.nodeType===Ae.text){const tt=_s(T.textContent);T.textContent!==tt&&(zr(t.removed,{element:T.cloneNode()}),T.textContent=tt)}return ze(V.afterSanitizeElements,T,null),!1},eh=function(T,$,U){if(Va[$]||ql&&($==="id"||$==="name")&&(U in r||U in py))return!1;const tt=lt[$]||de.attributeCheck instanceof Function&&de.attributeCheck($,T);if(!(Za&&zt(Ct,$))){if(!(Pl&&zt(vt,$))){if(tt){if(!so[$]){if(!zt(et,Ai(U,ne,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&T!=="script"&&lh(U,"data:")===0&&Hl[T])){if(!(Rl&&!zt(qt,Ai(U,ne,"")))){if(U)return!1}}}}}else if(!(rh(T)&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,T)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(T))&&(kt.attributeNameCheck instanceof RegExp&&zt(kt.attributeNameCheck,$)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck($,T))||$==="is"&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,U)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(U))))return!1}}return!0},Ty=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rh=function(T){return!Ty[qi(T)]&&zt(ue,T)},wy=function(T,$,U,tt){if(B&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!U)switch(u.getAttributeType(T,$)){case"TrustedHTML":return Y(tt);case"TrustedScriptURL":return H(tt)}return tt},Sy=function(T,$,U,tt){try{U?T.setAttributeNS(U,$,tt):T.setAttribute($,tt),Bs(T)?er(T):oh(t.removed)}catch{mr($,T)}},ih=function(T){ze(V.beforeSanitizeAttributes,T,null);const $=T.attributes;if(!$||Bs(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lt,forceKeepAttr:void 0};let tt=$.length;const ct=Lt(T.nodeName);for(;tt--;){const yt=$[tt],Dt=yt.name,Et=yt.namespaceURI,pe=yt.value,me=Lt(Dt),po=pe;let Kt=Dt==="value"?po:Vy(po);if(U.attrName=me,U.attrValue=Kt,U.keepAttr=!0,U.forceKeepAttr=void 0,ze(V.uponSanitizeAttribute,T,U),Kt=U.attrValue,zl&&(me==="id"||me==="name")&&lh(Kt,Wl)!==0&&(mr(Dt,T),Kt=Wl+Kt),Bi&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Kt)){mr(Dt,T);continue}if(me==="attributename"&&nh(Kt,"href")){mr(Dt,T);continue}if(!U.forceKeepAttr){if(!U.keepAttr){mr(Dt,T);continue}if(!Nl&&zt(g0,Kt)){mr(Dt,T);continue}if(tr&&(Kt=_s(Kt)),!eh(ct,me,Kt)){mr(Dt,T);continue}Kt=wy(ct,me,Et,Kt),Kt!==po&&Sy(T,Dt,Et,Kt)}}ze(V.afterSanitizeAttributes,T,null)},vs=function(T){let $=null;const U=Jl(T);for(ze(V.beforeSanitizeShadowDOM,T,null);$=U.nextNode();)if(ze(V.uponSanitizeShadowNode,$,null),th($),ih($),qr($.content)&&vs($.content),(w?w($):$.nodeType)===Ae.element){const ct=b($);qr(ct)&&(uo(ct),vs(ct))}ze(V.afterSanitizeShadowDOM,T,null)},uo=function(T){const $=[{node:T,shadow:null}];for(;$.length>0;){const U=$.pop();if(U.shadow){vs(U.shadow);continue}const tt=U.node,yt=(w?w(tt):tt.nodeType)===Ae.element,Dt=y(tt);if(Dt)for(let Et=Dt.length-1;Et>=0;--Et)$.push({node:Dt[Et],shadow:null});if(yt){const Et=S?S(tt):null;if(typeof Et=="string"&&Lt(Et)==="template"){const pe=tt.content;qr(pe)&&$.push({node:pe,shadow:null})}}if(yt){const Et=b(tt);qr(Et)&&$.push({node:null,shadow:Et},{node:Et,shadow:null})}}};return t.sanitize=function(G){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,U=null,tt=null,ct=null;if(ao=!G,ao&&(G="<!-->"),typeof G!="string"&&!Li(G)&&(G=t0(G),typeof G!="string"))throw yr("dirty is not a string, aborting");if(!t.isSupported)return G;Ka?(X=Qa,lt=Ja):ho(T),(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&(X=Jt(X)),V.uponSanitizeAttribute.length>0&&(lt=Jt(lt)),t.removed=[];const yt=ro&&typeof G!="string"&&Li(G);if(yt){const pe=S?S(G):G.nodeName;if(typeof pe=="string"){const me=Lt(pe);if(!X[me]||Je[me])throw yr("root node is forbidden and cannot be sanitized in-place")}if(Bs(G))throw yr("root node is clobbered and cannot be sanitized in-place");try{uo(G)}catch(me){throw Kl(G),me}}else if(Li(G))$=Ql("<!---->"),U=$.ownerDocument.importNode(G,!0),U.nodeType===Ae.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?$=U:$.appendChild(U),uo(U);else{if(!Dr&&!tr&&!gr&&G.indexOf("<")===-1)return B&&Ts?Y(G):G;if($=Ql(G),!$)return Dr?null:Ts?M:""}$&&to&&er($.firstChild);const Dt=Jl(yt?G:$);try{for(;tt=Dt.nextNode();)th(tt),ih(tt),qr(tt.content)&&vs(tt.content)}catch(pe){throw yt&&Kl(G),pe}if(yt)return Fi(t.removed,pe=>{pe.element&&xy(pe.element)}),tr&&co(G),G;if(Dr){if(tr&&co($),ks)for(ct=A.call($.ownerDocument);$.firstChild;)ct.appendChild($.firstChild);else ct=$;return(lt.shadowroot||lt.shadowrootmode)&&(ct=q.call(i,ct,!0)),ct}let Et=gr?$.outerHTML:$.innerHTML;return gr&&X["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&zt(u0,$.ownerDocument.doctype.name)&&(Et="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
4
+ `+Et),tr&&(Et=_s(Et)),B&&Ts?Y(Et):Et},t.setConfig=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ho(G),Ka=!0,Qa=X,Ja=lt},t.clearConfig=function(){Nr=null,Ka=!1,Qa=null,Ja=null,B=v,M=""},t.isValidAttribute=function(G,T,$){Nr||ho({});const U=Lt(G),tt=Lt(T);return eh(U,tt,$)},t.addHook=function(G,T){typeof T=="function"&&Pt(V,G)&&zr(V[G],T)},t.removeHook=function(G,T){if(Pt(V,G)){if(T!==void 0){const $=jy(V[G],T);return $===-1?void 0:Xy(V[G],$,1)[0]}return oh(V[G])}},t.removeHooks=function(G){Pt(V,G)&&(V[G]=[])},t.removeAllHooks=function(){V=yh()},t}var fi=Uc(),Gc=/^-{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,C0=/\s*%%.*\n/gm,ti,jc=(ti=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(ti,"UnknownDiagramError"),ti),Lr={},Dn=f(function(e,t){e=e.replace(Gc,"").replace(Vi,"").replace(C0,`
5
+ `);for(const[r,{detector:i}]of Object.entries(Lr))if(i(e,t))return r;throw new jc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Do=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xc(t,r,i)},"registerLazyLoadedDiagrams"),Xc=f((e,t,r)=>{Lr[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),Lr[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),x0=f(e=>Lr[e].loader,"getDiagramLoader"),Po=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Po(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Po(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ot=Po,Re="#ffffff",Ne="#f2f2f2",ot=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),ei,b0=(ei=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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,P,E,L,O,A,_;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(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 q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=N(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=N(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||F(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||R(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||N(this["cScale"+q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleLabel"+q]=this["cScaleLabel"+q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let q=0;q<5;q++)this["surface"+q]=this["surface"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+q*3)}),this["surfacePeer"+q]=this["surfacePeer"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+q*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:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((d=this.wardley)==null?void 0:d.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((y=this.wardley)==null?void 0:y.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:((w=this.wardley)==null?void 0:w.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:((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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.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:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne,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]})}},f(ei,"Theme"),ei),k0=f(e=>{const t=new b0;return t.calculate(e),t},"getThemeVariables"),ri,T0=(ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=lr(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=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=lr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=lr(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||N(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,P,E,L,O,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=F(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??R(this["cScale"+_],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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.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:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.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:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.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?N(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||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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]})}},f(ri,"Theme"),ri),w0=f(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),ii,S0=(ii=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=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(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=lr(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,P,E,L,O,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||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=N(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||N(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.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:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.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:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((S=this.wardley)==null?void 0:S.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.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:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||N(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(ii,"Theme"),ii),_0=f(e=>{const t=new S0;return t.calculate(e),t},"getThemeVariables"),si,B0=(si=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=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,P,E,L,O,A;this.actorBorder=N(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||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=N(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||N(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(8+_*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.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:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.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:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((S=this.wardley)==null?void 0:S.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.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:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(si,"Theme"),si),v0=f(e=>{const t=new B0;return t.calculate(e),t},"getThemeVariables"),ai,L0=(ai=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=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(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,s,a,o,n,l,h,c,u,p,d,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,P,E,L,O,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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||N(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{l:-(8+_*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=N(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=N(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??this["cScale"+_];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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.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:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.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:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.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=N(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||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(ai,"Theme"),ai),F0=f(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),oi,A0=(oi=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 a,o,n,l,h,c,u,p,d,m,g;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=N(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=N(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||N(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.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||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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(oi,"Theme"),oi),E0=f(e=>{const t=new A0;return t.calculate(e),t},"getThemeVariables"),ni,M0=(ni=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=F(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,s,a,o,n,l,h,c,u,p;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=N(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=N(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(ni,"Theme"),ni),$0=f(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),li,O0=(li=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 a,o,n,l,h,c,u,p,d,m,g;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=N(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=N(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||N(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.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||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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(li,"Theme"),li),I0=f(e=>{const t=new O0;return t.calculate(e),t},"getThemeVariables"),hi,D0=(hi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=F(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,s,a,o,n,l,h,c,u,p;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=N(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=N(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(hi,"Theme"),hi),P0=f(e=>{const t=new D0;return t.calculate(e),t},"getThemeVariables"),ci,R0=(ci=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 a,o,n,l,h,c,u,p,d,m,g;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||N(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.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||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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(ci,"Theme"),ci),N0=f(e=>{const t=new R0;return t.calculate(e),t},"getThemeVariables"),ui,q0=(ui=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=F(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,s,a,o,n,l,h,c,u,p;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||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=N(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*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||_e(this.quadrant1Fill)?R(this.quadrant1Fill):N(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:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.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:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?N(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=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}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]})}},f(ui,"Theme"),ui),z0=f(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),Ge={base:{getThemeVariables:k0},dark:{getThemeVariables:w0},default:{getThemeVariables:_0},forest:{getThemeVariables:v0},neutral:{getThemeVariables:F0},neo:{getThemeVariables:E0},"neo-dark":{getThemeVariables:$0},redux:{getThemeVariables:I0},"redux-dark":{getThemeVariables:P0},"redux-color":{getThemeVariables:N0},"redux-dark-color":{getThemeVariables:z0}},Qt={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},Vc={...Qt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ge.default.getThemeVariables(),sequence:{...Qt.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Qt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Qt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Qt.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Qt.pie,useWidth:984},xyChart:{...Qt.xyChart,useWidth:void 0},requirement:{...Qt.requirement,useWidth:void 0},packet:{...Qt.packet},eventmodeling:{...Qt.eventmodeling},treeView:{...Qt.treeView,useWidth:void 0},radar:{...Qt.radar},ishikawa:{...Qt.ishikawa},sankey:{...Qt.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:{...Qt.venn}},Zc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Zc(e[i],"")]:[...r,t+i],[]),"keyify"),W0=new Set(Zc(Vc,"")),Kc=Vc,Js=f(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Js(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!W0.has(t)||e[t]==null){z.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 s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(z.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else z.debug("sanitizing object",t),Js(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=Qc(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]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),Qc=f(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"),gi=Object.freeze(Kc),Ze=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),se=Ot({},gi),ta,Fr=[],Zi=Ot({},gi),Ea=f((e,t)=>{let r=Ot({},e),i={};for(const s of t)eu(s),i=Ot(i,s);if(r=Ot(r,i),i.theme&&i.theme in Ge){const s=Ot({},ta),a=Ot(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ge&&(r.themeVariables=Ge[r.theme].getThemeVariables(a))}return Zi=r,iu(Zi),Zi},"updateCurrentConfig"),H0=f(e=>(se=Ot({},gi),se=Ot(se,e),e.theme&&Ge[e.theme]&&(se.themeVariables=Ge[e.theme].getThemeVariables(e.themeVariables)),Ea(se,Fr),se),"setSiteConfig"),Y0=f(e=>{ta=Ot({},e)},"saveConfigFromInitialize"),U0=f(e=>(se=Ot(se,e),Ea(se,Fr),se),"updateSiteConfig"),Jc=f(()=>Ot({},se),"getSiteConfig"),tu=f(e=>(iu(e),Ot(Zi,e),Bt()),"setConfig"),Bt=f(()=>Ot({},Zi),"getConfig"),eu=f(e=>{e&&(["secure",...se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&eu(e[t])}))},"sanitize"),G0=f(e=>{var t;Js(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Fr.push(e),Ea(se,Fr)},"addDirective"),ea=f((e=se)=>{Fr=[],Ea(e,Fr)},"reset"),j0={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."},Ch={},ru=f(e=>{Ch[e]||(z.warn(j0[e]),Ch[e]=!0)},"issueWarning"),iu=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ru("LAZY_LOAD_DEPRECATED")},"checkConfig"),cL=f(()=>{let e={};ta&&(e=Ot(e,ta));for(const t of Fr)e=Ot(e,t);return e},"getUserDefinedConfig"),re=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&ru("FLOWCHART_HTML_LABELS_DEPRECATED"),Ze(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ds=/<br\s*\/?>/gi,X0=f(e=>e?ou(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),V0=(()=>{let e=!1;return()=>{e||(su(),e=!0)}})();function su(){const e="data-temp-href-target";fi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),fi.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"))})}f(su,"setupDompurifyHooks");var au=f(e=>(V0(),fi.sanitize(e)),"removeScript"),xh=f((e,t)=>{if(re(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=au(e):r!=="loose"&&(e=ou(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=J0(e))}return e},"sanitizeMore"),Se=f((e,t)=>e&&(t.dompurifyConfig?e=fi.sanitize(xh(e,t),t.dompurifyConfig).toString():e=fi.sanitize(xh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Z0=f((e,t)=>typeof e=="string"?Se(e,t):e.flat().map(r=>Se(r,t)),"sanitizeTextOrArray"),K0=f(e=>ds.test(e),"hasBreaks"),Q0=f(e=>e.split(ds),"splitBreaks"),J0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ou=f(e=>e.replace(ds,"#br#"),"breakToPlaceholder"),tC=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),eC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),rC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),bh=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];iC(a,o)&&(s=a+","+o,i++,r.pop())}r.push(sC(s))}return r.join("")},"parseGenericTypes"),Ro=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),iC=f((e,t)=>{const r=Ro(e,"~"),i=Ro(t,"~");return r===1&&i===1},"shouldCombineSets"),sC=f(e=>{const t=Ro(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),kh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),No=/\$\$(.*)\$\$/g,ts=f(e=>{var t;return(((t=e.match(No))==null?void 0:t.length)??0)>0},"hasKatex"),uL=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await nu(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 s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),aC=f(async(e,t)=>{if(!ts(e))return e;if(!(kh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(No,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:s}=await import("./index-B5WZ0qP1.js").then(a=>a.k);return{default:s}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!kh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ds).map(s=>ts(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(No,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),nu=f(async(e,t)=>Se(await aC(e,t),t),"renderKatexSanitized"),ps={getRows:X0,sanitizeText:Se,sanitizeTextOrArray:Z0,hasBreaks:K0,splitBreaks:Q0,lineBreakRegex:ds,removeScript:au,getUrl:tC,evaluate:Ze,getMax:eC,getMin:rC},oC=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),nC=f(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"),lu=f(function(e,t,r,i){const s=nC(t,r,i);oC(e,s)},"configureSvgSize"),lC=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;z.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,z.info(`Calculated bounds: ${n}x${l}`),lu(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),zs={};function qo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}f(qo,"cssStyleSheetToString");var hC=f((e,t,r,i)=>{let s="";return e in zs&&zs[e]?s=zs[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & {
7
7
  font-family: ${r.fontFamily};
8
8
  font-size: ${r.fontSize};
9
9
  fill: ${r.textColor}
@@ -121,49 +121,49 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
121
121
  }
122
122
 
123
123
  ${t}
124
- `},"getStyles"),q0=f((e,t)=>{t!==void 0&&(Ns[e]=t)},"addStylesForDiagram"),W0=N0,Kc={};cy(Kc,{clear:()=>z0,getAccDescription:()=>G0,getAccTitle:()=>Y0,getDiagramTitle:()=>X0,setAccDescription:()=>U0,setAccTitle:()=>H0,setDiagramTitle:()=>j0});var An="",En="",Mn="",$n=f(e=>_e(e,vt()),"sanitizeText"),z0=f(()=>{An="",Mn="",En=""},"clear"),H0=f(e=>{An=$n(e).replace(/^\s+/g,"")},"setAccTitle"),Y0=f(()=>An,"getAccTitle"),U0=f(e=>{Mn=$n(e).replace(/\n\s+/g,`
125
- `)},"setAccDescription"),G0=f(()=>Mn,"getAccDescription"),j0=f(e=>{En=$n(e)},"setDiagramTitle"),X0=f(()=>En,"getDiagramTitle"),ch=z,V0=Ln,yt=vt,zv=zc,Hv=fi,On=f(e=>_e(e,yt()),"sanitizeText"),Z0=P0,K0=f(()=>Kc,"getCommonDb"),ta={},ea=f((e,t,r)=>{var i;ta[e]&&ch.warn(`Diagram with id ${e} already registered. Overwriting.`),ta[e]=t,r&&Dc(e,r),q0(e,t.styles),(i=t.injectUtils)==null||i.call(t,ch,V0,yt,On,Z0,K0(),()=>{})},"registerDiagram"),Oo=f(e=>{if(e in ta)return ta[e];throw new Q0(e)},"getDiagram"),ui,Q0=(ui=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(ui,"DiagramNotFoundError"),ui),J0={value:()=>{}};function Qc(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new qs(r)}function qs(e){this._=e}function tC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}qs.prototype=Qc.prototype={constructor:qs,on:function(e,t){var r=this._,i=tC(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=eC(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=uh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=uh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new qs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function eC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function uh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=J0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Io="http://www.w3.org/1999/xhtml";const dh={svg:"http://www.w3.org/2000/svg",xhtml:Io,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Aa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),dh.hasOwnProperty(t)?{space:dh[t],local:e}:e}function rC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Io&&t.documentElement.namespaceURI===Io?t.createElement(e):t.createElementNS(r,e)}}function iC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jc(e){var t=Aa(e);return(t.local?iC:rC)(t)}function sC(){}function In(e){return e==null?sC:function(){return this.querySelector(e)}}function aC(e){typeof e!="function"&&(e=In(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,h,c=0;c<o;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new he(i,this._parents)}function oC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function nC(){return[]}function tu(e){return e==null?nC:function(){return this.querySelectorAll(e)}}function lC(e){return function(){return oC(e.apply(this,arguments))}}function hC(e){typeof e=="function"?e=lC(e):e=tu(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),s.push(l));return new he(i,s)}function eu(e){return function(){return this.matches(e)}}function ru(e){return function(t){return t.matches(e)}}var cC=Array.prototype.find;function uC(e){return function(){return cC.call(this.children,e)}}function dC(){return this.firstElementChild}function pC(e){return this.select(e==null?dC:uC(typeof e=="function"?e:ru(e)))}var fC=Array.prototype.filter;function gC(){return Array.from(this.children)}function mC(e){return function(){return fC.call(this.children,e)}}function yC(e){return this.selectAll(e==null?gC:mC(typeof e=="function"?e:ru(e)))}function CC(e){typeof e!="function"&&(e=eu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new he(i,this._parents)}function iu(e){return new Array(e.length)}function xC(){return new he(this._enter||this._groups.map(iu),this._parents)}function ra(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ra.prototype={constructor:ra,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function bC(e){return function(){return e}}function kC(e,t,r,i,s,a){for(var o=0,n,l=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new ra(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function TC(e,t,r,i,s,a,o){var n,l,h=new Map,c=t.length,u=a.length,p=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(p[n]=d=o.call(l,l.__data__,n,t)+"",h.has(d)?s[n]=l:h.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=h.get(d))?(i[n]=l,l.__data__=a[n],h.delete(d)):r[n]=new ra(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function wC(e){return e.__data__}function SC(e,t){if(!arguments.length)return Array.from(this,wC);var r=t?TC:kC,i=this._parents,s=this._groups;typeof e!="function"&&(e=bC(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],p=u.length,d=_C(e.call(c,c&&c.__data__,h,i)),m=d.length,g=n[h]=new Array(m),y=o[h]=new Array(m),C=l[h]=new Array(p);r(c,u,g,y,C,d,t);for(var b=0,k=0,w,S;b<m;++b)if(w=g[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<m;);w._next=S||null}}return o=new he(o,i),o._enter=n,o._exit=l,o}function _C(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function BC(){return new he(this._exit||this._groups.map(iu),this._parents)}function vC(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function LC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var h=r[l],c=i[l],u=h.length,p=n[l]=new Array(u),d,m=0;m<u;++m)(d=h[m]||c[m])&&(p[m]=d);for(;l<s;++l)n[l]=r[l];return new he(n,this._parents)}function FC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function AC(e){e||(e=EC);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new he(s,this._parents).order()}function EC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function MC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function $C(){return Array.from(this)}function OC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function IC(){let e=0;for(const t of this)++e;return e}function DC(){return!this.node()}function RC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function PC(e){return function(){this.removeAttribute(e)}}function NC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qC(e,t){return function(){this.setAttribute(e,t)}}function WC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function zC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function HC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function YC(e,t){var r=Aa(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?NC:PC:typeof t=="function"?r.local?HC:zC:r.local?WC:qC)(r,t))}function su(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function UC(e){return function(){this.style.removeProperty(e)}}function GC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function jC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function XC(e,t,r){return arguments.length>1?this.each((t==null?UC:typeof t=="function"?jC:GC)(e,t,r??"")):gi(this.node(),e)}function gi(e,t){return e.style.getPropertyValue(t)||su(e).getComputedStyle(e,null).getPropertyValue(t)}function VC(e){return function(){delete this[e]}}function ZC(e,t){return function(){this[e]=t}}function KC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function QC(e,t){return arguments.length>1?this.each((t==null?VC:typeof t=="function"?KC:ZC)(e,t)):this.node()[e]}function au(e){return e.trim().split(/^|\s+/)}function Dn(e){return e.classList||new ou(e)}function ou(e){this._node=e,this._names=au(e.getAttribute("class")||"")}ou.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function nu(e,t){for(var r=Dn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function lu(e,t){for(var r=Dn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function JC(e){return function(){nu(this,e)}}function tx(e){return function(){lu(this,e)}}function ex(e,t){return function(){(t.apply(this,arguments)?nu:lu)(this,e)}}function rx(e,t){var r=au(e+"");if(arguments.length<2){for(var i=Dn(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?ex:t?JC:tx)(r,t))}function ix(){this.textContent=""}function sx(e){return function(){this.textContent=e}}function ax(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ox(e){return arguments.length?this.each(e==null?ix:(typeof e=="function"?ax:sx)(e)):this.node().textContent}function nx(){this.innerHTML=""}function lx(e){return function(){this.innerHTML=e}}function hx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function cx(e){return arguments.length?this.each(e==null?nx:(typeof e=="function"?hx:lx)(e)):this.node().innerHTML}function ux(){this.nextSibling&&this.parentNode.appendChild(this)}function dx(){return this.each(ux)}function px(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fx(){return this.each(px)}function gx(e){var t=typeof e=="function"?e:Jc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function mx(){return null}function yx(e,t){var r=typeof e=="function"?e:Jc(e),i=t==null?mx:typeof t=="function"?t:In(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Cx(){var e=this.parentNode;e&&e.removeChild(this)}function xx(){return this.each(Cx)}function bx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function kx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Tx(e){return this.select(e?kx:bx)}function wx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Sx(e){return function(t){e.call(this,t,this.__data__)}}function _x(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Bx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function vx(e,t,r){return function(){var i=this.__on,s,a=Sx(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function Lx(e,t,r){var i=_x(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<a;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?vx:Bx,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function hu(e,t,r){var i=su(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Fx(e,t){return function(){return hu(this,e,t)}}function Ax(e,t){return function(){return hu(this,e,t.apply(this,arguments))}}function Ex(e,t){return this.each((typeof t=="function"?Ax:Fx)(e,t))}function*Mx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var cu=[null];function he(e,t){this._groups=e,this._parents=t}function ds(){return new he([[document.documentElement]],cu)}function $x(){return this}he.prototype=ds.prototype={constructor:he,select:aC,selectAll:hC,selectChild:pC,selectChildren:yC,filter:CC,data:SC,enter:xC,exit:BC,join:vC,merge:LC,selection:$x,order:FC,sort:AC,call:MC,nodes:$C,node:OC,size:IC,empty:DC,each:RC,attr:YC,style:XC,property:QC,classed:rx,text:ox,html:cx,raise:dx,lower:fx,append:gx,insert:yx,remove:xx,clone:Tx,datum:wx,on:Lx,dispatch:Ex,[Symbol.iterator]:Mx};function ht(e){return typeof e=="string"?new he([[document.querySelector(e)]],[document.documentElement]):new he([[e]],cu)}function Rn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function uu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ps(){}var Ji=.7,ia=1/Ji,Kr="\\s*([+-]?\\d+)\\s*",ts="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ox=/^#([0-9a-f]{3,8})$/,Ix=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),Dx=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),Rx=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${ts}\\)$`),Px=new RegExp(`^rgba\\(${De},${De},${De},${ts}\\)$`),Nx=new RegExp(`^hsl\\(${ts},${De},${De}\\)$`),qx=new RegExp(`^hsla\\(${ts},${De},${De},${ts}\\)$`),ph={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Rn(ps,es,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fh,formatHex:fh,formatHex8:Wx,formatHsl:zx,formatRgb:gh,toString:gh});function fh(){return this.rgb().formatHex()}function Wx(){return this.rgb().formatHex8()}function zx(){return du(this).formatHsl()}function gh(){return this.rgb().formatRgb()}function es(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ox.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?mh(t):r===3?new oe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?vs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?vs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ix.exec(e))?new oe(t[1],t[2],t[3],1):(t=Dx.exec(e))?new oe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Rx.exec(e))?vs(t[1],t[2],t[3],t[4]):(t=Px.exec(e))?vs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Nx.exec(e))?xh(t[1],t[2]/100,t[3]/100,1):(t=qx.exec(e))?xh(t[1],t[2]/100,t[3]/100,t[4]):ph.hasOwnProperty(e)?mh(ph[e]):e==="transparent"?new oe(NaN,NaN,NaN,0):null}function mh(e){return new oe(e>>16&255,e>>8&255,e&255,1)}function vs(e,t,r,i){return i<=0&&(e=t=r=NaN),new oe(e,t,r,i)}function Hx(e){return e instanceof ps||(e=es(e)),e?(e=e.rgb(),new oe(e.r,e.g,e.b,e.opacity)):new oe}function Do(e,t,r,i){return arguments.length===1?Hx(e):new oe(e,t,r,i??1)}function oe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Rn(oe,Do,uu(ps,{brighter(e){return e=e==null?ia:Math.pow(ia,e),new oe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ji:Math.pow(Ji,e),new oe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oe(Tr(this.r),Tr(this.g),Tr(this.b),sa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:yh,formatHex:yh,formatHex8:Yx,formatRgb:Ch,toString:Ch}));function yh(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}`}function Yx(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}${xr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ch(){const e=sa(this.opacity);return`${e===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${e===1?")":`, ${e})`}`}function sa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xr(e){return e=Tr(e),(e<16?"0":"")+e.toString(16)}function xh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,i)}function du(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof ps||(e=es(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new ke(o,n,l,e.opacity)}function Ux(e,t,r,i){return arguments.length===1?du(e):new ke(e,t,r,i??1)}function ke(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Rn(ke,Ux,uu(ps,{brighter(e){return e=e==null?ia:Math.pow(ia,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ji:Math.pow(Ji,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new oe(uo(e>=240?e-240:e+120,s,i),uo(e,s,i),uo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ke(bh(this.h),Ls(this.s),Ls(this.l),sa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=sa(this.opacity);return`${e===1?"hsl(":"hsla("}${bh(this.h)}, ${Ls(this.s)*100}%, ${Ls(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bh(e){return e=(e||0)%360,e<0?e+360:e}function Ls(e){return Math.max(0,Math.min(1,e||0))}function uo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Pn=e=>()=>e;function pu(e,t){return function(r){return e+r*t}}function Gx(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function Yv(e,t){var r=t-e;return r?pu(e,r>180||r<-180?r-360*Math.round(r/360):r):Pn(isNaN(e)?t:e)}function jx(e){return(e=+e)==1?fu:function(t,r){return r-t?Gx(t,r,e):Pn(isNaN(t)?r:t)}}function fu(e,t){var r=t-e;return r?pu(e,r):Pn(isNaN(e)?t:e)}const kh=function e(t){var r=jx(t);function i(s,a){var o=r((s=Do(s)).r,(a=Do(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=fu(s.opacity,a.opacity);return function(c){return s.r=o(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i}(1);function er(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ro=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,po=new RegExp(Ro.source,"g");function Xx(e){return function(){return e}}function Vx(e){return function(t){return e(t)+""}}function Zx(e,t){var r=Ro.lastIndex=po.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Ro.exec(e))&&(s=po.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:er(i,s)})),r=po.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Vx(l[0].x):Xx(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}var Th=180/Math.PI,Po={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gu(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*Th,skewX:Math.atan(l)*Th,scaleX:o,scaleY:n}}var Fs;function Kx(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Po:gu(t.a,t.b,t.c,t.d,t.e,t.f)}function Qx(e){return e==null||(Fs||(Fs=document.createElementNS("http://www.w3.org/2000/svg","g")),Fs.setAttribute("transform",e),!(e=Fs.transform.baseVal.consolidate()))?Po:(e=e.matrix,gu(e.a,e.b,e.c,e.d,e.e,e.f))}function mu(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push("translate(",null,t,null,r);m.push({i:g-4,x:er(h,u)},{i:g-2,x:er(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function o(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:er(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:er(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:er(h,u)},{i:g-2,x:er(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,p),o(h.rotate,c.rotate,u,p),n(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=null,function(d){for(var m=-1,g=p.length,y;++m<g;)u[(y=p[m]).i]=y.x(d);return u.join("")}}}var Jx=mu(Kx,"px, ","px)","deg)"),tb=mu(Qx,", ",")",")"),mi=0,Ni=0,Ai=0,yu=1e3,aa,qi,oa=0,Br=0,Ea=0,rs=typeof performance=="object"&&performance.now?performance:Date,Cu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nn(){return Br||(Cu(eb),Br=rs.now()+Ea)}function eb(){Br=0}function na(){this._call=this._time=this._next=null}na.prototype=xu.prototype={constructor:na,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Nn():+r)+(t==null?0:+t),!this._next&&qi!==this&&(qi?qi._next=this:aa=this,qi=this),this._call=e,this._time=r,No()},stop:function(){this._call&&(this._call=null,this._time=1/0,No())}};function xu(e,t,r){var i=new na;return i.restart(e,t,r),i}function rb(){Nn(),++mi;for(var e=aa,t;e;)(t=Br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--mi}function wh(){Br=(oa=rs.now())+Ea,mi=Ni=0;try{rb()}finally{mi=0,sb(),Br=0}}function ib(){var e=rs.now(),t=e-oa;t>yu&&(Ea-=t,oa=e)}function sb(){for(var e,t=aa,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:aa=r);qi=e,No(i)}function No(e){if(!mi){Ni&&(Ni=clearTimeout(Ni));var t=e-Br;t>24?(e<1/0&&(Ni=setTimeout(wh,e-rs.now()-Ea)),Ai&&(Ai=clearInterval(Ai))):(Ai||(oa=rs.now(),Ai=setInterval(ib,yu)),mi=1,Cu(wh))}}function Sh(e,t,r){var i=new na;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var ab=Qc("start","end","cancel","interrupt"),ob=[],bu=0,_h=1,qo=2,Ws=3,Bh=4,Wo=5,zs=6;function Ma(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;nb(e,r,{name:t,index:i,group:s,on:ab,tween:ob,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:bu})}function qn(e,t){var r=ve(e,t);if(r.state>bu)throw new Error("too late; already scheduled");return r}function We(e,t){var r=ve(e,t);if(r.state>Ws)throw new Error("too late; already running");return r}function ve(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function nb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=xu(a,0,r.time);function a(h){r.state=_h,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,p,d;if(r.state!==_h)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Ws)return Sh(o);d.state===Bh?(d.state=zs,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=zs,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Sh(function(){r.state===Ws&&(r.state=Bh,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=qo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===qo){for(r.state=Ws,s=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Wo,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===Wo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=zs,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function lb(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>qo&&i.state<Wo,i.state=zs,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function hb(e){return this.each(function(){lb(this,e)})}function cb(e,t){var r,i;return function(){var s=We(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function ub(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=We(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}a.tween=s}}function db(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ve(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?cb:ub)(r,e,t))}function Wn(e,t,r){var i=e._id;return e.each(function(){var s=We(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return ve(s,i).value[t]}}function ku(e,t){var r;return(typeof t=="number"?er:t instanceof es?kh:(r=es(t))?(t=r,kh):Zx)(e,t)}function pb(e){return function(){this.removeAttribute(e)}}function fb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function mb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function yb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Cb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function xb(e,t){var r=Aa(e),i=r==="transform"?tb:ku;return this.attrTween(e,typeof t=="function"?(r.local?Cb:yb)(r,i,Wn(this,"attr."+e,t)):t==null?(r.local?fb:pb)(r):(r.local?mb:gb)(r,i,t))}function bb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function kb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Tb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&kb(e,a)),r}return s._value=t,s}function wb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&bb(e,a)),r}return s._value=t,s}function Sb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Aa(e);return this.tween(r,(i.local?Tb:wb)(i,t))}function _b(e,t){return function(){qn(this,e).delay=+t.apply(this,arguments)}}function Bb(e,t){return t=+t,function(){qn(this,e).delay=t}}function vb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_b:Bb)(t,e)):ve(this.node(),t).delay}function Lb(e,t){return function(){We(this,e).duration=+t.apply(this,arguments)}}function Fb(e,t){return t=+t,function(){We(this,e).duration=t}}function Ab(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Lb:Fb)(t,e)):ve(this.node(),t).duration}function Eb(e,t){if(typeof t!="function")throw new Error;return function(){We(this,e).ease=t}}function Mb(e){var t=this._id;return arguments.length?this.each(Eb(t,e)):ve(this.node(),t).ease}function $b(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;We(this,e).ease=r}}function Ob(e){if(typeof e!="function")throw new Error;return this.each($b(this._id,e))}function Ib(e){typeof e!="function"&&(e=eu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new Ve(i,this._parents,this._name,this._id)}function Db(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],h=r[n],c=l.length,u=o[n]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;n<i;++n)o[n]=t[n];return new Ve(o,this._parents,this._name,this._id)}function Rb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Pb(e,t,r){var i,s,a=Rb(t)?qn:We;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function Nb(e,t){var r=this._id;return arguments.length<2?ve(this.node(),r).on.on(e):this.each(Pb(r,e,t))}function qb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Wb(){return this.on("end.remove",qb(this._id))}function zb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=In(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,h=a[o]=new Array(l),c,u,p=0;p<l;++p)(c=n[p])&&(u=e.call(c,c.__data__,p,n))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,Ma(h[p],t,r,p,h,ve(c,r)));return new Ve(a,this._parents,t,r)}function Hb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=tu(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,m=ve(c,r),g=0,y=p.length;g<y;++g)(d=p[g])&&Ma(d,t,r,g,p,m);a.push(p),o.push(c)}return new Ve(a,o,t,r)}var Yb=ds.prototype.constructor;function Ub(){return new Yb(this._groups,this._parents)}function Gb(e,t){var r,i,s;return function(){var a=gi(this,e),o=(this.style.removeProperty(e),gi(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function Tu(e){return function(){this.style.removeProperty(e)}}function jb(e,t,r){var i,s=r+"",a;return function(){var o=gi(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Xb(e,t,r){var i,s,a;return function(){var o=gi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),gi(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Vb(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=We(this,e),h=l.on,c=l.value[a]==null?n||(n=Tu(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function Zb(e,t,r){var i=(e+="")=="transform"?Jx:ku;return t==null?this.styleTween(e,Gb(e,i)).on("end.style."+e,Tu(e)):typeof t=="function"?this.styleTween(e,Xb(e,i,Wn(this,"style."+e,t))).each(Vb(this._id,e)):this.styleTween(e,jb(e,i,t),r).on("end.style."+e,null)}function Kb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Qb(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Kb(e,o,r)),i}return a._value=t,a}function Jb(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Qb(e,t,r??""))}function tk(e){return function(){this.textContent=e}}function ek(e){return function(){var t=e(this);this.textContent=t??""}}function rk(e){return this.tween("text",typeof e=="function"?ek(Wn(this,"text",e)):tk(e==null?"":e+""))}function ik(e){return function(t){this.textContent=e.call(this,t)}}function sk(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&ik(s)),t}return i._value=e,i}function ak(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sk(e))}function ok(){for(var e=this._name,t=this._id,r=wu(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=ve(l,t);Ma(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ve(i,this._parents,e,r)}function nk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var h=We(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&a()})}var lk=0;function Ve(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function wu(){return++lk}var Ye=ds.prototype;Ve.prototype={constructor:Ve,select:zb,selectAll:Hb,selectChild:Ye.selectChild,selectChildren:Ye.selectChildren,filter:Ib,merge:Db,selection:Ub,transition:ok,call:Ye.call,nodes:Ye.nodes,node:Ye.node,size:Ye.size,empty:Ye.empty,each:Ye.each,on:Nb,attr:xb,attrTween:Sb,style:Zb,styleTween:Jb,text:rk,textTween:ak,remove:Wb,tween:db,delay:vb,duration:Ab,ease:Mb,easeVarying:Ob,end:nk,[Symbol.iterator]:Ye[Symbol.iterator]};function hk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ck={time:null,delay:0,duration:250,ease:hk};function uk(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function dk(e){var t,r;e instanceof Ve?(t=e._id,e=e._name):(t=wu(),(r=ck).time=Nn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&Ma(l,e,t,h,o,r||uk(l,t));return new Ve(i,this._parents,e,t)}ds.prototype.interrupt=hb;ds.prototype.transition=dk;const zo=Math.PI,Ho=2*zo,mr=1e-6,pk=Ho-mr;function Su(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function fk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Su;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class gk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Su:fk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,h=s-r,c=o-t,u=n-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>mr)if(!(Math.abs(u*l-h*c)>mr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,g=l*l+h*h,y=d*d+m*m,C=Math.sqrt(g),b=Math.sqrt(p),k=a*Math.tan((zo-Math.acos((g+p-y)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>mr&&this._append`L${t+w*c},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>c*m)},${this._x1=t+S*l},${this._y1=r+S*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>mr||Math.abs(this._y1-c)>mr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%Ho+Ho),p>pk?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>mr&&this._append`A${i},${i},0,${+(p>=zo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Wr(e){return function(){return e}}const Uv=Math.abs,Gv=Math.atan2,jv=Math.cos,Xv=Math.max,Vv=Math.min,Zv=Math.sin,Kv=Math.sqrt,vh=1e-12,zn=Math.PI,Lh=zn/2,Qv=2*zn;function Jv(e){return e>1?0:e<-1?zn:Math.acos(e)}function tL(e){return e>=1?Lh:e<=-1?-Lh:Math.asin(e)}function mk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new gk(t)}function yk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _u(e){this._context=e}_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new _u(e)}function Ck(e){return e[0]}function xk(e){return e[1]}function bk(e,t){var r=Wr(!0),i=null,s=Vi,a=null,o=mk(n);e=typeof e=="function"?e:e===void 0?Ck:Wr(e),t=typeof t=="function"?t:t===void 0?xk:Wr(t);function n(l){var h,c=(l=yk(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,h,l),+t(u,h,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Wr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Wr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Wr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class Bu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function vu(e){return new Bu(e,!0)}function Lu(e){return new Bu(e,!1)}function or(){}function la(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function $a(e){this._context=e}$a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:la(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:la(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yo(e){return new $a(e)}function Fu(e){this._context=e}Fu.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:la(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kk(e){return new Fu(e)}function Au(e){this._context=e}Au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:la(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tk(e){return new Au(e)}function Eu(e,t){this._basis=new $a(e),this._beta=t}Eu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const wk=function e(t){function r(i){return t===1?new $a(i):new Eu(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ha(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Hn(e,t){this._context=e,this._k=(1-t)/6}Hn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ha(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ha(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Mu=function e(t){function r(i){return new Hn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Yn(e,t){this._context=e,this._k=(1-t)/6}Yn.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ha(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Sk=function e(t){function r(i){return new Yn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Un(e,t){this._context=e,this._k=(1-t)/6}Un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ha(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _k=function e(t){function r(i){return new Un(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Gn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>vh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>vh){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function $u(e,t){this._context=e,this._alpha=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Gn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ou=function e(t){function r(i){return t?new $u(i,t):new Hn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Iu(e,t){this._context=e,this._alpha=t}Iu.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Gn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bk=function e(t){function r(i){return t?new Iu(i,t):new Yn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Du(e,t){this._context=e,this._alpha=t}Du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vk=function e(t){function r(i){return t?new Du(i,t):new Un(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Ru(e){this._context=e}Ru.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Lk(e){return new Ru(e)}function Fh(e){return e<0?-1:1}function Ah(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(Fh(a)+Fh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Eh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function fo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function ca(e){this._context=e}ca.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fo(this,this._t0,Eh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fo(this,Eh(this,r=Ah(this,e,t)),r);break;default:fo(this,this._t0,r=Ah(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Pu(e){this._context=new Nu(e)}(Pu.prototype=Object.create(ca.prototype)).point=function(e,t){ca.prototype.point.call(this,t,e)};function Nu(e){this._context=e}Nu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function qu(e){return new ca(e)}function Wu(e){return new Pu(e)}function zu(e){this._context=e}zu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Mh(e),s=Mh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Mh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function Hu(e){return new zu(e)}function Oa(e,t){this._context=e,this._t=t}Oa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Yu(e){return new Oa(e,.5)}function Uu(e){return new Oa(e,0)}function Gu(e){return new Oa(e,1)}function Wi(e,t,r){this.k=e,this.x=t,this.y=r}Wi.prototype={constructor:Wi,scale:function(e){return e===1?this:new Wi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Wi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Wi.prototype;var Fk=f(e=>{var s;const{securityLevel:t}=yt();let r=ht("body");if(t==="sandbox"){const o=((s=ht(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function jn(e){return typeof e>"u"||e===null}f(jn,"isNothing");function ju(e){return typeof e=="object"&&e!==null}f(ju,"isObject");function Xu(e){return Array.isArray(e)?e:jn(e)?[]:[e]}f(Xu,"toArray");function Vu(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}f(Vu,"extend");function Zu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(Zu,"repeat");function Ku(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Ku,"isNegativeZero");var Ak=jn,Ek=ju,Mk=Xu,$k=Zu,Ok=Ku,Ik=Vu,Rt={isNothing:Ak,isObject:Ek,toArray:Mk,repeat:$k,isNegativeZero:Ok,extend:Ik};function Xn(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+=`
124
+ `},"getStyles"),cC=f((e,t)=>{t!==void 0&&(zs[e]=t)},"addStylesForDiagram"),uC=hC,hu={};Ey(hu,{clear:()=>dC,getAccDescription:()=>mC,getAccTitle:()=>fC,getDiagramTitle:()=>CC,setAccDescription:()=>gC,setAccTitle:()=>pC,setDiagramTitle:()=>yC});var Pn="",Rn="",Nn="",qn=f(e=>Se(e,Bt()),"sanitizeText"),dC=f(()=>{Pn="",Nn="",Rn=""},"clear"),pC=f(e=>{Pn=qn(e).replace(/^\s+/g,"")},"setAccTitle"),fC=f(()=>Pn,"getAccTitle"),gC=f(e=>{Nn=qn(e).replace(/\n\s+/g,`
125
+ `)},"setAccDescription"),mC=f(()=>Nn,"getAccDescription"),yC=f(e=>{Rn=qn(e)},"setDiagramTitle"),CC=f(()=>Rn,"getDiagramTitle"),Th=z,xC=In,xt=Bt,dL=tu,pL=gi,zn=f(e=>Se(e,xt()),"sanitizeText"),bC=lC,kC=f(()=>hu,"getCommonDb"),ra={},ia=f((e,t,r)=>{var i;ra[e]&&Th.warn(`Diagram with id ${e} already registered. Overwriting.`),ra[e]=t,r&&Xc(e,r),cC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Th,xC,xt,zn,bC,kC(),()=>{})},"registerDiagram"),zo=f(e=>{if(e in ra)return ra[e];throw new TC(e)},"getDiagram"),di,TC=(di=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(di,"DiagramNotFoundError"),di),wC={value:()=>{}};function cu(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ws(r)}function Ws(e){this._=e}function SC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ws.prototype=cu.prototype={constructor:Ws,on:function(e,t){var r=this._,i=SC(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=_C(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=wh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=wh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ws(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function _C(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function wh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=wC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Wo="http://www.w3.org/1999/xhtml";const Sh={svg:"http://www.w3.org/2000/svg",xhtml:Wo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ma(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Sh.hasOwnProperty(t)?{space:Sh[t],local:e}:e}function BC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Wo&&t.documentElement.namespaceURI===Wo?t.createElement(e):t.createElementNS(r,e)}}function vC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uu(e){var t=Ma(e);return(t.local?vC:BC)(t)}function LC(){}function Wn(e){return e==null?LC:function(){return this.querySelector(e)}}function FC(e){typeof e!="function"&&(e=Wn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,h,c=0;c<o;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new ce(i,this._parents)}function AC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function EC(){return[]}function du(e){return e==null?EC:function(){return this.querySelectorAll(e)}}function MC(e){return function(){return AC(e.apply(this,arguments))}}function $C(e){typeof e=="function"?e=MC(e):e=du(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),s.push(l));return new ce(i,s)}function pu(e){return function(){return this.matches(e)}}function fu(e){return function(t){return t.matches(e)}}var OC=Array.prototype.find;function IC(e){return function(){return OC.call(this.children,e)}}function DC(){return this.firstElementChild}function PC(e){return this.select(e==null?DC:IC(typeof e=="function"?e:fu(e)))}var RC=Array.prototype.filter;function NC(){return Array.from(this.children)}function qC(e){return function(){return RC.call(this.children,e)}}function zC(e){return this.selectAll(e==null?NC:qC(typeof e=="function"?e:fu(e)))}function WC(e){typeof e!="function"&&(e=pu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new ce(i,this._parents)}function gu(e){return new Array(e.length)}function HC(){return new ce(this._enter||this._groups.map(gu),this._parents)}function sa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}sa.prototype={constructor:sa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function YC(e){return function(){return e}}function UC(e,t,r,i,s,a){for(var o=0,n,l=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new sa(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function GC(e,t,r,i,s,a,o){var n,l,h=new Map,c=t.length,u=a.length,p=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(p[n]=d=o.call(l,l.__data__,n,t)+"",h.has(d)?s[n]=l:h.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=h.get(d))?(i[n]=l,l.__data__=a[n],h.delete(d)):r[n]=new sa(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function jC(e){return e.__data__}function XC(e,t){if(!arguments.length)return Array.from(this,jC);var r=t?GC:UC,i=this._parents,s=this._groups;typeof e!="function"&&(e=YC(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],p=u.length,d=VC(e.call(c,c&&c.__data__,h,i)),m=d.length,g=n[h]=new Array(m),y=o[h]=new Array(m),C=l[h]=new Array(p);r(c,u,g,y,C,d,t);for(var b=0,k=0,w,S;b<m;++b)if(w=g[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<m;);w._next=S||null}}return o=new ce(o,i),o._enter=n,o._exit=l,o}function VC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ZC(){return new ce(this._exit||this._groups.map(gu),this._parents)}function KC(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function QC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var h=r[l],c=i[l],u=h.length,p=n[l]=new Array(u),d,m=0;m<u;++m)(d=h[m]||c[m])&&(p[m]=d);for(;l<s;++l)n[l]=r[l];return new ce(n,this._parents)}function JC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function tx(e){e||(e=ex);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new ce(s,this._parents).order()}function ex(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function rx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ix(){return Array.from(this)}function sx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function ax(){let e=0;for(const t of this)++e;return e}function ox(){return!this.node()}function nx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function lx(e){return function(){this.removeAttribute(e)}}function hx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function cx(e,t){return function(){this.setAttribute(e,t)}}function ux(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function dx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function px(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function fx(e,t){var r=Ma(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?hx:lx:typeof t=="function"?r.local?px:dx:r.local?ux:cx)(r,t))}function mu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gx(e){return function(){this.style.removeProperty(e)}}function mx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function yx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Cx(e,t,r){return arguments.length>1?this.each((t==null?gx:typeof t=="function"?yx:mx)(e,t,r??"")):mi(this.node(),e)}function mi(e,t){return e.style.getPropertyValue(t)||mu(e).getComputedStyle(e,null).getPropertyValue(t)}function xx(e){return function(){delete this[e]}}function bx(e,t){return function(){this[e]=t}}function kx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Tx(e,t){return arguments.length>1?this.each((t==null?xx:typeof t=="function"?kx:bx)(e,t)):this.node()[e]}function yu(e){return e.trim().split(/^|\s+/)}function Hn(e){return e.classList||new Cu(e)}function Cu(e){this._node=e,this._names=yu(e.getAttribute("class")||"")}Cu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function xu(e,t){for(var r=Hn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function bu(e,t){for(var r=Hn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function wx(e){return function(){xu(this,e)}}function Sx(e){return function(){bu(this,e)}}function _x(e,t){return function(){(t.apply(this,arguments)?xu:bu)(this,e)}}function Bx(e,t){var r=yu(e+"");if(arguments.length<2){for(var i=Hn(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?_x:t?wx:Sx)(r,t))}function vx(){this.textContent=""}function Lx(e){return function(){this.textContent=e}}function Fx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ax(e){return arguments.length?this.each(e==null?vx:(typeof e=="function"?Fx:Lx)(e)):this.node().textContent}function Ex(){this.innerHTML=""}function Mx(e){return function(){this.innerHTML=e}}function $x(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ox(e){return arguments.length?this.each(e==null?Ex:(typeof e=="function"?$x:Mx)(e)):this.node().innerHTML}function Ix(){this.nextSibling&&this.parentNode.appendChild(this)}function Dx(){return this.each(Ix)}function Px(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rx(){return this.each(Px)}function Nx(e){var t=typeof e=="function"?e:uu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function qx(){return null}function zx(e,t){var r=typeof e=="function"?e:uu(e),i=t==null?qx:typeof t=="function"?t:Wn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Wx(){var e=this.parentNode;e&&e.removeChild(this)}function Hx(){return this.each(Wx)}function Yx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ux(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gx(e){return this.select(e?Ux:Yx)}function jx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Xx(e){return function(t){e.call(this,t,this.__data__)}}function Vx(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Zx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function Kx(e,t,r){return function(){var i=this.__on,s,a=Xx(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function Qx(e,t,r){var i=Vx(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<a;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?Kx:Zx,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function ku(e,t,r){var i=mu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Jx(e,t){return function(){return ku(this,e,t)}}function tb(e,t){return function(){return ku(this,e,t.apply(this,arguments))}}function eb(e,t){return this.each((typeof t=="function"?tb:Jx)(e,t))}function*rb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var Tu=[null];function ce(e,t){this._groups=e,this._parents=t}function fs(){return new ce([[document.documentElement]],Tu)}function ib(){return this}ce.prototype=fs.prototype={constructor:ce,select:FC,selectAll:$C,selectChild:PC,selectChildren:zC,filter:WC,data:XC,enter:HC,exit:ZC,join:KC,merge:QC,selection:ib,order:JC,sort:tx,call:rx,nodes:ix,node:sx,size:ax,empty:ox,each:nx,attr:fx,style:Cx,property:Tx,classed:Bx,text:Ax,html:Ox,raise:Dx,lower:Rx,append:Nx,insert:zx,remove:Hx,clone:Gx,datum:jx,on:Qx,dispatch:eb,[Symbol.iterator]:rb};function ht(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],Tu)}function Yn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function gs(){}var es=.7,aa=1/es,Qr="\\s*([+-]?\\d+)\\s*",rs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sb=/^#([0-9a-f]{3,8})$/,ab=new RegExp(`^rgb\\(${Qr},${Qr},${Qr}\\)$`),ob=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),nb=new RegExp(`^rgba\\(${Qr},${Qr},${Qr},${rs}\\)$`),lb=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${rs}\\)$`),hb=new RegExp(`^hsl\\(${rs},${Ie},${Ie}\\)$`),cb=new RegExp(`^hsla\\(${rs},${Ie},${Ie},${rs}\\)$`),_h={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Yn(gs,is,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bh,formatHex:Bh,formatHex8:ub,formatHsl:db,formatRgb:vh,toString:vh});function Bh(){return this.rgb().formatHex()}function ub(){return this.rgb().formatHex8()}function db(){return Su(this).formatHsl()}function vh(){return this.rgb().formatRgb()}function is(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=sb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Lh(t):r===3?new oe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ab.exec(e))?new oe(t[1],t[2],t[3],1):(t=ob.exec(e))?new oe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nb.exec(e))?Fs(t[1],t[2],t[3],t[4]):(t=lb.exec(e))?Fs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hb.exec(e))?Eh(t[1],t[2]/100,t[3]/100,1):(t=cb.exec(e))?Eh(t[1],t[2]/100,t[3]/100,t[4]):_h.hasOwnProperty(e)?Lh(_h[e]):e==="transparent"?new oe(NaN,NaN,NaN,0):null}function Lh(e){return new oe(e>>16&255,e>>8&255,e&255,1)}function Fs(e,t,r,i){return i<=0&&(e=t=r=NaN),new oe(e,t,r,i)}function pb(e){return e instanceof gs||(e=is(e)),e?(e=e.rgb(),new oe(e.r,e.g,e.b,e.opacity)):new oe}function Ho(e,t,r,i){return arguments.length===1?pb(e):new oe(e,t,r,i??1)}function oe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Yn(oe,Ho,wu(gs,{brighter(e){return e=e==null?aa:Math.pow(aa,e),new oe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?es:Math.pow(es,e),new oe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oe(Br(this.r),Br(this.g),Br(this.b),oa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fh,formatHex:Fh,formatHex8:fb,formatRgb:Ah,toString:Ah}));function Fh(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}`}function fb(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}${wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ah(){const e=oa(this.opacity);return`${e===1?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${e===1?")":`, ${e})`}`}function oa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Br(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wr(e){return e=Br(e),(e<16?"0":"")+e.toString(16)}function Eh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new be(e,t,r,i)}function Su(e){if(e instanceof be)return new be(e.h,e.s,e.l,e.opacity);if(e instanceof gs||(e=is(e)),!e)return new be;if(e instanceof be)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new be(o,n,l,e.opacity)}function gb(e,t,r,i){return arguments.length===1?Su(e):new be(e,t,r,i??1)}function be(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Yn(be,gb,wu(gs,{brighter(e){return e=e==null?aa:Math.pow(aa,e),new be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?es:Math.pow(es,e),new be(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new oe(xo(e>=240?e-240:e+120,s,i),xo(e,s,i),xo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new be(Mh(this.h),As(this.s),As(this.l),oa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oa(this.opacity);return`${e===1?"hsl(":"hsla("}${Mh(this.h)}, ${As(this.s)*100}%, ${As(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mh(e){return e=(e||0)%360,e<0?e+360:e}function As(e){return Math.max(0,Math.min(1,e||0))}function xo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Un=e=>()=>e;function _u(e,t){return function(r){return e+r*t}}function mb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function fL(e,t){var r=t-e;return r?_u(e,r>180||r<-180?r-360*Math.round(r/360):r):Un(isNaN(e)?t:e)}function yb(e){return(e=+e)==1?Bu:function(t,r){return r-t?mb(t,r,e):Un(isNaN(t)?r:t)}}function Bu(e,t){var r=t-e;return r?_u(e,r):Un(isNaN(e)?t:e)}const $h=function e(t){var r=yb(t);function i(s,a){var o=r((s=Ho(s)).r,(a=Ho(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=Bu(s.opacity,a.opacity);return function(c){return s.r=o(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i}(1);function sr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Yo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bo=new RegExp(Yo.source,"g");function Cb(e){return function(){return e}}function xb(e){return function(t){return e(t)+""}}function bb(e,t){var r=Yo.lastIndex=bo.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Yo.exec(e))&&(s=bo.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:sr(i,s)})),r=bo.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?xb(l[0].x):Cb(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}var Oh=180/Math.PI,Uo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vu(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*Oh,skewX:Math.atan(l)*Oh,scaleX:o,scaleY:n}}var Es;function kb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Uo:vu(t.a,t.b,t.c,t.d,t.e,t.f)}function Tb(e){return e==null||(Es||(Es=document.createElementNS("http://www.w3.org/2000/svg","g")),Es.setAttribute("transform",e),!(e=Es.transform.baseVal.consolidate()))?Uo:(e=e.matrix,vu(e.a,e.b,e.c,e.d,e.e,e.f))}function Lu(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push("translate(",null,t,null,r);m.push({i:g-4,x:sr(h,u)},{i:g-2,x:sr(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function o(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:sr(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:sr(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:sr(h,u)},{i:g-2,x:sr(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,p),o(h.rotate,c.rotate,u,p),n(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=null,function(d){for(var m=-1,g=p.length,y;++m<g;)u[(y=p[m]).i]=y.x(d);return u.join("")}}}var wb=Lu(kb,"px, ","px)","deg)"),Sb=Lu(Tb,", ",")",")"),yi=0,zi=0,Mi=0,Fu=1e3,na,Wi,la=0,Ar=0,$a=0,ss=typeof performance=="object"&&performance.now?performance:Date,Au=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gn(){return Ar||(Au(_b),Ar=ss.now()+$a)}function _b(){Ar=0}function ha(){this._call=this._time=this._next=null}ha.prototype=Eu.prototype={constructor:ha,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Gn():+r)+(t==null?0:+t),!this._next&&Wi!==this&&(Wi?Wi._next=this:na=this,Wi=this),this._call=e,this._time=r,Go()},stop:function(){this._call&&(this._call=null,this._time=1/0,Go())}};function Eu(e,t,r){var i=new ha;return i.restart(e,t,r),i}function Bb(){Gn(),++yi;for(var e=na,t;e;)(t=Ar-e._time)>=0&&e._call.call(void 0,t),e=e._next;--yi}function Ih(){Ar=(la=ss.now())+$a,yi=zi=0;try{Bb()}finally{yi=0,Lb(),Ar=0}}function vb(){var e=ss.now(),t=e-la;t>Fu&&($a-=t,la=e)}function Lb(){for(var e,t=na,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:na=r);Wi=e,Go(i)}function Go(e){if(!yi){zi&&(zi=clearTimeout(zi));var t=e-Ar;t>24?(e<1/0&&(zi=setTimeout(Ih,e-ss.now()-$a)),Mi&&(Mi=clearInterval(Mi))):(Mi||(la=ss.now(),Mi=setInterval(vb,Fu)),yi=1,Au(Ih))}}function Dh(e,t,r){var i=new ha;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Fb=cu("start","end","cancel","interrupt"),Ab=[],Mu=0,Ph=1,jo=2,Hs=3,Rh=4,Xo=5,Ys=6;function Oa(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Eb(e,r,{name:t,index:i,group:s,on:Fb,tween:Ab,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Mu})}function jn(e,t){var r=Be(e,t);if(r.state>Mu)throw new Error("too late; already scheduled");return r}function qe(e,t){var r=Be(e,t);if(r.state>Hs)throw new Error("too late; already running");return r}function Be(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Eb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Eu(a,0,r.time);function a(h){r.state=Ph,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,p,d;if(r.state!==Ph)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Hs)return Dh(o);d.state===Rh?(d.state=Ys,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Ys,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Dh(function(){r.state===Hs&&(r.state=Rh,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=jo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===jo){for(r.state=Hs,s=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Xo,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===Xo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ys,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Mb(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>jo&&i.state<Xo,i.state=Ys,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function $b(e){return this.each(function(){Mb(this,e)})}function Ob(e,t){var r,i;return function(){var s=qe(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function Ib(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=qe(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}a.tween=s}}function Db(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Be(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?Ob:Ib)(r,e,t))}function Xn(e,t,r){var i=e._id;return e.each(function(){var s=qe(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Be(s,i).value[t]}}function $u(e,t){var r;return(typeof t=="number"?sr:t instanceof is?$h:(r=is(t))?(t=r,$h):bb)(e,t)}function Pb(e){return function(){this.removeAttribute(e)}}function Rb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function qb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function zb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Wb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Hb(e,t){var r=Ma(e),i=r==="transform"?Sb:$u;return this.attrTween(e,typeof t=="function"?(r.local?Wb:zb)(r,i,Xn(this,"attr."+e,t)):t==null?(r.local?Rb:Pb)(r):(r.local?qb:Nb)(r,i,t))}function Yb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Ub(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Gb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ub(e,a)),r}return s._value=t,s}function jb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Yb(e,a)),r}return s._value=t,s}function Xb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ma(e);return this.tween(r,(i.local?Gb:jb)(i,t))}function Vb(e,t){return function(){jn(this,e).delay=+t.apply(this,arguments)}}function Zb(e,t){return t=+t,function(){jn(this,e).delay=t}}function Kb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Vb:Zb)(t,e)):Be(this.node(),t).delay}function Qb(e,t){return function(){qe(this,e).duration=+t.apply(this,arguments)}}function Jb(e,t){return t=+t,function(){qe(this,e).duration=t}}function tk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Qb:Jb)(t,e)):Be(this.node(),t).duration}function ek(e,t){if(typeof t!="function")throw new Error;return function(){qe(this,e).ease=t}}function rk(e){var t=this._id;return arguments.length?this.each(ek(t,e)):Be(this.node(),t).ease}function ik(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;qe(this,e).ease=r}}function sk(e){if(typeof e!="function")throw new Error;return this.each(ik(this._id,e))}function ak(e){typeof e!="function"&&(e=pu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new Xe(i,this._parents,this._name,this._id)}function ok(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],h=r[n],c=l.length,u=o[n]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;n<i;++n)o[n]=t[n];return new Xe(o,this._parents,this._name,this._id)}function nk(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function lk(e,t,r){var i,s,a=nk(t)?jn:qe;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function hk(e,t){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(e):this.each(lk(r,e,t))}function ck(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function uk(){return this.on("end.remove",ck(this._id))}function dk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Wn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,h=a[o]=new Array(l),c,u,p=0;p<l;++p)(c=n[p])&&(u=e.call(c,c.__data__,p,n))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,Oa(h[p],t,r,p,h,Be(c,r)));return new Xe(a,this._parents,t,r)}function pk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=du(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,m=Be(c,r),g=0,y=p.length;g<y;++g)(d=p[g])&&Oa(d,t,r,g,p,m);a.push(p),o.push(c)}return new Xe(a,o,t,r)}var fk=fs.prototype.constructor;function gk(){return new fk(this._groups,this._parents)}function mk(e,t){var r,i,s;return function(){var a=mi(this,e),o=(this.style.removeProperty(e),mi(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function Ou(e){return function(){this.style.removeProperty(e)}}function yk(e,t,r){var i,s=r+"",a;return function(){var o=mi(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Ck(e,t,r){var i,s,a;return function(){var o=mi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),mi(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function xk(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=qe(this,e),h=l.on,c=l.value[a]==null?n||(n=Ou(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function bk(e,t,r){var i=(e+="")=="transform"?wb:$u;return t==null?this.styleTween(e,mk(e,i)).on("end.style."+e,Ou(e)):typeof t=="function"?this.styleTween(e,Ck(e,i,Xn(this,"style."+e,t))).each(xk(this._id,e)):this.styleTween(e,yk(e,i,t),r).on("end.style."+e,null)}function kk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Tk(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&kk(e,o,r)),i}return a._value=t,a}function wk(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Tk(e,t,r??""))}function Sk(e){return function(){this.textContent=e}}function _k(e){return function(){var t=e(this);this.textContent=t??""}}function Bk(e){return this.tween("text",typeof e=="function"?_k(Xn(this,"text",e)):Sk(e==null?"":e+""))}function vk(e){return function(t){this.textContent=e.call(this,t)}}function Lk(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&vk(s)),t}return i._value=e,i}function Fk(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Lk(e))}function Ak(){for(var e=this._name,t=this._id,r=Iu(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=Be(l,t);Oa(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Xe(i,this._parents,e,r)}function Ek(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var h=qe(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&a()})}var Mk=0;function Xe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Iu(){return++Mk}var He=fs.prototype;Xe.prototype={constructor:Xe,select:dk,selectAll:pk,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:ak,merge:ok,selection:gk,transition:Ak,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:hk,attr:Hb,attrTween:Xb,style:bk,styleTween:wk,text:Bk,textTween:Fk,remove:uk,tween:Db,delay:Kb,duration:tk,ease:rk,easeVarying:sk,end:Ek,[Symbol.iterator]:He[Symbol.iterator]};function $k(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ok={time:null,delay:0,duration:250,ease:$k};function Ik(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Dk(e){var t,r;e instanceof Xe?(t=e._id,e=e._name):(t=Iu(),(r=Ok).time=Gn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&Oa(l,e,t,h,o,r||Ik(l,t));return new Xe(i,this._parents,e,t)}fs.prototype.interrupt=$b;fs.prototype.transition=Dk;const Vo=Math.PI,Zo=2*Vo,br=1e-6,Pk=Zo-br;function Du(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Rk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Du;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Nk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Du:Rk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,h=s-r,c=o-t,u=n-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>br)if(!(Math.abs(u*l-h*c)>br)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,g=l*l+h*h,y=d*d+m*m,C=Math.sqrt(g),b=Math.sqrt(p),k=a*Math.tan((Vo-Math.acos((g+p-y)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>br&&this._append`L${t+w*c},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>c*m)},${this._x1=t+S*l},${this._y1=r+S*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>br||Math.abs(this._y1-c)>br)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%Zo+Zo),p>Pk?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>br&&this._append`A${i},${i},0,${+(p>=Vo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Wr(e){return function(){return e}}const gL=Math.abs,mL=Math.atan2,yL=Math.cos,CL=Math.max,xL=Math.min,bL=Math.sin,kL=Math.sqrt,Nh=1e-12,Vn=Math.PI,qh=Vn/2,TL=2*Vn;function wL(e){return e>1?0:e<-1?Vn:Math.acos(e)}function SL(e){return e>=1?qh:e<=-1?-qh:Math.asin(e)}function qk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Nk(t)}function zk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pu(e){this._context=e}Pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ki(e){return new Pu(e)}function Wk(e){return e[0]}function Hk(e){return e[1]}function Yk(e,t){var r=Wr(!0),i=null,s=Ki,a=null,o=qk(n);e=typeof e=="function"?e:e===void 0?Wk:Wr(e),t=typeof t=="function"?t:t===void 0?Hk:Wr(t);function n(l){var h,c=(l=zk(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,h,l),+t(u,h,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Wr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Wr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Wr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class Ru{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Nu(e){return new Ru(e,!0)}function qu(e){return new Ru(e,!1)}function cr(){}function ca(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ia(e){this._context=e}Ia.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ca(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ko(e){return new Ia(e)}function zu(e){this._context=e}zu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uk(e){return new zu(e)}function Wu(e){this._context=e}Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gk(e){return new Wu(e)}function Hu(e,t){this._basis=new Ia(e),this._beta=t}Hu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const jk=function e(t){function r(i){return t===1?new Ia(i):new Hu(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ua(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Zn(e,t){this._context=e,this._k=(1-t)/6}Zn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ua(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ua(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yu=function e(t){function r(i){return new Zn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Kn(e,t){this._context=e,this._k=(1-t)/6}Kn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ua(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Xk=function e(t){function r(i){return new Kn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Qn(e,t){this._context=e,this._k=(1-t)/6}Qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ua(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vk=function e(t){function r(i){return new Qn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Jn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Nh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Nh){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Uu(e,t){this._context=e,this._alpha=t}Uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Gu=function e(t){function r(i){return t?new Uu(i,t):new Zn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ju(e,t){this._context=e,this._alpha=t}ju.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Zk=function e(t){function r(i){return t?new ju(i,t):new Kn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Xu(e,t){this._context=e,this._alpha=t}Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kk=function e(t){function r(i){return t?new Xu(i,t):new Qn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Vu(e){this._context=e}Vu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Qk(e){return new Vu(e)}function zh(e){return e<0?-1:1}function Wh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(zh(a)+zh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Hh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ko(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function da(e){this._context=e}da.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ko(this,this._t0,Hh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ko(this,Hh(this,r=Wh(this,e,t)),r);break;default:ko(this,this._t0,r=Wh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Zu(e){this._context=new Ku(e)}(Zu.prototype=Object.create(da.prototype)).point=function(e,t){da.prototype.point.call(this,t,e)};function Ku(e){this._context=e}Ku.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Qu(e){return new da(e)}function Ju(e){return new Zu(e)}function td(e){this._context=e}td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Yh(e),s=Yh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Yh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function ed(e){return new td(e)}function Da(e,t){this._context=e,this._t=t}Da.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function rd(e){return new Da(e,.5)}function id(e){return new Da(e,0)}function sd(e){return new Da(e,1)}function Hi(e,t,r){this.k=e,this.x=t,this.y=r}Hi.prototype={constructor:Hi,scale:function(e){return e===1?this:new Hi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Hi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Hi.prototype;var Jk=f(e=>{var s;const{securityLevel:t}=xt();let r=ht("body");if(t==="sandbox"){const o=((s=ht(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function tl(e){return typeof e>"u"||e===null}f(tl,"isNothing");function ad(e){return typeof e=="object"&&e!==null}f(ad,"isObject");function od(e){return Array.isArray(e)?e:tl(e)?[]:[e]}f(od,"toArray");function nd(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}f(nd,"extend");function ld(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(ld,"repeat");function hd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(hd,"isNegativeZero");var t1=tl,e1=ad,r1=od,i1=ld,s1=hd,a1=nd,It={isNothing:t1,isObject:e1,toArray:r1,repeat:i1,isNegativeZero:s1,extend:a1};function el(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
126
 
127
- `+e.mark.snippet),i+" "+r):i}f(Xn,"formatError");function yi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Xn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(yi,"YAMLException$1");yi.prototype=Object.create(Error.prototype);yi.prototype.constructor=yi;yi.prototype.toString=f(function(t){return this.name+": "+Xn(this,t)},"toString");var ae=yi;function Hs(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}f(Hs,"getLine");function Ys(e,t){return Rt.repeat(" ",t-e.length)+e}f(Ys,"padStart");function Qu(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],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=Hs(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Rt.repeat(" ",t.indent)+Ys((e.line-l+1).toString(),c)+" | "+h.str+`
128
- `+n;for(h=Hs(e.buffer,i[o],s[o],e.position,u),n+=Rt.repeat(" ",t.indent)+Ys((e.line+1).toString(),c)+" | "+h.str+`
129
- `,n+=Rt.repeat("-",t.indent+c+3+h.pos)+`^
130
- `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=Hs(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Rt.repeat(" ",t.indent)+Ys((e.line+l+1).toString(),c)+" | "+h.str+`
131
- `;return n.replace(/\n$/,"")}f(Qu,"makeSnippet");var Dk=Qu,Rk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Pk=["scalar","sequence","mapping"];function Ju(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Ju,"compileStyleAliases");function td(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Rk.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=Ju(t.styleAliases||null),Pk.indexOf(this.kind)===-1)throw new ae('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(td,"Type$1");var Xt=td;function Uo(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}f(Uo,"compileList");function ed(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(ed,"compileMap");function ua(e){return this.extend(e)}f(ua,"Schema$1");ua.prototype.extend=f(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(a){if(!(a instanceof Xt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.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(a.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(a){if(!(a instanceof Xt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(ua.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Uo(s,"implicit"),s.compiledExplicit=Uo(s,"explicit"),s.compiledTypeMap=ed(s.compiledImplicit,s.compiledExplicit),s},"extend");var Nk=ua,qk=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),Wk=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),zk=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),Hk=new Nk({explicit:[qk,Wk,zk]});function rd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(rd,"resolveYamlNull");function id(){return null}f(id,"constructYamlNull");function sd(e){return e===null}f(sd,"isNull");var Yk=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:rd,construct:id,predicate:sd,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function ad(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")}f(ad,"resolveYamlBoolean");function od(e){return e==="true"||e==="True"||e==="TRUE"}f(od,"constructYamlBoolean");function nd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(nd,"isBoolean");var Uk=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ad,construct:od,predicate:nd,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ld(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(ld,"isHexCode");function hd(e){return 48<=e&&e<=55}f(hd,"isOctCode");function cd(e){return 48<=e&&e<=57}f(cd,"isDecCode");function ud(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!ld(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!hd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!cd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(ud,"resolveYamlInteger");function dd(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)}f(dd,"constructYamlInteger");function pd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Rt.isNegativeZero(e)}f(pd,"isInteger");var Gk=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:ud,construct:dd,predicate:pd,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(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"]}}),jk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function fd(e){return!(e===null||!jk.test(e)||e[e.length-1]==="_")}f(fd,"resolveYamlFloat");function gd(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)}f(gd,"constructYamlFloat");var Xk=/^[-+]?[0-9]+e/;function md(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(Rt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Xk.test(r)?r.replace("e",".e"):r}f(md,"representYamlFloat");function yd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Rt.isNegativeZero(e))}f(yd,"isFloat");var Vk=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:fd,construct:gd,predicate:yd,represent:md,defaultStyle:"lowercase"}),Cd=Hk.extend({implicit:[Yk,Uk,Gk,Vk]}),Zk=Cd,xd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bd=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 kd(e){return e===null?!1:xd.exec(e)!==null||bd.exec(e)!==null}f(kd,"resolveYamlTimestamp");function Td(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=xd.exec(e),t===null&&(t=bd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}f(Td,"constructYamlTimestamp");function wd(e){return e.toISOString()}f(wd,"representYamlTimestamp");var Kk=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kd,construct:Td,instanceOf:Date,represent:wd});function Sd(e){return e==="<<"||e===null}f(Sd,"resolveYamlMerge");var Qk=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Sd}),Vn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
- \r`;function _d(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Vn;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(_d,"resolveYamlBinary");function Bd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Vn,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}f(Bd,"constructYamlBinary");function vd(e){var t="",r=0,i,s,a=e.length,o=Vn;for(i=0;i<a;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 s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(vd,"representYamlBinary");function Ld(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(Ld,"isBinary");var Jk=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_d,construct:Bd,predicate:Ld,represent:vd}),t1=Object.prototype.hasOwnProperty,e1=Object.prototype.toString;function Fd(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,e1.call(s)!=="[object Object]")return!1;for(a in s)if(t1.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}f(Fd,"resolveYamlOmap");function Ad(e){return e!==null?e:[]}f(Ad,"constructYamlOmap");var r1=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Fd,construct:Ad}),i1=Object.prototype.toString;function Ed(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],i1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}f(Ed,"resolveYamlPairs");function Md(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}f(Md,"constructYamlPairs");var s1=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ed,construct:Md}),a1=Object.prototype.hasOwnProperty;function $d(e){if(e===null)return!0;var t,r=e;for(t in r)if(a1.call(r,t)&&r[t]!==null)return!1;return!0}f($d,"resolveYamlSet");function Od(e){return e!==null?e:{}}f(Od,"constructYamlSet");var o1=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:$d,construct:Od}),Id=Zk.extend({implicit:[Kk,Qk],explicit:[Jk,r1,s1,o1]}),nr=Object.prototype.hasOwnProperty,da=1,Dd=2,Rd=3,pa=4,go=1,n1=2,$h=3,l1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h1=/[\x85\u2028\u2029]/,c1=/[,\[\]\{\}]/,Pd=/^(?:!|!!|![a-z\-]+!)$/i,Nd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Go(e){return Object.prototype.toString.call(e)}f(Go,"_class");function we(e){return e===10||e===13}f(we,"is_EOL");function ar(e){return e===9||e===32}f(ar,"is_WHITE_SPACE");function Qt(e){return e===9||e===32||e===10||e===13}f(Qt,"is_WS_OR_EOL");function br(e){return e===44||e===91||e===93||e===123||e===125}f(br,"is_FLOW_INDICATOR");function qd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(qd,"fromHexCode");function Wd(e){return e===120?2:e===117?4:e===85?8:0}f(Wd,"escapedHexLen");function zd(e){return 48<=e&&e<=57?e-48:-1}f(zd,"fromDecimalCode");function jo(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":""}f(jo,"simpleEscapeSequence");function Hd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(Hd,"charFromCodepoint");function Zn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(Zn,"setProperty");var Yd=new Array(256),Ud=new Array(256);for(fr=0;fr<256;fr++)Yd[fr]=jo(fr)?1:0,Ud[fr]=jo(fr);var fr;function Gd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Id,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=[]}f(Gd,"State$1");function Kn(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=Dk(r),new ae(t,r)}f(Kn,"generateError");function J(e,t){throw Kn(e,t)}f(J,"throwError");function is(e,t){e.onWarning&&e.onWarning.call(null,Kn(e,t))}f(is,"throwWarning");var Oh={YAML:f(function(t,r,i){var s,a,o;t.version!==null&&J(t,"duplication of %YAML directive"),i.length!==1&&J(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&J(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&J(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&is(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,a;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Pd.test(s)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(t.tagMap,s)&&J(t,'there is a previously declared suffix for "'+s+'" tag handle'),Nd.test(a)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{J(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function Xe(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||J(e,"expected valid JSON character");else l1.test(n)&&J(e,"the stream contains non-printable characters");e.result+=n}}f(Xe,"captureSegment");function Xo(e,t,r,i){var s,a,o,n;for(Rt.isObject(r)||J(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],nr.call(t,a)||(Zn(t,a,r[a]),i[a]=!0)}f(Xo,"mergeMappings");function kr(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&J(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Go(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Go(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Xo(e,t,a[h],r);else Xo(e,t,a,r);else!e.json&&!nr.call(r,s)&&nr.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),Zn(t,s,a),delete r[s];return t}f(kr,"storeMappingPair");function Ia(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++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(Ia,"readLineBreak");function Et(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;ar(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(we(s))for(Ia(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&is(e,"deficient indentation"),i}f(Et,"skipSeparationSpace");function fs(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||Qt(r)))}f(fs,"testDocumentSeparator");function Da(e,t){t===1?e.result+=" ":t>1&&(e.result+=Rt.repeat(`
134
- `,t-1))}f(Da,"writeFoldedLines");function jd(e,t,r){var i,s,a,o,n,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Qt(d)||br(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),Qt(s)||r&&br(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),Qt(s)||r&&br(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Qt(i))break}else{if(e.position===e.lineStart&&fs(e)||r&&br(d))break;if(we(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(Xe(e,a,o,!1),Da(e,e.line-l),a=o=e.position,n=!1),ar(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Xe(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(jd,"readPlainScalar");function Xd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Xe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else we(r)?(Xe(e,i,s,!0),Da(e,Et(e,!1,t)),i=s=e.position):e.position===e.lineStart&&fs(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}f(Xd,"readSingleQuotedScalar");function Vd(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Xe(e,r,e.position,!0),e.position++,!0;if(n===92){if(Xe(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),we(n))Et(e,!1,t);else if(n<256&&Yd[n])e.result+=Ud[n],e.position++;else if((o=Wd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=qd(n))>=0?a=(a<<4)+o:J(e,"expected hexadecimal character");e.result+=Hd(a),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else we(n)?(Xe(e,r,i,!0),Da(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&fs(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}f(Vd,"readDoubleQuotedScalar");function Zd(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,m=Object.create(null),g,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=g=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Qt(h)&&(u=p=!0,e.position++,Et(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,vr(e,t,da,!1,!0),y=e.tag,g=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),vr(e,t,da,!1,!0),C=e.result),d?kr(e,n,m,y,g,C,i,s,a):u?n.push(kr(e,null,m,y,g,C,i,s,a)):n.push(g),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}f(Zd,"readFlowCollection");function Kd(e,t){var r,i,s=go,a=!1,o=!1,n=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)go===s?s=u===43?$h:n1:J(e,"repeat of a chomping mode identifier");else if((c=zd(u))>=0)c===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?J(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(ar(u)){do u=e.input.charCodeAt(++e.position);while(ar(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!we(u)&&u!==0)}for(;u!==0;){for(Ia(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),we(u)){l++;continue}if(e.lineIndent<n){s===$h?e.result+=Rt.repeat(`
135
- `,a?1+l:l):s===go&&a&&(e.result+=`
136
- `);break}for(i?ar(u)?(h=!0,e.result+=Rt.repeat(`
137
- `,a?1+l:l)):h?(h=!1,e.result+=Rt.repeat(`
138
- `,l+1)):l===0?a&&(e.result+=" "):e.result+=Rt.repeat(`
139
- `,l):e.result+=Rt.repeat(`
140
- `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!we(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Xe(e,r,e.position,!1)}return!0}f(Kd,"readBlockScalar");function Vo(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Qt(o))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,vr(e,t,Rd,!1,!0),a.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}f(Vo,"readBlockSequence");function Qd(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,m=null,g=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Qt(i))b===63?(y&&(kr(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):J(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,n=e.lineStart,l=e.position,!vr(e,r,Dd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);ar(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Qt(b)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(kr(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!1,s=!1,d=e.tag,m=e.result;else if(C)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)J(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===a||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),vr(e,t,pa,!0,s)&&(y?m=e.result:g=e.result),y||(kr(e,u,p,d,m,g,o,n,l),d=m=g=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&kr(e,u,p,d,m,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(Qd,"readBlockMapping");function Jd(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&J(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,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Qt(o);)o===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Pd.test(s)||J(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),c1.test(a)&&J(e,"tag suffix cannot contain flow indicator characters")}a&&!Nd.test(a)&&J(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{J(e,"tag name is malformed: "+a)}return r?e.tag=a:nr.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:J(e,'undeclared tag handle "'+s+'"'),!0}f(Jd,"readTagProperty");function tp(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Qt(r)&&!br(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(tp,"readAnchorProperty");function ep(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&&!Qt(i)&&!br(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),nr.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Et(e,!0,-1),!0}f(ep,"readAlias");function vr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,u,p,d,m,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=pa===r||Rd===r,i&&Et(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Jd(e)||tp(e);)Et(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||pa===r)&&(da===r||Dd===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?n&&(Vo(e,y)||Qd(e,y,g))||Zd(e,g)?c=!0:(o&&Kd(e,g)||Xd(e,g)||Vd(e,g)?c=!0:ep(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):jd(e,g,da===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&Vo(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&J(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(nr.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){m=d[u];break}m||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&J(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):J(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}f(vr,"composeNode");function rp(e){var t=e.position,r,i,s,a=!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&&(Et(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Qt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&J(e,"directive name must not be less than one character in length");o!==0;){for(;ar(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!we(o));break}if(we(o))break;for(r=e.position;o!==0&&!Qt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Ia(e),nr.call(Oh,i)?Oh[i](e,i,s):is(e,'unknown document directive "'+i+'"')}if(Et(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,Et(e,!0,-1)):a&&J(e,"directives end mark is expected"),vr(e,e.lineIndent-1,pa,!1,!0),Et(e,!0,-1),e.checkLineBreaks&&h1.test(e.input.slice(t,e.position))&&is(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&fs(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Et(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}f(rp,"readDocument");function Qn(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 Gd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,J(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;)rp(r);return r.documents}f(Qn,"loadDocuments");function u1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Qn(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}f(u1,"loadAll$1");function ip(e,t){var r=Qn(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")}}f(ip,"load$1");var d1=ip,p1={load:d1},sp=Object.prototype.toString,ap=Object.prototype.hasOwnProperty,Jn=65279,f1=9,ss=10,g1=13,m1=32,y1=33,C1=34,Zo=35,x1=37,b1=38,k1=39,T1=42,op=44,w1=45,fa=58,S1=61,_1=62,B1=63,v1=64,np=91,lp=93,L1=96,hp=123,F1=124,cp=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 A1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],E1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function up(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&ap.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(up,"compileStyleMap");function dp(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+Rt.repeat("0",i-t.length)+t}f(dp,"encodeHex");var M1=1,as=2;function pp(e){this.schema=e.schema||Id,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Rt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=up(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==='"'?as:M1,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}f(pp,"State");function Ko(e,t){for(var r=Rt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
127
+ `+e.mark.snippet),i+" "+r):i}f(el,"formatError");function Ci(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=el(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(Ci,"YAMLException$1");Ci.prototype=Object.create(Error.prototype);Ci.prototype.constructor=Ci;Ci.prototype.toString=f(function(t){return this.name+": "+el(this,t)},"toString");var ae=Ci;function Us(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}f(Us,"getLine");function Gs(e,t){return It.repeat(" ",t-e.length)+e}f(Gs,"padStart");function cd(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],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=Us(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=It.repeat(" ",t.indent)+Gs((e.line-l+1).toString(),c)+" | "+h.str+`
128
+ `+n;for(h=Us(e.buffer,i[o],s[o],e.position,u),n+=It.repeat(" ",t.indent)+Gs((e.line+1).toString(),c)+" | "+h.str+`
129
+ `,n+=It.repeat("-",t.indent+c+3+h.pos)+`^
130
+ `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=Us(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=It.repeat(" ",t.indent)+Gs((e.line+l+1).toString(),c)+" | "+h.str+`
131
+ `;return n.replace(/\n$/,"")}f(cd,"makeSnippet");var o1=cd,n1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],l1=["scalar","sequence","mapping"];function ud(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(ud,"compileStyleAliases");function dd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(n1.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=ud(t.styleAliases||null),l1.indexOf(this.kind)===-1)throw new ae('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(dd,"Type$1");var Vt=dd;function Qo(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}f(Qo,"compileList");function pd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(pd,"compileMap");function pa(e){return this.extend(e)}f(pa,"Schema$1");pa.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Vt)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(a){if(!(a instanceof Vt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.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(a.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(a){if(!(a instanceof Vt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(pa.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Qo(s,"implicit"),s.compiledExplicit=Qo(s,"explicit"),s.compiledTypeMap=pd(s.compiledImplicit,s.compiledExplicit),s},"extend");var h1=pa,c1=new Vt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),u1=new Vt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),d1=new Vt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),p1=new h1({explicit:[c1,u1,d1]});function fd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(fd,"resolveYamlNull");function gd(){return null}f(gd,"constructYamlNull");function md(e){return e===null}f(md,"isNull");var f1=new Vt("tag:yaml.org,2002:null",{kind:"scalar",resolve:fd,construct:gd,predicate:md,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function yd(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")}f(yd,"resolveYamlBoolean");function Cd(e){return e==="true"||e==="True"||e==="TRUE"}f(Cd,"constructYamlBoolean");function xd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(xd,"isBoolean");var g1=new Vt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yd,construct:Cd,predicate:xd,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function bd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(bd,"isHexCode");function kd(e){return 48<=e&&e<=55}f(kd,"isOctCode");function Td(e){return 48<=e&&e<=57}f(Td,"isDecCode");function wd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!bd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!kd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Td(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(wd,"resolveYamlInteger");function Sd(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)}f(Sd,"constructYamlInteger");function _d(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!It.isNegativeZero(e)}f(_d,"isInteger");var m1=new Vt("tag:yaml.org,2002:int",{kind:"scalar",resolve:wd,construct:Sd,predicate:_d,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(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"]}}),y1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Bd(e){return!(e===null||!y1.test(e)||e[e.length-1]==="_")}f(Bd,"resolveYamlFloat");function vd(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)}f(vd,"constructYamlFloat");var C1=/^[-+]?[0-9]+e/;function Ld(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(It.isNegativeZero(e))return"-0.0";return r=e.toString(10),C1.test(r)?r.replace("e",".e"):r}f(Ld,"representYamlFloat");function Fd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||It.isNegativeZero(e))}f(Fd,"isFloat");var x1=new Vt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Bd,construct:vd,predicate:Fd,represent:Ld,defaultStyle:"lowercase"}),Ad=p1.extend({implicit:[f1,g1,m1,x1]}),b1=Ad,Ed=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Md=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 $d(e){return e===null?!1:Ed.exec(e)!==null||Md.exec(e)!==null}f($d,"resolveYamlTimestamp");function Od(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=Ed.exec(e),t===null&&(t=Md.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}f(Od,"constructYamlTimestamp");function Id(e){return e.toISOString()}f(Id,"representYamlTimestamp");var k1=new Vt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$d,construct:Od,instanceOf:Date,represent:Id});function Dd(e){return e==="<<"||e===null}f(Dd,"resolveYamlMerge");var T1=new Vt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Dd}),rl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
+ \r`;function Pd(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=rl;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(Pd,"resolveYamlBinary");function Rd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=rl,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}f(Rd,"constructYamlBinary");function Nd(e){var t="",r=0,i,s,a=e.length,o=rl;for(i=0;i<a;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 s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(Nd,"representYamlBinary");function qd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(qd,"isBinary");var w1=new Vt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pd,construct:Rd,predicate:qd,represent:Nd}),S1=Object.prototype.hasOwnProperty,_1=Object.prototype.toString;function zd(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,_1.call(s)!=="[object Object]")return!1;for(a in s)if(S1.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}f(zd,"resolveYamlOmap");function Wd(e){return e!==null?e:[]}f(Wd,"constructYamlOmap");var B1=new Vt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:zd,construct:Wd}),v1=Object.prototype.toString;function Hd(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],v1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}f(Hd,"resolveYamlPairs");function Yd(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}f(Yd,"constructYamlPairs");var L1=new Vt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hd,construct:Yd}),F1=Object.prototype.hasOwnProperty;function Ud(e){if(e===null)return!0;var t,r=e;for(t in r)if(F1.call(r,t)&&r[t]!==null)return!1;return!0}f(Ud,"resolveYamlSet");function Gd(e){return e!==null?e:{}}f(Gd,"constructYamlSet");var A1=new Vt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ud,construct:Gd}),jd=b1.extend({implicit:[k1,T1],explicit:[w1,B1,L1,A1]}),ur=Object.prototype.hasOwnProperty,fa=1,Xd=2,Vd=3,ga=4,To=1,E1=2,Uh=3,M1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$1=/[\x85\u2028\u2029]/,O1=/[,\[\]\{\}]/,Zd=/^(?:!|!!|![a-z\-]+!)$/i,Kd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jo(e){return Object.prototype.toString.call(e)}f(Jo,"_class");function Te(e){return e===10||e===13}f(Te,"is_EOL");function hr(e){return e===9||e===32}f(hr,"is_WHITE_SPACE");function te(e){return e===9||e===32||e===10||e===13}f(te,"is_WS_OR_EOL");function Sr(e){return e===44||e===91||e===93||e===123||e===125}f(Sr,"is_FLOW_INDICATOR");function Qd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(Qd,"fromHexCode");function Jd(e){return e===120?2:e===117?4:e===85?8:0}f(Jd,"escapedHexLen");function tp(e){return 48<=e&&e<=57?e-48:-1}f(tp,"fromDecimalCode");function tn(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":""}f(tn,"simpleEscapeSequence");function ep(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(ep,"charFromCodepoint");function il(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(il,"setProperty");var rp=new Array(256),ip=new Array(256);for(Cr=0;Cr<256;Cr++)rp[Cr]=tn(Cr)?1:0,ip[Cr]=tn(Cr);var Cr;function sp(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||jd,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=[]}f(sp,"State$1");function sl(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=o1(r),new ae(t,r)}f(sl,"generateError");function rt(e,t){throw sl(e,t)}f(rt,"throwError");function as(e,t){e.onWarning&&e.onWarning.call(null,sl(e,t))}f(as,"throwWarning");var Gh={YAML:f(function(t,r,i){var s,a,o;t.version!==null&&rt(t,"duplication of %YAML directive"),i.length!==1&&rt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&rt(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&as(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,a;i.length!==2&&rt(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Zd.test(s)||rt(t,"ill-formed tag handle (first argument) of the TAG directive"),ur.call(t.tagMap,s)&&rt(t,'there is a previously declared suffix for "'+s+'" tag handle'),Kd.test(a)||rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{rt(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function je(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||rt(e,"expected valid JSON character");else M1.test(n)&&rt(e,"the stream contains non-printable characters");e.result+=n}}f(je,"captureSegment");function en(e,t,r,i){var s,a,o,n;for(It.isObject(r)||rt(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],ur.call(t,a)||(il(t,a,r[a]),i[a]=!0)}f(en,"mergeMappings");function _r(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&rt(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Jo(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Jo(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)en(e,t,a[h],r);else en(e,t,a,r);else!e.json&&!ur.call(r,s)&&ur.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,rt(e,"duplicated mapping key")),il(t,s,a),delete r[s];return t}f(_r,"storeMappingPair");function Pa(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}f(Pa,"readLineBreak");function At(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;hr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Te(s))for(Pa(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&as(e,"deficient indentation"),i}f(At,"skipSeparationSpace");function ms(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||te(r)))}f(ms,"testDocumentSeparator");function Ra(e,t){t===1?e.result+=" ":t>1&&(e.result+=It.repeat(`
134
+ `,t-1))}f(Ra,"writeFoldedLines");function ap(e,t,r){var i,s,a,o,n,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),te(d)||Sr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),te(s)||r&&Sr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),te(s)||r&&Sr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),te(i))break}else{if(e.position===e.lineStart&&ms(e)||r&&Sr(d))break;if(Te(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,At(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(je(e,a,o,!1),Ra(e,e.line-l),a=o=e.position,n=!1),hr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return je(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(ap,"readPlainScalar");function op(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(je(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Te(r)?(je(e,i,s,!0),Ra(e,At(e,!1,t)),i=s=e.position):e.position===e.lineStart&&ms(e)?rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);rt(e,"unexpected end of the stream within a single quoted scalar")}f(op,"readSingleQuotedScalar");function np(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return je(e,r,e.position,!0),e.position++,!0;if(n===92){if(je(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Te(n))At(e,!1,t);else if(n<256&&rp[n])e.result+=ip[n],e.position++;else if((o=Jd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=Qd(n))>=0?a=(a<<4)+o:rt(e,"expected hexadecimal character");e.result+=ep(a),e.position++}else rt(e,"unknown escape sequence");r=i=e.position}else Te(n)?(je(e,r,i,!0),Ra(e,At(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ms(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")}f(np,"readDoubleQuotedScalar");function lp(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,m=Object.create(null),g,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),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=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&rt(e,"expected the node content, but found ','"):rt(e,"missed comma between flow collection entries"),y=g=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),te(h)&&(u=p=!0,e.position++,At(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Er(e,t,fa,!1,!0),y=e.tag,g=e.result,At(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),At(e,!0,t),Er(e,t,fa,!1,!0),C=e.result),d?_r(e,n,m,y,g,C,i,s,a):u?n.push(_r(e,null,m,y,g,C,i,s,a)):n.push(g),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")}f(lp,"readFlowCollection");function hp(e,t){var r,i,s=To,a=!1,o=!1,n=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)To===s?s=u===43?Uh:E1:rt(e,"repeat of a chomping mode identifier");else if((c=tp(u))>=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"):(n=t+c-1,o=!0);else break;if(hr(u)){do u=e.input.charCodeAt(++e.position);while(hr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Te(u)&&u!==0)}for(;u!==0;){for(Pa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),Te(u)){l++;continue}if(e.lineIndent<n){s===Uh?e.result+=It.repeat(`
135
+ `,a?1+l:l):s===To&&a&&(e.result+=`
136
+ `);break}for(i?hr(u)?(h=!0,e.result+=It.repeat(`
137
+ `,a?1+l:l)):h?(h=!1,e.result+=It.repeat(`
138
+ `,l+1)):l===0?a&&(e.result+=" "):e.result+=It.repeat(`
139
+ `,l):e.result+=It.repeat(`
140
+ `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!Te(u)&&u!==0;)u=e.input.charCodeAt(++e.position);je(e,r,e.position,!1)}return!0}f(hp,"readBlockScalar");function rn(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!te(o))));){if(n=!0,e.position++,At(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Er(e,t,Vd,!1,!0),a.push(e.result),At(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)rt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}f(rn,"readBlockSequence");function cp(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,m=null,g=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&te(i))b===63?(y&&(_r(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!0,s=!0):y?(y=!1,s=!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,n=e.lineStart,l=e.position,!Er(e,r,Xd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);hr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),te(b)||rt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(_r(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!1,s=!1,d=e.tag,m=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===a||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),Er(e,t,ga,!0,s)&&(y?m=e.result:g=e.result),y||(_r(e,u,p,d,m,g,o,n,l),d=m=g=null),At(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)rt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&_r(e,u,p,d,m,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(cp,"readBlockMapping");function up(e){var t,r=!1,i=!1,s,a,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,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=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&&!te(o);)o===33&&(i?rt(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Zd.test(s)||rt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),O1.test(a)&&rt(e,"tag suffix cannot contain flow indicator characters")}a&&!Kd.test(a)&&rt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{rt(e,"tag name is malformed: "+a)}return r?e.tag=a:ur.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:rt(e,'undeclared tag handle "'+s+'"'),!0}f(up,"readTagProperty");function dp(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&&!te(r)&&!Sr(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}f(dp,"readAnchorProperty");function pp(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&&!te(i)&&!Sr(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),ur.call(e.anchorMap,r)||rt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],At(e,!0,-1),!0}f(pp,"readAlias");function Er(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,u,p,d,m,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=ga===r||Vd===r,i&&At(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;up(e)||dp(e);)At(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||ga===r)&&(fa===r||Xd===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?n&&(rn(e,y)||cp(e,y,g))||lp(e,g)?c=!0:(o&&hp(e,g)||op(e,g)||np(e,g)?c=!0:pp(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&rt(e,"alias node should not have any properties")):ap(e,g,fa===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&rn(e,y))),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+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ur.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){m=d[u];break}m||rt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.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}f(Er,"composeNode");function fp(e){var t=e.position,r,i,s,a=!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(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!te(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&rt(e,"directive name must not be less than one character in length");o!==0;){for(;hr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Te(o));break}if(Te(o))break;for(r=e.position;o!==0&&!te(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Pa(e),ur.call(Gh,i)?Gh[i](e,i,s):as(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)):a&&rt(e,"directives end mark is expected"),Er(e,e.lineIndent-1,ga,!1,!0),At(e,!0,-1),e.checkLineBreaks&&$1.test(e.input.slice(t,e.position))&&as(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ms(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}f(fp,"readDocument");function al(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 sp(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;)fp(r);return r.documents}f(al,"loadDocuments");function I1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=al(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}f(I1,"loadAll$1");function gp(e,t){var r=al(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")}}f(gp,"load$1");var D1=gp,P1={load:D1},mp=Object.prototype.toString,yp=Object.prototype.hasOwnProperty,ol=65279,R1=9,os=10,N1=13,q1=32,z1=33,W1=34,sn=35,H1=37,Y1=38,U1=39,G1=42,Cp=44,j1=45,ma=58,X1=61,V1=62,Z1=63,K1=64,xp=91,bp=93,Q1=96,kp=123,J1=124,Tp=125,Zt={};Zt[0]="\\0";Zt[7]="\\a";Zt[8]="\\b";Zt[9]="\\t";Zt[10]="\\n";Zt[11]="\\v";Zt[12]="\\f";Zt[13]="\\r";Zt[27]="\\e";Zt[34]='\\"';Zt[92]="\\\\";Zt[133]="\\N";Zt[160]="\\_";Zt[8232]="\\L";Zt[8233]="\\P";var t2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],e2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function wp(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&yp.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(wp,"compileStyleMap");function Sp(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+It.repeat("0",i-t.length)+t}f(Sp,"encodeHex");var r2=1,ns=2;function _p(e){this.schema=e.schema||jd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=It.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=wp(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==='"'?ns:r2,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}f(_p,"State");function an(e,t){for(var r=It.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
142
142
  `,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
143
- `&&(a+=r),a+=o;return a}f(Ko,"indentString");function ga(e,t){return`
144
- `+Rt.repeat(" ",e.indent*t)}f(ga,"generateNextLine");function fp(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}f(fp,"testImplicitResolving");function os(e){return e===m1||e===f1}f(os,"isWhitespace");function Ci(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Jn||65536<=e&&e<=1114111}f(Ci,"isPrintable");function Qo(e){return Ci(e)&&e!==Jn&&e!==g1&&e!==ss}f(Qo,"isNsCharOrWhitespace");function Jo(e,t,r){var i=Qo(e),s=i&&!os(e);return(r?i:i&&e!==op&&e!==np&&e!==lp&&e!==hp&&e!==cp)&&e!==Zo&&!(t===fa&&!s)||Qo(t)&&!os(t)&&e===Zo||t===fa&&s}f(Jo,"isPlainSafe");function gp(e){return Ci(e)&&e!==Jn&&!os(e)&&e!==w1&&e!==B1&&e!==fa&&e!==op&&e!==np&&e!==lp&&e!==hp&&e!==cp&&e!==Zo&&e!==b1&&e!==T1&&e!==y1&&e!==F1&&e!==S1&&e!==_1&&e!==k1&&e!==C1&&e!==x1&&e!==v1&&e!==L1}f(gp,"isPlainSafeFirst");function mp(e){return!os(e)&&e!==fa}f(mp,"isPlainSafeLast");function Xr(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}f(Xr,"codePointAt");function tl(e){var t=/^\n* /;return t.test(e)}f(tl,"needIndentIndicator");var yp=1,tn=2,Cp=3,xp=4,Ur=5;function bp(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,g=gp(Xr(e,0))&&mp(Xr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Xr(e,l),!Ci(h))return Ur;g=g&&Jo(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Xr(e,l),h===ss)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!Ci(h))return Ur;g=g&&Jo(h,c,n),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?g&&!o&&!s(e)?yp:a===as?Ur:tn:r>9&&tl(e)?Ur:o?a===as?Ur:tn:p?xp:Cp}f(bp,"chooseScalarStyle");function kp(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===as?'""':"''";if(!e.noCompatMode&&(A1.indexOf(t)!==-1||E1.test(t)))return e.quotingType===as?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return fp(e,h)}switch(f(l,"testAmbiguity"),bp(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case yp:return t;case tn:return"'"+t.replace(/'/g,"''")+"'";case Cp:return"|"+en(t,e.indent)+rn(Ko(t,a));case xp:return">"+en(t,e.indent)+rn(Ko(Tp(t,o),a));case Ur:return'"'+wp(t)+'"';default:throw new ae("impossible error: invalid scalar style")}}()}f(kp,"writeScalar");function en(e,t){var r=tl(e)?String(t):"",i=e[e.length-1]===`
143
+ `&&(a+=r),a+=o;return a}f(an,"indentString");function ya(e,t){return`
144
+ `+It.repeat(" ",e.indent*t)}f(ya,"generateNextLine");function Bp(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}f(Bp,"testImplicitResolving");function ls(e){return e===q1||e===R1}f(ls,"isWhitespace");function xi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ol||65536<=e&&e<=1114111}f(xi,"isPrintable");function on(e){return xi(e)&&e!==ol&&e!==N1&&e!==os}f(on,"isNsCharOrWhitespace");function nn(e,t,r){var i=on(e),s=i&&!ls(e);return(r?i:i&&e!==Cp&&e!==xp&&e!==bp&&e!==kp&&e!==Tp)&&e!==sn&&!(t===ma&&!s)||on(t)&&!ls(t)&&e===sn||t===ma&&s}f(nn,"isPlainSafe");function vp(e){return xi(e)&&e!==ol&&!ls(e)&&e!==j1&&e!==Z1&&e!==ma&&e!==Cp&&e!==xp&&e!==bp&&e!==kp&&e!==Tp&&e!==sn&&e!==Y1&&e!==G1&&e!==z1&&e!==J1&&e!==X1&&e!==V1&&e!==U1&&e!==W1&&e!==H1&&e!==K1&&e!==Q1}f(vp,"isPlainSafeFirst");function Lp(e){return!ls(e)&&e!==ma}f(Lp,"isPlainSafeLast");function Vr(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}f(Vr,"codePointAt");function nl(e){var t=/^\n* /;return t.test(e)}f(nl,"needIndentIndicator");var Fp=1,ln=2,Ap=3,Ep=4,Gr=5;function Mp(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,g=vp(Vr(e,0))&&Lp(Vr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Vr(e,l),!xi(h))return Gr;g=g&&nn(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Vr(e,l),h===os)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!xi(h))return Gr;g=g&&nn(h,c,n),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?g&&!o&&!s(e)?Fp:a===ns?Gr:ln:r>9&&nl(e)?Gr:o?a===ns?Gr:ln:p?Ep:Ap}f(Mp,"chooseScalarStyle");function $p(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===ns?'""':"''";if(!e.noCompatMode&&(t2.indexOf(t)!==-1||e2.test(t)))return e.quotingType===ns?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Bp(e,h)}switch(f(l,"testAmbiguity"),Mp(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Fp:return t;case ln:return"'"+t.replace(/'/g,"''")+"'";case Ap:return"|"+hn(t,e.indent)+cn(an(t,a));case Ep:return">"+hn(t,e.indent)+cn(an(Op(t,o),a));case Gr:return'"'+Ip(t)+'"';default:throw new ae("impossible error: invalid scalar style")}}()}f($p,"writeScalar");function hn(e,t){var r=nl(e)?String(t):"",i=e[e.length-1]===`
145
145
  `,s=i&&(e[e.length-2]===`
146
146
  `||e===`
147
147
  `),a=s?"+":i?"":"-";return r+a+`
148
- `}f(en,"blockHeader");function rn(e){return e[e.length-1]===`
149
- `?e.slice(0,-1):e}f(rn,"dropEndingNewline");function Tp(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,sn(e.slice(0,h),t)}(),s=e[0]===`
148
+ `}f(hn,"blockHeader");function cn(e){return e[e.length-1]===`
149
+ `?e.slice(0,-1):e}f(cn,"dropEndingNewline");function Op(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,un(e.slice(0,h),t)}(),s=e[0]===`
151
151
  `||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
152
- `:"")+sn(l,t),s=a}return i}f(Tp,"foldString");function sn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
152
+ `:"")+un(l,t),s=a}return i}f(Op,"foldString");function un(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
153
153
  `+e.slice(s,a),s=a+1),o=n;return l+=`
154
154
  `,e.length-s>t&&o>s?l+=e.slice(s,o)+`
155
- `+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(sn,"foldLine");function wp(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Xr(e,s),i=Vt[r],!i&&Ci(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||dp(r);return t}f(wp,"escapeString");function Sp(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Pe(e,t,n,!1,!1)||typeof n>"u"&&Pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(Sp,"writeFlowSequence");function an(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Pe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ga(e,t)),e.dump&&ss===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(an,"writeBlockSequence");function _p(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Pe(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Pe(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(_p,"writeFlowMapping");function Bp(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,u,p;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(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=ga(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Pe(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ss===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=ga(e,t)),Pe(e,t+1,c,!0,u)&&(e.dump&&ss===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(Bp,"writeBlockMapping");function on(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,sp.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(ap.call(n.represent,l))i=n.represent[l](t,l);else throw new ae("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(on,"detectType");function Pe(e,t,r,i,s,a,o){e.tag=null,e.dump=r,on(e,r,!1)||on(e,r,!0);var n=sp.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Bp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(_p(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?an(e,t-1,e.dump,s):an(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Sp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&kp(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ae("unacceptable kind of an object to dump "+n)}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}f(Pe,"writeNode");function vp(e,t){var r=[],i=[],s,a;for(ma(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}f(vp,"getDuplicateReferences");function ma(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)ma(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)ma(e[i[s]],t,r)}f(ma,"inspectNode");function $1(e,t){t=t||{};var r=new pp(t);r.noRefs||vp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Pe(r,0,i,!0,!0)?r.dump+`
156
- `:""}f($1,"dump$1");function O1(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.")}}f(O1,"renamed");var I1=Cd,D1=p1.load;/*! Bundled license information:
155
+ `+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(un,"foldLine");function Ip(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Vr(e,s),i=Zt[r],!i&&xi(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Sp(r);return t}f(Ip,"escapeString");function Dp(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Pe(e,t,n,!1,!1)||typeof n>"u"&&Pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(Dp,"writeFlowSequence");function dn(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Pe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ya(e,t)),e.dump&&os===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(dn,"writeBlockSequence");function Pp(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Pe(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Pe(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(Pp,"writeFlowMapping");function Rp(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,u,p;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(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=ya(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Pe(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&os===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=ya(e,t)),Pe(e,t+1,c,!0,u)&&(e.dump&&os===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(Rp,"writeBlockMapping");function pn(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,mp.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(yp.call(n.represent,l))i=n.represent[l](t,l);else throw new ae("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(pn,"detectType");function Pe(e,t,r,i,s,a,o){e.tag=null,e.dump=r,pn(e,r,!1)||pn(e,r,!0);var n=mp.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Rp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Pp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?dn(e,t-1,e.dump,s):dn(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Dp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&$p(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ae("unacceptable kind of an object to dump "+n)}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}f(Pe,"writeNode");function Np(e,t){var r=[],i=[],s,a;for(Ca(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}f(Np,"getDuplicateReferences");function Ca(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Ca(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)Ca(e[i[s]],t,r)}f(Ca,"inspectNode");function i2(e,t){t=t||{};var r=new _p(t);r.noRefs||Np(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Pe(r,0,i,!0,!0)?r.dump+`
156
+ `:""}f(i2,"dump$1");function s2(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.")}}f(s2,"renamed");var a2=Ad,o2=P1.load;/*! Bundled license information:
157
157
 
158
158
  js-yaml/dist/js-yaml.mjs:
159
159
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
160
- */var Ei=f((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"),jt={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},Ih={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function zi(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],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(zi,"calculateDeltaAndAngle");var Bt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),R1=f(e=>({x:f(function(t,r,i){let s=0;const a=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:d,deltaX:m}=zi(i[0],i[1]);s=jt[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:d,deltaX:m}=zi(i[i.length-1],i[i.length-2]);s=jt[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[0]).x),h=Math.abs(Bt(t).y-Bt(i[0]).y),c=jt[e.arrowTypeStart],u=jt[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="right"?-1:1,s+=d}return Bt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:d,deltaY:m}=zi(i[0],i[1]);s=jt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:d,deltaY:m}=zi(i[i.length-1],i[i.length-2]);s=jt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[0]).y),h=Math.abs(Bt(t).x-Bt(i[0]).x),c=jt[e.arrowTypeStart],u=jt[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="up"?-1:1,s+=d}return Bt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Lp={},Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.BLANK_URL=Nt.relativeFirstCharacters=Nt.whitespaceEscapeCharsRegex=Nt.urlSchemeRegex=Nt.ctrlCharactersRegex=Nt.htmlCtrlEntityRegex=Nt.htmlEntitiesRegex=Nt.invalidProtocolRegex=void 0;Nt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Nt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Nt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Nt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Nt.urlSchemeRegex=/^.+(:|&colon;)/gim;Nt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Nt.relativeFirstCharacters=[".","/"];Nt.BLANK_URL="about:blank";Object.defineProperty(Lp,"__esModule",{value:!0});var P1=Lp.sanitizeUrl=z1,Gt=Nt;function N1(e){return Gt.relativeFirstCharacters.indexOf(e[0])>-1}function q1(e){var t=e.replace(Gt.ctrlCharactersRegex,"");return t.replace(Gt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function W1(e){return URL.canParse(e)}function Dh(e){try{return decodeURIComponent(e)}catch{return e}}function z1(e){if(!e)return Gt.BLANK_URL;var t,r=Dh(e.trim());do r=q1(r).replace(Gt.htmlCtrlEntityRegex,"").replace(Gt.ctrlCharactersRegex,"").replace(Gt.whitespaceEscapeCharsRegex,"").trim(),r=Dh(r),t=r.match(Gt.ctrlCharactersRegex)||r.match(Gt.htmlEntitiesRegex)||r.match(Gt.htmlCtrlEntityRegex)||r.match(Gt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Gt.BLANK_URL;if(N1(i))return i;var s=i.trimStart(),a=s.match(Gt.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Gt.invalidProtocolRegex.test(o))return Gt.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!W1(n))return Gt.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function H1(e){return Number.isSafeInteger(e)&&e>=0}function Fp(e){return e!=null&&typeof e!="function"&&H1(e.length)}function Y1(e){return e==="__proto__"}function el(e){return e==null||typeof e!="object"&&typeof e!="function"}function Ap(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function rl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const U1="[object RegExp]",Ep="[object String]",Mp="[object Number]",$p="[object Boolean]",Op="[object Arguments]",G1="[object Symbol]",j1="[object Date]",X1="[object Map]",V1="[object Set]",Z1="[object Array]",K1="[object ArrayBuffer]",Ip="[object Object]",Q1="[object DataView]",J1="[object Uint8Array]",t2="[object Uint8ClampedArray]",e2="[object Uint16Array]",r2="[object Uint32Array]",i2="[object Int8Array]",s2="[object Int16Array]",a2="[object Int32Array]",o2="[object Float32Array]",n2="[object Float64Array]",Rh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}()||Function("return this")();function il(e){return typeof Rh.Buffer<"u"&&Rh.Buffer.isBuffer(e)}function sl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l2(e,t){return Vr(e,void 0,e,new Map,t)}function Vr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(el(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 n=0;n<e.length;n++)o[n]=Vr(e[n],n,r,i,s);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[n,l]of e)o.set(n,Vr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Vr(n,void 0,r,i,s));return o}if(il(e))return e.subarray();if(sl(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Vr(e[n],n,r,i,s);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),Ce(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),Ce(o,e,r,i,s),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,Ce(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof e=="object"&&h2(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),Ce(o,e,r,i,s),o}return e}function Ce(e,t,r=e,i,s){const a=[...Object.keys(t),...Ap(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Vr(t[n],n,r,i,s))}}function h2(e){switch(rl(e)){case Op:case Z1:case K1:case Q1:case $p:case j1:case o2:case n2:case i2:case s2:case a2:case X1:case Mp:case Ip:case U1:case V1:case Ep:case G1:case J1:case t2:case e2:case r2:return!0;default:return!1}}function c2(e,t){return l2(e,(r,i,s,a)=>{if(typeof e=="object"){if(rl(e)===Ip&&typeof e.constructor!="function"){const o={};return a.set(e,o),Ce(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Mp:case Ep:case $p:{const o=new e.constructor(e==null?void 0:e.valueOf());return Ce(o,e),o}case Op:{const o={};return Ce(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Ph(e){return c2(e)}function nn(e){return e!==null&&typeof e=="object"&&rl(e)==="[object Arguments]"}function ln(e){return typeof e=="object"&&e!==null}function u2(e){return ln(e)&&Fp(e)}function gs(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...s){const a=t?t.apply(this,s):s[0],o=r.cache;if(o.has(a))return o.get(a);const n=e.apply(this,s);return r.cache=o.set(a,n)||o,n},i=gs.Cache||Map;return r.cache=new i,r}gs.Cache=Map;function d2(){}function p2(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function Us(e){return sl(e)}function mo(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 f2(e){if(el(e))return e;if(Array.isArray(e)||sl(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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function g2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=Gs(s,o,i,new Map)}return s}function Gs(e,t,r,i){if(el(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return f2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Ap(t)];for(let a=0;a<s.length;a++){const o=s[a];if(Y1(o))continue;let n=t[o],l=e[o];if(nn(n)&&(n={...n}),nn(l)&&(l={...l}),il(n)&&(n=Ph(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];c[d]=l[d]}l=c}else if(u2(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||ln(l)&&ln(n)&&(mo(l)||mo(n)||Us(l)||Us(n))?e[o]=Gs(l,n,r,i):l==null&&mo(n)?e[o]=Gs({},n,r,i):l==null&&Us(n)?e[o]=Ph(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function m2(e,...t){return g2(e,...t,d2)}function Nh(e){if(e==null)return!0;if(Fp(e))return typeof e.splice!="function"&&typeof e!="string"&&!il(e)&&!Us(e)&&!nn(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 p2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var y2="​",C2={curveBasis:Yo,curveBasisClosed:kk,curveBasisOpen:Tk,curveBumpX:vu,curveBumpY:Lu,curveBundle:wk,curveCardinalClosed:Sk,curveCardinalOpen:_k,curveCardinal:Mu,curveCatmullRomClosed:Bk,curveCatmullRomOpen:vk,curveCatmullRom:Ou,curveLinear:Vi,curveLinearClosed:Lk,curveMonotoneX:qu,curveMonotoneY:Wu,curveNatural:Hu,curveStep:Yu,curveStepAfter:Gu,curveStepBefore:Uu},x2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,b2=f(function(e,t){const r=Dp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Ks(o),i=Dt(i,[...o])}else i=r.args;if(!i)return;let s=Fn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Dp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${x2.source})(?=[}][%]{2}).*
161
- `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=ji.exec(e))!==null;)if(a.index===ji.lastIndex&&ji.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return z.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),k2=f(function(e){return e.replace(ji,"")},"removeDirectives"),T2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function al(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return C2[r]??t}f(al,"interpolateToCurve");function Rp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?P1(r):r}f(Rp,"formatUrl");var w2=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){z.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function ol(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(ol,"distance");function Pp(e){let t,r=0;e.forEach(s=>{r+=ol(s,t),t=s});const i=r/2;return nl(e,i)}f(Pp,"traverseEdge");function Np(e){return e.length===1?e[0]:Pp(e)}f(Np,"calcLabelPosition");var qh=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),nl=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=ol(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:qh((1-o)*r.x+o*s.x,5),y:qh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),S2=f((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=nl(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function qp(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=nl(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(qp,"calcTerminalLabelPosition");function Wp(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}}f(Wp,"getStylesFromArray");var Wh=0,_2=f(()=>(Wh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Wh),"generateId");function zp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(zp,"makeRandomHex");var B2=f(e=>zp(e.length),"random"),v2=f(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"),L2=f(function(e,t){const r=t.text.replace(us.lineBreakRegex," "),[,i]=Ra(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),F2=gs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),us.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ze(`${o} `,r),h=Ze(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=A2(o,t,"-",r);s.push(a,...p),a=d}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),A2=gs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ze(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;a.push(p?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Hp(e,t){return ll(e,t).height}f(Hp,"calculateTextHeight");function Ze(e,t){return ll(e,t).width}f(Ze,"calculateTextWidth");var ll=gs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Ra(r),o=["sans-serif",i],n=e.split(us.lineBreakRegex),l=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const g of n){const y=v2();y.text=g||y2;const C=L2(c,y).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),di,E2=(di=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(di,"InitIDGenerator"),di),As,M2=f(function(e){return As=As||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),As.innerHTML=e,unescape(As.textContent)},"entityDecode");function hl(e){return"str"in e}f(hl,"isDetailedError");var $2=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ra=f(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 cl(e,t){return m2({},e,t)}f(cl,"cleanAndMerge");var Te={assignWithDepth:Dt,wrapLabel:F2,calculateTextHeight:Hp,calculateTextWidth:Ze,calculateTextDimensions:ll,cleanAndMerge:cl,detectInit:b2,detectDirective:Dp,isSubstringInArray:T2,interpolateToCurve:al,calcLabelPosition:Np,calcCardinalityPosition:S2,calcTerminalLabelPosition:qp,formatUrl:Rp,getStylesFromArray:Wp,generateId:_2,random:B2,runFunc:w2,entityDecode:M2,insertTitle:$2,isLabelCoordinateInPath:Yp,parseFontSize:Ra,InitIDGenerator:E2},O2=f(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"),Lr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),eL=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function qt(e){return e??null}f(qt,"handleUndefinedAttr");function Yp(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(Yp,"isLabelCoordinateInPath");var ul=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Up(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(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=yt().fontSize?yt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Nc.fontSize]=Ra(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}f(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}f(Up,"configureLabelImages");var I2=f(e=>{const{handDrawnSeed:t}=yt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ki=f(e=>{const t=D2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),D2=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Gp=f(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"),Z=f(e=>{const{stylesArray:t}=ki(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Gp(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),V=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=yt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=ki(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:R2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),R2=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const P2=Object.freeze({left:0,top:0,width:16,height:16}),ya=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jp=Object.freeze({...P2,...ya}),N2=Object.freeze({...jp,body:"",hidden:!1}),q2=Object.freeze({width:null,height:null}),W2=Object.freeze({...q2,...ya}),z2=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return yo(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return yo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return yo(n,r)?n:null}return null},yo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function H2(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 zh(e,t){const r=H2(e,t);for(const i in N2)i in ya?i in e&&!(i in r)&&(r[i]=ya[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Y2(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Hh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=zh(i[n]||s[n],a)}return o(t),r.forEach(o),zh(e,a)}function U2(e,t){if(e.icons[t])return Hh(e,t,[]);const r=Y2(e,[t])[t];return r?Hh(e,t,r):null}const G2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,j2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Yh(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(G2);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=j2.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function X2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function V2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Z2(e,t,r){const i=X2(e);return V2(i.defs,t+i.content+r)}const K2=e=>e==="unset"||e==="undefined"||e==="none";function Q2(e,t){const r={...jp,...e},i={...W2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const y=[],C=g.hFlip,b=g.vFlip;let k=g.rotate;C?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),y.length&&(a=Z2(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=Yh(u,l/h)):(c=o==="auto"?l:o,u=n===null?Yh(c,h/l):n==="auto"?h:n);const p={},d=(g,y)=>{K2(y)||(p[g]=y.toString())};d("width",c),d("height",u);const m=[s.left,s.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const J2=/\sid="(\S+)"/g,Uh=new Map;function tT(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Uh.get(e)||0;return Uh.set(e,t+1),t?`${e}${t}`:e}function eT(e){const t=[];let r;for(;r=J2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=tT(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function rT(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 dl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Er=dl();function Xp(e){Er=e}var Zi={exec:()=>null};function Ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Jt.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var iT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Jt={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")},sT=/^(?:[ \t]*(?:\n|$))+/,aT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,oT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ms=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pl=/(?:[*+-]|\d{1,9}[.)])/,Vp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zp=Ct(Vp).replace(/bull/g,pl).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(),lT=Ct(Vp).replace(/bull/g,pl).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(),fl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,hT=/^[^\n]+/,gl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cT=Ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",gl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uT=Ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pl).getRegex(),Pa="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",ml=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dT=Ct("^ {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",ml).replace("tag",Pa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kp=Ct(fl).replace("hr",ms).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",Pa).getRegex(),pT=Ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kp).getRegex(),yl={blockquote:pT,code:aT,def:cT,fences:oT,heading:nT,hr:ms,html:dT,lheading:Zp,list:uT,newline:sT,paragraph:Kp,table:Zi,text:hT},Gh=Ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ms).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",Pa).getRegex(),fT={...yl,lheading:lT,table:Gh,paragraph:Ct(fl).replace("hr",ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Gh).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",Pa).getRegex()},gT={...yl,html:Ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ml).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:Zi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ct(fl).replace("hr",ms).replace("heading",` *#{1,6} *[^
162
- ]`).replace("lheading",Zp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},mT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qp=/^( {2,}|\\)\n(?!\s*$)/,CT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Na=/[\p{P}\p{S}]/u,Cl=/[\s\p{P}\p{S}]/u,Jp=/[^\s\p{P}\p{S}]/u,xT=Ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Cl).getRegex(),tf=/(?!~)[\p{P}\p{S}]/u,bT=/(?!~)[\s\p{P}\p{S}]/u,kT=/(?:[^\s\p{P}\p{S}]|~)/u,TT=Ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ef=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wT=Ct(ef,"u").replace(/punct/g,Na).getRegex(),ST=Ct(ef,"u").replace(/punct/g,tf).getRegex(),rf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_T=Ct(rf,"gu").replace(/notPunctSpace/g,Jp).replace(/punctSpace/g,Cl).replace(/punct/g,Na).getRegex(),BT=Ct(rf,"gu").replace(/notPunctSpace/g,kT).replace(/punctSpace/g,bT).replace(/punct/g,tf).getRegex(),vT=Ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Jp).replace(/punctSpace/g,Cl).replace(/punct/g,Na).getRegex(),LT=Ct(/\\(punct)/,"gu").replace(/punct/g,Na).getRegex(),FT=Ct(/^<(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(),AT=Ct(ml).replace("(?:-->|$)","-->").getRegex(),ET=Ct("^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",AT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ca=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,MT=Ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ca).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sf=Ct(/^!?\[(label)\]\[(ref)\]/).replace("label",Ca).replace("ref",gl).getRegex(),af=Ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",gl).getRegex(),$T=Ct("reflink|nolink(?!\\()","g").replace("reflink",sf).replace("nolink",af).getRegex(),jh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xl={_backpedal:Zi,anyPunctuation:LT,autolink:FT,blockSkip:TT,br:Qp,code:yT,del:Zi,emStrongLDelim:wT,emStrongRDelimAst:_T,emStrongRDelimUnd:vT,escape:mT,link:MT,nolink:af,punctuation:xT,reflink:sf,reflinkSearch:$T,tag:ET,text:CT,url:Zi},OT={...xl,link:Ct(/^!?\[(label)\]\((.*?)\)/).replace("label",Ca).getRegex(),reflink:Ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ca).getRegex()},hn={...xl,emStrongRDelimAst:BT,emStrongLDelim:ST,url:Ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",jh).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:Ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",jh).getRegex()},IT={...hn,br:Ct(Qp).replace("{2,}","*").getRegex(),text:Ct(hn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Es={normal:yl,gfm:fT,pedantic:gT},Mi={normal:xl,gfm:hn,breaks:IT,pedantic:OT},DT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xh=e=>DT[e];function $e(e,t){if(t){if(Jt.escapeTest.test(e))return e.replace(Jt.escapeReplace,Xh)}else if(Jt.escapeTestNoEncode.test(e))return e.replace(Jt.escapeReplaceNoEncode,Xh);return e}function Vh(e){try{e=encodeURI(e).replace(Jt.percentDecode,"%")}catch{return null}return e}function Zh(e,t){var a;let r=e.replace(Jt.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Jt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Jt.slashPipe,"|");return i}function $i(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function RT(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 Kh(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function PT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
160
+ */var $i=f((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"),Xt={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},jh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Yi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Yi,"calculateDeltaAndAngle");var _t=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),n2=f(e=>({x:f(function(t,r,i){let s=0;const a=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Xt,e.arrowTypeStart)){const{angle:d,deltaX:m}=Yi(i[0],i[1]);s=Xt[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Xt,e.arrowTypeEnd)){const{angle:d,deltaX:m}=Yi(i[i.length-1],i[i.length-2]);s=Xt[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),h=Math.abs(_t(t).y-_t(i[0]).y),c=Xt[e.arrowTypeStart],u=Xt[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="right"?-1:1,s+=d}return _t(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Xt,e.arrowTypeStart)){const{angle:d,deltaY:m}=Yi(i[0],i[1]);s=Xt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Xt,e.arrowTypeEnd)){const{angle:d,deltaY:m}=Yi(i[i.length-1],i[i.length-2]);s=Xt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),h=Math.abs(_t(t).x-_t(i[0]).x),c=Xt[e.arrowTypeStart],u=Xt[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="up"?-1:1,s+=d}return _t(t).y+s},"y")}),"getLineFunctionsWithOffset"),qp={},Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.BLANK_URL=Rt.relativeFirstCharacters=Rt.whitespaceEscapeCharsRegex=Rt.urlSchemeRegex=Rt.ctrlCharactersRegex=Rt.htmlCtrlEntityRegex=Rt.htmlEntitiesRegex=Rt.invalidProtocolRegex=void 0;Rt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Rt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Rt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Rt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Rt.urlSchemeRegex=/^.+(:|&colon;)/gim;Rt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Rt.relativeFirstCharacters=[".","/"];Rt.BLANK_URL="about:blank";Object.defineProperty(qp,"__esModule",{value:!0});var l2=qp.sanitizeUrl=d2,jt=Rt;function h2(e){return jt.relativeFirstCharacters.indexOf(e[0])>-1}function c2(e){var t=e.replace(jt.ctrlCharactersRegex,"");return t.replace(jt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function u2(e){return URL.canParse(e)}function Xh(e){try{return decodeURIComponent(e)}catch{return e}}function d2(e){if(!e)return jt.BLANK_URL;var t,r=Xh(e.trim());do r=c2(r).replace(jt.htmlCtrlEntityRegex,"").replace(jt.ctrlCharactersRegex,"").replace(jt.whitespaceEscapeCharsRegex,"").trim(),r=Xh(r),t=r.match(jt.ctrlCharactersRegex)||r.match(jt.htmlEntitiesRegex)||r.match(jt.htmlCtrlEntityRegex)||r.match(jt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return jt.BLANK_URL;if(h2(i))return i;var s=i.trimStart(),a=s.match(jt.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(jt.invalidProtocolRegex.test(o))return jt.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!u2(n))return jt.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function p2(e){return Number.isSafeInteger(e)&&e>=0}function zp(e){return e!=null&&typeof e!="function"&&p2(e.length)}function f2(e){return e==="__proto__"}function ll(e){return e==null||typeof e!="object"&&typeof e!="function"}function Wp(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function hl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const g2="[object RegExp]",Hp="[object String]",Yp="[object Number]",Up="[object Boolean]",Gp="[object Arguments]",m2="[object Symbol]",y2="[object Date]",C2="[object Map]",x2="[object Set]",b2="[object Array]",k2="[object ArrayBuffer]",jp="[object Object]",T2="[object DataView]",w2="[object Uint8Array]",S2="[object Uint8ClampedArray]",_2="[object Uint16Array]",B2="[object Uint32Array]",v2="[object Int8Array]",L2="[object Int16Array]",F2="[object Int32Array]",A2="[object Float32Array]",E2="[object Float64Array]",Vh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}()||Function("return this")();function cl(e){return typeof Vh.Buffer<"u"&&Vh.Buffer.isBuffer(e)}function ul(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function M2(e,t){return Zr(e,void 0,e,new Map,t)}function Zr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(ll(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 n=0;n<e.length;n++)o[n]=Zr(e[n],n,r,i,s);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[n,l]of e)o.set(n,Zr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Zr(n,void 0,r,i,s));return o}if(cl(e))return e.subarray();if(ul(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Zr(e[n],n,r,i,s);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),ye(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),ye(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),ye(o,e,r,i,s),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,ye(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(typeof e=="object"&&$2(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ye(o,e,r,i,s),o}return e}function ye(e,t,r=e,i,s){const a=[...Object.keys(t),...Wp(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Zr(t[n],n,r,i,s))}}function $2(e){switch(hl(e)){case Gp:case b2:case k2:case T2:case Up:case y2:case A2:case E2:case v2:case L2:case F2:case C2:case Yp:case jp:case g2:case x2:case Hp:case m2:case w2:case S2:case _2:case B2:return!0;default:return!1}}function O2(e,t){return M2(e,(r,i,s,a)=>{if(typeof e=="object"){if(hl(e)===jp&&typeof e.constructor!="function"){const o={};return a.set(e,o),ye(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Yp:case Hp:case Up:{const o=new e.constructor(e==null?void 0:e.valueOf());return ye(o,e),o}case Gp:{const o={};return ye(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Zh(e){return O2(e)}function fn(e){return e!==null&&typeof e=="object"&&hl(e)==="[object Arguments]"}function gn(e){return typeof e=="object"&&e!==null}function I2(e){return gn(e)&&zp(e)}function ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...s){const a=t?t.apply(this,s):s[0],o=r.cache;if(o.has(a))return o.get(a);const n=e.apply(this,s);return r.cache=o.set(a,n)||o,n},i=ys.Cache||Map;return r.cache=new i,r}ys.Cache=Map;function D2(){}function P2(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function js(e){return ul(e)}function wo(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 R2(e){if(ll(e))return e;if(Array.isArray(e)||ul(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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function N2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=Xs(s,o,i,new Map)}return s}function Xs(e,t,r,i){if(ll(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return R2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Wp(t)];for(let a=0;a<s.length;a++){const o=s[a];if(f2(o))continue;let n=t[o],l=e[o];if(fn(n)&&(n={...n}),fn(l)&&(l={...l}),cl(n)&&(n=Zh(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];c[d]=l[d]}l=c}else if(I2(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||gn(l)&&gn(n)&&(wo(l)||wo(n)||js(l)||js(n))?e[o]=Xs(l,n,r,i):l==null&&wo(n)?e[o]=Xs({},n,r,i):l==null&&js(n)?e[o]=Zh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function q2(e,...t){return N2(e,...t,D2)}function Kh(e){if(e==null)return!0;if(zp(e))return typeof e.splice!="function"&&typeof e!="string"&&!cl(e)&&!js(e)&&!fn(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 P2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var z2="​",W2={curveBasis:Ko,curveBasisClosed:Uk,curveBasisOpen:Gk,curveBumpX:Nu,curveBumpY:qu,curveBundle:jk,curveCardinalClosed:Xk,curveCardinalOpen:Vk,curveCardinal:Yu,curveCatmullRomClosed:Zk,curveCatmullRomOpen:Kk,curveCatmullRom:Gu,curveLinear:Ki,curveLinearClosed:Qk,curveMonotoneX:Qu,curveMonotoneY:Ju,curveNatural:ed,curveStep:rd,curveStepAfter:sd,curveStepBefore:id},H2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Y2=f(function(e,t){const r=Xp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Js(o),i=Ot(i,[...o])}else i=r.args;if(!i)return;let s=Dn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Xp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${H2.source})(?=[}][%]{2}).*
161
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Vi.exec(e))!==null;)if(a.index===Vi.lastIndex&&Vi.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return z.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),U2=f(function(e){return e.replace(Vi,"")},"removeDirectives"),G2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function dl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return W2[r]??t}f(dl,"interpolateToCurve");function Vp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?l2(r):r}f(Vp,"formatUrl");var j2=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){z.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function pl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(pl,"distance");function Zp(e){let t,r=0;e.forEach(s=>{r+=pl(s,t),t=s});const i=r/2;return fl(e,i)}f(Zp,"traverseEdge");function Kp(e){return e.length===1?e[0]:Zp(e)}f(Kp,"calcLabelPosition");var Qh=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),fl=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=pl(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Qh((1-o)*r.x+o*s.x,5),y:Qh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),X2=f((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=fl(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Qp(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=fl(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(Qp,"calcTerminalLabelPosition");function Jp(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}}f(Jp,"getStylesFromArray");var Jh=0,V2=f(()=>(Jh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Jh),"generateId");function tf(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(tf,"makeRandomHex");var Z2=f(e=>tf(e.length),"random"),K2=f(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"),Q2=f(function(e,t){const r=t.text.replace(ps.lineBreakRegex," "),[,i]=Na(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),J2=ys((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ps.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ve(`${o} `,r),h=Ve(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=tT(o,t,"-",r);s.push(a,...p),a=d}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),tT=ys((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ve(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;a.push(p?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ef(e,t){return gl(e,t).height}f(ef,"calculateTextHeight");function Ve(e,t){return gl(e,t).width}f(Ve,"calculateTextWidth");var gl=ys((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Na(r),o=["sans-serif",i],n=e.split(ps.lineBreakRegex),l=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const g of n){const y=K2();y.text=g||z2;const C=Q2(c,y).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),pi,eT=(pi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(pi,"InitIDGenerator"),pi),Ms,rT=f(function(e){return Ms=Ms||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ms.innerHTML=e,unescape(Ms.textContent)},"entityDecode");function ml(e){return"str"in e}f(ml,"isDetailedError");var iT=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Na=f(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 yl(e,t){return q2({},e,t)}f(yl,"cleanAndMerge");var ke={assignWithDepth:Ot,wrapLabel:J2,calculateTextHeight:ef,calculateTextWidth:Ve,calculateTextDimensions:gl,cleanAndMerge:yl,detectInit:Y2,detectDirective:Xp,isSubstringInArray:G2,interpolateToCurve:dl,calcLabelPosition:Kp,calcCardinalityPosition:X2,calcTerminalLabelPosition:Qp,formatUrl:Vp,getStylesFromArray:Jp,generateId:V2,random:Z2,runFunc:j2,entityDecode:rT,insertTitle:iT,isLabelCoordinateInPath:rf,parseFontSize:Na,InitIDGenerator:eT},sT=f(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"),Mr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),_L=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Nt(e){return e??null}f(Nt,"handleUndefinedAttr");function rf(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(rf,"isLabelCoordinateInPath");var Cl=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function sf(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(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Kc.fontSize]=Na(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}f(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}f(sf,"configureLabelImages");var aT=f(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ti=f(e=>{const t=oT([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),oT=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),af=f(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=f(e=>{const{stylesArray:t}=Ti(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];af(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),K=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=Ti(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:nT(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),nT=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const lT=Object.freeze({left:0,top:0,width:16,height:16}),xa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),of=Object.freeze({...lT,...xa}),hT=Object.freeze({...of,body:"",hidden:!1}),cT=Object.freeze({width:null,height:null}),uT=Object.freeze({...cT,...xa}),dT=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return So(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return So(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return So(n,r)?n:null}return null},So=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function pT(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 tc(e,t){const r=pT(e,t);for(const i in hT)i in xa?i in e&&!(i in r)&&(r[i]=xa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function fT(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function ec(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=tc(i[n]||s[n],a)}return o(t),r.forEach(o),tc(e,a)}function gT(e,t){if(e.icons[t])return ec(e,t,[]);const r=fT(e,[t])[t];return r?ec(e,t,r):null}const mT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function rc(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(mT);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=yT.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function CT(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function xT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function bT(e,t,r){const i=CT(e);return xT(i.defs,t+i.content+r)}const kT=e=>e==="unset"||e==="undefined"||e==="none";function TT(e,t){const r={...of,...e},i={...uT,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const y=[],C=g.hFlip,b=g.vFlip;let k=g.rotate;C?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),y.length&&(a=bT(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=rc(u,l/h)):(c=o==="auto"?l:o,u=n===null?rc(c,h/l):n==="auto"?h:n);const p={},d=(g,y)=>{kT(y)||(p[g]=y.toString())};d("width",c),d("height",u);const m=[s.left,s.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const wT=/\sid="(\S+)"/g,ic=new Map;function ST(e){e=e.replace(/[0-9]+$/,"")||"a";const t=ic.get(e)||0;return ic.set(e,t+1),t?`${e}${t}`:e}function _T(e){const t=[];let r;for(;r=wT.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=ST(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function BT(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 xl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ir=xl();function nf(e){Ir=e}var Qi={exec:()=>null};function bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(ee.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var vT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ee={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")},LT=/^(?:[ \t]*(?:\n|$))+/,FT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Cs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ET=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bl=/(?:[*+-]|\d{1,9}[.)])/,lf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hf=bt(lf).replace(/bull/g,bl).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(),MT=bt(lf).replace(/bull/g,bl).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(),kl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$T=/^[^\n]+/,Tl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,OT=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),IT=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bl).getRegex(),qa="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",wl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,DT=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",wl).replace("tag",qa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cf=bt(kl).replace("hr",Cs).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",qa).getRegex(),PT=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cf).getRegex(),Sl={blockquote:PT,code:FT,def:OT,fences:AT,heading:ET,hr:Cs,html:DT,lheading:hf,list:IT,newline:LT,paragraph:cf,table:Qi,text:$T},sc=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cs).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",qa).getRegex(),RT={...Sl,lheading:MT,table:sc,paragraph:bt(kl).replace("hr",Cs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sc).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",qa).getRegex()},NT={...Sl,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wl).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:Qi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(kl).replace("hr",Cs).replace("heading",` *#{1,6} *[^
162
+ ]`).replace("lheading",hf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,uf=/^( {2,}|\\)\n(?!\s*$)/,WT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,za=/[\p{P}\p{S}]/u,_l=/[\s\p{P}\p{S}]/u,df=/[^\s\p{P}\p{S}]/u,HT=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_l).getRegex(),pf=/(?!~)[\p{P}\p{S}]/u,YT=/(?!~)[\s\p{P}\p{S}]/u,UT=/(?:[^\s\p{P}\p{S}]|~)/u,GT=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ff=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,jT=bt(ff,"u").replace(/punct/g,za).getRegex(),XT=bt(ff,"u").replace(/punct/g,pf).getRegex(),gf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",VT=bt(gf,"gu").replace(/notPunctSpace/g,df).replace(/punctSpace/g,_l).replace(/punct/g,za).getRegex(),ZT=bt(gf,"gu").replace(/notPunctSpace/g,UT).replace(/punctSpace/g,YT).replace(/punct/g,pf).getRegex(),KT=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,df).replace(/punctSpace/g,_l).replace(/punct/g,za).getRegex(),QT=bt(/\\(punct)/,"gu").replace(/punct/g,za).getRegex(),JT=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(),tw=bt(wl).replace("(?:-->|$)","-->").getRegex(),ew=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",tw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ba=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,rw=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ba).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mf=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",ba).replace("ref",Tl).getRegex(),yf=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tl).getRegex(),iw=bt("reflink|nolink(?!\\()","g").replace("reflink",mf).replace("nolink",yf).getRegex(),ac=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bl={_backpedal:Qi,anyPunctuation:QT,autolink:JT,blockSkip:GT,br:uf,code:zT,del:Qi,emStrongLDelim:jT,emStrongRDelimAst:VT,emStrongRDelimUnd:KT,escape:qT,link:rw,nolink:yf,punctuation:HT,reflink:mf,reflinkSearch:iw,tag:ew,text:WT,url:Qi},sw={...Bl,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",ba).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ba).getRegex()},mn={...Bl,emStrongRDelimAst:ZT,emStrongLDelim:XT,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ac).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",ac).getRegex()},aw={...mn,br:bt(uf).replace("{2,}","*").getRegex(),text:bt(mn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$s={normal:Sl,gfm:RT,pedantic:NT},Oi={normal:Bl,gfm:mn,breaks:aw,pedantic:sw},ow={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},oc=e=>ow[e];function Me(e,t){if(t){if(ee.escapeTest.test(e))return e.replace(ee.escapeReplace,oc)}else if(ee.escapeTestNoEncode.test(e))return e.replace(ee.escapeReplaceNoEncode,oc);return e}function nc(e){try{e=encodeURI(e).replace(ee.percentDecode,"%")}catch{return null}return e}function lc(e,t){var a;let r=e.replace(ee.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(ee.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(ee.slashPipe,"|");return i}function Ii(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function nw(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 hc(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function lw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
163
163
  `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
164
- `)}var xa=class{constructor(t){wt(this,"options");wt(this,"rules");wt(this,"lexer");this.options=t||Er}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:$i(i,`
165
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=PT(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:s}}}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 s=$i(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:$i(r[0],`
166
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=$i(r[0],`
164
+ `)}var ka=class{constructor(t){St(this,"options");St(this,"rules");St(this,"lexer");this.options=t||Ir}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:Ii(i,`
165
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=lw(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:s}}}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 s=Ii(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:Ii(r[0],`
166
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ii(r[0],`
167
167
  `).split(`
168
168
  `),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
169
169
  `),u=c.replace(this.rules.other.blockquoteSetextReplace,`
@@ -178,13 +178,13 @@ ${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
178
178
  `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
179
179
  `,1)[0],m=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):m?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+`
180
180
  `,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),B=this.rules.other.htmlBeginRegex(g);for(;t;){let M=t.split(`
181
- `,1)[0],L;if(d=M,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),L=d):L=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||B.test(d)||b.test(d)||k.test(d))break;if(L.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
182
- `+L.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||S.test(p)||k.test(p))break;u+=`
181
+ `,1)[0],v;if(d=M,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||B.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
182
+ `+v.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||S.test(p)||k.test(p))break;u+=`
183
183
  `+d}!m&&!d.trim()&&(m=!0),c+=M+`
184
- `,t=t.substring(M.length+1),p=L.slice(g)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(C=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}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," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Zh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
- `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Zh(l,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=$i(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=RT(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Kh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Kh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;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]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},xe=class cn{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||Er,this.options.tokenizer=this.options.tokenizer||new xa,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:Jt,block:Es.normal,inline:Mi.normal};this.options.pedantic?(r.block=Es.pedantic,r.inline=Mi.pedantic):this.options.gfm&&(r.block=Es.gfm,this.options.breaks?r.inline=Mi.breaks:r.inline=Mi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Es,inline:Mi}}static lex(t,r){return new cn(r).lex(t)}static lexInline(t,r){return new cn(r).inlineTokens(t)}lex(t){t=t.replace(Jt.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 s,a,o;for(this.options.pedantic&&(t=t.replace(Jt.tabCharGlobal," ").replace(Jt.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
184
+ `,t=t.substring(M.length+1),p=v.slice(g)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(C=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}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," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=lc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(lc(l,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=Ii(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=nw(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),hc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return hc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;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]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},Ce=class yn{constructor(t){St(this,"tokens");St(this,"options");St(this,"state");St(this,"tokenizer");St(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ir,this.options.tokenizer=this.options.tokenizer||new ka,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:ee,block:$s.normal,inline:Oi.normal};this.options.pedantic?(r.block=$s.pedantic,r.inline=Oi.pedantic):this.options.gfm&&(r.block=$s.gfm,this.options.breaks?r.inline=Oi.breaks:r.inline=Oi.gfm),this.tokenizer.rules=r}static get rules(){return{block:$s,inline:Oi}}static lex(t,r){return new yn(r).lex(t)}static lexInline(t,r){return new yn(r).inlineTokens(t)}lex(t){t=t.replace(ee.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 s,a,o;for(this.options.pedantic&&(t=t.replace(ee.tabCharGlobal," ").replace(ee.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
188
188
  `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.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
189
  `)?"":`
190
190
  `)+n.raw,h.text+=`
@@ -197,16 +197,16 @@ ${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
197
197
  `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
198
198
  `)?"":`
199
199
  `)+n.raw,h.text+=`
200
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);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 l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},ba=class{constructor(t){wt(this,"options");wt(this,"parser");this.options=t||Er}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Jt.notSpaceStart))==null?void 0:o[0],a=t.replace(Jt.endingNewline,"")+`
201
- `;return s?'<pre><code class="language-'+$e(s)+'">'+(i?a:$e(a,!0))+`</code></pre>
202
- `:"<pre><code>"+(i?a:$e(a,!0))+`</code></pre>
200
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);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 l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ta=class{constructor(t){St(this,"options");St(this,"parser");this.options=t||Ir}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(ee.notSpaceStart))==null?void 0:o[0],a=t.replace(ee.endingNewline,"")+`
201
+ `;return s?'<pre><code class="language-'+Me(s)+'">'+(i?a:Me(a,!0))+`</code></pre>
202
+ `:"<pre><code>"+(i?a:Me(a,!0))+`</code></pre>
203
203
  `}blockquote({tokens:t}){return`<blockquote>
204
204
  ${this.parser.parse(t)}</blockquote>
205
205
  `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
206
206
  `}hr(t){return`<hr>
207
207
  `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
208
208
  `+s+"</"+a+`>
209
- `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+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=s+" "+$e(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
209
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+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=s+" "+Me(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
210
210
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
211
211
  `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
212
212
  <thead>
@@ -215,28 +215,28 @@ ${this.parser.parse(t)}</blockquote>
215
215
  `}tablerow({text:t}){return`<tr>
216
216
  ${t}</tr>
217
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>${$e(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 s=this.parser.parseInline(i),a=Vh(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+$e(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=Vh(t);if(a===null)return $e(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${$e(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:$e(t.text)}},bl=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""}},be=class un{constructor(t){wt(this,"options");wt(this,"renderer");wt(this,"textRenderer");this.options=t||Er,this.options.renderer=this.options.renderer||new ba,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bl}static parse(t,r){return new un(r).parse(t)}static parseInline(t,r){return new un(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,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 l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,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 "'+l.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 s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Rs,Hi=(Rs=class{constructor(t){wt(this,"options");wt(this,"block");this.options=t||Er}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?xe.lex:xe.lexInline}provideParser(){return this.block?be.parse:be.parseInline}},wt(Rs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),wt(Rs,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Rs),NT=class{constructor(...t){wt(this,"defaults",dl());wt(this,"options",this.setOptions);wt(this,"parse",this.parseMarkdown(!0));wt(this,"parseInline",this.parseMarkdown(!1));wt(this,"Parser",be);wt(this,"Renderer",ba);wt(this,"TextRenderer",bl);wt(this,"Lexer",xe);wt(this,"Tokenizer",xa);wt(this,"Hooks",Hi);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new ba(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new xa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Hi;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];Hi.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&Hi.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return xe.lex(t,r??this.defaults)}parser(t,r){return be.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.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(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?xe.lex:xe.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?be.parse:be.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?xe.lex:xe.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?be.parse:be.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
220
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+$e(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Fr=new NT;function Tt(e,t){return Fr.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Fr.setOptions(e),Tt.defaults=Fr.defaults,Xp(Tt.defaults),Tt};Tt.getDefaults=dl;Tt.defaults=Er;Tt.use=function(...e){return Fr.use(...e),Tt.defaults=Fr.defaults,Xp(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Fr.walkTokens(e,t)};Tt.parseInline=Fr.parseInline;Tt.Parser=be;Tt.parser=be.parse;Tt.Renderer=ba;Tt.TextRenderer=bl;Tt.Lexer=xe;Tt.lexer=xe.lex;Tt.Tokenizer=xa;Tt.Hooks=Hi;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;be.parse;xe.lex;function of(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 s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
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>${Me(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 s=this.parser.parseInline(i),a=nc(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Me(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=nc(t);if(a===null)return Me(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Me(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Me(t.text)}},vl=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""}},xe=class Cn{constructor(t){St(this,"options");St(this,"renderer");St(this,"textRenderer");this.options=t||Ir,this.options.renderer=this.options.renderer||new Ta,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vl}static parse(t,r){return new Cn(r).parse(t)}static parseInline(t,r){return new Cn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,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 l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,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 "'+l.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 s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Ns,Ui=(Ns=class{constructor(t){St(this,"options");St(this,"block");this.options=t||Ir}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ce.lex:Ce.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},St(Ns,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),St(Ns,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ns),hw=class{constructor(...t){St(this,"defaults",xl());St(this,"options",this.setOptions);St(this,"parse",this.parseMarkdown(!0));St(this,"parseInline",this.parseMarkdown(!1));St(this,"Parser",xe);St(this,"Renderer",Ta);St(this,"TextRenderer",vl);St(this,"Lexer",Ce);St(this,"Tokenizer",ka);St(this,"Hooks",Ui);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Ta(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new ka(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Ui;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];Ui.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&Ui.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ce.lex(t,r??this.defaults)}parser(t,r){return xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.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(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?xe.parse:xe.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?xe.parse:xe.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
220
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Me(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},$r=new hw;function Tt(e,t){return $r.parse(e,t)}Tt.options=Tt.setOptions=function(e){return $r.setOptions(e),Tt.defaults=$r.defaults,nf(Tt.defaults),Tt};Tt.getDefaults=xl;Tt.defaults=Ir;Tt.use=function(...e){return $r.use(...e),Tt.defaults=$r.defaults,nf(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return $r.walkTokens(e,t)};Tt.parseInline=$r.parseInline;Tt.Parser=xe;Tt.parser=xe.parse;Tt.Renderer=Ta;Tt.TextRenderer=vl;Tt.Lexer=Ce;Tt.lexer=Ce.lex;Tt.Tokenizer=ka;Tt.Hooks=Ui;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;xe.parse;Ce.lex;function Cf(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 s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
221
221
  [ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(a,`
222
222
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=n;typeof n=="string"&&n.includes(`
223
223
  `)&&(u=String(n).split(`
224
224
  `).map(function(p,d){return d===0?p:""+c+p}).join(`
225
- `)),o+=u+i[l+1]}),o}var qT={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},dn=new Map,nf=new Map,WT=f(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(z.debug("Registering icon pack:",t.name),"loader"in t)nf.set(t.name,t.loader);else if("icons"in t)dn.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),lf=f(async(e,t)=>{const r=z2(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 s=dn.get(i);if(!s){const o=nf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},dn.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=U2(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),zT=f(async e=>{try{return await lf(e),!0}catch{return!1}},"isIconAvailable"),ys=f(async(e,t,r)=>{let i;try{i=await lf(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=qT}const s=Q2(i,t),a=rT(eT(s.body),{...s.attributes,...r});return _e(a,vt())},"getIconSVG");function hf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
225
+ `)),o+=u+i[l+1]}),o}var cw={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},xn=new Map,xf=new Map,uw=f(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(z.debug("Registering icon pack:",t.name),"loader"in t)xf.set(t.name,t.loader);else if("icons"in t)xn.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),bf=f(async(e,t)=>{const r=dT(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 s=xn.get(i);if(!s){const o=xf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},xn.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=gT(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),dw=f(async e=>{try{return await bf(e),!0}catch{return!1}},"isIconAvailable"),xs=f(async(e,t,r)=>{let i;try{i=await bf(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=cw}const s=TT(i,t),a=BT(_T(s.body),{...s.attributes,...r});return Se(a,Bt())},"getIconSVG");function kf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
226
226
  `).replace(/\n{2,}/g,`
227
- `);return of(i)}f(hf,"preprocessMarkdown");function cf(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"})))??[]})}f(cf,"nonMarkdownToLines");function uf(e,t={}){const r=hf(e,t),i=Tt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
228
- `).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}f(uf,"markdownToLines");function df(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(df,"nonMarkdownToHTML");function pf(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(z.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(pf,"markdownToHTML");function ff(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(ff,"splitTextToChars");function gf(e,t){const r=ff(t.content);return kl(e,[],r,t.type)}f(gf,"splitWordToFitWidth");function kl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?kl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(kl,"splitWordToFitWidthRecursion");function mf(e,t){if(e.some(({content:r})=>r.includes(`
229
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ka(e,t)}f(mf,"splitLineToFitWidth");function ka(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return ka(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=gf(t,a);r.push([n]),l.content&&e.unshift(l)}return ka(e,t,r)}f(ka,"splitLineToFitWidthRecursion");function pn(e,t){t&&e.attr("style",t)}f(pn,"applyStyle");var Qh=16384;async function yf(e,t,r,i,s=!1,a=vt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Qh)}px`),o.attr("height",`${Math.min(10*r,Qh)}px`);const n=o.append("xhtml:div"),l=Qi(t.label)?await Vc(t.label.replace(us.lineBreakRegex,`
230
- `),a):_e(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),pn(c,t.labelStyle),c.attr("class",`${h} ${i}`),pn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}f(yf,"addHtmlSpan");function qa(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(qa,"createTspan");function Cf(e,t,r){const i=e.append("text"),s=qa(i,1,t);Wa(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(Cf,"computeWidthOfText");function HT(e,t,r){var o;const i=e.append("text"),s=qa(i,1,t);Wa(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(HT,"computeDimensionOfText");function xf(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>Cf(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:mf(c,u);for(const d of p){const m=qa(l,h,1.1,s);Wa(m,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}f(xf,"createFormattedText");function fn(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}})}f(fn,"decodeHTMLEntities");function Wa(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(fn(r.content)):s.text(" "+fn(r.content))})}f(Wa,"updateTextContentAndStyles");async function bf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await zT(n)?await ys(n,void 0,{class:"label-icon"}):`<i class='${_e(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(bf,"replaceIconSubstring");var Qe=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(z.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?pf(t,c):df(t),p=await bf(Lr(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Qi(t)?d:p,labelStyle:r.replace("fill:","color:")};return await yf(e,m,l,s,h,c)}else{const u=Lr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?uf(u.replace("<br>","<br/>"),c):cf(u),d=xf(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).select("text").attr("style",g)}return i?ht(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Co(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function YT(e,t){return e[0]===t[0]&&e[1]===t[1]}function UT(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)Co(h,n,s);const l=function(h,c,u){const p=[];for(const b of h){const k=[...b];YT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.1);const m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const B=Math.min(w[1],S[1]);m.push({ymin:B,ymax:Math.max(w[1],S[1]),x:B===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(m.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)),!m.length)return d;let g=[],y=m[0].ymin,C=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>y);k++)b=k;m.splice(0,b+1).forEach(k=>{g.push({s:y,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=y)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%c==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const w=g[b].edge,S=g[k].edge;d.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(o,a,i);if(s){for(const h of o)Co(h,n,-s);(function(h,c,u){const p=[];h.forEach(d=>p.push(...d)),Co(p,c,u)})(l,n,-s)}return l}function Cs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),UT(e,s,i,a||1)}class Tl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Cs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function za(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 GT extends Tl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Cs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)za([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class jT extends Tl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class XT{constructor(t){this.helper=t}fillPolygons(t,r){const i=Cs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=za(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<c;m++){const g=d+u+m*s,y=p-o+2*Math.random()*o,C=g-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class VT{constructor(t){this.helper=t}fillPolygons(t,r){const i=Cs(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=za(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const m=d*(i+s),g=m+i,y=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}}),a}}class ZT{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Cs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=za(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<n;u++){const p=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[g[0]+m*Math.cos(c+Math.PI/4),g[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}}),s}}const ie={};class KT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const QT=0,xo=1,Jh=2,Ms={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 bo(e,t){return e.type===t}function wl(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:QT,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:xo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Jh,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!bo(a,Jh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return wl("M0,0"+e);s++,o=Ms[a.text],i=a.text}else bo(a,xo)?o=Ms[i]:(s++,o=Ms[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!bo(h,xo))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof Ms[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function kf(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Tf(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const g=i+2*(d-i)/3,y=s+2*(m-s)/3,C=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[g,y,C,b,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=c,g=i+2*(u-i)/3,y=s+2*(p-s)/3,C=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[g,y,C,b,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],g=c[4],y=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(wf(i,s,y,C,u,p,d,m,g).forEach(function(b){t.push({key:"C",data:b})}),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function Oi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function wf(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=Oi(e,t,-c),[r,i]=Oi(r,i,-c);const H=(e-r)/2,I=(t-i)/2;let E=H*H/(s*s)+I*I/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const v=s*s,$=a*a,A=v*$-v*I*I-$*H*H,_=v*I*I+$*H*H,q=(n===l?-1:1)*Math.sqrt(Math.abs(A/_));g=q*s*I/a+(e+r)/2,y=q*-a*H/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const H=m,I=r,E=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=wf(r=g+s*Math.cos(m),i=y+a*Math.sin(m),I,E,s,a,o,0,l,[m,H,g,y])}C=m-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(m),S=Math.sin(m),B=Math.tan(C/4),M=4/3*s*B,L=4/3*a*B,W=[e,t],P=[e+M*k,t-L*b],O=[r+M*S,i-L*w],Y=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],h)return[P,O,Y].concat(p);{p=[P,O,Y].concat(p);const H=[];for(let I=0;I<p.length;I+=3){const E=Oi(p[I][0],p[I][1],c),v=Oi(p[I+1][0],p[I+1][1],c),$=Oi(p[I+2][0],p[I+2][1],c);H.push([E[0],E[1],v[0],v[1],$[0],$[1]])}return H}}const JT={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return Ta(e,t,r)},ellipse:function(e,t,r,i,s){const a=_f(r,i,s);return gn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return lr(e,t,r,i,s,!0)}};function Sf(e,t,r,i,s){return{type:"path",ops:lr(e,t,r,i,s)}}function js(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...lr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Sf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function tw(e,t,r,i,s){return function(a,o){return js(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function tc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=$s(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:$s(r[0],1.5*(1+.22*t.roughness),ic(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=$s(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:$s(o,1.5*(1+.22*t.roughness),ic(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function _f(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=rt(o*l,r),n+=rt(n*l,r),{increment:a,rx:o,ry:n}}function gn(e,t,r,i){const[s,a]=sc(i.increment,e,t,i.rx,i.ry,1,i.increment*Ta(.1,Ta(.4,1,r),r),r);let o=wa(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=sc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=wa(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function ec(e,t,r,i,s,a,o,n,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=rt(.01*u,l),p+=rt(.01*p,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),C=ac(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=ac(y,h,c,u,p,d,m,1.5,l);C.push(...b)}return o&&(n?C.push(...lr(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...lr(h,c,h+u*Math.cos(m),c+p*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function rc(e,t){const r=Tf(kf(wl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...lr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,u,p,d]=n;i.push(...ew(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...lr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function ko(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+rt(s,t),i[0][1]+rt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+rt(s,t),i[o][1]+rt(s,t)]})}}return{type:"fillPath",ops:r}}function zr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!ie[s])switch(s){case"zigzag":ie[s]||(ie[s]=new GT(i));break;case"cross-hatch":ie[s]||(ie[s]=new jT(i));break;case"dots":ie[s]||(ie[s]=new XT(i));break;case"dashed":ie[s]||(ie[s]=new VT(i));break;case"zigzag-line":ie[s]||(ie[s]=new ZT(i));break;default:s="hachure",ie[s]||(ie[s]=new Tl(i))}return ie[s]}(t,JT).fillPolygons(e,t)}function ic(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Bf(e){return e.randomizer||(e.randomizer=new KT(e.seed||0)),e.randomizer.next()}function Ta(e,t,r,i=1){return r.roughness*i*(Bf(r)*(t-e)+e)}function rt(e,t,r=1){return Ta(-e,e,t,r)}function lr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=mn(e,t,r,i,s,!0,!1);if(o)return n;const l=mn(e,t,r,i,s,!0,!0);return n.concat(l)}function mn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,p=.2+.2*Bf(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=rt(d,s,h),m=rt(m,s,h);const g=[],y=()=>rt(u,s,h),C=()=>rt(c,s,h),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:rt(c,s,h)),t+(b?0:rt(c,s,h))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),g}function $s(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+rt(t,r),e[s][1]+rt(t,r)]),s===e.length-1&&i.push([e[s][0]+rt(t,r),e[s][1]+rt(t,r)]);return wa(i,null,r)}function wa(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...mn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function sc(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=rt(.5,n)-Math.PI/2;h.push([rt(a,n)+t+.9*i*Math.cos(c-e),rt(a,n)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[rt(a,n)+t+i*Math.cos(p),rt(a,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([rt(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),rt(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([rt(a,n)+t+.98*i*Math.cos(c+o),rt(a,n)+r+.98*s*Math.sin(c+o)]),h.push([rt(a,n)+t+.9*i*Math.cos(c+.5*o),rt(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function ac(e,t,r,i,s,a,o,n,l){const h=a+rt(.1,l),c=[];c.push([rt(n,l)+t+.9*i*Math.cos(h-e),rt(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([rt(n,l)+t+i*Math.cos(u),rt(n,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),wa(c,null,l)}function ew(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const u=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:rt(h[0],n)),o[1]+(p?0:rt(h[0],n))]}),c=p?[s,a]:[s+rt(h[d],n),a+rt(h[d],n)],l.push({op:"bcurveTo",data:[e+rt(h[d],n),t+rt(h[d],n),r+rt(h[d],n),i+rt(h[d],n),c[0],c[1]]});return l}function Ii(e){return[...e]}function oc(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(Ii(e[0]),Ii(e[1]),Ii(e[2]),Ii(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Ii(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Xs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function rw(e,t,r){const i=Xs(t,r);if(i===0)return Xs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Xs(e,yr(t,r,s))}function yr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function yn(e,t,r,i){const s=i||[];if(function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],p=n[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let m=3*c[1]-2*h[1]-p[1];m*=m;let g=3*u[0]-2*p[0]-h[0];g*=g;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<g&&(d=g),m<y&&(m=y),d+m}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Xs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=yr(l,h,.5),d=yr(h,c,.5),m=yr(c,u,.5),g=yr(p,d,.5),y=yr(d,m,.5),C=yr(g,y,.5);yn([l,p,g,C],0,r,s),yn([C,y,m,u],0,r,s)}var a,o;return s}function iw(e,t){return Sa(e,0,e.length,t)}function Sa(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=rw(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Sa(e,t,h+1,i,a),Sa(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function To(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)yn(e,3*a,t,i);return r&&r>0?Sa(i,0,i.length,r):i}const ne="none";class _a{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,s,a){const o=this._o(a);return this._d("line",[Sf(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=tw(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(ko([h],o)):n.push(zr([h],o))}return o.stroke!==ne&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=_f(i,s,o),h=gn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=gn(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(zr([h.estimatedPoints],o));return o.stroke!==ne&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[js(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=ec(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=ec(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push(function(p,d,m,g,y,C,b){const k=p,w=d;let S=Math.abs(m/2),B=Math.abs(g/2);S+=rt(.01*S,b),B+=rt(.01*B,b);let M=y,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 W=(L-M)/b.curveStepCount,P=[];for(let O=M;O<=L;O+=W)P.push([k+S*Math.cos(O),w+B*Math.sin(O)]);return P.push([k+S*Math.cos(L),w+B*Math.sin(L)]),P.push([k,w]),zr([P],b)}(t,r,i,s,a,o,h));return h.stroke!==ne&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=tc(t,i);if(i.fill&&i.fill!==ne)if(i.fillStyle==="solid"){const o=tc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...To(oc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...To(oc(h),10,(1+i.roughness)/2))}o.length&&s.push(zr([o],i))}return i.stroke!==ne&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=js(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ko([t],i)):s.push(zr([t],i))),i.stroke!==ne&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ne,o=i.stroke!==ne,n=!!(i.simplification&&i.simplification<1),l=function(c,u,p){const d=Tf(kf(wl(c))),m=[];let g=[],y=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...To(C,u)),C=[]},k=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:S,data:B}of d)switch(S){case"M":k(),y=[B[0],B[1]],g.push(y);break;case"L":b(),g.push([B[0],B[1]]);break;case"C":if(!C.length){const M=g.length?g[g.length-1]:y;C.push([M[0],M[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(k(),!p)return m;const w=[];for(const S of m){const B=iw(S,p);B.length&&w.push(B)}return w}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=rc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=rc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(ko(l,i));else s.push(zr(l,i));return o&&(n?l.forEach(c=>{s.push(js(c,!1,i))}):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ne};break;case"fillPath":o={d:this.opsToPath(a),stroke:ne,strokeWidth:0,fill:i.fill||ne};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ne,strokeWidth:i,fill:ne}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class sw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.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(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);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 Os="http://www.w3.org/2000/svg";class aw{constructor(t,r){this.svg=t,this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Os,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Os,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Os,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Os,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);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 X={canvas:(e,t)=>new sw(e,t),svg:(e,t)=>new aw(e,t),generator:e=>new _a(e),newSeed:()=>_a.newSeed()},et=f(async(e,t,r)=>{var d,m;let i;const s=t.useHtmlLabels||Ke((d=yt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await Qe(o,_e(Lr(n),yt()),{useHtmlLabels:s,width:t.width||((m=yt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},yt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],y=ht(c);await Up(g,n),u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return s?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:p,label:o}},"labelHelper"),wo=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ee(yt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Qe(s,_e(Lr(t),yt()),{useHtmlLabels:i,width:r.width||((h=(l=yt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ee(yt())){const c=a.children[0],u=ht(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),K=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),tt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ft(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(ft,"createPathFromPoints");function hr(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const m=d/50,g=e+m*l,y=p+s*Math.sin(u*(g-e));o.push({x:g,y})}return o}f(hr,"generateFullSineWavePoints");function ns(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(ns,"generateCirclePoints");function Cn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(Cn,"mergePaths");var ow=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),Ti=ow,nw=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=yt(),n=ee(o);return await Qe(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),rr=nw,cr=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),vf=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Qe(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await rr(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(ee(r)){const M=m.children[0],L=ht(m);g=M.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const M=X.svg(u),L=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=M.path(cr(b,k,y,C,0),L);w=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=ul(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ti(t,M)},{cluster:u,labelBBox:g}},"rect"),lw=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Ti(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),hw=f(async(e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=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"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await rr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(ee(r)){const W=d.children[0],P=ht(d);m=W.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const g=0*t.padding,y=g/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-m.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+m.height+2;let M;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),P=X.svg(h),O=t.rx||t.ry?P.path(cr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):P.rectangle(w,S,C,b,{seed:s});M=h.insert(()=>O,":first-child");const Y=P.rectangle(w,B,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>O,":first-child"),p=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",B).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${S+1-(ee(r)?0:3)})`);const L=M.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(W){return Ti(t,W)},{cluster:h,labelBBox:m}},"roundedWithTitle"),cw=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),d=u.insert("g").attr("class","cluster-label "),m=await Qe(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=m.getBBox();if(ee(r)){const M=m.children[0],L=ht(m);g=M.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const M=X.svg(u),L=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=M.path(cr(b,k,y,C,t.rx),L);w=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=ul(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ti(t,M)},{cluster:u,labelBBox:g}},"kanbanSection"),uw=f((e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=X.svg(o).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>y,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Ti(t,g)},{cluster:o,labelBBox:{}}},"divider"),dw=vf,pw={rect:vf,squareRect:dw,roundedWithTitle:hw,noteGroup:lw,divider:uw,kanbanSection:cw},Lf=new Map,fw=f(async(e,t)=>{const r=t.shape||"rect",i=await pw[r](e,t);return Lf.set(t.id,i),i},"insertCluster"),nL=f(()=>{Lf=new Map},"clear");function Ff(e,t){return e.intersect(t)}f(Ff,"intersectNode");var gw=Ff;function Af(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}f(Af,"intersectEllipse");var Ef=Af;function Mf(e,t,r){return Ef(e,t,t,r)}f(Mf,"intersectCircle");var mw=Mf;function $f(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&xn(n,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,m=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(m)<h&&xn(d,m))return;const g=s*u-c*a;if(g===0)return;const y=Math.abs(g/2);let C=a*p-u*o;const b=C<0?(C-y)/g:(C+y)/g;C=c*o-s*p;const k=C<0?(C-y)/g:(C+y)/g;return{x:b,y:k}}}f($f,"intersectLine");function xn(e,t){return e*t>0}f(xn,"sameSign");var yw=$f;function Of(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=yw(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,m=Math.sqrt(p*p+d*d),g=u.x-r.x,y=u.y-r.y,C=Math.sqrt(g*g+y*y);return m<C?-1:m===C?0:1}),a[0]):e}f(Of,"intersectPolygon");var Cw=Of,j={node:gw,circle:mw,ellipse:Ef,polygon:Cw,rect:Ti};function If(e,t){const{labelStyles:r}=Z(t);t.labelStyle=r;const i=tt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=X.svg(a),h=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",qt(n)),K(t,u),t.intersect=function(p){return z.info("Circle intersect",t,o,p),j.circle(t,o,p)},a}f(If,"anchor");function bn(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,m=p/a,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),C=l+y*a*Math.sin(c)*(o?-1:1),b=h-y*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let S=Math.atan2((i-b)/a,(r-C)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const B=[];for(let M=0;M<20;M++){const L=M/19,W=k+L*S,P=C+s*Math.cos(W),O=b+a*Math.sin(W);B.push({x:P,y:O})}return B}f(bn,"generateArcPoints");function Df(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Df,"calculateArcSagitta");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(W=>W+o,"calcTotalHeight"),l=f(W=>{const P=W/2;return[P/(2.5+W/50),P]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=Df(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...bn(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...bn(y/2,C/2,y/2,-C/2,p,d,!0)],w=X.svg(h),S=V(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=ft(k),M=w.path(B,S),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(${p/2}, 0)`),K(t,L),t.intersect=function(W){return j.polygon(t,k,W)},h}f(Rf,"bowTieRect");function Je(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Je,"insertPolygonShape");var Is=12;async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Is),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,m=0,g=[{x:u+Is,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Is},{x:u+Is,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=V(t,{}),w=ft(g),S=b.path(w,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Je(n,h,c,g);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return j.polygon(t,g,b)},n}f(Pf,"card");function Nf(e,t){const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=X.svg(i),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=ft(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return j.polygon(t,o,p)},i}f(Nf,"choice");async function Sl(e,t,r){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await et(e,t,tt(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(a),m=V(t,{}),g=d.circle(0,0,c*2,m);u=a.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",qt(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return K(t,u),t.calcIntersect=function(d,m){const g=d.width/2;return j.circle(d,g,m)},t.intersect=function(d){return z.info("Circle intersect",t,c,d),j.circle(t,c,d)},a}f(Sl,"circle");function qf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
231
- M ${s.x},${s.y} L ${o.x},${o.y}`}f(qf,"createLine");function Wf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=X.svg(s),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=qf(a),u=n.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),K(t,p),t.intersect=function(d){return z.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},s}f(Wf,"crossedCircle");function Ue(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(Ue,"generateCirclePoints");async function zf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Ue(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Ue(h/2+u*2,-u,u,20,-180,-270),...Ue(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Ue(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Ue(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Ue(h/2+h*.1,-u,u,20,-180,-270),...Ue(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Ue(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=X.svg(s),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(d).replace("Z",""),k=g.path(b,y),w=ft(m),S=g.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,B),t.intersect=function(M){return j.polygon(t,m,M)},s}f(zf,"curlyBraceLeft");function Ge(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:d,y:m})}return o}f(Ge,"generateCirclePoints");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Ge(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ge(h/2+u*2,-u,u,20,-180,-270),...Ge(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ge(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...Ge(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ge(h/2+u*2,-u,u,20,-180,-270),...Ge(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ge(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=X.svg(s),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(d).replace("Z",""),k=g.path(b,y),w=ft(m),S=g.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,B),t.intersect=function(M){return j.polygon(t,m,M)},s}f(Hf,"curlyBraceRight");function zt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(zt,"generateCirclePoints");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...zt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...zt(h/2+u*2,-u,u,20,-180,-270),...zt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...zt(h/2,c/2,u,20,0,90)],m=[...zt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...zt(-h/2-u/2,-u,u,20,0,90),...zt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...zt(-h/2+u+u/2,c/2,u,30,-180,-270)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...zt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...zt(h/2+u*2,-u,u,20,-180,-270),...zt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...zt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...zt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...zt(-h/2-u/2,-u,u,20,0,90),...zt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...zt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=X.svg(s),C=V(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ft(d).replace("Z",""),w=y.path(k,C),B=ft(m).replace("Z",""),M=y.path(B,C),L=ft(g),W=y.path(L,{...C}),P=s.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>w,":first-child"),P.insert(()=>M,":first-child"),P.attr("class","text"),p&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,P),t.intersect=function(O){return j.polygon(t,g,O)},s}f(Yf,"curlyBraces");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:m}=t,g=X.svg(h),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...ns(-k,-b/2,d,50,270,90)],B=ft(S),M=g.path(B,y),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-u/2}, ${-p/2})`),K(t,L),t.intersect=function(W){return j.polygon(t,S,W)},h}f(Uf,"curvedTrapezoid");var xw=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),bw=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),kw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),nc=8,lc=8;async function Gf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<lc&&(t.width=lc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<nc&&(t.height=nc)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t.width?t.width:l.width)+o,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+a+p;let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=X.svg(n),C=bw(0,0,c,d,u,p),b=kw(0,p,c,d,u,p),k=V(t,{}),w=y.path(C,k),S=y.path(b,V(t,{fill:"none"}));m=n.insert(()=>S,":first-child"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=xw(0,0,c,d,u,p);m=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",qt(g)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=j.rect(t,y),b=C.x-(t.x??0);if(u!=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-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}f(Gf,"cylinder");async function wi(e,t,r){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await et(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=X.svg(a),y=V(t,{}),C=p||d?g.path(cr(h,c,n,l,p||0),y):g.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",qt(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",qt(p)).attr("ry",qt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return K(t,u),t.calcIntersect=function(g,y){return j.rect(g,y)},t.intersect=function(g){return j.rect(t,g)},a}f(wi,"drawRect");async function jf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await wi(e,t,l);if(t.look==="handDrawn"){const d=X.svg(h),m=V(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),y=g.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),g.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return u>0&&p>0&&c.attr("stroke-dasharray",`${u} ${p}`),h}f(jf,"datastore");async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=X.svg(o),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=g.polygon(C.map(w=>[w.x,w.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),K(t,k),t.intersect=function(w){return j.rect(t,w)},o}f(Xf,"dividedRectangle");async function Vf(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=Z(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=X.svg(n),y=V(t,{roughness:.2,strokeWidth:2.5}),C=V(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),k=g.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",qt(t.cssClasses)).attr("style",qt(p)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return K(t,u),t.intersect=function(g){return z.info("DoubleCircle intersect",t,h,g),j.circle(t,h,g)},n}f(Vf,"doublecircle");function Zf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Z(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=X.svg(a),{nodeBorder:h}=r,c=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),K(t,p),t.intersect=function(d){return z.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}f(Zf,"filledCircle");var hc=10,cc=10;async function Kf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<hc&&(t.height=hc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<cc&&(t.width=cc));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,m=X.svg(o),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ft(p),C=m.path(y,g),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,K(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return z.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},o}f(Kf,"flippedTriangle");function Qf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Z(t);t.label="";const o=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=X.svg(o),d=V(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),g=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),K(t,g);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return j.rect(t,C)},o}f(Qf,"forkJoin");async function Jf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,p=u/2,{cssStyles:d}=t,m=X.svg(l),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...ns(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=ft(y),b=m.path(C,g),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(w){return z.info("Pill intersect",t,{radius:p,point:w}),j.polygon(t,y,w)},l}f(Jf,"halfRoundedRectangle");var Tw=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await et(e,t,tt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(c),k=V(t,{}),w=Tw(0,0,m,p,d),S=b.path(w,k);y=c.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&y.attr("style",C)}else y=Je(c,m,p,g);return i&&y.attr("style",i),t.width=m,t.height=p,K(t,y),t.intersect=function(b){return j.polygon(t,g,b)},c}f(tg,"hexagon");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await et(e,t,tt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=X.svg(s),h=V(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ft(c),p=l.path(u,h),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),K(t,d),t.intersect=function(m){return z.info("Pill intersect",t,{points:c}),j.polygon(t,c,m)},s}f(eg,"hourglass");async function rg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await et(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:g}=r,{stylesMap:y}=ki(t),C=-m/2,b=-d/2,k=t.label?8:0,w=X.svg(h),S=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=w.rectangle(C,b,m,d,S),M=Math.max(m,c.width),L=d+c.height+k,W=w.rectangle(-M/2,-L/2,M,L,{...S,fill:"transparent",stroke:"none"}),P=h.insert(()=>B,":first-child"),O=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await ys(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),I=H.width,E=H.height,v=H.x,$=H.y;Y.attr("transform",`translate(${-I/2-v},${p?c.height/2+k/2-E/2-$:-c.height/2-k/2-E/2-$})`),Y.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),P.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),K(t,O),t.intersect=function(Y){if(z.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const H=t.x??0,I=t.y??0,E=t.height??0;let v=[];return p?v=[{x:H-c.width/2,y:I-E/2},{x:H+c.width/2,y:I-E/2},{x:H+c.width/2,y:I-E/2+c.height+k},{x:H+m/2,y:I-E/2+c.height+k},{x:H+m/2,y:I+E/2},{x:H-m/2,y:I+E/2},{x:H-m/2,y:I-E/2+c.height+k},{x:H-c.width/2,y:I-E/2+c.height+k}]:v=[{x:H-m/2,y:I-E/2},{x:H+m/2,y:I-E/2},{x:H+m/2,y:I-E/2+d},{x:H+c.width/2,y:I-E/2+d},{x:H+c.width/2/2,y:I+E/2},{x:H-c.width/2,y:I+E/2},{x:H-c.width/2,y:I-E/2+d},{x:H-m/2,y:I-E/2+d}],j.polygon(t,v,Y)},h}f(rg,"icon");async function ig(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await et(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:C}=ki(t),b=X.svg(h),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??y;const S=h.append("g");t.icon&&S.html(`<g>${await ys(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=S.node().getBBox(),M=B.width,L=B.height,W=B.x,P=B.y,O=Math.max(M,L)*Math.SQRT2+p*2,Y=b.circle(0,0,O,k),H=Math.max(O,c.width),I=O+c.height+d,E=b.rectangle(-H/2,-I/2,H,I,{...k,fill:"transparent",stroke:"none"}),v=h.insert(()=>Y,":first-child"),$=h.insert(()=>E);return S.attr("transform",`translate(${-M/2-W},${m?c.height/2+d/2-L/2-P:-c.height/2-d/2-L/2-P})`),S.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-I/2:I/2-c.height})`),v.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),K(t,$),t.intersect=function(A){return z.info("iconSquare intersect",t,A),j.rect(t,A)},h}f(ig,"iconCircle");async function sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await et(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ki(t),k=-g/2,w=-m/2,S=t.label?8:0,B=X.svg(h),M=V(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const W=B.path(cr(k,w,g,m,5),M),P=Math.max(g,c.width),O=m+c.height+S,Y=B.rectangle(-P/2,-O/2,P,O,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child").attr("class","icon-shape2"),I=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await ys(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=E.node().getBBox(),$=v.width,A=v.height,_=v.x,q=v.y;E.attr("transform",`translate(${-$/2-_},${d?c.height/2+S/2-A/2-q:-c.height/2-S/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),K(t,I),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const v=t.x??0,$=t.y??0,A=t.height??0;let _=[];return d?_=[{x:v-c.width/2,y:$-A/2},{x:v+c.width/2,y:$-A/2},{x:v+c.width/2,y:$-A/2+c.height+S},{x:v+g/2,y:$-A/2+c.height+S},{x:v+g/2,y:$+A/2},{x:v-g/2,y:$+A/2},{x:v-g/2,y:$-A/2+c.height+S},{x:v-c.width/2,y:$-A/2+c.height+S}]:_=[{x:v-g/2,y:$-A/2},{x:v+g/2,y:$-A/2},{x:v+g/2,y:$-A/2+m},{x:v+c.width/2,y:$-A/2+m},{x:v+c.width/2/2,y:$+A/2},{x:v-c.width/2,y:$+A/2},{x:v-c.width/2,y:$-A/2+m},{x:v-g/2,y:$-A/2+m}],j.polygon(t,_,E)},h}f(sg,"iconRounded");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await et(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ki(t),k=-g/2,w=-m/2,S=t.label?8:0,B=X.svg(h),M=V(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const W=B.path(cr(k,w,g,m,.1),M),P=Math.max(g,c.width),O=m+c.height+S,Y=B.rectangle(-P/2,-O/2,P,O,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child"),I=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await ys(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=E.node().getBBox(),$=v.width,A=v.height,_=v.x,q=v.y;E.attr("transform",`translate(${-$/2-_},${d?c.height/2+S/2-A/2-q:-c.height/2-S/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),K(t,I),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const v=t.x??0,$=t.y??0,A=t.height??0;let _=[];return d?_=[{x:v-c.width/2,y:$-A/2},{x:v+c.width/2,y:$-A/2},{x:v+c.width/2,y:$-A/2+c.height+S},{x:v+g/2,y:$-A/2+c.height+S},{x:v+g/2,y:$+A/2},{x:v-g/2,y:$+A/2},{x:v-g/2,y:$-A/2+c.height+S},{x:v-c.width/2,y:$-A/2+c.height+S}]:_=[{x:v-g/2,y:$-A/2},{x:v+g/2,y:$-A/2},{x:v+g/2,y:$-A/2+m},{x:v+c.width/2,y:$-A/2+m},{x:v+c.width/2/2,y:$+A/2},{x:v-c.width/2,y:$+A/2},{x:v-c.width/2,y:$-A/2+m},{x:v-g/2,y:$-A/2+m}],j.polygon(t,_,E)},h}f(ag,"iconSquare");async function og(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=Z(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:p,label:d}=await et(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,C=t.label?8:0,b=X.svg(u),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(g,y,h,c,k),S=Math.max(h,p.width),B=c+p.height+C,M=b.rectangle(-S/2,-B/2,S,B,{...k,fill:"none",stroke:"none"}),L=u.insert(()=>w,":first-child"),W=u.insert(()=>M);if(t.img){const P=u.append("image");P.attr("href",t.img),P.attr("width",h),P.attr("height",c),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-h/2},${m?B/2-c:-B/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),L.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),K(t,W),t.intersect=function(P){if(z.info("iconSquare intersect",t,P),!t.label)return j.rect(t,P);const O=t.x??0,Y=t.y??0,H=t.height??0;let I=[];return m?I=[{x:O-p.width/2,y:Y-H/2},{x:O+p.width/2,y:Y-H/2},{x:O+p.width/2,y:Y-H/2+p.height+C},{x:O+h/2,y:Y-H/2+p.height+C},{x:O+h/2,y:Y+H/2},{x:O-h/2,y:Y+H/2},{x:O-h/2,y:Y-H/2+p.height+C},{x:O-p.width/2,y:Y-H/2+p.height+C}]:I=[{x:O-h/2,y:Y-H/2},{x:O+h/2,y:Y-H/2},{x:O+h/2,y:Y-H/2+c},{x:O+p.width/2,y:Y-H/2+c},{x:O+p.width/2/2,y:Y+H/2},{x:O-p.width/2,y:Y+H/2},{x:O-p.width/2,y:Y-H/2+c},{x:O-h/2,y:Y-H/2+c}],j.polygon(t,I,P)},u}f(og,"imageSquare");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=V(t,{}),y=ft(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Je(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(ng,"inv_trapezoid");async function lg(e,t){const{shapeSvg:r,bbox:i,label:s}=await et(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),K(t,a),t.intersect=function(l){return j.rect(t,l)},r}f(lg,"labelRect");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=V(t,{}),y=ft(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Je(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(hg,"lean_left");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=V(t,{}),y=ft(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Je(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(cg,"lean_right");function ug(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=X.svg(s),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=ft(h),d=c.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),K(t,m),t.intersect=function(g){return z.info("lightningBolt intersect",t,g),j.polygon(t,h,g)},s}f(ug,"lightningBolt");var ww=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Sw=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),_w=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),uc=10,dc=10;async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<dc&&(t.width=dc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<uc&&(t.height=uc)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,m=d*.1;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=X.svg(n),b=Sw(0,0,c,d,u,p,m),k=_w(0,p,c,d,u,p),w=V(t,{}),S=C.path(b,w),B=C.path(k,w);n.insert(()=>B,":first-child").attr("class","line"),g=n.insert(()=>S,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const C=ww(0,0,c,d,u,p,m);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",qt(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=j.rect(t,C),k=b.x-(t.x??0);if(u!=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-p)){let w=p*p*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=p-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}f(dg,"linedCylinder");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*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:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:m}=t,g=X.svg(n),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...hr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=g.polygon(C.map(w=>[w.x,w.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),K(t,k),t.intersect=function(w){return j.polygon(t,C,w)},n}f(pg,"linedWaveEdgedRect");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,m=p-2*n,g=-d/2,y=-m/2,{cssStyles:C}=t,b=X.svg(l),k=V(t,{}),w=[{x:g-n,y:y+n},{x:g-n,y:y+m+n},{x:g+d-n,y:y+m+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-n},{x:g+d+n,y:y+m-n},{x:g+d+n,y:y-n},{x:g+n,y:y-n},{x:g+n,y},{x:g,y},{x:g,y:y+n}],S=[{x:g,y:y+n},{x:g+d-n,y:y+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=ft(w);let M=b.path(B,k);const L=ft(S);let W=b.path(L,k);t.look!=="handDrawn"&&(M=Cn(M),W=Cn(W));const P=l.insert("g",":first-child");return P.insert(()=>M),P.insert(()=>W),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),K(t,P),t.intersect=function(O){return j.polygon(t,w,O)},l}f(fg,"multiRect");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,m=p+(c?d/2:-d/2),g=-u/2,y=-m/2,C=10,{cssStyles:b}=t,k=hr(g-C,y+m+C,g+u-C,y+m+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:g-C,y:y+C},{x:g-C,y:y+m+C},...k,{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:w.y-2*C},{x:g+u+C,y:w.y-2*C},{x:g+u+C,y:y-C},{x:g+C,y:y-C},{x:g+C,y},{x:g,y},{x:g,y:y+C}],B=[{x:g,y:y+C},{x:g+u-C,y:y+C},{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y},{x:g,y}],M=X.svg(s),L=V(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const W=ft(S),P=M.path(W,L),O=ft(B),Y=M.path(O,L),H=s.insert(()=>P,":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,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),K(t,H),t.intersect=function(I){return j.polygon(t,S,I)},s}f(gg,"multiWaveEdgedRectangle");async function mg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i,t.useHtmlLabels||ee(vt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,m=X.svg(o),g=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,p,h,c,g),C=o.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,C),t.intersect=function(b){return j.rect(t,b)},o}f(mg,"note");var Bw=f((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 yg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await et(e,t,tt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(s),m=V(t,{}),g=Bw(0,0,l),y=d.path(g,m);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Je(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),K(t,u),t.calcIntersect=function(d,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=j.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(yg,"question");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/2,d=-u/2,m=d/2,g=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ft(g),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,S),t.intersect=function(B){return j.polygon(t,g,B)},n}f(Cg,"rect_left_inv_arrow");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await rr(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ee(yt())){const L=c.children[0],W=ht(c);u=L.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}z.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await rr(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),g=m.children[0],y=ht(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ht(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ht(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,S=-u.height/2-C;let B,M;if(t.look==="handDrawn"){const L=X.svg(a),W=V(t,{}),P=L.path(cr(w,S,b,k,t.rx||0),W),O=L.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,W);M=a.insert(()=>(z.debug("Rough node insert CXC",P),O),":first-child"),B=a.insert(()=>(z.debug("Rough node insert CXC",P),P),":first-child")}else B=o.insert("rect",":first-child"),M=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),M.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return K(t,B),t.intersect=function(L){return j.rect(t,L)},a}f(xg,"rectWithTitle");async function bg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return wi(e,t,s)}f(bg,"roundedRect");var gr=8;async function kg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?gr:gr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-gr,p=c,d=gr-h/2,m=-c/2,{cssStyles:g}=t,y=X.svg(o),C=V(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-gr,y:m+p},{x:d-gr,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",qt(g)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${gr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,w),t.intersect=function(S){return j.rect(t,S)},o}f(kg,"shadedProcess");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,d=u/1.5,m=-p/2,g=-d/2,{cssStyles:y}=t,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:g},{x:m,y:g+d},{x:m+p,y:g+d},{x:m+p,y:g-d/2}],w=ft(k),S=C.path(w,b),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),K(t,B),t.intersect=function(M){return j.polygon(t,k,M)},n}f(Tg,"slopedRect");async function wg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return wi(e,t,a)}f(wg,"squareRect");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:p}=t,d=X.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...ns(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...ns(c/2-u,0,u,50,270,450)],y=ft(g),C=d.path(y,m),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),K(t,b),t.intersect=function(k){return j.polygon(t,g,k)},n}f(Sg,"stadium");async function _g(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return wi(e,t,r)}f(_g,"state");function Bg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,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),u=X.svg(c),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return K(t,C),t.intersect=function(w){return j.circle(t,(t.width??0)/2,w)},c}f(Bg,"stateEnd");function vg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=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 a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=X.svg(a).circle(0,0,t.width,I2(i));o=a.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=a.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&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return K(t,o),t.intersect=function(h){return j.circle(t,(t.width??7)/2,h)},a}f(vg,"stateStart");var Hr=8;async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??l.width)+2*Hr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Hr,p=c,d=-h/2,m=-c/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=X.svg(n),C=V(t,{}),b=y.rectangle(d,m,u+16,p,C),k=y.line(d+Hr,m,d+Hr,m+p,C),w=y.line(d+Hr+u,m,d+Hr+u,m+p,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:B}=t;S.attr("class","basic label-container").attr("style",qt(B)),K(t,S)}else{const y=Je(n,u,p,g);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return j.polygon(t,g,y)},n}f(Lg,"subroutine");var So=.2;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(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)-a*2-So*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=So*h,u=So*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:C}=t,b=X.svg(n),k=V(t,{}),w=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],S=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=ft(w),M=b.path(B,k),L=ft(S),W=b.path(L,{...k,fillStyle:"solid"}),P=n.insert(()=>W,":first-child");return P.insert(()=>M,":first-child"),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),K(t,P),t.intersect=function(O){return j.polygon(t,w,O)},n}f(Fg,"taggedRect");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,p=l+h,{cssStyles:d}=t,m=X.svg(s),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...hr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...hr(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],w=ft(y),S=m.path(w,g),B=ft(k),M=m.path(B,{...g,fillStyle:"solid"}),L=s.insert(()=>M,":first-child");return L.insert(()=>S,":first-child"),L.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),K(t,L),t.intersect=function(W){return j.polygon(t,y,W)},s}f(Ag,"taggedWaveEdgedRectangle");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await et(e,t,tt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),K(t,c),t.intersect=function(u){return j.rect(t,u)},s}f(Eg,"text");var vw=f((e,t,r,i,s,a)=>`M${e},${t}
227
+ `);return Cf(i)}f(kf,"preprocessMarkdown");function Tf(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"})))??[]})}f(Tf,"nonMarkdownToLines");function wf(e,t={}){const r=kf(e,t),i=Tt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
228
+ `).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}f(wf,"markdownToLines");function Sf(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(Sf,"nonMarkdownToHTML");function _f(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(z.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(_f,"markdownToHTML");function Bf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(Bf,"splitTextToChars");function vf(e,t){const r=Bf(t.content);return Ll(e,[],r,t.type)}f(vf,"splitWordToFitWidth");function Ll(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?Ll(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Ll,"splitWordToFitWidthRecursion");function Lf(e,t){if(e.some(({content:r})=>r.includes(`
229
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return wa(e,t)}f(Lf,"splitLineToFitWidth");function wa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return wa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=vf(t,a);r.push([n]),l.content&&e.unshift(l)}return wa(e,t,r)}f(wa,"splitLineToFitWidthRecursion");function bn(e,t){t&&e.attr("style",t)}f(bn,"applyStyle");var cc=16384;async function Ff(e,t,r,i,s=!1,a=Bt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,cc)}px`),o.attr("height",`${Math.min(10*r,cc)}px`);const n=o.append("xhtml:div"),l=ts(t.label)?await nu(t.label.replace(ps.lineBreakRegex,`
230
+ `),a):Se(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),bn(c,t.labelStyle),c.attr("class",`${h} ${i}`),bn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}f(Ff,"addHtmlSpan");function Wa(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(Wa,"createTspan");function Af(e,t,r){const i=e.append("text"),s=Wa(i,1,t);Ha(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(Af,"computeWidthOfText");function pw(e,t,r){var o;const i=e.append("text"),s=Wa(i,1,t);Ha(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(pw,"computeDimensionOfText");function Ef(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>Af(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:Lf(c,u);for(const d of p){const m=Wa(l,h,1.1,s);Ha(m,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}f(Ef,"createFormattedText");function kn(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}})}f(kn,"decodeHTMLEntities");function Ha(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(kn(r.content)):s.text(" "+kn(r.content))})}f(Ha,"updateTextContentAndStyles");async function Mf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await dw(n)?await xs(n,void 0,{class:"label-icon"}):`<i class='${Se(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(Mf,"replaceIconSubstring");var Ke=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(z.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?_f(t,c):Sf(t),p=await Mf(Mr(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:ts(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Ff(e,m,l,s,h,c)}else{const u=Mr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?wf(u.replace("<br>","<br/>"),c):Tf(u),d=Ef(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).select("text").attr("style",g)}return i?ht(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function _o(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function fw(e,t){return e[0]===t[0]&&e[1]===t[1]}function gw(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)_o(h,n,s);const l=function(h,c,u){const p=[];for(const b of h){const k=[...b];fw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.1);const m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const B=Math.min(w[1],S[1]);m.push({ymin:B,ymax:Math.max(w[1],S[1]),x:B===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(m.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)),!m.length)return d;let g=[],y=m[0].ymin,C=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>y);k++)b=k;m.splice(0,b+1).forEach(k=>{g.push({s:y,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=y)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%c==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const w=g[b].edge,S=g[k].edge;d.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(o,a,i);if(s){for(const h of o)_o(h,n,-s);(function(h,c,u){const p=[];h.forEach(d=>p.push(...d)),_o(p,c,u)})(l,n,-s)}return l}function bs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),gw(e,s,i,a||1)}class Fl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=bs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Ya(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 mw extends Fl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=bs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)Ya([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class yw extends Fl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class Cw{constructor(t){this.helper=t}fillPolygons(t,r){const i=bs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Ya(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<c;m++){const g=d+u+m*s,y=p-o+2*Math.random()*o,C=g-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class xw{constructor(t){this.helper=t}fillPolygons(t,r){const i=bs(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=Ya(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const m=d*(i+s),g=m+i,y=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}}),a}}class bw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=bs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=Ya(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<n;u++){const p=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[g[0]+m*Math.cos(c+Math.PI/4),g[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}}),s}}const ie={};class kw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Tw=0,Bo=1,uc=2,Os={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 vo(e,t){return e.type===t}function Al(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Tw,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Bo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:uc,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!vo(a,uc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Al("M0,0"+e);s++,o=Os[a.text],i=a.text}else vo(a,Bo)?o=Os[i]:(s++,o=Os[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!vo(h,Bo))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof Os[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function $f(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Of(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const g=i+2*(d-i)/3,y=s+2*(m-s)/3,C=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[g,y,C,b,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=c,g=i+2*(u-i)/3,y=s+2*(p-s)/3,C=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[g,y,C,b,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],g=c[4],y=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(If(i,s,y,C,u,p,d,m,g).forEach(function(b){t.push({key:"C",data:b})}),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function Di(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function If(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=Di(e,t,-c),[r,i]=Di(r,i,-c);const H=(e-r)/2,P=(t-i)/2;let E=H*H/(s*s)+P*P/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const L=s*s,O=a*a,A=L*O-L*P*P-O*H*H,_=L*P*P+O*H*H,q=(n===l?-1:1)*Math.sqrt(Math.abs(A/_));g=q*s*P/a+(e+r)/2,y=q*-a*H/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const H=m,P=r,E=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=If(r=g+s*Math.cos(m),i=y+a*Math.sin(m),P,E,s,a,o,0,l,[m,H,g,y])}C=m-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(m),S=Math.sin(m),B=Math.tan(C/4),M=4/3*s*B,v=4/3*a*B,W=[e,t],D=[e+M*k,t-v*b],I=[r+M*S,i-v*w],Y=[r,i];if(D[0]=2*W[0]-D[0],D[1]=2*W[1]-D[1],h)return[D,I,Y].concat(p);{p=[D,I,Y].concat(p);const H=[];for(let P=0;P<p.length;P+=3){const E=Di(p[P][0],p[P][1],c),L=Di(p[P+1][0],p[P+1][1],c),O=Di(p[P+2][0],p[P+2][1],c);H.push([E[0],E[1],L[0],L[1],O[0],O[1]])}return H}}const ww={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return Sa(e,t,r)},ellipse:function(e,t,r,i,s){const a=Pf(r,i,s);return Tn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return dr(e,t,r,i,s,!0)}};function Df(e,t,r,i,s){return{type:"path",ops:dr(e,t,r,i,s)}}function Vs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...dr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...dr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Df(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Sw(e,t,r,i,s){return function(a,o){return Vs(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function dc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Is(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Is(r[0],1.5*(1+.22*t.roughness),gc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Is(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Is(o,1.5*(1+.22*t.roughness),gc(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Pf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=at(o*l,r),n+=at(n*l,r),{increment:a,rx:o,ry:n}}function Tn(e,t,r,i){const[s,a]=mc(i.increment,e,t,i.rx,i.ry,1,i.increment*Sa(.1,Sa(.4,1,r),r),r);let o=_a(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=mc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=_a(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function pc(e,t,r,i,s,a,o,n,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=at(.01*u,l),p+=at(.01*p,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),C=yc(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=yc(y,h,c,u,p,d,m,1.5,l);C.push(...b)}return o&&(n?C.push(...dr(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...dr(h,c,h+u*Math.cos(m),c+p*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function fc(e,t){const r=Of($f(Al(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...dr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,u,p,d]=n;i.push(..._w(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...dr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Lo(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+at(s,t),i[0][1]+at(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(s,t),i[o][1]+at(s,t)]})}}return{type:"fillPath",ops:r}}function Hr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!ie[s])switch(s){case"zigzag":ie[s]||(ie[s]=new mw(i));break;case"cross-hatch":ie[s]||(ie[s]=new yw(i));break;case"dots":ie[s]||(ie[s]=new Cw(i));break;case"dashed":ie[s]||(ie[s]=new xw(i));break;case"zigzag-line":ie[s]||(ie[s]=new bw(i));break;default:s="hachure",ie[s]||(ie[s]=new Fl(i))}return ie[s]}(t,ww).fillPolygons(e,t)}function gc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Rf(e){return e.randomizer||(e.randomizer=new kw(e.seed||0)),e.randomizer.next()}function Sa(e,t,r,i=1){return r.roughness*i*(Rf(r)*(t-e)+e)}function at(e,t,r=1){return Sa(-e,e,t,r)}function dr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=wn(e,t,r,i,s,!0,!1);if(o)return n;const l=wn(e,t,r,i,s,!0,!0);return n.concat(l)}function wn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,p=.2+.2*Rf(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=at(d,s,h),m=at(m,s,h);const g=[],y=()=>at(u,s,h),C=()=>at(c,s,h),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:at(c,s,h)),t+(b?0:at(c,s,h))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Is(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]),s===e.length-1&&i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]);return _a(i,null,r)}function _a(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...wn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function mc(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=at(.5,n)-Math.PI/2;h.push([at(a,n)+t+.9*i*Math.cos(c-e),at(a,n)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[at(a,n)+t+i*Math.cos(p),at(a,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([at(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),at(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([at(a,n)+t+.98*i*Math.cos(c+o),at(a,n)+r+.98*s*Math.sin(c+o)]),h.push([at(a,n)+t+.9*i*Math.cos(c+.5*o),at(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function yc(e,t,r,i,s,a,o,n,l){const h=a+at(.1,l),c=[];c.push([at(n,l)+t+.9*i*Math.cos(h-e),at(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([at(n,l)+t+i*Math.cos(u),at(n,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),_a(c,null,l)}function _w(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const u=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:at(h[0],n)),o[1]+(p?0:at(h[0],n))]}),c=p?[s,a]:[s+at(h[d],n),a+at(h[d],n)],l.push({op:"bcurveTo",data:[e+at(h[d],n),t+at(h[d],n),r+at(h[d],n),i+at(h[d],n),c[0],c[1]]});return l}function Pi(e){return[...e]}function Cc(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(Pi(e[0]),Pi(e[1]),Pi(e[2]),Pi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Pi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Zs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Bw(e,t,r){const i=Zs(t,r);if(i===0)return Zs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Zs(e,kr(t,r,s))}function kr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Sn(e,t,r,i){const s=i||[];if(function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],p=n[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let m=3*c[1]-2*h[1]-p[1];m*=m;let g=3*u[0]-2*p[0]-h[0];g*=g;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<g&&(d=g),m<y&&(m=y),d+m}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Zs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=kr(l,h,.5),d=kr(h,c,.5),m=kr(c,u,.5),g=kr(p,d,.5),y=kr(d,m,.5),C=kr(g,y,.5);Sn([l,p,g,C],0,r,s),Sn([C,y,m,u],0,r,s)}var a,o;return s}function vw(e,t){return Ba(e,0,e.length,t)}function Ba(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=Bw(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Ba(e,t,h+1,i,a),Ba(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Fo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Sn(e,3*a,t,i);return r&&r>0?Ba(i,0,i.length,r):i}const le="none";class va{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,s,a){const o=this._o(a);return this._d("line",[Df(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=Sw(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Lo([h],o)):n.push(Hr([h],o))}return o.stroke!==le&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Pf(i,s,o),h=Tn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=Tn(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Hr([h.estimatedPoints],o));return o.stroke!==le&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Vs(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=pc(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=pc(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push(function(p,d,m,g,y,C,b){const k=p,w=d;let S=Math.abs(m/2),B=Math.abs(g/2);S+=at(.01*S,b),B+=at(.01*B,b);let M=y,v=C;for(;M<0;)M+=2*Math.PI,v+=2*Math.PI;v-M>2*Math.PI&&(M=0,v=2*Math.PI);const W=(v-M)/b.curveStepCount,D=[];for(let I=M;I<=v;I+=W)D.push([k+S*Math.cos(I),w+B*Math.sin(I)]);return D.push([k+S*Math.cos(v),w+B*Math.sin(v)]),D.push([k,w]),Hr([D],b)}(t,r,i,s,a,o,h));return h.stroke!==le&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=dc(t,i);if(i.fill&&i.fill!==le)if(i.fillStyle==="solid"){const o=dc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...Fo(Cc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Fo(Cc(h),10,(1+i.roughness)/2))}o.length&&s.push(Hr([o],i))}return i.stroke!==le&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Vs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Lo([t],i)):s.push(Hr([t],i))),i.stroke!==le&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==le,o=i.stroke!==le,n=!!(i.simplification&&i.simplification<1),l=function(c,u,p){const d=Of($f(Al(c))),m=[];let g=[],y=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...Fo(C,u)),C=[]},k=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:S,data:B}of d)switch(S){case"M":k(),y=[B[0],B[1]],g.push(y);break;case"L":b(),g.push([B[0],B[1]]);break;case"C":if(!C.length){const M=g.length?g[g.length-1]:y;C.push([M[0],M[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(k(),!p)return m;const w=[];for(const S of m){const B=vw(S,p);B.length&&w.push(B)}return w}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=fc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=fc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Lo(l,i));else s.push(Hr(l,i));return o&&(n?l.forEach(c=>{s.push(Vs(c,!1,i))}):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:le};break;case"fillPath":o={d:this.opsToPath(a),stroke:le,strokeWidth:0,fill:i.fill||le};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||le,strokeWidth:i,fill:le}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class Lw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.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(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);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 Ds="http://www.w3.org/2000/svg";class Fw{constructor(t,r){this.svg=t,this.gen=new va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Ds,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ds,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Ds,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Ds,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);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 Lw(e,t),svg:(e,t)=>new Fw(e,t),generator:e=>new va(e),newSeed:()=>va.newSeed()},st=f(async(e,t,r)=>{var d,m;let i;const s=t.useHtmlLabels||Ze((d=xt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await Ke(o,Se(Mr(n),xt()),{useHtmlLabels:s,width:t.width||((m=xt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},xt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],y=ht(c);await sf(g,n),u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return s?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:p,label:o}},"labelHelper"),Ao=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??re(xt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ke(s,Se(Mr(t),xt()),{useHtmlLabels:i,width:r.width||((h=(l=xt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(re(xt())){const c=a.children[0],u=ht(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),J=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(pt,"createPathFromPoints");function pr(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const m=d/50,g=e+m*l,y=p+s*Math.sin(u*(g-e));o.push({x:g,y})}return o}f(pr,"generateFullSineWavePoints");function hs(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(hs,"generateCirclePoints");function _n(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(_n,"mergePaths");var Aw=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),wi=Aw,Ew=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=xt(),n=re(o);return await Ke(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),or=Ew,fr=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Nf=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=re(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Ke(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await or(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(re(r)){const M=m.children[0],v=ht(m);g=M.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const M=Z.svg(u),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=M.path(fr(b,k,y,C,0),v);w=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=Cl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return wi(t,M)},{cluster:u,labelBBox:g}},"rect"),Mw=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return wi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),$w=f(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=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"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await or(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(re(r)){const W=d.children[0],D=ht(d);m=W.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const g=0*t.padding,y=g/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-m.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+m.height+2;let M;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),D=Z.svg(h),I=t.rx||t.ry?D.path(fr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):D.rectangle(w,S,C,b,{seed:s});M=h.insert(()=>I,":first-child");const Y=D.rectangle(w,B,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>I,":first-child"),p=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",B).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${S+1-(re(r)?0:3)})`);const v=M.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(W){return wi(t,W)},{cluster:h,labelBBox:m}},"roundedWithTitle"),Ow=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=re(r),d=u.insert("g").attr("class","cluster-label "),m=await Ke(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=m.getBBox();if(re(r)){const M=m.children[0],v=ht(m);g=M.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const M=Z.svg(u),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=M.path(fr(b,k,y,C,t.rx),v);w=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=Cl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return wi(t,M)},{cluster:u,labelBBox:g}},"kanbanSection"),Iw=f((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=Z.svg(o).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>y,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return wi(t,g)},{cluster:o,labelBBox:{}}},"divider"),Dw=Nf,Pw={rect:Nf,squareRect:Dw,roundedWithTitle:$w,noteGroup:Mw,divider:Iw,kanbanSection:Ow},qf=new Map,Rw=f(async(e,t)=>{const r=t.shape||"rect",i=await Pw[r](e,t);return qf.set(t.id,i),i},"insertCluster"),EL=f(()=>{qf=new Map},"clear");function zf(e,t){return e.intersect(t)}f(zf,"intersectNode");var Nw=zf;function Wf(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}f(Wf,"intersectEllipse");var Hf=Wf;function Yf(e,t,r){return Hf(e,t,t,r)}f(Yf,"intersectCircle");var qw=Yf;function Uf(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&Bn(n,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,m=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(m)<h&&Bn(d,m))return;const g=s*u-c*a;if(g===0)return;const y=Math.abs(g/2);let C=a*p-u*o;const b=C<0?(C-y)/g:(C+y)/g;C=c*o-s*p;const k=C<0?(C-y)/g:(C+y)/g;return{x:b,y:k}}}f(Uf,"intersectLine");function Bn(e,t){return e*t>0}f(Bn,"sameSign");var zw=Uf;function Gf(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=zw(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,m=Math.sqrt(p*p+d*d),g=u.x-r.x,y=u.y-r.y,C=Math.sqrt(g*g+y*y);return m<C?-1:m===C?0:1}),a[0]):e}f(Gf,"intersectPolygon");var Ww=Gf,j={node:Nw,circle:qw,ellipse:Hf,polygon:Ww,rect:wi};function jf(e,t){const{labelStyles:r}=Q(t);t.labelStyle=r;const i=it(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=Z.svg(a),h=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",Nt(n)),J(t,u),t.intersect=function(p){return z.info("Circle intersect",t,o,p),j.circle(t,o,p)},a}f(jf,"anchor");function vn(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,m=p/a,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),C=l+y*a*Math.sin(c)*(o?-1:1),b=h-y*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let S=Math.atan2((i-b)/a,(r-C)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const B=[];for(let M=0;M<20;M++){const v=M/19,W=k+v*S,D=C+s*Math.cos(W),I=b+a*Math.sin(W);B.push({x:D,y:I})}return B}f(vn,"generateArcPoints");function Xf(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Xf,"calculateArcSagitta");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(W=>W+o,"calcTotalHeight"),l=f(W=>{const D=W/2;return[D/(2.5+W/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await st(e,t,it(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=Xf(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...vn(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...vn(y/2,C/2,y/2,-C/2,p,d,!0)],w=Z.svg(h),S=K(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=pt(k),M=w.path(B,S),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),J(t,v),t.intersect=function(W){return j.polygon(t,k,W)},h}f(Vf,"bowTieRect");function Qe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Qe,"insertPolygonShape");var Ps=12;async function Zf(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Ps),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,m=0,g=[{x:u+Ps,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Ps},{x:u+Ps,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(n),k=K(t,{}),w=pt(g),S=b.path(w,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Qe(n,h,c,g);return i&&y.attr("style",i),J(t,y),t.intersect=function(b){return j.polygon(t,g,b)},n}f(Zf,"card");function Kf(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:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return j.polygon(t,o,p)},i}f(Kf,"choice");async function El(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await st(e,t,it(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=Z.svg(a),m=K(t,{}),g=d.circle(0,0,c*2,m);u=a.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Nt(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return J(t,u),t.calcIntersect=function(d,m){const g=d.width/2;return j.circle(d,g,m)},t.intersect=function(d){return z.info("Circle intersect",t,c,d),j.circle(t,c,d)},a}f(El,"circle");function Qf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
231
+ M ${s.x},${s.y} L ${o.x},${o.y}`}f(Qf,"createLine");function Jf(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Z.svg(s),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=Qf(a),u=n.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),J(t,p),t.intersect=function(d){return z.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},s}f(Jf,"crossedCircle");function Ye(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(Ye,"generateCirclePoints");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Ye(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Ye(h/2+u*2,-u,u,20,-180,-270),...Ye(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Ye(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Ye(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Ye(h/2+h*.1,-u,u,20,-180,-270),...Ye(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Ye(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=Z.svg(s),y=K(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),w=pt(m),S=g.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,B),t.intersect=function(M){return j.polygon(t,m,M)},s}f(tg,"curlyBraceLeft");function Ue(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:d,y:m})}return o}f(Ue,"generateCirclePoints");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Ue(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ue(h/2+u*2,-u,u,20,-180,-270),...Ue(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ue(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...Ue(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ue(h/2+u*2,-u,u,20,-180,-270),...Ue(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ue(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=Z.svg(s),y=K(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),w=pt(m),S=g.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,B),t.intersect=function(M){return j.polygon(t,m,M)},s}f(eg,"curlyBraceRight");function Wt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(Wt,"generateCirclePoints");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Wt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Wt(h/2+u*2,-u,u,20,-180,-270),...Wt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Wt(h/2,c/2,u,20,0,90)],m=[...Wt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Wt(-h/2-u/2,-u,u,20,0,90),...Wt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Wt(-h/2+u+u/2,c/2,u,30,-180,-270)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Wt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Wt(h/2+u*2,-u,u,20,-180,-270),...Wt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Wt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Wt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Wt(-h/2-u/2,-u,u,20,0,90),...Wt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Wt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=Z.svg(s),C=K(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(d).replace("Z",""),w=y.path(k,C),B=pt(m).replace("Z",""),M=y.path(B,C),v=pt(g),W=y.path(v,{...C}),D=s.insert("g",":first-child");return D.insert(()=>W,":first-child").attr("stroke-opacity",0),D.insert(()=>w,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,D),t.intersect=function(I){return j.polygon(t,g,I)},s}f(rg,"curlyBraces");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await st(e,t,it(t)),u=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:m}=t,g=Z.svg(h),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...hs(-k,-b/2,d,50,270,90)],B=pt(S),M=g.path(B,y),v=h.insert(()=>M,":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(${-u/2}, ${-p/2})`),J(t,v),t.intersect=function(W){return j.polygon(t,S,W)},h}f(ig,"curvedTrapezoid");var Hw=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Yw=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Uw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),xc=8,bc=8;async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<bc&&(t.width=bc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<xc&&(t.height=xc)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t.width?t.width:l.width)+o,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+a+p;let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=Z.svg(n),C=Yw(0,0,c,d,u,p),b=Uw(0,p,c,d,u,p),k=K(t,{}),w=y.path(C,k),S=y.path(b,K(t,{fill:"none"}));m=n.insert(()=>S,":first-child"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=Hw(0,0,c,d,u,p);m=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(g)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),J(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=j.rect(t,y),b=C.x-(t.x??0);if(u!=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-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}f(sg,"cylinder");async function Si(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,it(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=Z.svg(a),y=K(t,{}),C=p||d?g.path(fr(h,c,n,l,p||0),y):g.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Nt(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Nt(p)).attr("ry",Nt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return J(t,u),t.calcIntersect=function(g,y){return j.rect(g,y)},t.intersect=function(g){return j.rect(t,g)},a}f(Si,"drawRect");async function ag(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Si(e,t,l);if(t.look==="handDrawn"){const d=Z.svg(h),m=K(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),y=g.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),g.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return u>0&&p>0&&c.attr("stroke-dasharray",`${u} ${p}`),h}f(ag,"datastore");async function og(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=Z.svg(o),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=g.polygon(C.map(w=>[w.x,w.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),J(t,k),t.intersect=function(w){return j.rect(t,w)},o}f(og,"dividedRectangle");async function ng(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=Q(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=Z.svg(n),y=K(t,{roughness:.2,strokeWidth:2.5}),C=K(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),k=g.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",Nt(t.cssClasses)).attr("style",Nt(p)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return J(t,u),t.intersect=function(g){return z.info("DoubleCircle intersect",t,h,g),j.circle(t,h,g)},n}f(ng,"doublecircle");function lg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Z.svg(a),{nodeBorder:h}=r,c=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),J(t,p),t.intersect=function(d){return z.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}f(lg,"filledCircle");var kc=10,Tc=10;async function hg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<kc&&(t.height=kc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Tc&&(t.width=Tc));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,m=Z.svg(o),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=pt(p),C=m.path(y,g),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,J(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return z.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},o}f(hg,"flippedTriangle");function cg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Q(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=Z.svg(o),d=K(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),g=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),J(t,g);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return j.rect(t,C)},o}f(cg,"forkJoin");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,p=u/2,{cssStyles:d}=t,m=Z.svg(l),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...hs(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=pt(y),b=m.path(C,g),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(w){return z.info("Pill intersect",t,{radius:p,point:w}),j.polygon(t,y,w)},l}f(ug,"halfRoundedRectangle");var Gw=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await st(e,t,it(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(c),k=K(t,{}),w=Gw(0,0,m,p,d),S=b.path(w,k);y=c.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&y.attr("style",C)}else y=Qe(c,m,p,g);return i&&y.attr("style",i),t.width=m,t.height=p,J(t,y),t.intersect=function(b){return j.polygon(t,g,b)},c}f(dg,"hexagon");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await st(e,t,it(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=Z.svg(s),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=pt(c),p=l.path(u,h),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),J(t,d),t.intersect=function(m){return z.info("Pill intersect",t,{points:c}),j.polygon(t,c,m)},s}f(pg,"hourglass");async function fg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await st(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:g}=r,{stylesMap:y}=Ti(t),C=-m/2,b=-d/2,k=t.label?8:0,w=Z.svg(h),S=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=w.rectangle(C,b,m,d,S),M=Math.max(m,c.width),v=d+c.height+k,W=w.rectangle(-M/2,-v/2,M,v,{...S,fill:"transparent",stroke:"none"}),D=h.insert(()=>B,":first-child"),I=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await xs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),P=H.width,E=H.height,L=H.x,O=H.y;Y.attr("transform",`translate(${-P/2-L},${p?c.height/2+k/2-E/2-O:-c.height/2-k/2-E/2-O})`),Y.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),D.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),J(t,I),t.intersect=function(Y){if(z.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const H=t.x??0,P=t.y??0,E=t.height??0;let L=[];return p?L=[{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+m/2,y:P-E/2+c.height+k},{x:H+m/2,y:P+E/2},{x:H-m/2,y:P+E/2},{x:H-m/2,y:P-E/2+c.height+k},{x:H-c.width/2,y:P-E/2+c.height+k}]:L=[{x:H-m/2,y:P-E/2},{x:H+m/2,y:P-E/2},{x:H+m/2,y:P-E/2+d},{x:H+c.width/2,y:P-E/2+d},{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+d},{x:H-m/2,y:P-E/2+d}],j.polygon(t,L,Y)},h}f(fg,"icon");async function gg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await st(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:C}=Ti(t),b=Z.svg(h),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??y;const S=h.append("g");t.icon&&S.html(`<g>${await xs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=S.node().getBBox(),M=B.width,v=B.height,W=B.x,D=B.y,I=Math.max(M,v)*Math.SQRT2+p*2,Y=b.circle(0,0,I,k),H=Math.max(I,c.width),P=I+c.height+d,E=b.rectangle(-H/2,-P/2,H,P,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>Y,":first-child"),O=h.insert(()=>E);return S.attr("transform",`translate(${-M/2-W},${m?c.height/2+d/2-v/2-D:-c.height/2-d/2-v/2-D})`),S.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-P/2:P/2-c.height})`),L.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),J(t,O),t.intersect=function(A){return z.info("iconSquare intersect",t,A),j.rect(t,A)},h}f(gg,"iconCircle");async function mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await st(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=Ti(t),k=-g/2,w=-m/2,S=t.label?8:0,B=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const W=B.path(fr(k,w,g,m,5),M),D=Math.max(g,c.width),I=m+c.height+S,Y=B.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child").attr("class","icon-shape2"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await xs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),O=L.width,A=L.height,_=L.x,q=L.y;E.attr("transform",`translate(${-O/2-_},${d?c.height/2+S/2-A/2-q:-c.height/2-S/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),J(t,P),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const L=t.x??0,O=t.y??0,A=t.height??0;let _=[];return d?_=[{x:L-c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2+c.height+S},{x:L+g/2,y:O-A/2+c.height+S},{x:L+g/2,y:O+A/2},{x:L-g/2,y:O+A/2},{x:L-g/2,y:O-A/2+c.height+S},{x:L-c.width/2,y:O-A/2+c.height+S}]:_=[{x:L-g/2,y:O-A/2},{x:L+g/2,y:O-A/2},{x:L+g/2,y:O-A/2+m},{x:L+c.width/2,y:O-A/2+m},{x:L+c.width/2/2,y:O+A/2},{x:L-c.width/2,y:O+A/2},{x:L-c.width/2,y:O-A/2+m},{x:L-g/2,y:O-A/2+m}],j.polygon(t,_,E)},h}f(mg,"iconRounded");async function yg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await st(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=Ti(t),k=-g/2,w=-m/2,S=t.label?8:0,B=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const W=B.path(fr(k,w,g,m,.1),M),D=Math.max(g,c.width),I=m+c.height+S,Y=B.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await xs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),O=L.width,A=L.height,_=L.x,q=L.y;E.attr("transform",`translate(${-O/2-_},${d?c.height/2+S/2-A/2-q:-c.height/2-S/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),J(t,P),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const L=t.x??0,O=t.y??0,A=t.height??0;let _=[];return d?_=[{x:L-c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2+c.height+S},{x:L+g/2,y:O-A/2+c.height+S},{x:L+g/2,y:O+A/2},{x:L-g/2,y:O+A/2},{x:L-g/2,y:O-A/2+c.height+S},{x:L-c.width/2,y:O-A/2+c.height+S}]:_=[{x:L-g/2,y:O-A/2},{x:L+g/2,y:O-A/2},{x:L+g/2,y:O-A/2+m},{x:L+c.width/2,y:O-A/2+m},{x:L+c.width/2/2,y:O+A/2},{x:L-c.width/2,y:O+A/2},{x:L-c.width/2,y:O-A/2+m},{x:L-g/2,y:O-A/2+m}],j.polygon(t,_,E)},h}f(yg,"iconSquare");async function Cg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=Q(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:p,label:d}=await st(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,C=t.label?8:0,b=Z.svg(u),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(g,y,h,c,k),S=Math.max(h,p.width),B=c+p.height+C,M=b.rectangle(-S/2,-B/2,S,B,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>w,":first-child"),W=u.insert(()=>M);if(t.img){const D=u.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},${m?B/2-c:-B/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),J(t,W),t.intersect=function(D){if(z.info("iconSquare intersect",t,D),!t.label)return j.rect(t,D);const I=t.x??0,Y=t.y??0,H=t.height??0;let P=[];return m?P=[{x:I-p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y-H/2+p.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+p.height+C},{x:I-p.width/2,y:Y-H/2+p.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+p.width/2,y:Y-H/2+c},{x:I+p.width/2/2,y:Y+H/2},{x:I-p.width/2,y:Y+H/2},{x:I-p.width/2,y:Y-H/2+c},{x:I-h/2,y:Y-H/2+c}],j.polygon(t,P,D)},u}f(Cg,"imageSquare");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Qe(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(xg,"inv_trapezoid");async function bg(e,t){const{shapeSvg:r,bbox:i,label:s}=await st(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),J(t,a),t.intersect=function(l){return j.rect(t,l)},r}f(bg,"labelRect");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Qe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(kg,"lean_left");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Qe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(Tg,"lean_right");function wg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=Z.svg(s),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=pt(h),d=c.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),J(t,m),t.intersect=function(g){return z.info("lightningBolt intersect",t,g),j.polygon(t,h,g)},s}f(wg,"lightningBolt");var jw=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Xw=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Vw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),wc=10,Sc=10;async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Sc&&(t.width=Sc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<wc&&(t.height=wc)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,m=d*.1;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Z.svg(n),b=Xw(0,0,c,d,u,p,m),k=Vw(0,p,c,d,u,p),w=K(t,{}),S=C.path(b,w),B=C.path(k,w);n.insert(()=>B,":first-child").attr("class","line"),g=n.insert(()=>S,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const C=jw(0,0,c,d,u,p,m);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),J(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=j.rect(t,C),k=b.x-(t.x??0);if(u!=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-p)){let w=p*p*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=p-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}f(Sg,"linedCylinder");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*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:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:m}=t,g=Z.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...pr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=g.polygon(C.map(w=>[w.x,w.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),J(t,k),t.intersect=function(w){return j.polygon(t,C,w)},n}f(_g,"linedWaveEdgedRect");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await st(e,t,it(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,m=p-2*n,g=-d/2,y=-m/2,{cssStyles:C}=t,b=Z.svg(l),k=K(t,{}),w=[{x:g-n,y:y+n},{x:g-n,y:y+m+n},{x:g+d-n,y:y+m+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-n},{x:g+d+n,y:y+m-n},{x:g+d+n,y:y-n},{x:g+n,y:y-n},{x:g+n,y},{x:g,y},{x:g,y:y+n}],S=[{x:g,y:y+n},{x:g+d-n,y:y+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(w);let M=b.path(B,k);const v=pt(S);let W=b.path(v,k);t.look!=="handDrawn"&&(M=_n(M),W=_n(W));const D=l.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>W),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)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),J(t,D),t.intersect=function(I){return j.polygon(t,w,I)},l}f(Bg,"multiRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,m=p+(c?d/2:-d/2),g=-u/2,y=-m/2,C=10,{cssStyles:b}=t,k=pr(g-C,y+m+C,g+u-C,y+m+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:g-C,y:y+C},{x:g-C,y:y+m+C},...k,{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:w.y-2*C},{x:g+u+C,y:w.y-2*C},{x:g+u+C,y:y-C},{x:g+C,y:y-C},{x:g+C,y},{x:g,y},{x:g,y:y+C}],B=[{x:g,y:y+C},{x:g+u-C,y:y+C},{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y},{x:g,y}],M=Z.svg(s),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const W=pt(S),D=M.path(W,v),I=pt(B),Y=M.path(I,v),H=s.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,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),J(t,H),t.intersect=function(P){return j.polygon(t,S,P)},s}f(vg,"multiWaveEdgedRectangle");async function Lg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i,t.useHtmlLabels||re(Bt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,m=Z.svg(o),g=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,p,h,c,g),C=o.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,C),t.intersect=function(b){return j.rect(t,b)},o}f(Lg,"note");var Zw=f((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 Fg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=Z.svg(s),m=K(t,{}),g=Zw(0,0,l),y=d.path(g,m);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Qe(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),J(t,u),t.calcIntersect=function(d,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=j.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(Fg,"question");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/2,d=-u/2,m=d/2,g=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(g),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/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 j.polygon(t,g,B)},n}f(Ag,"rect_left_inv_arrow");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await or(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(re(xt())){const v=c.children[0],W=ht(c);u=v.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}z.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await or(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),g=m.children[0],y=ht(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ht(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ht(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,S=-u.height/2-C;let B,M;if(t.look==="handDrawn"){const v=Z.svg(a),W=K(t,{}),D=v.path(fr(w,S,b,k,t.rx||0),W),I=v.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,W);M=a.insert(()=>(z.debug("Rough node insert CXC",D),I),":first-child"),B=a.insert(()=>(z.debug("Rough node insert CXC",D),D),":first-child")}else B=o.insert("rect",":first-child"),M=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),M.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return J(t,B),t.intersect=function(v){return j.rect(t,v)},a}f(Eg,"rectWithTitle");async function Mg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={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,s)}f(Mg,"roundedRect");var xr=8;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?xr:xr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-xr,p=c,d=xr-h/2,m=-c/2,{cssStyles:g}=t,y=Z.svg(o),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-xr,y:m+p},{x:d-xr,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Nt(g)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${xr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,w),t.intersect=function(S){return j.rect(t,S)},o}f($g,"shadedProcess");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,d=u/1.5,m=-p/2,g=-d/2,{cssStyles:y}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:g},{x:m,y:g+d},{x:m+p,y:g+d},{x:m+p,y:g-d/2}],w=pt(k),S=C.path(w,b),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),J(t,B),t.intersect=function(M){return j.polygon(t,k,M)},n}f(Og,"slopedRect");async function Ig(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Si(e,t,a)}f(Ig,"squareRect");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:p}=t,d=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...hs(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...hs(c/2-u,0,u,50,270,450)],y=pt(g),C=d.path(y,m),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),J(t,b),t.intersect=function(k){return j.polygon(t,g,k)},n}f(Dg,"stadium");async function Pg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Si(e,t,r)}f(Pg,"state");function Rg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,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),u=Z.svg(c),p=K(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return J(t,C),t.intersect=function(w){return j.circle(t,(t.width??0)/2,w)},c}f(Rg,"stateEnd");function Ng(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=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 a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=Z.svg(a).circle(0,0,t.width,aT(i));o=a.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=a.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&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.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 j.circle(t,(t.width??7)/2,h)},a}f(Ng,"stateStart");var Yr=8;async function qg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+2*Yr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Yr,p=c,d=-h/2,m=-c/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=Z.svg(n),C=K(t,{}),b=y.rectangle(d,m,u+16,p,C),k=y.line(d+Yr,m,d+Yr,m+p,C),w=y.line(d+Yr+u,m,d+Yr+u,m+p,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:B}=t;S.attr("class","basic label-container").attr("style",Nt(B)),J(t,S)}else{const y=Qe(n,u,p,g);i&&y.attr("style",i),J(t,y)}return t.intersect=function(y){return j.polygon(t,g,y)},n}f(qg,"subroutine");var Eo=.2;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(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)-a*2-Eo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=Eo*h,u=Eo*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:C}=t,b=Z.svg(n),k=K(t,{}),w=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],S=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(w),M=b.path(B,k),v=pt(S),W=b.path(v,{...k,fillStyle:"solid"}),D=n.insert(()=>W,":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 j.polygon(t,w,I)},n}f(zg,"taggedRect");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,p=l+h,{cssStyles:d}=t,m=Z.svg(s),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...pr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...pr(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],w=pt(y),S=m.path(w,g),B=pt(k),M=m.path(B,{...g,fillStyle:"solid"}),v=s.insert(()=>M,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),J(t,v),t.intersect=function(W){return j.polygon(t,y,W)},s}f(Wg,"taggedWaveEdgedRectangle");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),J(t,c),t.intersect=function(u){return j.rect(t,u)},s}f(Hg,"text");var Kw=f((e,t,r,i,s,a)=>`M${e},${t}
232
232
  a${s},${a} 0,0,1 0,${-i}
233
233
  l${r},0
234
234
  a${s},${a} 0,0,1 0,${i}
235
235
  M${r},${-i}
236
236
  a${s},${a} 0,0,0 0,${i}
237
- l${-r},0`,"createCylinderPathD"),Lw=f((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Fw=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),pc=5,fc=10;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.height<pc&&(t.height=pc);const C=g/2/(2.5+g/50);t.width=(t.width??0)-a-C*3,t.width<fc&&(t.width=fc)}const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t.height?t.height:n.height)+a,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let m;if(t.look==="handDrawn"){const g=X.svg(o),y=Lw(0,0,p,h,u,c),C=Fw(0,0,p,h,u,c),b=g.path(y,V(t,{})),k=g.path(C,V(t,{fill:"none"}));m=o.insert(()=>k,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=vw(0,0,p,h,u,c);m=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",qt(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,m),t.intersect=function(g){const y=j.rect(t,g),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}f(Mg,"tiltedCylinder");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=X.svg(n),g=V(t,{}),y=ft(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Je(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f($g,"trapezoid");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:d}=t,m=X.svg(h),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],C=ft(y),b=m.path(C,g),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(w){return j.polygon(t,y,w)},h}f(Og,"trapezoidalPentagon");var gc=10,mc=10;async function Ig(e,t){var w;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<mc&&(t.width=mc),t.height=(t==null?void 0:t.height)??0,t.height<gc&&(t.height=gc));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=Ke((w=yt().flowchart)==null?void 0:w.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:m}=t,g=X.svg(o),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=ft(d),b=g.path(C,y),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,K(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return z.info("Triangle intersect",t,d,S),j.polygon(t,d,S)},o}f(Ig,"triangle");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*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:h,label:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,m=p+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=X.svg(l),w=V(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:m/2},...hr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=ft(S),M=k.path(B,w),L=l.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),K(t,L),t.intersect=function(W){return j.polygon(t,S,W)},l}f(Dg,"waveEdgedRectangle");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;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 w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,p=c+u*2,{cssStyles:d}=t,m=X.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:p/2},...hr(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...hr(h/2,-p/2,-h/2,-p/2,u,-1)],C=ft(y),b=m.path(C,g),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),K(t,k),t.intersect=function(w){return j.polygon(t,y,w)},n}f(Rg,"waveRectangle");var Lt=10;async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Lt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Lt,10));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Lt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Lt,u=h-Lt,p=c-Lt,d=-u/2,m=-p/2,{cssStyles:g}=t,y=X.svg(o),C=V(t,{}),b=[{x:d-Lt,y:m-Lt},{x:d-Lt,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-Lt}],k=`M${d-Lt},${m-Lt} L${d+u},${m-Lt} L${d+u},${m+p} L${d-Lt},${m+p} L${d-Lt},${m-Lt}
238
- M${d-Lt},${m} L${d+u},${m}
239
- M${d},${m-Lt} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${Lt/2}, ${Lt/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Lt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Lt/2-(n.y-(n.top??0))})`),K(t,S),t.intersect=function(B){return j.polygon(t,b,B)},o}f(Pg,"windowPane");var yc=new Set(["redux-color","redux-dark-color"]),Aw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function _l(e,t){var nt,Ot,xt,re;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=vt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:U}=vt(),{background:st}=U,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${st}`]};await _l(e,kt)}const h=vt();t.useHtmlLabels=h.htmlLabels;let c=((nt=h.er)==null?void 0:nt.diagramPadding)??10,u=((Ot=h.er)==null?void 0:Ot.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=Z(t);if(r.attributes.length===0&&t.label){const U={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ze(t.label,h)+U.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const st=await wi(e,t,U);if(i!=null&&yc.has(i)){const kt=r.colorIndex??0;st.attr("data-color-id",`color-${kt%l.length}`)}if(!Ke(h.htmlLabels)){const kt=st.select("text"),St=(xt=kt.node())==null?void 0:xt.getBBox();kt.attr("transform",`translate(${-St.width/2}, 0)`)}return st}h.htmlLabels||(c*=1.25,u*=1.25);let g=tt(t);g||(g="node default");const y=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Gr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let S=0,B=0,M=0,L=0,W=!0,P=!0;for(const U of r.attributes){const st=await Gr(y,U.type,h,0,b,["attribute-type"],d);S=Math.max(S,st.width+c);const kt=await Gr(y,U.name,h,0,b,["attribute-name"],d);B=Math.max(B,kt.width+c);const St=await Gr(y,U.keys.join(),h,0,b,["attribute-keys"],d);M=Math.max(M,St.width+c);const Le=await Gr(y,U.comment,h,0,b,["attribute-comment"],d);L=Math.max(L,Le.width+c);const ce=Math.max(st.height,kt.height,St.height,Le.height)+u;w.push({yOffset:b,rowHeight:ce}),b+=ce}let O=4;M<=c&&(W=!1,M=0,O--),L<=c&&(P=!1,L=0,O--);const Y=y.node().getBBox();if(C.width+c*2-(S+B+M+L)>0){const U=C.width+c*2-(S+B+M+L);S+=U/O,B+=U/O,M>0&&(M+=U/O),L>0&&(L+=U/O)}const H=S+B+M+L,I=X.svg(y),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let v=0;w.length>0&&(v=w.reduce((U,st)=>U+((st==null?void 0:st.rowHeight)??0),0));const $=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),A=Math.max((v??0)+C.height,(t==null?void 0:t.height)||0),_=-$/2,q=-A/2;if(y.selectAll("g:not(:first-child)").each((U,st,kt)=>{const St=ht(kt[st]),Le=St.attr("transform");let ce=0,_i=0;if(Le){const ue=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Le);ue&&(ce=parseFloat(ue[1]),_i=parseFloat(ue[2]),St.attr("class").includes("attribute-name")?ce+=S:St.attr("class").includes("attribute-keys")?ce+=S+B:St.attr("class").includes("attribute-comment")&&(ce+=S+B+M))}St.attr("transform",`translate(${_+c/2+ce}, ${_i+q+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(q+u/2)+")"),i!=null&&yc.has(i)){const U=r.colorIndex??0;y.attr("data-color-id",`color-${U%l.length}`)}const ot=I.rectangle(_,q,$,A,E),ut=y.insert(()=>ot,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[U,st]of w.entries()){const St=(U+1)%2===0&&st.yOffset!==0,Le=I.rectangle(_,C.height+q+(st==null?void 0:st.yOffset),$,st==null?void 0:st.rowHeight,{...E,fill:St?a:o,stroke:n});y.insert(()=>Le,"g.label").attr("style",p.join("")).attr("class",`row-rect-${St?"even":"odd"}`)}const dt=1e-4;let pt=jr(_,C.height+q,$+_,C.height+q,dt),mt=I.polygon(pt.map(U=>[U.x,U.y]),E);if(y.insert(()=>mt).attr("class","divider"),pt=jr(S+_,C.height+q,S+_,A+q,dt),mt=I.polygon(pt.map(U=>[U.x,U.y]),E),y.insert(()=>mt).attr("class","divider"),W){const U=S+B+_;pt=jr(U,C.height+q,U,A+q,dt),mt=I.polygon(pt.map(st=>[st.x,st.y]),E),y.insert(()=>mt).attr("class","divider")}if(P){const U=S+B+M+_;pt=jr(U,C.height+q,U,A+q,dt),mt=I.polygon(pt.map(st=>[st.x,st.y]),E),y.insert(()=>mt).attr("class","divider")}for(const U of k){const st=C.height+q+U;pt=jr(_,st,$+_,st,dt),mt=I.polygon(pt.map(kt=>[kt.x,kt.y]),E),y.insert(()=>mt).attr("class","divider")}if(K(t,ut),m&&t.look!=="handDrawn")if(i!=null&&Aw.has(i))y.selectAll("path").attr("style",m);else{const U=m.split(";"),st=(re=U==null?void 0:U.filter(kt=>kt.includes("stroke")))==null?void 0:re.map(kt=>`${kt}`).join("; ");y.selectAll("path").attr("style",st??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(U){return j.rect(t,U)},y}f(_l,"erBox");async function Gr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==lh(t)&&(t=lh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Qe(n,t,{width:Ze(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=l.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=l.getBBox();if(Ke(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ht(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(Gr,"addText");function jr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(jr,"lineToPolygon");async function Ng(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,u=0,p=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Yi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Yi(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Yi(h,b,g,[b.parseClassifier()]);g+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Yi(c,b,y,[b.parseClassifier()]);y+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}f(Ng,"textHelper");async function Yi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=vt();let o="useHtmlLabels"in t?t.useHtmlLabels:Ke(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Qi(n)&&(o=!0);const l=await Qe(s,On(Lr(n)),{width:Ze(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],p=ht(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const m=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";y(g)}f(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(Yi,"addText");async function qg(e,t){var I,E;const r=yt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??Ke(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Ng(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=Z(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),g=X.svg(h),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.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;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const w=-C/2,S=-b/2;let B=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const M=g.rectangle(w-a,S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,y),L=h.insert(()=>M,":first-child");L.attr("class","basic label-container outer-path");const W=L.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,O=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,H=(P+O+S+a-(S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((v,$,A)=>{var pt,mt;const _=ht(A[$]),q=_.attr("transform");let ot=0;if(q){const Ot=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);Ot&&(ot=parseFloat(Ot[2]))}let ut=ot+S+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(_.attr("class").includes("methods-group")){const nt=Math.max(Y,o/2);k?ut=Math.max(H,P+O+nt+S+o*2+a)+o*2:ut=P+O+nt+S+o*4+a}l.members.length===0&&l.methods.length===0&&((pt=r.class)!=null&&pt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=ot-o:ut=ot),n||(ut-=4);let dt=w;(_.attr("class").includes("label-group")||_.attr("class").includes("annotation-group"))&&(dt=-((mt=_.node())==null?void 0:mt.getBBox().width)/2||0,h.selectAll("text").each(function(nt,Ot,xt){window.getComputedStyle(xt[Ot]).textAnchor==="middle"&&(dt=0)})),_.attr("transform",`translate(${dt}, ${ut})`)}),l.members.length>0||l.methods.length>0||m){const v=P+O+S+a,$=g.line(W.x,v,W.x+W.width,v+.001,y);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const v=P+O+Y+S+o*2+a,$=g.line(W.x,k?Math.max(H,v):v,W.x+W.width,(k?Math.max(H,v):v)+.001,y);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const v=RegExp(/color\s*:\s*([^;]*)/),$=v.exec(d);if($){const A=$[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(u){const A=v.exec(u);if(A){const _=A[0].replace("color","fill");h.selectAll("tspan").attr("style",_)}}}return K(t,L),t.intersect=function(v){return j.rect(t,v)},h}f(qg,"classBox");async function Wg(e,t){var W,P;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=tt(t),{themeVariables:c}=yt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await Oe(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):m=await Oe(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let g=m;const y=await Oe(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+n,l){const O=await Oe(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=O;const Y=await Oe(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=Y;const H=await Oe(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=H,await Oe(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const O=await Oe(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=O,await Oe(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,t.labelStyle)}const C=(((W=d.node())==null?void 0:W.getBBox().width)??200)+o,b=(((P=d.node())==null?void 0:P.getBBox().height)??200)+o,k=-C/2,w=-b/2,S=X.svg(d),B=V(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=S.rectangle(k,w,C,b,B),L=d.insert(()=>M,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const O=t.colorIndex??0;d.attr("data-color-id",`color-${O%u.length}`)}if(d.selectAll(".label").each((O,Y,H)=>{const I=ht(H[Y]),E=I.attr("transform");let v=0,$=0;if(E){const ot=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);ot&&(v=parseFloat(ot[1]),$=parseFloat(ot[2]))}const A=$-b/2;let _=k+o/2;(Y===0||Y===1)&&(_=v),I.attr("transform",`translate(${_}, ${A+o})`)}),g>m+y+n){const O=w+m+y+n;let Y;if(t.look==="neo"){const E=[[k,O],[k+C,O],[k+C,O+.001],[k,O+.001]];Y=S.polygon(E,B)}else Y=S.line(k,O,k+C,O,B);d.insert(()=>Y).attr("class","divider")}return K(t,L),t.intersect=function(O){return j.rect(t,O)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(Wg,"requirementBox");async function Oe(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=yt(),o=a.htmlLabels??!0,n=await Qe(s,On(Lr(t)),{width:Ze(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ht(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(Oe,"addText");var Ew=f(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 zg(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(H=r==null?void 0:r.kanban)==null?void 0:H.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,g;p?{label:m,bbox:g}=await wo(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await wo(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await wo(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(g.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,B=-k/2,M=-S/2;h.attr("transform","translate("+(c-k/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-w+l.height/2)+")");let L;const{rx:W,ry:P}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const I=X.svg(n),E=V(t,{}),v=W||P?I.path(cr(B,M,k,S,W||0),E):I.rectangle(B,M,k,S,E);L=n.insert(()=>v,":first-child"),L.attr("class","basic label-container").attr("style",O||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",P??5).attr("x",B).attr("y",M).attr("width",k).attr("height",S);const I="priority"in t&&t.priority;if(I){const E=n.append("line"),v=B+2,$=M+Math.floor((W??0)/2),A=M+S-Math.floor((W??0)/2);E.attr("x1",v).attr("y1",$).attr("x2",v).attr("y2",A).attr("stroke-width","4").attr("stroke",Ew(I))}}return K(t,L),t.height=S,t.intersect=function(I){return j.rect(t,I)},n}f(zg,"kanbanItem");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await et(e,t,tt(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,m=Math.max(l,p),g=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
237
+ l${-r},0`,"createCylinderPathD"),Qw=f((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Jw=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),_c=5,Bc=10;async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.height<_c&&(t.height=_c);const C=g/2/(2.5+g/50);t.width=(t.width??0)-a-C*3,t.width<Bc&&(t.width=Bc)}const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t.height?t.height:n.height)+a,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let m;if(t.look==="handDrawn"){const g=Z.svg(o),y=Qw(0,0,p,h,u,c),C=Jw(0,0,p,h,u,c),b=g.path(y,K(t,{})),k=g.path(C,K(t,{fill:"none"}));m=o.insert(()=>k,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=Kw(0,0,p,h,u,c);m=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Nt(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,m),t.intersect=function(g){const y=j.rect(t,g),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}f(Yg,"tiltedCylinder");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Qe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(Ug,"trapezoid");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await st(e,t,it(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:d}=t,m=Z.svg(h),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],C=pt(y),b=m.path(C,g),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(w){return j.polygon(t,y,w)},h}f(Gg,"trapezoidalPentagon");var vc=10,Lc=10;async function jg(e,t){var w;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Lc&&(t.width=Lc),t.height=(t==null?void 0:t.height)??0,t.height<vc&&(t.height=vc));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=Ze((w=xt().flowchart)==null?void 0:w.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:m}=t,g=Z.svg(o),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(d),b=g.path(C,y),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,J(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return z.info("Triangle intersect",t,d,S),j.polygon(t,d,S)},o}f(jg,"triangle");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*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:h,label:c}=await st(e,t,it(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,m=p+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=Z.svg(l),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:m/2},...pr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=pt(S),M=k.path(B,w),v=l.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),J(t,v),t.intersect=function(W){return j.polygon(t,S,W)},l}f(Xg,"waveEdgedRectangle");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;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 w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,p=c+u*2,{cssStyles:d}=t,m=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:p/2},...pr(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...pr(h/2,-p/2,-h/2,-p/2,u,-1)],C=pt(y),b=m.path(C,g),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),J(t,k),t.intersect=function(w){return j.polygon(t,y,w)},n}f(Vg,"waveRectangle");var Ft=10;async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Ft,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Ft,10));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Ft,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Ft,u=h-Ft,p=c-Ft,d=-u/2,m=-p/2,{cssStyles:g}=t,y=Z.svg(o),C=K(t,{}),b=[{x:d-Ft,y:m-Ft},{x:d-Ft,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-Ft}],k=`M${d-Ft},${m-Ft} L${d+u},${m-Ft} L${d+u},${m+p} L${d-Ft},${m+p} L${d-Ft},${m-Ft}
238
+ M${d-Ft},${m} L${d+u},${m}
239
+ M${d},${m-Ft} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${Ft/2}, ${Ft/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Ft/2-(n.x-(n.left??0))}, ${-(n.height/2)+Ft/2-(n.y-(n.top??0))})`),J(t,S),t.intersect=function(B){return j.polygon(t,b,B)},o}f(Zg,"windowPane");var Fc=new Set(["redux-color","redux-dark-color"]),tS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ml(e,t){var vt,qt,ne,ue;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Bt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:et}=Bt(),{background:X}=et,wt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await Ml(e,wt)}const h=Bt();t.useHtmlLabels=h.htmlLabels;let c=((vt=h.er)==null?void 0:vt.diagramPadding)??10,u=((qt=h.er)==null?void 0:qt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=Q(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ve(t.label,h)+et.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const X=await Si(e,t,et);if(i!=null&&Fc.has(i)){const wt=r.colorIndex??0;X.attr("data-color-id",`color-${wt%l.length}`)}if(!Ze(h.htmlLabels)){const wt=X.select("text"),lt=(ne=wt.node())==null?void 0:ne.getBBox();wt.attr("transform",`translate(${-lt.width/2}, 0)`)}return X}h.htmlLabels||(c*=1.25,u*=1.25);let g=it(t);g||(g="node default");const y=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await jr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let S=0,B=0,M=0,v=0,W=!0,D=!0;for(const et of r.attributes){const X=await jr(y,et.type,h,0,b,["attribute-type"],d);S=Math.max(S,X.width+c);const wt=await jr(y,et.name,h,0,b,["attribute-name"],d);B=Math.max(B,wt.width+c);const lt=await jr(y,et.keys.join(),h,0,b,["attribute-keys"],d);M=Math.max(M,lt.width+c);const ve=await jr(y,et.comment,h,0,b,["attribute-comment"],d);v=Math.max(v,ve.width+c);const kt=Math.max(X.height,wt.height,lt.height,ve.height)+u;w.push({yOffset:b,rowHeight:kt}),b+=kt}let I=4;M<=c&&(W=!1,M=0,I--),v<=c&&(D=!1,v=0,I--);const Y=y.node().getBBox();if(C.width+c*2-(S+B+M+v)>0){const et=C.width+c*2-(S+B+M+v);S+=et/I,B+=et/I,M>0&&(M+=et/I),v>0&&(v+=et/I)}const H=S+B+M+v,P=Z.svg(y),E=K(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((et,X)=>et+((X==null?void 0:X.rowHeight)??0),0));const O=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),A=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),_=-O/2,q=-A/2;if(y.selectAll("g:not(:first-child)").each((et,X,wt)=>{const lt=ht(wt[X]),ve=lt.attr("transform");let kt=0,Je=0;if(ve){const de=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ve);de&&(kt=parseFloat(de[1]),Je=parseFloat(de[2]),lt.attr("class").includes("attribute-name")?kt+=S:lt.attr("class").includes("attribute-keys")?kt+=S+B:lt.attr("class").includes("attribute-comment")&&(kt+=S+B+M))}lt.attr("transform",`translate(${_+c/2+kt}, ${Je+q+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(q+u/2)+")"),i!=null&&Fc.has(i)){const et=r.colorIndex??0;y.attr("data-color-id",`color-${et%l.length}`)}const V=P.rectangle(_,q,O,A,E),ut=y.insert(()=>V,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[et,X]of w.entries()){const lt=(et+1)%2===0&&X.yOffset!==0,ve=P.rectangle(_,C.height+q+(X==null?void 0:X.yOffset),O,X==null?void 0:X.rowHeight,{...E,fill:lt?a:o,stroke:n});y.insert(()=>ve,"g.label").attr("style",p.join("")).attr("class",`row-rect-${lt?"even":"odd"}`)}const gt=1e-4;let dt=Xr(_,C.height+q,O+_,C.height+q,gt),Ct=P.polygon(dt.map(et=>[et.x,et.y]),E);if(y.insert(()=>Ct).attr("class","divider"),dt=Xr(S+_,C.height+q,S+_,A+q,gt),Ct=P.polygon(dt.map(et=>[et.x,et.y]),E),y.insert(()=>Ct).attr("class","divider"),W){const et=S+B+_;dt=Xr(et,C.height+q,et,A+q,gt),Ct=P.polygon(dt.map(X=>[X.x,X.y]),E),y.insert(()=>Ct).attr("class","divider")}if(D){const et=S+B+M+_;dt=Xr(et,C.height+q,et,A+q,gt),Ct=P.polygon(dt.map(X=>[X.x,X.y]),E),y.insert(()=>Ct).attr("class","divider")}for(const et of k){const X=C.height+q+et;dt=Xr(_,X,O+_,X,gt),Ct=P.polygon(dt.map(wt=>[wt.x,wt.y]),E),y.insert(()=>Ct).attr("class","divider")}if(J(t,ut),m&&t.look!=="handDrawn")if(i!=null&&tS.has(i))y.selectAll("path").attr("style",m);else{const et=m.split(";"),X=(ue=et==null?void 0:et.filter(wt=>wt.includes("stroke")))==null?void 0:ue.map(wt=>`${wt}`).join("; ");y.selectAll("path").attr("style",X??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(et){return j.rect(t,et)},y}f(Ml,"erBox");async function jr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==bh(t)&&(t=bh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Ke(n,t,{width:Ve(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=l.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=l.getBBox();if(Ze(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ht(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(jr,"addText");function Xr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(Xr,"lineToPolygon");async function Kg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,u=0,p=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Gi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Gi(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Gi(h,b,g,[b.parseClassifier()]);g+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Gi(c,b,y,[b.parseClassifier()]);y+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}f(Kg,"textHelper");async function Gi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Bt();let o="useHtmlLabels"in t?t.useHtmlLabels:Ze(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),ts(n)&&(o=!0);const l=await Ke(s,zn(Mr(n)),{width:Ve(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],p=ht(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const m=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";y(g)}f(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(Gi,"addText");async function Qg(e,t){var P,E;const r=xt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??Ze(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Kg(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=Q(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((P=l.styles)==null?void 0:P.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),g=Z.svg(h),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.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;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const w=-C/2,S=-b/2;let B=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const M=g.rectangle(w-a,S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,y),v=h.insert(()=>M,":first-child");v.attr("class","basic label-container outer-path");const W=v.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,I=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,H=(D+I+S+a-(S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((L,O,A)=>{var dt,Ct;const _=ht(A[O]),q=_.attr("transform");let V=0;if(q){const qt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);qt&&(V=parseFloat(qt[2]))}let ut=V+S+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(_.attr("class").includes("methods-group")){const vt=Math.max(Y,o/2);k?ut=Math.max(H,D+I+vt+S+o*2+a)+o*2:ut=D+I+vt+S+o*4+a}l.members.length===0&&l.methods.length===0&&((dt=r.class)!=null&&dt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=V-o:ut=V),n||(ut-=4);let gt=w;(_.attr("class").includes("label-group")||_.attr("class").includes("annotation-group"))&&(gt=-((Ct=_.node())==null?void 0:Ct.getBBox().width)/2||0,h.selectAll("text").each(function(vt,qt,ne){window.getComputedStyle(ne[qt]).textAnchor==="middle"&&(gt=0)})),_.attr("transform",`translate(${gt}, ${ut})`)}),l.members.length>0||l.methods.length>0||m){const L=D+I+S+a,O=g.line(W.x,L,W.x+W.width,L+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const L=D+I+Y+S+o*2+a,O=g.line(W.x,k?Math.max(H,L):L,W.x+W.width,(k?Math.max(H,L):L)+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),v.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const L=RegExp(/color\s*:\s*([^;]*)/),O=L.exec(d);if(O){const A=O[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(u){const A=L.exec(u);if(A){const _=A[0].replace("color","fill");h.selectAll("tspan").attr("style",_)}}}return J(t,v),t.intersect=function(L){return j.rect(t,L)},h}f(Qg,"classBox");async function Jg(e,t){var W,D;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=it(t),{themeVariables:c}=xt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await $e(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):m=await $e(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let g=m;const y=await $e(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+n,l){const I=await $e(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=I;const Y=await $e(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=Y;const H=await $e(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=H,await $e(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const I=await $e(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=I,await $e(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,t.labelStyle)}const C=(((W=d.node())==null?void 0:W.getBBox().width)??200)+o,b=(((D=d.node())==null?void 0:D.getBBox().height)??200)+o,k=-C/2,w=-b/2,S=Z.svg(d),B=K(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=S.rectangle(k,w,C,b,B),v=d.insert(()=>M,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const I=t.colorIndex??0;d.attr("data-color-id",`color-${I%u.length}`)}if(d.selectAll(".label").each((I,Y,H)=>{const P=ht(H[Y]),E=P.attr("transform");let L=0,O=0;if(E){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);V&&(L=parseFloat(V[1]),O=parseFloat(V[2]))}const A=O-b/2;let _=k+o/2;(Y===0||Y===1)&&(_=L),P.attr("transform",`translate(${_}, ${A+o})`)}),g>m+y+n){const I=w+m+y+n;let Y;if(t.look==="neo"){const E=[[k,I],[k+C,I],[k+C,I+.001],[k,I+.001]];Y=S.polygon(E,B)}else Y=S.line(k,I,k+C,I,B);d.insert(()=>Y).attr("class","divider")}return J(t,v),t.intersect=function(I){return j.rect(t,I)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(Jg,"requirementBox");async function $e(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=xt(),o=a.htmlLabels??!0,n=await Ke(s,zn(Mr(t)),{width:Ve(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ht(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f($e,"addText");var eS=f(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 tm(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(H=r==null?void 0:r.kanban)==null?void 0:H.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,g;p?{label:m,bbox:g}=await Ao(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await Ao(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await Ao(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(g.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,B=-k/2,M=-S/2;h.attr("transform","translate("+(c-k/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-w+l.height/2)+")");let v;const{rx:W,ry:D}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const P=Z.svg(n),E=K(t,{}),L=W||D?P.path(fr(B,M,k,S,W||0),E):P.rectangle(B,M,k,S,E);v=n.insert(()=>L,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",D??5).attr("x",B).attr("y",M).attr("width",k).attr("height",S);const P="priority"in t&&t.priority;if(P){const E=n.append("line"),L=B+2,O=M+Math.floor((W??0)/2),A=M+S-Math.floor((W??0)/2);E.attr("x1",L).attr("y1",O).attr("x2",L).attr("y2",A).attr("stroke-width","4").attr("stroke",eS(P))}}return J(t,v),t.height=S,t.intersect=function(P){return j.rect(t,P)},n}f(tm,"kanbanItem");async function em(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,m=Math.max(l,p),g=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
240
240
  a${c},${c} 1 0,0 ${m*.25},${-1*g*.1}
241
241
  a${c},${c} 1 0,0 ${m*.25},0
242
242
  a${c},${c} 1 0,0 ${m*.25},0
@@ -254,7 +254,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
254
254
  a${c},${c} 1 0,0 ${-1*m*.1},${-1*g*.33}
255
255
  a${c*.8},${c*.8} 1 0,0 0,${-1*g*.34}
256
256
  a${c},${c} 1 0,0 ${m*.1},${-1*g*.33}
257
- H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(s),k=V(t,{}),w=b.path(C,k);y=s.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",qt(u))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),K(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return z.info("Bang intersect",t,b),j.rect(t,b)},s}f(Hg,"bang");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await et(e,t,tt(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0
257
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(s),k=K(t,{}),w=b.path(C,k);y=s.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Nt(u))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),J(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return z.info("Bang intersect",t,b),j.rect(t,b)},s}f(em,"bang");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0
258
258
  a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
259
259
  a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
260
260
  a${u},${u} 1 0,1 ${l*.35},${l*.2}
@@ -268,7 +268,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
268
268
 
269
269
  a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
270
270
  a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
271
- H0 V0 Z`;if(t.look==="handDrawn"){const C=X.svg(s),b=V(t,{}),k=C.path(y,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",qt(m))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),K(t,g),t.calcIntersect=function(C,b){return j.rect(C,b)},t.intersect=function(C){return z.info("Cloud intersect",t,C),j.rect(t,C)},s}f(Yg,"cloud");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await et(e,t,tt(t)),l=a.width+8*o,h=a.height+2*o,c=5,u=t.look==="neo"?`
271
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=Z.svg(s),b=K(t,{}),k=C.path(y,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Nt(m))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),J(t,g),t.calcIntersect=function(C,b){return j.rect(C,b)},t.intersect=function(C){return z.info("Cloud intersect",t,C),j.rect(t,C)},s}f(rm,"cloud");async function im(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+8*o,h=a.height+2*o,c=5,u=t.look==="neo"?`
272
272
  M${-l/2} ${h/2-c}
273
273
  v${-h+2*c}
274
274
  q0,-${c} ${c},-${c}
@@ -288,22 +288,22 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
288
288
  h${-(l-2*c)}
289
289
  q${-c},0 ${-c},${-c}
290
290
  Z
291
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),K(t,p),t.calcIntersect=function(d,m){return j.rect(d,m)},t.intersect=function(d){return j.rect(t,d)},s}f(Ug,"defaultMindmapNode");async function Gg(e,t){const r={padding:t.padding??0};return Sl(e,t,r)}f(Gg,"mindmapCircle");var Mw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:wg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:bg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Sg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Lg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Gf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:jf},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Sl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Hg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Yg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:yg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:cg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:hg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:$g},{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:ng},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Vf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Eg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Pf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:kg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:vg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Bg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Qf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:eg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:zf},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Hf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Yf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ug},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Dg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Jf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Mg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:dg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Uf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Xf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ig},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Pg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Zf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Og},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Kf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Tg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:gg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:fg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Rf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wf},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ag},{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:Rg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Cg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:pg}],$w=f(()=>{const t=[...Object.entries({state:_g,choice:Nf,note:mg,rectWithTitle:xg,labelRect:lg,iconSquare:ag,iconCircle:ig,icon:rg,iconRounded:sg,imageSquare:og,anchor:If,kanbanItem:zg,mindmapCircle:Gg,defaultMindmapNode:Ug,classBox:qg,erBox:_l,requirementBox:Wg}),...Mw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),jg=$w();function Ow(e){return e in jg}f(Ow,"isValidShape");var Ha=new Map;async function Xg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?jg[t.shape]:void 0;if(!a)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),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",qt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ha.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Xg,"insertNode");var lL=f((e,t)=>{Ha.set(t.id,e)},"setNodeElem"),hL=f(()=>{Ha.clear()},"clear"),cL=f(e=>{const t=Ha.get(e.id);z.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"),Iw=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Cc(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Cc(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),Dw={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}},Rw=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Cc=f((e,t,r,i,s,a,o=!1,n)=>{var m;const l=Dw[r],h=l&&Rw.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),Pw=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=yt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ba=new Map,Ht=new Map,uL=f(()=>{Ba.clear(),Ht.clear()},"clear"),Di=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Nw=f(async(e,t)=>{const r=yt();let i=ee(r);const{labelStyles:s}=Z(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await Qe(e,t.label,{style:Di(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],m=ht(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=ht(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Ei(u,i)),Ba.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(m,t.startLabelLeft,Di(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Ei(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=d,Ui(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(m,t.startLabelRight,Di(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Ei(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=d,Ui(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(d,t.endLabelLeft,Di(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Ei(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=d,Ui(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(d,t.endLabelRight,Di(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Ei(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=d,Ui(p,t.endLabelRight)}return h},"insertEdgeLabel");function Ui(e,t){ee(yt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Ui,"setTerminalWidth");var qw=f((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,Ba.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=yt(),{subGraphTitleTotalMargin:s}=ul(i);if(e.label){const a=Ba.get(e.id);let o=e.x,n=e.y;if(r){const l=Te.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ht.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ht.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ht.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ht.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Ww=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),zw=f((e,t,r)=>{z.debug(`intersection calc abc89:
291
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),J(t,p),t.calcIntersect=function(d,m){return j.rect(d,m)},t.intersect=function(d){return j.rect(t,d)},s}f(im,"defaultMindmapNode");async function sm(e,t){const r={padding:t.padding??0};return El(e,t,r)}f(sm,"mindmapCircle");var rS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Ig},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Mg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Dg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:qg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:sg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ag},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:El},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:em},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:rm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Fg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:dg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Tg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:kg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ug},{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:xg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ng},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Hg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Zf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:$g},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ng},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Rg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:tg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:wg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Xg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ug},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Yg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Sg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ig},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:og},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:jg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Zg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Gg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:hg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Og},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:vg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Bg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Vf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Jf},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Wg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Vg},{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:_g}],iS=f(()=>{const t=[...Object.entries({state:Pg,choice:Kf,note:Lg,rectWithTitle:Eg,labelRect:bg,iconSquare:yg,iconCircle:gg,icon:fg,iconRounded:mg,imageSquare:Cg,anchor:jf,kanbanItem:tm,mindmapCircle:sm,defaultMindmapNode:im,classBox:Qg,erBox:Ml,requirementBox:Jg}),...rS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),am=iS();function sS(e){return e in am}f(sS,"isValidShape");var Ua=new Map;async function om(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?am[t.shape]:void 0;if(!a)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),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Nt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ua.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(om,"insertNode");var ML=f((e,t)=>{Ua.set(t.id,e)},"setNodeElem"),$L=f(()=>{Ua.clear()},"clear"),OL=f(e=>{const t=Ua.get(e.id);z.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"),aS=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Ac(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Ac(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),oS={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}},nS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ac=f((e,t,r,i,s,a,o=!1,n)=>{var m;const l=oS[r],h=l&&nS.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),lS=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=xt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),La=new Map,Ht=new Map,IL=f(()=>{La.clear(),Ht.clear()},"clear"),Ri=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),hS=f(async(e,t)=>{const r=xt();let i=re(r);const{labelStyles:s}=Q(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await Ke(e,t.label,{style:Ri(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],m=ht(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=ht(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",$i(u,i)),La.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await or(m,t.startLabelLeft,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=d,ji(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await or(m,t.startLabelRight,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=d,ji(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await or(d,t.endLabelLeft,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=d,ji(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await or(d,t.endLabelRight,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=d,ji(p,t.endLabelRight)}return h},"insertEdgeLabel");function ji(e,t){re(xt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(ji,"setTerminalWidth");var cS=f((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,La.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:s}=Cl(i);if(e.label){const a=La.get(e.id);let o=e.x,n=e.y;if(r){const l=ke.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ht.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ht.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ht.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ht.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),uS=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),dS=f((e,t,r)=>{z.debug(`intersection calc abc89:
292
292
  outsidePoint: ${JSON.stringify(t)}
293
293
  insidePoint : ${JSON.stringify(r)}
294
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=c*u/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),z.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return z.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),xc=f((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!Ww(t,a)&&!s){const o=zw(t,i,a);z.debug("abc88 inside",a,i,o),z.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?z.warn("abc88 no intersect",o,r):r.push(o),s=!0}else z.warn("abc88 outside",a,i),i=a,s||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function Vg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(Vg,"extractCornerPoints");var bc=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),Hw=f(function(e){const{cornerPointPositions:t}=Vg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=bc(s,o,5),l=bc(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:p={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else z.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),Yw=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Uw=f(function(e,t,r,i,s,a,o,n=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=yt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const A in t.cssCompiledStyles)Gp(A)||d.push(t.cssCompiledStyles[A]);z.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=xc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=xc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(A=>!Number.isNaN(A.y));const y=Pw(t.curve);y!=="rounded"&&(g=Hw(g));let C=Vi;switch(y){case"linear":C=Vi;break;case"basis":C=Yo;break;case"cardinal":C=Mu;break;case"bumpX":C=vu;break;case"bumpY":C=Lu;break;case"catmullRom":C=Ou;break;case"monotoneX":C=qu;break;case"monotoneY":C=Wu;break;case"natural":C=Hu;break;case"step":C=Yu;break;case"stepAfter":C=Gu;break;case"stepBefore":C=Uu;break;case"rounded":C=Vi;break;default:C=Yo}const{x:b,y:k}=R1(t),w=bk().x(b).y(k).curve(C);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let B,M=y==="rounded"?Zg(Kg(g,t),5):w(g);const L=Array.isArray(t.style)?t.style:[t.style];let W=L.find(A=>A==null?void 0:A.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const A=X.svg(e);Object.assign([],g);const _=A.path(M,{roughness:.3,seed:l});S+=" transition",B=ht(_).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",L?L.reduce((ot,ut)=>ot+";"+ut,""):"");let q=B.attr("d");B.attr("d",q),e.node().appendChild(B.node())}else{const A=d.join(";"),_=L?L.reduce((mt,nt)=>mt+nt+";",""):"",q=(A?A+";"+_+";":_)+";"+(L?L.reduce((mt,nt)=>mt+";"+nt,""):"");B=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",q),W=($=q.match(/stroke:([^;]+)/))==null?void 0:$[1],O=t.animate===!0||!!t.animation||A.includes("animation");const ot=B.node(),ut=typeof ot.getTotalLength=="function"?ot.getTotalLength():0,dt=Ih[t.arrowTypeStart]||0,pt=Ih[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const nt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Yw(ut,dt,pt):`0 ${dt} ${ut-dt-pt} ${pt}`}; stroke-dashoffset: 0;`;B.attr("style",nt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",qt(t.look)),t.showPoints&&g.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(yt().flowchart.arrowMarkerAbsolute||yt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const H=!O&&(t==null?void 0:t.look)==="neo";Iw(B,t,Y,o,i,H,W);const I=Math.floor(h.length/2),E=h[I];Te.isLabelCoordinateInPath(E,B.attr("d"))||(c=!0);let v={};return c&&(v.updatedPath=h),v.originalPath=t.points,v},"insertEdge");function Zg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(h,c),m=Math.hypot(u,p);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const g=h/d,y=c/d,C=u/m,b=p/m,k=g*C+y*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(S/2),d/2,m/2),M=o.x-g*B,L=o.y-y*B,W=o.x+C*B,P=o.y+b*B;r+=`L${M},${L}`,r+=`Q${o.x},${o.y} ${W},${P}`}}return r}f(Zg,"generateRoundedPath");function kn(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}}f(kn,"calculateDeltaAndAngle");function Kg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&jt[t.arrowTypeStart]){const s=jt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=kn(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&jt[t.arrowTypeEnd]){const s=jt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=kn(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}f(Kg,"applyMarkerOffsetsToPoints");var Gw=f((e,t,r,i)=>{t.forEach(s=>{gS[s](e,r,i)})},"insertMarkers"),jw=f((e,t,r)=>{z.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"),Xw=f((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"),Vw=f((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"),Zw=f((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"),Kw=f((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"),Qw=f((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"),Jw=f((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"),tS=f((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"),eS=f((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"),rS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{transitionColor:a}=s;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",`${a}`)},"barbNeo"),iS=f((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"),sS=f((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),aS=f((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"),oS=f((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),nS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"only_one_neo"),lS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=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");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=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");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),hS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"one_or_more_neo"),cS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=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");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=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");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),uS=f((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
294
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=c*u/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),z.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return z.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),Ec=f((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!uS(t,a)&&!s){const o=dS(t,i,a);z.debug("abc88 inside",a,i,o),z.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?z.warn("abc88 no intersect",o,r):r.push(o),s=!0}else z.warn("abc88 outside",a,i),i=a,s||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function nm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(nm,"extractCornerPoints");var Mc=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),pS=f(function(e){const{cornerPointPositions:t}=nm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=Mc(s,o,5),l=Mc(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:p={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else z.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),fS=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),gS=f(function(e,t,r,i,s,a,o,n=!1){var O;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=xt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const A in t.cssCompiledStyles)af(A)||d.push(t.cssCompiledStyles[A]);z.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=Ec(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Ec(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(A=>!Number.isNaN(A.y));const y=lS(t.curve);y!=="rounded"&&(g=pS(g));let C=Ki;switch(y){case"linear":C=Ki;break;case"basis":C=Ko;break;case"cardinal":C=Yu;break;case"bumpX":C=Nu;break;case"bumpY":C=qu;break;case"catmullRom":C=Gu;break;case"monotoneX":C=Qu;break;case"monotoneY":C=Ju;break;case"natural":C=ed;break;case"step":C=rd;break;case"stepAfter":C=sd;break;case"stepBefore":C=id;break;case"rounded":C=Ki;break;default:C=Ko}const{x:b,y:k}=n2(t),w=Yk().x(b).y(k).curve(C);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let B,M=y==="rounded"?lm(hm(g,t),5):w(g);const v=Array.isArray(t.style)?t.style:[t.style];let W=v.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([],g);const _=A.path(M,{roughness:.3,seed:l});S+=" transition",B=ht(_).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",v?v.reduce((V,ut)=>V+";"+ut,""):"");let q=B.attr("d");B.attr("d",q),e.node().appendChild(B.node())}else{const A=d.join(";"),_=v?v.reduce((Ct,vt)=>Ct+vt+";",""):"",q=(A?A+";"+_+";":_)+";"+(v?v.reduce((Ct,vt)=>Ct+";"+vt,""):"");B=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",q),W=(O=q.match(/stroke:([^;]+)/))==null?void 0:O[1],I=t.animate===!0||!!t.animation||A.includes("animation");const V=B.node(),ut=typeof V.getTotalLength=="function"?V.getTotalLength():0,gt=jh[t.arrowTypeStart]||0,dt=jh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const vt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?fS(ut,gt,dt):`0 ${gt} ${ut-gt-dt} ${dt}`}; stroke-dashoffset: 0;`;B.attr("style",vt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",Nt(t.look)),t.showPoints&&g.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,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const H=!I&&(t==null?void 0:t.look)==="neo";aS(B,t,Y,o,i,H,W);const P=Math.floor(h.length/2),E=h[P];ke.isLabelCoordinateInPath(E,B.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function lm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(h,c),m=Math.hypot(u,p);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const g=h/d,y=c/d,C=u/m,b=p/m,k=g*C+y*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(S/2),d/2,m/2),M=o.x-g*B,v=o.y-y*B,W=o.x+C*B,D=o.y+b*B;r+=`L${M},${v}`,r+=`Q${o.x},${o.y} ${W},${D}`}}return r}f(lm,"generateRoundedPath");function Ln(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}}f(Ln,"calculateDeltaAndAngle");function hm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Xt[t.arrowTypeStart]){const s=Xt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Ln(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Xt[t.arrowTypeEnd]){const s=Xt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Ln(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}f(hm,"applyMarkerOffsetsToPoints");var mS=f((e,t,r,i)=>{t.forEach(s=>{NS[s](e,r,i)})},"insertMarkers"),yS=f((e,t,r)=>{z.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"),CS=f((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"),xS=f((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"),bS=f((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"),kS=f((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"),TS=f((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"),wS=f((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"),SS=f((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"),_S=f((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"),BS=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{transitionColor:a}=s;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",`${a}`)},"barbNeo"),vS=f((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"),LS=f((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),FS=f((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"),AS=f((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ES=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"only_one_neo"),MS=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=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");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=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");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),$S=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"one_or_more_neo"),OS=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=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");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=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");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),IS=f((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
295
  L20,10
296
296
  M20,10
297
- L0,20`)},"requirement_arrow"),dS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
297
+ L0,20`)},"requirement_arrow"),DS=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
298
298
  L20,10
299
299
  M20,10
300
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),pS=f((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"),fS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s,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",`${a}`)},"requirement_contains_neo"),gS={extension:jw,composition:Xw,aggregation:Vw,dependency:Zw,lollipop:Kw,point:Qw,circle:Jw,cross:tS,barb:eS,barbNeo:rS,only_one:iS,zero_or_one:sS,one_or_more:aS,zero_or_more:oS,only_one_neo:nS,zero_or_one_neo:lS,one_or_more_neo:hS,zero_or_more_neo:cS,requirement_arrow:uS,requirement_contains:pS,requirement_arrow_neo:dS,requirement_contains_neo:fS},mS=Gw,yS={common:us,getConfig:vt,insertCluster:fw,insertEdge:Uw,insertEdgeLabel:Nw,insertMarkers:mS,insertNode:Xg,interpolateToCurve:al,labelHelper:et,log:z,positionEdgeLabel:qw},ls={},Qg=f(e=>{for(const t of e)ls[t.name]=t},"registerLayoutLoaders"),CS=f(()=>{Qg([{name:"dagre",loader:f(async()=>await gt(()=>import("./dagre-BM42HDAG-_sgp3WuA.js"),__vite__mapDeps([2,3,4,0,1])),"loader")},{name:"cose-bilkent",loader:f(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-BTf8t1RL.js"),__vite__mapDeps([5,6,0,1])),"loader")}])},"registerDefaultLayoutLoaders");CS();var dL=f(async(e,t)=>{if(!(e.layoutAlgorithm in ls))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=ls[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,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",`${s!=null&&s.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",`${s!=null&&s.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",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,yS,{algorithm:r.algorithm})},"render"),pL=f((e="",{fallback:t="dagre"}={})=>{if(e in ls)return e;if(t in ls)return z.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"),Bl="comm",Jg="rule",tm="decl",xS="@media",bS="@import",kS="@supports",TS="@namespace",Tn="@keyframes",em="@layer",wS="@scope",SS=Math.abs,Ki=String.fromCharCode;function rm(e){return e.trim()}function wn(e,t,r){return e.replace(t,r)}function Qr(e,t){return e.charCodeAt(t)|0}function xi(e,t,r){return e.slice(t,r)}function Ie(e){return e.length}function im(e){return e.length}function Ds(e,t){return t.push(e),e}var Ya=1,bi=1,sm=0,ge=0,Mt=0,Si="";function vl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Ya,column:bi,length:o,return:"",siblings:n}}function _S(){return Mt}function BS(){return Mt=ge>0?Qr(Si,--ge):0,bi--,Mt===10&&(bi=1,Ya--),Mt}function Se(){return Mt=ge<sm?Qr(Si,ge++):0,bi++,Mt===10&&(bi=1,Ya++),Mt}function ir(){return Qr(Si,ge)}function Vs(){return ge}function Ua(e,t){return xi(Si,e,t)}function hs(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 vS(e){return Ya=bi=1,sm=Ie(Si=e),ge=0,[]}function LS(e){return Si="",e}function _o(e){return rm(Ua(ge-1,Sn(e===91?e+2:e===40?e+1:e)))}function FS(e){for(;(Mt=ir())&&Mt<33;)Se();return hs(e)>2||hs(Mt)>3?"":" "}function AS(e,t){for(;--t&&Se()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return Ua(e,Vs()+(t<6&&ir()==32&&Se()==32))}function Sn(e){for(;Se();)switch(Mt){case e:return ge;case 34:case 39:e!==34&&e!==39&&Sn(Mt);break;case 40:e===41&&Sn(e);break;case 92:Se();break}return ge}function ES(e,t){for(;Se()&&e+Mt!==57;)if(e+Mt===84&&ir()===47)break;return"/*"+Ua(t,ge-1)+"*"+Ki(e===47?e:Se())}function MS(e){for(;!hs(ir());)Se();return Ua(e,ge)}function $S(e){return LS(Zs("",null,null,null,[""],e=vS(e),0,[0],e))}function Zs(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,u=o,p=0,d=0,m=0,g=1,y=1,C=1,b=0,k=0,w="",S=s,B=a,M=i,L=w;y;)switch(m=k,k=Se()){case 40:m!=108&&Qr(L,u-1)==58?(b++,L+="("):L+=_o(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=_o(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=Ki(k);break}L+=FS(m);break;case 92:L+=AS(Vs()-1,7);continue;case 47:switch(ir()){case 42:case 47:Ds(OS(ES(Se(),Vs()),t,r,l),l),(hs(m||1)==5||hs(ir()||1)==5)&&Ie(L)&&xi(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*g:n[h++]=Ie(L)*C;case 125*g:case 59:case 0:if(b>0&&k){L+=Ki(k);break}switch(k){case 0:case 125:y=0;case 59+c:C==-1&&(L=wn(L,/\f/g,"")),d>0&&(Ie(L)-u||g===0)&&Ds(d>32?Tc(L+";",i,r,u-1,l):Tc(wn(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(Ds(M=kc(L,t,r,h,c,s,n,w,S=[],B=[],u,a),a),k===123)if(c===0)Zs(L,t,M,M,S,a,u,n,B);else{switch(p){case 99:if(Qr(L,3)===110)break;case 108:if(Qr(L,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Zs(e,M,M,i&&Ds(kc(e,M,M,0,0,s,n,w,s,S=[],u,B),B),s,B,u,n,i?S:B):Zs(L,M,M,M,[""],B,0,n,B)}}h=c=d=0,g=C=1,w=L="",u=o;break;case 58:u=1+Ie(L),d=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&BS()==125)continue}switch(L+=Ki(k),k*g){case 38:C=c>0?1:(L+="\f",-1);break;case 44:if(b>0)break;n[h++]=(Ie(L)-1)*C,C=1;break;case 64:ir()===45&&(L+=_o(Se())),p=ir(),c=u=Ie(w=L+=MS(Vs())),k++;break;case 45:m===45&&Ie(L)==2&&(g=0)}}return a}function kc(e,t,r,i,s,a,o,n,l,h,c,u){for(var p=s-1,d=s===0?a:[""],m=im(d),g=0,y=0,C=0;g<i;++g)for(var b=0,k=xi(e,p+1,p=SS(y=o[g])),w=e;b<m;++b)(w=rm(y>0?d[b]+" "+k:wn(k,/&\f/g,d[b])))&&(l[C++]=w);return vl(e,t,r,s===0?Jg:n,l,h,c,u)}function OS(e,t,r,i){return vl(e,t,r,Bl,Ki(_S()),xi(e,2,-2),0,i)}function Tc(e,t,r,i,s){return vl(e,t,r,tm,xi(e,0,i),xi(e,i+1,-1),i,s)}function _n(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function IS(e,t,r,i){switch(e.type){case em:if(e.children.length)break;case bS:case TS:case tm:return e.return=e.return||e.value;case Bl:return"";case Tn:return e.return=e.value+"{"+_n(e.children,i)+"}";case Jg:if(!Ie(e.value=e.props.join(",")))return""}return Ie(r=_n(e.children,i))?e.return=e.value+"{"+r+"}":""}function DS(e){var t=im(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var am="c4",RS=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),PS=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-BHFjzIi4.js");return{diagram:t}},__vite__mapDeps([7,8,0,1]));return{id:am,diagram:e}},"loader"),NS={id:am,detector:RS,loader:PS},qS=NS,om="flowchart",WS=f((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"),zS=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-C_ZMdQiC.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:om,diagram:e}},"loader"),HS={id:om,detector:WS,loader:zS},YS=HS,nm="flowchart-v2",US=f((e,t)=>{var r,i,s;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)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),GS=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-C_ZMdQiC.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:nm,diagram:e}},"loader"),jS={id:nm,detector:US,loader:GS},XS=jS,lm="er",VS=f(e=>/^\s*erDiagram/.test(e),"detector"),ZS=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-2lnQeJUM.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,0,1]));return{id:lm,diagram:e}},"loader"),KS={id:lm,detector:VS,loader:ZS},QS=KS,hm="gitGraph",JS=f(e=>/^\s*gitGraph/.test(e),"detector"),t_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-HDXI-F1B.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,0,1]));return{id:hm,diagram:e}},"loader"),e_={id:hm,detector:JS,loader:t_},r_=e_,cm="gantt",i_=f(e=>/^\s*gantt/.test(e),"detector"),s_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-Dw9V_Ny0.js");return{diagram:t}},__vite__mapDeps([19,0,1,20,21,22]));return{id:cm,diagram:e}},"loader"),a_={id:cm,detector:i_,loader:s_},o_=a_,um="info",n_=f(e=>/^\s*info/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-CuB8Ebua.js");return{diagram:t}},__vite__mapDeps([23,18,0,1]));return{id:um,diagram:e}},"loader"),h_={id:um,detector:n_,loader:l_},dm="pie",c_=f(e=>/^\s*pie/.test(e),"detector"),u_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-Q4dTyLeF.js");return{diagram:t}},__vite__mapDeps([24,16,18,0,1,25,26,21]));return{id:dm,diagram:e}},"loader"),d_={id:dm,detector:c_,loader:u_},pm="quadrantChart",p_=f(e=>/^\s*quadrantChart/.test(e),"detector"),f_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-ckw329Ft.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,0,1]));return{id:pm,diagram:e}},"loader"),g_={id:pm,detector:p_,loader:f_},m_=g_,fm="xychart",y_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),C_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-BsP4-I_y.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,0,1]));return{id:fm,diagram:e}},"loader"),x_={id:fm,detector:y_,loader:C_},b_=x_,gm="requirement",k_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),T_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-DbVDm4It.js");return{diagram:t}},__vite__mapDeps([29,11,12,0,1]));return{id:gm,diagram:e}},"loader"),w_={id:gm,detector:k_,loader:T_},S_=w_,mm="sequence",__=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),B_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-DU2YSpq-.js");return{diagram:t}},__vite__mapDeps([30,8,17,0,1]));return{id:mm,diagram:e}},"loader"),v_={id:mm,detector:__,loader:B_},L_=v_,ym="class",F_=f((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"),A_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-iHF24a8X.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,0,1]));return{id:ym,diagram:e}},"loader"),E_={id:ym,detector:F_,loader:A_},M_=E_,Cm="classDiagram",$_=f((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"),O_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-iHF24a8X.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,0,1]));return{id:Cm,diagram:e}},"loader"),I_={id:Cm,detector:$_,loader:O_},D_=I_,xm="state",R_=f((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"),P_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CA9PEBUo.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,3,4,0,1]));return{id:xm,diagram:e}},"loader"),N_={id:xm,detector:R_,loader:P_},q_=N_,bm="stateDiagram",W_=f((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"),z_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-t1LRI0oY.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,0,1]));return{id:bm,diagram:e}},"loader"),H_={id:bm,detector:W_,loader:z_},Y_=H_,km="journey",U_=f(e=>/^\s*journey/.test(e),"detector"),G_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-CgCwJQNU.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,0,1]));return{id:km,diagram:e}},"loader"),j_={id:km,detector:U_,loader:G_},X_=j_,V_=f((e,t,r)=>{z.debug(`rendering svg for syntax error
301
- `);const i=Fk(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Zc(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),Tm={draw:V_},Z_=Tm,K_={db:{},renderer:Tm,parser:{parse:f(()=>{},"parse")}},Q_=K_,wm="flowchart-elk",J_=f((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"),tB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-C_ZMdQiC.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:wm,diagram:e}},"loader"),eB={id:wm,detector:J_,loader:tB},rB=eB,Sm="timeline",iB=f(e=>/^\s*timeline/.test(e),"detector"),sB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-Bhlo4WVc.js");return{diagram:t}},__vite__mapDeps([38,25,0,1]));return{id:Sm,diagram:e}},"loader"),aB={id:Sm,detector:iB,loader:sB},oB=aB,_m="mindmap",nB=f(e=>/^\s*mindmap/.test(e),"detector"),lB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-D_Y75ID7.js");return{diagram:t}},__vite__mapDeps([39,11,12,0,1]));return{id:_m,diagram:e}},"loader"),hB={id:_m,detector:nB,loader:lB},cB=hB,Bm="kanban",uB=f(e=>/^\s*kanban/.test(e),"detector"),dB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-PZUtcbPx.js");return{diagram:t}},__vite__mapDeps([40,10,0,1]));return{id:Bm,diagram:e}},"loader"),pB={id:Bm,detector:uB,loader:dB},fB=pB,vm="sankey",gB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),mB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-CHuZ_ecH.js");return{diagram:t}},__vite__mapDeps([41,26,21,0,1]));return{id:vm,diagram:e}},"loader"),yB={id:vm,detector:gB,loader:mB},CB=yB,Lm="packet",xB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),bB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-BRydGNW5.js");return{diagram:t}},__vite__mapDeps([42,16,18,0,1]));return{id:Lm,diagram:e}},"loader"),kB={id:Lm,detector:xB,loader:bB},Fm="radar",TB=f(e=>/^\s*radar-beta/.test(e),"detector"),wB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-CROtRy1w.js");return{diagram:t}},__vite__mapDeps([43,16,18,0,1]));return{id:Fm,diagram:e}},"loader"),SB={id:Fm,detector:TB,loader:wB},Am="block",_B=f(e=>/^\s*block(-beta)?/.test(e),"detector"),BB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-vrtOf1kJ.js");return{diagram:t}},__vite__mapDeps([44,10,3,13,0,1]));return{id:Am,diagram:e}},"loader"),vB={id:Am,detector:_B,loader:BB},LB=vB,Em="treeView",FB=f(e=>/^\s*treeView-beta/.test(e),"detector"),AB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-BqGRzwSc.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,0,1]));return{id:Em,diagram:e}},"loader"),EB={id:Em,detector:FB,loader:AB},MB=EB,Mm="architecture",$B=f(e=>/^\s*architecture/.test(e),"detector"),OB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-ZDUxPtZ2.js");return{diagram:t}},__vite__mapDeps([46,16,18,0,1,6]));return{id:Mm,diagram:e}},"loader"),IB={id:Mm,detector:$B,loader:OB},DB=IB,$m="eventmodeling",RB=f(e=>/^\s*eventmodeling/.test(e),"detector"),PB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-CMrcEtA7.js");return{diagram:t}},__vite__mapDeps([47,16,18,0,1]));return{id:$m,diagram:e}},"loader"),NB={id:$m,detector:RB,loader:PB},qB=NB,Om="ishikawa",WB=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),zB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-D_tyhVwh.js");return{diagram:t}},__vite__mapDeps([48,0,1]));return{id:Om,diagram:e}},"loader"),HB={id:Om,detector:WB,loader:zB},Im="venn",YB=f(e=>/^\s*venn-beta/.test(e),"detector"),UB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-6xtPLsyl.js");return{diagram:t}},__vite__mapDeps([49,0,1]));return{id:Im,diagram:e}},"loader"),GB={id:Im,detector:YB,loader:UB},jB=GB,Dm="treemap",XB=f(e=>/^\s*treemap/.test(e),"detector"),VB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-D0ilgNjV.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,0,1,22,26,21]));return{id:Dm,diagram:e}},"loader"),ZB={id:Dm,detector:XB,loader:VB},Rm="wardley-beta",KB=f(e=>/^\s*wardley-beta/i.test(e),"detector"),QB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-BOn6hKss.js");return{diagram:t}},__vite__mapDeps([51,16,18,0,1]));return{id:Rm,diagram:e}},"loader"),JB={id:Rm,detector:KB,loader:QB},tv=JB,wc=!1,Ga=f(()=>{wc||(wc=!0,ea("error",Q_,e=>e.toLowerCase().trim()==="error"),ea("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Fo(rB,cB,DB),Fo(qS,fB,D_,M_,QS,o_,h_,d_,S_,L_,XS,YS,oB,r_,Y_,q_,X_,m_,CB,kB,b_,LB,qB,MB,SB,HB,ZB,jB,tv))},"addDiagrams"),ev=f(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Sr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Oo(r)}catch{try{const{diagram:a,id:o}=await s();ea(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Sr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),rv="graphics-document document";function Pm(e,t){e.attr("role",rv),t!==""&&e.attr("aria-roledescription",t)}f(Pm,"setA11yDiagramInfo");function Nm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(Nm,"addSVGa11yTitleDescription");var wr,Bn=(wr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=vt(),s=Fn(t,i);t=O2(t)+`
302
- `;try{Oo(s)}catch{const u=Vy(s);if(!u)throw new Ic(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();ea(p,d)}const{db:a,parser:o,renderer:n,init:l}=Oo(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new wr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(wr,"Diagram"),wr),Sc=[],iv=f(()=>{Sc.forEach(e=>{e()}),Sc=[]},"attachFunctions"),sv=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function qm(e){const t=e.match(Oc);if(!t)return{text:e,metadata:{}};let r=D1(t[1],{schema:I1})??{};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}}f(qm,"extractFrontMatter");var av=f(e=>e.replace(/\r\n?/g,`
303
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ov=f(e=>{const{text:t,metadata:r}=qm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),nv=f(e=>{const t=Te.detectInit(e)??{},r=Te.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:k2(e),directive:t}},"processDirectives");function Ll(e){const t=av(e),r=ov(t),i=nv(r.text),s=cl(r.config,i.directive);return e=sv(i.text),{code:e,title:r.title,config:s}}f(Ll,"preprocessDiagram");function Wm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Wm,"toBase64");var lv=5e4,hv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",cv="sandbox",uv="loose",dv="http://www.w3.org/2000/svg",pv="http://www.w3.org/1999/xlink",fv="http://www.w3.org/1999/xhtml",gv="100%",mv="100%",yv="border:0;margin:0;",Cv="margin:0",xv="allow-top-navigation-by-user-activation allow-popups",bv='The "iframe" tag is not supported by your browser.',kv=["foreignobject"],Tv=["dominant-baseline"];function Fl(e){const t=Ll(e);return Js(),T0(t.config??{}),t}f(Fl,"processAndSetConfigs");async function zm(e,t){Ga();try{const{code:r,config:i}=Fl(e);return{diagramType:(await Ym(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(zm,"parse");var _c=f((e,t,r=[])=>{const i=qc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),wv=f((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 n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Nh(l.styles)||n.forEach(h=>{r.insertRule(_c(l.id,h,l.styles),r.cssRules.length)}),Nh(l.textStyles)||r.insertRule(_c(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=$o(s)+`
300
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),PS=f((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"),RS=f((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a}=s,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",`${a}`)},"requirement_contains_neo"),NS={extension:yS,composition:CS,aggregation:xS,dependency:bS,lollipop:kS,point:TS,circle:wS,cross:SS,barb:_S,barbNeo:BS,only_one:vS,zero_or_one:LS,one_or_more:FS,zero_or_more:AS,only_one_neo:ES,zero_or_one_neo:MS,one_or_more_neo:$S,zero_or_more_neo:OS,requirement_arrow:IS,requirement_contains:PS,requirement_arrow_neo:DS,requirement_contains_neo:RS},qS=mS,zS={common:ps,getConfig:Bt,insertCluster:Rw,insertEdge:gS,insertEdgeLabel:hS,insertMarkers:qS,insertNode:om,interpolateToCurve:dl,labelHelper:st,log:z,positionEdgeLabel:cS},cs={},cm=f(e=>{for(const t of e)cs[t.name]=t},"registerLayoutLoaders"),WS=f(()=>{cm([{name:"dagre",loader:f(async()=>await ft(()=>import("./dagre-BM42HDAG-C07H4G9-.js"),__vite__mapDeps([2,3,4,0,1])),"loader")},{name:"cose-bilkent",loader:f(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-URd77-_-.js"),__vite__mapDeps([5,6,0,1])),"loader")}])},"registerDefaultLayoutLoaders");WS();var DL=f(async(e,t)=>{if(!(e.layoutAlgorithm in cs))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=cs[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,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",`${s!=null&&s.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",`${s!=null&&s.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",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,zS,{algorithm:r.algorithm})},"render"),PL=f((e="",{fallback:t="dagre"}={})=>{if(e in cs)return e;if(t in cs)return z.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"),$l="comm",um="rule",dm="decl",HS="@media",YS="@import",US="@supports",GS="@namespace",Fn="@keyframes",pm="@layer",jS="@scope",XS=Math.abs,Ji=String.fromCharCode;function fm(e){return e.trim()}function An(e,t,r){return e.replace(t,r)}function Jr(e,t){return e.charCodeAt(t)|0}function bi(e,t,r){return e.slice(t,r)}function Oe(e){return e.length}function gm(e){return e.length}function Rs(e,t){return t.push(e),e}var Ga=1,ki=1,mm=0,ge=0,Mt=0,_i="";function Ol(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Ga,column:ki,length:o,return:"",siblings:n}}function VS(){return Mt}function ZS(){return Mt=ge>0?Jr(_i,--ge):0,ki--,Mt===10&&(ki=1,Ga--),Mt}function we(){return Mt=ge<mm?Jr(_i,ge++):0,ki++,Mt===10&&(ki=1,Ga++),Mt}function nr(){return Jr(_i,ge)}function Ks(){return ge}function ja(e,t){return bi(_i,e,t)}function us(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 KS(e){return Ga=ki=1,mm=Oe(_i=e),ge=0,[]}function QS(e){return _i="",e}function Mo(e){return fm(ja(ge-1,En(e===91?e+2:e===40?e+1:e)))}function JS(e){for(;(Mt=nr())&&Mt<33;)we();return us(e)>2||us(Mt)>3?"":" "}function t_(e,t){for(;--t&&we()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return ja(e,Ks()+(t<6&&nr()==32&&we()==32))}function En(e){for(;we();)switch(Mt){case e:return ge;case 34:case 39:e!==34&&e!==39&&En(Mt);break;case 40:e===41&&En(e);break;case 92:we();break}return ge}function e_(e,t){for(;we()&&e+Mt!==57;)if(e+Mt===84&&nr()===47)break;return"/*"+ja(t,ge-1)+"*"+Ji(e===47?e:we())}function r_(e){for(;!us(nr());)we();return ja(e,ge)}function i_(e){return QS(Qs("",null,null,null,[""],e=KS(e),0,[0],e))}function Qs(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,u=o,p=0,d=0,m=0,g=1,y=1,C=1,b=0,k=0,w="",S=s,B=a,M=i,v=w;y;)switch(m=k,k=we()){case 40:m!=108&&Jr(v,u-1)==58?(b++,v+="("):v+=Mo(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Mo(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Ji(k);break}v+=JS(m);break;case 92:v+=t_(Ks()-1,7);continue;case 47:switch(nr()){case 42:case 47:Rs(s_(e_(we(),Ks()),t,r,l),l),(us(m||1)==5||us(nr()||1)==5)&&Oe(v)&&bi(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*g:n[h++]=Oe(v)*C;case 125*g:case 59:case 0:if(b>0&&k){v+=Ji(k);break}switch(k){case 0:case 125:y=0;case 59+c:C==-1&&(v=An(v,/\f/g,"")),d>0&&(Oe(v)-u||g===0)&&Rs(d>32?Oc(v+";",i,r,u-1,l):Oc(An(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Rs(M=$c(v,t,r,h,c,s,n,w,S=[],B=[],u,a),a),k===123)if(c===0)Qs(v,t,M,M,S,a,u,n,B);else{switch(p){case 99:if(Jr(v,3)===110)break;case 108:if(Jr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Qs(e,M,M,i&&Rs($c(e,M,M,0,0,s,n,w,s,S=[],u,B),B),s,B,u,n,i?S:B):Qs(v,M,M,M,[""],B,0,n,B)}}h=c=d=0,g=C=1,w=v="",u=o;break;case 58:u=1+Oe(v),d=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&ZS()==125)continue}switch(v+=Ji(k),k*g){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[h++]=(Oe(v)-1)*C,C=1;break;case 64:nr()===45&&(v+=Mo(we())),p=nr(),c=u=Oe(w=v+=r_(Ks())),k++;break;case 45:m===45&&Oe(v)==2&&(g=0)}}return a}function $c(e,t,r,i,s,a,o,n,l,h,c,u){for(var p=s-1,d=s===0?a:[""],m=gm(d),g=0,y=0,C=0;g<i;++g)for(var b=0,k=bi(e,p+1,p=XS(y=o[g])),w=e;b<m;++b)(w=fm(y>0?d[b]+" "+k:An(k,/&\f/g,d[b])))&&(l[C++]=w);return Ol(e,t,r,s===0?um:n,l,h,c,u)}function s_(e,t,r,i){return Ol(e,t,r,$l,Ji(VS()),bi(e,2,-2),0,i)}function Oc(e,t,r,i,s){return Ol(e,t,r,dm,bi(e,0,i),bi(e,i+1,-1),i,s)}function Mn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function a_(e,t,r,i){switch(e.type){case pm:if(e.children.length)break;case YS:case GS:case dm:return e.return=e.return||e.value;case $l:return"";case Fn:return e.return=e.value+"{"+Mn(e.children,i)+"}";case um:if(!Oe(e.value=e.props.join(",")))return""}return Oe(r=Mn(e.children,i))?e.return=e.value+"{"+r+"}":""}function o_(e){var t=gm(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var ym="c4",n_=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-DSOFWNU6.js");return{diagram:t}},__vite__mapDeps([7,8,0,1]));return{id:ym,diagram:e}},"loader"),h_={id:ym,detector:n_,loader:l_},c_=h_,Cm="flowchart",u_=f((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"),d_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-BDC4-jHO.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:Cm,diagram:e}},"loader"),p_={id:Cm,detector:u_,loader:d_},f_=p_,xm="flowchart-v2",g_=f((e,t)=>{var r,i,s;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)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),m_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-BDC4-jHO.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:xm,diagram:e}},"loader"),y_={id:xm,detector:g_,loader:m_},C_=y_,bm="er",x_=f(e=>/^\s*erDiagram/.test(e),"detector"),b_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-Ds1StEUd.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,0,1]));return{id:bm,diagram:e}},"loader"),k_={id:bm,detector:x_,loader:b_},T_=k_,km="gitGraph",w_=f(e=>/^\s*gitGraph/.test(e),"detector"),S_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-B8RcuV_L.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,0,1]));return{id:km,diagram:e}},"loader"),__={id:km,detector:w_,loader:S_},B_=__,Tm="gantt",v_=f(e=>/^\s*gantt/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-CV2aHQqf.js");return{diagram:t}},__vite__mapDeps([19,0,1,20,21,22]));return{id:Tm,diagram:e}},"loader"),F_={id:Tm,detector:v_,loader:L_},A_=F_,wm="info",E_=f(e=>/^\s*info/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-DUPoTf50.js");return{diagram:t}},__vite__mapDeps([23,18,0,1]));return{id:wm,diagram:e}},"loader"),$_={id:wm,detector:E_,loader:M_},Sm="pie",O_=f(e=>/^\s*pie/.test(e),"detector"),I_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-acWvdQTD.js");return{diagram:t}},__vite__mapDeps([24,16,18,0,1,25,26,21]));return{id:Sm,diagram:e}},"loader"),D_={id:Sm,detector:O_,loader:I_},_m="quadrantChart",P_=f(e=>/^\s*quadrantChart/.test(e),"detector"),R_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-DlggX4Sm.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,0,1]));return{id:_m,diagram:e}},"loader"),N_={id:_m,detector:P_,loader:R_},q_=N_,Bm="xychart",z_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),W_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-3Doc4Trz.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,0,1]));return{id:Bm,diagram:e}},"loader"),H_={id:Bm,detector:z_,loader:W_},Y_=H_,vm="requirement",U_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),G_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33--mMqwmV8.js");return{diagram:t}},__vite__mapDeps([29,11,12,0,1]));return{id:vm,diagram:e}},"loader"),j_={id:vm,detector:U_,loader:G_},X_=j_,Lm="sequence",V_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-iDQzPFlj.js");return{diagram:t}},__vite__mapDeps([30,8,17,0,1]));return{id:Lm,diagram:e}},"loader"),K_={id:Lm,detector:V_,loader:Z_},Q_=K_,Fm="class",J_=f((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"),tB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-B8WsaT2G.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,0,1]));return{id:Fm,diagram:e}},"loader"),eB={id:Fm,detector:J_,loader:tB},rB=eB,Am="classDiagram",iB=f((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"),sB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-B8WsaT2G.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,0,1]));return{id:Am,diagram:e}},"loader"),aB={id:Am,detector:iB,loader:sB},oB=aB,Em="state",nB=f((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"),lB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CsCyQLZ3.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,3,4,0,1]));return{id:Em,diagram:e}},"loader"),hB={id:Em,detector:nB,loader:lB},cB=hB,Mm="stateDiagram",uB=f((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"),dB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-CPapECG9.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,0,1]));return{id:Mm,diagram:e}},"loader"),pB={id:Mm,detector:uB,loader:dB},fB=pB,$m="journey",gB=f(e=>/^\s*journey/.test(e),"detector"),mB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-C5_ohMRp.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,0,1]));return{id:$m,diagram:e}},"loader"),yB={id:$m,detector:gB,loader:mB},CB=yB,xB=f((e,t,r)=>{z.debug(`rendering svg for syntax error
301
+ `);const i=Jk(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),lu(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),Om={draw:xB},bB=Om,kB={db:{},renderer:Om,parser:{parse:f(()=>{},"parse")}},TB=kB,Im="flowchart-elk",wB=f((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"),SB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-BDC4-jHO.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:Im,diagram:e}},"loader"),_B={id:Im,detector:wB,loader:SB},BB=_B,Dm="timeline",vB=f(e=>/^\s*timeline/.test(e),"detector"),LB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-Dl0rnKvr.js");return{diagram:t}},__vite__mapDeps([38,25,0,1]));return{id:Dm,diagram:e}},"loader"),FB={id:Dm,detector:vB,loader:LB},AB=FB,Pm="mindmap",EB=f(e=>/^\s*mindmap/.test(e),"detector"),MB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-DSH4JZF9.js");return{diagram:t}},__vite__mapDeps([39,11,12,0,1]));return{id:Pm,diagram:e}},"loader"),$B={id:Pm,detector:EB,loader:MB},OB=$B,Rm="kanban",IB=f(e=>/^\s*kanban/.test(e),"detector"),DB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-Bn4UnOMG.js");return{diagram:t}},__vite__mapDeps([40,10,0,1]));return{id:Rm,diagram:e}},"loader"),PB={id:Rm,detector:IB,loader:DB},RB=PB,Nm="sankey",NB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),qB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-BtV9tZ77.js");return{diagram:t}},__vite__mapDeps([41,26,21,0,1]));return{id:Nm,diagram:e}},"loader"),zB={id:Nm,detector:NB,loader:qB},WB=zB,qm="packet",HB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),YB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-CyBPDzWJ.js");return{diagram:t}},__vite__mapDeps([42,16,18,0,1]));return{id:qm,diagram:e}},"loader"),UB={id:qm,detector:HB,loader:YB},zm="radar",GB=f(e=>/^\s*radar-beta/.test(e),"detector"),jB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-CYbpXrSn.js");return{diagram:t}},__vite__mapDeps([43,16,18,0,1]));return{id:zm,diagram:e}},"loader"),XB={id:zm,detector:GB,loader:jB},Wm="block",VB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),ZB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-CTjxm9Sy.js");return{diagram:t}},__vite__mapDeps([44,10,3,13,0,1]));return{id:Wm,diagram:e}},"loader"),KB={id:Wm,detector:VB,loader:ZB},QB=KB,Hm="treeView",JB=f(e=>/^\s*treeView-beta/.test(e),"detector"),tv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-SI8s6fjX.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,0,1]));return{id:Hm,diagram:e}},"loader"),ev={id:Hm,detector:JB,loader:tv},rv=ev,Ym="architecture",iv=f(e=>/^\s*architecture/.test(e),"detector"),sv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-DyzbzABx.js");return{diagram:t}},__vite__mapDeps([46,16,18,0,1,6]));return{id:Ym,diagram:e}},"loader"),av={id:Ym,detector:iv,loader:sv},ov=av,Um="eventmodeling",nv=f(e=>/^\s*eventmodeling/.test(e),"detector"),lv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-mBkC4RTW.js");return{diagram:t}},__vite__mapDeps([47,16,18,0,1]));return{id:Um,diagram:e}},"loader"),hv={id:Um,detector:nv,loader:lv},cv=hv,Gm="ishikawa",uv=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-FDYOx9rf.js");return{diagram:t}},__vite__mapDeps([48,0,1]));return{id:Gm,diagram:e}},"loader"),pv={id:Gm,detector:uv,loader:dv},jm="venn",fv=f(e=>/^\s*venn-beta/.test(e),"detector"),gv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-qF7nTZzA.js");return{diagram:t}},__vite__mapDeps([49,0,1]));return{id:jm,diagram:e}},"loader"),mv={id:jm,detector:fv,loader:gv},yv=mv,Xm="treemap",Cv=f(e=>/^\s*treemap/.test(e),"detector"),xv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-DwK7kBCu.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,0,1,22,26,21]));return{id:Xm,diagram:e}},"loader"),bv={id:Xm,detector:Cv,loader:xv},Vm="wardley-beta",kv=f(e=>/^\s*wardley-beta/i.test(e),"detector"),Tv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-pHGfkMnc.js");return{diagram:t}},__vite__mapDeps([51,16,18,0,1]));return{id:Vm,diagram:e}},"loader"),wv={id:Vm,detector:kv,loader:Tv},Sv=wv,Ic=!1,Xa=f(()=>{Ic||(Ic=!0,ia("error",TB,e=>e.toLowerCase().trim()==="error"),ia("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Do(BB,OB,ov),Do(c_,RB,oB,rB,T_,A_,$_,D_,X_,Q_,C_,f_,AB,B_,fB,cB,CB,q_,WB,UB,Y_,QB,cv,rv,XB,pv,bv,yv,Sv))},"addDiagrams"),_v=f(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Lr).map(async([r,{detector:i,loader:s}])=>{if(s)try{zo(r)}catch{try{const{diagram:a,id:o}=await s();ia(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Lr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Bv="graphics-document document";function Zm(e,t){e.attr("role",Bv),t!==""&&e.attr("aria-roledescription",t)}f(Zm,"setA11yDiagramInfo");function Km(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(Km,"addSVGa11yTitleDescription");var vr,$n=(vr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=Bt(),s=Dn(t,i);t=sT(t)+`
302
+ `;try{zo(s)}catch{const u=x0(s);if(!u)throw new jc(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();ia(p,d)}const{db:a,parser:o,renderer:n,init:l}=zo(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new vr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(vr,"Diagram"),vr),Dc=[],vv=f(()=>{Dc.forEach(e=>{e()}),Dc=[]},"attachFunctions"),Lv=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Qm(e){const t=e.match(Gc);if(!t)return{text:e,metadata:{}};let r=o2(t[1],{schema:a2})??{};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}}f(Qm,"extractFrontMatter");var Fv=f(e=>e.replace(/\r\n?/g,`
303
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Av=f(e=>{const{text:t,metadata:r}=Qm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),Ev=f(e=>{const t=ke.detectInit(e)??{},r=ke.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:U2(e),directive:t}},"processDirectives");function Il(e){const t=Fv(e),r=Av(t),i=Ev(r.text),s=yl(r.config,i.directive);return e=Lv(i.text),{code:e,title:r.title,config:s}}f(Il,"preprocessDiagram");function Jm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Jm,"toBase64");var Mv=5e4,$v="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Ov="sandbox",Iv="loose",Dv="http://www.w3.org/2000/svg",Pv="http://www.w3.org/1999/xlink",Rv="http://www.w3.org/1999/xhtml",Nv="100%",qv="100%",zv="border:0;margin:0;",Wv="margin:0",Hv="allow-top-navigation-by-user-activation allow-popups",Yv='The "iframe" tag is not supported by your browser.',Uv=["foreignobject"],Gv=["dominant-baseline"];function Dl(e){const t=Il(e);return ea(),G0(t.config??{}),t}f(Dl,"processAndSetConfigs");async function ty(e,t){Xa();try{const{code:r,config:i}=Dl(e);return{diagramType:(await ry(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(ty,"parse");var Pc=f((e,t,r=[])=>{const i=Qc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),jv=f((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 n=re(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Kh(l.styles)||n.forEach(h=>{r.insertRule(Pc(l.id,h,l.styles),r.cssRules.length)}),Kh(l.textStyles)||r.insertRule(Pc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=qo(s)+`
304
304
  `}else i+=`${e.themeCSS}
305
- `;return i+$o(r)},"createCssStyles"),Sv=f((e,t)=>_n($S(`${e}{${t}}`),DS([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Tn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[xS,kS,em,wS,"@container","@starting-style"],Tn].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Bl))},"addNamespace"),IS])),"compileCSS"),_v=f((e,t,r,i)=>{const s=wv(e,r),a=W0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return Sv(i,a)},"createUserStyles"),Bv=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Lr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),vv=f((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":mv,i=Wm(`<body style="${Cv}">${e}</body>`);return`<iframe style="width:${gv};height:${r};${yv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${xv}">
306
- ${bv}
307
- </iframe>`},"putIntoIFrame"),Bc=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",dv);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function vn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(vn,"sandboxedIframe");var Lv=f((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),Fv=f(async function(e,t,r){var Y,H,I,E,v,$;Ga();const i=Fl(t);t=i.code;const s=vt();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??lv)&&(t=hv);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const _=ht(p?n:h).node();_&&"remove"in _&&_.remove()},"removeTempElements");let u=ht(document.body);const p=s.securityLevel===cv,d=s.securityLevel===uv,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const A=vn(ht(r),o);u=ht(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht(r);Bc(u,e,l,`font-family: ${m}`,pv)}else{if(Lv(document,e,l,o),p){const A=vn(ht(document.body),o);u=ht(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht("body");Bc(u,e,l)}let g,y;try{g=await Bn.fromText(t,{title:i.title})}catch(A){if(s.suppressErrorRendering)throw c(),A;g=await Bn.fromText("error"),y=A}const C=u.select(h).node(),b=g.type,k=C.firstChild,w=k.firstChild,S=(H=(Y=g.renderer).getClasses)==null?void 0:H.call(Y,t,g),B=_v(s,b,S,a),M=document.createElement("style");M.innerHTML=B,k.insertBefore(M,w);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(A){throw s.suppressErrorRendering?c():Z_.draw(t,e,"11.15.0"),A}const L=u.select(`${h} svg`),W=(E=(I=g.db).getAccTitle)==null?void 0:E.call(I),P=($=(v=g.db).getAccDescription)==null?void 0:$.call(v);Um(b,L,W,P),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",fv);let O=u.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=Bv(O,p,Ke(s.arrowMarkerAbsolute)),p){const A=u.select(h+" svg").node();O=vv(O,A)}else d||(O=pi.sanitize(O,{ADD_TAGS:kv,ADD_ATTR:Tv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(iv(),y)throw y;return c(),{diagramType:b,svg:O,bindFunctions:g.db.bindFunctions}},"render");function Hm(e={}){var i;const t=Dt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),b0(t),t!=null&&t.theme&&t.theme in je?t.themeVariables=je[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=je.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?x0(t):Wc();Ln(r.logLevel),Ga()}f(Hm,"initialize");var Ym=f((e,t={})=>{const{code:r}=Ll(e);return Bn.fromText(r,t)},"getDiagramFromText");function Um(e,t,r,i){Pm(t,e),Nm(t,r,i,t.attr("id"))}f(Um,"addA11yInfo");var Ar=Object.freeze({render:Fv,parse:zm,getDiagramFromText:Ym,initialize:Hm,getConfig:vt,setConfig:zc,getSiteConfig:Wc,updateSiteConfig:k0,reset:f(()=>{Js()},"reset"),globalReset:f(()=>{Js(fi)},"globalReset"),defaultConfig:fi});Ln(vt().logLevel);Js(vt());var Av=f((e,t,r)=>{z.warn(e),hl(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"),Gm=f(async function(e={querySelector:".mermaid"}){try{await Ev(e)}catch(t){if(hl(t)&&z.error(t.str),le.parseError&&le.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Ev=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ar.getConfig();z.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ar.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Te.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=of(Te.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Te.detectInit(o);c&&z.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await Zm(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){Av(u,n,le.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),jm=f(function(e){Ar.initialize(e)},"initialize"),Mv=f(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&jm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Gm(i)},"init"),$v=f(async(e,{lazyLoad:t=!0}={})=>{Ga(),Fo(...e),t===!1&&await ev()},"registerExternalDiagrams"),Xm=f(function(){if(le.startOnLoad){const{startOnLoad:e}=Ar.getConfig();e&&le.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Xm,!1);var Ov=f(function(e){le.parseError=e},"setParseErrorHandler"),va=[],Bo=!1,Vm=f(async()=>{if(!Bo){for(Bo=!0;va.length>0;){const e=va.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}Bo=!1}},"executeQueue"),Iv=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{Ar.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=le.parseError)==null||l.call(le,n),o(n),i(n)})}),"performCall");va.push(s),Vm().catch(i)}),"parse"),Zm=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{Ar.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=le.parseError)==null||h.call(le,l),n(l),s(l)})}),"performCall");va.push(a),Vm().catch(s)}),"render"),Dv=f(()=>Object.keys(Sr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),le={startOnLoad:!0,mermaidAPI:Ar,parse:Iv,render:Zm,init:Mv,run:Gm,registerExternalDiagrams:$v,registerLayoutLoaders:Qg,initialize:jm,parseError:void 0,contentLoaded:Xm,setParseErrorHandler:Ov,detectType:Fn,registerIconPacks:WT,getRegisteredDiagramsMetadata:Dv},Rv=le;/*! Check if previously processed *//*!
305
+ `;return i+qo(r)},"createCssStyles"),Xv=f((e,t)=>Mn(i_(`${e}{${t}}`),o_([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Fn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[HS,US,pm,jS,"@container","@starting-style"],Fn].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=$l))},"addNamespace"),a_])),"compileCSS"),Vv=f((e,t,r,i)=>{const s=jv(e,r),a=uC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return Xv(i,a)},"createUserStyles"),Zv=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Mr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Kv=f((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":qv,i=Jm(`<body style="${Wv}">${e}</body>`);return`<iframe style="width:${Nv};height:${r};${zv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Hv}">
306
+ ${Yv}
307
+ </iframe>`},"putIntoIFrame"),Rc=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Dv);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function On(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(On,"sandboxedIframe");var Qv=f((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),Jv=f(async function(e,t,r){var Y,H,P,E,L,O;Xa();const i=Dl(t);t=i.code;const s=Bt();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Mv)&&(t=$v);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const _=ht(p?n:h).node();_&&"remove"in _&&_.remove()},"removeTempElements");let u=ht(document.body);const p=s.securityLevel===Ov,d=s.securityLevel===Iv,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const A=On(ht(r),o);u=ht(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht(r);Rc(u,e,l,`font-family: ${m}`,Pv)}else{if(Qv(document,e,l,o),p){const A=On(ht(document.body),o);u=ht(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht("body");Rc(u,e,l)}let g,y;try{g=await $n.fromText(t,{title:i.title})}catch(A){if(s.suppressErrorRendering)throw c(),A;g=await $n.fromText("error"),y=A}const C=u.select(h).node(),b=g.type,k=C.firstChild,w=k.firstChild,S=(H=(Y=g.renderer).getClasses)==null?void 0:H.call(Y,t,g),B=Vv(s,b,S,a),M=document.createElement("style");M.innerHTML=B,k.insertBefore(M,w);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(A){throw s.suppressErrorRendering?c():bB.draw(t,e,"11.15.0"),A}const v=u.select(`${h} svg`),W=(E=(P=g.db).getAccTitle)==null?void 0:E.call(P),D=(O=(L=g.db).getAccDescription)==null?void 0:O.call(L);iy(b,v,W,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Rv);let I=u.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),I=Zv(I,p,Ze(s.arrowMarkerAbsolute)),p){const A=u.select(h+" svg").node();I=Kv(I,A)}else d||(I=fi.sanitize(I,{ADD_TAGS:Uv,ADD_ATTR:Gv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(vv(),y)throw y;return c(),{diagramType:b,svg:I,bindFunctions:g.db.bindFunctions}},"render");function ey(e={}){var i;const t=Ot({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Y0(t),t!=null&&t.theme&&t.theme in Ge?t.themeVariables=Ge[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ge.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?H0(t):Jc();In(r.logLevel),Xa()}f(ey,"initialize");var ry=f((e,t={})=>{const{code:r}=Il(e);return $n.fromText(r,t)},"getDiagramFromText");function iy(e,t,r,i){Zm(t,e),Km(t,r,i,t.attr("id"))}f(iy,"addA11yInfo");var Or=Object.freeze({render:Jv,parse:ty,getDiagramFromText:ry,initialize:ey,getConfig:Bt,setConfig:tu,getSiteConfig:Jc,updateSiteConfig:U0,reset:f(()=>{ea()},"reset"),globalReset:f(()=>{ea(gi)},"globalReset"),defaultConfig:gi});In(Bt().logLevel);ea(Bt());var tL=f((e,t,r)=>{z.warn(e),ml(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"),sy=f(async function(e={querySelector:".mermaid"}){try{await eL(e)}catch(t){if(ml(t)&&z.error(t.str),he.parseError&&he.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),eL=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Or.getConfig();z.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Or.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ke.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Cf(ke.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=ke.detectInit(o);c&&z.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await ly(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){tL(u,n,he.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ay=f(function(e){Or.initialize(e)},"initialize"),rL=f(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&ay(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await sy(i)},"init"),iL=f(async(e,{lazyLoad:t=!0}={})=>{Xa(),Do(...e),t===!1&&await _v()},"registerExternalDiagrams"),oy=f(function(){if(he.startOnLoad){const{startOnLoad:e}=Or.getConfig();e&&he.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",oy,!1);var sL=f(function(e){he.parseError=e},"setParseErrorHandler"),Fa=[],$o=!1,ny=f(async()=>{if(!$o){for($o=!0;Fa.length>0;){const e=Fa.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}$o=!1}},"executeQueue"),aL=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{Or.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=he.parseError)==null||l.call(he,n),o(n),i(n)})}),"performCall");Fa.push(s),ny().catch(i)}),"parse"),ly=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{Or.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=he.parseError)==null||h.call(he,l),n(l),s(l)})}),"performCall");Fa.push(a),ny().catch(s)}),"render"),oL=f(()=>Object.keys(Lr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),he={startOnLoad:!0,mermaidAPI:Or,parse:aL,render:ly,init:rL,run:sy,registerExternalDiagrams:iL,registerLayoutLoaders:cm,initialize:ay,parseError:void 0,contentLoaded:oy,setParseErrorHandler:sL,detectType:Dn,registerIconPacks:uw,getRegisteredDiagramsMetadata:oL},nL=he;/*! Check if previously processed *//*!
308
308
  * Wait for document loaded before starting the execution
309
- */const fL=Object.freeze(Object.defineProperty({__proto__:null,default:Rv},Symbol.toStringTag,{value:"Module"}));export{Xv as $,z0 as A,Hv as B,sr as C,Re as D,cy as E,vt as F,Z0 as G,cl as H,Nc as I,I1 as J,B2 as K,Fk as L,mk as M,zn as N,jv as O,Zv as P,Wr as Q,Lh as R,vh as S,Qv as T,at as U,Kv as V,Vv as W,Uv as X,Gv as Y,tL as Z,f as _,Y0 as a,Uw as a$,Jv as a0,e0 as a1,Qi as a2,Wv as a3,Ra as a4,y2 as a5,A0 as a6,Vc as a7,lh as a8,bk as a9,Op as aA,r2 as aB,e2 as aC,t2 as aD,J1 as aE,Ip as aF,a2 as aG,s2 as aH,i2 as aI,n2 as aJ,o2 as aK,Z1 as aL,R1 as aM,ee as aN,Qe as aO,Ei as aP,ul as aQ,Wp as aR,Lr as aS,Up as aT,Ac as aU,mS as aV,hL as aW,uL as aX,nL as aY,K as aZ,lL as a_,Yo as aa,_2 as ab,Be as ac,D as ad,R as ae,P0 as af,Kc as ag,fw as ah,Xg as ai,cL as aj,ll as ak,X as al,HT as am,el as an,rl as ao,Us as ap,K1 as aq,Q1 as ar,$p as as,Mp as at,Ep as au,j1 as av,U1 as aw,G1 as ax,X1 as ay,V1 as az,H0 as b,qw as b0,Nw as b1,yk as b2,qv as b3,ys as b4,WT as b5,qT as b6,Pn as b7,er as b8,kh as b9,Zx as ba,es as bb,Z as bc,Gp as bd,oe as be,Hx as bf,Rn as bg,uu as bh,ps as bi,fu as bj,Yv as bk,hy as bl,fL as bm,yt as c,ht as d,Zc as e,Dt as f,G0 as g,Ze as h,_e as i,P1 as j,us as k,z as l,Hp as m,cs as n,zv as o,pL as p,j0 as q,dL as r,U0 as s,X0 as t,Te as u,D1 as v,F2 as w,Ow as x,eL as y,pi as z};
309
+ */const RL=Object.freeze(Object.defineProperty({__proto__:null,default:nL},Symbol.toStringTag,{value:"Module"}));export{CL as $,dC as A,pL as B,lr as C,De as D,Ey as E,Bt as F,bC as G,yl as H,Kc as I,a2 as J,Z2 as K,Jk as L,qk as M,Vn as N,yL as O,bL as P,Wr as Q,qh as R,Nh as S,TL as T,nt as U,kL as V,xL as W,gL as X,mL as Y,SL as Z,f as _,fC as a,gS as a$,wL as a0,_0 as a1,ts as a2,uL as a3,Na as a4,z2 as a5,tC as a6,nu as a7,bh as a8,Yk as a9,Gp as aA,B2 as aB,_2 as aC,S2 as aD,w2 as aE,jp as aF,F2 as aG,L2 as aH,v2 as aI,E2 as aJ,A2 as aK,b2 as aL,n2 as aM,re as aN,Ke as aO,$i as aP,Cl as aQ,Jp as aR,Mr as aS,sf as aT,Wc as aU,qS as aV,$L as aW,IL as aX,EL as aY,J as aZ,ML as a_,Ko as aa,V2 as ab,_e as ac,R as ad,N as ae,lC as af,hu as ag,Rw as ah,om as ai,OL as aj,gl as ak,Z as al,pw as am,ll as an,hl as ao,js as ap,k2 as aq,T2 as ar,Up as as,Yp as at,Hp as au,y2 as av,g2 as aw,m2 as ax,C2 as ay,x2 as az,pC as b,cS as b0,hS as b1,zk as b2,cL as b3,xs as b4,uw as b5,cw as b6,Un as b7,sr as b8,$h as b9,bb as ba,is as bb,Q as bc,af as bd,oe as be,pb as bf,Yn as bg,wu as bh,gs as bi,Bu as bj,fL as bk,Ay as bl,RL as bm,xt as c,ht as d,lu as e,Ot as f,mC as g,Ve as h,Se as i,l2 as j,ps as k,z as l,ef as m,ds as n,dL as o,PL as p,yC as q,DL as r,gC as s,CC as t,ke as u,o2 as v,J2 as w,sS as x,_L as y,fi as z};