@svenroth-ai/shipwright 0.28.0 → 0.29.1

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 (306) hide show
  1. package/client/dist/apple-touch-icon.png +0 -0
  2. package/client/dist/assets/{EmbeddedTerminal-4xgNUBUu.js → EmbeddedTerminal-BXosRYLy.js} +30 -30
  3. package/client/dist/assets/{abnfDiagram-VRR7QNED-BdCNbaqc.js → abnfDiagram-VCTEODGH-BGxuVEiU.js} +1 -1
  4. package/client/dist/assets/arc-o82bcJs8.js +1 -0
  5. package/client/dist/assets/architectureDiagram-5GKGNRK7-CaeUIM7e.js +36 -0
  6. package/client/dist/assets/blockDiagram-I7D4REHJ-DtWpTjgT.js +129 -0
  7. package/client/dist/assets/c4Diagram-7LVT6UL2-sJULbaUv.js +38 -0
  8. package/client/dist/assets/channel-CLBQbfQb.js +1 -0
  9. package/client/dist/assets/{chunk-2Q5K7J3B-4N6AnmBJ.js → chunk-2Q5K7J3B-CPeH4xHb.js} +1 -1
  10. package/client/dist/assets/{chunk-5VM5RSS4-Bwd7rtD3.js → chunk-5VM5RSS4-DxiKB3qZ.js} +1 -1
  11. package/client/dist/assets/{chunk-32BRIVSS-Cs67LiCy.js → chunk-F27PBJKO-B8V1zhCX.js} +1 -1
  12. package/client/dist/assets/{chunk-EX3LRPZG-CQqGfptD.js → chunk-IMKFNOWR-BtXet829.js} +5 -5
  13. package/client/dist/assets/{chunk-JWPE2WC7-ClvKd4PN.js → chunk-JWPE2WC7-BaQYKssR.js} +1 -1
  14. package/client/dist/assets/chunk-POPQ4Y6H-I1x_vfH3.js +1 -0
  15. package/client/dist/assets/{chunk-MOJQB5TN-Cwvj8GE1.js → chunk-SVP7TREG-Bvt8jrSp.js} +1 -1
  16. package/client/dist/assets/{chunk-V7JOEXUC-CYFfa4PY.js → chunk-TICWLB2K--9ywNq1F.js} +1 -1
  17. package/client/dist/assets/{chunk-XXDRQBXY-BQAZ6Our.js → chunk-XXDRQBXY-DrIyrBs1.js} +1 -1
  18. package/client/dist/assets/classDiagram-ZZMXUADV-D8z-o3xu.js +1 -0
  19. package/client/dist/assets/classDiagram-v2-VYDZK3BY-D8z-o3xu.js +1 -0
  20. package/client/dist/assets/{cose-bilkent-JH36ORCC-C76Yia6h.js → cose-bilkent-JH36ORCC-DISm8_p0.js} +1 -1
  21. package/client/dist/assets/{cynefin-VYW2F7L2-pJe7rdTi.js → cynefin-OW5HDTMX-wyDjqucU.js} +3 -3
  22. package/client/dist/assets/{cynefinDiagram-TSTJHNR4-EeHQ7dYV.js → cynefinDiagram-5FMLGOSQ-CN-IKDQ6.js} +1 -1
  23. package/client/dist/assets/dagre-GXQ25YYZ-QY0m5eSL.js +4 -0
  24. package/client/dist/assets/diagram-S7CK7UJ4-DhjaAe2g.js +30 -0
  25. package/client/dist/assets/diagram-UQ7AKVKN-D-3R3axg.js +41 -0
  26. package/client/dist/assets/{diagram-FQU43EPY-DW_-leqw.js → diagram-VSXAHHWV-BxXEtjRu.js} +2 -2
  27. package/client/dist/assets/{diagram-G47NLZAW-C_hsLD4u.js → diagram-VX7I27RA-DkbXkJpd.js} +1 -1
  28. package/client/dist/assets/{diagram-NH7WQ7WH-CbeQuO_f.js → diagram-Z3DM3KII-DQGRD9gQ.js} +1 -1
  29. package/client/dist/assets/{ebnfDiagram-CCIWWBDH-B8Z8WHF6.js → ebnfDiagram-PWID7BFC-C_XxskCm.js} +1 -1
  30. package/client/dist/assets/erDiagram-RLTQ6QDP-BhBsYQ7c.js +99 -0
  31. package/client/dist/assets/flowDiagram-HODETNUW-D7fXEPrM.js +168 -0
  32. package/client/dist/assets/{ganttDiagram-NO4QXBWP-K3X0DYBa.js → ganttDiagram-EL5Y4UJY-Bwf8EtWr.js} +4 -4
  33. package/client/dist/assets/{gitGraphDiagram-IHSO6WYX-B2SEx0xa.js → gitGraphDiagram-WWUBYQGX-C3_ixsOl.js} +1 -1
  34. package/client/dist/assets/index-DWrPE3aq.css +1 -0
  35. package/client/dist/assets/index-DwRlIUrK.js +924 -0
  36. package/client/dist/assets/infoDiagram-27XIBGKW-BpcHmgOL.js +2 -0
  37. package/client/dist/assets/{ishikawaDiagram-FXEZZL3T-CrN7QJzt.js → ishikawaDiagram-5VMMS53U-DzSGmhT5.js} +4 -4
  38. package/client/dist/assets/{journeyDiagram-5HDEW3XC-XHIsl7rM.js → journeyDiagram-3NMN7TZE-CT1CrVQO.js} +2 -2
  39. package/client/dist/assets/{kanban-definition-HUTT4EX6-A6HJqHw7.js → kanban-definition-UXKFOSKX-N1CNMAOm.js} +8 -8
  40. package/client/dist/assets/katex-C5jXJg4s.js +257 -0
  41. package/client/dist/assets/layout-CR8gdfo4.js +1 -0
  42. package/client/dist/assets/{linear-D1vF9IQB.js → linear-CfLRjQgX.js} +1 -1
  43. package/client/dist/assets/mermaid.core-Bnqt31Q7.js +312 -0
  44. package/client/dist/assets/{mindmap-definition-LN4V7U3C-CxRkUj6Z.js → mindmap-definition-YA3MSWOX-Brc-v1M4.js} +2 -2
  45. package/client/dist/assets/{pegDiagram-2B236MQR-Bs9dp-8a.js → pegDiagram-XKGWAZYB-D8jUV01U.js} +1 -1
  46. package/client/dist/assets/{pieDiagram-ENE6RG2P-DBWILzB8.js → pieDiagram-E7YTZNPT-BiSkIsrz.js} +3 -3
  47. package/client/dist/assets/{quadrantDiagram-ABIIQ3AL-DrCVJJx6.js → quadrantDiagram-AXDQQJYC-CJetqQxd.js} +1 -1
  48. package/client/dist/assets/{railroadDiagram-RFXS5EU6-BdPW2dNf.js → railroadDiagram-O6MQD6OU-DTTtZpGO.js} +1 -1
  49. package/client/dist/assets/{requirementDiagram-TGXJPOKE-Bj_g3tC5.js → requirementDiagram-BXWQKSXE-meFCoLtR.js} +5 -5
  50. package/client/dist/assets/{sankeyDiagram-HTMAVEWB-BGL9NnsS.js → sankeyDiagram-P5KCCOFB-BR9eN4Do.js} +4 -4
  51. package/client/dist/assets/{sequenceDiagram-DBY2YBRQ-DEirxTZY.js → sequenceDiagram-WJ2MYXX4-BdVzFsCC.js} +1 -1
  52. package/client/dist/assets/{sizeCapture-X5ZJPWSS-BtLrvrea.js → sizeCapture-INFHLROL-CZoZ7r-1.js} +1 -1
  53. package/client/dist/assets/stateDiagram-D77RDMKH-Cmc-iYtm.js +1 -0
  54. package/client/dist/assets/stateDiagram-v2-MP3YSRHH-Cj-hQ4qB.js +1 -0
  55. package/client/dist/assets/swimlanes-42K2YHIH-DN4MssUX.js +1 -0
  56. package/client/dist/assets/swimlanesDiagram-VR7AAH4N-DFxrYFKF.js +8 -0
  57. package/client/dist/assets/{timeline-definition-FHXFAJF6-CnBKJtD_.js → timeline-definition-24CTP7MA-pxxqlxwt.js} +3 -3
  58. package/client/dist/assets/{vennDiagram-L72KCM5P-BYmiJYoh.js → vennDiagram-4TSXK5OY-DiItNcze.js} +5 -5
  59. package/client/dist/assets/{wardleyDiagram-EHGQE667-DU7vW8q3.js → wardleyDiagram-VM6X3IG4-Dfvub75z.js} +1 -1
  60. package/client/dist/assets/xychartDiagram-S5SC5T6Z-Bx83X515.js +7 -0
  61. package/client/dist/favicon-16.png +0 -0
  62. package/client/dist/favicon-32.png +0 -0
  63. package/client/dist/icon-192.png +0 -0
  64. package/client/dist/icon-512.png +0 -0
  65. package/client/dist/icon-maskable-512.png +0 -0
  66. package/client/dist/index.html +11 -2
  67. package/client/dist/manifest.json +13 -0
  68. package/package.json +2 -2
  69. package/server/dist/config.d.ts.map +1 -1
  70. package/server/dist/config.js +7 -2
  71. package/server/dist/config.js.map +1 -1
  72. package/server/dist/core/adopt-scan-findings.d.ts +12 -0
  73. package/server/dist/core/adopt-scan-findings.d.ts.map +1 -0
  74. package/server/dist/core/adopt-scan-findings.js +96 -0
  75. package/server/dist/core/adopt-scan-findings.js.map +1 -0
  76. package/server/dist/core/adopt-scan.d.ts +49 -0
  77. package/server/dist/core/adopt-scan.d.ts.map +1 -0
  78. package/server/dist/core/adopt-scan.js +201 -0
  79. package/server/dist/core/adopt-scan.js.map +1 -0
  80. package/server/dist/core/custom-profile-command-policy.d.ts +6 -0
  81. package/server/dist/core/custom-profile-command-policy.d.ts.map +1 -0
  82. package/server/dist/core/custom-profile-command-policy.js +110 -0
  83. package/server/dist/core/custom-profile-command-policy.js.map +1 -0
  84. package/server/dist/core/custom-profile-loader.d.ts +34 -0
  85. package/server/dist/core/custom-profile-loader.d.ts.map +1 -0
  86. package/server/dist/core/custom-profile-loader.js +225 -0
  87. package/server/dist/core/custom-profile-loader.js.map +1 -0
  88. package/server/dist/core/preview-child-lifecycle.d.ts +7 -2
  89. package/server/dist/core/preview-child-lifecycle.d.ts.map +1 -1
  90. package/server/dist/core/preview-child-lifecycle.js +17 -5
  91. package/server/dist/core/preview-child-lifecycle.js.map +1 -1
  92. package/server/dist/core/preview-session-manager.d.ts +1 -0
  93. package/server/dist/core/preview-session-manager.d.ts.map +1 -1
  94. package/server/dist/core/preview-session-manager.js +2 -2
  95. package/server/dist/core/preview-session-manager.js.map +1 -1
  96. package/server/dist/core/project-actions-loader.d.ts +13 -0
  97. package/server/dist/core/project-actions-loader.d.ts.map +1 -1
  98. package/server/dist/core/project-actions-loader.js +28 -6
  99. package/server/dist/core/project-actions-loader.js.map +1 -1
  100. package/server/dist/core/project-data-dir.d.ts +41 -0
  101. package/server/dist/core/project-data-dir.d.ts.map +1 -0
  102. package/server/dist/core/project-data-dir.js +64 -0
  103. package/server/dist/core/project-data-dir.js.map +1 -0
  104. package/server/dist/core/project-data-migrate.d.ts +14 -0
  105. package/server/dist/core/project-data-migrate.d.ts.map +1 -0
  106. package/server/dist/core/project-data-migrate.js +94 -0
  107. package/server/dist/core/project-data-migrate.js.map +1 -0
  108. package/server/dist/core/project-manager.d.ts.map +1 -1
  109. package/server/dist/core/project-manager.js +9 -10
  110. package/server/dist/core/project-manager.js.map +1 -1
  111. package/server/dist/core/session-file/access.d.ts +26 -0
  112. package/server/dist/core/session-file/access.d.ts.map +1 -0
  113. package/server/dist/core/session-file/access.js +143 -0
  114. package/server/dist/core/session-file/access.js.map +1 -0
  115. package/server/dist/core/session-file/asset-access.d.ts +15 -0
  116. package/server/dist/core/session-file/asset-access.d.ts.map +1 -0
  117. package/server/dist/core/session-file/asset-access.js +141 -0
  118. package/server/dist/core/session-file/asset-access.js.map +1 -0
  119. package/server/dist/core/session-file/evidence.d.ts +25 -0
  120. package/server/dist/core/session-file/evidence.d.ts.map +1 -0
  121. package/server/dist/core/session-file/evidence.js +201 -0
  122. package/server/dist/core/session-file/evidence.js.map +1 -0
  123. package/server/dist/core/session-file/probe.d.ts +16 -0
  124. package/server/dist/core/session-file/probe.d.ts.map +1 -0
  125. package/server/dist/core/session-file/probe.js +63 -0
  126. package/server/dist/core/session-file/probe.js.map +1 -0
  127. package/server/dist/core/session-file/safe-read.d.ts +33 -0
  128. package/server/dist/core/session-file/safe-read.d.ts.map +1 -0
  129. package/server/dist/core/session-file/safe-read.js +103 -0
  130. package/server/dist/core/session-file/safe-read.js.map +1 -0
  131. package/server/dist/core/session-file/sensitive.d.ts +5 -0
  132. package/server/dist/core/session-file/sensitive.d.ts.map +1 -0
  133. package/server/dist/core/session-file/sensitive.js +52 -0
  134. package/server/dist/core/session-file/sensitive.js.map +1 -0
  135. package/server/dist/core/session-info/collect.d.ts +70 -0
  136. package/server/dist/core/session-info/collect.d.ts.map +1 -0
  137. package/server/dist/core/session-info/collect.js +248 -0
  138. package/server/dist/core/session-info/collect.js.map +1 -0
  139. package/server/dist/core/session-info/line-scan.d.ts +20 -0
  140. package/server/dist/core/session-info/line-scan.d.ts.map +1 -0
  141. package/server/dist/core/session-info/line-scan.js +109 -0
  142. package/server/dist/core/session-info/line-scan.js.map +1 -0
  143. package/server/dist/core/session-info/remote-control.d.ts +9 -0
  144. package/server/dist/core/session-info/remote-control.d.ts.map +1 -0
  145. package/server/dist/core/session-info/remote-control.js +64 -0
  146. package/server/dist/core/session-info/remote-control.js.map +1 -0
  147. package/server/dist/core/session-info/session-info.d.ts +18 -0
  148. package/server/dist/core/session-info/session-info.d.ts.map +1 -0
  149. package/server/dist/core/session-info/session-info.js +170 -0
  150. package/server/dist/core/session-info/session-info.js.map +1 -0
  151. package/server/dist/core/session-info/small-file.d.ts +2 -0
  152. package/server/dist/core/session-info/small-file.d.ts.map +1 -0
  153. package/server/dist/core/session-info/small-file.js +42 -0
  154. package/server/dist/core/session-info/small-file.js.map +1 -0
  155. package/server/dist/core/session-info/subagent-transcript.d.ts +12 -0
  156. package/server/dist/core/session-info/subagent-transcript.d.ts.map +1 -0
  157. package/server/dist/core/session-info/subagent-transcript.js +78 -0
  158. package/server/dist/core/session-info/subagent-transcript.js.map +1 -0
  159. package/server/dist/core/session-info/subagents.d.ts +14 -0
  160. package/server/dist/core/session-info/subagents.d.ts.map +1 -0
  161. package/server/dist/core/session-info/subagents.js +92 -0
  162. package/server/dist/core/session-info/subagents.js.map +1 -0
  163. package/server/dist/core/session-info/test-fixtures.d.ts +50 -0
  164. package/server/dist/core/session-info/test-fixtures.d.ts.map +1 -0
  165. package/server/dist/core/session-info/test-fixtures.js +43 -0
  166. package/server/dist/core/session-info/test-fixtures.js.map +1 -0
  167. package/server/dist/core/session-info/types.d.ts +77 -0
  168. package/server/dist/core/session-info/types.d.ts.map +1 -0
  169. package/server/dist/core/session-info/types.js +14 -0
  170. package/server/dist/core/session-info/types.js.map +1 -0
  171. package/server/dist/core/stack-profiles-create.d.ts +31 -0
  172. package/server/dist/core/stack-profiles-create.d.ts.map +1 -0
  173. package/server/dist/core/stack-profiles-create.js +128 -0
  174. package/server/dist/core/stack-profiles-create.js.map +1 -0
  175. package/server/dist/core/stack-profiles.d.ts +49 -0
  176. package/server/dist/core/stack-profiles.d.ts.map +1 -0
  177. package/server/dist/core/stack-profiles.js +142 -0
  178. package/server/dist/core/stack-profiles.js.map +1 -0
  179. package/server/dist/external/_shared/helpers.d.ts +2 -0
  180. package/server/dist/external/_shared/helpers.d.ts.map +1 -1
  181. package/server/dist/external/_shared/helpers.js.map +1 -1
  182. package/server/dist/external/actions/get.d.ts +3 -1
  183. package/server/dist/external/actions/get.d.ts.map +1 -1
  184. package/server/dist/external/actions/get.js +15 -4
  185. package/server/dist/external/actions/get.js.map +1 -1
  186. package/server/dist/external/actions/routes.d.ts +3 -1
  187. package/server/dist/external/actions/routes.d.ts.map +1 -1
  188. package/server/dist/external/actions/routes.js.map +1 -1
  189. package/server/dist/external/actions/stub.d.ts.map +1 -1
  190. package/server/dist/external/actions/stub.js +15 -4
  191. package/server/dist/external/actions/stub.js.map +1 -1
  192. package/server/dist/external/actions/upload-delete.d.ts.map +1 -1
  193. package/server/dist/external/actions/upload-delete.js +30 -20
  194. package/server/dist/external/actions/upload-delete.js.map +1 -1
  195. package/server/dist/external/actions/upload.d.ts.map +1 -1
  196. package/server/dist/external/actions/upload.js +5 -4
  197. package/server/dist/external/actions/upload.js.map +1 -1
  198. package/server/dist/external/create-external-routes-args.d.ts +3 -1
  199. package/server/dist/external/create-external-routes-args.d.ts.map +1 -1
  200. package/server/dist/external/inbox/_phase-gate.d.ts +9 -0
  201. package/server/dist/external/inbox/_phase-gate.d.ts.map +1 -0
  202. package/server/dist/external/inbox/_phase-gate.js +87 -0
  203. package/server/dist/external/inbox/_phase-gate.js.map +1 -0
  204. package/server/dist/external/inbox/_types.d.ts +7 -0
  205. package/server/dist/external/inbox/_types.d.ts.map +1 -1
  206. package/server/dist/external/inbox/routes.d.ts.map +1 -1
  207. package/server/dist/external/inbox/routes.js +2 -0
  208. package/server/dist/external/inbox/routes.js.map +1 -1
  209. package/server/dist/external/launch/action-substitution-branch.js +2 -2
  210. package/server/dist/external/launch/action-substitution-branch.js.map +1 -1
  211. package/server/dist/external/mission-context/facts.js +2 -2
  212. package/server/dist/external/mission-context/facts.js.map +1 -1
  213. package/server/dist/external/preview/routes.d.ts +3 -1
  214. package/server/dist/external/preview/routes.d.ts.map +1 -1
  215. package/server/dist/external/preview/routes.js +8 -1
  216. package/server/dist/external/preview/routes.js.map +1 -1
  217. package/server/dist/external/routes.d.ts.map +1 -1
  218. package/server/dist/external/routes.js +2 -2
  219. package/server/dist/external/routes.js.map +1 -1
  220. package/server/dist/external/session-file/probe-route.d.ts +4 -0
  221. package/server/dist/external/session-file/probe-route.d.ts.map +1 -0
  222. package/server/dist/external/session-file/probe-route.js +66 -0
  223. package/server/dist/external/session-file/probe-route.js.map +1 -0
  224. package/server/dist/external/session-file/routes.d.ts +12 -0
  225. package/server/dist/external/session-file/routes.d.ts.map +1 -0
  226. package/server/dist/external/session-file/routes.js +90 -0
  227. package/server/dist/external/session-file/routes.js.map +1 -0
  228. package/server/dist/external/session-file/session-file.fixture.d.ts +45 -0
  229. package/server/dist/external/session-file/session-file.fixture.d.ts.map +1 -0
  230. package/server/dist/external/session-file/session-file.fixture.js +41 -0
  231. package/server/dist/external/session-file/session-file.fixture.js.map +1 -0
  232. package/server/dist/external/session-info/routes.d.ts +15 -0
  233. package/server/dist/external/session-info/routes.d.ts.map +1 -0
  234. package/server/dist/external/session-info/routes.js +57 -0
  235. package/server/dist/external/session-info/routes.js.map +1 -0
  236. package/server/dist/external/tasks/_phase-helpers.js +2 -2
  237. package/server/dist/external/tasks/_phase-helpers.js.map +1 -1
  238. package/server/dist/external/tasks/create.js +2 -2
  239. package/server/dist/external/tasks/create.js.map +1 -1
  240. package/server/dist/external-routes-wiring.d.ts.map +1 -1
  241. package/server/dist/external-routes-wiring.js +10 -1
  242. package/server/dist/external-routes-wiring.js.map +1 -1
  243. package/server/dist/index.d.ts.map +1 -1
  244. package/server/dist/index.js +6 -8
  245. package/server/dist/index.js.map +1 -1
  246. package/server/dist/routes/adopt-scan.d.ts +4 -0
  247. package/server/dist/routes/adopt-scan.d.ts.map +1 -0
  248. package/server/dist/routes/adopt-scan.js +27 -0
  249. package/server/dist/routes/adopt-scan.js.map +1 -0
  250. package/server/dist/routes/profiles.d.ts +7 -0
  251. package/server/dist/routes/profiles.d.ts.map +1 -1
  252. package/server/dist/routes/profiles.js +13 -0
  253. package/server/dist/routes/profiles.js.map +1 -1
  254. package/server/dist/routes/projects.d.ts.map +1 -1
  255. package/server/dist/routes/projects.js +58 -16
  256. package/server/dist/routes/projects.js.map +1 -1
  257. package/server/dist/routes/stack-profiles.d.ts +10 -0
  258. package/server/dist/routes/stack-profiles.d.ts.map +1 -0
  259. package/server/dist/routes/stack-profiles.js +65 -0
  260. package/server/dist/routes/stack-profiles.js.map +1 -0
  261. package/server/dist/terminal/data-target.d.ts +17 -0
  262. package/server/dist/terminal/data-target.d.ts.map +1 -0
  263. package/server/dist/terminal/data-target.js +56 -0
  264. package/server/dist/terminal/data-target.js.map +1 -0
  265. package/server/dist/terminal/image-paste.d.ts +2 -0
  266. package/server/dist/terminal/image-paste.d.ts.map +1 -1
  267. package/server/dist/terminal/image-paste.js +11 -12
  268. package/server/dist/terminal/image-paste.js.map +1 -1
  269. package/server/dist/terminal/routes.d.ts +5 -0
  270. package/server/dist/terminal/routes.d.ts.map +1 -1
  271. package/server/dist/terminal/routes.js +11 -13
  272. package/server/dist/terminal/routes.js.map +1 -1
  273. package/server/dist/types/project.d.ts +9 -0
  274. package/server/dist/types/project.d.ts.map +1 -1
  275. package/server/dist/types/stack-profile-contract.d.ts +33 -0
  276. package/server/dist/types/stack-profile-contract.d.ts.map +1 -0
  277. package/server/dist/types/stack-profile-contract.js +11 -0
  278. package/server/dist/types/stack-profile-contract.js.map +1 -0
  279. package/server/package.json +3 -3
  280. package/client/dist/assets/arc-DoZTTE1N.js +0 -1
  281. package/client/dist/assets/architectureDiagram-ZJ3FMSHR-DFTG4KtO.js +0 -36
  282. package/client/dist/assets/blockDiagram-677ZJIJ3-C34UBjOB.js +0 -132
  283. package/client/dist/assets/c4Diagram-LMCZKHZV-CbqAB1Ou.js +0 -10
  284. package/client/dist/assets/channel-DBcZw7Kn.js +0 -1
  285. package/client/dist/assets/chunk-RYQCIY6F-DrWMx37d.js +0 -1
  286. package/client/dist/assets/chunk-VR4S4FIN-B5eWtesm.js +0 -1
  287. package/client/dist/assets/classDiagram-OUVF2IWQ-C3Q1V9DU.js +0 -1
  288. package/client/dist/assets/classDiagram-v2-EOCWNBFH-C3Q1V9DU.js +0 -1
  289. package/client/dist/assets/dagre-VKFMJZFB-VXOY6IHR.js +0 -4
  290. package/client/dist/assets/diagram-OA4YK3LP-DRHY5d_c.js +0 -30
  291. package/client/dist/assets/diagram-WEI45ONY-B87OYR_S.js +0 -41
  292. package/client/dist/assets/erDiagram-Q63AITRT-DaD7oa9H.js +0 -85
  293. package/client/dist/assets/flowDiagram-23GEKE2U-GrMVpsea.js +0 -156
  294. package/client/dist/assets/graph-C9eacEi8.js +0 -1
  295. package/client/dist/assets/index-CIpLt0ie.js +0 -863
  296. package/client/dist/assets/index-DGtnTeFd.css +0 -1
  297. package/client/dist/assets/infoDiagram-FWYZ7A6U-Fi8fQ95G.js +0 -2
  298. package/client/dist/assets/katex-DkKDou_j.js +0 -257
  299. package/client/dist/assets/layout-DEXfKzaS.js +0 -1
  300. package/client/dist/assets/map-Czzmt4hB.js +0 -1
  301. package/client/dist/assets/mermaid.core-D6w9zlA0.js +0 -314
  302. package/client/dist/assets/stateDiagram-2N3HPSRC-D3GXIouX.js +0 -1
  303. package/client/dist/assets/stateDiagram-v2-6OUMAXLB-D3lXe_mJ.js +0 -1
  304. package/client/dist/assets/swimlanes-5IMT3BWC-PMRQzNhU.js +0 -2
  305. package/client/dist/assets/swimlanesDiagram-G3AALYLV-DMLbRFiO.js +0 -8
  306. package/client/dist/assets/xychartDiagram-FW5EYKEG-BEtPvBSU.js +0 -7
@@ -0,0 +1,312 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-CZoZ7r-1.js","assets/index-DwRlIUrK.js","assets/index-DWrPE3aq.css","assets/dagre-GXQ25YYZ-QY0m5eSL.js","assets/layout-CR8gdfo4.js","assets/swimlanes-42K2YHIH-DN4MssUX.js","assets/cose-bilkent-JH36ORCC-DISm8_p0.js","assets/cytoscape.esm-DTSO7Bv0.js","assets/c4Diagram-7LVT6UL2-sJULbaUv.js","assets/chunk-F27PBJKO-B8V1zhCX.js","assets/flowDiagram-HODETNUW-D7fXEPrM.js","assets/chunk-5VM5RSS4-DxiKB3qZ.js","assets/chunk-XXDRQBXY-DrIyrBs1.js","assets/chunk-POPQ4Y6H-I1x_vfH3.js","assets/channel-CLBQbfQb.js","assets/swimlanesDiagram-VR7AAH4N-DFxrYFKF.js","assets/erDiagram-RLTQ6QDP-BhBsYQ7c.js","assets/gitGraphDiagram-WWUBYQGX-C3_ixsOl.js","assets/chunk-2Q5K7J3B-CPeH4xHb.js","assets/chunk-JWPE2WC7-BaQYKssR.js","assets/cynefin-OW5HDTMX-wyDjqucU.js","assets/ganttDiagram-EL5Y4UJY-Bwf8EtWr.js","assets/linear-CfLRjQgX.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-27XIBGKW-BpcHmgOL.js","assets/pieDiagram-E7YTZNPT-BiSkIsrz.js","assets/arc-o82bcJs8.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-CJetqQxd.js","assets/xychartDiagram-S5SC5T6Z-Bx83X515.js","assets/requirementDiagram-BXWQKSXE-meFCoLtR.js","assets/sequenceDiagram-WJ2MYXX4-BdVzFsCC.js","assets/classDiagram-ZZMXUADV-D8z-o3xu.js","assets/chunk-TICWLB2K--9ywNq1F.js","assets/classDiagram-v2-VYDZK3BY-D8z-o3xu.js","assets/stateDiagram-D77RDMKH-Cmc-iYtm.js","assets/chunk-IMKFNOWR-BtXet829.js","assets/stateDiagram-v2-MP3YSRHH-Cj-hQ4qB.js","assets/journeyDiagram-3NMN7TZE-CT1CrVQO.js","assets/timeline-definition-24CTP7MA-pxxqlxwt.js","assets/mindmap-definition-YA3MSWOX-Brc-v1M4.js","assets/kanban-definition-UXKFOSKX-N1CNMAOm.js","assets/sankeyDiagram-P5KCCOFB-BR9eN4Do.js","assets/diagram-Z3DM3KII-DQGRD9gQ.js","assets/diagram-UQ7AKVKN-D-3R3axg.js","assets/blockDiagram-I7D4REHJ-DtWpTjgT.js","assets/diagram-S7CK7UJ4-DhjaAe2g.js","assets/architectureDiagram-5GKGNRK7-CaeUIM7e.js","assets/diagram-VSXAHHWV-BxXEtjRu.js","assets/ishikawaDiagram-5VMMS53U-DzSGmhT5.js","assets/vennDiagram-4TSXK5OY-DiItNcze.js","assets/diagram-VX7I27RA-DkbXkJpd.js","assets/wardleyDiagram-VM6X3IG4-Dfvub75z.js","assets/cynefinDiagram-5FMLGOSQ-CN-IKDQ6.js","assets/railroadDiagram-O6MQD6OU-DTTtZpGO.js","assets/chunk-SVP7TREG-Bvt8jrSp.js","assets/ebnfDiagram-PWID7BFC-C_XxskCm.js","assets/abnfDiagram-VCTEODGH-BGxuVEiU.js","assets/pegDiagram-XKGWAZYB-D8jUV01U.js"])))=>i.map(i=>d[i]);
2
+ var zx=Object.defineProperty;var Wx=(e,t,r)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Kt=(e,t,r)=>Wx(e,typeof t!="symbol"?t+"":t,r);import{g as Gl,_ as Rt}from"./index-DwRlIUrK.js";var Ff=Object.defineProperty,p=(e,t)=>Ff(e,"name",{value:t,configurable:!0}),Hx=(e,t)=>{for(var r in t)Ff(e,r,{get:t[r],enumerable:!0})},Mo={exports:{}},Yx=Mo.exports,Rc;function Ux(){return Rc||(Rc=1,(function(e,t){(function(r,i){e.exports=i()})(Yx,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",m="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,k={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($){var O=["th","st","nd","rd"],B=$%100;return"["+$+(O[(B-20)%10]||O[B]||O[0])+"]"}},w=function($,O,B){var I=String($);return!I||I.length>=O?$:""+Array(O+1-I.length).join(B)+$},S={s:w,z:function($){var O=-$.utcOffset(),B=Math.abs(O),I=Math.floor(B/60),P=B%60;return(O<=0?"+":"-")+w(I,2,"0")+":"+w(P,2,"0")},m:function $(O,B){if(O.date()<B.date())return-$(B,O);var I=12*(B.year()-O.year())+(B.month()-O.month()),P=O.clone().add(I,u),H=B-P<0,K=O.clone().add(I+(H?-1:1),u);return+(-(I+(B-P)/(H?P-K:K-P))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:u,y:f,w:h,d:c,D:m,h:l,m:n,s:a,ms:o,Q:d}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},v="en",F={};F[v]=k;var L="$isDayjsObject",A=function($){return $ instanceof at||!(!$||!$[L])},V=function $(O,B,I){var P;if(!O)return v;if(typeof O=="string"){var H=O.toLowerCase();F[H]&&(P=H),B&&(F[H]=B,P=H);var K=O.split("-");if(!P&&K.length>1)return $(K[0])}else{var ct=O.name;F[ct]=O,P=ct}return!I&&P&&(v=P),P||!I&&v},W=function($,O){if(A($))return $.clone();var B=typeof O=="object"?O:{};return B.date=$,B.args=arguments,new at(B)},N=S;N.l=V,N.i=A,N.w=function($,O){return W($,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var at=(function(){function $(B){this.$L=V(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[L]=!0}var O=$.prototype;return O.parse=function(B){this.$d=(function(I){var P=I.date,H=I.utc;if(P===null)return new Date(NaN);if(N.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var K=P.match(C);if(K){var ct=K[2]-1||0,dt=(K[7]||"0").substring(0,3);return H?new Date(Date.UTC(K[1],ct,K[3]||1,K[4]||0,K[5]||0,K[6]||0,dt)):new Date(K[1],ct,K[3]||1,K[4]||0,K[5]||0,K[6]||0,dt)}}return new Date(P)})(B),this.init()},O.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},O.$utils=function(){return N},O.isValid=function(){return this.$d.toString()!==y},O.isSame=function(B,I){var P=W(B);return this.startOf(I)<=P&&P<=this.endOf(I)},O.isAfter=function(B,I){return W(B)<this.startOf(I)},O.isBefore=function(B,I){return this.endOf(I)<W(B)},O.$g=function(B,I,P){return N.u(B)?this[I]:this.set(P,B)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(B,I){var P=this,H=!!N.u(I)||I,K=N.p(B),ct=function(Ft,lt){var yt=N.w(P.$u?Date.UTC(P.$y,lt,Ft):new Date(P.$y,lt,Ft),P);return H?yt:yt.endOf(c)},dt=function(Ft,lt){return N.w(P.toDate()[Ft].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(lt)),P)},kt=this.$W,_t=this.$M,wt=this.$D,ft="set"+(this.$u?"UTC":"");switch(K){case f:return H?ct(1,0):ct(31,11);case u:return H?ct(1,_t):ct(0,_t+1);case h:var At=this.$locale().weekStart||0,qt=(kt<At?kt+7:kt)-At;return ct(H?wt-qt:wt+(6-qt),_t);case c:case m:return dt(ft+"Hours",0);case l:return dt(ft+"Minutes",1);case n:return dt(ft+"Seconds",2);case a:return dt(ft+"Milliseconds",3);default:return this.clone()}},O.endOf=function(B){return this.startOf(B,!1)},O.$set=function(B,I){var P,H=N.p(B),K="set"+(this.$u?"UTC":""),ct=(P={},P[c]=K+"Date",P[m]=K+"Date",P[u]=K+"Month",P[f]=K+"FullYear",P[l]=K+"Hours",P[n]=K+"Minutes",P[a]=K+"Seconds",P[o]=K+"Milliseconds",P)[H],dt=H===c?this.$D+(I-this.$W):I;if(H===u||H===f){var kt=this.clone().set(m,1);kt.$d[ct](dt),kt.init(),this.$d=kt.set(m,Math.min(this.$D,kt.daysInMonth())).$d}else ct&&this.$d[ct](dt);return this.init(),this},O.set=function(B,I){return this.clone().$set(B,I)},O.get=function(B){return this[N.p(B)]()},O.add=function(B,I){var P,H=this;B=Number(B);var K=N.p(I),ct=function(_t){var wt=W(H);return N.w(wt.date(wt.date()+Math.round(_t*B)),H)};if(K===u)return this.set(u,this.$M+B);if(K===f)return this.set(f,this.$y+B);if(K===c)return ct(1);if(K===h)return ct(7);var dt=(P={},P[n]=i,P[l]=s,P[a]=r,P)[K]||1,kt=this.$d.getTime()+B*dt;return N.w(kt,this)},O.subtract=function(B,I){return this.add(-1*B,I)},O.format=function(B){var I=this,P=this.$locale();if(!this.isValid())return P.invalidDate||y;var H=B||"YYYY-MM-DDTHH:mm:ssZ",K=N.z(this),ct=this.$H,dt=this.$m,kt=this.$M,_t=P.weekdays,wt=P.months,ft=P.meridiem,At=function(lt,yt,Et,Nt){return lt&&(lt[yt]||lt(I,H))||Et[yt].slice(0,Nt)},qt=function(lt){return N.s(ct%12||12,lt,"0")},Ft=ft||function(lt,yt,Et){var Nt=lt<12?"AM":"PM";return Et?Nt.toLowerCase():Nt};return H.replace(x,(function(lt,yt){return yt||(function(Et){switch(Et){case"YY":return String(I.$y).slice(-2);case"YYYY":return N.s(I.$y,4,"0");case"M":return kt+1;case"MM":return N.s(kt+1,2,"0");case"MMM":return At(P.monthsShort,kt,wt,3);case"MMMM":return At(wt,kt);case"D":return I.$D;case"DD":return N.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return At(P.weekdaysMin,I.$W,_t,2);case"ddd":return At(P.weekdaysShort,I.$W,_t,3);case"dddd":return _t[I.$W];case"H":return String(ct);case"HH":return N.s(ct,2,"0");case"h":return qt(1);case"hh":return qt(2);case"a":return Ft(ct,dt,!0);case"A":return Ft(ct,dt,!1);case"m":return String(dt);case"mm":return N.s(dt,2,"0");case"s":return String(I.$s);case"ss":return N.s(I.$s,2,"0");case"SSS":return N.s(I.$ms,3,"0");case"Z":return K}return null})(lt)||K.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(B,I,P){var H,K=this,ct=N.p(I),dt=W(B),kt=(dt.utcOffset()-this.utcOffset())*i,_t=this-dt,wt=function(){return N.m(K,dt)};switch(ct){case f:H=wt()/12;break;case u:H=wt();break;case d:H=wt()/3;break;case h:H=(_t-kt)/6048e5;break;case c:H=(_t-kt)/864e5;break;case l:H=_t/s;break;case n:H=_t/i;break;case a:H=_t/r;break;default:H=_t}return P?H:N.a(H)},O.daysInMonth=function(){return this.endOf(u).$D},O.$locale=function(){return F[this.$L]},O.locale=function(B,I){if(!B)return this.$L;var P=this.clone(),H=V(B,I,!0);return H&&(P.$L=H),P},O.clone=function(){return N.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},$})(),Y=at.prototype;return W.prototype=Y,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",u],["$y",f],["$D",m]].forEach((function($){Y[$[1]]=function(O){return this.$g(O,$[0],$[1])}})),W.extend=function($,O){return $.$i||($(O,at,W),$.$i=!0),W},W.locale=V,W.isDayjs=A,W.unix=function($){return W(1e3*$)},W.en=F[v],W.Ls=F,W.p={},W}))})(Mo)),Mo.exports}var jx=Ux();const Gx=Gl(jx);var xr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Xl=p(function(e="fatal"){let t=xr.fatal;typeof e=="string"?e.toLowerCase()in xr&&(t=xr[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=xr.fatal&&(q.fatal=console.error?console.error.bind(console,Ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ne("FATAL"))),t<=xr.error&&(q.error=console.error?console.error.bind(console,Ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ne("ERROR"))),t<=xr.warn&&(q.warn=console.warn?console.warn.bind(console,Ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ne("WARN"))),t<=xr.info&&(q.info=console.info?console.info.bind(console,Ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ne("INFO"))),t<=xr.debug&&(q.debug=console.debug?console.debug.bind(console,Ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ne("DEBUG"))),t<=xr.trace&&(q.trace=console.debug?console.debug.bind(console,Ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ne("TRACE")))},"setLogLevel"),Ne=p(e=>`%c${Gx().format("ss.SSS")} : ${e} : `,"format");const $o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r: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,o=2*r-s;switch(i){case"r":return $o.hue2rgb(o,s,e+1/3)*255;case"g":return $o.hue2rgb(o,s,e)*255;case"b":return $o.hue2rgb(o,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),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);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}}},Xx={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},Vx={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Dt={channel:$o,lang:Xx,unit:Vx},qr={};for(let e=0;e<=255;e++)qr[e]=Dt.unit.dec2hex(e);const Ce={ALL:0,RGB:1,HSL:2};let Zx=class{constructor(){this.type=Ce.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=Ce.ALL}is(t){return this.type===t}};class Kx{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Zx}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ce.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Dt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Dt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Dt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Dt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Dt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Dt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ce.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ce.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ce.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ce.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ce.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ce.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const xa=new Kx({r:0,g:0,b:0,a:0},"transparent"),Mi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Mi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return xa.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${qr[Math.round(t)]}${qr[Math.round(r)]}${qr[Math.round(i)]}${qr[Math.round(s*255)]}`:`#${qr[Math.round(t)]}${qr[Math.round(r)]}${qr[Math.round(i)]}`}},ei={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(ei.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ei.re);if(!r)return;const[,i,s,o,a,n]=r;return xa.set({h:ei._hue2deg(i),s:Dt.channel.clamp.s(parseFloat(s)),l:Dt.channel.clamp.l(parseFloat(o)),a:a?Dt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%, ${s})`:`hsl(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%)`}},Ps={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=Ps.colors[e];if(t)return Mi.parse(t)},stringify:e=>{const t=Mi.stringify(e);for(const r in Ps.colors)if(Ps.colors[r]===t)return r}},Bs={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(Bs.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return xa.set({r:Dt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Dt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:Dt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Dt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`:`rgb(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)})`}},lr={format:{keyword:Ps,hex:Mi,rgb:Bs,rgba:Bs,hsl:ei,hsla:ei},parse:e=>{if(typeof e!="string")return e;const t=Mi.parse(e)||Bs.parse(e)||ei.parse(e)||Ps.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ce.HSL)||e.data.r===void 0?ei.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Bs.stringify(e):Mi.stringify(e)},Af=(e,t)=>{const r=lr.parse(e);for(const i in t)r[i]=Dt.channel.clamp[i](t[i]);return lr.stringify(r)},Yr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Af(e,{a:t});const s=xa.set({r:Dt.channel.clamp.r(e),g:Dt.channel.clamp.g(t),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(i)});return lr.stringify(s)},Qx=e=>{const{r:t,g:r,b:i}=lr.parse(e),s=.2126*Dt.channel.toLinear(t)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(i);return Dt.lang.round(s)},Jx=e=>Qx(e)>=.5,Ze=e=>!Jx(e),Ef=(e,t,r)=>{const i=lr.parse(e),s=i[t],o=Dt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),lr.stringify(i)},U=(e,t)=>Ef(e,"l",t),j=(e,t)=>Ef(e,"l",-t),b=(e,t)=>{const r=lr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Af(e,i)},tC=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=lr.parse(e),{r:n,g:l,b:c,a:h}=lr.parse(t),u=r/100,d=u*2-1,f=a-h,y=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,C=1-y,x=i*y+n*C,k=s*y+l*C,w=o*y+c*C,S=a*u+h*(1-u);return Yr(x,k,w,S)},M=(e,t=100)=>{const r=lr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,tC(r,e,t)};/*! @license DOMPurify 3.4.17 | (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.17/LICENSE */function Nc(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 eC(e){if(Array.isArray(e))return e}function rC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,a,n=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return n}}function iC(){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.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function sC(e,t){return eC(e)||rC(e,t)||oC(e,t)||iC()}function oC(e,t){if(e){if(typeof e=="string")return Nc(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)?Nc(e,t):void 0}}const Mf=Object.entries,qc=Object.setPrototypeOf,aC=Object.isFrozen,$f=Object.getPrototypeOf,Of=Object.getOwnPropertyDescriptor;let de=Object.freeze,ye=Object.seal,Bi=Object.create,Df=typeof Reflect<"u"&&Reflect,il=Df.apply,sl=Df.construct;de||(de=function(t){return t});ye||(ye=function(t){return t});il||(il=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});sl||(sl=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 Cr=ee(Array.prototype.forEach),nC=ee(Array.prototype.lastIndexOf),zc=ee(Array.prototype.pop),gs=ee(Array.prototype.push),lC=ee(Array.prototype.slice),hC=ee(Array.prototype.splice),$i=Array.isArray,sn=If(Set),on=ee(Set.prototype.add),ms=ee(Set.prototype.has),Qr=ee(String.prototype.toLowerCase),an=ee(String.prototype.toString),Wc=ee(String.prototype.match),ys=ee(String.prototype.replace),Hc=ee(String.prototype.indexOf),cC=ee(String.prototype.trim),uC=ee(Number.prototype.toString),dC=ee(Boolean.prototype.toString),Yc=typeof BigInt>"u"?null:ee(BigInt.prototype.toString),Uc=typeof Symbol>"u"?null:ee(Symbol.prototype.toString),Ae=ee(Object.prototype.hasOwnProperty),xs=ee(Object.prototype.toString),ge=ee(RegExp.prototype.test),br=If(TypeError);function ee(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 il(e,t,i)}}function If(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return sl(e,r)}}function jt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qr;if(qc&&qc(e,null),!$i(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(aC(t)||(t[i]=o),s=o)}e[s]=!0}return e}function fC(e){for(let t=0;t<e.length;t++)Ae(e,t)||(e[t]=null);return e}function De(e){const t=Bi(null);for(const i of Mf(e)){var r=sC(i,2);const s=r[0],o=r[1];Ae(e,s)&&($i(o)?t[s]=fC(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=De(o):t[s]=o)}return t}function pC(e){switch(typeof e){case"string":return e;case"number":return uC(e);case"boolean":return dC(e);case"bigint":return Yc?Yc(e):"0";case"symbol":return Uc?Uc(e):"Symbol()";case"undefined":return xs(e);case"function":case"object":{if(e===null)return xs(e);const t=e,r=qe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:xs(i)}return xs(e)}default:return xs(e)}}function qe(e,t){for(;e!==null;){const i=Of(e,t);if(i){if(i.get)return ee(i.get);if(typeof i.value=="function")return ee(i.value)}e=$f(e)}function r(){return null}return r}function gC(e,t){for(;e!==null;){const r=Of(e,t);if(r)return r.get?ee(r.get):null;e=$f(e)}return null}function mC(e){try{return ge(e,""),!0}catch{return!1}}const jc=de(["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"]),nn=de(["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"]),ln=de(["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"]),yC=de(["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"]),hn=de(["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"]),xC=de(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gc=de(["#text"]),Xc=de(["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"]),cn=de(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),Vc=de(["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"]),mo=de(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),CC=ye(/{{[\w\W]*|^[\w\W]*}}/g),bC=ye(/<%[\w\W]*|^[\w\W]*%>/g),kC=ye(/\${[\w\W]*/g),wC=ye(/^data-[\-\w.\u00B7-\uFFFF]+$/),TC=ye(/^aria-[\-\w]+$/),Zc=ye(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_C=ye(/^(?:\w+script|data):/i),SC=ye(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vC=ye(/^html$/i),BC=ye(/^[a-z][.\w]*(-[.\w]+)+$/i),un=ye(/<[/\w!]/g),Kc=ye(/<[/\w]/g),LC=ye(/<\/no(script|embed|frames)/i),Qc=ye(/\/>/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},FC=de(jt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),AC=function(){return typeof window>"u"?null:window},EC=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 o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Jc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Rr=function(t,r,i,s){return Ae(t,r)&&$i(t[r])?jt(s.base?De(s.base):{},t[r],s.transform):i},dn=function(t,r,i){const s=Ae(t,r)?t[r]:void 0;return s&&typeof s=="object"?De(s):i()};function Pf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:AC();const t=st=>Pf(st);if(t.version="3.4.17",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 o=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,h=e.trustedTypes,u=n.prototype,d=qe(u,"cloneNode"),f=qe(u,"remove"),m=qe(u,"removeAttributeNode"),y=qe(u,"nextSibling"),C=qe(u,"childNodes"),x=qe(u,"parentNode"),k=qe(u,"shadowRoot"),w=qe(u,"attributes"),S=a&&a.prototype?qe(a.prototype,"nodeType"):null,v=a&&a.prototype?qe(a.prototype,"nodeName"):null,F=a&&a.prototype?qe(a.prototype,"ownerDocument"):null,L=function(_){return S?S(_):_.nodeType},A=function(_){return v?v(_):_.nodeName},V=gC(u,"namespaceURI"),W=function(_){return V?V(_):_.namespaceURI};if(typeof o=="function"){const st=r.createElement("template");st.content&&st.content.ownerDocument&&(r=st.content.ownerDocument)}let N,at="",Y,$=!1,O=0;const B=function(){if(O>0)throw br('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.')},I=function(_){B(),O++;try{return N.createHTML(_)}finally{O--}},P=function(_){B(),O++;try{return N.createScriptURL(_)}finally{O--}},H=function(){return $||(Y=EC(h,s),$=!0),Y},K=r,ct=K.implementation,dt=K.createNodeIterator,kt=K.createDocumentFragment,_t=K.getElementsByTagName,wt=i.importNode;let ft=Jc();t.isSupported=typeof Mf=="function"&&typeof x=="function"&&ct&&ct.createHTMLDocument!==void 0;const At=CC,qt=bC,Ft=kC,lt=wC,yt=TC,Et=_C,Nt=SC,Xt=BC;let z=Zc,gt=null;const _e=jt({},[...jc,...nn,...ln,...hn,...Gc]);let Ht=null;const gr=jt({},[...Xc,...cn,...Vc,...mo]);let fe=Object.seal(Bi(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}})),Re=null,Mr=null;const oe=Object.seal(Bi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $r=!0,Je=!0,mr=!1,yr=!0,g=!1,D=!0,X=!1,Q=!1,G=null,nt=null,T=!1,R=!1,rt=!1,Z=!1,J=!0,ot=!1;const it="user-content-";let xt=!0,ut=!1,Tt=null,St={},Pt=null;const Zt=jt({},["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 us=null;const Or=jt({},["audio","video","img","source","image","track"]);let Dr=null;const kc=jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),co="http://www.w3.org/1998/Math/MathML",uo="http://www.w3.org/2000/svg",tr="http://www.w3.org/1999/xhtml";let xi=tr,Ha=!1,Ya=null;const kx=jt({},[co,uo,tr],an),wc=de(["mi","mo","mn","ms","mtext"]);let Ua=jt({},wc);const Tc=de(["annotation-xml"]);let ja=jt({},Tc);const wx=jt({},["title","style","font","a","script"]);let ds=null;const Tx=["application/xhtml+xml","text/html"],_x="text/html";let ie=null,Ci=null;const Sx=r.createElement("form"),_c=function(_){return _ instanceof RegExp||_ instanceof Function},Ga=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ci&&Ci===_)return;(!_||typeof _!="object")&&(_={}),_=De(_),ds=Tx.indexOf(_.PARSER_MEDIA_TYPE)===-1?_x:_.PARSER_MEDIA_TYPE,ie=ds==="application/xhtml+xml"?an:Qr,gt=Rr(_,"ALLOWED_TAGS",_e,{transform:ie}),Ht=Rr(_,"ALLOWED_ATTR",gr,{transform:ie}),Ya=Rr(_,"ALLOWED_NAMESPACES",kx,{transform:an}),Dr=Rr(_,"ADD_URI_SAFE_ATTR",kc,{transform:ie,base:kc}),us=Rr(_,"ADD_DATA_URI_TAGS",Or,{transform:ie,base:Or}),Pt=Rr(_,"FORBID_CONTENTS",Zt,{transform:ie}),Re=Rr(_,"FORBID_TAGS",De({}),{transform:ie}),Mr=Rr(_,"FORBID_ATTR",De({}),{transform:ie}),St=Ae(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?De(_.USE_PROFILES):_.USE_PROFILES:!1,$r=_.ALLOW_ARIA_ATTR!==!1,Je=_.ALLOW_DATA_ATTR!==!1,mr=_.ALLOW_UNKNOWN_PROTOCOLS||!1,yr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,g=_.SAFE_FOR_TEMPLATES||!1,D=_.SAFE_FOR_XML!==!1,X=_.WHOLE_DOCUMENT||!1,R=_.RETURN_DOM||!1,rt=_.RETURN_DOM_FRAGMENT||!1,Z=_.RETURN_TRUSTED_TYPE||!1,T=_.FORCE_BODY||!1,J=_.SANITIZE_DOM!==!1,ot=_.SANITIZE_NAMED_PROPS||!1,xt=_.KEEP_CONTENT!==!1,ut=_.IN_PLACE||!1,z=mC(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:Zc,xi=typeof _.NAMESPACE=="string"?_.NAMESPACE:tr,Ua=dn(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>jt({},wc)),ja=dn(_,"HTML_INTEGRATION_POINTS",()=>jt({},Tc));const E=dn(_,"CUSTOM_ELEMENT_HANDLING",()=>Bi(null));if(fe=Bi(null),Ae(E,"tagNameCheck")&&_c(E.tagNameCheck)&&(fe.tagNameCheck=E.tagNameCheck),Ae(E,"attributeNameCheck")&&_c(E.attributeNameCheck)&&(fe.attributeNameCheck=E.attributeNameCheck),Ae(E,"allowCustomizedBuiltInElements")&&typeof E.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=E.allowCustomizedBuiltInElements),ye(fe),g&&(Je=!1),rt&&(R=!0),St&&(gt=jt({},Gc),Ht=Bi(null),St.html===!0&&(jt(gt,jc),jt(Ht,Xc)),St.svg===!0&&(jt(gt,nn),jt(Ht,cn),jt(Ht,mo)),St.svgFilters===!0&&(jt(gt,ln),jt(Ht,cn),jt(Ht,mo)),St.mathMl===!0&&(jt(gt,hn),jt(Ht,Vc),jt(Ht,mo))),oe.tagCheck=null,oe.attributeCheck=null,Ae(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?oe.tagCheck=_.ADD_TAGS:$i(_.ADD_TAGS)&&(gt===_e&&(gt=De(gt)),jt(gt,_.ADD_TAGS,ie))),Ae(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?oe.attributeCheck=_.ADD_ATTR:$i(_.ADD_ATTR)&&(Ht===gr&&(Ht=De(Ht)),jt(Ht,_.ADD_ATTR,ie))),Ae(_,"ADD_FORBID_CONTENTS")&&$i(_.ADD_FORBID_CONTENTS)&&(Pt===Zt&&(Pt=De(Pt)),jt(Pt,_.ADD_FORBID_CONTENTS,ie)),xt&&(gt["#text"]=!0),X&&jt(gt,["html","head","body"]),gt.table&&(jt(gt,["tbody"]),delete Re.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw br('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw br('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const tt=N;N=_.TRUSTED_TYPES_POLICY;try{at=I("")}catch(et){throw N=tt,et}}else _.TRUSTED_TYPES_POLICY===null?(N=void 0,at=""):(N===void 0&&(N=H()),N&&typeof at=="string"&&(at=I("")));de&&de(_),Ci=_},Sc=jt({},[...nn,...ln,...yC]),vc=jt({},[...hn,...xC]),vx=function(_,E,tt){return E.namespaceURI===tr?_==="svg":E.namespaceURI===co?_==="svg"&&(tt==="annotation-xml"||Ua[tt]):!!Sc[_]},Bx=function(_,E,tt){return E.namespaceURI===tr?_==="math":E.namespaceURI===uo?_==="math"&&ja[tt]:!!vc[_]},Lx=function(_,E,tt){return E.namespaceURI===uo&&!ja[tt]||E.namespaceURI===co&&!Ua[tt]?!1:!vc[_]&&(wx[_]||!Sc[_])},Fx=function(_){const E=W(_),tt=Qr(A(_)),et=x(_);let Lt,Ot;return et&&L(et)===ae.element?(Lt={namespaceURI:W(et)},Ot=Qr(A(et))):(Lt={namespaceURI:xi},Ot="template"),Ya[E]?E===uo?vx(tt,Lt,Ot):E===co?Bx(tt,Lt,Ot):E===tr?Lx(tt,Lt,Ot):!!(ds==="application/xhtml+xml"&&Ya[E]):!1},Ir=function(_){gs(t.removed,{element:_});try{x(_).removeChild(_)}catch{if(f(_),!x(_))throw br("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Bc=function(_,E,tt){try{m(_,E)}catch{try{_.removeAttribute(tt)}catch{}}},Xa=function(_){Za(_);const E=C(_);E&&Cr(lC(E),et=>{try{f(et)}catch{}});const tt=L(_)===ae.element?w(_):null;if(tt)for(let et=tt.length-1;et>=0;--et){const Lt=tt[et],Ot=Lt&&Lt.name;typeof Ot=="string"&&Bc(_,Lt,Ot)}},bi=function(_,E,tt){if(!tt)try{tt=E.getAttributeNode(_)}catch{tt=null}gs(t.removed,{attribute:tt||null,from:E});try{tt?m(E,tt):E.removeAttribute(_)}catch{try{E.removeAttribute(_)}catch{}}if(_==="is")if(R||rt)try{Ir(E)}catch{}else try{E.setAttribute(_,"")}catch{}},Lc=function(_){const E=w(_);if(E)for(let tt=E.length-1;tt>=0;--tt){const et=E[tt],Lt=et&&et.name;typeof Lt!="string"||Ht[ie(Lt)]||Bc(_,et,Lt)}},Va=function(_,E){let tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const et=[_];for(;et.length>0;){const Lt=et.pop();if(E(Lt)===!1)continue;if(tt&&L(Lt)===ae.element){const zt=k(Lt);Pr(zt)&&et.push(zt)}const Ot=C(Lt);if(Ot)for(let zt=Ot.length-1;zt>=0;--zt)et.push(Ot[zt])}},Za=function(_){Va(_,E=>{L(E)===ae.element&&Lc(E)})},Ka=function(_){const E=[];return Va(_,tt=>{E.push(tt)},!0),E},Ax=function(_,E){const tt=sn();Cr(Ka(_),et=>{L(et)===ae.element&&on(tt,et)}),Cr(E,et=>{L(et)===ae.element&&!ms(tt,et)&&Lc(et)})},Fc=function(_,E){let tt=!1;return Cr(t.removed,et=>{et.element&&(tt=tt||et.element===_,Za(et.element))}),Ax(_,E),tt},Ex=8,Mx=function(_,E){const tt=Tt;let et=null;const Lt=()=>(et||(et=sn(),Cr(E,Ot=>{on(et,Ot)})),et);for(let Ot=0;;Ot++){const zt=Ka(_),he=[_];let er=!1;if(Cr(zt,Se=>{L(Se)===ae.documentFragment?gs(he,Se):!er&&!ms(tt,Se)&&(er=ms(Lt(),Se))}),!er)return;if(Ot>=Ex)throw br("the tree kept changing during in-place sanitization; refusing to return it");Cr(he,(Se,Be)=>{$x(Se,Be>0,_,Lt())})}},$x=function(_,E,tt,et){const Lt=Qa(_);let Ot;for(;Ot=Lt.nextNode();)!ms(et,Ot)||ms(Tt,Ot)||(E&&Ye(ft.uponSanitizeShadowNode,Ot,null),tn(Ot,tt),en(Ot,tt),Pr(Ot.content)&&ps(Ot.content))},Ox=function(_){Tt&&on(Tt,_)},Ac=function(_,E){return D?_==="patchsrc"?!0:_==="for"&&E!=="label"&&E!=="output":!1},Dx=function(_){D&&Va(_,E=>{const tt=L(E);if(tt===ae.processingInstruction||tt===ae.comment&&ge(Kc,E.data)){try{f(E)}catch{}return!1}if(tt===ae.element){const et=E,Lt=ie(A(E));try{et.hasAttribute&&et.hasAttribute("patchsrc")&&et.removeAttribute("patchsrc"),et.hasAttribute&&et.hasAttribute("for")&&Ac("for",Lt)&&et.removeAttribute("for")}catch{}}return!0})},Ec=function(_){let E=null,tt=null;if(T)_="<remove></remove>"+_;else{const Ot=Wc(_,/^[\r\n\t ]+/);tt=Ot&&Ot[0]}ds==="application/xhtml+xml"&&xi===tr&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const et=N?I(_):_;if(xi===tr)try{E=new c().parseFromString(et,ds)}catch{}if(!E||!E.documentElement){E=ct.createDocument(xi,"template",null);try{E.documentElement.innerHTML=Ha?at:et}catch{}}const Lt=E.body||E.documentElement;return _&&tt&&Lt.insertBefore(r.createTextNode(tt),Lt.childNodes[0]||null),xi===tr?_t.call(E,X?"html":"body")[0]:X?E.documentElement:Lt},Qa=function(_){const E=F?F(_):_.ownerDocument;return dt.call(E||_,_,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},fo=function(_){return _=ys(_,At," "),_=ys(_,qt," "),_=ys(_,Ft," "),_},Ja=function(_){var E;Mc(_);const tt=(E=_.querySelectorAll)===null||E===void 0?void 0:E.call(_,"template");tt&&Cr(tt,et=>{Pr(et.content)&&Ja(et.content)})},Mc=function(_){_.normalize();const E=F?F(_):_.ownerDocument,tt=dt.call(E||_,_,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let et=tt.nextNode();for(;et;)et.data=fo(et.data),et=tt.nextNode()},po=function(_){const E=v?v(_):null;return typeof E!="string"||ie(E)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==w(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==S(_)||_.childNodes!==C(_)},Pr=function(_){if(!S||typeof _!="object"||_===null)return!1;try{return S(_)===ae.documentFragment}catch{return!1}},fs=function(_){if(!S||typeof _!="object"||_===null)return!1;try{return typeof S(_)=="number"}catch{return!1}};function Ye(st,_,E){st.length!==0&&Cr(st,tt=>{tt.call(t,_,E,Ci)})}const Ix=function(_,E){return!!(D&&_.hasChildNodes()&&!fs(_.firstElementChild)&&ge(un,_.textContent)&&ge(un,_.innerHTML)||D&&FC[E]&&L(_)===ae.element&&W(_)===tr&&(fs(_.firstElementChild)||typeof _.textContent=="string"&&ge(un,_.textContent))||_.nodeType===ae.processingInstruction||D&&_.nodeType===ae.comment&&ge(Kc,_.data))},go=function(_,E){if(_ instanceof RegExp)return ge(_,E);if(_ instanceof Function){for(var tt=arguments.length,et=new Array(tt>2?tt-2:0),Lt=2;Lt<tt;Lt++)et[Lt-2]=arguments[Lt];return!!_(E,...et)}return!1},Px=function(_,E,tt){if(!Re[E]&&Dc(E)&&go(fe.tagNameCheck,E))return!1;if(xt&&!Pt[E]&&!Pt[Qr(E)]){const et=x(_),Lt=C(_);if(Lt&&et){const Ot=Lt.length;for(let zt=Ot-1;zt>=0;--zt){const he=_===tt?d(Lt[zt],!0):Lt[zt];et.insertBefore(he,y(_))}}}return Ir(_),!0},$c=function(_,E,tt,et){return _.length===0?E:E===tt||E===et?De(E):E},ki=function(_,E){return _===E||x(_)!==null?!1:(ut&&Za(_),!0)},tn=function(_,E){if(Ox(_),Ye(ft.beforeSanitizeElements,_,null),ki(_,E))return!0;if(po(_))return Ir(_),!0;const tt=ie(A(_));if(gt=$c(ft.uponSanitizeElement,gt,_e,G),Ye(ft.uponSanitizeElement,_,{tagName:tt,allowedTags:gt}),ki(_,E))return!0;if(Ix(_,tt))return Ir(_),!0;if(Re[tt]||!(oe.tagCheck instanceof Function&&oe.tagCheck(tt))&&!gt[tt]){const et=Px(_,tt,E);return et===!1&&(Ye(ft.afterSanitizeElements,_,null),ki(_,E))?!0:et}if(L(_)===ae.element&&!Fx(_)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&ge(LC,_.innerHTML))return Ir(_),!0;if(g&&_.nodeType===ae.text){const et=fo(_.textContent);_.textContent!==et&&(gs(t.removed,{element:_.cloneNode()}),_.textContent=et)}return Ye(ft.afterSanitizeElements,_,null),ki(_,E)},Oc=function(_,E,tt){if(Mr[E]||Ac(E,_)||J&&(E==="id"||E==="name")&&(tt in r||tt in Sx))return!1;const et=Ht[E]||oe.attributeCheck instanceof Function&&oe.attributeCheck(E,_);return Je&&ge(lt,E)||$r&&ge(yt,E)?!0:et?Dr[E]||ge(z,ys(tt,Nt,""))||(E==="src"||E==="xlink:href"||E==="href")&&_!=="script"&&Hc(tt,"data:")===0&&us[_]||mr&&!ge(Et,ys(tt,Nt,""))?!0:!tt:Dc(_)&&go(fe.tagNameCheck,_)&&go(fe.attributeNameCheck,E,_)||E==="is"&&fe.allowCustomizedBuiltInElements&&go(fe.tagNameCheck,tt)},Rx=jt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Dc=function(_){return!Rx[Qr(_)]&&ge(Xt,_)},Nx=function(_,E,tt,et){if(N&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!tt)switch(h.getAttributeType(_,E)){case"TrustedHTML":return I(et);case"TrustedScriptURL":return P(et)}return et},qx=function(_,E,tt,et){try{return tt?_.setAttributeNS(tt,E,et):_.setAttribute(E,et),po(_)?(Ir(_),!1):!0}catch{return bi(E,_),!1}},Ic=function(_,E){return D&&ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,E)?!0:Qr(_)==="attributename"&&Wc(E,"href")!==null},en=function(_,E){if(Ye(ft.beforeSanitizeAttributes,_,null),ki(_,E))return;const tt=_.attributes;if(!tt||po(_))return;Ht=$c(ft.uponSanitizeAttribute,Ht,gr,nt);const et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let Lt=tt.length;const Ot=ie(_.nodeName);for(;Lt--;){const zt=tt[Lt],he=zt.name,er=zt.namespaceURI,Se=zt.value,Be=ie(he),wi=Se;let Le=he==="value"?wi:cC(wi),Pc=!1;if(et.attrName=Be,et.attrValue=Le,et.keepAttr=!0,et.forceKeepAttr=void 0,Ye(ft.uponSanitizeAttribute,_,et),Le=et.attrValue,ot&&(Be==="id"||Be==="name")&&Hc(Le,it)!==0&&(bi(he,_,zt),Le=it+Le,Pc=!0),Ic(he,Le)){bi(he,_,zt);continue}if(!et.forceKeepAttr){if(!et.keepAttr){bi(he,_,zt);continue}if(!yr&&ge(Qc,Le)){bi(he,_,zt);continue}if(g&&(Le=fo(Le)),!Oc(Ot,Be,Le)){bi(he,_,zt);continue}Le=Nx(Ot,Be,er,Le),Le!==wi&&qx(_,he,er,Le)&&Pc&&zc(t.removed)}}Ye(ft.afterSanitizeAttributes,_,null),ki(_,E)},ps=function(_){let E=null;const tt=Qa(_);for(Ye(ft.beforeSanitizeShadowDOM,_,null);E=tt.nextNode();)if(Ye(ft.uponSanitizeShadowNode,E,null),tn(E,_),en(E,_),Pr(E.content)&&ps(E.content),L(E)===ae.element){const et=k(E);Pr(et)&&(rn(et),ps(et))}g&&Mc(_),Ye(ft.afterSanitizeShadowDOM,_,null)},rn=function(_){const E=[{node:_,shadow:null}];for(;E.length>0;){const tt=E.pop();if(tt.shadow){ps(tt.shadow);continue}const et=tt.node,Lt=L(et)===ae.element,Ot=C(et);if(Ot)for(let zt=Ot.length-1;zt>=0;--zt)E.push({node:Ot[zt],shadow:null});if(Lt){const zt=v?v(et):null;if(typeof zt=="string"&&ie(zt)==="template"){const he=et.content;Pr(he)&&E.push({node:he,shadow:null})}}if(Lt){const zt=k(et);Pr(zt)&&E.push({node:null,shadow:zt},{node:zt,shadow:null})}}};return t.sanitize=function(st){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,tt=null,et=null,Lt=null;if(Ha=!st,Ha&&(st="<!-->"),typeof st!="string"&&!fs(st)&&(st=pC(st),typeof st!="string"))throw br("dirty is not a string, aborting");if(!t.isSupported)return st;Q?(gt=G,Ht=nt):Ga(_),(ft.uponSanitizeElement.length>0||ft.uponSanitizeAttribute.length>0)&&(gt=De(gt)),ft.uponSanitizeAttribute.length>0&&(Ht=De(Ht)),t.removed=[];const Ot=ut&&typeof st!="string"&&fs(st);let zt=[];const he=Tt;if(Ot){Dx(st);const Be=A(st);if(typeof Be=="string"){const wi=ie(Be);if(!gt[wi]||Re[wi])throw Xa(st),br("root node is forbidden and cannot be sanitized in-place")}if(po(st))throw Xa(st),br("root node is clobbered and cannot be sanitized in-place");zt=Ka(st),Tt=sn()}else if(fs(st))E=Ec("<!---->"),tt=E.ownerDocument.importNode(st,!0),tt.nodeType===ae.element&&tt.nodeName==="BODY"||tt.nodeName==="HTML"?E=tt:E.appendChild(tt),rn(E);else{if(!R&&!g&&!X&&st.indexOf("<")===-1)return N&&Z?I(st):st;if(E=Ec(st),!E)return R?null:Z?at:""}E&&T&&Ir(E.firstChild);const er=Ot?st:E;try{Ot&&rn(st);const Be=Qa(er);for(;et=Be.nextNode();)tn(et,er),en(et,er),Pr(et.content)&&ps(et.content);Ot&&Mx(st,zt)}catch(Be){throw Ot&&(Xa(st),Fc(st,zt)),Be}finally{Tt=he}if(Ot){if(Fc(st,zt))throw br("a node selected for removal could not be safely returned; refusing to sanitize in place");return g&&Ja(st),st}if(R){if(g&&Ja(E),rt)for(Lt=kt.call(E.ownerDocument);E.firstChild;)Lt.appendChild(E.firstChild);else Lt=E;return(Ht.shadowroot||Ht.shadowrootmode)&&(Lt=wt.call(i,Lt,!0)),Lt}let Se=X?E.outerHTML:E.innerHTML;return X&&gt["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&ge(vC,E.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
4
+ `+Se),g&&(Se=fo(Se)),N&&Z?I(Se):Se},t.setConfig=function(){let st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ga(st),Q=!0,G=gt,nt=Ht},t.clearConfig=function(){Ci=null,Q=!1,G=null,nt=null,N=Y,at=""},t.isValidAttribute=function(st,_,E){Ci||Ga({});const tt=ie(st),et=ie(_);return typeof E=="string"&&(Ic(_,E)||!yr&&ge(Qc,E))?!1:Oc(tt,et,E)},t.addHook=function(st,_){typeof _=="function"&&Ae(ft,st)&&gs(ft[st],_)},t.removeHook=function(st,_){if(Ae(ft,st)){if(_!==void 0){const E=nC(ft[st],_);return E===-1?void 0:hC(ft[st],E,1)[0]}return zc(ft[st])}},t.removeHooks=function(st){Ae(ft,st)&&(ft[st]=[])},t.removeAllHooks=function(){ft=Jc()},t}var Qi=Pf(),ol=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ol(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=ol(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ue=ol,cr="#ffffff",ur="#f2f2f2",$t=p((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Pi,MC=(Pi=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,o,a,n,l,c,h,u,d,f,m,y,C,x,k,w,S,v,F,L,A,V,W,N,at,Y,$,O,B,I,P,H,K,ct,dt,kt,_t,wt,ft,At,qt,Ft,lt,yt,Et,Nt,Xt,z;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||U(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||j(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||j(this.mainBkg,10)):(this.rowOdd=this.rowOdd||U(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||U(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let gt=0;gt<this.THEME_COLOR_LIMIT;gt++)this["cScale"+gt]=j(this["cScale"+gt],75);else for(let gt=0;gt<this.THEME_COLOR_LIMIT;gt++)this["cScale"+gt]=j(this["cScale"+gt],25);for(let gt=0;gt<this.THEME_COLOR_LIMIT;gt++)this["cScaleInv"+gt]=this["cScaleInv"+gt]||M(this["cScale"+gt]);for(let gt=0;gt<this.THEME_COLOR_LIMIT;gt++)this.darkMode?this["cScalePeer"+gt]=this["cScalePeer"+gt]||U(this["cScale"+gt],10):this["cScalePeer"+gt]=this["cScalePeer"+gt]||j(this["cScale"+gt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let gt=0;gt<this.THEME_COLOR_LIMIT;gt++)this["cScaleLabel"+gt]=this["cScaleLabel"+gt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let gt=0;gt<5;gt++)this["surface"+gt]=this["surface"+gt]||b(this.mainBkg,{h:180,s:-15,l:t*(5+gt*3)}),this["surfacePeer"+gt]=this["surfacePeer"+gt]||b(this.mainBkg,{h:180,s:-15,l:t*(8+gt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((w=this.radar)==null?void 0:w.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((F=this.radar)==null?void 0:F.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((V=this.radar)==null?void 0:V.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((at=this.wardley)==null?void 0:at.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:(($=this.wardley)==null?void 0:$.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((B=this.wardley)==null?void 0:B.componentStroke)||this.lineColor,componentLabelColor:((I=this.wardley)==null?void 0:I.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((H=this.wardley)==null?void 0:H.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((K=this.wardley)==null?void 0:K.annotationStroke)||this.lineColor,annotationTextColor:((ct=this.wardley)==null?void 0:ct.annotationTextColor)||this.primaryTextColor,annotationFill:((dt=this.wardley)==null?void 0:dt.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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((kt=this.xyChart)==null?void 0:kt.backgroundColor)||this.background,titleColor:((_t=this.xyChart)==null?void 0:_t.titleColor)||this.primaryTextColor,dataLabelColor:((wt=this.xyChart)==null?void 0:wt.dataLabelColor)||this.primaryTextColor,legendTextColor:((ft=this.xyChart)==null?void 0:ft.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((qt=this.xyChart)==null?void 0:qt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ft=this.xyChart)==null?void 0:Ft.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((lt=this.xyChart)==null?void 0:lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Xt=this.xyChart)==null?void 0:Xt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((z=this.xyChart)==null?void 0:z.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?j(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Pi,"Theme"),Pi),$C=p(e=>{const t=new MC;return t.calculate(e),t},"getThemeVariables"),Ri,OC=(Ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Yr(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=j("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=j(this.sectionBkgColor,10),this.taskBorderColor=Yr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Yr(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||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||j(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,o,a,n,l,c,h,u,d,f,m,y,C,x,k,w,S,v,F,L,A,V,W,N,at,Y,$,O,B,I,P,H,K,ct,dt,kt,_t,wt,ft,At,qt,Ft,lt,yt,Et,Nt,Xt;this.secondBkg=U(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=U(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=U(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=M(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||M(this["cScale"+z]);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScalePeer"+z]=this["cScalePeer"+z]||U(this["cScale"+z],10);for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||b(this.mainBkg,{h:30,s:-30,l:-(-10+z*4)}),this["surfacePeer"+z]=this["surfacePeer"+z]||b(this.mainBkg,{h:30,s:-30,l:-(-7+z*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["pie"+z]=this["cScale"+z];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 z=0;z<8;z++)this["venn"+(z+1)]=this["venn"+(z+1)]??U(this["cScale"+z],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#FF6B6B",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#F57F17",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((w=this.xyChart)==null?void 0:w.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((S=this.xyChart)==null?void 0:S.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((F=this.xyChart)==null?void 0:F.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((L=this.xyChart)==null?void 0:L.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((V=this.xyChart)==null?void 0:V.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.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:((Y=this.radar)==null?void 0:Y.axisColor)||this.lineColor,axisStrokeWidth:(($=this.radar)==null?void 0:$.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((I=this.radar)==null?void 0:I.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((K=this.radar)==null?void 0:K.graticuleOpacity)||.3,legendBoxSize:((ct=this.radar)==null?void 0:ct.legendBoxSize)||12,legendFontSize:((dt=this.radar)==null?void 0:dt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((kt=this.wardley)==null?void 0:kt.backgroundColor)||this.background,axisColor:((_t=this.wardley)==null?void 0:_t.axisColor)||this.lineColor,axisTextColor:((wt=this.wardley)==null?void 0:wt.axisTextColor)||this.primaryTextColor,gridColor:((ft=this.wardley)==null?void 0:ft.gridColor)||this.gridColor,componentFill:((At=this.wardley)==null?void 0:At.componentFill)||this.mainBkg,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((Ft=this.wardley)==null?void 0:Ft.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((yt=this.wardley)==null?void 0:yt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Xt=this.wardley)==null?void 0:Xt.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?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.secondaryColor,20),this.git1=U(this.pie2||this.secondaryColor,20),this.git2=U(this.pie3||this.tertiaryColor,20),this.git3=U(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=U(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=U(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=U(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=U(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||U("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||U("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||U("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||U("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||U(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||U(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||U(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||U(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ri,"Theme"),Ri),DC=p(e=>{const t=new OC;return t.calculate(e),t},"getThemeVariables"),Ni,IC=(Ni=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=$t(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=Yr(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,o,a,n,l,c,h,u,d,f,m,y,C,x,k,w,S,v,F,L,A,V,W,N,at,Y,$,O,B,I,P,H,K,ct,dt,kt,_t,wt,ft,At,qt,Ft,lt,yt,Et,Nt,Xt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScale"+z]=j(this["cScale"+z],10),this["cScalePeer"+z]=this["cScalePeer"+z]||j(this["cScale"+z],25);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||b(this["cScale"+z],{h:180});for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||b(this.mainBkg,{h:30,l:-(5+z*5)}),this["surfacePeer"+z]=this["surfacePeer"+z]||b(this.mainBkg,{h:30,l:-(7+z*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||U(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||U(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((S=this.radar)==null?void 0:S.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((L=this.radar)==null?void 0:L.graticuleOpacity)||.3,legendBoxSize:((A=this.radar)==null?void 0:A.legendBoxSize)||12,legendFontSize:((V=this.radar)==null?void 0:V.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((N=this.wardley)==null?void 0:N.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((K=this.wardley)==null?void 0:K.annotationTextColor)||this.primaryTextColor,annotationFill:((ct=this.wardley)==null?void 0:ct.annotationFill)||this.background},this.xyChart={backgroundColor:((dt=this.xyChart)==null?void 0:dt.backgroundColor)||this.background,titleColor:((kt=this.xyChart)==null?void 0:kt.titleColor)||this.primaryTextColor,dataLabelColor:((_t=this.xyChart)==null?void 0:_t.dataLabelColor)||this.primaryTextColor,legendTextColor:((wt=this.xyChart)==null?void 0:wt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((ft=this.xyChart)==null?void 0:ft.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((At=this.xyChart)==null?void 0:At.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ft=this.xyChart)==null?void 0:Ft.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((yt=this.xyChart)==null?void 0:yt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Xt=this.xyChart)==null?void 0:Xt.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||j(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ni,"Theme"),Ni),PC=p(e=>{const t=new IC;return t.calculate(e),t},"getThemeVariables"),qi,RC=(qi=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=U("#cde498",10),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(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,o,a,n,l,c,h,u,d,f,m,y,C,x,k,w,S,v,F,L,A,V,W,N,at,Y,$,O,B,I,P,H,K,ct,dt,kt,_t,wt,ft,At,qt,Ft,lt,yt,Et,Nt,Xt;this.actorBorder=j(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScale"+z]=j(this["cScale"+z],10),this["cScalePeer"+z]=this["cScalePeer"+z]||j(this["cScale"+z],25);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||b(this["cScale"+z],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||b(this.mainBkg,{h:30,s:-30,l:-(5+z*5)}),this["surfacePeer"+z]=this["surfacePeer"+z]||b(this.mainBkg,{h:30,s:-30,l:-(8+z*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||U(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||U(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B4513",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF9C4",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((S=this.radar)==null?void 0:S.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((L=this.radar)==null?void 0:L.graticuleOpacity)||.3,legendBoxSize:((A=this.radar)==null?void 0:A.legendBoxSize)||12,legendFontSize:((V=this.radar)==null?void 0:V.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((N=this.wardley)==null?void 0:N.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((K=this.wardley)==null?void 0:K.annotationTextColor)||this.primaryTextColor,annotationFill:((ct=this.wardley)==null?void 0:ct.annotationFill)||this.background},this.xyChart={backgroundColor:((dt=this.xyChart)==null?void 0:dt.backgroundColor)||this.background,titleColor:((kt=this.xyChart)==null?void 0:kt.titleColor)||this.primaryTextColor,dataLabelColor:((_t=this.xyChart)==null?void 0:_t.dataLabelColor)||this.primaryTextColor,legendTextColor:((wt=this.xyChart)==null?void 0:wt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((ft=this.xyChart)==null?void 0:ft.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((At=this.xyChart)==null?void 0:At.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ft=this.xyChart)==null?void 0:Ft.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((yt=this.xyChart)==null?void 0:yt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Xt=this.xyChart)==null?void 0:Xt.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(qi,"Theme"),qi),NC=p(e=>{const t=new RC;return t.calculate(e),t},"getThemeVariables"),zi,qC=(zi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=U(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(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||U(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,o,a,n,l,c,h,u,d,f,m,y,C,x,k,w,S,v,F,L,A,V,W,N,at,Y,$,O,B,I,P,H,K,ct,dt,kt,_t,wt,ft,At,qt,Ft,lt,yt,Et,Nt,Xt;this.secondBkg=U(this.contrast,55),this.border2=this.contrast,this.actorBorder=U(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||M(this["cScale"+z]);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this.darkMode?this["cScalePeer"+z]=this["cScalePeer"+z]||U(this["cScale"+z],10):this["cScalePeer"+z]=this["cScalePeer"+z]||j(this["cScale"+z],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||b(this.mainBkg,{l:-(5+z*5)}),this["surfacePeer"+z]=this["surfacePeer"+z]||b(this.mainBkg,{l:-(8+z*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=U(this.contrast,30),this.sectionBkgColor2=U(this.contrast,30),this.taskBorderColor=j(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=U(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=j(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["pie"+z]=this["cScale"+z];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 z=0;z<8;z++)this["venn"+(z+1)]=this["venn"+(z+1)]??this["cScale"+z];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((w=this.xyChart)==null?void 0:w.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((S=this.xyChart)==null?void 0:S.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((F=this.xyChart)==null?void 0:F.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((L=this.xyChart)==null?void 0:L.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((V=this.xyChart)==null?void 0:V.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((Y=this.radar)==null?void 0:Y.axisColor)||this.lineColor,axisStrokeWidth:(($=this.radar)==null?void 0:$.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((I=this.radar)==null?void 0:I.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((K=this.radar)==null?void 0:K.graticuleOpacity)||.3,legendBoxSize:((ct=this.radar)==null?void 0:ct.legendBoxSize)||12,legendFontSize:((dt=this.radar)==null?void 0:dt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((kt=this.wardley)==null?void 0:kt.backgroundColor)||this.background,axisColor:((_t=this.wardley)==null?void 0:_t.axisColor)||this.lineColor,axisTextColor:((wt=this.wardley)==null?void 0:wt.axisTextColor)||this.primaryTextColor,gridColor:((ft=this.wardley)==null?void 0:ft.gridColor)||this.gridColor,componentFill:((At=this.wardley)==null?void 0:At.componentFill)||this.background,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((Ft=this.wardley)==null?void 0:Ft.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((yt=this.wardley)==null?void 0:yt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Xt=this.wardley)==null?void 0:Xt.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=j(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(zi,"Theme"),zi),zC=p(e=>{const t=new qC;return t.calculate(e),t},"getThemeVariables"),Wi,WC=(Wi=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=$t(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 o,a,n,l,c,h,u,d,f,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||U(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||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=j(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=j(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||j(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?j(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Wi,"Theme"),Wi),HC=p(e=>{const t=new WC;return t.calculate(e),t},"getThemeVariables"),Hi,YC=(Hi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(M("#323D47"),10),this.border1="#ccc",this.border2=Yr(255,255,255,.25),this.arrowheadColor=M(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,o,a,n,l,c,h,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||U(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=j(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=j(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||j(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?j(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=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Hi,"Theme"),Hi),UC=p(e=>{const t=new YC;return t.calculate(e),t},"getThemeVariables"),Yi,jC=(Yi=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=$t("#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 o,a,n,l,c,h,u,d,f,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||U(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=j(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=j(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||j(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?j(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Yi,"Theme"),Yi),GC=p(e=>{const t=new jC;return t.calculate(e),t},"getThemeVariables"),Ui,XC=(Ui=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(M("#323D47"),10),this.border1="#ccc",this.border2=Yr(255,255,255,.25),this.arrowheadColor=M(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,o,a,n,l,c,h,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||U(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=j(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=j(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||j(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?j(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ui,"Theme"),Ui),VC=p(e=>{const t=new XC;return t.calculate(e),t},"getThemeVariables"),ji,ZC=(ji=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=$t(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 o,a,n,l,c,h,u,d,f,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||U(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||j(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?j(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ji,"Theme"),ji),KC=p(e=>{const t=new ZC;return t.calculate(e),t},"getThemeVariables"),Gi,QC=(Gi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(M("#323D47"),10),this.border1="#ccc",this.border2=Yr(255,255,255,.25),this.arrowheadColor=M(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,o,a,n,l,c,h,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||U(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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||j(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=j(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ze(this.quadrant1Fill)?U(this.quadrant1Fill):j(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,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?j(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||cr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ur}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Gi,"Theme"),Gi),JC=p(e=>{const t=new QC;return t.calculate(e),t},"getThemeVariables"),Sr={base:{getThemeVariables:$C},dark:{getThemeVariables:DC},default:{getThemeVariables:PC},forest:{getThemeVariables:NC},neutral:{getThemeVariables:zC},neo:{getThemeVariables:HC},"neo-dark":{getThemeVariables:UC},redux:{getThemeVariables:GC},"redux-dark":{getThemeVariables:VC},"redux-color":{getThemeVariables:KC},"redux-dark-color":{getThemeVariables:JC}},pe={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},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"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},Rf={...pe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Sr.default.getThemeVariables(),sequence:{...pe.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...pe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...pe.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...pe.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...pe.pie,useWidth:984},xyChart:{...pe.xyChart,useWidth:void 0},requirement:{...pe.requirement,useWidth:void 0},packet:{...pe.packet},eventmodeling:{...pe.eventmodeling},treeView:{...pe.treeView,useWidth:void 0},radar:{...pe.radar},railroad:{...pe.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...pe.ishikawa},sankey:{...pe.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:{...pe.venn},cynefin:{...pe.cynefin}},Nf=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Nf(e[i],"")]:[...r,t+i],[]),"keyify"),tb=new Set(Nf(Rf,"")),qf=Rf,eb={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},rb=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(q.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Uo=p(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Uo(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!tb.has(t)||e[t]==null){q.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=eb[t];i?rb(e[t],i):(q.debug("sanitizing object",t),Uo(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=zf(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]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),zf=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ji=Object.freeze(qf),dr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ee=ue({},Ji),jo,ai=[],Rs=ue({},Ji),eo=p((e,t)=>{let r=ue({},e),i={};for(const s of t)Yf(s),i=ue(i,s);if(r=ue(r,i),i.theme&&i.theme in Sr){const s=ue({},jo),o=ue(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Sr&&(r.themeVariables=Sr[r.theme].getThemeVariables(o))}return Rs=r,lb(Rs),Rs},"updateCurrentConfig"),ib=p(e=>(Ee=ue({},Ji),Ee=ue(Ee,e),e.theme&&Sr[e.theme]&&(Ee.themeVariables=Sr[e.theme].getThemeVariables(e.themeVariables)),eo(Ee,ai),Ee),"setSiteConfig"),sb=p(e=>{jo=ue({},e)},"saveConfigFromInitialize"),ob=p(e=>(Ee=ue(Ee,e),eo(Ee,ai),Ee),"updateSiteConfig"),Wf=p(()=>ue({},Ee),"getSiteConfig"),Hf=p(e=>(eo(Rs,[e]),te()),"setConfig"),te=p(()=>ue({},Rs),"getConfig"),Yf=p(e=>{e&&(["secure",...Ee.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.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"&&Yf(e[t])}))},"sanitize"),ab=p(e=>{var t;Uo(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),ai.push(e),eo(Ee,ai)},"addDirective"),Go=p((e=Ee)=>{ai=[],eo(e,ai)},"reset"),nb={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."},tu={},Uf=p(e=>{tu[e]||(q.warn(nb[e]),tu[e]=!0)},"issueWarning"),lb=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Uf("LAZY_LOAD_DEPRECATED")},"checkConfig"),r3=p(()=>{let e={};jo&&(e=ue(e,jo));for(const t of ai)e=ue(e,t);return e},"getUserDefinedConfig"),we=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Uf("FLOWCHART_HTML_LABELS_DEPRECATED"),dr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),jf=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ns=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,hb=/\s*%%.*\n/gm,Xi,Gf=(Xi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Xi,"UnknownDiagramError"),Xi),ni={},Vl=p(function(e,t){e=e.replace(jf,"").replace(Ns,"").replace(hb,`
5
+ `);for(const[r,{detector:i}]of Object.entries(ni))if(i(e,t))return r;throw new Gf(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),al=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xf(t,r,i)},"registerLazyLoadedDiagrams"),Xf=p((e,t,r)=>{ni[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),ni[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),cb=p(e=>ni[e].loader,"getDiagramLoader"),ro=/<br\s*\/?>/gi,ub=p(e=>e?Kf(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),db=(()=>{let e=!1;return()=>{e||(Vf(),e=!0)}})();function Vf(){const e="data-temp-href-target";Qi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Qi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Vf,"setupDompurifyHooks");var Zf=p(e=>(db(),Qi.sanitize(e)),"removeScript"),eu=p((e,t)=>{if(we(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Zf(e):r!=="loose"&&(e=Kf(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=mb(e))}return e},"sanitizeMore"),ze=p((e,t)=>e&&(t.dompurifyConfig?e=Qi.sanitize(eu(e,t),t.dompurifyConfig).toString():e=Qi.sanitize(eu(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),fb=p((e,t)=>typeof e=="string"?ze(e,t):e.flat().map(r=>ze(r,t)),"sanitizeTextOrArray"),pb=p(e=>ro.test(e),"hasBreaks"),gb=p(e=>e.split(ro),"splitBreaks"),mb=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Kf=p(e=>e.replace(ro,"#br#"),"breakToPlaceholder"),yb=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),xb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Cb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ru=p(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 o=t[i-1],a=t[i+1];bb(o,a)&&(s=o+","+a,i++,r.pop())}r.push(kb(s))}return r.join("")},"parseGenericTypes"),nl=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),bb=p((e,t)=>{const r=nl(e,"~"),i=nl(t,"~");return r===1&&i===1},"shouldCombineSets"),kb=p(e=>{const t=nl(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("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),iu=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ll=/\$\$(.*?)\$\$/g,Ys=p(e=>{var t;return(((t=e.match(ll))==null?void 0:t.length)??0)>0},"hasKatex"),i3=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Qf(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"),wb=p(async(e,t)=>{if(!Ys(e))return e;if(!(iu()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ll,"MathML is unsupported in this environment.");{const{default:r}=await Rt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!iu()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ro).map(s=>Ys(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(ll,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qf=p(async(e,t)=>ze(await wb(e,t),t),"renderKatexSanitized"),io={getRows:ub,sanitizeText:ze,sanitizeTextOrArray:fb,hasBreaks:pb,splitBreaks:gb,lineBreakRegex:ro,removeScript:Zf,getUrl:yb,evaluate:dr,getMax:xb,getMin:Cb},Tb=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),_b=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Jf=p(function(e,t,r,i){const s=_b(t,r,i);Tb(e,s)},"configureSvgSize"),Sb=p(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;q.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;q.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,q.info(`Calculated bounds: ${n}x${l}`),Jf(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Oo={};function hl(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}p(hl,"cssStyleSheetToString");var vb=p((e,t,r,i)=>{let s="";return e in Oo&&Oo[e]?s=Oo[e]({...r,svgId:i}):q.warn(`No theme found for ${e}`),`& {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${s}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
+ }
88
+ [data-look="neo"].swimlane.cluster rect {
89
+ filter: none;
90
+ }
91
+
92
+
93
+ [data-look="neo"].node path {
94
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
+ stroke-width: ${r.strokeWidth??1}px;
96
+ }
97
+
98
+ [data-look="neo"].node .outer-path {
99
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
+ }
101
+
102
+ [data-look="neo"].node .neo-line path {
103
+ stroke: ${r.nodeBorder};
104
+ filter: none;
105
+ }
106
+
107
+ [data-look="neo"].node circle{
108
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
110
+ }
111
+
112
+ [data-look="neo"].node circle .state-start{
113
+ fill: #000000;
114
+ }
115
+
116
+ [data-look="neo"].icon-shape .icon {
117
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
+ }
120
+
121
+ [data-look="neo"].icon-shape .icon-neo path {
122
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
+ }
125
+
126
+ ${t}
127
+ `},"getStyles"),Bb=p((e,t)=>{t!==void 0&&(Oo[e]=t)},"addStylesForDiagram"),Lb=vb,tp={};Hx(tp,{clear:()=>Fb,getAccDescription:()=>$b,getAccTitle:()=>Eb,getDiagramTitle:()=>Db,setAccDescription:()=>Mb,setAccTitle:()=>Ab,setDiagramTitle:()=>Ob});var Zl="",Kl="",Ql="",Jl=p(e=>ze(e,te()),"sanitizeText"),Fb=p(()=>{Zl="",Ql="",Kl=""},"clear"),Ab=p(e=>{Zl=Jl(e).replace(/^\s+/g,"")},"setAccTitle"),Eb=p(()=>Zl,"getAccTitle"),Mb=p(e=>{Ql=Jl(e).replace(/\n\s+/g,`
128
+ `)},"setAccDescription"),$b=p(()=>Ql,"getAccDescription"),Ob=p(e=>{Kl=Jl(e)},"setDiagramTitle"),Db=p(()=>Kl,"getDiagramTitle"),su=q,Ib=Xl,Wt=te,s3=Hf,o3=Ji,th=p(e=>ze(e,Wt()),"sanitizeText"),Pb=Sb,Rb=p(()=>tp,"getCommonDb"),Xo={},Vo=p((e,t,r)=>{var i;Xo[e]&&su.warn(`Diagram with id ${e} already registered. Overwriting.`),Xo[e]=t,r&&Xf(e,r),Bb(e,t.styles),(i=t.injectUtils)==null||i.call(t,su,Ib,Wt,th,Pb,Rb(),()=>{})},"registerDiagram"),cl=p(e=>{if(e in Xo)return Xo[e];throw new Nb(e)},"getDiagram"),Vi,Nb=(Vi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Vi,"DiagramNotFoundError"),Vi),qb={value:()=>{}};function ep(){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 Do(r)}function Do(e){this._=e}function zb(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}})}Do.prototype=ep.prototype={constructor:Do,on:function(e,t){var r=this._,i=zb(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=Wb(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=ou(r[s],e.name,t);else if(t==null)for(s in r)r[s]=ou(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 Do(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[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,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function Wb(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function ou(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=qb,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ul="http://www.w3.org/1999/xhtml";const au={svg:"http://www.w3.org/2000/svg",xhtml:ul,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ca(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),au.hasOwnProperty(t)?{space:au[t],local:e}:e}function Hb(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ul&&t.documentElement.namespaceURI===ul?t.createElement(e):t.createElementNS(r,e)}}function Yb(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rp(e){var t=Ca(e);return(t.local?Yb:Hb)(t)}function Ub(){}function eh(e){return e==null?Ub:function(){return this.querySelector(e)}}function jb(e){typeof e!="function"&&(e=eh(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new Pe(i,this._parents)}function Gb(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Xb(){return[]}function ip(e){return e==null?Xb:function(){return this.querySelectorAll(e)}}function Vb(e){return function(){return Gb(e.apply(this,arguments))}}function Zb(e){typeof e=="function"?e=Vb(e):e=ip(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new Pe(i,s)}function sp(e){return function(){return this.matches(e)}}function op(e){return function(t){return t.matches(e)}}var Kb=Array.prototype.find;function Qb(e){return function(){return Kb.call(this.children,e)}}function Jb(){return this.firstElementChild}function t1(e){return this.select(e==null?Jb:Qb(typeof e=="function"?e:op(e)))}var e1=Array.prototype.filter;function r1(){return Array.from(this.children)}function i1(e){return function(){return e1.call(this.children,e)}}function s1(e){return this.selectAll(e==null?r1:i1(typeof e=="function"?e:op(e)))}function o1(e){typeof e!="function"&&(e=sp(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Pe(i,this._parents)}function ap(e){return new Array(e.length)}function a1(){return new Pe(this._enter||this._groups.map(ap),this._parents)}function Zo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zo.prototype={constructor:Zo,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 n1(e){return function(){return e}}function l1(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new Zo(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function h1(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,u=o.length,d=new Array(h),f;for(n=0;n<h;++n)(l=t[n])&&(d[n]=f=a.call(l,l.__data__,n,t)+"",c.has(f)?s[n]=l:c.set(f,l));for(n=0;n<u;++n)f=a.call(e,o[n],n,o)+"",(l=c.get(f))?(i[n]=l,l.__data__=o[n],c.delete(f)):r[n]=new Zo(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(d[n])===l&&(s[n]=l)}function c1(e){return e.__data__}function u1(e,t){if(!arguments.length)return Array.from(this,c1);var r=t?h1:l1,i=this._parents,s=this._groups;typeof e!="function"&&(e=n1(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=s[c],d=u.length,f=d1(e.call(h,h&&h.__data__,c,i)),m=f.length,y=n[c]=new Array(m),C=a[c]=new Array(m),x=l[c]=new Array(d);r(h,u,y,C,x,f,t);for(var k=0,w=0,S,v;k<m;++k)if(S=y[k]){for(k>=w&&(w=k+1);!(v=C[w])&&++w<m;);S._next=v||null}}return a=new Pe(a,i),a._enter=n,a._exit=l,a}function d1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f1(){return new Pe(this._exit||this._groups.map(ap),this._parents)}function p1(e,t,r){var i=this.enter(),s=this,o=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?o.remove():r(o),i&&s?i.merge(s).order():s}function g1(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],u=c.length,d=n[l]=new Array(u),f,m=0;m<u;++m)(f=c[m]||h[m])&&(d[m]=f);for(;l<s;++l)n[l]=r[l];return new Pe(n,this._parents)}function m1(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function y1(e){e||(e=x1);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new Pe(s,this._parents).order()}function x1(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function C1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function b1(){return Array.from(this)}function k1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function w1(){let e=0;for(const t of this)++e;return e}function T1(){return!this.node()}function _1(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function S1(e){return function(){this.removeAttribute(e)}}function v1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B1(e,t){return function(){this.setAttribute(e,t)}}function L1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function F1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function A1(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 E1(e,t){var r=Ca(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?v1:S1:typeof t=="function"?r.local?A1:F1:r.local?L1:B1)(r,t))}function np(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function M1(e){return function(){this.style.removeProperty(e)}}function $1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function O1(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function D1(e,t,r){return arguments.length>1?this.each((t==null?M1:typeof t=="function"?O1:$1)(e,t,r??"")):ts(this.node(),e)}function ts(e,t){return e.style.getPropertyValue(t)||np(e).getComputedStyle(e,null).getPropertyValue(t)}function I1(e){return function(){delete this[e]}}function P1(e,t){return function(){this[e]=t}}function R1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function N1(e,t){return arguments.length>1?this.each((t==null?I1:typeof t=="function"?R1:P1)(e,t)):this.node()[e]}function lp(e){return e.trim().split(/^|\s+/)}function rh(e){return e.classList||new hp(e)}function hp(e){this._node=e,this._names=lp(e.getAttribute("class")||"")}hp.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 cp(e,t){for(var r=rh(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function up(e,t){for(var r=rh(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function q1(e){return function(){cp(this,e)}}function z1(e){return function(){up(this,e)}}function W1(e,t){return function(){(t.apply(this,arguments)?cp:up)(this,e)}}function H1(e,t){var r=lp(e+"");if(arguments.length<2){for(var i=rh(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?W1:t?q1:z1)(r,t))}function Y1(){this.textContent=""}function U1(e){return function(){this.textContent=e}}function j1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function G1(e){return arguments.length?this.each(e==null?Y1:(typeof e=="function"?j1:U1)(e)):this.node().textContent}function X1(){this.innerHTML=""}function V1(e){return function(){this.innerHTML=e}}function Z1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function K1(e){return arguments.length?this.each(e==null?X1:(typeof e=="function"?Z1:V1)(e)):this.node().innerHTML}function Q1(){this.nextSibling&&this.parentNode.appendChild(this)}function J1(){return this.each(Q1)}function tk(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ek(){return this.each(tk)}function rk(e){var t=typeof e=="function"?e:rp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ik(){return null}function sk(e,t){var r=typeof e=="function"?e:rp(e),i=t==null?ik:typeof t=="function"?t:eh(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ok(){var e=this.parentNode;e&&e.removeChild(this)}function ak(){return this.each(ok)}function nk(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lk(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hk(e){return this.select(e?lk:nk)}function ck(e){return arguments.length?this.property("__data__",e):this.node().__data__}function uk(e){return function(t){e.call(this,t,this.__data__)}}function dk(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 fk(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function pk(e,t,r){return function(){var i=this.__on,s,o=uk(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function gk(e,t,r){var i=dk(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?pk:fk,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function dp(e,t,r){var i=np(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 mk(e,t){return function(){return dp(this,e,t)}}function yk(e,t){return function(){return dp(this,e,t.apply(this,arguments))}}function xk(e,t){return this.each((typeof t=="function"?yk:mk)(e,t))}function*Ck(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var fp=[null];function Pe(e,t){this._groups=e,this._parents=t}function so(){return new Pe([[document.documentElement]],fp)}function bk(){return this}Pe.prototype=so.prototype={constructor:Pe,select:jb,selectAll:Zb,selectChild:t1,selectChildren:s1,filter:o1,data:u1,enter:a1,exit:f1,join:p1,merge:g1,selection:bk,order:m1,sort:y1,call:C1,nodes:b1,node:k1,size:w1,empty:T1,each:_1,attr:E1,style:D1,property:N1,classed:H1,text:G1,html:K1,raise:J1,lower:ek,append:rk,insert:sk,remove:ak,clone:hk,datum:ck,on:gk,dispatch:xk,[Symbol.iterator]:Ck};function It(e){return typeof e=="string"?new Pe([[document.querySelector(e)]],[document.documentElement]):new Pe([[e]],fp)}function ih(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function pp(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function oo(){}var Us=.7,Ko=1/Us,Oi="\\s*([+-]?\\d+)\\s*",js="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kk=/^#([0-9a-f]{3,8})$/,wk=new RegExp(`^rgb\\(${Oi},${Oi},${Oi}\\)$`),Tk=new RegExp(`^rgb\\(${nr},${nr},${nr}\\)$`),_k=new RegExp(`^rgba\\(${Oi},${Oi},${Oi},${js}\\)$`),Sk=new RegExp(`^rgba\\(${nr},${nr},${nr},${js}\\)$`),vk=new RegExp(`^hsl\\(${js},${nr},${nr}\\)$`),Bk=new RegExp(`^hsla\\(${js},${nr},${nr},${js}\\)$`),nu={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};ih(oo,Gs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lu,formatHex:lu,formatHex8:Lk,formatHsl:Fk,formatRgb:hu,toString:hu});function lu(){return this.rgb().formatHex()}function Lk(){return this.rgb().formatHex8()}function Fk(){return gp(this).formatHsl()}function hu(){return this.rgb().formatRgb()}function Gs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kk.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?cu(t):r===3?new Me(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yo(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=wk.exec(e))?new Me(t[1],t[2],t[3],1):(t=Tk.exec(e))?new Me(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_k.exec(e))?yo(t[1],t[2],t[3],t[4]):(t=Sk.exec(e))?yo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vk.exec(e))?fu(t[1],t[2]/100,t[3]/100,1):(t=Bk.exec(e))?fu(t[1],t[2]/100,t[3]/100,t[4]):nu.hasOwnProperty(e)?cu(nu[e]):e==="transparent"?new Me(NaN,NaN,NaN,0):null}function cu(e){return new Me(e>>16&255,e>>8&255,e&255,1)}function yo(e,t,r,i){return i<=0&&(e=t=r=NaN),new Me(e,t,r,i)}function Ak(e){return e instanceof oo||(e=Gs(e)),e?(e=e.rgb(),new Me(e.r,e.g,e.b,e.opacity)):new Me}function dl(e,t,r,i){return arguments.length===1?Ak(e):new Me(e,t,r,i??1)}function Me(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}ih(Me,dl,pp(oo,{brighter(e){return e=e==null?Ko:Math.pow(Ko,e),new Me(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Us:Math.pow(Us,e),new Me(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Me(si(this.r),si(this.g),si(this.b),Qo(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:uu,formatHex:uu,formatHex8:Ek,formatRgb:du,toString:du}));function uu(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}`}function Ek(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}${ri((isNaN(this.opacity)?1:this.opacity)*255)}`}function du(){const e=Qo(this.opacity);return`${e===1?"rgb(":"rgba("}${si(this.r)}, ${si(this.g)}, ${si(this.b)}${e===1?")":`, ${e})`}`}function Qo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function si(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ri(e){return e=si(e),(e<16?"0":"")+e.toString(16)}function fu(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xe(e,t,r,i)}function gp(e){if(e instanceof Xe)return new Xe(e.h,e.s,e.l,e.opacity);if(e instanceof oo||(e=Gs(e)),!e)return new Xe;if(e instanceof Xe)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new Xe(a,n,l,e.opacity)}function Mk(e,t,r,i){return arguments.length===1?gp(e):new Xe(e,t,r,i??1)}function Xe(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}ih(Xe,Mk,pp(oo,{brighter(e){return e=e==null?Ko:Math.pow(Ko,e),new Xe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Us:Math.pow(Us,e),new Xe(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 Me(fn(e>=240?e-240:e+120,s,i),fn(e,s,i),fn(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Xe(pu(this.h),xo(this.s),xo(this.l),Qo(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=Qo(this.opacity);return`${e===1?"hsl(":"hsla("}${pu(this.h)}, ${xo(this.s)*100}%, ${xo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function pu(e){return e=(e||0)%360,e<0?e+360:e}function xo(e){return Math.max(0,Math.min(1,e||0))}function fn(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 sh=e=>()=>e;function mp(e,t){return function(r){return e+r*t}}function $k(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 a3(e,t){var r=t-e;return r?mp(e,r>180||r<-180?r-360*Math.round(r/360):r):sh(isNaN(e)?t:e)}function Ok(e){return(e=+e)==1?yp:function(t,r){return r-t?$k(t,r,e):sh(isNaN(t)?r:t)}}function yp(e,t){var r=t-e;return r?mp(e,r):sh(isNaN(e)?t:e)}const gu=(function e(t){var r=Ok(t);function i(s,o){var a=r((s=dl(s)).r,(o=dl(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=yp(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i})(1);function zr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var fl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pn=new RegExp(fl.source,"g");function Dk(e){return function(){return e}}function Ik(e){return function(t){return e(t)+""}}function Pk(e,t){var r=fl.lastIndex=pn.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=fl.exec(e))&&(s=pn.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:zr(i,s)})),r=pn.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?Ik(l[0].x):Dk(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)n[(u=l[h]).i]=u.x(c);return n.join("")})}var mu=180/Math.PI,pl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xp(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(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,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*mu,skewX:Math.atan(l)*mu,scaleX:a,scaleY:n}}var Co;function Rk(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?pl:xp(t.a,t.b,t.c,t.d,t.e,t.f)}function Nk(e){return e==null||(Co||(Co=document.createElementNS("http://www.w3.org/2000/svg","g")),Co.setAttribute("transform",e),!(e=Co.transform.baseVal.consolidate()))?pl:(e=e.matrix,xp(e.a,e.b,e.c,e.d,e.e,e.f))}function Cp(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,u,d,f,m){if(c!==u||h!==d){var y=f.push("translate(",null,t,null,r);m.push({i:y-4,x:zr(c,u)},{i:y-2,x:zr(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function a(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(s(u)+"rotate(",null,i)-2,x:zr(c,h)})):h&&u.push(s(u)+"rotate("+h+i)}function n(c,h,u,d){c!==h?d.push({i:u.push(s(u)+"skewX(",null,i)-2,x:zr(c,h)}):h&&u.push(s(u)+"skewX("+h+i)}function l(c,h,u,d,f,m){if(c!==u||h!==d){var y=f.push(s(f)+"scale(",null,",",null,")");m.push({i:y-4,x:zr(c,u)},{i:y-2,x:zr(h,d)})}else(u!==1||d!==1)&&f.push(s(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,d),a(c.rotate,h.rotate,u,d),n(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var m=-1,y=d.length,C;++m<y;)u[(C=d[m]).i]=C.x(f);return u.join("")}}}var qk=Cp(Rk,"px, ","px)","deg)"),zk=Cp(Nk,", ",")",")"),es=0,Ls=0,Cs=0,bp=1e3,Jo,Fs,ta=0,li=0,ba=0,Xs=typeof performance=="object"&&performance.now?performance:Date,kp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oh(){return li||(kp(Wk),li=Xs.now()+ba)}function Wk(){li=0}function ea(){this._call=this._time=this._next=null}ea.prototype=wp.prototype={constructor:ea,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?oh():+r)+(t==null?0:+t),!this._next&&Fs!==this&&(Fs?Fs._next=this:Jo=this,Fs=this),this._call=e,this._time=r,gl()},stop:function(){this._call&&(this._call=null,this._time=1/0,gl())}};function wp(e,t,r){var i=new ea;return i.restart(e,t,r),i}function Hk(){oh(),++es;for(var e=Jo,t;e;)(t=li-e._time)>=0&&e._call.call(void 0,t),e=e._next;--es}function yu(){li=(ta=Xs.now())+ba,es=Ls=0;try{Hk()}finally{es=0,Uk(),li=0}}function Yk(){var e=Xs.now(),t=e-ta;t>bp&&(ba-=t,ta=e)}function Uk(){for(var e,t=Jo,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:Jo=r);Fs=e,gl(i)}function gl(e){if(!es){Ls&&(Ls=clearTimeout(Ls));var t=e-li;t>24?(e<1/0&&(Ls=setTimeout(yu,e-Xs.now()-ba)),Cs&&(Cs=clearInterval(Cs))):(Cs||(ta=Xs.now(),Cs=setInterval(Yk,bp)),es=1,kp(yu))}}function xu(e,t,r){var i=new ea;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var jk=ep("start","end","cancel","interrupt"),Gk=[],Tp=0,Cu=1,ml=2,Io=3,bu=4,yl=5,Po=6;function ka(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Xk(e,r,{name:t,index:i,group:s,on:jk,tween:Gk,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Tp})}function ah(e,t){var r=Ke(e,t);if(r.state>Tp)throw new Error("too late; already scheduled");return r}function fr(e,t){var r=Ke(e,t);if(r.state>Io)throw new Error("too late; already running");return r}function Ke(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Xk(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=wp(o,0,r.time);function o(c){r.state=Cu,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,u,d,f;if(r.state!==Cu)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===Io)return xu(a);f.state===bu?(f.state=Po,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=Po,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(xu(function(){r.state===Io&&(r.state=bu,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=ml,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ml){for(r.state=Io,s=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=f);s.length=u+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=yl,1),u=-1,d=s.length;++u<d;)s[u].call(e,h);r.state===yl&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Po,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Vk(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>ml&&i.state<yl,i.state=Po,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function Zk(e){return this.each(function(){Vk(this,e)})}function Kk(e,t){var r,i;return function(){var s=fr(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function Qk(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=fr(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function Jk(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ke(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?Kk:Qk)(r,e,t))}function nh(e,t,r){var i=e._id;return e.each(function(){var s=fr(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Ke(s,i).value[t]}}function _p(e,t){var r;return(typeof t=="number"?zr:t instanceof Gs?gu:(r=Gs(t))?(t=r,gu):Pk)(e,t)}function t2(e){return function(){this.removeAttribute(e)}}function e2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function r2(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function i2(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function s2(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function o2(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function a2(e,t){var r=Ca(e),i=r==="transform"?zk:_p;return this.attrTween(e,typeof t=="function"?(r.local?o2:s2)(r,i,nh(this,"attr."+e,t)):t==null?(r.local?e2:t2)(r):(r.local?i2:r2)(r,i,t))}function n2(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function l2(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function h2(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&l2(e,o)),r}return s._value=t,s}function c2(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&n2(e,o)),r}return s._value=t,s}function u2(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=Ca(e);return this.tween(r,(i.local?h2:c2)(i,t))}function d2(e,t){return function(){ah(this,e).delay=+t.apply(this,arguments)}}function f2(e,t){return t=+t,function(){ah(this,e).delay=t}}function p2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?d2:f2)(t,e)):Ke(this.node(),t).delay}function g2(e,t){return function(){fr(this,e).duration=+t.apply(this,arguments)}}function m2(e,t){return t=+t,function(){fr(this,e).duration=t}}function y2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?g2:m2)(t,e)):Ke(this.node(),t).duration}function x2(e,t){if(typeof t!="function")throw new Error;return function(){fr(this,e).ease=t}}function C2(e){var t=this._id;return arguments.length?this.each(x2(t,e)):Ke(this.node(),t).ease}function b2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;fr(this,e).ease=r}}function k2(e){if(typeof e!="function")throw new Error;return this.each(b2(this._id,e))}function w2(e){typeof e!="function"&&(e=sp(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Br(i,this._parents,this._name,this._id)}function T2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,u=a[n]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;n<i;++n)a[n]=t[n];return new Br(a,this._parents,this._name,this._id)}function _2(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 S2(e,t,r){var i,s,o=_2(t)?ah:fr;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function v2(e,t){var r=this._id;return arguments.length<2?Ke(this.node(),r).on.on(e):this.each(S2(r,e,t))}function B2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function L2(){return this.on("end.remove",B2(this._id))}function F2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=eh(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,u,d=0;d<l;++d)(h=n[d])&&(u=e.call(h,h.__data__,d,n))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ka(c[d],t,r,d,c,Ke(h,r)));return new Br(o,this._parents,t,r)}function A2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ip(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,m=Ke(h,r),y=0,C=d.length;y<C;++y)(f=d[y])&&ka(f,t,r,y,d,m);o.push(d),a.push(h)}return new Br(o,a,t,r)}var E2=so.prototype.constructor;function M2(){return new E2(this._groups,this._parents)}function $2(e,t){var r,i,s;return function(){var o=ts(this,e),a=(this.style.removeProperty(e),ts(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function Sp(e){return function(){this.style.removeProperty(e)}}function O2(e,t,r){var i,s=r+"",o;return function(){var a=ts(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function D2(e,t,r){var i,s,o;return function(){var a=ts(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),ts(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function I2(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=fr(this,e),c=l.on,h=l.value[o]==null?n||(n=Sp(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function P2(e,t,r){var i=(e+="")=="transform"?qk:_p;return t==null?this.styleTween(e,$2(e,i)).on("end.style."+e,Sp(e)):typeof t=="function"?this.styleTween(e,D2(e,i,nh(this,"style."+e,t))).each(I2(this._id,e)):this.styleTween(e,O2(e,i,t),r).on("end.style."+e,null)}function R2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function N2(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&R2(e,a,r)),i}return o._value=t,o}function q2(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,N2(e,t,r??""))}function z2(e){return function(){this.textContent=e}}function W2(e){return function(){var t=e(this);this.textContent=t??""}}function H2(e){return this.tween("text",typeof e=="function"?W2(nh(this,"text",e)):z2(e==null?"":e+""))}function Y2(e){return function(t){this.textContent=e.call(this,t)}}function U2(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Y2(s)),t}return i._value=e,i}function j2(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,U2(e))}function G2(){for(var e=this._name,t=this._id,r=vp(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=Ke(l,t);ka(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Br(i,this._parents,e,r)}function X2(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=fr(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var V2=0;function Br(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function vp(){return++V2}var kr=so.prototype;Br.prototype={constructor:Br,select:F2,selectAll:A2,selectChild:kr.selectChild,selectChildren:kr.selectChildren,filter:w2,merge:T2,selection:M2,transition:G2,call:kr.call,nodes:kr.nodes,node:kr.node,size:kr.size,empty:kr.empty,each:kr.each,on:v2,attr:a2,attrTween:u2,style:P2,styleTween:q2,text:H2,textTween:j2,remove:L2,tween:Jk,delay:p2,duration:y2,ease:C2,easeVarying:k2,end:X2,[Symbol.iterator]:kr[Symbol.iterator]};function Z2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var K2={time:null,delay:0,duration:250,ease:Z2};function Q2(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 J2(e){var t,r;e instanceof Br?(t=e._id,e=e._name):(t=vp(),(r=K2).time=oh(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&ka(l,e,t,c,a,r||Q2(l,t));return new Br(i,this._parents,e,t)}so.prototype.interrupt=Zk;so.prototype.transition=J2;const xl=Math.PI,Cl=2*xl,Jr=1e-6,tw=Cl-Jr;function Bp(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function ew(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Bp;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class rw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Bp:ew(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,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,u=n-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Jr)if(!(Math.abs(u*l-c*h)>Jr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-a,m=s-n,y=l*l+c*c,C=f*f+m*m,x=Math.sqrt(y),k=Math.sqrt(d),w=o*Math.tan((xl-Math.acos((y+d-C)/(2*x*k)))/2),S=w/k,v=w/x;Math.abs(S-1)>Jr&&this._append`L${t+S*h},${r+S*u}`,this._append`A${o},${o},0,0,${+(u*f>h*m)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,u=1^a,d=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Jr||Math.abs(this._y1-h)>Jr)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%Cl+Cl),d>tw?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>Jr&&this._append`A${i},${i},0,${+(d>=xl)},${u},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}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 Ti(e){return function(){return e}}const n3=Math.abs,l3=Math.atan2,h3=Math.cos,c3=Math.max,u3=Math.min,d3=Math.sin,f3=Math.sqrt,ku=1e-12,lh=Math.PI,wu=lh/2,p3=2*lh;function g3(e){return e>1?0:e<-1?lh:Math.acos(e)}function m3(e){return e>=1?wu:e<=-1?-wu:Math.asin(e)}function iw(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 rw(t)}function sw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Lp(e){this._context=e}Lp.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 qs(e){return new Lp(e)}function ow(e){return e[0]}function aw(e){return e[1]}function nw(e,t){var r=Ti(!0),i=null,s=qs,o=null,a=iw(n);e=typeof e=="function"?e:e===void 0?ow:Ti(e),t=typeof t=="function"?t:t===void 0?aw:Ti(t);function n(l){var c,h=(l=sw(l)).length,u,d=!1,f;for(i==null&&(o=s(f=a())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(u,c,l),+t(u,c,l));if(f)return o=null,f+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ti(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ti(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ti(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class Fp{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 Ap(e){return new Fp(e,!0)}function Ep(e){return new Fp(e,!1)}function Ur(){}function ra(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 wa(e){this._context=e}wa.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:ra(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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bl(e){return new wa(e)}function Mp(e){this._context=e}Mp.prototype={areaStart:Ur,areaEnd:Ur,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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lw(e){return new Mp(e)}function $p(e){this._context=e}$p.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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hw(e){return new $p(e)}function Op(e,t){this._basis=new wa(e),this._beta=t}Op.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],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const cw=(function e(t){function r(i){return t===1?new wa(i):new Op(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ia(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 hh(e,t){this._context=e,this._k=(1-t)/6}hh.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:ia(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:ia(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 Dp=(function e(t){function r(i){return new hh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ch(e,t){this._context=e,this._k=(1-t)/6}ch.prototype={areaStart:Ur,areaEnd:Ur,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:ia(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 uw=(function e(t){function r(i){return new ch(i,t)}return r.tension=function(i){return e(+i)},r})(0);function uh(e,t){this._context=e,this._k=(1-t)/6}uh.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:ia(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 dw=(function e(t){function r(i){return new uh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function dh(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>ku){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>ku){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function Ip(e,t){this._context=e,this._alpha=t}Ip.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:dh(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 Pp=(function e(t){function r(i){return t?new Ip(i,t):new hh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Rp(e,t){this._context=e,this._alpha=t}Rp.prototype={areaStart:Ur,areaEnd:Ur,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:dh(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 fw=(function e(t){function r(i){return t?new Rp(i,t):new ch(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Np(e,t){this._context=e,this._alpha=t}Np.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:dh(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 pw=(function e(t){function r(i){return t?new Np(i,t):new uh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qp(e){this._context=e}qp.prototype={areaStart:Ur,areaEnd:Ur,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 gw(e){return new qp(e)}function Tu(e){return e<0?-1:1}function _u(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(Tu(o)+Tu(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function Su(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gn(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function sa(e){this._context=e}sa.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:gn(this,this._t0,Su(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,gn(this,Su(this,r=_u(this,e,t)),r);break;default:gn(this,this._t0,r=_u(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function zp(e){this._context=new Wp(e)}(zp.prototype=Object.create(sa.prototype)).point=function(e,t){sa.prototype.point.call(this,t,e)};function Wp(e){this._context=e}Wp.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,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function Hp(e){return new sa(e)}function Yp(e){return new zp(e)}function Up(e){this._context=e}Up.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=vu(e),s=vu(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(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 vu(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function jp(e){return new Up(e)}function Ta(e,t){this._context=e,this._t=t}Ta.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 Gp(e){return new Ta(e,.5)}function Xp(e){return new Ta(e,0)}function Vp(e){return new Ta(e,1)}function As(e,t,r){this.k=e,this.x=t,this.y=r}As.prototype={constructor:As,scale:function(e){return e===1?this:new As(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new As(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+")"}};As.prototype;var mw=p(e=>{var s;const{securityLevel:t}=Wt();let r=It("body");if(t==="sandbox"){const a=((s=It(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=It(a.body)}return r.select(`#${e}`)},"selectSvgElement"),yw=p(e=>{const{handDrawnSeed:t}=Wt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),xw=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),os=p(e=>{const t=Cw([...e.cssCompiledStyles||[],...e.cssStyles||[],...xw(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Cw=p(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"),Zp=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),bt=p(e=>{const{stylesArray:t}=os(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Zp(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),pt=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Wt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=os(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:bw(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),bw=p(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 kw=Object.freeze({left:0,top:0,width:16,height:16}),oa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Kp=Object.freeze({...kw,...oa}),ww=Object.freeze({...Kp,body:"",hidden:!1}),Tw=Object.freeze({width:null,height:null}),_w=Object.freeze({...Tw,...oa}),Sw=(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(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return mn(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return mn(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return mn(n,r)?n:null}return null},mn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function vw(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 Bu(e,t){const r=vw(e,t);for(const i in ww)i in oa?i in e&&!(i in r)&&(r[i]=oa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Bw(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function Lu(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Bu(i[n]||s[n],o)}return a(t),r.forEach(a),Bu(e,o)}function Lw(e,t){if(e.icons[t])return Lu(e,t,[]);const r=Bw(e,[t])[t];return r?Lu(e,t,r):null}const Fw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Aw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Fu(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(Fw);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=Aw.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function Ew(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function Mw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function $w(e,t,r){const i=Ew(e);return Mw(i.defs,t+i.content+r)}const Ow=e=>e==="unset"||e==="undefined"||e==="none";function Dw(e,t){const r={...Kp,...e},i={..._w,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,k=y.vFlip;let w=y.rotate;x?k?w+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):k&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=s.height/2+s.top,C.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,C.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),C.length&&(o=$w(o,'<g transform="'+C.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,u;a===null?(u=n===null?"1em":n==="auto"?c:n,h=Fu(u,l/c)):(h=a==="auto"?l:a,u=n===null?Fu(h,c/l):n==="auto"?c:n);const d={},f=(y,C)=>{Ow(C)||(d[y]=C.toString())};f("width",h),f("height",u);const m=[s.left,s.top,l,c];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:o}}const Iw=/\sid="(\S+)"/g,Au=new Map;function Pw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Au.get(e)||0;return Au.set(e,t+1),t?`${e}${t}`:e}function Rw(e){const t=[];let r;for(;r=Iw.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 o=Pw(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Nw(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>"}var qw={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},kl=new Map,Qp=new Map,zw=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(q.debug("Registering icon pack:",t.name),"loader"in t)Qp.set(t.name,t.loader);else if("icons"in t)kl.set(t.name,t.icons);else throw q.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Jp=p(async(e,t)=>{const r=Sw(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=kl.get(i);if(!s){const a=Qp.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},kl.set(i,s)}catch(n){throw q.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=Lw(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Ww=p(async e=>{try{return await Jp(e),!0}catch{return!1}},"isIconAvailable"),ao=p(async(e,t,r)=>{let i;try{i=await Jp(e,t==null?void 0:t.fallbackPrefix)}catch(a){q.error(a),i=qw}const s=Dw(i,t),o=Nw(Rw(s.body),{...s.attributes,...r});return ze(o,te())},"getIconSVG"),bo={},ce={},Eu;function Hw(){return Eu||(Eu=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.BLANK_URL=ce.relativeFirstCharacters=ce.whitespaceEscapeCharsRegex=ce.urlSchemeRegex=ce.ctrlCharactersRegex=ce.htmlCtrlEntityRegex=ce.htmlEntitiesRegex=ce.invalidProtocolRegex=void 0,ce.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ce.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ce.htmlCtrlEntityRegex=/&(newline|tab);/gi,ce.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ce.urlSchemeRegex=/^.+(:|&colon;)/gim,ce.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ce.relativeFirstCharacters=[".","/"],ce.BLANK_URL="about:blank"),ce}var Mu;function Yw(){if(Mu)return bo;Mu=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.sanitizeUrl=o;var e=Hw();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return bo}var Uw=Yw();function yn(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 jw(){}function tg(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function fh(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Gw="[object RegExp]",eg="[object String]",rg="[object Number]",ig="[object Boolean]",sg="[object Arguments]",Xw="[object Symbol]",Vw="[object Date]",Zw="[object Map]",Kw="[object Set]",Qw="[object Array]",Jw="[object ArrayBuffer]",tT="[object Object]",eT="[object DataView]",rT="[object Uint8Array]",iT="[object Uint8ClampedArray]",sT="[object Uint16Array]",oT="[object Uint32Array]",aT="[object Int8Array]",nT="[object Int16Array]",lT="[object Int32Array]",hT="[object Float32Array]",cT="[object Float64Array]",$u=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function ph(e){return typeof $u.Buffer<"u"&&$u.Buffer.isBuffer(e)}function uT(e){return Number.isSafeInteger(e)&&e>=0}function og(e){return e!=null&&typeof e!="function"&&uT(e.length)}function dT(e){return e==="__proto__"}function gh(e){return e==null||typeof e!="object"&&typeof e!="function"}function mh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fT(e,t){return Ei(e,void 0,e,new Map,t)}function Ei(e,t,r,i=new Map,s=void 0){const o=s==null?void 0:s(e,t,r,i);if(o!==void 0)return o;if(gh(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ei(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Ei(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Ei(n,void 0,r,i,s));return a}if(ph(e))return e.subarray();if(mh(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ei(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),Ue(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),Ue(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),Ue(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,Ue(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),Ue(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),Ue(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),Ue(a,e,r,i,s),a}if(typeof e=="object"&&pT(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),Ue(a,e,r,i,s),a}return e}function Ue(e,t,r=e,i,s){const o=[...Object.keys(t),...tg(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Ei(t[n],n,r,i,s))}}function pT(e){switch(fh(e)){case sg:case Qw:case Jw:case eT:case ig:case Vw:case hT:case cT:case aT:case nT:case lT:case Zw:case rg:case tT:case Gw:case Kw:case eg:case Xw:case rT:case iT:case sT:case oT:return!0;default:return!1}}function gT(e,t){return fT(e,(r,i,s,o)=>{if(typeof e=="object"){if(fh(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),Ue(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case rg:case eg:case ig:{const a=new e.constructor(e==null?void 0:e.valueOf());return Ue(a,e),a}case sg:{const a={};return Ue(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Ou(e){return gT(e)}function wl(e){return e!==null&&typeof e=="object"&&fh(e)==="[object Arguments]"}function Tl(e){return typeof e=="object"&&e!==null}function mT(e){return Tl(e)&&og(e)}function no(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(no.Cache||Map),r}no.Cache=Map;function Ro(e){return mh(e)}function yT(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function xT(e){if(gh(e))return e;if(Array.isArray(e)||mh(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function CT(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=No(s,a,i,new Map)}return s}function No(e,t,r,i){if(gh(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return xT(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...tg(t)];for(let o=0;o<s.length;o++){const a=s[o];if(dT(a))continue;let n=t[a],l=e[a];if(wl(n)&&(n={...n}),wl(l)&&(l={...l}),ph(n)&&(n=Ou(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let d=0;d<u.length;d++){const f=u[d];h[f]=l[f]}l=h}else if(mT(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||Tl(l)&&Tl(n)&&(yn(l)||yn(n)||Ro(l)||Ro(n))?e[a]=No(l,n,r,i):l==null&&yn(n)?e[a]=No({},n,r,i):l==null&&Ro(n)?e[a]=Ou(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function bT(e,...t){return CT(e,...t,jw)}function Du(e){if(e==null)return!0;if(og(e))return typeof e.splice!="function"&&typeof e!="string"&&!ph(e)&&!Ro(e)&&!wl(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return yT(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var kT="​",wT={curveBasis:bl,curveBasisClosed:lw,curveBasisOpen:hw,curveBumpX:Ap,curveBumpY:Ep,curveBundle:cw,curveCardinalClosed:uw,curveCardinalOpen:dw,curveCardinal:Dp,curveCatmullRomClosed:fw,curveCatmullRomOpen:pw,curveCatmullRom:Pp,curveLinear:qs,curveLinearClosed:gw,curveMonotoneX:Hp,curveMonotoneY:Yp,curveNatural:jp,curveStep:Gp,curveStepAfter:Vp,curveStepBefore:Xp},TT=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_T=p(function(e,t){const r=ag(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Uo(a),i=ue(i,[...a])}else i=r.args;if(!i)return;let s=Vl(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),ag=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${TT.source})(?=[}][%]{2}).*
129
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const a=[];for(;(o=Ns.exec(e))!==null;)if(o.index===Ns.lastIndex&&Ns.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const n=o[1]?o[1]:o[2],l=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:n,args:l})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(s){return q.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),ST=p(function(e){return e.replace(Ns,"")},"removeDirectives"),vT=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function yh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return wT[r]??t}p(yh,"interpolateToCurve");function ng(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Uw.sanitizeUrl(r):r}p(ng,"formatUrl");var BT=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){q.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function xh(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(xh,"distance");function lg(e){let t,r=0;e.forEach(s=>{r+=xh(s,t),t=s});const i=r/2;return Ch(e,i)}p(lg,"traverseEdge");function hg(e){return e.length===1?e[0]:lg(e)}p(hg,"calcLabelPosition");var Iu=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ch=p((e,t)=>{let r,i=t;for(const s of e){if(r){const o=xh(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Iu((1-a)*r.x+a*s.x,5),y:Iu((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),LT=p((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Ch(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function cg(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Ch(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}p(cg,"calcTerminalLabelPosition");function ug(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(ug,"getStylesFromArray");var Pu=0,FT=p(()=>(Pu++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Pu),"generateId");function dg(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}p(dg,"makeRandomHex");var AT=p(e=>dg(e.length),"random"),ET=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),MT=p(function(e,t){const r=t.text.replace(io.lineBreakRegex," "),[,i]=_a(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 o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),$T=no((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),io.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=Lr(`${a} `,r),c=Lr(o,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=OT(a,t,"-",r);s.push(o,...d),o=f}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),OT=no((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(Lr(c,i)>=t){const u=l+1,d=s.length===u,f=`${c}${r}`;o.push(d?c:f),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function fg(e,t){return bh(e,t).height}p(fg,"calculateTextHeight");function Lr(e,t){return bh(e,t).width}p(Lr,"calculateTextWidth");var bh=no((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=_a(r),a=["sans-serif",i],n=e.split(io.lineBreakRegex),l=[],c=It("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of a){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=ET();C.text=y||kT;const x=MT(h,C).style("font-size",o).style("font-weight",s).style("font-family",d),k=(x._groups||x)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),f=Math.round(k.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}l.push(m)}h.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}`),Zi,DT=(Zi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Zi,"InitIDGenerator"),Zi),ko,IT=p(function(e){return ko=ko||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ko.innerHTML=e,unescape(ko.textContent)},"entityDecode");function kh(e){return"str"in e}p(kh,"isDetailedError");var PT=p((e,t,r,i)=>{var o;if(!i)return;const s=(o=e.node())==null?void 0:o.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"),_a=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function wh(e,t){return bT({},e,t)}p(wh,"cleanAndMerge");var ke={assignWithDepth:ue,wrapLabel:$T,calculateTextHeight:fg,calculateTextWidth:Lr,calculateTextDimensions:bh,cleanAndMerge:wh,detectInit:_T,detectDirective:ag,isSubstringInArray:vT,interpolateToCurve:yh,calcLabelPosition:hg,calcCardinalityPosition:LT,calcTerminalLabelPosition:cg,formatUrl:ng,getStylesFromArray:ug,generateId:FT,random:AT,runFunc:BT,entityDecode:IT,insertTitle:PT,isLabelCoordinateInPath:pg,parseFontSize:_a,InitIDGenerator:DT},RT=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),jr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),y3=p((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function le(e){return e??null}p(le,"handleUndefinedAttr");function pg(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(pg,"isLabelCoordinateInPath");var qo={exports:{}},Ru=qo.exports,Nu;function NT(){return Nu||(Nu=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var d=u?h.bind(u):h;return this.reads.push(d),o(this),d},mutate:function(h,u){var d=u?h.bind(u):h;return this.writes.push(d),o(this),d},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function o(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var u=h.writes,d=h.reads,f;try{r("flushing reads",d.length),h.runTasks(d),r("flushing writes",u.length),h.runTasks(u)}catch(m){f=m}if(h.scheduled=!1,(d.length||u.length)&&o(h),f)if(r("task errored",f.message),h.catch)h.catch(f);else throw f}function n(h,u){var d=h.indexOf(u);return!!~d&&!!h.splice(d,1)}function l(h,u){for(var d in u)u.hasOwnProperty(d)&&(h[d]=u[d])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof Ru<"u"?Ru:globalThis)})(qo)),qo.exports}var qT=NT();const zT=Gl(qT);var xn={exports:{}},qu;function WT(){return qu||(qu=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,o=s.get(i);this.fastdom.clear(o),s.delete(i)}};function r(i,s,o,a){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(u,d){c=l[s](function(){n.delete(h);try{u(a?o.call(a):o())}catch(f){d(f)}},a)});return n.set(h,c),h}e.exports=t})()})(xn)),xn.exports}var HT=WT();const YT=Gl(HT);function Th(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pi=Th();function gg(e){pi=e}var zs={exec:()=>null};function Gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(ve.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var UT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ve={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")},jT=/^(?:[ \t]*(?:\n|$))+/,GT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,XT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,lo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,VT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_h=/(?:[*+-]|\d{1,9}[.)])/,mg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yg=Gt(mg).replace(/bull/g,_h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ZT=Gt(mg).replace(/bull/g,_h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,KT=/^[^\n]+/,vh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,QT=Gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),JT=Gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_h).getRegex(),Sa="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",Bh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,t_=Gt("^ {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",Bh).replace("tag",Sa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xg=Gt(Sh).replace("hr",lo).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",Sa).getRegex(),e_=Gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xg).getRegex(),Lh={blockquote:e_,code:GT,def:QT,fences:XT,heading:VT,hr:lo,html:t_,lheading:yg,list:JT,newline:jT,paragraph:xg,table:zs,text:KT},zu=Gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",lo).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",Sa).getRegex(),r_={...Lh,lheading:ZT,table:zu,paragraph:Gt(Sh).replace("hr",lo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zu).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",Sa).getRegex()},i_={...Lh,html:Gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Bh).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:zs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gt(Sh).replace("hr",lo).replace("heading",` *#{1,6} *[^
130
+ ]`).replace("lheading",yg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},s_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,o_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Cg=/^( {2,}|\\)\n(?!\s*$)/,a_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,va=/[\p{P}\p{S}]/u,Fh=/[\s\p{P}\p{S}]/u,bg=/[^\s\p{P}\p{S}]/u,n_=Gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fh).getRegex(),kg=/(?!~)[\p{P}\p{S}]/u,l_=/(?!~)[\s\p{P}\p{S}]/u,h_=/(?:[^\s\p{P}\p{S}]|~)/u,c_=Gt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",UT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),wg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,u_=Gt(wg,"u").replace(/punct/g,va).getRegex(),d_=Gt(wg,"u").replace(/punct/g,kg).getRegex(),Tg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",f_=Gt(Tg,"gu").replace(/notPunctSpace/g,bg).replace(/punctSpace/g,Fh).replace(/punct/g,va).getRegex(),p_=Gt(Tg,"gu").replace(/notPunctSpace/g,h_).replace(/punctSpace/g,l_).replace(/punct/g,kg).getRegex(),g_=Gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bg).replace(/punctSpace/g,Fh).replace(/punct/g,va).getRegex(),m_=Gt(/\\(punct)/,"gu").replace(/punct/g,va).getRegex(),y_=Gt(/^<(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(),x_=Gt(Bh).replace("(?:-->|$)","-->").getRegex(),C_=Gt("^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",x_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,b_=Gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",aa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_g=Gt(/^!?\[(label)\]\[(ref)\]/).replace("label",aa).replace("ref",vh).getRegex(),Sg=Gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",vh).getRegex(),k_=Gt("reflink|nolink(?!\\()","g").replace("reflink",_g).replace("nolink",Sg).getRegex(),Wu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ah={_backpedal:zs,anyPunctuation:m_,autolink:y_,blockSkip:c_,br:Cg,code:o_,del:zs,emStrongLDelim:u_,emStrongRDelimAst:f_,emStrongRDelimUnd:g_,escape:s_,link:b_,nolink:Sg,punctuation:n_,reflink:_g,reflinkSearch:k_,tag:C_,text:a_,url:zs},w_={...Ah,link:Gt(/^!?\[(label)\]\((.*?)\)/).replace("label",aa).getRegex(),reflink:Gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aa).getRegex()},_l={...Ah,emStrongRDelimAst:p_,emStrongLDelim:d_,url:Gt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wu).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:Gt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wu).getRegex()},T_={..._l,br:Gt(Cg).replace("{2,}","*").getRegex(),text:Gt(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wo={normal:Lh,gfm:r_,pedantic:i_},bs={normal:Ah,gfm:_l,breaks:T_,pedantic:w_},__={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hu=e=>__[e];function rr(e,t){if(t){if(ve.escapeTest.test(e))return e.replace(ve.escapeReplace,Hu)}else if(ve.escapeTestNoEncode.test(e))return e.replace(ve.escapeReplaceNoEncode,Hu);return e}function Yu(e){try{e=encodeURI(e).replace(ve.percentDecode,"%")}catch{return null}return e}function Uu(e,t){var o;let r=e.replace(ve.findPipe,(a,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(ve.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.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(ve.slashPipe,"|");return i}function ks(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 S_(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 ju(e,t,r,i,s){let o=t.href,a=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:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function v_(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
131
+ `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
132
+ `)}var na=class{constructor(t){Kt(this,"options");Kt(this,"rules");Kt(this,"lexer");this.options=t||pi}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:ks(i,`
133
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=v_(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=ks(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:ks(r[0],`
134
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ks(r[0],`
135
+ `).split(`
136
+ `),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
137
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
138
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
139
+ ${h}`:h,o=o?`${o}
140
+ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=d,i.length===0)break;let f=a.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let m=f,y=m.raw+`
141
+ `+i.join(`
142
+ `),C=this.blockquote(y);a[a.length-1]=C,s=s.substring(0,s.length-m.raw.length)+C.raw,o=o.substring(0,o.length-m.text.length)+C.text;break}else if((f==null?void 0:f.type)==="list"){let m=f,y=m.raw+`
143
+ `+i.join(`
144
+ `),C=this.list(y);a[a.length-1]=C,s=s.substring(0,s.length-f.raw.length)+C.raw,o=o.substring(0,o.length-m.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
145
+ `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
146
+ `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=t.split(`
147
+ `,1)[0],m=!d.trim(),y=0;if(this.options.pedantic?(y=2,u=d.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=d.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(h+=f+`
148
+ `,t=t.substring(f.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),w=this.rules.other.hrRegex(y),S=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),F=this.rules.other.htmlBeginRegex(y);for(;t;){let L=t.split(`
149
+ `,1)[0],A;if(f=L,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),A=f):A=f.replace(this.rules.other.tabCharGlobal," "),S.test(f)||v.test(f)||F.test(f)||k.test(f)||w.test(f))break;if(A.search(this.rules.other.nonSpaceChar)>=y||!f.trim())u+=`
150
+ `+A.slice(y);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(d)||v.test(d)||w.test(d))break;u+=`
151
+ `+f}!m&&!f.trim()&&(m=!0),h+=L+`
152
+ `,t=t.substring(L.length+1),d=A.slice(y)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));o.loose=u}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}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"):"",o=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:o}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Uu(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
153
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<i.length;l++)a.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:a.align[l]});for(let l of o)a.rows.push(Uu(l,a.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[h]})));return a}}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)===`
154
+ `?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 a=ks(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=S_(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=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)),ju(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return ju(i,o,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 o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,d=t.slice(0,o+s.index+u+n);if(Math.min(o,n)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}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),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw: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,o;if(r[2]==="@")s=r[0],o="mailto:"+s;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);s=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:s,href:o,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}}}},je=class Sl{constructor(t){Kt(this,"tokens");Kt(this,"options");Kt(this,"state");Kt(this,"tokenizer");Kt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||pi,this.options.tokenizer=this.options.tokenizer||new na,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:ve,block:wo.normal,inline:bs.normal};this.options.pedantic?(r.block=wo.pedantic,r.inline=bs.pedantic):this.options.gfm&&(r.block=wo.gfm,this.options.breaks?r.inline=bs.breaks:r.inline=bs.gfm),this.tokenizer.rules=r}static get rules(){return{block:wo,inline:bs}}static lex(t,r){return new Sl(r).lex(t)}static lexInline(t,r){return new Sl(r).inlineTokens(t)}lex(t){t=t.replace(ve.carriageReturn,`
155
+ `),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,o,a;for(this.options.pedantic&&(t=t.replace(ve.tabCharGlobal," ").replace(ve.spaceLine,""));t;){let n;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(c=>(n=c.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 c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
156
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
157
+ `)?"":`
158
+ `)+n.raw,c.text+=`
159
+ `+n.text,this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
160
+ `)?"":`
161
+ `)+n.raw,c.text+=`
162
+ `+n.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
163
+ `)?"":`
164
+ `)+n.raw,c.text+=`
165
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.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 c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
166
+ `)?"":`
167
+ `)+n.raw,c.text+=`
168
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,d;let i=t,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)f.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 o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let f;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(y=>(f=y.call({lexer:this},t,r))?(t=t.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let y=r.at(-1);f.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=f.raw,y.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(t,i,n)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),r.push(f);continue}let m=t;if((d=this.options.extensions)!=null&&d.startInline){let y=1/0,C=t.slice(1),x;this.options.extensions.startInline.forEach(k=>{x=k.call({lexer:this},C),typeof x=="number"&&x>=0&&(y=Math.min(y,x))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(f=this.tokenizer.inlineText(m)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(n=f.raw.slice(-1)),a=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=f.raw,y.text+=f.text):r.push(f);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},la=class{constructor(t){Kt(this,"options");Kt(this,"parser");this.options=t||pi}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let s=(a=(r||"").match(ve.notSpaceStart))==null?void 0:a[0],o=t.replace(ve.endingNewline,"")+`
169
+ `;return s?'<pre><code class="language-'+rr(s)+'">'+(i?o:rr(o,!0))+`</code></pre>
170
+ `:"<pre><code>"+(i?o:rr(o,!0))+`</code></pre>
171
+ `}blockquote({tokens:t}){return`<blockquote>
172
+ ${this.parser.parse(t)}</blockquote>
173
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
174
+ `}hr(t){return`<hr>
175
+ `}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 o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
176
+ `+s+"</"+o+`>
177
+ `}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+" "+rr(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>
178
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
179
+ `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
180
+ <thead>
181
+ `+r+`</thead>
182
+ `+s+`</table>
183
+ `}tablerow({text:t}){return`<tr>
184
+ ${t}</tr>
185
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
186
+ `}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>${rr(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),o=Yu(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+rr(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Yu(t);if(o===null)return rr(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${rr(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:rr(t.text)}},Eh=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""}},Ge=class vl{constructor(t){Kt(this,"options");Kt(this,"renderer");Kt(this,"textRenderer");this.options=t||pi,this.options.renderer=this.options.renderer||new la,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Eh}static parse(t,r){return new vl(r).parse(t)}static parseInline(t,r){return new vl(r).parseInline(t)}parse(t,r=!0){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let c=n,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";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 c=l,h=this.renderer.text(c);for(;a+1<t.length&&t[a+1].type==="text";)c=t[++a],h+=`
187
+ `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=c||"";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 c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Eo,Es=(Eo=class{constructor(t){Kt(this,"options");Kt(this,"block");this.options=t||pi}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?je.lex:je.lexInline}provideParser(){return this.block?Ge.parse:Ge.parseInline}},Kt(Eo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Kt(Eo,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Eo),B_=class{constructor(...t){Kt(this,"defaults",Th());Kt(this,"options",this.setOptions);Kt(this,"parse",this.parseMarkdown(!0));Kt(this,"parseInline",this.parseMarkdown(!1));Kt(this,"Parser",Ge);Kt(this,"Renderer",la);Kt(this,"TextRenderer",Eh);Kt(this,"Lexer",je);Kt(this,"Tokenizer",na);Kt(this,"Hooks",Es);this.use(...t)}walkTokens(t,r){var s,o;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let n=a;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=a;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=a;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let c=n[l].flat(1/0);i=i.concat(this.walkTokens(c,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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new la(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new na(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Es;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];Es.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&Es.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await l.call(o,h);return c.call(o,d)})();let u=l.call(o,h);return c.call(o,u)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(o,h);return d===!1&&(d=await c.apply(o,h)),d})();let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return je.lex(t,r??this.defaults)}parser(t,r){return Ge.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?je.lex:je.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?Ge.parse:Ge.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?je.lex:je.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?Ge.parse:Ge.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
188
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+rr(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},hi=new B_;function Vt(e,t){return hi.parse(e,t)}Vt.options=Vt.setOptions=function(e){return hi.setOptions(e),Vt.defaults=hi.defaults,gg(Vt.defaults),Vt};Vt.getDefaults=Th;Vt.defaults=pi;Vt.use=function(...e){return hi.use(...e),Vt.defaults=hi.defaults,gg(Vt.defaults),Vt};Vt.walkTokens=function(e,t){return hi.walkTokens(e,t)};Vt.parseInline=hi.parseInline;Vt.Parser=Ge;Vt.parser=Ge.parse;Vt.Renderer=la;Vt.TextRenderer=Eh;Vt.Lexer=je;Vt.lexer=je.lex;Vt.Tokenizer=na;Vt.Hooks=Es;Vt.parse=Vt;Vt.options;Vt.setOptions;Vt.use;Vt.walkTokens;Vt.parseInline;Ge.parse;je.lex;function vg(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 c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):n},[]);if(s.length){var o=new RegExp(`
189
+ [ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(o,`
190
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
191
+ `)&&(u=String(n).split(`
192
+ `).map(function(d,f){return f===0?d:""+h+d}).join(`
193
+ `)),a+=u+i[l+1]}),a}var Bl=typeof performance<"u"&&typeof performance.now=="function",_i=p(()=>Bl?performance.now():0,"now"),Cn="🧜 ",L_="Mermaid render",F_="Mermaid",A_={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Ki;Ki=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=_i();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(_i()-i)}}async tick(t,r){if(!this.enabled)return r();const i=_i();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(_i()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:_i(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Bl&&typeof performance.mark=="function")try{performance.mark(`${Cn}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=_i();if(t.duration=r-t.start,Bl&&typeof performance.measure=="function")try{performance.measure(`${Cn}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:L_,trackGroup:F_,color:A_[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,o=["ms % phase"],a=p((l,c)=>{const h=" ".repeat(c),u=l.duration.toFixed(1).padStart(8),d=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${u} ${d} ${h}${l.name}`);for(const f of l.children)a(f,c+1);if(l.children.length>0){const f=l.children.reduce((y,C)=>y+C.duration,0),m=l.duration-f;if(m>.5){const y=m.toFixed(1).padStart(8);o.push(`${y} ${h} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){o.push("—— buckets (summed) ——");for(const l of n)o.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${Cn}mermaid render profile · ${s}
194
+ ${o.join(`
195
+ `)}`)}},p(Ki,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var E_=zT.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(YT),ci=E_;function Bg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
196
+ `).replace(/\n{2,}/g,`
197
+ `);return vg(i)}p(Bg,"preprocessMarkdown");function Lg(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(Lg,"nonMarkdownToLines");function Fg(e,t={}){const r=Bg(e,t),i=Vt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
198
+ `).forEach((h,u)=>{u!==0&&(o++,s.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&s[o].push({content:d,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{a(c)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}p(Fg,"markdownToLines");function Ag(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Ag,"nonMarkdownToHTML");function Eg(e,{markdownAutoWrap:t}={}){const r=Vt.lexer(e);function i(s){var o,a,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>${(o=s.tokens)==null?void 0:o.map(i).join("")}</strong>`:s.type==="em"?`<em>${(a=s.tokens)==null?void 0:a.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:(q.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Eg,"markdownToHTML");function Mg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Mg,"splitTextToChars");function $g(e,t){const r=Mg(t.content);return Mh(e,[],r,t.type)}p($g,"splitWordToFitWidth");function Mh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Mh(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Mh,"splitWordToFitWidthRecursion");function Og(e,t){if(e.some(({content:r})=>r.includes(`
199
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ha(e,t)}p(Og,"splitLineToFitWidth");function ha(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 o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return ha(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=$g(t,o);r.push([n]),l.content&&e.unshift(l)}return ha(e,t,r)}p(ha,"splitLineToFitWidthRecursion");function Ll(e,t){t&&e.attr("style",t)}p(Ll,"applyStyle");var Gu=16384;async function Dg(e,t,r,i,s=!1,o=te()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Gu)}px`),a.attr("height",`${Math.min(10*r,Gu)}px`);const n=a.append("xhtml:div"),l=Ys(t.label)?await Qf(t.label.replace(io.lineBreakRegex,`
200
+ `),o):ze(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),Ll(h,t.labelStyle),h.attr("class",`${c} ${i}`),Ll(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"),(await ci.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}p(Dg,"addHtmlSpan");function Ba(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}p(Ba,"createTspan");function Ig(e,t,r){const i=e.append("text"),s=Ba(i,1,t);La(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}p(Ig,"computeWidthOfText");function M_(e,t,r){var a;const i=e.append("text"),s=Ba(i,1,t);La(s,[{content:r,type:"normal"}]);const o=(a=s.node())==null?void 0:a.getBoundingClientRect();return o&&i.remove(),o}p(M_,"computeDimensionOfText");function Pg(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(f=>Ig(a,1.1,f)<=e,"checkWidth"),d=u(h)?[h]:Og(h,u);for(const f of d){const m=Ba(l,c,1.1,s);La(m,f),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),a.node()}else return l.node()}p(Pg,"createFormattedText");function Fl(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(Fl,"decodeHTMLEntities");function La(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(Fl(r.content)):s.text(" "+Fl(r.content))})}p(La,"updateTextContentAndStyles");async function Rg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await Ww(n)?await ao(n,void 0,{class:"label-icon"}):`<i class='${ze(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Rg,"replaceIconSubstring");var Qe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(q.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const u=a?Eg(t,h):Ag(t),d=await Rg(jr(u),h),f=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Ys(t)?f:d,labelStyle:r.replace("fill:","color:")};return await Dg(e,m,l,s,c,h)}else{const u=jr(t.replace(/<br\s*\/?>/g,"<br/>")),d=a?Fg(u.replace("<br>","<br/>"),h):Lg(u),f=Pg(l,e,d,t?c:!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:");It(f).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");It(f).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");It(f).select("text").attr("style",y)}return i?It(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):It(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function bn(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function $_(e,t){return e[0]===t[0]&&e[1]===t[1]}function O_(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)bn(c,n,s);const l=(function(c,h,u){const d=[];for(const k of c){const w=[...k];$_(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const m=[];for(const k of d)for(let w=0;w<k.length-1;w++){const S=k[w],v=k[w+1];if(S[1]!==v[1]){const F=Math.min(S[1],v[1]);m.push({ymin:F,ymax:Math.max(S[1],v[1]),x:F===S[1]?S[0]:v[0],islope:(v[0]-S[0])/(v[1]-S[1])})}}if(m.sort(((k,w)=>k.ymin<w.ymin?-1:k.ymin>w.ymin?1:k.x<w.x?-1:k.x>w.x?1:k.ymax===w.ymax?0:(k.ymax-w.ymax)/Math.abs(k.ymax-w.ymax))),!m.length)return f;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let w=0;w<m.length&&!(m[w].ymin>C);w++)k=w;m.splice(0,k+1).forEach((w=>{y.push({s:C,edge:w})}))}if(y=y.filter((k=>!(k.edge.ymax<=C))),y.sort(((k,w)=>k.edge.x===w.edge.x?0:(k.edge.x-w.edge.x)/Math.abs(k.edge.x-w.edge.x))),(u!==1||x%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const w=k+1;if(w>=y.length)break;const S=y[k].edge,v=y[w].edge;f.push([[Math.round(S.x),C],[Math.round(v.x),C]])}C+=u,y.forEach((k=>{k.edge.x=k.edge.x+u*k.edge.islope})),x++}return f})(a,o,i);if(s){for(const c of a)bn(c,n,-s);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),bn(d,h,u)})(l,n,-s)}return l}function ho(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 o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),O_(e,s,i,o||1)}class $h{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ho(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 Fa(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 D_ extends $h{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ho(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)Fa([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class I_ extends $h{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class P_{constructor(t){this.helper=t}fillPolygons(t,r){const i=ho(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 o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=Fa(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,d=(n[0][0]+n[1][0])/2-s/4,f=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=f+u+m*s,C=d-a+2*Math.random()*a,x=y-a+2*Math.random()*a,k=this.helper.ellipse(C,x,o,o,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class R_{constructor(t){this.helper=t}fillPolygons(t,r){const i=ho(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,o=[];return t.forEach((a=>{const n=Fa(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],u=a[1];h[0]>u[0]&&(h=a[1],u=a[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const m=f*(i+s),y=m+i,C=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)],x=[h[0]+y*Math.cos(d)+c*Math.cos(d),h[1]+y*Math.sin(d)+c*Math.sin(d)];o.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),o}}class N_{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,o=ho(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=Fa(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const d=2*u*r,f=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),s}}const Fe={};class q_{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const z_=0,kn=1,Xu=2,To={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 wn(e,t){return e.type===t}function Oh(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:z_,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:kn,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Xu,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!wn(o,Xu);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Oh("M0,0"+e);s++,a=To[o.text],i=o.text}else wn(o,kn)?a=To[i]:(s++,a=To[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!wn(c,kn))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof To[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Ng(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function qg(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=s+(s-l)):(u=i,d=s),t.push({key:"C",data:[u,d,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,d]=h;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-n),m=s+(s-l)):(f=i,m=s);const y=i+2*(f-i)/3,C=s+2*(m-s)/3,x=u+2*(f-u)/3,k=d+2*(m-d)/3;t.push({key:"C",data:[y,C,x,k,u,d]}),n=f,l=m,i=u,s=d;break}case"Q":{const[u,d,f,m]=h,y=i+2*(u-i)/3,C=s+2*(d-s)/3,x=f+2*(u-f)/3,k=m+2*(d-m)/3;t.push({key:"C",data:[y,C,x,k,f,m]}),n=u,l=d,i=f,s=m;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],m=h[3],y=h[4],C=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(zg(i,s,C,x,u,d,f,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function ws(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function zg(e,t,r,i,s,o,a,n,l,c){const h=(u=a,Math.PI*u/180);var u;let d=[],f=0,m=0,y=0,C=0;if(c)[f,m,y,C]=c;else{[e,t]=ws(e,t,-h),[r,i]=ws(r,i,-h);const Y=(e-r)/2,$=(t-i)/2;let O=Y*Y/(s*s)+$*$/(o*o);O>1&&(O=Math.sqrt(O),s*=O,o*=O);const B=s*s,I=o*o,P=B*I-B*$*$-I*Y*Y,H=B*$*$+I*Y*Y,K=(n===l?-1:1)*Math.sqrt(Math.abs(P/H));y=K*s*$/o+(e+r)/2,C=K*-o*Y/s+(t+i)/2,f=Math.asin(parseFloat(((t-C)/o).toFixed(9))),m=Math.asin(parseFloat(((i-C)/o).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),l&&f>m&&(f-=2*Math.PI),!l&&m>f&&(m-=2*Math.PI)}let x=m-f;if(Math.abs(x)>120*Math.PI/180){const Y=m,$=r,O=i;m=l&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=zg(r=y+s*Math.cos(m),i=C+o*Math.sin(m),$,O,s,o,a,0,l,[m,Y,y,C])}x=m-f;const k=Math.cos(f),w=Math.sin(f),S=Math.cos(m),v=Math.sin(m),F=Math.tan(x/4),L=4/3*s*F,A=4/3*o*F,V=[e,t],W=[e+L*w,t-A*k],N=[r+L*v,i-A*S],at=[r,i];if(W[0]=2*V[0]-W[0],W[1]=2*V[1]-W[1],c)return[W,N,at].concat(d);{d=[W,N,at].concat(d);const Y=[];for(let $=0;$<d.length;$+=3){const O=ws(d[$][0],d[$][1],h),B=ws(d[$+1][0],d[$+1][1],h),I=ws(d[$+2][0],d[$+2][1],h);Y.push([O[0],O[1],B[0],B[1],I[0],I[1]])}return Y}}const W_={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return ca(e,t,r)},ellipse:function(e,t,r,i,s){const o=Hg(r,i,s);return Al(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Gr(e,t,r,i,s,!0)}};function Wg(e,t,r,i,s){return{type:"path",ops:Gr(e,t,r,i,s)}}function zo(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Gr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Gr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Wg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function H_(e,t,r,i,s){return(function(o,a){return zo(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Vu(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=_o(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:_o(r[0],1.5*(1+.22*t.roughness),Qu(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=_o(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:_o(a,1.5*(1+.22*t.roughness),Qu(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Hg(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)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=Mt(a*l,r),n+=Mt(n*l,r),{increment:o,rx:a,ry:n}}function Al(e,t,r,i){const[s,o]=Ju(i.increment,e,t,i.rx,i.ry,1,i.increment*ca(.1,ca(.4,1,r),r),r);let a=ua(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Ju(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ua(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Zu(e,t,r,i,s,o,a,n,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=Mt(.01*u,l),d+=Mt(.01*d,l);let f=s,m=o;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,C=Math.min(y/2,(m-f)/2),x=td(C,c,h,u,d,f,m,1,l);if(!l.disableMultiStroke){const k=td(C,c,h,u,d,f,m,1.5,l);x.push(...k)}return a&&(n?x.push(...Gr(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Gr(c,h,c+u*Math.cos(m),h+d*Math.sin(m),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function Ku(e,t){const r=qg(Ng(Oh(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Gr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,u,d,f]=n;i.push(...Y_(l,c,h,u,d,f,o,t)),o=[d,f];break}case"Z":i.push(...Gr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Tn(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+Mt(s,t),i[a][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function Si(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Fe[s])switch(s){case"zigzag":Fe[s]||(Fe[s]=new D_(i));break;case"cross-hatch":Fe[s]||(Fe[s]=new I_(i));break;case"dots":Fe[s]||(Fe[s]=new P_(i));break;case"dashed":Fe[s]||(Fe[s]=new R_(i));break;case"zigzag-line":Fe[s]||(Fe[s]=new N_(i));break;default:s="hachure",Fe[s]||(Fe[s]=new $h(i))}return Fe[s]})(t,W_).fillPolygons(e,t)}function Qu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Yg(e){return e.randomizer||(e.randomizer=new q_(e.seed||0)),e.randomizer.next()}function ca(e,t,r,i=1){return r.roughness*i*(Yg(r)*(t-e)+e)}function Mt(e,t,r=1){return ca(-e,e,t,r)}function Gr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=El(e,t,r,i,s,!0,!1);if(a)return n;const l=El(e,t,r,i,s,!0,!0);return n.concat(l)}function El(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,d=.2+.2*Yg(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=Mt(f,s,c),m=Mt(m,s,c);const y=[],C=()=>Mt(u,s,c),x=()=>Mt(h,s,c),k=s.preserveVertices;return a?y.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):y.push({op:"move",data:[e+(k?0:Mt(h,s,c)),t+(k?0:Mt(h,s,c))]}),a?y.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),m+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),m+t+2*(i-t)*d+C(),r+(k?0:C()),i+(k?0:C())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),m+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),m+t+2*(i-t)*d+x(),r+(k?0:x()),i+(k?0:x())]}),y}function _o(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return ua(i,null,r)}function ua(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=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];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[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(...El(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Ju(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=Mt(.5,n)-Math.PI/2;c.push([Mt(o,n)+t+.9*i*Math.cos(h-e),Mt(o,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[Mt(o,n)+t+i*Math.cos(d),Mt(o,n)+r+s*Math.sin(d)];l.push(f),c.push(f)}c.push([Mt(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),Mt(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([Mt(o,n)+t+.98*i*Math.cos(h+a),Mt(o,n)+r+.98*s*Math.sin(h+a)]),c.push([Mt(o,n)+t+.9*i*Math.cos(h+.5*a),Mt(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function td(e,t,r,i,s,o,a,n,l){const c=o+Mt(.1,l),h=[];h.push([Mt(n,l)+t+.9*i*Math.cos(c-e),Mt(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=a;u+=e)h.push([Mt(n,l)+t+i*Math.cos(u),Mt(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),ua(h,null,l)}function Y_(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(d?0:Mt(c[0],n)),a[1]+(d?0:Mt(c[0],n))]}),h=d?[s,o]:[s+Mt(c[f],n),o+Mt(c[f],n)],l.push({op:"bcurveTo",data:[e+Mt(c[f],n),t+Mt(c[f],n),r+Mt(c[f],n),i+Mt(c[f],n),h[0],h[1]]});return l}function Ts(e){return[...e]}function ed(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(Ts(e[0]),Ts(e[1]),Ts(e[2]),Ts(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 o=[],a=1-t;i.push(Ts(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Wo(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function U_(e,t,r){const i=Wo(t,r);if(i===0)return Wo(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)),Wo(e,ti(t,r,s))}function ti(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ml(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],d=n[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let m=3*h[1]-2*c[1]-d[1];m*=m;let y=3*u[0]-2*d[0]-c[0];y*=y;let C=3*u[1]-2*d[1]-c[1];return C*=C,f<y&&(f=y),m<C&&(m=C),f+m})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(Wo(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=ti(l,c,.5),f=ti(c,h,.5),m=ti(h,u,.5),y=ti(d,f,.5),C=ti(f,m,.5),x=ti(y,C,.5);Ml([l,d,y,x],0,r,s),Ml([x,C,m,u],0,r,s)}var o,a;return s}function j_(e,t){return da(e,0,e.length,t)}function da(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=U_(e[h],a,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(da(e,t,c+1,i,o),da(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function _n(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)Ml(e,3*o,t,i);return r&&r>0?da(i,0,i.length,r):i}const Oe="none";class fa{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,o){const a=this._o(o);return this._d("line",[Wg(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=H_(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Tn([c],a)):n.push(Si([c],a))}return a.stroke!==Oe&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Hg(i,s,a),c=Al(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Al(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(Si([c.estimatedPoints],a));return a.stroke!==Oe&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[zo(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],u=Zu(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Zu(t,r,i,s,o,a,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,m,y,C,x,k){const w=d,S=f;let v=Math.abs(m/2),F=Math.abs(y/2);v+=Mt(.01*v,k),F+=Mt(.01*F,k);let L=C,A=x;for(;L<0;)L+=2*Math.PI,A+=2*Math.PI;A-L>2*Math.PI&&(L=0,A=2*Math.PI);const V=(A-L)/k.curveStepCount,W=[];for(let N=L;N<=A;N+=V)W.push([w+v*Math.cos(N),S+F*Math.sin(N)]);return W.push([w+v*Math.cos(A),S+F*Math.sin(A)]),W.push([w,S]),Si([W],k)})(t,r,i,s,o,a,c));return c.stroke!==Oe&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=Vu(t,i);if(i.fill&&i.fill!==Oe)if(i.fillStyle==="solid"){const a=Vu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(..._n(ed([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(..._n(ed(c),10,(1+i.roughness)/2))}a.length&&s.push(Si([a],i))}return i.stroke!==Oe&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=zo(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Tn([t],i)):s.push(Si([t],i))),i.stroke!==Oe&&s.push(o),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 o=i.fill&&i.fill!=="transparent"&&i.fill!==Oe,a=i.stroke!==Oe,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=qg(Ng(Oh(h))),m=[];let y=[],C=[0,0],x=[];const k=()=>{x.length>=4&&y.push(..._n(x,u)),x=[]},w=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:v,data:F}of f)switch(v){case"M":w(),C=[F[0],F[1]],y.push(C);break;case"L":k(),y.push([F[0],F[1]]);break;case"C":if(!x.length){const L=y.length?y[y.length-1]:C;x.push([L[0],L[1]])}x.push([F[0],F[1]]),x.push([F[2],F[3]]),x.push([F[4],F[5]]);break;case"Z":k(),y.push([C[0],C[1]])}if(w(),!d)return m;const S=[];for(const v of m){const F=j_(v,d);F.length&&S.push(F)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Ku(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=Ku(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Tn(l,i));else s.push(Si(l,i));return a&&(n?l.forEach((h=>{s.push(zo(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Oe};break;case"fillPath":a={d:this.opsToPath(o),stroke:Oe,strokeWidth:0,fill:i.fill||Oe};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Oe,strokeWidth:i,fill:Oe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class G_{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new fa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,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 o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}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,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}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 So="http://www.w3.org/2000/svg";class X_{constructor(t,r){this.svg=t,this.gen=new fa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(So,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(So,"path"),l.setAttribute("d",this.opsToPath(n,a)),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(So,"path"),l.setAttribute("d",this.opsToPath(n,a)),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&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(So,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}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,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}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 mt={canvas:(e,t)=>new G_(e,t),svg:(e,t)=>new X_(e,t),generator:e=>new fa(e),newSeed:()=>fa.newSeed()},V_=1,Z_=3;async function Dh(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Ih(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=Wt().fontSize?Wt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=qf.fontSize]=_a(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}p(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}p(Dh,"configureLabelImages");function Ih(e){var r;return e.nodeType===Z_?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==V_||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Ih)}p(Ih,"hasTextBesidesImages");var rd=3,K_=32,Q_=p(async(e,t,r)=>{var x,k,w;const i=Wt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",le(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((x=t.label)==null?void 0:x[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(S=>({text:S,cssClass:"c4-descr"}))].filter(S=>S.text),l=t.width?Math.max(t.width-2*(t.padding??0),K_):((k=Wt().flowchart)==null?void 0:k.wrappingWidth)??200,h=((w=i.c4)==null?void 0:w.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async S=>{const v=o.append("g").attr("class",S.cssClass),F=await Qe(v,ze(jr(S.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return It(F).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),It(F).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),d=Math.max(...u.map(({box:S})=>S.width),0);let f=0;for(const{el:S,box:v}of u)S.attr("transform",`translate(${d/2-v.x-v.width/2}, ${f-v.y})`),f+=v.height+rd;const m=u.length>0?f-rd:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-d/2}, ${-m/2})`);const y=o.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:C,label:o}},"c4LabelHelper"),vt=p(async(e,t,r)=>{var f,m;if(t.stereotype!==void 0)return Q_(e,t,r);let i;const s=t.useHtmlLabels||dr((f=Wt())==null?void 0:f.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",le(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,c=t.labelType==="markdown",h=await Qe(a,ze(jr(n),Wt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((m=Wt().flowchart)==null?void 0:m.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Wt()),u=((t==null?void 0:t.padding)??0)/2;let d;if(s){const y=h.children[0],C=It(h);await Dh(y),d=await ci.measure(()=>y.getBoundingClientRect()),C.attr("width",d.width),C.attr("height",d.height)}else d=await ci.measure(()=>h.getBBox());return s?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:u,label:a}},"labelHelper"),Sn=p(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??we(Wt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Qe(s,ze(jr(t),Wt()),{useHtmlLabels:i,width:r.width||((c=(l=Wt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(we(Wt())){const h=o.children[0],u=It(o);n=await ci.measure(()=>h.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await ci.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),Ct=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Bt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Ut(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Ut,"createPathFromPoints");function Xr(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*l,C=d+s*Math.sin(u*(y-e));a.push({x:y,y:C})}return a}p(Xr,"generateFullSineWavePoints");function ar(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(ar,"generateCirclePoints");function $l(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"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=p((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p($l,"mergePaths");var J_=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),gi=J_,He=p((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"),tS=p(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=Wt(),n=we(a);return await Qe(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Wr=tS;function Ug(e,t){return e.intersect(t)}p(Ug,"intersectNode");var eS=Ug;function jg(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}p(jg,"intersectEllipse");var Gg=jg;function Xg(e,t,r){return Gg(e,t,t,r)}p(Xg,"intersectCircle");var rS=Xg;function Vg(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&Ol(n,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,m=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(m)<c&&Ol(f,m))return;const y=s*u-h*o;if(y===0)return;const C=Math.abs(y/2);let x=o*d-u*a;const k=x<0?(x-C)/y:(x+C)/y;x=h*a-s*d;const w=x<0?(x-C)/y:(x+C)/y;return{x:k,y:w}}}p(Vg,"intersectLine");function Ol(e,t){return e*t>0}p(Ol,"sameSign");var iS=Vg;function Zg(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=iS(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&o.push(f)}return o.length?(o.length>1&&o.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,m=Math.sqrt(d*d+f*f),y=u.x-r.x,C=u.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),o[0]):e}p(Zg,"intersectPolygon");var sS=Zg,ht={node:eS,circle:rS,ellipse:Gg,polygon:sS,rect:gi};function Kg(e,t){const{labelStyles:r}=bt(t);t.labelStyle=r;const i=Bt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=mt.svg(o),c=pt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),u=o.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",le(n)),Ct(t,u),t.intersect=function(d){return q.info("Circle intersect",t,a,d),ht.circle(t,a,d)},o}p(Kg,"anchor");function Dl(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/s,m=d/o,y=Math.sqrt(f**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=l+C*o*Math.sin(h)*(a?-1:1),k=c-C*s*Math.cos(h)*(a?-1:1),w=Math.atan2((t-k)/o,(e-x)/s);let v=Math.atan2((i-k)/o,(r-x)/s)-w;a&&v<0&&(v+=2*Math.PI),!a&&v>0&&(v-=2*Math.PI);const F=[];for(let L=0;L<20;L++){const A=L/19,V=w+A*v,W=x+s*Math.cos(V),N=k+o*Math.sin(V);F.push({x:W,y:N})}return F}p(Dl,"generateArcPoints");function Qg(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Qg,"calculateArcSagitta");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=p(V=>V+a,"calcTotalHeight"),l=p(V=>{const W=V/2;return[W/(2.5+V/50),W]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await vt(e,t,Bt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[d,f]=l(u),m=Qg(u,d,f),C=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+m-m,x=u,{cssStyles:k}=t,w=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...Dl(-C/2,-x/2,-C/2,x/2,d,f,!1),{x:C/2,y:x/2},...Dl(C/2,x/2,C/2,-x/2,d,f,!0)],S=mt.svg(c),v=pt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const F=Ut(w),L=S.path(F,v),A=c.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${d/2}, 0)`),Ct(t,A),t.intersect=function(V){return ht.polygon(t,w,V)},c}p(Jg,"bowTieRect");async function tm(e,t,{config:{themeVariables:r}}){var L;const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await vt(e,t,Bt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),d=Math.max(a.height+c*2+u,t.height??0),f=-d/2+u,m=d/2,y=h*.72,C=[`M${-h/2},${f}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${h/2},${f}`,`A${h/2},${u} 0 0 0 ${-h/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,k=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const V=mt.svg(o).path(C,pt(t,{}));(L=k.node())==null||L.appendChild(V),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Ct(t,k);const w=f+(m-f)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${w-a.height/2-(a.y-(a.top??0))})`);const S=12,v=p((A,V,W)=>Array.from({length:S+1},(N,at)=>{const Y=Math.PI-at*Math.PI/S;return{x:A*Math.cos(Y),y:V+W*u*Math.sin(Y)}}),"arc"),F=[...v(h/2,f,-1),...v(y/2,m,1).reverse()];return t.intersect=function(A){return ht.polygon(t,F,A)},o}p(tm,"bucket");var id=20,sd=8,oS=80,vn=8;async function em(e,t){const{themeVariables:r}=Wt(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:o}=bt(t),{shapeSvg:a,bbox:n}=await vt(e,t,Bt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,oS,(t==null?void 0:t.width)??0),u=Math.max(c+sd+id+l*2,(t==null?void 0:t.height)??0),d=-h/2,f=-u/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??we(Wt())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let C;if(t.look==="handDrawn"){const v=mt.svg(a),F=pt(t,{fill:i,stroke:s,fillStyle:"solid"}),L=v.path(He(d,f,h,u,vn),F);C=a.insert(()=>L,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",le(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",o).attr("rx",vn).attr("ry",vn).attr("x",d).attr("y",f).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const x=f+l+c+sd;a.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",x).attr("x2",d+h-8).attr("y2",x).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=x+id/2,w=2.5,S=10;for(let v=-1;v<=1;v++)a.append("circle").attr("class","collapsed-indicator").attr("cx",v*S).attr("cy",k).attr("r",w).attr("fill",s);return Ct(t,C),t.calcIntersect=function(v,F){return ht.rect(v,F)},t.intersect=function(v){return ht.rect(t,v)},a}p(em,"collapsedGroup");function pr(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+")")}p(pr,"insertPolygonShape");var aS=["right","left","up","down"],Ph="point",nS=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),lS=p(e=>aS.filter(t=>e.has(t)).join("|")||Ph,"getDirectionKey"),od={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[Ph]:()=>[{x:0,y:0}]},hS=p((e,t,r,i)=>{const s=nS(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,l=i??t.width+2*n+2*o,c=lS(s);return(od[c]??od[Ph])({height:a,midpoint:n,padding:o,width:l})},"getArrowPoints");async function rm(e,t){const r=t,{shapeSvg:i,bbox:s}=await vt(e,r,Bt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,l=s.width+2*n+o,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,d=hS(r.directions??[],s,r,u),f=pr(i,u,a,d);return f.attr("style",r.style??null),Ct(r,f),r.intersect=function(m){return ht.polygon(r,d,m)},i}p(rm,"block_arrow");async function im(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await vt(e,t,Bt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=mt.svg(o).path(He(-d/2,m,d,f,u),pt(t,{}));(k=C.node())==null||k.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);C.append("line").attr("x1",-d/2).attr("y1",m+h).attr("x2",d/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let w=0;w<3;w++)C.append("circle").attr("cx",-d/2+12+w*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",m+4).attr("width",Math.max(d-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Ct(t,C);const x=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(w){return ht.rect(t,w)},o}p(im,"browser");var vo=12;async function sm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o+vo),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),u=0,d=c,f=-h,m=0,y=[{x:u+vo,y:f},{x:d,y:f},{x:d,y:m},{x:u,y:m},{x:u,y:f+vo},{x:u+vo,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=mt.svg(n),w=pt(t,{}),S=Ut(y),v=k.path(S,w);C=n.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=pr(n,c,h,y);return i&&C.attr("style",i),Ct(t,C),t.intersect=function(k){return ht.polygon(t,y,k)},n}p(sm,"card");function om(e,t){const{nodeStyles:r}=bt(t);t.label="";const i=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=mt.svg(i),l=pt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Ut(a),h=n.path(c,l),u=i.insert(()=>h,":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(d){return ht.polygon(t,a,d)},i}p(om,"choice");async function Rh(e,t,r){const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await vt(e,t,Bt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=mt.svg(o),m=pt(t,{}),y=f.circle(0,0,h*2,m);u=o.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",le(d))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return Ct(t,u),t.calcIntersect=function(f,m){const y=f.width/2;return ht.circle(f,y,m)},t.intersect=function(f){return q.info("Circle intersect",t,h,f),ht.circle(t,h,f)},o}p(Rh,"circle");async function am(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await vt(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:o.width+l,h=r.positioned?r.height??0:o.height+l,u=r.positioned?-c/2:-o.width/2-a,d=r.positioned?-h/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",c).attr("height",h),Ct(r,n),r.intersect=function(f){return ht.rect(r,f)},s}p(am,"composite");async function nm(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await vt(e,t,Bt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=mt.svg(o).path(He(-d/2,m,d,f,u),pt(t,{}));(k=C.node())==null||k.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);C.append("text").attr("x",-d/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Ct(t,C);const x=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(w){return ht.rect(t,w)},o}p(nm,"consoleWindow");function lm(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},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
201
+ M ${s.x},${s.y} L ${a.x},${a.y}`}p(lm,"createLine");function hm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,n=mt.svg(s),l=pt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=lm(o),u=n.path(h,l),d=s.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Ct(t,d),t.intersect=function(f){return q.info("crossedCircle intersect",t,{radius:o,point:f}),ht.circle(t,o,f)},s}p(hm,"crossedCircle");function wr(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(wr,"generateCirclePoints");async function cm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...wr(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...wr(c/2+u*2,-u,u,20,-180,-270),...wr(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...wr(c/2,h/2,u,20,0,90)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...wr(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...wr(c/2+c*.1,-u,u,20,-180,-270),...wr(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...wr(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=mt.svg(s),C=pt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Ut(f).replace("Z",""),w=y.path(k,C),S=Ut(m),v=y.path(S,{...C}),F=s.insert("g",":first-child");return F.insert(()=>v,":first-child").attr("stroke-opacity",0),F.insert(()=>w,":first-child"),F.attr("class","text"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-c/2+u-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Ct(t,F),t.intersect=function(L){return ht.polygon(t,m,L)},s}p(cm,"curlyBraceLeft");function Tr(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:f,y:m})}return a}p(Tr,"generateCirclePoints");async function um(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...Tr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...Tr(c/2+u*2,-u,u,20,-180,-270),...Tr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...Tr(c/2,h/2,u,20,0,90)],m=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...Tr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...Tr(c/2+u*2,-u,u,20,-180,-270),...Tr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...Tr(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=mt.svg(s),C=pt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Ut(f).replace("Z",""),w=y.path(k,C),S=Ut(m),v=y.path(S,{...C}),F=s.insert("g",":first-child");return F.insert(()=>v,":first-child").attr("stroke-opacity",0),F.insert(()=>w,":first-child"),F.attr("class","text"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Ct(t,F),t.intersect=function(L){return ht.polygon(t,m,L)},s}p(um,"curlyBraceRight");function me(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(me,"generateCirclePoints");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...me(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...me(c/2+u*2,-u,u,20,-180,-270),...me(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...me(c/2,h/2,u,20,0,90)],m=[...me(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...me(-c/2-u/2,-u,u,20,0,90),...me(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...me(-c/2+u+u/2,h/2,u,30,-180,-270)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...me(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...me(c/2+u*2,-u,u,20,-180,-270),...me(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...me(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...me(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...me(-c/2-u/2,-u,u,20,0,90),...me(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...me(-c/2+u+u/2,h/2,u,30,-180,-270)],C=mt.svg(s),x=pt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=Ut(f).replace("Z",""),S=C.path(w,x),F=Ut(m).replace("Z",""),L=C.path(F,x),A=Ut(y),V=C.path(A,{...x}),W=s.insert("g",":first-child");return W.insert(()=>V,":first-child").attr("stroke-opacity",0),W.insert(()=>S,":first-child"),W.insert(()=>L,":first-child"),W.attr("class","text"),d&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Ct(t,W),t.intersect=function(N){return ht.polygon(t,y,N)},s}p(dm,"curlyBraces");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await vt(e,t,Bt(t)),u=Math.max(n,(h.width+o*2)*1.25,(t==null?void 0:t.width)??0),d=Math.max(l,h.height+a*2,(t==null?void 0:t.height)??0),f=d/2,{cssStyles:m}=t,y=mt.svg(c),C=pt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=u,k=d,w=x-f,S=k/4,v=[{x:w,y:0},{x:S,y:0},{x:0,y:k/2},{x:S,y:k},{x:w,y:k},...ar(-w,-k/2,f,50,270,90)],F=Ut(v),L=y.path(F,C),A=c.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(${-u/2}, ${-d/2})`),Ct(t,A),t.intersect=function(V){return ht.polygon(t,v,V)},c}p(fm,"curvedTrapezoid");async function pm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=t.padding??20,l=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(o.height+n*2,t.height?t.height-(2*c-h):0),d=Math.min(l*.177,u*.45),f=u+2*c-h,m=-f/2,y=m+2*c-h,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const A=mt.svg(s),V=pt(t,{}),W=A.path(He(-l/2,y,l,u,d),V),N=A.circle(0,m+c,c*2,V);C.insert(()=>N,":first-child"),C.insert(()=>W,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);Ct(t,C);const k=y+u/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${k-o.height/2-(o.y-(o.top??0))})`);const w=m+c,S=Math.asin(Math.min(1,(y-w)/c))*180/Math.PI,L=[...ar(0,-w,c,24,180+S,-S),...ar(-(-l/2+d),-(y+d),d,12,90,0),...ar(-(-l/2+d),-(f/2-d),d,12,360,270),...ar(-(l/2-d),-(f/2-d),d,12,270,180),...ar(-(l/2-d),-(y+d),d,12,180,90)];return t.intersect=function(A){return ht.polygon(t,L,A)},s}p(pm,"person");var cS=p((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),uS=p((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),dS=p((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ad=8,nd=8;async function gm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<nd&&(t.width=nd)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-o-k*3,t.height<ad&&(t.height=ad)}const{shapeSvg:l,bbox:c,label:h}=await vt(e,t,Bt(t)),u=Math.max(t.width??0,c.width)+a,d=u/2,f=d/(2.5+u/50),m=Math.max(t.height??0,c.height)+o+f;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=mt.svg(l),k=uS(0,0,u,m,d,f),w=dS(0,f,u,m,d,f),S=pt(t,{}),v=x.path(k,S),F=x.path(w,pt(t,{fill:"none"}));y=l.insert(()=>F,":first-child"),y=l.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=cS(0,0,u,m,d,f);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",le(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-u/2}, ${-(m/2+f)})`),Ct(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=ht.rect(t,x),w=k.x-(t.x??0);if(d!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let S=f*f*(1-w*w/(d*d));S>0&&(S=Math.sqrt(S)),S=f-S,x.y-(t.y??0)>0&&(S=-S),k.y+=S}return k},l}p(gm,"cylinder");async function as(e,t,r){const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await vt(e,t,Bt(t)),n=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const y=mt.svg(o),C=pt(t,{}),x=d||f?y.path(He(c,h,n,l,d||0),C):y.rectangle(c,h,n,l,C);u=o.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",le(m))}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",le(d)).attr("ry",le(f)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,C){return ht.rect(y,C)},t.intersect=function(y){return ht.rect(t,y)},o}p(as,"drawRect");async function mm(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await as(e,t,l);if(t.look==="handDrawn"){const f=mt.svg(c),m=pt(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||a)??0,d=(Number(h.attr("height"))||n)??0;return u>0&&d>0&&h.attr("stroke-dasharray",`${u} ${d}`),c}p(mm,"datastore");async function ym(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await vt(e,t,Bt(t)),c=n.width+s,h=n.height+o,u=h*.2,d=-c/2,f=-h/2-u/2,{cssStyles:m}=t,y=mt.svg(a),C=pt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],k=y.polygon(x.map(S=>[S.x,S.y]),C),w=a.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Ct(t,w),t.intersect=function(S){return ht.rect(t,S)},a}p(ym,"dividedRectangle");async function xm(e,t){var f,m;const{labelStyles:r,nodeStyles:i}=bt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(a??0),h=c-s;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=mt.svg(n),C=pt(t,{roughness:.2,strokeWidth:2.5}),x=pt(t,{roughness:.2,strokeWidth:1.5}),k=y.circle(0,0,c*2,C),w=y.circle(0,0,h*2,x);u=n.insert("g",":first-child"),u.attr("class",le(t.cssClasses)).attr("style",le(d)),(f=u.node())==null||f.appendChild(k),(m=u.node())==null||m.appendChild(w)}else{u=n.insert("g",":first-child");const y=u.insert("circle",":first-child"),C=u.insert("circle");u.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Ct(t,u),t.intersect=function(y){return q.info("DoubleCircle intersect",t,c,y),ht.circle(t,c,y)},n}p(xm,"doublecircle");function Cm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=bt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=mt.svg(o),{nodeBorder:c}=r,h=pt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,a*2,h),d=o.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),Ct(t,d),t.intersect=function(f){return q.info("filledCircle intersect",t,{radius:a,point:f}),ht.circle(t,a,f)},o}p(Cm,"filledCircle");var ld=10,hd=10;async function bm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<ld&&(t.height=ld),t.width=((t==null?void 0:t.width)??0)-o-o/2,t.width<hd&&(t.width=hd));const{shapeSvg:a,bbox:n,label:l}=await vt(e,t,Bt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(o??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,d=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:f}=t,m=mt.svg(a),y=pt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Ut(d),x=m.path(C,y),k=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,Ct(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(w){return q.info("Triangle intersect",t,d,w),ht.polygon(t,d,w)},a}p(bm,"flippedTriangle");async function km(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=t.padding??12,l=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),d=u-h,f=Math.max(l*.38,28),m=-u/2,y=[{x:-l/2,y:m},{x:-l/2+f,y:m},{x:-l/2+f,y:m+h},{x:l/2,y:m+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(S=>`L${S.x},${S.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const v=mt.svg(s).path(C,pt(t,{}));k=s.insert(()=>v,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ct(t,k):Ct(t,k,{width:l,height:u});const w=m+h+d/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${w-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.polygon(t,y,S)},s}p(km,"folder");function wm(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=bt(t);t.label="";const a=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,d=mt.svg(a),f=pt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=d.rectangle(h,u,l,c,f),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),Ct(t,y);const C=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return ht.rect(t,x)},a}p(wm,"forkJoin");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=15,o=10,a=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<o&&(t.height=o),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+a*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(o,c.height))+n*2,d=u/2,{cssStyles:f}=t,m=mt.svg(l),y=pt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:-u/2},{x:h/2-d,y:-u/2},...ar(-h/2+d,0,d,50,90,270),{x:h/2-d,y:u/2},{x:-h/2,y:u/2}],x=Ut(C),k=m.path(x,y),w=l.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),Ct(t,w),t.intersect=function(S){return q.info("Pill intersect",t,{radius:d,point:S}),ht.polygon(t,C,S)},l}p(Tm,"halfRoundedRectangle");var fS=p((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 _m(e,t){const{labelStyles:r,nodeStyles:i}=bt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const w=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*w-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await vt(e,t,Bt(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,f=d/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-d/2},{x:m-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=mt.svg(h),w=pt(t,{}),S=fS(0,0,m,d,f),v=k.path(S,w);C=h.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),x&&C.attr("style",x)}else C=pr(h,m,d,y);return i&&C.attr("style",i),t.width=m,t.height=d,Ct(t,C),t.intersect=function(k){return ht.polygon(t,y,k)},h}p(_m,"hexagon");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await vt(e,t,Bt(t)),o=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=mt.svg(s),c=pt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],u=Ut(h),d=l.path(u,c),f=s.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-o/2}, ${-a/2})`),Ct(t,f),t.intersect=function(m){return q.info("Pill intersect",t,{points:h}),ht.polygon(t,h,m)},s}p(Sm,"hourglass");async function vm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=bt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await vt(e,t,"icon-shape default"),d=t.pos==="t",f=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=os(t),x=-m/2,k=-f/2,w=t.label?8:0,S=mt.svg(c),v=pt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const F=S.rectangle(x,k,m,f,v),L=Math.max(m,h.width),A=f+h.height+w,V=S.rectangle(-L/2,-A/2,L,A,{...v,fill:"transparent",stroke:"none"}),W=c.insert(()=>F,":first-child"),N=c.insert(()=>V);if(t.icon){const at=c.append("g");at.html(`<g>${await ao(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const Y=at.node().getBBox(),$=Y.width,O=Y.height,B=Y.x,I=Y.y;at.attr("transform",`translate(${-$/2-B},${d?h.height/2+w/2-O/2-I:-h.height/2-w/2-O/2-I})`),at.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Ct(t,N),t.intersect=function(at){if(q.info("iconSquare intersect",t,at),!t.label)return ht.rect(t,at);const Y=t.x??0,$=t.y??0,O=t.height??0;let B=[];return d?B=[{x:Y-h.width/2,y:$-O/2},{x:Y+h.width/2,y:$-O/2},{x:Y+h.width/2,y:$-O/2+h.height+w},{x:Y+m/2,y:$-O/2+h.height+w},{x:Y+m/2,y:$+O/2},{x:Y-m/2,y:$+O/2},{x:Y-m/2,y:$-O/2+h.height+w},{x:Y-h.width/2,y:$-O/2+h.height+w}]:B=[{x:Y-m/2,y:$-O/2},{x:Y+m/2,y:$-O/2},{x:Y+m/2,y:$-O/2+f},{x:Y+h.width/2,y:$-O/2+f},{x:Y+h.width/2/2,y:$+O/2},{x:Y-h.width/2,y:$+O/2},{x:Y-h.width/2,y:$-O/2+f},{x:Y-m/2,y:$-O/2+f}],ht.polygon(t,B,at)},c}p(vm,"icon");async function Bm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=bt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await vt(e,t,"icon-shape default"),d=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=os(t),k=mt.svg(c),w=pt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=x.get("fill");w.stroke=S??C;const v=c.append("g");t.icon&&v.html(`<g>${await ao(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=v.node().getBBox(),L=F.width,A=F.height,V=F.x,W=F.y,N=Math.max(L,A)*Math.SQRT2+d*2,at=k.circle(0,0,N,w),Y=Math.max(N,h.width),$=N+h.height+f,O=k.rectangle(-Y/2,-$/2,Y,$,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>at,":first-child"),I=c.insert(()=>O);return v.attr("transform",`translate(${-L/2-V},${m?h.height/2+f/2-A/2-W:-h.height/2-f/2-A/2-W})`),v.attr("style",`color: ${x.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-$/2:$/2-h.height})`),B.attr("transform",`translate(0,${m?h.height/2+f/2:-h.height/2-f/2})`),Ct(t,I),t.intersect=function(P){return q.info("iconSquare intersect",t,P),ht.rect(t,P)},c}p(Bm,"iconCircle");async function Lm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=bt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await vt(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=os(t),w=-y/2,S=-m/2,v=t.label?8:0,F=mt.svg(c),L=pt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=k.get("fill");L.stroke=A??x;const V=F.path(He(w,S,y,m,5),L),W=Math.max(y,h.width),N=m+h.height+v,at=F.rectangle(-W/2,-N/2,W,N,{...L,fill:"transparent",stroke:"none"}),Y=c.insert(()=>V,":first-child").attr("class","icon-shape2"),$=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await ao(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=O.node().getBBox(),I=B.width,P=B.height,H=B.x,K=B.y;O.attr("transform",`translate(${-I/2-H},${f?h.height/2+v/2-P/2-K:-h.height/2-v/2-P/2-K})`),O.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-N/2:N/2-h.height})`),Y.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Ct(t,$),t.intersect=function(O){if(q.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const B=t.x??0,I=t.y??0,P=t.height??0;let H=[];return f?H=[{x:B-h.width/2,y:I-P/2},{x:B+h.width/2,y:I-P/2},{x:B+h.width/2,y:I-P/2+h.height+v},{x:B+y/2,y:I-P/2+h.height+v},{x:B+y/2,y:I+P/2},{x:B-y/2,y:I+P/2},{x:B-y/2,y:I-P/2+h.height+v},{x:B-h.width/2,y:I-P/2+h.height+v}]:H=[{x:B-y/2,y:I-P/2},{x:B+y/2,y:I-P/2},{x:B+y/2,y:I-P/2+m},{x:B+h.width/2,y:I-P/2+m},{x:B+h.width/2/2,y:I+P/2},{x:B-h.width/2,y:I+P/2},{x:B-h.width/2,y:I-P/2+m},{x:B-y/2,y:I-P/2+m}],ht.polygon(t,H,O)},c}p(Lm,"iconRounded");async function Fm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=bt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await vt(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=os(t),w=-y/2,S=-m/2,v=t.label?8:0,F=mt.svg(c),L=pt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=k.get("fill");L.stroke=A??x;const V=F.path(He(w,S,y,m,.1),L),W=Math.max(y,h.width),N=m+h.height+v,at=F.rectangle(-W/2,-N/2,W,N,{...L,fill:"transparent",stroke:"none"}),Y=c.insert(()=>V,":first-child"),$=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await ao(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=O.node().getBBox(),I=B.width,P=B.height,H=B.x,K=B.y;O.attr("transform",`translate(${-I/2-H},${f?h.height/2+v/2-P/2-K:-h.height/2-v/2-P/2-K})`),O.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-N/2:N/2-h.height})`),Y.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Ct(t,$),t.intersect=function(O){if(q.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const B=t.x??0,I=t.y??0,P=t.height??0;let H=[];return f?H=[{x:B-h.width/2,y:I-P/2},{x:B+h.width/2,y:I-P/2},{x:B+h.width/2,y:I-P/2+h.height+v},{x:B+y/2,y:I-P/2+h.height+v},{x:B+y/2,y:I+P/2},{x:B-y/2,y:I+P/2},{x:B-y/2,y:I-P/2+h.height+v},{x:B-h.width/2,y:I-P/2+h.height+v}]:H=[{x:B-y/2,y:I-P/2},{x:B+y/2,y:I-P/2},{x:B+y/2,y:I-P/2+m},{x:B+h.width/2,y:I-P/2+m},{x:B+h.width/2/2,y:I+P/2},{x:B-h.width/2,y:I+P/2},{x:B-h.width/2,y:I-P/2+m},{x:B-y/2,y:I-P/2+m}],ht.polygon(t,H,O)},c}p(Fm,"iconSquare");async function Am(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","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=bt(t);t.labelStyle=a;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),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:f}=await vt(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-h/2,x=t.label?8:0,k=mt.svg(u),w=pt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=k.rectangle(y,C,c,h,w),v=Math.max(c,d.width),F=h+d.height+x,L=k.rectangle(-v/2,-F/2,v,F,{...w,fill:"none",stroke:"none"}),A=u.insert(()=>S,":first-child"),V=u.insert(()=>L);if(t.img){const W=u.append("image");W.attr("href",t.img),W.attr("width",c),W.attr("height",h),W.attr("preserveAspectRatio","none"),W.attr("transform",`translate(${-c/2},${m?F/2-h:-F/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),A.attr("transform",`translate(0,${m?d.height/2+x/2:-d.height/2-x/2})`),Ct(t,V),t.intersect=function(W){if(q.info("iconSquare intersect",t,W),!t.label)return ht.rect(t,W);const N=t.x??0,at=t.y??0,Y=t.height??0;let $=[];return m?$=[{x:N-d.width/2,y:at-Y/2},{x:N+d.width/2,y:at-Y/2},{x:N+d.width/2,y:at-Y/2+d.height+x},{x:N+c/2,y:at-Y/2+d.height+x},{x:N+c/2,y:at+Y/2},{x:N-c/2,y:at+Y/2},{x:N-c/2,y:at-Y/2+d.height+x},{x:N-d.width/2,y:at-Y/2+d.height+x}]:$=[{x:N-c/2,y:at-Y/2},{x:N+c/2,y:at-Y/2},{x:N+c/2,y:at-Y/2+h},{x:N+d.width/2,y:at-Y/2+h},{x:N+d.width/2/2,y:at+Y/2},{x:N-d.width/2,y:at+Y/2},{x:N-d.width/2,y:at-Y/2+h},{x:N-c/2,y:at-Y/2+h}],ht.polygon(t,$,W)},u}p(Am,"imageSquare");async function Em(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=Math.max(l.height+o*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=mt.svg(n),y=pt(t,{}),C=Ut(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=pr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,Ct(t,d),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(Em,"inv_trapezoid");async function Mm(e,t){const{shapeSvg:r,bbox:i,label:s}=await vt(e,t,"label"),o=r.insert("rect",":first-child");return o.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))})`),Ct(t,o),t.intersect=function(l){return ht.rect(t,l)},r}p(Mm,"labelRect");async function $m(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=mt.svg(n),y=pt(t,{}),C=Ut(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=pr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,Ct(t,d),t.intersect=function(m){return ht.polygon(t,u,m)},n}p($m,"lean_left");async function Om(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=mt.svg(n),y=pt(t,{}),C=Ut(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=pr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,Ct(t,d),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(Om,"lean_right");function Dm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=mt.svg(s),u=pt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Ut(c),f=h.path(d,u),m=s.insert(()=>f,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),Ct(t,m),t.intersect=function(y){return q.info("lightningBolt intersect",t,y),ht.polygon(t,c,y)},s}p(Dm,"lightningBolt");var pS=p((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),gS=p((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),mS=p((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),cd=10,ud=10;async function Im(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<ud&&(t.width=ud);const w=x/2/(2.5+x/50);t.height=(t.height??0)-a-w*3,t.height<cd&&(t.height=cd)}const{shapeSvg:n,bbox:l,label:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=h/2,d=u/(2.5+h/50),f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+d+a*2,m=f*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=mt.svg(n),k=gS(0,0,h,f,u,d,m),w=mS(0,d,h,f,u,d),S=pt(t,{}),v=x.path(k,S),F=x.path(w,S);n.insert(()=>F,":first-child").attr("class","line"),y=n.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=pS(0,0,h,f,u,d,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",le(C)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-h/2}, ${-(f/2+d)})`),Ct(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(x){const k=ht.rect(t,x),w=k.x-(t.x??0);if(u!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let S=d*d*(1-w*w/(u*u));S>0&&(S=Math.sqrt(S)),S=d-S,x.y-(t.y??0)>0&&(S=-S),k.y+=S}return k},n}p(Im,"linedCylinder");async function Pm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(o??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(a??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:m}=t,y=mt.svg(n),C=pt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:f/2},...Xr(-h/2-h/2*.1,f/2,h/2+h/2*.1,f/2,d,.8),{x:h/2+h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:-f/2},{x:-h/2,y:-f/2},{x:-h/2,y:f/2*1.1},{x:-h/2,y:-f/2}],k=y.polygon(x.map(S=>[S.x,S.y]),C),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),Ct(t,w),t.intersect=function(S){return ht.polygon(t,x,S)},n}p(Pm,"linedWaveEdgedRect");async function Rm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=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)-o*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await vt(e,t,Bt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2+2*n,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+a*2+2*n,f=u-2*n,m=d-2*n,y=-f/2,C=-m/2,{cssStyles:x}=t,k=mt.svg(l),w=pt(t,{}),S=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+f-n,y:C+m+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C+m-n},{x:y+f+n,y:C+m-n},{x:y+f+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],v=[{x:y,y:C+n},{x:y+f-n,y:C+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const F=Ut(S);let L=k.path(F,w);const A=Ut(v);let V=k.path(A,w);t.look!=="handDrawn"&&(L=$l(L),V=$l(V));const W=l.insert("g",":first-child");return W.insert(()=>L),W.insert(()=>V),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),Ct(t,W),t.intersect=function(N){return ht.polygon(t,S,N)},l}p(Rm,"multiRect");async function Nm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(o.width,(t==null?void 0:t.width)??0)+l*2,d=Math.max(o.height,(t==null?void 0:t.height)??0)+c*3,f=t.look==="neo"?d/4:d/8,m=d+(h?f/2:-f/2),y=-u/2,C=-m/2,x=10,{cssStyles:k}=t,w=Xr(y-x,C+m+x,y+u-x,C+m+x,f,.8),S=w==null?void 0:w[w.length-1],v=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...w,{x:y+u-x,y:S.y-x},{x:y+u,y:S.y-x},{x:y+u,y:S.y-2*x},{x:y+u+x,y:S.y-2*x},{x:y+u+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],F=[{x:y,y:C+x},{x:y+u-x,y:C+x},{x:y+u-x,y:S.y-x},{x:y+u,y:S.y-x},{x:y+u,y:C},{x:y,y:C}],L=mt.svg(s),A=pt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const V=Ut(v),W=L.path(V,A),N=Ut(F),at=L.path(N,A),Y=s.insert(()=>W,":first-child");return Y.insert(()=>at),Y.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(0,${-f/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-f/2-(o.y-(o.top??0))})`),Ct(t,Y),t.intersect=function($){return ht.polygon(t,v,$)},s}p(Nm,"multiWaveEdgedRectangle");async function qm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i,t.useHtmlLabels||we(te())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await vt(e,t,Bt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,d=-h/2,{cssStyles:f}=t,m=mt.svg(a),y=pt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(u,d,c,h,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&x.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))})`),Ct(t,x),t.intersect=function(k){return ht.rect(t,k)},a}p(qm,"note");var yS=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function zm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await vt(e,t,Bt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=mt.svg(s),m=pt(t,{}),y=yS(0,0,l),C=f.path(y,m);u=s.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=pr(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Ct(t,u),t.calcIntersect=function(f,m){const y=f.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=ht.polygon(f,C,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},s}p(zm,"question");async function Wm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await vt(e,t,Bt(t)),h=l.width+(t.look==="neo"?o*2:o),u=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),d=u/4,m=-Math.max(h,(t.width??0)-d)/2,y=-u/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,w=mt.svg(n),S=pt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=Ut(x),F=w.path(v,S),L=n.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,L),t.intersect=function(A){return ht.polygon(t,x,A)},n}p(Wm,"rect_left_inv_arrow");async function Hm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Wr(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(we(Wt())){const A=h.children[0],V=It(h);u=A.getBoundingClientRect(),V.attr("width",u.width),V.attr("height",u.height)}q.info("Text 2",l);const d=l||[],f=h.getBBox(),m=await Wr(n,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),y=m.children[0],C=It(m);u=y.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;It(m).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),It(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const k=u.width+(t.padding||0),w=u.height+(t.padding||0),S=-u.width/2-x,v=-u.height/2-x;let F,L;if(t.look==="handDrawn"){const A=mt.svg(o),V=pt(t,{}),W=A.path(He(S,v,k,w,t.rx||0),V),N=A.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,V);L=o.insert(()=>(q.debug("Rough node insert CXC",W),N),":first-child"),F=o.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child")}else F=a.insert("rect",":first-child"),L=a.insert("line"),F.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),L.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return Ct(t,F),t.intersect=function(A){return ht.rect(t,A)},o}p(Hm,"rectWithTitle");async function Ym(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 as(e,t,s)}p(Ym,"roundedRect");var Vr=8;async function Um(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await vt(e,t,Bt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Vr:Vr*2),h=((t==null?void 0:t.height)??n.height)+o*2,u=c-Vr,d=h,f=Vr-c/2,m=-h/2,{cssStyles:y}=t,C=mt.svg(a),x=pt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:f,y:m},{x:f+u,y:m},{x:f+u,y:m+d},{x:f-Vr,y:m+d},{x:f-Vr,y:m},{x:f,y:m},{x:f,y:m+d}],w=C.polygon(k.map(v=>[v.x,v.y]),x),S=a.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path").attr("style",le(y)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${Vr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,S),t.intersect=function(v){return ht.rect(t,v)},a}p(Um,"shadedProcess");async function jm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2)*1.5,d=h,f=u/1.5,m=-d/2,y=-f/2,{cssStyles:C}=t,x=mt.svg(n),k=pt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=[{x:m,y},{x:m,y:y+f},{x:m+d,y:y+f},{x:m+d,y:y-f/2}],S=Ut(w),v=x.path(S,k),F=n.insert(()=>v,":first-child");return F.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),Ct(t,F),t.intersect=function(L){return ht.polygon(t,w,L)},n}p(jm,"slopedRect");async function Gm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return as(e,t,o)}p(Gm,"squareRect");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),u=c/2,{cssStyles:d}=t,f=mt.svg(n),m=pt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...ar(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...ar(h/2-u,0,u,50,270,450)],C=Ut(y),x=f.path(C,m),k=n.insert(()=>x,":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),Ct(t,k),t.intersect=function(w){return ht.polygon(t,y,w)},n}p(Xm,"stadium");async function Vm(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return as(e,t,r)}p(Vm,"state");function Zm(e,t,{config:{themeVariables:r}}){var k,w;const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=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 h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=mt.svg(h),d=pt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,C=u.circle(0,0,y,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const S=((w=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:w.id)??"",v=S?`${S}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${v})`)}return Ct(t,x),t.intersect=function(S){return ht.circle(t,(t.width??0)/2,S)},h}p(Zm,"stateEnd");function Km(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 o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const h=mt.svg(o).circle(0,0,t.width,yw(i));a=o.insert(()=>h),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.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 c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${h})`)}return Ct(t,a),t.intersect=function(c){return ht.circle(t,(t.width??7)/2,c)},o}p(Km,"stateStart");var vi=8;async function Qm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=Math.max(l.width+2*vi+o,t.width??0),h=Math.max(l.height+a,t.height??0),u=c-2*vi,d=h,f=-c/2,m=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){const C=mt.svg(n),x=pt(t,{}),k=C.rectangle(f,m,u+16,d,x),w=C.line(f+vi,m,f+vi,m+d,x),S=C.line(f+vi+u,m,f+vi+u,m+d,x);n.insert(()=>w,":first-child"),n.insert(()=>S,":first-child");const v=n.insert(()=>k,":first-child"),{cssStyles:F}=t;v.attr("class","basic label-container").attr("style",le(F)),Ct(t,v)}else{const C=pr(n,u,d,y);i&&C.attr("style",i),Ct(t,C)}return t.intersect=function(C){return ht.polygon(t,y,C)},n}p(Qm,"subroutine");var Bn=.2;async function Jm(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-Bn*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2,h=Bn*c,u=Bn*c,f=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2+h-h,m=c,y=-f/2,C=-m/2,{cssStyles:x}=t,k=mt.svg(n),w=pt(t,{}),S=[{x:y-h/2,y:C},{x:y+f+h/2,y:C},{x:y+f+h/2,y:C+m},{x:y-h/2,y:C+m}],v=[{x:y+f-h/2,y:C+m},{x:y+f+h/2,y:C+m},{x:y+f+h/2,y:C+m-u}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const F=Ut(S),L=k.path(F,w),A=Ut(v),V=k.path(A,{...w,fillStyle:"solid"}),W=n.insert(()=>V,":first-child");return W.insert(()=>L,":first-child"),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),Ct(t,W),t.intersect=function(N){return ht.polygon(t,S,N)},n}p(Jm,"taggedRect");async function ty(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await vt(e,t,Bt(t)),n=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,d=l+c,{cssStyles:f}=t,m=mt.svg(s),y=pt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:d/2},...Xr(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,k=-d/2-u*.4,w=[{x:x+n-h,y:(k+l)*1.3},{x:x+n,y:k+l-u},{x:x+n,y:(k+l)*.9},...Xr(x+n,(k+l)*1.25,x+n-h,(k+l)*1.3,-l*.02,.5)],S=Ut(C),v=m.path(S,y),F=Ut(w),L=m.path(F,{...y,fillStyle:"solid"}),A=s.insert(()=>L,":first-child");return A.insert(()=>v,":first-child"),A.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),Ct(t,A),t.intersect=function(V){return ht.polygon(t,C,V)},s}p(ty,"taggedWaveEdgedRectangle");async function ey(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await vt(e,t,Bt(t)),a=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),Ct(t,h),t.intersect=function(u){return ht.rect(t,u)},s}p(ey,"text");var xS=p((e,t,r,i,s,o)=>`M${e},${t}
202
+ a${s},${o} 0,0,1 0,${-i}
203
+ l${r},0
204
+ a${s},${o} 0,0,1 0,${i}
205
+ M${r},${-i}
206
+ a${s},${o} 0,0,0 0,${i}
207
+ l${-r},0`,"createCylinderPathD"),CS=p((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),bS=p((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),dd=5,fd=10;async function ry(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<dd&&(t.height=dd)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-o-x*3,t.width<fd&&(t.width=fd)}const{shapeSvg:n,bbox:l,label:c}=await vt(e,t,Bt(t)),h=Math.max(t.height??0,l.height)+o,u=h/2,d=u/(2.5+h/50),f=Math.max(t.width??0,l.width)+d+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=mt.svg(n),x=CS(0,0,f,h,d,u),k=bS(0,0,f,h,d,u),w=C.path(x,pt(t,{})),S=C.path(k,pt(t,{fill:"none"}));y=n.insert(()=>S,":first-child"),y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=xS(0,0,f,h,d,u);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",le(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-f/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,y),t.intersect=function(C){const x=ht.rect(t,C),k=x.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let w=d*d*(1-k*k/(u*u));w!=0&&(w=Math.sqrt(Math.abs(w))),w=d-w,C.x-(t.x??0)>0&&(w=-w),x.x+=w}return x},n}p(ry,"tiltedCylinder");async function iy(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=mt.svg(n),y=pt(t,{}),C=Ut(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=pr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,Ct(t,d),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(iy,"trapezoid");async function sy(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await vt(e,t,Bt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2,{cssStyles:f}=t,m=mt.svg(c),y=pt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],x=Ut(C),k=m.path(x,y),w=c.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),Ct(t,w),t.intersect=function(S){return ht.polygon(t,C,S)},c}p(sy,"trapezoidalPentagon");var pd=10,gd=10;async function oy(e,t){var S;const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<gd&&(t.width=gd),t.height=(t==null?void 0:t.height)??0,t.height<pd&&(t.height=pd));const{shapeSvg:a,bbox:n,label:l}=await vt(e,t,Bt(t)),c=dr((S=Wt().flowchart)==null?void 0:S.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:m}=t,y=mt.svg(a),C=pt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Ut(f),k=y.path(x,C),w=a.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=h,t.height=u,Ct(t,w),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(v){return q.info("Triangle intersect",t,f,v),ht.polygon(t,f,v)},a}p(oy,"triangle");async function ay(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await vt(e,t,Bt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(o??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,m=d+(n?f:-f),{cssStyles:y}=t,x=14-u,k=x>0?x/2:0,w=mt.svg(l),S=pt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=[{x:-u/2-k,y:m/2},...Xr(-u/2-k,m/2,u/2+k,m/2,f,.8),{x:u/2+k,y:-m/2},{x:-u/2-k,y:-m/2}],F=Ut(v),L=w.path(F,S),A=l.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),Ct(t,A),t.intersect=function(V){return ht.polygon(t,v,V)},l}p(ay,"waveEdgedRectangle");async function ny(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=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 S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-S*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await vt(e,t,Bt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a,u=h/8,d=h+u*2,{cssStyles:f}=t,m=mt.svg(n),y=pt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:d/2},...Xr(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...Xr(c/2,-d/2,-c/2,-d/2,u,-1)],x=Ut(C),k=m.path(x,y),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Ct(t,w),t.intersect=function(S){return ht.polygon(t,C,S)},n}p(ny,"waveRectangle");var re=10;async function ly(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-re,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-re,10));const{shapeSvg:a,bbox:n,label:l}=await vt(e,t,Bt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+re,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+o*2+re,u=c-re,d=h-re,f=-u/2,m=-d/2,{cssStyles:y}=t,C=mt.svg(a),x=pt(t,{}),k=[{x:f-re,y:m-re},{x:f-re,y:m+d},{x:f+u,y:m+d},{x:f+u,y:m-re}],w=`M${f-re},${m-re} L${f+u},${m-re} L${f+u},${m+d} L${f-re},${m+d} L${f-re},${m-re}
208
+ M${f-re},${m} L${f+u},${m}
209
+ M${f},${m-re} L${f},${m+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=C.path(w,x),v=a.insert(()=>S,":first-child");return v.attr("transform",`translate(${re/2}, ${re/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+re/2-(n.x-(n.left??0))}, ${-(n.height/2)+re/2-(n.y-(n.top??0))})`),Ct(t,v),t.intersect=function(F){return ht.polygon(t,k,F)},a}p(ly,"windowPane");var md=new Set(["redux-color","redux-dark-color"]),kS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Nh(e,t){var ft,At,qt,Ft;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=te(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:lt}=te(),{background:yt}=lt,Et={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${yt}`]};await Nh(e,Et)}const c=te();t.useHtmlLabels=c.htmlLabels;let h=((ft=c.er)==null?void 0:ft.diagramPadding)??10,u=((At=c.er)==null?void 0:At.entityPadding)??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:m}=bt(t);if(r.attributes.length===0&&t.label){const lt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Lr(t.label,c)+lt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const yt=await as(e,t,lt);if(i!=null&&md.has(i)){const Et=r.colorIndex??0;yt.attr("data-color-id",`color-${Et%l.length}`)}if(!dr(c.htmlLabels)){const Et=yt.select("text"),Nt=(qt=Et.node())==null?void 0:qt.getBBox();Et.attr("transform",`translate(${-Nt.width/2}, 0)`)}return yt}c.htmlLabels||(h*=1.25,u*=1.25);let y=Bt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await Li(C,t.label??"",c,0,0,["name"],f);x.height+=u;let k=0;const w=[],S=[];let v=0,F=0,L=0,A=0,V=!0,W=!0;for(const lt of r.attributes){const yt=await Li(C,lt.type,c,0,k,["attribute-type"],f);v=Math.max(v,yt.width+h);const Et=await Li(C,lt.name,c,0,k,["attribute-name"],f);F=Math.max(F,Et.width+h);const Nt=await Li(C,lt.keys.join(),c,0,k,["attribute-keys"],f);L=Math.max(L,Nt.width+h);const Xt=await Li(C,lt.comment,c,0,k,["attribute-comment"],f);A=Math.max(A,Xt.width+h);const z=Math.max(yt.height,Et.height,Nt.height,Xt.height)+u;S.push({yOffset:k,rowHeight:z}),k+=z}let N=4;L<=h&&(V=!1,L=0,N--),A<=h&&(W=!1,A=0,N--);const at=C.node().getBBox();if(x.width+h*2-(v+F+L+A)>0){const lt=x.width+h*2-(v+F+L+A);v+=lt/N,F+=lt/N,L>0&&(L+=lt/N),A>0&&(A+=lt/N)}const Y=v+F+L+A,$=mt.svg(C),O=pt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let B=0;S.length>0&&(B=S.reduce((lt,yt)=>lt+((yt==null?void 0:yt.rowHeight)??0),0));const I=Math.max(at.width+h*2,(t==null?void 0:t.width)||0,Y),P=Math.max((B??0)+x.height,(t==null?void 0:t.height)||0),H=-I/2,K=-P/2;if(C.selectAll("g:not(:first-child)").each((lt,yt,Et)=>{const Nt=It(Et[yt]),Xt=Nt.attr("transform");let z=0,gt=0;if(Xt){const Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Xt);Ht&&(z=parseFloat(Ht[1]),gt=parseFloat(Ht[2]),Nt.attr("class").includes("attribute-name")?z+=v:Nt.attr("class").includes("attribute-keys")?z+=v+F:Nt.attr("class").includes("attribute-comment")&&(z+=v+F+L))}Nt.attr("transform",`translate(${H+h/2+z}, ${gt+K+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(K+u/2)+")"),i!=null&&md.has(i)){const lt=r.colorIndex??0;C.attr("data-color-id",`color-${lt%l.length}`)}const ct=$.rectangle(H,K,I,P,O),dt=C.insert(()=>ct,":first-child").attr("class","outer-path").attr("style",d.join(""));w.push(0);for(const[lt,yt]of S.entries()){const Nt=(lt+1)%2===0&&yt.yOffset!==0,Xt=$.rectangle(H,x.height+K+(yt==null?void 0:yt.yOffset),I,yt==null?void 0:yt.rowHeight,{...O,fill:Nt?o:a,stroke:n});C.insert(()=>Xt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${Nt?"even":"odd"}`)}const kt=1e-4;let _t=Fi(H,x.height+K,I+H,x.height+K,kt),wt=$.polygon(_t.map(lt=>[lt.x,lt.y]),O);if(C.insert(()=>wt).attr("class","divider"),_t=Fi(v+H,x.height+K,v+H,P+K,kt),wt=$.polygon(_t.map(lt=>[lt.x,lt.y]),O),C.insert(()=>wt).attr("class","divider"),V){const lt=v+F+H;_t=Fi(lt,x.height+K,lt,P+K,kt),wt=$.polygon(_t.map(yt=>[yt.x,yt.y]),O),C.insert(()=>wt).attr("class","divider")}if(W){const lt=v+F+L+H;_t=Fi(lt,x.height+K,lt,P+K,kt),wt=$.polygon(_t.map(yt=>[yt.x,yt.y]),O),C.insert(()=>wt).attr("class","divider")}for(const lt of w){const yt=x.height+K+lt;_t=Fi(H,yt,I+H,yt,kt),wt=$.polygon(_t.map(Et=>[Et.x,Et.y]),O),C.insert(()=>wt).attr("class","divider")}if(Ct(t,dt),m&&t.look!=="handDrawn")if(i!=null&&kS.has(i))C.selectAll("path").attr("style",m);else{const lt=m.split(";"),yt=(Ft=lt==null?void 0:lt.filter(Et=>Et.includes("stroke")))==null?void 0:Ft.map(Et=>`${Et}`).join("; ");C.selectAll("path").attr("style",yt??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(lt){return ht.rect(t,lt)},C}p(Nh,"erBox");async function Li(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==ru(t)&&(t=ru(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Qe(n,t,{width:Lr(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(dr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=It(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Li,"addText");function Fi(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}]}p(Fi,"lineToPolygon");async function hy(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",Bt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,d=0,f=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Ms(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Ms(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();d=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const w=await Ms(c,k,y,[k.parseClassifier()]);y+=w+o}f=c.node().getBBox().height,f<=0&&(f=s/2),h=a.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const w=await Ms(h,k,C,[k.parseClassifier()]);C+=w+o}let x=a.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${u+d+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}p(hy,"textHelper");async function Ms(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=te();let a="useHtmlLabels"in t?t.useHtmlLabels:dr(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Ys(n)&&(a=!0);const l=await Qe(s,th(jr(n)),{width:Lr(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const u=l.children[0],d=It(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await Dh(u),c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&It(l).selectAll("tspan").attr("font-weight",""),h=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=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Ms,"addText");async function cy(e,t){var $,O;const r=Wt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??dr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await hy(e,t,r,n,a),{labelStyles:u,nodeStyles:d}=bt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const f=(($=l.styles)==null?void 0:$.join(";"))||d||"";t.cssStyles||(t.cssStyles=f.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((O=r.class)!=null&&O.hideEmptyMembersBox),y=mt.svg(c),C=pt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const w=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=a:l.members.length>0&&l.methods.length===0&&(k+=a*2);const S=-x/2,v=-k/2;let F=m?o*2:l.members.length===0&&l.methods.length===0?-o:0;w&&(F=o*2);const L=y.rectangle(S-o,v-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,k+2*o+F,C),A=c.insert(()=>L,":first-child");A.attr("class","basic label-container outer-path");const V=A.node().getBBox(),W=c.select(".annotation-group").node().getBBox().height-(m?o/2:0)||0,N=c.select(".label-group").node().getBBox().height-(m?o/2:0)||0,at=c.select(".members-group").node().getBBox().height-(m?o/2:0)||0,Y=(W+N+v+o-(v-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((B,I,P)=>{var _t,wt;const H=It(P[I]),K=H.attr("transform");let ct=0;if(K){const At=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(K);At&&(ct=parseFloat(At[2]))}let dt=ct+v+o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(H.attr("class").includes("methods-group")){const ft=Math.max(at,a/2);w?dt=Math.max(Y,W+N+ft+v+a*2+o)+a*2:dt=W+N+ft+v+a*4+o}l.members.length===0&&l.methods.length===0&&((_t=r.class)!=null&&_t.hideEmptyMembersBox)&&(l.annotations.length>0?dt=ct-a:dt=ct),n||(dt-=4);let kt=S;(H.attr("class").includes("label-group")||H.attr("class").includes("annotation-group"))&&(kt=-((wt=H.node())==null?void 0:wt.getBBox().width)/2||0,c.selectAll("text").each(function(ft,At,qt){window.getComputedStyle(qt[At]).textAnchor==="middle"&&(kt=0)})),H.attr("transform",`translate(${kt}, ${dt})`)}),l.members.length>0||l.methods.length>0||m){const B=W+N+v+o,I=y.line(V.x,B,V.x+V.width,B+.001,C);c.insert(()=>I).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(m||l.members.length>0||l.methods.length>0){const B=W+N+at+v+a*2+o,I=y.line(V.x,w?Math.max(Y,B):B,V.x+V.width,(w?Math.max(Y,B):B)+.001,C);c.insert(()=>I).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",f),A.select(":nth-child(2)").attr("style",f),c.selectAll(".divider").select("path").attr("style",f),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",f),!n){const B=RegExp(/color\s*:\s*([^;]*)/),I=B.exec(f);if(I){const P=I[0].replace("color","fill");c.selectAll("tspan").attr("style",P)}else if(u){const P=B.exec(u);if(P){const H=P[0].replace("color","fill");c.selectAll("tspan").attr("style",H)}}}return Ct(t,A),t.intersect=function(B){return ht.rect(t,B)},c}p(cy,"classBox");async function uy(e,t){var N,at;const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=Bt(t),h=Wt(),{themeVariables:u}=h,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await ir(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await ir(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const k=await ir(y,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,l){const Y=await ir(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,m);x+=Y;const $=await ir(y,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,m);x+=$;const O=await ir(y,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,m);x+=O,await ir(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const Y=await ir(y,`${o.type?`Type: ${o.type}`:""}`,x,t.labelStyle,m);x+=Y,await ir(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,x,t.labelStyle,m)}const w=(((N=y.node())==null?void 0:N.getBBox().width)??200)+a,S=(((at=y.node())==null?void 0:at.getBBox().height)??200)+a,v=-w/2,F=-S/2,L=mt.svg(y),A=pt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const V=L.rectangle(v,F,w,S,A),W=y.insert(()=>V,":first-child");if(W.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const Y=t.colorIndex??0;y.attr("data-color-id",`color-${Y%d.length}`)}if(y.selectAll(".label").each((Y,$,O)=>{const B=It(O[$]),I=B.attr("transform");let P=0,H=0;if(I){const kt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);kt&&(P=parseFloat(kt[1]),H=parseFloat(kt[2]))}const K=H-S/2;let ct=v+a/2;($===0||$===1)&&(ct=P),B.attr("transform",`translate(${ct}, ${K+a})`)}),x>C+k+n){const Y=F+C+k+n;let $;if(t.look==="neo"){const I=[[v,Y],[v+w,Y],[v+w,Y+.001],[v,Y+.001]];$=L.polygon(I,A)}else $=L.line(v,Y,v+w,Y,A);y.insert(()=>$).attr("class","divider")}return Ct(t,W),t.intersect=function(Y){return ht.rect(t,Y)},i&&t.look!=="handDrawn"&&(f||d!=null&&d.length)&&y.selectAll("path").attr("style",i),y}p(uy,"requirementBox");async function ir(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=Wt(),n=a.htmlLabels??!0,l=await Qe(o,th(jr(t)),{width:Lr(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],u=It(l);s==="start"&&It(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(ir,"addText");var wS=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function dy(e,t,{config:r}){var at,Y;const{labelStyles:i,nodeStyles:s}=bt(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await vt(e,t,Bt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((at=r==null?void 0:r.kanban)!=null&&at.ticketBaseUrl)&&(u=(Y=r==null?void 0:r.kanban)==null?void 0:Y.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;d?{label:m,bbox:y}=await Sn(d,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await Sn(n,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await Sn(n,"assigned"in t&&t.assigned||"",f);t.width=a;const k=10,w=(t==null?void 0:t.width)||0,S=Math.max(y.height,x.height)/2,v=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+S,F=-w/2,L=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-S-l.height/2)+")"),m.attr("transform","translate("+(h-w/2)+", "+(-S+l.height/2)+")"),C.attr("transform","translate("+(h+w/2-x.width-2*o)+", "+(-S+l.height/2)+")");let A;const{rx:V,ry:W}=t,{cssStyles:N}=t;if(t.look==="handDrawn"){const $=mt.svg(n),O=pt(t,{}),B=V||W?$.path(He(F,L,w,v,V||0),O):$.rectangle(F,L,w,v,O);A=n.insert(()=>B,":first-child"),A.attr("class","basic label-container").attr("style",N||null)}else{A=n.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",s).attr("rx",V??5).attr("ry",W??5).attr("x",F).attr("y",L).attr("width",w).attr("height",v);const $="priority"in t&&t.priority;if($){const O=n.append("line"),B=F+2,I=L+Math.floor((V??0)/2),P=L+v-Math.floor((V??0)/2);O.attr("x1",B).attr("y1",I).attr("x2",B).attr("y2",P).attr("stroke-width","4").attr("stroke",wS($))}}return Ct(t,A),t.height=v,t.intersect=function($){return ht.rect(t,$)},n}p(dy,"kanbanItem");async function fy(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await vt(e,t,Bt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:u}=t,d=o.width+20,f=o.height+20,m=Math.max(l,d),y=Math.max(c,f);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let C;const x=`M0 0
210
+ a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
211
+ a${h},${h} 1 0,0 ${m*.25},0
212
+ a${h},${h} 1 0,0 ${m*.25},0
213
+ a${h},${h} 1 0,0 ${m*.25},${y*.1}
214
+
215
+ a${h},${h} 1 0,0 ${m*.15},${y*.33}
216
+ a${h*.8},${h*.8} 1 0,0 0,${y*.34}
217
+ a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
218
+
219
+ a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
220
+ a${h},${h} 1 0,0 ${-1*m*.25},0
221
+ a${h},${h} 1 0,0 ${-1*m*.25},0
222
+ a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
223
+
224
+ a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
225
+ a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
226
+ a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const k=mt.svg(s),w=pt(t,{}),S=k.path(x,w);C=s.insert(()=>S,":first-child"),C.attr("class","basic label-container").attr("style",le(u))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),Ct(t,C),t.calcIntersect=function(k,w){return ht.rect(k,w)},t.intersect=function(k){return q.info("Bang intersect",t,k),ht.rect(t,k)},s}p(fy,"bang");async function py(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await vt(e,t,Bt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:m}=t;let y;const C=`M0 0
228
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
229
+ a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
230
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
231
+
232
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
233
+ a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
234
+
235
+ a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
236
+ a${d},${d} 1 0,1 ${-1*l*.5},0
237
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
238
+
239
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
240
+ a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
241
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=mt.svg(s),k=pt(t,{}),w=x.path(C,k);y=s.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",le(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Ct(t,y),t.calcIntersect=function(x,k){return ht.rect(x,k)},t.intersect=function(x){return q.info("Cloud intersect",t,x),ht.rect(t,x)},s}p(py,"cloud");async function gy(e,t){const{labelStyles:r,nodeStyles:i}=bt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await vt(e,t,Bt(t)),l=o.width+8*a,c=o.height+2*a,h=5,u=t.look==="neo"?`
242
+ M${-l/2} ${c/2-h}
243
+ v${-c+2*h}
244
+ q0,-${h} ${h},-${h}
245
+ h${l-2*h}
246
+ q${h},0 ${h},${h}
247
+ v${c-h}
248
+ H${-l/2}
249
+ Z
250
+ `:`
251
+ M${-l/2} ${c/2-h}
252
+ v${-c+2*h}
253
+ q0,-${h} ${h},-${h}
254
+ h${l-2*h}
255
+ q${h},0 ${h},${h}
256
+ v${c-2*h}
257
+ q0,${h} ${-h},${h}
258
+ h${-(l-2*h)}
259
+ q${-h},0 ${-h},${-h}
260
+ Z
261
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=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",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),Ct(t,d),t.calcIntersect=function(f,m){return ht.rect(f,m)},t.intersect=function(f){return ht.rect(t,f)},s}p(gy,"defaultMindmapNode");async function my(e,t){const r={padding:t.padding??0};return Rh(e,t,r)}p(my,"mindmapCircle");var TS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Gm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Ym},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Xm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Qm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:mm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:km},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:tm},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:nm},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:im},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:pm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Rh},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:fy},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:py},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:_m},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Om},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:$m},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:iy},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Em},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ey},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:sm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Um},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Km},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:wm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Sm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:cm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:um},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:dm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Dm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ay},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Tm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ry},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Im},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ym},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:oy},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ly},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Cm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:sy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:bm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Nm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Rm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Jg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:hm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ty},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ny},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Wm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Pm}],_S=p(()=>{const t=[...Object.entries({state:Vm,choice:om,note:qm,composite:am,rectWithTitle:Hm,labelRect:Mm,block_arrow:rm,collapsedGroup:em,iconSquare:Fm,iconCircle:Bm,icon:vm,iconRounded:Lm,imageSquare:Am,anchor:Kg,kanbanItem:dy,mindmapCircle:my,defaultMindmapNode:gy,classBox:cy,erBox:Nh,requirementBox:uy}),...TS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),yy=_S();function SS(e){return e in yy}p(SS,"isValidShape");var Aa=p(({flowchart:e})=>{var s,o;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Ea=new Map;async function qh(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?yy[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",le(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ea.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(qh,"insertNode");var T3=p((e,t)=>{Ea.set(t.id,e)},"setNodeElem"),vS=p(()=>{Ea.clear()},"clear"),yd=p(e=>{const t=Ea.get(e.id);q.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"),BS=p(async(e,t)=>{const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=bt(t),d=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),f=dr(r.flowchart.htmlLabels),m=t.direction==="LR",y=d.insert("g").attr("class","cluster-label swimlane-label"),C=await Qe(y,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let x=C.getBBox();if(f){const Y=C.children[0],$=It(C);x=Y.getBoundingClientRect(),$.attr("width",x.width),$.attr("height",x.height)}const k=t.padding??0,w=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(w-t.width)/2-k:t.diff=-k;const S=t.height,v=t.y-S/2,F=t.y+S/2,L=t.x-w/2,A=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:v+S/3,V=m?4:0,W=x.height+2*V;let N,at;if(m){const Y=Math.max(W,x.height+2*V),$=L+Y,O=Math.max(0,w-Y);if(t.look==="handDrawn"){const P=mt.svg(d),H=pt(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),K=pt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),ct=P.rectangle(L,v,Y,S,H);N=d.insert(()=>ct,":first-child");const dt=P.rectangle($,v,O,S,K);at=d.insert(()=>dt,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",u.join(";").replace("fill","stroke"))}else N=d.insert("rect",":first-child"),at=d.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",L).attr("y",v).attr("width",Y).attr("height",S).attr("fill",o).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",$).attr("y",v).attr("width",O).attr("height",S).attr("fill","none").attr("stroke",n);const B=L+Y/2,I=t.y;y.attr("transform",`translate(${B}, ${I}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const Y=Math.max(0,A-v),$=Math.min(W,Y),O=v+$,B=Math.max(0,F-O),I=t.x-w/2;if(t.look==="handDrawn"){const K=mt.svg(d),ct=pt(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),dt=pt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),kt=K.rectangle(I,v,w,$,ct);N=d.insert(()=>kt,":first-child");const _t=K.rectangle(I,O,w,B,dt);at=d.insert(()=>_t,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",u.join(";").replace("fill","stroke"))}else N=d.insert("rect",":first-child"),at=d.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",I).attr("y",v).attr("width",w).attr("height",$).attr("fill",o).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",I).attr("y",O).attr("width",w).attr("height",B).attr("fill","none").attr("stroke",n);const P=t.x-x.width/2,H=v+($-x.height)/2;y.attr("transform",`translate(${P}, ${H})`)}if(q.trace("Swimlane data ",t,JSON.stringify(t)),l){const Y=y.select("span");Y&&Y.attr("style",l)}return t.offsetX=0,t.width=w,t.height=S,t.offsetY=x.height-k/2,t.intersect=function(Y){return gi(t,Y)},{cluster:d,labelBBox:x}},"swimlane"),xy=p(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=bt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=we(r),f=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Qe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):m=await Wr(f,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(we(r)){const L=m.children[0],A=It(m);y=L.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,w=t.y-x/2;q.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const L=mt.svg(u),A=pt(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),V=L.path(He(k,w,C,x,0),A);S=u.insert(()=>(q.debug("Rough node insert CXC",V),V),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=Aa(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const L=f.select("span");L&&L.attr("style",n)}const F=S.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return gi(t,L)},{cluster:u,labelBBox:y}},"rect"),LS=p((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,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return gi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),FS=p(async(e,t)=>{const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=await Wr(u,t.label,t.labelStyle,void 0,!0);let m=f.getBBox();if(we(r)){const V=f.children[0],W=It(f);m=V.getBoundingClientRect(),W.attr("width",m.width),W.attr("height",m.height)}const y=0*t.padding,C=y/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,w=t.height+y-m.height-6,S=t.x-x/2,v=t.y-k/2;t.width=x;const F=t.y-t.height/2-C+m.height+2;let L;if(t.look==="handDrawn"){const V=t.cssClasses.includes("statediagram-cluster-alt"),W=mt.svg(c),N=t.rx||t.ry?W.path(He(S,v,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):W.rectangle(S,v,x,k,{seed:s});L=c.insert(()=>N,":first-child");const at=W.rectangle(S,F,x,w,{fill:V?o:a,fillStyle:V?"hachure":"solid",stroke:l,seed:s});L=c.insert(()=>N,":first-child"),d=c.insert(()=>at)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",S).attr("y",v).attr("width",x).attr("height",k).attr("data-look",t.look),d.attr("class","inner").attr("x",S).attr("y",F).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-m.width/2}, ${v+1-(we(r)?0:3)})`);const A=L.node().getBBox();return t.height=A.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(V){return gi(t,V)},{cluster:c,labelBBox:m}},"roundedWithTitle"),AS=p(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=bt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=we(r),f=u.insert("g").attr("class","cluster-label "),m=await Qe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let y=m.getBBox();if(we(r)){const L=m.children[0],A=It(m);y=L.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,w=t.y-x/2;q.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const L=mt.svg(u),A=pt(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),V=L.path(He(k,w,C,x,t.rx),A);S=u.insert(()=>(q.debug("Rough node insert CXC",V),V),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=Aa(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const L=f.select("span");L&&L.attr("style",n)}const F=S.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return gi(t,L)},{cluster:u,labelBBox:y}},"kanbanSection"),ES=p((e,t)=>{const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const C=mt.svg(a).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});f=a.insert(()=>C,":first-child")}else{f=n.insert("rect",":first-child");let y="outer";t.look,y="divider",f.attr("class",y).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=f.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return gi(t,y)},{cluster:a,labelBBox:{}}},"divider"),MS=xy,$S={rect:xy,squareRect:MS,roundedWithTitle:FS,noteGroup:LS,divider:ES,kanbanSection:AS,swimlane:BS},Cy=new Map,by=p(async(e,t)=>{const r=t.shape||"rect",i=await $S[r](e,t);return Cy.set(t.id,i),i},"insertCluster"),OS=p(()=>{Cy=new Map},"clear"),_s=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),be={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},xd={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $s(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Jt(e),t=Jt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p($s,"calculateDeltaAndAngle");var Jt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),DS=p(e=>({x:p(function(t,r,i){let s=0;const o=Jt(i[0]).x<Jt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(be,e.arrowTypeStart)){const{angle:f,deltaX:m}=$s(i[0],i[1]);s=be[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(be,e.arrowTypeEnd)){const{angle:f,deltaX:m}=$s(i[i.length-1],i[i.length-2]);s=be[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const a=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),n=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),l=Math.abs(Jt(t).x-Jt(i[0]).x),c=Math.abs(Jt(t).y-Jt(i[0]).y),h=be[e.arrowTypeStart],u=be[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=o==="right"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=o==="right"?-1:1,s+=f}return Jt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const o=Jt(i[0]).y<Jt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(be,e.arrowTypeStart)){const{angle:f,deltaY:m}=$s(i[0],i[1]);s=be[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(be,e.arrowTypeEnd)){const{angle:f,deltaY:m}=$s(i[i.length-1],i[i.length-2]);s=be[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const a=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),n=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),l=Math.abs(Jt(t).y-Jt(i[0]).y),c=Math.abs(Jt(t).x-Jt(i[0]).x),h=be[e.arrowTypeStart],u=be[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=o==="up"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=o==="up"?-1:1,s+=f}return Jt(t).y+s},"y")}),"getLineFunctionsWithOffset"),IS=p((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Cd(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Cd(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),PS={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}},RS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Cd=p((e,t,r,i,s,o,a=!1,n)=>{var m;if(!r||r==="none")return;const l=PS[r],c=l&&RS.includes(l.type);if(!l){q.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),C=`${f}_${y}`;if(!document.getElementById(C)){const x=document.getElementById(f);if(x){const k=x.cloneNode(!0);k.id=C,k.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),(m=x.parentNode)==null||m.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${C})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),NS=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Wt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),rs=new Map,se=new Map,qS=p(()=>{rs.clear(),se.clear()},"clear"),ky=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Ss=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),zh=p(async(e,t)=>{const r=Wt();let i=we(r);const{labelStyles:s}=bt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Qe(e,t.label,{style:Ss(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),q.info("abc82",t,t.labelType);let h,u;if(i){const f=c.children[0],m=It(c);h=await ci.measure(()=>f.getBoundingClientRect()),u=h,m.attr("width",h.width),m.attr("height",h.height)}else{const f=It(c).select("text").node();await ci.measure(()=>{h=c.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=h})}a.attr("transform",_s(u,i)),rs.set(t.id,o),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Wr(m,t.startLabelLeft,Ss(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=It(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",_s(C,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startLeft=f,Os(d,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Wr(m,t.startLabelRight,Ss(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=It(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",_s(C,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startRight=f,Os(d,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Wr(f,t.endLabelLeft,Ss(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=It(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",_s(C,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endLeft=f,Os(d,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Wr(f,t.endLabelRight,Ss(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=It(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",_s(C,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endRight=f,Os(d,t.endLabelRight)}return c},"insertEdgeLabel");function Os(e,t){we(Wt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Os,"setTerminalWidth");var zS=p((e,t)=>{q.debug("Moving label abc88 ",e.id,e.label,rs.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Wt(),{subGraphTitleTotalMargin:s}=Aa(i);if(e.label){const o=rs.get(e.id);let a=e.x,n=e.y;if(r){const l=ke.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=se.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=se.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=se.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=se.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),WS=p((e,t)=>{var a;if(!(e!=null&&e.isLabelEdge)||!((a=e==null?void 0:e.id)!=null&&a.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),HS=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),YS=p((e,t,r)=>{q.debug(`intersection calc abc89:
262
+ outsidePoint: ${JSON.stringify(t)}
263
+ insidePoint : ${JSON.stringify(r)}
264
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const d={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),q.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,d),d}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let u=c*n/h,d=r.x<t.x?r.x+h-n:r.x-h+n,f=r.y<t.y?r.y+u:r.y-u;return q.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:d,_y:f}),n===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),bd=p((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(q.info("abc88 checking point",o,t),!HS(t,o)&&!s){const a=YS(t,i,o);q.debug("abc88 inside",o,i,a),q.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?q.warn("abc88 no intersect",a,r):r.push(a),s=!0}else q.warn("abc88 outside",o,i),i=o,s||r.push(o)}),q.debug("returning points",r),r},"cutPathAtIntersect");function wy(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(wy,"extractCornerPoints");var kd=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),US=p(function(e){const{cornerPointPositions:t}=wy(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=kd(s,a,5),l=kd(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){q.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const f=5;a.x===n.x?d={x:c<0?n.x-f+u:n.x+f-u,y:h<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:h<0?n.y-f+u:n.y+f-u}}else q.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),jS=p((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),Ty=p(function(e,t,r,i,s,o,a,n=!1){var P;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Wt();let h=t.points,u=!1;const d=s;var f=o;const m=[];for(const H in t.cssCompiledStyles)Zp(H)||m.push(t.cssCompiledStyles[H]);if(c==="swimlane"){if(f.intersect&&d.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[d.intersect(h[0]),f.intersect(h[1])];else{const H=h.slice(1,-1),K=H[0],ct=H[H.length-1],dt=.5,kt=Math.abs(h[h.length-1].x-ct.x)<dt&&Math.abs(h[h.length-1].y-ct.y)<dt,_t=d.intersect(K),wt=kt?ct:f.intersect(ct),ft=Math.abs(wt.x-ct.x)<dt&&Math.abs(wt.y-ct.y)<dt,qt=Math.abs(_t.x-K.x)<dt&&Math.abs(_t.y-K.y)<dt?[]:[_t],Ft=ft?[]:[wt];h=[...qt,...H,...Ft]}h=WS(t,h)}else f.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),h.push(f.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),h=bd(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=bd(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=h.filter(H=>!Number.isNaN(H.y));const x=NS(t.curve);x!=="rounded"&&(C=US(C));let k=qs;switch(x){case"linear":k=qs;break;case"basis":k=bl;break;case"cardinal":k=Dp;break;case"bumpX":k=Ap;break;case"bumpY":k=Ep;break;case"catmullRom":k=Pp;break;case"monotoneX":k=Hp;break;case"monotoneY":k=Yp;break;case"natural":k=jp;break;case"step":k=Gp;break;case"stepAfter":k=Vp;break;case"stepBefore":k=Xp;break;case"rounded":k=qs;break;default:k=bl}const{x:w,y:S}=DS(t),v=nw().x(w).y(S).curve(k);let F;switch(t.thickness){case"normal":F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible";break;default:F="edge-thickness-normal"}switch(t.pattern){case"solid":F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed";break;default:F+=" edge-pattern-solid"}let L,A=x==="rounded"?_y(Sy(C,t),5):v(C);const V=Array.isArray(t.style)?t.style:[t.style];let W=V.find(H=>H==null?void 0:H.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let at=!1;if(t.look==="handDrawn"){const H=mt.svg(e);Object.assign([],C);const K=H.path(A,{roughness:.3,seed:l});F+=" transition",L=It(K).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",V?V.reduce((dt,kt)=>dt+";"+kt,""):"");let ct=L.attr("d");L.attr("d",ct),e.node().appendChild(L.node())}else{const H=m.join(";"),K=V?V.reduce((ft,At)=>ft+At+";",""):"",ct=(H?H+";"+K+";":K)+";"+(V?V.reduce((ft,At)=>ft+";"+At,""):"");L=e.append("path").attr("d",A).attr("id",`${a}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",ct),W=(P=ct.match(/stroke:([^;]+)/))==null?void 0:P[1],at=t.animate===!0||!!t.animation||H.includes("animation");const dt=L.node(),kt=typeof dt.getTotalLength=="function"?dt.getTotalLength():0,_t=xd[t.arrowTypeStart]||0,wt=xd[t.arrowTypeEnd]||0;if(t.look==="neo"&&!at){const At=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?jS(kt,_t,wt):`0 ${_t} ${kt-_t-wt} ${wt}`}; stroke-dashoffset: 0;`;L.attr("style",At+L.attr("style"))}}L.attr("data-edge",!0),L.attr("data-et","edge"),L.attr("data-id",t.id),L.attr("data-points",y),L.attr("data-look",le(t.look)),t.showPoints&&C.forEach(H=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let Y="";(Wt().flowchart.arrowMarkerAbsolute||Wt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),q.info("arrowTypeStart",t.arrowTypeStart),q.info("arrowTypeEnd",t.arrowTypeEnd);const $=!at&&(t==null?void 0:t.look)==="neo";IS(L,t,Y,a,i,$,W);const O=Math.floor(h.length/2),B=h[O];ke.isLabelCoordinateInPath(B,L.attr("d"))||(u=!0);let I={};return u&&(I.updatedPath=h),I.originalPath=t.points,I},"insertEdge");function _y(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,u=l.x-a.x,d=l.y-a.y,f=Math.hypot(c,h),m=Math.hypot(u,d);if(f<s||m<s){r+=`L${a.x},${a.y}`;continue}const y=c/f,C=h/f,x=u/m,k=d/m,w=y*x+C*k,S=Math.max(-1,Math.min(1,w)),v=Math.acos(S);if(v<s||Math.abs(Math.PI-v)<s){r+=`L${a.x},${a.y}`;continue}const F=Math.min(t/Math.sin(v/2),f/2,m/2),L=a.x-y*F,A=a.y-C*F,V=a.x+x*F,W=a.y+k*F;r+=`L${L},${A}`,r+=`Q${a.x},${a.y} ${V},${W}`}}return r}p(_y,"generateRoundedPath");function Il(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Il,"calculateDeltaAndAngle");function Sy(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&be[t.arrowTypeStart]){const s=be[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Il(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&be[t.arrowTypeEnd]){const s=be[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Il(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}p(Sy,"applyMarkerOffsetsToPoints");var GS=p((e,t,r,i)=>{t.forEach(s=>{mv[s](e,r,i)})},"insertMarkers"),XS=p((e,t,r)=>{q.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").attr("markerUnits","userSpaceOnUse").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"),VS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),ZS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),KS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),QS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),JS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),tv=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),ev=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),rv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),iv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{transitionColor:o}=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",`${o}`)},"barbNeo"),sv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),ov=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const 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"),av=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),nv=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const 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"),lv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`),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",`${o}`)},"only_one_neo"),hv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=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",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);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",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),cv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`),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",`${o}`)},"one_or_more_neo"),uv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=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",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);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",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),dv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
265
+ L20,10
266
+ M20,10
267
+ L0,20`)},"requirement_arrow"),fv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
268
+ L20,10
269
+ M20,10
270
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),pv=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),gv=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:o}=s,a=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");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),mv={extension:XS,composition:VS,aggregation:ZS,dependency:KS,lollipop:QS,point:JS,circle:tv,cross:ev,barb:rv,barbNeo:iv,only_one:sv,zero_or_one:ov,one_or_more:av,zero_or_more:nv,only_one_neo:lv,zero_or_one_neo:hv,one_or_more_neo:cv,zero_or_more_neo:uv,requirement_arrow:dv,requirement_contains:pv,requirement_arrow_neo:fv,requirement_contains_neo:gv},vy=GS,By=typeof global=="object"&&global&&global.Object===Object&&global,yv=typeof self=="object"&&self&&self.Object===Object&&self,Fr=By||yv||Function("return this")(),hr=Fr.Symbol,Ly=Object.prototype,xv=Ly.hasOwnProperty,Cv=Ly.toString,vs=hr?hr.toStringTag:void 0;function bv(e){var t=xv.call(e,vs),r=e[vs];try{e[vs]=void 0;var i=!0}catch{}var s=Cv.call(e);return i&&(t?e[vs]=r:delete e[vs]),s}var kv=Object.prototype,wv=kv.toString;function Tv(e){return wv.call(e)}var _v="[object Null]",Sv="[object Undefined]",wd=hr?hr.toStringTag:void 0;function ns(e){return e==null?e===void 0?Sv:_v:wd&&wd in Object(e)?bv(e):Tv(e)}function ui(e){return e!=null&&typeof e=="object"}var vv="[object Symbol]";function Wh(e){return typeof e=="symbol"||ui(e)&&ns(e)==vv}function Fy(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var $e=Array.isArray,Td=hr?hr.prototype:void 0,_d=Td?Td.toString:void 0;function Ay(e){if(typeof e=="string")return e;if($e(e))return Fy(e,Ay)+"";if(Wh(e))return _d?_d.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Hh(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ma(e){return e}var Bv="[object AsyncFunction]",Lv="[object Function]",Fv="[object GeneratorFunction]",Av="[object Proxy]";function pa(e){if(!Hh(e))return!1;var t=ns(e);return t==Lv||t==Fv||t==Bv||t==Av}var Ln=Fr["__core-js_shared__"],Sd=(function(){var e=/[^.]+$/.exec(Ln&&Ln.keys&&Ln.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ev(e){return!!Sd&&Sd in e}var Mv=Function.prototype,$v=Mv.toString;function mi(e){if(e!=null){try{return $v.call(e)}catch{}try{return e+""}catch{}}return""}var Ov=/[\\^$.*+?()[\]{}|]/g,Dv=/^\[object .+?Constructor\]$/,Iv=Function.prototype,Pv=Object.prototype,Rv=Iv.toString,Nv=Pv.hasOwnProperty,qv=RegExp("^"+Rv.call(Nv).replace(Ov,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zv(e){if(!Hh(e)||Ev(e))return!1;var t=pa(e)?qv:Dv;return t.test(mi(e))}function Wv(e,t){return e==null?void 0:e[t]}function yi(e,t){var r=Wv(e,t);return zv(r)?r:void 0}var Pl=yi(Fr,"WeakMap");function Hv(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Yv(){}var Uv=800,jv=16,Gv=Date.now;function Xv(e){var t=0,r=0;return function(){var i=Gv(),s=jv-(i-r);if(r=i,s>0){if(++t>=Uv)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ds(e){return function(){return e}}var vd=(function(){try{var e=yi(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Vv=vd?function(e,t){return vd(e,"toString",{configurable:!0,enumerable:!1,value:Ds(t),writable:!0})}:Ma,Zv=Xv(Vv);function Kv(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function Qv(e,t,r,i){for(var s=e.length,o=r+-1;++o<s;)if(t(e[o],o,e))return o;return-1}function Jv(e){return e!==e}function tB(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function eB(e,t,r){return t===t?tB(e,t,r):Qv(e,Jv,r)}function rB(e,t){var r=e==null?0:e.length;return!!r&&eB(e,t,0)>-1}var iB=9007199254740991,sB=/^(?:0|[1-9]\d*)$/;function Ey(e,t){var r=typeof e;return t=t??iB,!!t&&(r=="number"||r!="symbol"&&sB.test(e))&&e>-1&&e%1==0&&e<t}function My(e,t){return e===t||e!==e&&t!==t}var Bd=Math.max;function oB(e,t,r){return t=Bd(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=Bd(i.length-t,0),a=Array(o);++s<o;)a[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(a),Hv(e,this,n)}}function aB(e,t){return Zv(oB(e,t,Ma),e+"")}var nB=9007199254740991;function Yh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nB}function $a(e){return e!=null&&Yh(e.length)&&!pa(e)}var lB=Object.prototype;function $y(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||lB;return e===r}function hB(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var cB="[object Arguments]";function Ld(e){return ui(e)&&ns(e)==cB}var Oy=Object.prototype,uB=Oy.hasOwnProperty,dB=Oy.propertyIsEnumerable,Oa=Ld((function(){return arguments})())?Ld:function(e){return ui(e)&&uB.call(e,"callee")&&!dB.call(e,"callee")};function fB(){return!1}var Dy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fd=Dy&&typeof module=="object"&&module&&!module.nodeType&&module,pB=Fd&&Fd.exports===Dy,Ad=pB?Fr.Buffer:void 0,gB=Ad?Ad.isBuffer:void 0,ga=gB||fB,mB="[object Arguments]",yB="[object Array]",xB="[object Boolean]",CB="[object Date]",bB="[object Error]",kB="[object Function]",wB="[object Map]",TB="[object Number]",_B="[object Object]",SB="[object RegExp]",vB="[object Set]",BB="[object String]",LB="[object WeakMap]",FB="[object ArrayBuffer]",AB="[object DataView]",EB="[object Float32Array]",MB="[object Float64Array]",$B="[object Int8Array]",OB="[object Int16Array]",DB="[object Int32Array]",IB="[object Uint8Array]",PB="[object Uint8ClampedArray]",RB="[object Uint16Array]",NB="[object Uint32Array]",Qt={};Qt[EB]=Qt[MB]=Qt[$B]=Qt[OB]=Qt[DB]=Qt[IB]=Qt[PB]=Qt[RB]=Qt[NB]=!0;Qt[mB]=Qt[yB]=Qt[FB]=Qt[xB]=Qt[AB]=Qt[CB]=Qt[bB]=Qt[kB]=Qt[wB]=Qt[TB]=Qt[_B]=Qt[SB]=Qt[vB]=Qt[BB]=Qt[LB]=!1;function qB(e){return ui(e)&&Yh(e.length)&&!!Qt[ns(e)]}function zB(e){return function(t){return e(t)}}var Iy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ws=Iy&&typeof module=="object"&&module&&!module.nodeType&&module,WB=Ws&&Ws.exports===Iy,Fn=WB&&By.process,Ed=(function(){try{var e=Ws&&Ws.require&&Ws.require("util").types;return e||Fn&&Fn.binding&&Fn.binding("util")}catch{}})(),Md=Ed&&Ed.isTypedArray,Uh=Md?zB(Md):qB,HB=Object.prototype,YB=HB.hasOwnProperty;function UB(e,t){var r=$e(e),i=!r&&Oa(e),s=!r&&!i&&ga(e),o=!r&&!i&&!s&&Uh(e),a=r||i||s||o,n=a?hB(e.length,String):[],l=n.length;for(var c in e)(t||YB.call(e,c))&&!(a&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ey(c,l)))&&n.push(c);return n}function jB(e,t){return function(r){return e(t(r))}}var GB=jB(Object.keys,Object),XB=Object.prototype,VB=XB.hasOwnProperty;function Py(e){if(!$y(e))return GB(e);var t=[];for(var r in Object(e))VB.call(e,r)&&r!="constructor"&&t.push(r);return t}function or(e){return $a(e)?UB(e):Py(e)}var ZB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KB=/^\w*$/;function jh(e,t){if($e(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Wh(e)?!0:KB.test(e)||!ZB.test(e)||t!=null&&e in Object(t)}var Vs=yi(Object,"create");function QB(){this.__data__=Vs?Vs(null):{},this.size=0}function JB(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tL="__lodash_hash_undefined__",eL=Object.prototype,rL=eL.hasOwnProperty;function iL(e){var t=this.__data__;if(Vs){var r=t[e];return r===tL?void 0:r}return rL.call(t,e)?t[e]:void 0}var sL=Object.prototype,oL=sL.hasOwnProperty;function aL(e){var t=this.__data__;return Vs?t[e]!==void 0:oL.call(t,e)}var nL="__lodash_hash_undefined__";function lL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Vs&&t===void 0?nL:t,this}function di(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}di.prototype.clear=QB;di.prototype.delete=JB;di.prototype.get=iL;di.prototype.has=aL;di.prototype.set=lL;function hL(){this.__data__=[],this.size=0}function Da(e,t){for(var r=e.length;r--;)if(My(e[r][0],t))return r;return-1}var cL=Array.prototype,uL=cL.splice;function dL(e){var t=this.__data__,r=Da(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():uL.call(t,r,1),--this.size,!0}function fL(e){var t=this.__data__,r=Da(t,e);return r<0?void 0:t[r][1]}function pL(e){return Da(this.__data__,e)>-1}function gL(e,t){var r=this.__data__,i=Da(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ar.prototype.clear=hL;Ar.prototype.delete=dL;Ar.prototype.get=fL;Ar.prototype.has=pL;Ar.prototype.set=gL;var Zs=yi(Fr,"Map");function mL(){this.size=0,this.__data__={hash:new di,map:new(Zs||Ar),string:new di}}function yL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ia(e,t){var r=e.__data__;return yL(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xL(e){var t=Ia(this,e).delete(e);return this.size-=t?1:0,t}function CL(e){return Ia(this,e).get(e)}function bL(e){return Ia(this,e).has(e)}function kL(e,t){var r=Ia(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Er.prototype.clear=mL;Er.prototype.delete=xL;Er.prototype.get=CL;Er.prototype.has=bL;Er.prototype.set=kL;var wL="Expected a function";function Gh(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(wL);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);var a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(Gh.Cache||Er),r}Gh.Cache=Er;var TL=500;function _L(e){var t=Gh(e,function(i){return r.size===TL&&r.clear(),i}),r=t.cache;return t}var SL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vL=/\\(\\)?/g,BL=_L(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(SL,function(r,i,s,o){t.push(s?o.replace(vL,"$1"):i||r)}),t});function LL(e){return e==null?"":Ay(e)}function Ry(e,t){return $e(e)?e:jh(e,t)?[e]:BL(LL(e))}function Pa(e){if(typeof e=="string"||Wh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ny(e,t){t=Ry(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Pa(t[r++])];return r&&r==i?e:void 0}function FL(e,t,r){var i=e==null?void 0:Ny(e,t);return i===void 0?r:i}function qy(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var $d=hr?hr.isConcatSpreadable:void 0;function AL(e){return $e(e)||Oa(e)||!!($d&&e&&e[$d])}function EL(e,t,r,i,s){var o=-1,a=e.length;for(r||(r=AL),s||(s=[]);++o<a;){var n=e[o];r(n)?qy(s,n):i||(s[s.length]=n)}return s}function ML(e,t,r,i){var s=-1,o=e==null?0:e.length;for(i&&o&&(r=e[++s]);++s<o;)r=t(r,e[s],s,e);return r}function $L(){this.__data__=new Ar,this.size=0}function OL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function DL(e){return this.__data__.get(e)}function IL(e){return this.__data__.has(e)}var PL=200;function RL(e,t){var r=this.__data__;if(r instanceof Ar){var i=r.__data__;if(!Zs||i.length<PL-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Er(i)}return r.set(e,t),this.size=r.size,this}function vr(e){var t=this.__data__=new Ar(e);this.size=t.size}vr.prototype.clear=$L;vr.prototype.delete=OL;vr.prototype.get=DL;vr.prototype.has=IL;vr.prototype.set=RL;function zy(e,t){for(var r=-1,i=e==null?0:e.length,s=0,o=[];++r<i;){var a=e[r];t(a,r,e)&&(o[s++]=a)}return o}function NL(){return[]}var qL=Object.prototype,zL=qL.propertyIsEnumerable,Od=Object.getOwnPropertySymbols,WL=Od?function(e){return e==null?[]:(e=Object(e),zy(Od(e),function(t){return zL.call(e,t)}))}:NL;function HL(e,t,r){var i=t(e);return $e(e)?i:qy(i,r(e))}function Dd(e){return HL(e,or,WL)}var Rl=yi(Fr,"DataView"),Nl=yi(Fr,"Promise"),Di=yi(Fr,"Set"),Id="[object Map]",YL="[object Object]",Pd="[object Promise]",Rd="[object Set]",Nd="[object WeakMap]",qd="[object DataView]",UL=mi(Rl),jL=mi(Zs),GL=mi(Nl),XL=mi(Di),VL=mi(Pl),_r=ns;(Rl&&_r(new Rl(new ArrayBuffer(1)))!=qd||Zs&&_r(new Zs)!=Id||Nl&&_r(Nl.resolve())!=Pd||Di&&_r(new Di)!=Rd||Pl&&_r(new Pl)!=Nd)&&(_r=function(e){var t=ns(e),r=t==YL?e.constructor:void 0,i=r?mi(r):"";if(i)switch(i){case UL:return qd;case jL:return Id;case GL:return Pd;case XL:return Rd;case VL:return Nd}return t});var zd=Fr.Uint8Array,ZL="__lodash_hash_undefined__";function KL(e){return this.__data__.set(e,ZL),this}function QL(e){return this.__data__.has(e)}function Ks(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Er;++t<r;)this.add(e[t])}Ks.prototype.add=Ks.prototype.push=KL;Ks.prototype.has=QL;function JL(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function Wy(e,t){return e.has(t)}var tF=1,eF=2;function Hy(e,t,r,i,s,o){var a=r&tF,n=e.length,l=t.length;if(n!=l&&!(a&&l>n))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var u=-1,d=!0,f=r&eF?new Ks:void 0;for(o.set(e,t),o.set(t,e);++u<n;){var m=e[u],y=t[u];if(i)var C=a?i(y,m,u,t,e,o):i(m,y,u,e,t,o);if(C!==void 0){if(C)continue;d=!1;break}if(f){if(!JL(t,function(x,k){if(!Wy(f,k)&&(m===x||s(m,x,r,i,o)))return f.push(k)})){d=!1;break}}else if(!(m===y||s(m,y,r,i,o))){d=!1;break}}return o.delete(e),o.delete(t),d}function rF(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function Xh(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var iF=1,sF=2,oF="[object Boolean]",aF="[object Date]",nF="[object Error]",lF="[object Map]",hF="[object Number]",cF="[object RegExp]",uF="[object Set]",dF="[object String]",fF="[object Symbol]",pF="[object ArrayBuffer]",gF="[object DataView]",Wd=hr?hr.prototype:void 0,An=Wd?Wd.valueOf:void 0;function mF(e,t,r,i,s,o,a){switch(r){case gF:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pF:return!(e.byteLength!=t.byteLength||!o(new zd(e),new zd(t)));case oF:case aF:case hF:return My(+e,+t);case nF:return e.name==t.name&&e.message==t.message;case cF:case dF:return e==t+"";case lF:var n=rF;case uF:var l=i&iF;if(n||(n=Xh),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=sF,a.set(e,t);var h=Hy(n(e),n(t),i,s,o,a);return a.delete(e),h;case fF:if(An)return An.call(e)==An.call(t)}return!1}var yF=1,xF=Object.prototype,CF=xF.hasOwnProperty;function bF(e,t,r,i,s,o){var a=r&yF,n=Dd(e),l=n.length,c=Dd(t),h=c.length;if(l!=h&&!a)return!1;for(var u=l;u--;){var d=n[u];if(!(a?d in t:CF.call(t,d)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var y=!0;o.set(e,t),o.set(t,e);for(var C=a;++u<l;){d=n[u];var x=e[d],k=t[d];if(i)var w=a?i(k,x,d,t,e,o):i(x,k,d,e,t,o);if(!(w===void 0?x===k||s(x,k,r,i,o):w)){y=!1;break}C||(C=d=="constructor")}if(y&&!C){var S=e.constructor,v=t.constructor;S!=v&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof v=="function"&&v instanceof v)&&(y=!1)}return o.delete(e),o.delete(t),y}var kF=1,Hd="[object Arguments]",Yd="[object Array]",Bo="[object Object]",wF=Object.prototype,Ud=wF.hasOwnProperty;function TF(e,t,r,i,s,o){var a=$e(e),n=$e(t),l=a?Yd:_r(e),c=n?Yd:_r(t);l=l==Hd?Bo:l,c=c==Hd?Bo:c;var h=l==Bo,u=c==Bo,d=l==c;if(d&&ga(e)){if(!ga(t))return!1;a=!0,h=!1}if(d&&!h)return o||(o=new vr),a||Uh(e)?Hy(e,t,r,i,s,o):mF(e,t,l,r,i,s,o);if(!(r&kF)){var f=h&&Ud.call(e,"__wrapped__"),m=u&&Ud.call(t,"__wrapped__");if(f||m){var y=f?e.value():e,C=m?t.value():t;return o||(o=new vr),s(y,C,r,i,o)}}return d?(o||(o=new vr),bF(e,t,r,i,s,o)):!1}function Vh(e,t,r,i,s){return e===t?!0:e==null||t==null||!ui(e)&&!ui(t)?e!==e&&t!==t:TF(e,t,r,i,Vh,s)}var _F=1,SF=2;function vF(e,t,r,i){var s=r.length,o=s;if(e==null)return!o;for(e=Object(e);s--;){var a=r[s];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<o;){a=r[s];var n=a[0],l=e[n],c=a[1];if(a[2]){if(l===void 0&&!(n in e))return!1}else{var h=new vr,u;if(!(u===void 0?Vh(c,l,_F|SF,i,h):u))return!1}}return!0}function Yy(e){return e===e&&!Hh(e)}function BF(e){for(var t=or(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Yy(s)]}return t}function Uy(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function LF(e){var t=BF(e);return t.length==1&&t[0][2]?Uy(t[0][0],t[0][1]):function(r){return r===e||vF(r,e,t)}}function FF(e,t){return e!=null&&t in Object(e)}function AF(e,t,r){t=Ry(t,e);for(var i=-1,s=t.length,o=!1;++i<s;){var a=Pa(t[i]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++i!=s?o:(s=e==null?0:e.length,!!s&&Yh(s)&&Ey(a,s)&&($e(e)||Oa(e)))}function EF(e,t){return e!=null&&AF(e,t,FF)}var MF=1,$F=2;function OF(e,t){return jh(e)&&Yy(t)?Uy(Pa(e),t):function(r){var i=FL(r,e);return i===void 0&&i===t?EF(r,e):Vh(t,i,MF|$F)}}function DF(e){return function(t){return t==null?void 0:t[e]}}function IF(e){return function(t){return Ny(t,e)}}function PF(e){return jh(e)?DF(Pa(e)):IF(e)}function jy(e){return typeof e=="function"?e:e==null?Ma:typeof e=="object"?$e(e)?OF(e[0],e[1]):LF(e):PF(e)}function RF(e){return function(t,r,i){for(var s=-1,o=Object(t),a=i(t),n=a.length;n--;){var l=a[++s];if(r(o[l],l,o)===!1)break}return t}}var NF=RF();function qF(e,t){return e&&NF(e,t,or)}function zF(e,t){return function(r,i){if(r==null)return r;if(!$a(r))return e(r,i);for(var s=r.length,o=-1,a=Object(r);++o<s&&i(a[o],o,a)!==!1;);return r}}var Zh=zF(qF);function WF(e){return ui(e)&&$a(e)}function HF(e){return typeof e=="function"?e:Ma}function Zr(e,t){var r=$e(e)?Kv:Zh;return r(e,HF(t))}function YF(e,t){var r=[];return Zh(e,function(i,s,o){t(i,s,o)&&r.push(i)}),r}function Lo(e,t){var r=$e(e)?zy:YF;return r(e,jy(t))}function UF(e,t){return Fy(t,function(r){return e[r]})}function En(e){return e==null?[]:UF(e,or(e))}var jF="[object Map]",GF="[object Set]",XF=Object.prototype,VF=XF.hasOwnProperty;function jd(e){if(e==null)return!0;if($a(e)&&($e(e)||typeof e=="string"||typeof e.splice=="function"||ga(e)||Uh(e)||Oa(e)))return!e.length;var t=_r(e);if(t==jF||t==GF)return!e.size;if($y(e))return!Py(e).length;for(var r in e)if(VF.call(e,r))return!1;return!0}function Ai(e){return e===void 0}function ZF(e,t,r,i,s){return s(e,function(o,a,n){r=i?(i=!1,o):t(r,o,a,n)}),r}function KF(e,t,r){var i=$e(e)?ML:ZF,s=arguments.length<3;return i(e,jy(t),r,s,Zh)}var QF=1/0,JF=Di&&1/Xh(new Di([,-0]))[1]==QF?function(e){return new Di(e)}:Yv,tA=200;function eA(e,t,r){var i=-1,s=rB,o=e.length,a=!0,n=[],l=n;if(o>=tA){var c=JF(e);if(c)return Xh(c);a=!1,s=Wy,l=new Ks}else l=n;t:for(;++i<o;){var h=e[i],u=h;if(h=h!==0?h:0,a&&u===u){for(var d=l.length;d--;)if(l[d]===u)continue t;n.push(h)}else s(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var rA=aB(function(e){return eA(EL(e,1,WF,!0))}),iA="\0",Kr="\0",Gd="";class Ra{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Ds(void 0),this._defaultEdgeLabelFn=Ds(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Kr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return pa(t)||(t=Ds(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return or(this._nodes)}sources(){var t=this;return Lo(this.nodes(),function(r){return jd(t._in[r])})}sinks(){var t=this;return Lo(this.nodes(),function(r){return jd(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return Zr(t,function(o){i.length>1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Kr,this._children[t]={},this._children[Kr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Zr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Zr(or(this._in[t]),r),delete this._in[t],delete this._preds[t],Zr(or(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ai(r))r=Kr;else{r+="";for(var i=r;!Ai(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Kr)return r}}children(t){if(Ai(t)&&(t=Kr),this._isCompound){var r=this._children[t];if(r)return or(r)}else{if(t===Kr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return or(r)}successors(t){var r=this._sucs[t];if(r)return or(r)}neighbors(t){var r=this.predecessors(t);if(r)return rA(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Zr(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),Zr(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&Zr(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return pa(t)||(t=Ds(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return En(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return KF(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,Ai(i)||(i=""+i);var n=Is(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!Ai(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=sA(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Xd(this._preds[r],t),Xd(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Mn(this._isDirected,arguments[0]):Is(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Mn(this._isDirected,arguments[0]):Is(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Mn(this._isDirected,arguments[0]):Is(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Vd(this._preds[r],t),Vd(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=En(i);return r?Lo(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=En(i);return r?Lo(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Ra.prototype._nodeCount=0;Ra.prototype._edgeCount=0;function Xd(e,t){e[t]?e[t]++:e[t]=1}function Vd(e,t){--e[t]||delete e[t]}function Is(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Gd+o+Gd+(Ai(i)?iA:i)}function sA(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Mn(e,t){return Is(e,t.v,t.w,t.name)}function Gy(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}p(Gy,"createLayoutElementGroups");async function Xy(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await vt(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}p(Xy,"measureGroupLabel");async function Vy(e,t,r){var o;const i=await qh(e,t,r),s=((o=i.node())==null?void 0:o.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}p(Vy,"insertMeasuredNode");async function Zy(e,t){const r=new Ra({multigraph:!0,compound:!0}),i=[...t.edges],s=Wt(),o=Gy(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Xy(n,h),r.setNode(h.id,{...h});else{if(c){const u=await Vy(n,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&ky(h)&&await zh(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(d=>d.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Rt(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-CZoZ7r-1.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}p(Zy,"createGraphWithElements");var Yt=new Map,ii=new Map,Ky=new Map,oA=p(()=>{ii.clear(),Ky.clear(),Yt.clear()},"clear"),Qs=p((e,t)=>{const r=ii.get(t)||[];return q.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),aA=p((e,t)=>{const r=ii.get(t)||[];return q.info("Descendants of ",t," is ",r),q.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Qs(e.v,t)||Qs(e.w,t)||r.includes(e.w):(q.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Qy=p((e,t,r,i)=>{q.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),q.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Qy(o,t,r,i);else{const a=t.node(o);q.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(q.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(q.debug("Setting parent",o,e),r.setParent(o,e)):(q.info("In copy ",e,"root",i,"data",t.node(e),i),q.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);q.debug("Copying Edges",n),n.forEach(l=>{q.info("Edge",l);const c=t.edge(l.v,l.w,l.name);q.info("Edge data",c,i);try{aA(l,i)?(q.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),q.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):q.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){q.error(h)}})}q.debug("Removing node",o),t.removeNode(o)})},"copy"),Jy=p((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Ky.set(s,e),i=[...i,...Jy(s,t)];return i},"extractDescendants"),nA=p((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),ma=p((e,t,r)=>{const i=t.children(e);if(q.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=ma(o,t,r),n=nA(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Zd=p(e=>!Yt.has(e)||!Yt.get(e).externalConnections?e:Yt.has(e)?Yt.get(e).id:e,"getAnchorId"),_3=p((e,t)=>{var r;if(!e||t>10){q.debug("Opting out, no graph ");return}else q.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(q.debug("Cluster identified",i," Replacement id in edges: ",ma(i,e,i)),ii.set(i,Jy(i,e)),Yt.set(i,{id:ma(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),o=e.edges();s.length>0?(q.debug("Cluster identified",i,ii),o.forEach(a=>{const n=Qs(a.v,i),l=Qs(a.w,i);n^l&&(q.debug("Edge: ",a," leaves cluster ",i),q.debug("Descendants of XXX ",i,": ",ii.get(i)),Yt.get(i).externalConnections=!0)})):q.debug("Not a cluster ",i,ii)});for(let i of Yt.keys()){const s=Yt.get(i).id,o=e.parent(s);o!==i&&Yt.has(o)&&!Yt.get(o).externalConnections&&(Yt.get(i).id=o);const a=e.edges().some(n=>n.v===i);if(s&&((r=Yt.get(i))!=null&&r.externalConnections)&&a&&r0(e,s,i)){const n=lA(e,i,e.parent(s));n&&(Yt.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);q.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),q.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let o=i.v,a=i.w;if(q.debug("Fix XXX",Yt,"ids:",i.v,i.w,"Translating: ",Yt.get(i.v)," --- ",Yt.get(i.w)),Yt.get(i.v)||Yt.get(i.w)){if(q.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),o=Zd(i.v),a=Zd(i.w),e.removeEdge(i.v,i.w,i.name),o!==i.v){const n=e.parent(o);Yt.get(n).externalConnections=!0,s.fromCluster=i.v}if(a!==i.w){const n=e.parent(a);Yt.get(n).externalConnections=!0,s.toCluster=i.w}q.debug("Fix Replacing with XXX",o,a,i.name),e.setEdge(o,a,s,i.name)}}),t0(e,0),q.trace(Yt)},"adjustClustersAndEdges"),t0=p((e,t)=>{var s,o;if(t>10){q.error("Bailing out");return}let r=e.nodes(),i=!1;for(const a of r){const n=e.children(a);i=i||n.length>0}if(!i){q.debug("Done, no node has children",e.nodes());return}q.debug("Nodes = ",r,t);for(const a of r)if(q.debug("Extracting node",a,Yt,Yt.has(a)&&!Yt.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",t),!Yt.has(a))q.debug("Not a cluster",a,t);else if(!Yt.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){q.debug("Cluster without external connections, without a parent and with children",a,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(o=(s=Yt.get(a))==null?void 0:s.clusterData)!=null&&o.dir&&(l=Yt.get(a).clusterData.dir,q.debug("Fixing dir",Yt.get(a).clusterData.dir,l));const c=new Ra({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Qy(a,e,c,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:Yt.get(a).clusterData,label:Yt.get(a).label,graph:c})}else q.debug("Cluster ** ",a," **not meeting the criteria !externalConnections:",!Yt.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),t),q.debug(Yt);r=e.nodes(),q.debug("New list of nodes",r);for(const a of r){const n=e.node(a);q.debug(" Now next level",a,n),n!=null&&n.clusterNode&&t0(n.graph,t+1)}},"extractor"),e0=p((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=e0(e,s);r=[...r,...o]}),r},"sorter"),S3=p(e=>e0(e,e.children()),"sortNodesByHierarchy"),r0=p((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Yt.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),lA=p((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Qs(s,r))continue;const o=ma(s,e,t);if(o&&!r0(e,o,t))return o}return null},"findSafeAnchorNode");function i0({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??Qh;return p(async function(l,c,h,u){const d=c.select("g");((h==null?void 0:h.insertMarkers)??vy)(d,l.markers,l.type,l.diagramId),Kh();const f={element:d,helpers:h,options:u};f.preparedLayout=await(e==null?void 0:e(l,f));const m=await a(l,f),y=await r(l,f),C={...f,measure:m};i?await i(l,C,y):await Jh(l,C,o),await(s==null?void 0:s(l,C,y))},"render")}p(i0,"createCommonLayoutRenderer");function Kh(){vS(),qS(),OS(),oA()}p(Kh,"clearLayoutRenderState");async function Qh(e,{element:t}){return await Zy(t,e)}p(Qh,"defaultMeasureLayout");async function Jh(e,t,r={}){var a,n;const{measure:i}=t,{groups:s}=i;for(const l of((a=r.getNodes)==null?void 0:a.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await s0(s,l,t,r);const o=a0(e.nodes);for(const l of e.edges)n0(l,r)||await l0(s,l,o,e,r,t)}p(Jh,"paintLayoutData");async function s0(e,t,r,i){t.clusterNode?yd(t):o0(t,r,i)?await by(e.clusters,t):yd(t)}p(s0,"paintLayoutNode");function o0(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}p(o0,"shouldPaintAsCluster");function a0(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}p(a0,"buildNodeLookup");function n0(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}p(n0,"shouldSkipPaintEdge");async function l0(e,t,r,i,s,o){const a=Ty(e.edgePaths,{...t},s.clusterDb??new Map,i.type,ql(t.start,t,r,o,s),ql(t.end,t,r,o,s),i.diagramId,h0(t,s));ky(t)&&(rs.has(t.id)||await zh(e.edgeLabels,t),c0(t,a))}p(l0,"paintLayoutEdge");function ql(e,t,r,i,s){var o;return((o=s.getEdgeNode)==null?void 0:o.call(s,e,t,i))??(e?r.get(e)??{}:{})}p(ql,"getRenderedNode");function h0(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}p(h0,"shouldSkipIntersect");function c0(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=te(),{subGraphTitleTotalMargin:s}=Aa({flowchart:i.flowchart??{}});if(e.label){const o=rs.get(e.id);let a=e.x,n=e.y;if(r){const l=ke.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const o=se.get(e.id).startLeft;let a=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=se.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=se.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=se.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}p(c0,"positionRenderedEdgeLabel");function u0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(u0,"getDefaultExportFromCjs");var xe={},Fo={},Nr={},Kd;function ls(){if(Kd)return Nr;Kd=1;function e(a){return typeof a>"u"||a===null}p(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}p(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}p(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];a[u]=n[u]}}return a}p(i,"extend");function s(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}p(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return p(o,"isNegativeZero"),Nr.isNothing=e,Nr.isObject=t,Nr.toArray=r,Nr.repeat=s,Nr.isNegativeZero=o,Nr.extend=i,Nr}p(ls,"requireCommon");var $n,Qd;function hs(){if(Qd)return $n;Qd=1;function e(r,i){let s="";const o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
271
+
272
+ `+r.mark.snippet),o+" "+s):o}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),$n=t,$n}p(hs,"requireException");var On,Jd;function d0(){if(Jd)return On;Jd=1;const e=ls();function t(s,o,a,n,l){let c="",h="";const u=Math.floor(l/2)-1;return n-o>u&&(c=" ... ",o=n-u+c.length),a-n>u&&(h=" ...",a=n+u-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}p(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}p(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let u="";const d=Math.min(s.line+o.linesAfter,l.length).toString().length,f=o.maxLength-(o.indent+d+3);for(let y=1;y<=o.linesBefore&&!(h-y<0);y++){const C=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),f);u=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),d)+" | "+C.str+`
273
+ `+u}const m=t(s.buffer,n[h],l[h],s.position,f);u+=e.repeat(" ",o.indent)+r((s.line+1).toString(),d)+" | "+m.str+`
274
+ `,u+=e.repeat("-",o.indent+d+3+m.pos)+`^
275
+ `;for(let y=1;y<=o.linesAfter&&!(h+y>=l.length);y++){const C=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),f);u+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),d)+" | "+C.str+`
276
+ `}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),On=i,On}p(d0,"requireSnippet");var Dn,tf;function Te(){if(tf)return Dn;tf=1;const e=hs(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(l){a[String(l)]=n})}),a}p(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return p(s,"Type2"),Dn=s,Dn}p(Te,"requireType");var In,ef;function tc(){if(ef)return In;ef=1;const e=hs(),t=Te();function r(o,a){const n=[];return o[a].forEach(function(l){let c=n.length;n.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),n[c]=l}),n}p(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}p(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return o}p(i,"compileMap");function s(o){return this.extend(o)}return p(s,"Schema2"),s.prototype.extend=p(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),In=s,In}p(tc,"requireSchema");var Pn,rf;function ec(){if(rf)return Pn;rf=1;const e=Te();return Pn=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Pn}p(ec,"requireStr");var Rn,sf;function rc(){if(sf)return Rn;sf=1;const e=Te();return Rn=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),Rn}p(rc,"requireSeq");var Nn,of;function ic(){if(of)return Nn;of=1;const e=Te();return Nn=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),Nn}p(ic,"requireMap");var qn,af;function sc(){if(af)return qn;af=1;const e=tc();return qn=new e({explicit:[ec(),rc(),ic()]}),qn}p(sc,"requireFailsafe");var zn,nf;function oc(){if(nf)return zn;nf=1;const e=Te();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),zn=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),zn}p(oc,"require_null");var Wn,lf;function ac(){if(lf)return Wn;lf=1;const e=Te();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),Wn=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Wn}p(ac,"requireBool");var Hn,hf;function nc(){if(hf)return Hn;hf=1;const e=ls(),t=Te();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}p(r,"isHexCode");function i(c){return c>=48&&c<=55}p(i,"isOctCode");function s(c){return c>=48&&c<=57}p(s,"isDecCode");function o(c){if(c===null)return!1;const h=c.length;let u=0,d=!1;if(!h)return!1;let f=c[u];if((f==="-"||f==="+")&&(f=c[++u]),f==="0"){if(u+1===h)return!0;if(f=c[++u],f==="b"){for(u++;u<h;u++){if(f=c[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(a(c))}if(f==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}if(f==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}}for(;u<h;u++){if(!s(c.charCodeAt(u)))return!1;d=!0}return d?isFinite(a(c)):!1}p(o,"resolveYamlInteger");function a(c){let h=c,u=1,d=h[0];if((d==="-"||d==="+")&&(d==="-"&&(u=-1),h=h.slice(1),d=h[0]),h==="0")return 0;if(d==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}p(a,"parseYamlInteger");function n(c){return a(c)}p(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return p(l,"isInteger"),Hn=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:l,represent:{binary:p(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:p(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:p(function(c){return c.toString(10)},"decimal"),hexadecimal:p(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Hn}p(nc,"requireInt");var Yn,cf;function lc(){if(cf)return Yn;cf=1;const e=ls(),t=Te(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}p(s,"resolveYamlFloat");function o(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}p(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return a.test(u)?u.replace("e",".e"):u}p(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return p(l,"isFloat"),Yn=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:n,defaultStyle:"lowercase"}),Yn}p(lc,"requireFloat");var Un,uf;function hc(){return uf||(uf=1,Un=sc().extend({implicit:[oc(),ac(),nc(),lc()]})),Un}p(hc,"requireJson");var jn,df;function cc(){return df||(df=1,jn=hc()),jn}p(cc,"requireCore");var Gn,ff;function uc(){if(ff)return Gn;ff=1;const e=Te(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}p(i,"resolveYamlTimestamp");function s(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,d=+c[3];if(!c[4])return new Date(Date.UTC(h,u,d));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],k=+(c[11]||0);l=(x*60+k)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,u,d,f,m,y,n));return l&&C.setTime(C.getTime()-l),C}p(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return p(o,"representYamlTimestamp"),Gn=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Gn}p(uc,"requireTimestamp");var Xn,pf;function dc(){if(pf)return Xn;pf=1;const e=Te();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),Xn=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Xn}p(dc,"requireMerge");var Vn,gf;function fc(){if(gf)return Vn;gf=1;const e=Te(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
277
+ \r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(a.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}p(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let f=0;f<l;f++)f%4===0&&f&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(f));const d=l%4*6;return d===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):d===18?(u.push(h>>10&255),u.push(h>>2&255)):d===12&&u.push(h>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function s(a){let n="",l=0;const c=a.length,h=t;for(let d=0;d<c;d++)d%3===0&&d&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[d];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}p(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return p(o,"isBinary"),Vn=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),Vn}p(fc,"requireBinary");var Zn,mf;function pc(){if(mf)return Zn;mf=1;const e=Te(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a=[],n=o;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let d;for(d in h)if(t.call(h,d))if(!u)u=!0;else return!1;if(!u)return!1;if(a.indexOf(d)===-1)a.push(d);else return!1}return!0}p(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return p(s,"constructYamlOmap"),Zn=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Zn}p(pc,"requireOmap");var Kn,yf;function gc(){if(yf)return Kn;yf=1;const e=Te(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return p(i,"constructYamlPairs"),Kn=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Kn}p(gc,"requirePairs");var Qn,xf;function mc(){if(xf)return Qn;xf=1;const e=Te(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),Qn=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Qn}p(mc,"requireSet");var Jn,Cf;function Na(){return Cf||(Cf=1,Jn=cc().extend({implicit:[uc(),dc()],explicit:[fc(),pc(),gc(),mc()]})),Jn}p(Na,"require_default");var bf;function f0(){if(bf)return Fo;bf=1;const e=ls(),t=hs(),r=d0(),i=Na(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,l=4,c=1,h=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(g){return Object.prototype.toString.call(g)}p(x,"_class");function k(g){return g===10||g===13}p(k,"isEol");function w(g){return g===9||g===32}p(w,"isWhiteSpace");function S(g){return g===9||g===32||g===10||g===13}p(S,"isWsOrEol");function v(g){return g===44||g===91||g===93||g===123||g===125}p(v,"isFlowIndicator");function F(g){if(g>=48&&g<=57)return g-48;const D=g|32;return D>=97&&D<=102?D-97+10:-1}p(F,"fromHexCode");function L(g){return g===120?2:g===117?4:g===85?8:0}p(L,"escapedHexLen");function A(g){return g>=48&&g<=57?g-48:-1}p(A,"fromDecimalCode");function V(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
278
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(V,"simpleEscapeSequence");function W(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(W,"charFromCodepoint");function N(g,D,X){D==="__proto__"?Object.defineProperty(g,D,{configurable:!0,enumerable:!0,writable:!0,value:X}):g[D]=X}p(N,"setProperty");const at=new Array(256),Y=new Array(256);for(let g=0;g<256;g++)at[g]=V(g)?1:0,Y[g]=V(g);function $(g,D){this.input=g,this.filename=D.filename||null,this.schema=D.schema||i,this.onWarning=D.onWarning||null,this.legacy=D.legacy||!1,this.json=D.json||!1,this.listener=D.listener||null,this.maxDepth=typeof D.maxDepth=="number"?D.maxDepth:100,this.maxTotalMergeKeys=typeof D.maxTotalMergeKeys=="number"?D.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p($,"State");function O(g,D){const X={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return X.snippet=r(X),new t(D,X)}p(O,"generateError");function B(g,D){throw O(g,D)}p(B,"throwError");function I(g,D){g.onWarning&&g.onWarning.call(null,O(g,D))}p(I,"throwWarning");function P(g,D,X){const Q=g.anchorMapTransactions;if(Q.length!==0){const G=Q[Q.length-1];s.call(G,D)||(G[D]={existed:s.call(g.anchorMap,D),value:g.anchorMap[D]})}g.anchorMap[D]=X}p(P,"storeAnchor");function H(g){g.anchorMapTransactions.push(Object.create(null))}p(H,"beginAnchorTransaction");function K(g){const D=g.anchorMapTransactions.pop(),X=g.anchorMapTransactions;if(X.length===0)return;const Q=X[X.length-1],G=Object.keys(D);for(let nt=0,T=G.length;nt<T;nt+=1){const R=G[nt];s.call(Q,R)||(Q[R]=D[R])}}p(K,"commitAnchorTransaction");function ct(g){const D=g.anchorMapTransactions.pop(),X=Object.keys(D);for(let Q=X.length-1;Q>=0;Q-=1){const G=D[X[Q]];G.existed?g.anchorMap[X[Q]]=G.value:delete g.anchorMap[X[Q]]}}p(ct,"rollbackAnchorTransaction");function dt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}p(dt,"snapshotState");function kt(g,D){g.position=D.position,g.line=D.line,g.lineStart=D.lineStart,g.lineIndent=D.lineIndent,g.firstTabInLine=D.firstTabInLine,g.tag=D.tag,g.anchor=D.anchor,g.kind=D.kind,g.result=D.result}p(kt,"restoreState");const _t={YAML:p(function(D,X,Q){D.version!==null&&B(D,"duplication of %YAML directive"),Q.length!==1&&B(D,"YAML directive accepts exactly one argument");const G=/^([0-9]+)\.([0-9]+)$/.exec(Q[0]);G===null&&B(D,"ill-formed argument of the YAML directive");const nt=parseInt(G[1],10),T=parseInt(G[2],10);nt!==1&&B(D,"unacceptable YAML version of the document"),D.version=Q[0],D.checkLineBreaks=T<2,T!==1&&T!==2&&I(D,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(D,X,Q){let G;Q.length!==2&&B(D,"TAG directive accepts exactly two arguments");const nt=Q[0];G=Q[1],y.test(nt)||B(D,"ill-formed tag handle (first argument) of the TAG directive"),s.call(D.tagMap,nt)&&B(D,'there is a previously declared suffix for "'+nt+'" tag handle'),C.test(G)||B(D,"ill-formed tag prefix (second argument) of the TAG directive");try{G=decodeURIComponent(G)}catch{B(D,"tag prefix is malformed: "+G)}D.tagMap[nt]=G},"handleTagDirective")};function wt(g,D,X,Q){if(D<X){const G=g.input.slice(D,X);if(Q)for(let nt=0,T=G.length;nt<T;nt+=1){const R=G.charCodeAt(nt);R===9||R>=32&&R<=1114111||B(g,"expected valid JSON character")}else d.test(G)&&B(g,"the stream contains non-printable characters");g.result+=G}}p(wt,"captureSegment");function ft(g,D,X,Q){e.isObject(X)||B(g,"cannot merge mappings; the provided source object is unacceptable");const G=Object.keys(X);for(let nt=0,T=G.length;nt<T;nt+=1){const R=G[nt];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&B(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call(D,R)||(N(D,R,X[R]),Q[R]=!0)}}p(ft,"mergeMappings");function At(g,D,X,Q,G,nt,T,R,rt){if(Array.isArray(G)){G=Array.prototype.slice.call(G);for(let Z=0,J=G.length;Z<J;Z+=1)Array.isArray(G[Z])&&B(g,"nested arrays are not supported inside keys"),typeof G=="object"&&x(G[Z])==="[object Object]"&&(G[Z]="[object Object]")}if(typeof G=="object"&&x(G)==="[object Object]"&&(G="[object Object]"),G=String(G),D===null&&(D={}),Q==="tag:yaml.org,2002:merge")if(Array.isArray(nt))for(let Z=0,J=nt.length;Z<J;Z+=1)ft(g,D,nt[Z],X);else ft(g,D,nt,X);else!g.json&&!s.call(X,G)&&s.call(D,G)&&(g.line=T||g.line,g.lineStart=R||g.lineStart,g.position=rt||g.position,B(g,"duplicated mapping key")),N(D,G,nt),delete X[G];return D}p(At,"storeMappingPair");function qt(g){const D=g.input.charCodeAt(g.position);D===10?g.position++:D===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):B(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(qt,"readLineBreak");function Ft(g,D,X){let Q=0,G=g.input.charCodeAt(g.position);for(;G!==0;){for(;w(G);)G===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),G=g.input.charCodeAt(++g.position);if(D&&G===35)do G=g.input.charCodeAt(++g.position);while(G!==10&&G!==13&&G!==0);if(k(G))for(qt(g),G=g.input.charCodeAt(g.position),Q++,g.lineIndent=0;G===32;)g.lineIndent++,G=g.input.charCodeAt(++g.position);else break}return X!==-1&&Q!==0&&g.lineIndent<X&&I(g,"deficient indentation"),Q}p(Ft,"skipSeparationSpace");function lt(g){let D=g.position,X=g.input.charCodeAt(D);return!!((X===45||X===46)&&X===g.input.charCodeAt(D+1)&&X===g.input.charCodeAt(D+2)&&(D+=3,X=g.input.charCodeAt(D),X===0||S(X)))}p(lt,"testDocumentSeparator");function yt(g,D){D===1?g.result+=" ":D>1&&(g.result+=e.repeat(`
279
+ `,D-1))}p(yt,"writeFoldedLines");function Et(g,D,X){let Q,G,nt,T,R,rt;const Z=g.kind,J=g.result;let ot=g.input.charCodeAt(g.position);if(S(ot)||v(ot)||ot===35||ot===38||ot===42||ot===33||ot===124||ot===62||ot===39||ot===34||ot===37||ot===64||ot===96)return!1;if(ot===63||ot===45){const it=g.input.charCodeAt(g.position+1);if(S(it)||X&&v(it))return!1}for(g.kind="scalar",g.result="",Q=G=g.position,nt=!1;ot!==0;){if(ot===58){const it=g.input.charCodeAt(g.position+1);if(S(it)||X&&v(it))break}else if(ot===35){const it=g.input.charCodeAt(g.position-1);if(S(it))break}else{if(g.position===g.lineStart&&lt(g)||X&&v(ot))break;if(k(ot))if(T=g.line,R=g.lineStart,rt=g.lineIndent,Ft(g,!1,-1),g.lineIndent>=D){nt=!0,ot=g.input.charCodeAt(g.position);continue}else{g.position=G,g.line=T,g.lineStart=R,g.lineIndent=rt;break}}nt&&(wt(g,Q,G,!1),yt(g,g.line-T),Q=G=g.position,nt=!1),w(ot)||(G=g.position+1),ot=g.input.charCodeAt(++g.position)}return wt(g,Q,G,!1),g.result?!0:(g.kind=Z,g.result=J,!1)}p(Et,"readPlainScalar");function Nt(g,D){let X,Q,G=g.input.charCodeAt(g.position);if(G!==39)return!1;for(g.kind="scalar",g.result="",g.position++,X=Q=g.position;(G=g.input.charCodeAt(g.position))!==0;)if(G===39)if(wt(g,X,g.position,!0),G=g.input.charCodeAt(++g.position),G===39)X=g.position,g.position++,Q=g.position;else return!0;else k(G)?(wt(g,X,Q,!0),yt(g,Ft(g,!1,D)),X=Q=g.position):g.position===g.lineStart&&lt(g)?B(g,"unexpected end of the document within a single quoted scalar"):(g.position++,w(G)||(Q=g.position));B(g,"unexpected end of the stream within a single quoted scalar")}p(Nt,"readSingleQuotedScalar");function Xt(g,D){let X,Q,G,nt=g.input.charCodeAt(g.position);if(nt!==34)return!1;for(g.kind="scalar",g.result="",g.position++,X=Q=g.position;(nt=g.input.charCodeAt(g.position))!==0;){if(nt===34)return wt(g,X,g.position,!0),g.position++,!0;if(nt===92){if(wt(g,X,g.position,!0),nt=g.input.charCodeAt(++g.position),k(nt))Ft(g,!1,D);else if(nt<256&&at[nt])g.result+=Y[nt],g.position++;else if((G=L(nt))>0){let T=G,R=0;for(;T>0;T--)nt=g.input.charCodeAt(++g.position),(G=F(nt))>=0?R=(R<<4)+G:B(g,"expected hexadecimal character");g.result+=W(R),g.position++}else B(g,"unknown escape sequence");X=Q=g.position}else k(nt)?(wt(g,X,Q,!0),yt(g,Ft(g,!1,D)),X=Q=g.position):g.position===g.lineStart&&lt(g)?B(g,"unexpected end of the document within a double quoted scalar"):(g.position++,w(nt)||(Q=g.position))}B(g,"unexpected end of the stream within a double quoted scalar")}p(Xt,"readDoubleQuotedScalar");function z(g,D){let X=!0,Q,G,nt;const T=g.tag;let R;const rt=g.anchor;let Z,J,ot,it;const xt=Object.create(null);let ut,Tt,St,Pt=g.input.charCodeAt(g.position);if(Pt===91)Z=93,it=!1,R=[];else if(Pt===123)Z=125,it=!0,R={};else return!1;for(g.anchor!==null&&P(g,g.anchor,R),Pt=g.input.charCodeAt(++g.position);Pt!==0;){if(Ft(g,!0,D),Pt=g.input.charCodeAt(g.position),Pt===Z)return g.position++,g.tag=T,g.anchor=rt,g.kind=it?"mapping":"sequence",g.result=R,!0;if(X?Pt===44&&B(g,"expected the node content, but found ','"):B(g,"missed comma between flow collection entries"),Tt=ut=St=null,J=ot=!1,Pt===63){const Zt=g.input.charCodeAt(g.position+1);S(Zt)&&(J=ot=!0,g.position++,Ft(g,!0,D))}Q=g.line,G=g.lineStart,nt=g.position,oe(g,D,o,!1,!0),Tt=g.tag,ut=g.result,Ft(g,!0,D),Pt=g.input.charCodeAt(g.position),(ot||g.line===Q)&&Pt===58&&(J=!0,Pt=g.input.charCodeAt(++g.position),Ft(g,!0,D),oe(g,D,o,!1,!0),St=g.result),it?At(g,R,xt,Tt,ut,St,Q,G,nt):J?R.push(At(g,null,xt,Tt,ut,St,Q,G,nt)):R.push(ut),Ft(g,!0,D),Pt=g.input.charCodeAt(g.position),Pt===44?(X=!0,Pt=g.input.charCodeAt(++g.position)):X=!1}B(g,"unexpected end of the stream within a flow collection")}p(z,"readFlowCollection");function gt(g,D){let X,Q=c,G=!1,nt=!1,T=D,R=0,rt=!1,Z,J=g.input.charCodeAt(g.position);if(J===124)X=!1;else if(J===62)X=!0;else return!1;for(g.kind="scalar",g.result="";J!==0;)if(J=g.input.charCodeAt(++g.position),J===43||J===45)c===Q?Q=J===43?u:h:B(g,"repeat of a chomping mode identifier");else if((Z=A(J))>=0)Z===0?B(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):nt?B(g,"repeat of an indentation width identifier"):(T=D+Z-1,nt=!0);else break;if(w(J)){do J=g.input.charCodeAt(++g.position);while(w(J));if(J===35)do J=g.input.charCodeAt(++g.position);while(!k(J)&&J!==0)}for(;J!==0;){for(qt(g),g.lineIndent=0,J=g.input.charCodeAt(g.position);(!nt||g.lineIndent<T)&&J===32;)g.lineIndent++,J=g.input.charCodeAt(++g.position);if(!nt&&g.lineIndent>T&&(T=g.lineIndent),k(J)){R++;continue}if(!nt&&T===0&&B(g,"missing indentation for block scalar"),g.lineIndent<T){Q===u?g.result+=e.repeat(`
280
+ `,G?1+R:R):Q===c&&G&&(g.result+=`
281
+ `);break}X?w(J)?(rt=!0,g.result+=e.repeat(`
282
+ `,G?1+R:R)):rt?(rt=!1,g.result+=e.repeat(`
283
+ `,R+1)):R===0?G&&(g.result+=" "):g.result+=e.repeat(`
284
+ `,R):g.result+=e.repeat(`
285
+ `,G?1+R:R),G=!0,nt=!0,R=0;const ot=g.position;for(;!k(J)&&J!==0;)J=g.input.charCodeAt(++g.position);wt(g,ot,g.position,!1)}return!0}p(gt,"readBlockScalar");function _e(g,D){const X=g.tag,Q=g.anchor,G=[];let nt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&P(g,g.anchor,G);let T=g.input.charCodeAt(g.position);for(;T!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,B(g,"tab characters must not be used in indentation")),T===45);){const R=g.input.charCodeAt(g.position+1);if(!S(R))break;if(nt=!0,g.position++,Ft(g,!0,-1)&&g.lineIndent<=D){G.push(null),T=g.input.charCodeAt(g.position);continue}const rt=g.line;if(oe(g,D,n,!1,!0),G.push(g.result),Ft(g,!0,-1),T=g.input.charCodeAt(g.position),(g.line===rt||g.lineIndent>D)&&T!==0)B(g,"bad indentation of a sequence entry");else if(g.lineIndent<D)break}return nt?(g.tag=X,g.anchor=Q,g.kind="sequence",g.result=G,!0):!1}p(_e,"readBlockSequence");function Ht(g,D,X){let Q,G,nt,T;const R=g.tag,rt=g.anchor,Z={},J=Object.create(null);let ot=null,it=null,xt=null,ut=!1,Tt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&P(g,g.anchor,Z);let St=g.input.charCodeAt(g.position);for(;St!==0;){!ut&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,B(g,"tab characters must not be used in indentation"));const Pt=g.input.charCodeAt(g.position+1),Zt=g.line;if((St===63||St===58)&&S(Pt))St===63?(ut&&(At(g,Z,J,ot,it,null,G,nt,T),ot=it=xt=null),Tt=!0,ut=!0,Q=!0):ut?(ut=!1,Q=!0):B(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,St=Pt;else{if(G=g.line,nt=g.lineStart,T=g.position,!oe(g,X,a,!1,!0))break;if(g.line===Zt){for(St=g.input.charCodeAt(g.position);w(St);)St=g.input.charCodeAt(++g.position);if(St===58)St=g.input.charCodeAt(++g.position),S(St)||B(g,"a whitespace character is expected after the key-value separator within a block mapping"),ut&&(At(g,Z,J,ot,it,null,G,nt,T),ot=it=xt=null),Tt=!0,ut=!1,Q=!1,ot=g.tag,it=g.result;else if(Tt)B(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=R,g.anchor=rt,!0}else if(Tt)B(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=R,g.anchor=rt,!0}if((g.line===Zt||g.lineIndent>D)&&(ut&&(G=g.line,nt=g.lineStart,T=g.position),oe(g,D,l,!0,Q)&&(ut?it=g.result:xt=g.result),ut||(At(g,Z,J,ot,it,xt,G,nt,T),ot=it=xt=null),Ft(g,!0,-1),St=g.input.charCodeAt(g.position)),(g.line===Zt||g.lineIndent>D)&&St!==0)B(g,"bad indentation of a mapping entry");else if(g.lineIndent<D)break}return ut&&At(g,Z,J,ot,it,null,G,nt,T),Tt&&(g.tag=R,g.anchor=rt,g.kind="mapping",g.result=Z),Tt}p(Ht,"readBlockMapping");function gr(g){let D=!1,X=!1,Q,G,nt=g.input.charCodeAt(g.position);if(nt!==33)return!1;g.tag!==null&&B(g,"duplication of a tag property"),nt=g.input.charCodeAt(++g.position),nt===60?(D=!0,nt=g.input.charCodeAt(++g.position)):nt===33?(X=!0,Q="!!",nt=g.input.charCodeAt(++g.position)):Q="!";let T=g.position;if(D){do nt=g.input.charCodeAt(++g.position);while(nt!==0&&nt!==62);g.position<g.length?(G=g.input.slice(T,g.position),nt=g.input.charCodeAt(++g.position)):B(g,"unexpected end of the stream within a verbatim tag")}else{for(;nt!==0&&!S(nt);)nt===33&&(X?B(g,"tag suffix cannot contain exclamation marks"):(Q=g.input.slice(T-1,g.position+1),y.test(Q)||B(g,"named tag handle cannot contain such characters"),X=!0,T=g.position+1)),nt=g.input.charCodeAt(++g.position);G=g.input.slice(T,g.position),m.test(G)&&B(g,"tag suffix cannot contain flow indicator characters")}G&&!C.test(G)&&B(g,"tag name cannot contain such characters: "+G);try{G=decodeURIComponent(G)}catch{B(g,"tag name is malformed: "+G)}return D?g.tag=G:s.call(g.tagMap,Q)?g.tag=g.tagMap[Q]+G:Q==="!"?g.tag="!"+G:Q==="!!"?g.tag="tag:yaml.org,2002:"+G:B(g,'undeclared tag handle "'+Q+'"'),!0}p(gr,"readTagProperty");function fe(g){let D=g.input.charCodeAt(g.position);if(D!==38)return!1;g.anchor!==null&&B(g,"duplication of an anchor property"),D=g.input.charCodeAt(++g.position);const X=g.position;for(;D!==0&&!S(D)&&!v(D);)D=g.input.charCodeAt(++g.position);return g.position===X&&B(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(X,g.position),!0}p(fe,"readAnchorProperty");function Re(g){let D=g.input.charCodeAt(g.position);if(D!==42)return!1;D=g.input.charCodeAt(++g.position);const X=g.position;for(;D!==0&&!S(D)&&!v(D);)D=g.input.charCodeAt(++g.position);g.position===X&&B(g,"name of an alias node must contain at least one character");const Q=g.input.slice(X,g.position);return s.call(g.anchorMap,Q)||B(g,'unidentified alias "'+Q+'"'),g.result=g.anchorMap[Q],Ft(g,!0,-1),!0}p(Re,"readAlias");function Mr(g,D,X,Q){const G=dt(g);return H(g),kt(g,D),g.tag=null,g.anchor=null,g.kind=null,g.result=null,Ht(g,X,Q)&&g.kind==="mapping"?(K(g),!0):(ct(g),kt(g,G),!1)}p(Mr,"tryReadBlockMappingFromProperty");function oe(g,D,X,Q,G){let nt,T,R=1,rt=!1,Z=!1,J=null,ot,it,xt;g.depth>=g.maxDepth&&B(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const ut=nt=T=l===X||n===X;if(Q&&Ft(g,!0,-1)&&(rt=!0,g.lineIndent>D?R=1:g.lineIndent===D?R=0:g.lineIndent<D&&(R=-1)),R===1)for(;;){const Tt=g.input.charCodeAt(g.position),St=dt(g);if(rt&&(Tt===33&&g.tag!==null||Tt===38&&g.anchor!==null)||!gr(g)&&!fe(g))break;J===null&&(J=St),Ft(g,!0,-1)?(rt=!0,T=ut,g.lineIndent>D?R=1:g.lineIndent===D?R=0:g.lineIndent<D&&(R=-1)):T=!1}if(T&&(T=rt||G),R===1||l===X)if(o===X||a===X?it=D:it=D+1,xt=g.position-g.lineStart,R===1)if(T&&(_e(g,xt)||Ht(g,xt,it))||z(g,it))Z=!0;else{const Tt=g.input.charCodeAt(g.position);J!==null&&ut&&!T&&Tt!==124&&Tt!==62&&Mr(g,J,J.position-J.lineStart,it)||nt&&gt(g,it)||Nt(g,it)||Xt(g,it)?Z=!0:Re(g)?(Z=!0,(g.tag!==null||g.anchor!==null)&&B(g,"alias node should not have any properties")):Et(g,it,o===X)&&(Z=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&P(g,g.anchor,g.result)}else R===0&&(Z=T&&_e(g,xt));if(g.tag===null)g.anchor!==null&&P(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&B(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let Tt=0,St=g.implicitTypes.length;Tt<St;Tt+=1)if(ot=g.implicitTypes[Tt],ot.resolve(g.result)){g.result=ot.construct(g.result),g.tag=ot.tag,g.anchor!==null&&P(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))ot=g.typeMap[g.kind||"fallback"][g.tag];else{ot=null;const Tt=g.typeMap.multi[g.kind||"fallback"];for(let St=0,Pt=Tt.length;St<Pt;St+=1)if(g.tag.slice(0,Tt[St].tag.length)===Tt[St].tag){ot=Tt[St];break}}ot||B(g,"unknown tag !<"+g.tag+">"),g.result!==null&&ot.kind!==g.kind&&B(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+ot.kind+'", not "'+g.kind+'"'),ot.resolve(g.result,g.tag)?(g.result=ot.construct(g.result,g.tag),g.anchor!==null&&P(g,g.anchor,g.result)):B(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||Z}p(oe,"composeNode");function $r(g){const D=g.position;let X=!1,Q;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(Q=g.input.charCodeAt(g.position))!==0&&(Ft(g,!0,-1),Q=g.input.charCodeAt(g.position),!(g.lineIndent>0||Q!==37));){X=!0,Q=g.input.charCodeAt(++g.position);let G=g.position;for(;Q!==0&&!S(Q);)Q=g.input.charCodeAt(++g.position);const nt=g.input.slice(G,g.position),T=[];for(nt.length<1&&B(g,"directive name must not be less than one character in length");Q!==0;){for(;w(Q);)Q=g.input.charCodeAt(++g.position);if(Q===35){do Q=g.input.charCodeAt(++g.position);while(Q!==0&&!k(Q));break}if(k(Q))break;for(G=g.position;Q!==0&&!S(Q);)Q=g.input.charCodeAt(++g.position);T.push(g.input.slice(G,g.position))}Q!==0&&qt(g),s.call(_t,nt)?_t[nt](g,nt,T):I(g,'unknown document directive "'+nt+'"')}if(Ft(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,Ft(g,!0,-1)):X&&B(g,"directives end mark is expected"),oe(g,g.lineIndent-1,l,!1,!0),Ft(g,!0,-1),g.checkLineBreaks&&f.test(g.input.slice(D,g.position))&&I(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&lt(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,Ft(g,!0,-1));return}g.position<g.length-1&&B(g,"end of the stream or a document separator is expected")}p($r,"readDocument");function Je(g,D){g=String(g),D=D||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
286
+ `),g.charCodeAt(0)===65279&&(g=g.slice(1)));const X=new $(g,D),Q=g.indexOf("\0");for(Q!==-1&&(X.position=Q,B(X,"null byte is not allowed in input")),X.input+="\0";X.input.charCodeAt(X.position)===32;)X.lineIndent+=1,X.position+=1;for(;X.position<X.length-1;)$r(X);return X.documents}p(Je,"loadDocuments");function mr(g,D,X){D!==null&&typeof D=="object"&&typeof X>"u"&&(X=D,D=null);const Q=Je(g,X);if(typeof D!="function")return Q;for(let G=0,nt=Q.length;G<nt;G+=1)D(Q[G])}p(mr,"loadAll2");function yr(g,D){const X=Je(g,D);if(X.length!==0){if(X.length===1)return X[0];throw new t("expected a single document in the stream, but found more")}}return p(yr,"load2"),Fo.loadAll=mr,Fo.load=yr,Fo}p(f0,"requireLoader");var tl={},kf;function p0(){if(kf)return tl;kf=1;const e=ls(),t=hs(),r=Na(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,l=13,c=32,h=33,u=34,d=35,f=37,m=38,y=39,C=42,x=44,k=45,w=58,S=61,v=62,F=63,L=64,A=91,V=93,W=96,N=123,at=124,Y=125,$={};$[0]="\\0",$[7]="\\a",$[8]="\\b",$[9]="\\t",$[10]="\\n",$[11]="\\v",$[12]="\\f",$[13]="\\r",$[27]="\\e",$[34]='\\"',$[92]="\\\\",$[133]="\\N",$[160]="\\_",$[8232]="\\L",$[8233]="\\P";const O=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function I(T,R){if(R===null)return{};const rt={},Z=Object.keys(R);for(let J=0,ot=Z.length;J<ot;J+=1){let it=Z[J],xt=String(R[it]);it.slice(0,2)==="!!"&&(it="tag:yaml.org,2002:"+it.slice(2));const ut=T.compiledTypeMap.fallback[it];ut&&s.call(ut.styleAliases,xt)&&(xt=ut.styleAliases[xt]),rt[it]=xt}return rt}p(I,"compileStyleMap");function P(T){let R,rt;const Z=T.toString(16).toUpperCase();if(T<=255)R="x",rt=2;else if(T<=65535)R="u",rt=4;else if(T<=4294967295)R="U",rt=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+R+e.repeat("0",rt-Z.length)+Z}p(P,"encodeHex");const H=1,K=2;function ct(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=I(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?K:H,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(ct,"State");function dt(T,R){const rt=e.repeat(" ",R);let Z=0,J="";const ot=T.length;for(;Z<ot;){let it;const xt=T.indexOf(`
287
+ `,Z);xt===-1?(it=T.slice(Z),Z=ot):(it=T.slice(Z,xt+1),Z=xt+1),it.length&&it!==`
288
+ `&&(J+=rt),J+=it}return J}p(dt,"indentString");function kt(T,R){return`
289
+ `+e.repeat(" ",T.indent*R)}p(kt,"generateNextLine");function _t(T,R){for(let rt=0,Z=T.implicitTypes.length;rt<Z;rt+=1)if(T.implicitTypes[rt].resolve(R))return!0;return!1}p(_t,"testImplicitResolving");function wt(T){return T===c||T===a}p(wt,"isWhitespace");function ft(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==o||T>=65536&&T<=1114111}p(ft,"isPrintable");function At(T){return ft(T)&&T!==o&&T!==l&&T!==n}p(At,"isNsCharOrWhitespace");function qt(T,R,rt){const Z=At(T),J=Z&&!wt(T);return(rt?Z:Z&&T!==x&&T!==A&&T!==V&&T!==N&&T!==Y)&&T!==d&&!(R===w&&!J)||At(R)&&!wt(R)&&T===d||R===w&&J}p(qt,"isPlainSafe");function Ft(T){return ft(T)&&T!==o&&!wt(T)&&T!==k&&T!==F&&T!==w&&T!==x&&T!==A&&T!==V&&T!==N&&T!==Y&&T!==d&&T!==m&&T!==C&&T!==h&&T!==at&&T!==S&&T!==v&&T!==y&&T!==u&&T!==f&&T!==L&&T!==W}p(Ft,"isPlainSafeFirst");function lt(T){return!wt(T)&&T!==w}p(lt,"isPlainSafeLast");function yt(T,R){const rt=T.charCodeAt(R);let Z;return rt>=55296&&rt<=56319&&R+1<T.length&&(Z=T.charCodeAt(R+1),Z>=56320&&Z<=57343)?(rt-55296)*1024+Z-56320+65536:rt}p(yt,"codePointAt");function Et(T){return/^\n* /.test(T)}p(Et,"needIndentIndicator");const Nt=1,Xt=2,z=3,gt=4,_e=5;function Ht(T,R,rt,Z,J,ot,it,xt){let ut,Tt=0,St=null,Pt=!1,Zt=!1;const us=Z!==-1;let Or=-1,Dr=Ft(yt(T,0))&&lt(yt(T,T.length-1));if(R||it)for(ut=0;ut<T.length;Tt>=65536?ut+=2:ut++){if(Tt=yt(T,ut),!ft(Tt))return _e;Dr=Dr&&qt(Tt,St,xt),St=Tt}else{for(ut=0;ut<T.length;Tt>=65536?ut+=2:ut++){if(Tt=yt(T,ut),Tt===n)Pt=!0,us&&(Zt=Zt||ut-Or-1>Z&&T[Or+1]!==" ",Or=ut);else if(!ft(Tt))return _e;Dr=Dr&&qt(Tt,St,xt),St=Tt}Zt=Zt||us&&ut-Or-1>Z&&T[Or+1]!==" "}return!Pt&&!Zt?Dr&&!it&&!J(T)?Nt:ot===K?_e:Xt:rt>9&&Et(T)?_e:it?ot===K?_e:Xt:Zt?gt:z}p(Ht,"chooseScalarStyle");function gr(T,R,rt,Z,J){T.dump=(function(){if(R.length===0)return T.quotingType===K?'""':"''";if(!T.noCompatMode&&(O.indexOf(R)!==-1||B.test(R)))return T.quotingType===K?'"'+R+'"':"'"+R+"'";const ot=T.indent*Math.max(1,rt),it=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-ot),xt=Z||T.flowLevel>-1&&rt>=T.flowLevel;function ut(Tt){return _t(T,Tt)}switch(p(ut,"testAmbiguity"),Ht(R,xt,T.indent,it,ut,T.quotingType,T.forceQuotes&&!Z,J)){case Nt:return R;case Xt:return"'"+R.replace(/'/g,"''")+"'";case z:return"|"+fe(R,T.indent)+Re(dt(R,ot));case gt:return">"+fe(R,T.indent)+Re(dt(Mr(R,it),ot));case _e:return'"'+$r(R)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(gr,"writeScalar");function fe(T,R){const rt=Et(T)?String(R):"",Z=T[T.length-1]===`
290
+ `,ot=Z&&(T[T.length-2]===`
291
+ `||T===`
292
+ `)?"+":Z?"":"-";return rt+ot+`
293
+ `}p(fe,"blockHeader");function Re(T){return T[T.length-1]===`
294
+ `?T.slice(0,-1):T}p(Re,"dropEndingNewline");function Mr(T,R){const rt=/(\n+)([^\n]*)/g;let Z=(function(){let xt=T.indexOf(`
295
+ `);return xt=xt!==-1?xt:T.length,rt.lastIndex=xt,oe(T.slice(0,xt),R)})(),J=T[0]===`
296
+ `||T[0]===" ",ot,it;for(;it=rt.exec(T);){const xt=it[1],ut=it[2];ot=ut[0]===" ",Z+=xt+(!J&&!ot&&ut!==""?`
297
+ `:"")+oe(ut,R),J=ot}return Z}p(Mr,"foldString");function oe(T,R){if(T===""||T[0]===" ")return T;const rt=/ [^ ]/g;let Z,J=0,ot,it=0,xt=0,ut="";for(;Z=rt.exec(T);)xt=Z.index,xt-J>R&&(ot=it>J?it:xt,ut+=`
298
+ `+T.slice(J,ot),J=ot+1),it=xt;return ut+=`
299
+ `,T.length-J>R&&it>J?ut+=T.slice(J,it)+`
300
+ `+T.slice(it+1):ut+=T.slice(J),ut.slice(1)}p(oe,"foldLine");function $r(T){let R="",rt=0;for(let Z=0;Z<T.length;rt>=65536?Z+=2:Z++){rt=yt(T,Z);const J=$[rt];!J&&ft(rt)?(R+=T[Z],rt>=65536&&(R+=T[Z+1])):R+=J||P(rt)}return R}p($r,"escapeString");function Je(T,R,rt){let Z="";const J=T.tag;for(let ot=0,it=rt.length;ot<it;ot+=1){let xt=rt[ot];T.replacer&&(xt=T.replacer.call(rt,String(ot),xt)),(X(T,R,xt,!1,!1)||typeof xt>"u"&&X(T,R,null,!1,!1))&&(Z!==""&&(Z+=","+(T.condenseFlow?"":" ")),Z+=T.dump)}T.tag=J,T.dump="["+Z+"]"}p(Je,"writeFlowSequence");function mr(T,R,rt,Z){let J="";const ot=T.tag;for(let it=0,xt=rt.length;it<xt;it+=1){let ut=rt[it];T.replacer&&(ut=T.replacer.call(rt,String(it),ut)),(X(T,R+1,ut,!0,!0,!1,!0)||typeof ut>"u"&&X(T,R+1,null,!0,!0,!1,!0))&&((!Z||J!=="")&&(J+=kt(T,R)),T.dump&&n===T.dump.charCodeAt(0)?J+="-":J+="- ",J+=T.dump)}T.tag=ot,T.dump=J||"[]"}p(mr,"writeBlockSequence");function yr(T,R,rt){let Z="";const J=T.tag,ot=Object.keys(rt);for(let it=0,xt=ot.length;it<xt;it+=1){let ut="";Z!==""&&(ut+=", "),T.condenseFlow&&(ut+='"');const Tt=ot[it];let St=rt[Tt];T.replacer&&(St=T.replacer.call(rt,Tt,St)),X(T,R,Tt,!1,!1)&&(T.dump.length>1024&&(ut+="? "),ut+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),X(T,R,St,!1,!1)&&(ut+=T.dump,Z+=ut))}T.tag=J,T.dump="{"+Z+"}"}p(yr,"writeFlowMapping");function g(T,R,rt,Z){let J="";const ot=T.tag,it=Object.keys(rt);if(T.sortKeys===!0)it.sort();else if(typeof T.sortKeys=="function")it.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let xt=0,ut=it.length;xt<ut;xt+=1){let Tt="";(!Z||J!=="")&&(Tt+=kt(T,R));const St=it[xt];let Pt=rt[St];if(T.replacer&&(Pt=T.replacer.call(rt,St,Pt)),!X(T,R+1,St,!0,!0,!0))continue;const Zt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Zt&&(T.dump&&n===T.dump.charCodeAt(0)?Tt+="?":Tt+="? "),Tt+=T.dump,Zt&&(Tt+=kt(T,R)),X(T,R+1,Pt,!0,Zt)&&(T.dump&&n===T.dump.charCodeAt(0)?Tt+=":":Tt+=": ",Tt+=T.dump,J+=Tt)}T.tag=ot,T.dump=J||"{}"}p(g,"writeBlockMapping");function D(T,R,rt){const Z=rt?T.explicitTypes:T.implicitTypes;for(let J=0,ot=Z.length;J<ot;J+=1){const it=Z[J];if((it.instanceOf||it.predicate)&&(!it.instanceOf||typeof R=="object"&&R instanceof it.instanceOf)&&(!it.predicate||it.predicate(R))){if(rt?it.multi&&it.representName?T.tag=it.representName(R):T.tag=it.tag:T.tag="?",it.represent){const xt=T.styleMap[it.tag]||it.defaultStyle;let ut;if(i.call(it.represent)==="[object Function]")ut=it.represent(R,xt);else if(s.call(it.represent,xt))ut=it.represent[xt](R,xt);else throw new t("!<"+it.tag+'> tag resolver accepts not "'+xt+'" style');T.dump=ut}return!0}}return!1}p(D,"detectType");function X(T,R,rt,Z,J,ot,it){T.tag=null,T.dump=rt,D(T,rt,!1)||D(T,rt,!0);const xt=i.call(T.dump),ut=Z;Z&&(Z=T.flowLevel<0||T.flowLevel>R);const Tt=xt==="[object Object]"||xt==="[object Array]";let St,Pt;if(Tt&&(St=T.duplicates.indexOf(rt),Pt=St!==-1),(T.tag!==null&&T.tag!=="?"||Pt||T.indent!==2&&R>0)&&(J=!1),Pt&&T.usedDuplicates[St])T.dump="*ref_"+St;else{if(Tt&&Pt&&!T.usedDuplicates[St]&&(T.usedDuplicates[St]=!0),xt==="[object Object]")Z&&Object.keys(T.dump).length!==0?(g(T,R,T.dump,J),Pt&&(T.dump="&ref_"+St+T.dump)):(yr(T,R,T.dump),Pt&&(T.dump="&ref_"+St+" "+T.dump));else if(xt==="[object Array]")Z&&T.dump.length!==0?(T.noArrayIndent&&!it&&R>0?mr(T,R-1,T.dump,J):mr(T,R,T.dump,J),Pt&&(T.dump="&ref_"+St+T.dump)):(Je(T,R,T.dump),Pt&&(T.dump="&ref_"+St+" "+T.dump));else if(xt==="[object String]")T.tag!=="?"&&gr(T,T.dump,R,ot,ut);else{if(xt==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+xt)}if(T.tag!==null&&T.tag!=="?"){let Zt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Zt="!"+Zt:Zt.slice(0,18)==="tag:yaml.org,2002:"?Zt="!!"+Zt.slice(18):Zt="!<"+Zt+">",T.dump=Zt+" "+T.dump}}return!0}p(X,"writeNode");function Q(T,R){const rt=[],Z=[];G(T,rt,Z);const J=Z.length;for(let ot=0;ot<J;ot+=1)R.duplicates.push(rt[Z[ot]]);R.usedDuplicates=new Array(J)}p(Q,"getDuplicateReferences");function G(T,R,rt){if(T!==null&&typeof T=="object"){const Z=R.indexOf(T);if(Z!==-1)rt.indexOf(Z)===-1&&rt.push(Z);else if(R.push(T),Array.isArray(T))for(let J=0,ot=T.length;J<ot;J+=1)G(T[J],R,rt);else{const J=Object.keys(T);for(let ot=0,it=J.length;ot<it;ot+=1)G(T[J[ot]],R,rt)}}}p(G,"inspectNode");function nt(T,R){R=R||{};const rt=new ct(R);rt.noRefs||Q(T,rt);let Z=T;return rt.replacer&&(Z=rt.replacer.call({"":Z},"",Z)),X(rt,0,Z,!0,!0)?rt.dump+`
301
+ `:""}return p(nt,"dump2"),tl.dump=nt,tl}p(p0,"requireDumper");var wf;function g0(){if(wf)return xe;wf=1;const e=f0(),t=p0();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return p(r,"renamed"),xe.Type=Te(),xe.Schema=tc(),xe.FAILSAFE_SCHEMA=sc(),xe.JSON_SCHEMA=hc(),xe.CORE_SCHEMA=cc(),xe.DEFAULT_SCHEMA=Na(),xe.load=e.load,xe.loadAll=e.loadAll,xe.dump=t.dump,xe.YAMLException=hs(),xe.types={binary:fc(),float:lc(),map:ic(),null:oc(),pairs:gc(),set:mc(),timestamp:uc(),bool:ac(),int:nc(),merge:dc(),omap:pc(),seq:rc(),str:ec()},xe.safeLoad=r("safeLoad","load"),xe.safeLoadAll=r("safeLoadAll","loadAll"),xe.safeDump=r("safeDump","dump"),xe}p(g0,"requireJsYaml");var hA=g0(),cA=u0(hA),{Type:v3,Schema:B3,FAILSAFE_SCHEMA:L3,JSON_SCHEMA:uA,CORE_SCHEMA:F3,DEFAULT_SCHEMA:A3,load:dA,loadAll:E3,dump:M3,YAMLException:$3,types:O3,safeLoad:D3,safeLoadAll:I3,safeDump:P3}=cA,fA={common:io,getConfig:te,insertCluster:by,insertEdge:Ty,insertEdgeLabel:zh,insertMarkers:vy,insertNode:qh,interpolateToCurve:yh,labelHelper:vt,log:q,positionEdgeLabel:zS},Js={},m0=p(e=>{for(const t of e)Js[t.name]=t},"registerLayoutLoaders"),pA=p(()=>{m0([{name:"dagre",loader:p(async()=>await Rt(()=>import("./dagre-GXQ25YYZ-QY0m5eSL.js"),__vite__mapDeps([3,4,1,2])),"loader")},{name:"swimlane",loader:p(async()=>await Rt(()=>import("./swimlanes-42K2YHIH-DN4MssUX.js"),__vite__mapDeps([5,1,2])),"loader")},{name:"cose-bilkent",loader:p(async()=>await Rt(()=>import("./cose-bilkent-JH36ORCC-DISm8_p0.js"),__vite__mapDeps([6,7,1,2])),"loader")}])},"registerDefaultLayoutLoaders");pA();var R3=p(async(e,t)=>{if(!(e.layoutAlgorithm in Js))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=Js[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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",`${c}-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"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,fA,{algorithm:r.algorithm})},"render"),N3=p((e="",{fallback:t="dagre"}={})=>{if(e in Js)return e;if(t in Js)return q.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"),yc="comm",y0="rule",x0="decl",gA="@media",mA="@import",yA="@supports",xA="@namespace",zl="@keyframes",C0="@layer",CA="@scope",bA=Math.abs,Hs=String.fromCharCode;function b0(e){return e.trim()}function Wl(e,t,r){return e.replace(t,r)}function Ii(e,t){return e.charCodeAt(t)|0}function is(e,t,r){return e.slice(t,r)}function sr(e){return e.length}function k0(e){return e.length}function Ao(e,t){return t.push(e),e}var qa=1,ss=1,w0=0,We=0,ne=0,cs="";function xc(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:qa,column:ss,length:a,return:"",siblings:n}}function kA(){return ne}function wA(){return ne=We>0?Ii(cs,--We):0,ss--,ne===10&&(ss=1,qa--),ne}function Ve(){return ne=We<w0?Ii(cs,We++):0,ss++,ne===10&&(ss=1,qa++),ne}function Hr(){return Ii(cs,We)}function Ho(){return We}function za(e,t){return is(cs,e,t)}function to(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 TA(e){return qa=ss=1,w0=sr(cs=e),We=0,[]}function _A(e){return cs="",e}function el(e){return b0(za(We-1,Hl(e===91?e+2:e===40?e+1:e)))}function SA(e){for(;(ne=Hr())&&ne<33;)Ve();return to(e)>2||to(ne)>3?"":" "}function vA(e,t){for(;--t&&Ve()&&!(ne<48||ne>102||ne>57&&ne<65||ne>70&&ne<97););return za(e,Ho()+(t<6&&Hr()==32&&Ve()==32))}function Hl(e){for(;Ve();)switch(ne){case e:return We;case 34:case 39:e!==34&&e!==39&&Hl(ne);break;case 40:e===41&&Hl(e);break;case 92:Ve();break}return We}function BA(e,t){for(;Ve()&&e+ne!==57;)if(e+ne===84&&Hr()===47)break;return"/*"+za(t,We-1)+"*"+Hs(e===47?e:Ve())}function LA(e){for(;!to(Hr());)Ve();return za(e,We)}function FA(e){return _A(Yo("",null,null,null,[""],e=TA(e),0,[0],e))}function Yo(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,u=a,d=0,f=0,m=0,y=1,C=1,x=1,k=0,w=0,S="",v=s,F=o,L=i,A=S;C;)switch(m=w,w=Ve()){case 40:m!=108&&Ii(A,u-1)==58?(k++,A+="("):A+=el(w);break;case 41:k--,A+=")";break;case 34:case 39:case 91:A+=el(w);break;case 9:case 10:case 13:case 32:if(k>0){A+=Hs(w);break}A+=SA(m);break;case 92:A+=vA(Ho()-1,7);continue;case 47:switch(Hr()){case 42:case 47:Ao(AA(BA(Ve(),Ho()),t,r,l),l),(to(m||1)==5||to(Hr()||1)==5)&&sr(A)&&is(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*y:n[c++]=sr(A)*x;case 125*y:case 59:case 0:if(k>0&&w){A+=Hs(w);break}switch(w){case 0:case 125:C=0;case 59+h:x==-1&&(A=Wl(A,/\f/g,"")),f>0&&(sr(A)-u||y===0)&&Ao(f>32?_f(A+";",i,r,u-1,l):_f(Wl(A," ","")+";",i,r,u-2,l),l);break;case 59:A+=";";default:if(Ao(L=Tf(A,t,r,c,h,s,n,S,v=[],F=[],u,o),o),w===123)if(h===0)Yo(A,t,L,L,v,o,u,n,F);else{switch(d){case 99:if(Ii(A,3)===110)break;case 108:if(Ii(A,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Yo(e,L,L,i&&Ao(Tf(e,L,L,0,0,s,n,S,s,v=[],u,F),F),s,F,u,n,i?v:F):Yo(A,L,L,L,[""],F,0,n,F)}}c=h=f=0,y=x=1,S=A="",u=a;break;case 58:u=1+sr(A),f=m;default:if(y<1){if(w==123)--y;else if(w==125&&y++==0&&wA()==125)continue}switch(A+=Hs(w),w*y){case 38:x=h>0?1:(A+="\f",-1);break;case 44:if(k>0)break;n[c++]=(sr(A)-1)*x,x=1;break;case 64:Hr()===45&&(A+=el(Ve())),d=Hr(),h=u=sr(S=A+=LA(Ho())),w++;break;case 45:m===45&&sr(A)==2&&(y=0)}}return o}function Tf(e,t,r,i,s,o,a,n,l,c,h,u){for(var d=s-1,f=s===0?o:[""],m=k0(f),y=0,C=0,x=0;y<i;++y)for(var k=0,w=is(e,d+1,d=bA(C=a[y])),S=e;k<m;++k)(S=b0(C>0?f[k]+" "+w:Wl(w,/&\f/g,f[k])))&&(l[x++]=S);return xc(e,t,r,s===0?y0:n,l,c,h,u)}function AA(e,t,r,i){return xc(e,t,r,yc,Hs(kA()),is(e,2,-2),0,i)}function _f(e,t,r,i,s){return xc(e,t,r,x0,is(e,0,i),is(e,i+1,-1),i,s)}function Yl(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function EA(e,t,r,i){switch(e.type){case C0:if(e.children.length)break;case mA:case xA:case x0:return e.return=e.return||e.value;case yc:return"";case zl:return e.return=e.value+"{"+Yl(e.children,i)+"}";case y0:if(!sr(e.value=e.props.join(",")))return""}return sr(r=Yl(e.children,i))?e.return=e.value+"{"+r+"}":""}function MA(e){var t=k0(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var T0="c4",$A=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),OA=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-sJULbaUv.js");return{diagram:t}},__vite__mapDeps([8,9,1,2]));return{id:T0,diagram:e}},"loader"),DA={id:T0,detector:$A,loader:OA},IA=DA,_0="flowchart",PA=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),RA=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D7fXEPrM.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]));return{id:_0,diagram:e}},"loader"),NA={id:_0,detector:PA,loader:RA},qA=NA,S0="flowchart-v2",zA=p((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"),WA=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D7fXEPrM.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]));return{id:S0,diagram:e}},"loader"),HA={id:S0,detector:zA,loader:WA},YA=HA,v0="swimlane",UA=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),jA=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-DFxrYFKF.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,13,9,14,1,2]));return{id:v0,diagram:e}},"loader"),GA={id:v0,detector:UA,loader:jA},XA=GA,B0="er",VA=p(e=>/^\s*erDiagram/.test(e),"detector"),ZA=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-BhBsYQ7c.js");return{diagram:t}},__vite__mapDeps([16,12,13,14,1,2]));return{id:B0,diagram:e}},"loader"),KA={id:B0,detector:VA,loader:ZA},QA=KA,L0="gitGraph",JA=p(e=>/^\s*gitGraph/.test(e),"detector"),tE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-C3_ixsOl.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,1,2]));return{id:L0,diagram:e}},"loader"),eE={id:L0,detector:JA,loader:tE},rE=eE,F0="gantt",iE=p(e=>/^\s*gantt/.test(e),"detector"),sE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-Bwf8EtWr.js");return{diagram:t}},__vite__mapDeps([21,1,2,22,23,24]));return{id:F0,diagram:e}},"loader"),oE={id:F0,detector:iE,loader:sE},aE=oE,A0="info",nE=p(e=>/^\s*info/.test(e),"detector"),lE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-BpcHmgOL.js");return{diagram:t}},__vite__mapDeps([25,20,1,2]));return{id:A0,diagram:e}},"loader"),hE={id:A0,detector:nE,loader:lE},E0="pie",cE=p(e=>/^\s*pie/.test(e),"detector"),uE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-BiSkIsrz.js");return{diagram:t}},__vite__mapDeps([26,19,20,1,2,27,28,23]));return{id:E0,diagram:e}},"loader"),dE={id:E0,detector:cE,loader:uE},M0="quadrantChart",fE=p(e=>/^\s*quadrantChart/.test(e),"detector"),pE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-CJetqQxd.js");return{diagram:t}},__vite__mapDeps([29,22,23,24,1,2]));return{id:M0,diagram:e}},"loader"),gE={id:M0,detector:fE,loader:pE},mE=gE,$0="xychart",yE=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),xE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-Bx83X515.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24,1,2]));return{id:$0,diagram:e}},"loader"),CE={id:$0,detector:yE,loader:xE},bE=CE,O0="requirement",kE=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),wE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-meFCoLtR.js");return{diagram:t}},__vite__mapDeps([31,12,13,1,2]));return{id:O0,diagram:e}},"loader"),TE={id:O0,detector:kE,loader:wE},_E=TE,D0="sequence",SE=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),vE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-BdVzFsCC.js");return{diagram:t}},__vite__mapDeps([32,18,9,1,2]));return{id:D0,diagram:e}},"loader"),BE={id:D0,detector:SE,loader:vE},LE=BE,I0="class",FE=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),AE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-D8z-o3xu.js");return{diagram:t}},__vite__mapDeps([33,34,11,12,13,9,1,2]));return{id:I0,diagram:e}},"loader"),EE={id:I0,detector:FE,loader:AE},ME=EE,P0="classDiagram",$E=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),OE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-D8z-o3xu.js");return{diagram:t}},__vite__mapDeps([35,34,11,12,13,9,1,2]));return{id:P0,diagram:e}},"loader"),DE={id:P0,detector:$E,loader:OE},IE=DE,R0="state",PE=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),RE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-Cmc-iYtm.js");return{diagram:t}},__vite__mapDeps([36,37,12,13,9,4,1,2]));return{id:R0,diagram:e}},"loader"),NE={id:R0,detector:PE,loader:RE},qE=NE,N0="stateDiagram",zE=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),WE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-Cj-hQ4qB.js");return{diagram:t}},__vite__mapDeps([38,37,12,13,9,1,2]));return{id:N0,diagram:e}},"loader"),HE={id:N0,detector:zE,loader:WE},YE=HE,q0="journey",UE=p(e=>/^\s*journey/.test(e),"detector"),jE=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-CT1CrVQO.js");return{diagram:t}},__vite__mapDeps([39,11,9,27,1,2]));return{id:q0,diagram:e}},"loader"),GE={id:q0,detector:UE,loader:jE},XE=GE,VE=p((e,t,r)=>{q.debug(`rendering svg for syntax error
302
+ `);const i=mw(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Jf(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"),z0={draw:VE},ZE=z0,KE={db:{},renderer:z0,parser:{parse:p(()=>{},"parse")}},QE=KE,W0="flowchart-elk",JE=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),tM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D7fXEPrM.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]));return{id:W0,diagram:e}},"loader"),eM={id:W0,detector:JE,loader:tM},rM=eM,H0="timeline",iM=p(e=>/^\s*timeline/.test(e),"detector"),sM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-pxxqlxwt.js");return{diagram:t}},__vite__mapDeps([40,27,1,2]));return{id:H0,diagram:e}},"loader"),oM={id:H0,detector:iM,loader:sM},aM=oM,Y0="mindmap",nM=p(e=>/^\s*mindmap/.test(e),"detector"),lM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-Brc-v1M4.js");return{diagram:t}},__vite__mapDeps([41,12,13,1,2]));return{id:Y0,diagram:e}},"loader"),hM={id:Y0,detector:nM,loader:lM},cM=hM,U0="kanban",uM=p(e=>/^\s*kanban/.test(e),"detector"),dM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-N1CNMAOm.js");return{diagram:t}},__vite__mapDeps([42,11,1,2]));return{id:U0,diagram:e}},"loader"),fM={id:U0,detector:uM,loader:dM},pM=fM,j0="sankey",gM=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),mM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-BR9eN4Do.js");return{diagram:t}},__vite__mapDeps([43,28,23,1,2]));return{id:j0,diagram:e}},"loader"),yM={id:j0,detector:gM,loader:mM},xM=yM,G0="packet",CM=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),bM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DQGRD9gQ.js");return{diagram:t}},__vite__mapDeps([44,19,20,1,2]));return{id:G0,diagram:e}},"loader"),kM={id:G0,detector:CM,loader:bM},X0="radar",wM=p(e=>/^\s*radar-beta/.test(e),"detector"),TM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-D-3R3axg.js");return{diagram:t}},__vite__mapDeps([45,19,20,1,2]));return{id:X0,diagram:e}},"loader"),_M={id:X0,detector:wM,loader:TM},V0="block",SM=p(e=>/^\s*block(-beta)?/.test(e),"detector"),vM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-DtWpTjgT.js");return{diagram:t}},__vite__mapDeps([46,11,14,1,2]));return{id:V0,diagram:e}},"loader"),BM={id:V0,detector:SM,loader:vM},LM=BM,Z0="treeView",FM=p(e=>/^\s*treeView-beta/.test(e),"detector"),AM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-DhjaAe2g.js");return{diagram:t}},__vite__mapDeps([47,18,19,20,1,2]));return{id:Z0,diagram:e}},"loader"),EM={id:Z0,detector:FM,loader:AM},MM=EM,K0="architecture",$M=p(e=>/^\s*architecture/.test(e),"detector"),OM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-CaeUIM7e.js");return{diagram:t}},__vite__mapDeps([48,19,20,1,2,7]));return{id:K0,diagram:e}},"loader"),DM={id:K0,detector:$M,loader:OM},IM=DM,Q0="eventmodeling",PM=p(e=>/^\s*eventmodeling/.test(e),"detector"),RM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-BxXEtjRu.js");return{diagram:t}},__vite__mapDeps([49,19,20,1,2]));return{id:Q0,diagram:e}},"loader"),NM={id:Q0,detector:PM,loader:RM},qM=NM,J0="ishikawa",zM=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),WM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-DzSGmhT5.js");return{diagram:t}},__vite__mapDeps([50,1,2]));return{id:J0,diagram:e}},"loader"),HM={id:J0,detector:zM,loader:WM},tx="venn",YM=p(e=>/^\s*venn-beta/.test(e),"detector"),UM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-DiItNcze.js");return{diagram:t}},__vite__mapDeps([51,1,2]));return{id:tx,diagram:e}},"loader"),jM={id:tx,detector:YM,loader:UM},GM=jM,ex="treemap",XM=p(e=>/^\s*treemap/.test(e),"detector"),VM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DkbXkJpd.js");return{diagram:t}},__vite__mapDeps([52,19,13,20,1,2,24,28,23]));return{id:ex,diagram:e}},"loader"),ZM={id:ex,detector:XM,loader:VM},rx="wardley",KM=p(e=>/^\s*wardley-beta/i.test(e),"detector"),QM=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-Dfvub75z.js");return{diagram:t}},__vite__mapDeps([53,19,20,1,2]));return{id:rx,diagram:e}},"loader"),JM={id:rx,detector:KM,loader:QM},t5=JM,ix="cynefin",e5=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),r5=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-CN-IKDQ6.js");return{diagram:t}},__vite__mapDeps([54,19,20,1,2]));return{id:ix,diagram:e}},"loader"),i5={id:ix,detector:e5,loader:r5},sx="railroad",s5=p(e=>/^\s*railroad-beta/i.test(e),"detector"),o5=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DTTtZpGO.js");return{diagram:t}},__vite__mapDeps([55,56,19,20,1,2]));return{id:sx,diagram:e}},"loader"),a5={id:sx,detector:s5,loader:o5},ox="railroadEbnf",n5=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),l5=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-C_XxskCm.js");return{diagram:t}},__vite__mapDeps([57,56,19,20,1,2]));return{id:ox,diagram:e}},"loader"),h5={id:ox,detector:n5,loader:l5},ax="railroadAbnf",c5=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),u5=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-BGxuVEiU.js");return{diagram:t}},__vite__mapDeps([58,56,19,20,1,2]));return{id:ax,diagram:e}},"loader"),d5={id:ax,detector:c5,loader:u5},nx="railroadPeg",f5=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),p5=p(async()=>{const{diagram:e}=await Rt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-D8jUV01U.js");return{diagram:t}},__vite__mapDeps([59,56,19,20,1,2]));return{id:nx,diagram:e}},"loader"),g5={id:nx,detector:f5,loader:p5},Sf=!1,Wa=p(()=>{Sf||(Sf=!0,Vo("error",QE,e=>e.toLowerCase().trim()==="error"),Vo("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),al(rM,cM,IM),al(IA,pM,IE,ME,QA,aE,hE,dE,_E,LE,XA,YA,qA,aM,rE,YE,qE,XE,mE,xM,kM,bE,LM,qM,MM,_M,HM,ZM,a5,h5,d5,g5,GM,t5,i5))},"addDiagrams"),m5=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ni).map(async([r,{detector:i,loader:s}])=>{if(s)try{cl(r)}catch{try{const{diagram:o,id:a}=await s();Vo(a,o,i)}catch(o){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ni[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),y5="graphics-document document";function lx(e,t){e.attr("role",y5),t!==""&&e.attr("aria-roledescription",t)}p(lx,"setA11yDiagramInfo");function hx(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)}}}p(hx,"addSVGa11yTitleDescription");var oi,Ul=(oi=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){var c,h;const i=te(),s=Vl(t,i);t=RT(t)+`
303
+ `;try{cl(s)}catch{const u=cb(s);if(!u)throw new Gf(`Diagram ${s} not found.`);const{id:d,diagram:f}=await u();Vo(d,f)}const{db:o,parser:a,renderer:n,init:l}=cl(s);return a.parser&&(a.parser.yy=o),(c=o.clear)==null||c.call(o),l==null||l(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await a.parse(t),new oi(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(oi,"Diagram"),oi),vf=[],x5=p(()=>{vf.forEach(e=>{e()}),vf=[]},"attachFunctions"),C5=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function cx(e){const t=e.match(jf);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
304
+ `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
305
+ `):t[2];let s=dA(i,{schema:uA})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}p(cx,"extractFrontMatter");var b5=p(e=>e.replace(/\r\n?/g,`
306
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),k5=p(e=>{const{text:t,metadata:r}=cx(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),w5=p(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:ST(e),directive:t}},"processDirectives");function Cc(e){const t=b5(e),r=k5(t),i=w5(r.text),s=wh(r.config,i.directive);return e=C5(i.text),{code:e,title:r.title,config:s}}p(Cc,"preprocessDiagram");function ux(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(ux,"toBase64");var T5=5e4,_5="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",S5="sandbox",v5="loose",B5="http://www.w3.org/2000/svg",L5="http://www.w3.org/1999/xlink",F5="http://www.w3.org/1999/xhtml",A5="100%",E5="100%",M5="border:0;margin:0;",$5="margin:0",O5="allow-top-navigation-by-user-activation allow-popups",D5='The "iframe" tag is not supported by your browser.',I5=["foreignobject"],P5=["dominant-baseline"];function bc(e){const t=Cc(e);return Go(),ab(t.config??{}),t}p(bc,"processAndSetConfigs");async function dx(e,t){Wa();try{const{code:r,config:i}=bc(e);return{diagramType:(await px(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(dx,"parse");var Bf=p((e,t,r=[])=>{const i=zf(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),R5=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=we(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Du(l.styles)||n.forEach(c=>{r.insertRule(Bf(l.id,c,l.styles),r.cssRules.length)}),Du(l.textStyles)||r.insertRule(Bf(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.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=hl(s)+`
307
+ `}else i+=`${e.themeCSS}
308
+ `;return i+hl(r)},"createCssStyles"),N5=p((e,t)=>Yl(FA(`${e}{${t}}`),MA([p(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===zl)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[gA,yA,C0,CA,"@container","@starting-style"],zl].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=yc))},"addNamespace"),EA])),"compileCSS"),q5=p((e,t,r,i)=>{const s=R5(e,r),o=Lb(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return N5(i,o)},"createUserStyles"),z5=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=jr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),W5=p((e="",t)=>{var s,o;const r=(o=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":E5,i=ux(`<body style="${$5}">${e}</body>`);return`<iframe style="width:${A5};height:${r};${M5}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${O5}">
309
+ ${D5}
310
+ </iframe>`},"putIntoIFrame"),Lf=p((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",B5);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function jl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(jl,"sandboxedIframe");var H5=p((e,t,r,i)=>{var s,o,a;(s=e.getElementById(t))==null||s.remove(),(o=e.getElementById(r))==null||o.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),Y5=p(async function(e,t,r){var Y,$,O,B,I,P;Wa();const i=bc(t);t=i.code;const s=te();q.debug(s),t.length>((s==null?void 0:s.maxTextSize)??T5)&&(t=_5);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const K=It(d?n:c).node();K&&"remove"in K&&K.remove()},"removeTempElements");let u=It(document.body);const d=s.securityLevel===S5,f=s.securityLevel===v5,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const H=jl(It(r),a);u=It(H.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=It(r);Lf(u,e,l,`font-family: ${m}`,L5)}else{if(H5(document,e,l,a),d){const H=jl(It(document.body),a);u=It(H.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=It("body");Lf(u,e,l)}let y,C;try{y=await Ul.fromText(t,{title:i.title})}catch(H){if(s.suppressErrorRendering)throw h(),H;y=await Ul.fromText("error"),C=H}const x=u.select(c).node(),k=y.type,w=x.firstChild,S=w.firstChild,v=($=(Y=y.renderer).getClasses)==null?void 0:$.call(Y,t,y),F=q5(s,k,v,o),L=document.createElement("style");L.innerHTML=F,w.insertBefore(L,S);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(H){throw s.suppressErrorRendering?h():ZE.draw(t,e,"11.17.2"),H}const A=u.select(`${c} svg`),V=(B=(O=y.db).getAccTitle)==null?void 0:B.call(O),W=(P=(I=y.db).getAccDescription)==null?void 0:P.call(I);gx(k,A,V,W);const at=p(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",F5);let H=u.select(c).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),H=z5(H,d,dr(s.arrowMarkerAbsolute)),d){const K=u.select(c+" svg").node();H=W5(H,K)}else f||(H=Qi.sanitize(H,{ADD_TAGS:I5,ADD_ATTR:P5,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return x5(),H},"serializeSvg")();if(C)throw C;return h(),{diagramType:k,svg:at,bindFunctions:y.db.bindFunctions}},"render");function fx(e={}){var i;const t=ue({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),sb(t),t!=null&&t.theme&&t.theme in Sr?t.themeVariables=Sr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Sr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?ib(t):Wf();Xl(r.logLevel),Wa()}p(fx,"initialize");var px=p((e,t={})=>{const{code:r}=Cc(e);return Ul.fromText(r,t)},"getDiagramFromText");function gx(e,t,r,i){lx(t,e),hx(t,r,i,t.attr("id"))}p(gx,"addA11yInfo");var fi=Object.freeze({render:Y5,parse:dx,getDiagramFromText:px,initialize:fx,getConfig:te,setConfig:Hf,getSiteConfig:Wf,updateSiteConfig:ob,reset:p(()=>{Go()},"reset"),globalReset:p(()=>{Go(Ji)},"globalReset"),defaultConfig:Ji});Xl(te().logLevel);Go(te());var U5=p((e,t,r)=>{q.warn(e),kh(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"),mx=p(async function(e={querySelector:".mermaid"}){try{await j5(e)}catch(t){if(kh(t)&&q.error(t.str),Ie.parseError&&Ie.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),j5=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=fi.getConfig();q.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");q.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(q.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),fi.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new ke.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=vg(ke.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ke.detectInit(a);h&&q.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await bx(c,a,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){U5(u,n,Ie.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),yx=p(function(e){fi.initialize(e)},"initialize"),G5=p(async function(e,t,r){q.warn("mermaid.init is deprecated. Please use run instead."),e&&yx(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await mx(i)},"init"),X5=p(async(e,{lazyLoad:t=!0}={})=>{Wa(),al(...e),t===!1&&await m5()},"registerExternalDiagrams"),xx=p(function(){if(Ie.startOnLoad){const{startOnLoad:e}=fi.getConfig();e&&Ie.run().catch(t=>q.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",xx,!1);var V5=p(function(e){Ie.parseError=e},"setParseErrorHandler"),ya=[],rl=!1,Cx=p(async()=>{if(!rl){for(rl=!0;ya.length>0;){const e=ya.shift();if(e)try{await e()}catch(t){q.error("Error executing queue",t)}}rl=!1}},"executeQueue"),Z5=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((o,a)=>{fi.parse(e,t).then(n=>{o(n),r(n)},n=>{var l;q.error("Error parsing",n),(l=Ie.parseError)==null||l.call(Ie,n),a(n),i(n)})}),"performCall");ya.push(s),Cx().catch(i)}),"parse"),bx=p((e,t,r)=>new Promise((i,s)=>{const o=p(()=>new Promise((a,n)=>{fi.render(e,t,r).then(l=>{a(l),i(l)},l=>{var c;q.error("Error parsing",l),(c=Ie.parseError)==null||c.call(Ie,l),n(l),s(l)})}),"performCall");ya.push(o),Cx().catch(s)}),"render"),K5=p(()=>Object.keys(ni).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ie={startOnLoad:!0,mermaidAPI:fi,parse:Z5,render:bx,init:G5,run:mx,registerExternalDiagrams:X5,registerLayoutLoaders:m0,initialize:yx,parseError:void 0,contentLoaded:xx,setParseErrorHandler:V5,detectType:Vl,registerIconPacks:zw,getRegisteredDiagramsMetadata:K5},Q5=Ie;/*! Check if previously processed *//*!
311
+ * Wait for document loaded before starting the execution
312
+ */const q3=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:Kh,createCommonLayoutRenderer:i0,default:Q5,defaultMeasureLayout:Qh,paintLayoutData:Jh},Symbol.toStringTag,{value:"Module"}));export{tp as $,wh as A,qf as B,AT as C,mw as D,PC as E,s3 as F,Uw as G,dA as H,Ys as I,uA as J,i3 as K,_a as L,yb as M,Qf as N,Qi as O,ru as P,Ra as Q,nw as R,bl as S,FT as T,ro as U,Ze as V,U as W,j as X,Sb as Y,kT as Z,p as _,Eb as a,sg as a$,iw as a0,wu as a1,ku as a2,p3 as a3,h3 as a4,d3 as a5,u3 as a6,n3 as a7,lh as a8,f3 as a9,zS as aA,be as aB,M_ as aC,gh as aD,fh as aE,Ro as aF,oT as aG,sT as aH,iT as aI,rT as aJ,Xw as aK,eg as aL,Kw as aM,Gw as aN,tT as aO,rg as aP,Zw as aQ,lT as aR,nT as aS,aT,cT as aU,hT as aV,Vw as aW,ig as aX,eT as aY,Jw as aZ,Qw as a_,l3 as aa,Ti as ab,m3 as ac,g3 as ad,c3 as ae,by as af,qh as ag,yd as ah,Dt as ai,lr as aj,ao as ak,zw as al,bh as am,mt as an,S3 as ao,_3 as ap,i0 as aq,Yt as ar,Gy as as,Ct as at,T3 as au,ma as av,Vy as aw,Aa as ax,zh as ay,Ty as az,Ab as b,Ry as b$,vy as b0,ug as b1,Ef as b2,sw as b3,r3 as b4,Qe as b5,qw as b6,o3 as b7,sh as b8,zr as b9,ui as bA,ns as bB,Fr as bC,zd as bD,hr as bE,_r as bF,zB as bG,Ed as bH,ga as bI,vr as bJ,Kv as bK,$e as bL,Dd as bM,Uh as bN,WF as bO,Oa as bP,pa as bQ,NF as bR,jy as bS,or as bT,Qv as bU,Zh as bV,Fy as bW,HF as bX,qF as bY,AF as bZ,Ma as b_,Gs as ba,gu as bb,Pk as bc,bt as bd,Zp as be,Me as bf,Ak as bg,ih as bh,pp as bi,oo as bj,yp as bk,a3 as bl,Gx as bm,Wh as bn,Hh as bo,vd as bp,My as bq,$a as br,Ey as bs,aB as bt,$y as bu,UB as bv,EL as bw,Zv as bx,oB as by,jB as bz,Wt as c,Pa as c0,Ny as c1,EF as c2,LL as c3,Zr as c4,Ds as c5,Ai as c6,Lo as c7,En as c8,KF as c9,SS as ca,q3 as cb,Jf as d,ue as e,Lr as f,$b as g,yy as h,ze as i,It as j,io as k,q as l,fg as m,Ob as n,Db as o,Fb as p,y3 as q,Yr as r,Mb as s,Hx as t,N3 as u,R3 as v,$T as w,ke as x,te as y,Pb as z};