@cc-monitoring/proxy-core 0.1.8 → 0.1.9

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 (375) hide show
  1. package/dist/cli/commands/mcp.d.ts +1 -0
  2. package/dist/cli/commands/mcp.js +5 -0
  3. package/dist/cli/index.js +12 -0
  4. package/dist/docs/404.html +1 -1
  5. package/dist/docs/assets/{app.CLpmq4Gv.js → app.Dc5qjt2Z.js} +1 -1
  6. package/dist/docs/assets/chunks/{VPLocalSearchBox.C43HQ5tU.js → VPLocalSearchBox.DNn4HwDn.js} +1 -1
  7. package/dist/docs/assets/chunks/{abnfDiagram-VRR7QNED.RG1C5NpS.js → abnfDiagram-VRR7QNED.CO3oJlfv.js} +1 -1
  8. package/dist/docs/assets/chunks/{arc.C9NMazfV.js → arc.D6Q1WZEU.js} +1 -1
  9. package/dist/docs/assets/chunks/{architectureDiagram-ZJ3FMSHR.u2IZtOa6.js → architectureDiagram-ZJ3FMSHR.vHAxAkhu.js} +1 -1
  10. package/dist/docs/assets/chunks/{blockDiagram-677ZJIJ3.DdHVir7t.js → blockDiagram-677ZJIJ3.C0el4zil.js} +1 -1
  11. package/dist/docs/assets/chunks/{c4Diagram-LMCZKHZV.gSbgoaJo.js → c4Diagram-LMCZKHZV.WD7qpLTf.js} +1 -1
  12. package/dist/docs/assets/chunks/channel.nWTiHmYA.js +1 -0
  13. package/dist/docs/assets/chunks/{chunk-2Q5K7J3B.HRSdtksv.js → chunk-2Q5K7J3B.Bgt7N_Co.js} +1 -1
  14. package/dist/docs/assets/chunks/{chunk-32BRIVSS.BYzKapof.js → chunk-32BRIVSS.CbP8heQ0.js} +1 -1
  15. package/dist/docs/assets/chunks/{chunk-5VM5RSS4.c3oeF0uS.js → chunk-5VM5RSS4.Dlc2iAaG.js} +1 -1
  16. package/dist/docs/assets/chunks/{chunk-EX3LRPZG.Cz5AKl7t.js → chunk-EX3LRPZG.Cr0sQbRc.js} +1 -1
  17. package/dist/docs/assets/chunks/{chunk-JWPE2WC7.DtJxsA7-.js → chunk-JWPE2WC7.B52h3S9L.js} +1 -1
  18. package/dist/docs/assets/chunks/{chunk-MOJQB5TN.h5kO0Dtu.js → chunk-MOJQB5TN.CphhXnWQ.js} +1 -1
  19. package/dist/docs/assets/chunks/{chunk-RYQCIY6F.Ch_NfMTR.js → chunk-RYQCIY6F.CZafA9pg.js} +1 -1
  20. package/dist/docs/assets/chunks/{chunk-V7JOEXUC.CHrHyPoW.js → chunk-V7JOEXUC.DMlMAq_a.js} +1 -1
  21. package/dist/docs/assets/chunks/{chunk-VR4S4FIN.DG8DIrH3.js → chunk-VR4S4FIN.DA1An2TL.js} +1 -1
  22. package/dist/docs/assets/chunks/{chunk-XXDRQBXY.CSXBN12Y.js → chunk-XXDRQBXY.Dwra-T5p.js} +1 -1
  23. package/dist/docs/assets/chunks/classDiagram-OUVF2IWQ.RsrQkeM_.js +1 -0
  24. package/dist/docs/assets/chunks/classDiagram-v2-EOCWNBFH.RsrQkeM_.js +1 -0
  25. package/dist/docs/assets/chunks/{cose-bilkent-JH36ORCC.BeFuOTgi.js → cose-bilkent-JH36ORCC.Ddhn5b9l.js} +1 -1
  26. package/dist/docs/assets/chunks/{cynefinDiagram-TSTJHNR4.BrJcHEEe.js → cynefinDiagram-TSTJHNR4.BlUCFIAV.js} +1 -1
  27. package/dist/docs/assets/chunks/{dagre-VKFMJZFB.D4vaA23X.js → dagre-VKFMJZFB.erCsZJb8.js} +1 -1
  28. package/dist/docs/assets/chunks/{diagram-FQU43EPY.uwRFLKRx.js → diagram-FQU43EPY.B0zbjZsr.js} +1 -1
  29. package/dist/docs/assets/chunks/{diagram-G47NLZAW.Byfc9d0H.js → diagram-G47NLZAW.B4S_wuz1.js} +1 -1
  30. package/dist/docs/assets/chunks/{diagram-NH7WQ7WH.CxjBEGZX.js → diagram-NH7WQ7WH.BRv6nOgk.js} +1 -1
  31. package/dist/docs/assets/chunks/{diagram-OA4YK3LP.CU1jGXMi.js → diagram-OA4YK3LP.DBS8iZPq.js} +1 -1
  32. package/dist/docs/assets/chunks/{diagram-WEI45ONY.yXgVkURA.js → diagram-WEI45ONY.CDZlR-fM.js} +1 -1
  33. package/dist/docs/assets/chunks/{ebnfDiagram-CCIWWBDH.UucqGQ_d.js → ebnfDiagram-CCIWWBDH.z_nUDDWm.js} +1 -1
  34. package/dist/docs/assets/chunks/{erDiagram-Q63AITRT.C6qmOrvh.js → erDiagram-Q63AITRT.BOAH1mBM.js} +1 -1
  35. package/dist/docs/assets/chunks/{flowDiagram-23GEKE2U.BZLu-WUl.js → flowDiagram-23GEKE2U.cnCU0na-.js} +1 -1
  36. package/dist/docs/assets/chunks/{ganttDiagram-NO4QXBWP.DUzsw4Yr.js → ganttDiagram-NO4QXBWP.CzSToCFq.js} +1 -1
  37. package/dist/docs/assets/chunks/{gitGraphDiagram-IHSO6WYX.BqLfYTI7.js → gitGraphDiagram-IHSO6WYX.WUBTiDD1.js} +1 -1
  38. package/dist/docs/assets/chunks/{infoDiagram-FWYZ7A6U.CiKWveW9.js → infoDiagram-FWYZ7A6U.Bz5y9qpB.js} +1 -1
  39. package/dist/docs/assets/chunks/{ishikawaDiagram-FXEZZL3T.jerUXEXA.js → ishikawaDiagram-FXEZZL3T.DX9mwIpB.js} +1 -1
  40. package/dist/docs/assets/chunks/{journeyDiagram-5HDEW3XC.Cqzvo6I_.js → journeyDiagram-5HDEW3XC.BclISEWC.js} +1 -1
  41. package/dist/docs/assets/chunks/{kanban-definition-HUTT4EX6.BzJ4OPe5.js → kanban-definition-HUTT4EX6.CMwsG4gj.js} +1 -1
  42. package/dist/docs/assets/chunks/{linear.hFjgYGMN.js → linear.zokB3L6J.js} +1 -1
  43. package/dist/docs/assets/chunks/{mermaid-client.D3gEaJ5e.js → mermaid-client.DIhzjS3B.js} +2 -2
  44. package/dist/docs/assets/chunks/{mermaid.core.CEHdFh45.js → mermaid.core.CJEoCnVo.js} +102 -98
  45. package/dist/docs/assets/chunks/{mindmap-definition-LN4V7U3C.ChC5FJW6.js → mindmap-definition-LN4V7U3C.DeNvpAwd.js} +1 -1
  46. package/dist/docs/assets/chunks/{pegDiagram-2B236MQR.ClnjsRYs.js → pegDiagram-2B236MQR.D5O5vyDS.js} +1 -1
  47. package/dist/docs/assets/chunks/{pieDiagram-ENE6RG2P.Bb0MqerK.js → pieDiagram-ENE6RG2P.CDpZrox4.js} +1 -1
  48. package/dist/docs/assets/chunks/{quadrantDiagram-ABIIQ3AL.Do6HK_yb.js → quadrantDiagram-ABIIQ3AL.Bz0dhK1l.js} +1 -1
  49. package/dist/docs/assets/chunks/{railroadDiagram-RFXS5EU6.D35m6hQn.js → railroadDiagram-RFXS5EU6.C2h0Mxo5.js} +1 -1
  50. package/dist/docs/assets/chunks/{requirementDiagram-TGXJPOKE.DMtjRYUg.js → requirementDiagram-TGXJPOKE.YLD-NuJw.js} +1 -1
  51. package/dist/docs/assets/chunks/{sankeyDiagram-HTMAVEWB.dfXDu62B.js → sankeyDiagram-HTMAVEWB.R2uEIhmV.js} +1 -1
  52. package/dist/docs/assets/chunks/{sequenceDiagram-DBY2YBRQ.CLZ0rZTY.js → sequenceDiagram-DBY2YBRQ.D6E2oY7U.js} +1 -1
  53. package/dist/docs/assets/chunks/{sizeCapture-X5ZJPWSS.DWvGYLUT.js → sizeCapture-X5ZJPWSS.C65Lzwwi.js} +1 -1
  54. package/dist/docs/assets/chunks/{stateDiagram-2N3HPSRC.DY8sDkI0.js → stateDiagram-2N3HPSRC.Cqc4HEHT.js} +1 -1
  55. package/dist/docs/assets/chunks/stateDiagram-v2-6OUMAXLB.D8rYKDmp.js +1 -0
  56. package/dist/docs/assets/chunks/{swimlanes-5IMT3BWC.Dy9SffeT.js → swimlanes-5IMT3BWC.dfhQuNQg.js} +2 -2
  57. package/dist/docs/assets/chunks/swimlanesDiagram-G3AALYLV.CdD0ADbF.js +8 -0
  58. package/dist/docs/assets/chunks/{theme.CSw9Whd5.js → theme.DCDU4HCI.js} +2 -2
  59. package/dist/docs/assets/chunks/{timeline-definition-FHXFAJF6.CH6uzgIu.js → timeline-definition-FHXFAJF6.SOgdni8I.js} +1 -1
  60. package/dist/docs/assets/chunks/{vennDiagram-L72KCM5P.7EBCJmyP.js → vennDiagram-L72KCM5P.BvlXlHJf.js} +1 -1
  61. package/dist/docs/assets/chunks/{wardleyDiagram-EHGQE667.DPHAQssL.js → wardleyDiagram-EHGQE667.t3t8sFvo.js} +1 -1
  62. package/dist/docs/assets/chunks/{xychartDiagram-FW5EYKEG.aKgxZVbK.js → xychartDiagram-FW5EYKEG.DDT1UX32.js} +1 -1
  63. package/dist/docs/index.html +2 -2
  64. package/dist/docs/overview.html +2 -2
  65. package/dist/docs/packages-utils.html +2 -2
  66. package/dist/docs/proxy-admin/env-and-build.html +2 -2
  67. package/dist/docs/proxy-admin/index.html +2 -2
  68. package/dist/docs/proxy-admin/layout-and-menu.html +2 -2
  69. package/dist/docs/proxy-admin/pages.html +2 -2
  70. package/dist/docs/proxy-admin/routing-and-auth.html +2 -2
  71. package/dist/docs/proxy-admin/services-and-mock.html +2 -2
  72. package/dist/docs/proxy-cli/api-layer.html +2 -2
  73. package/dist/docs/proxy-cli/app-shell.html +2 -2
  74. package/dist/docs/proxy-cli/components-common.html +2 -2
  75. package/dist/docs/proxy-cli/components-config.html +2 -2
  76. package/dist/docs/proxy-cli/components-requests.html +2 -2
  77. package/dist/docs/proxy-cli/components-stats.html +2 -2
  78. package/dist/docs/proxy-cli/components-status.html +2 -2
  79. package/dist/docs/proxy-cli/data-hooks.html +2 -2
  80. package/dist/docs/proxy-cli/index.html +2 -2
  81. package/dist/docs/proxy-cli/utils-and-i18n.html +2 -2
  82. package/dist/docs/proxy-core/chat-api.html +2 -2
  83. package/dist/docs/proxy-core/cli.html +2 -2
  84. package/dist/docs/proxy-core/config.html +2 -2
  85. package/dist/docs/proxy-core/data-layer.html +2 -2
  86. package/dist/docs/proxy-core/entry.html +2 -2
  87. package/dist/docs/proxy-core/index.html +2 -2
  88. package/dist/docs/proxy-core/pm2.html +2 -2
  89. package/dist/docs/proxy-core/providers.html +2 -2
  90. package/dist/docs/proxy-core/proxy.html +2 -2
  91. package/dist/docs/proxy-core/stats.html +2 -2
  92. package/dist/docs/proxy-core/tool.html +2 -2
  93. package/dist/docs/proxy-core/ui-routes.html +2 -2
  94. package/dist/docs/proxy-core/utilities.html +2 -2
  95. package/dist/docs/quickstart.html +2 -2
  96. package/dist/docs/request-flow.html +2 -2
  97. package/dist/mcp-server/index.d.ts +3 -0
  98. package/dist/mcp-server/index.js +16 -0
  99. package/dist/mcp-server/run.d.ts +1 -0
  100. package/dist/mcp-server/run.js +14 -0
  101. package/dist/mcp-server/tools.d.ts +11 -0
  102. package/dist/mcp-server/tools.js +219 -0
  103. package/dist/server/docs-route.js +42 -13
  104. package/dist/server/index.js +3 -2
  105. package/dist/server/ui-route.js +161 -103
  106. package/dist/ui/assets/{1c-DPsrzNHI.js → 1c-CK-kMhtR.js} +1 -1
  107. package/dist/ui/assets/{abnf-DNkBIQRO.js → abnf-1lQ1Uzrr.js} +1 -1
  108. package/dist/ui/assets/{abnfDiagram-VRR7QNED-BqvHvzR8.js → abnfDiagram-VRR7QNED-BqMOdnuh.js} +1 -1
  109. package/dist/ui/assets/{accesslog-D5NxQ43Q.js → accesslog-BGadK9Fx.js} +1 -1
  110. package/dist/ui/assets/{actionscript-DLr-LB2m.js → actionscript-4t1vDHvB.js} +1 -1
  111. package/dist/ui/assets/{ada-BRSz3tHX.js → ada-CTSY_kbf.js} +1 -1
  112. package/dist/ui/assets/{angelscript-DMtEGgIa.js → angelscript-BX_1_lW7.js} +1 -1
  113. package/dist/ui/assets/{apache-C4gn4cSd.js → apache-DeUUxSLd.js} +1 -1
  114. package/dist/ui/assets/{applescript-DoodcTwg.js → applescript-BUfqUe12.js} +1 -1
  115. package/dist/ui/assets/{arc-HmnzaGf9.js → arc-D-xOtktL.js} +1 -1
  116. package/dist/ui/assets/{arcade-RJZZSHSl.js → arcade-BlZbrfiI.js} +1 -1
  117. package/dist/ui/assets/{architectureDiagram-ZJ3FMSHR-BUfDpSIw.js → architectureDiagram-ZJ3FMSHR-KN5x3Oxc.js} +1 -1
  118. package/dist/ui/assets/{arduino-n6Dpx6Ig.js → arduino-CmMMxhu0.js} +1 -1
  119. package/dist/ui/assets/{armasm-DzCVITGB.js → armasm-If0W0ZTH.js} +1 -1
  120. package/dist/ui/assets/{asciidoc-CaqMsApq.js → asciidoc-DD6e-k3f.js} +1 -1
  121. package/dist/ui/assets/{aspectj-B0kIcV0v.js → aspectj-MxQxriHk.js} +1 -1
  122. package/dist/ui/assets/{autohotkey-xUEXewap.js → autohotkey-Ahz4SejW.js} +1 -1
  123. package/dist/ui/assets/{autoit-D3OfN2VX.js → autoit-DwDj3imC.js} +1 -1
  124. package/dist/ui/assets/{avrasm-Cbf0F4Kf.js → avrasm-97KvbVpn.js} +1 -1
  125. package/dist/ui/assets/{awk-Cc0rWEwe.js → awk-Bo_-wZyZ.js} +1 -1
  126. package/dist/ui/assets/{axapta-BKEeoUEe.js → axapta-DR_HV06c.js} +1 -1
  127. package/dist/ui/assets/{bash-D6JH6L3m.js → bash-dxvpXEou.js} +1 -1
  128. package/dist/ui/assets/{basic-ka6JXc9C.js → basic-Dw-3a82q.js} +1 -1
  129. package/dist/ui/assets/{blockDiagram-677ZJIJ3-BHXRSjnM.js → blockDiagram-677ZJIJ3-CMXz5JvW.js} +1 -1
  130. package/dist/ui/assets/{bnf-Bxclk5tZ.js → bnf-5ey_2QkR.js} +1 -1
  131. package/dist/ui/assets/{brainfuck--s_Fd8b9.js → brainfuck-CbRmZUzR.js} +1 -1
  132. package/dist/ui/assets/{coq-CVLui3m8.js → c-DUcxiMx7.js} +1 -1
  133. package/dist/ui/assets/{c-like-CNkOkbqh.js → c-like-D9kw6QEo.js} +1 -1
  134. package/dist/ui/assets/{c4Diagram-LMCZKHZV-Bp1uSrW8.js → c4Diagram-LMCZKHZV-DU4C988i.js} +1 -1
  135. package/dist/ui/assets/{cal-LVlIOy9W.js → cal-BXDKT54m.js} +1 -1
  136. package/dist/ui/assets/{capnproto-r9DiQ1H8.js → capnproto-DXByvzkB.js} +1 -1
  137. package/dist/ui/assets/{ceylon-CTNzyZJX.js → ceylon-CNMAc9bK.js} +1 -1
  138. package/dist/ui/assets/channel-limbQkil.js +1 -0
  139. package/dist/ui/assets/{chunk-2Q5K7J3B-nnLVtUW3.js → chunk-2Q5K7J3B-Cm-SVU-u.js} +1 -1
  140. package/dist/ui/assets/{chunk-32BRIVSS-BDNS6igp.js → chunk-32BRIVSS-oz0KK3YS.js} +1 -1
  141. package/dist/ui/assets/{chunk-5VM5RSS4-D713xBhI.js → chunk-5VM5RSS4-CbHdtlYp.js} +1 -1
  142. package/dist/ui/assets/{chunk-EX3LRPZG-DExsU6Rd.js → chunk-EX3LRPZG-DhhuYakR.js} +1 -1
  143. package/dist/ui/assets/{chunk-JWPE2WC7-DcpW5RnW.js → chunk-JWPE2WC7-CYkjHxPj.js} +1 -1
  144. package/dist/ui/assets/{chunk-MOJQB5TN-BQiSZNTn.js → chunk-MOJQB5TN-gO40CNAh.js} +1 -1
  145. package/dist/ui/assets/{chunk-RYQCIY6F-DfblgZPd.js → chunk-RYQCIY6F-CKedXT_Q.js} +1 -1
  146. package/dist/ui/assets/{chunk-V7JOEXUC-np--VgmN.js → chunk-V7JOEXUC-C_6jfVpf.js} +1 -1
  147. package/dist/ui/assets/{chunk-VR4S4FIN-BG0IhjO6.js → chunk-VR4S4FIN-C8NVa2Dp.js} +1 -1
  148. package/dist/ui/assets/{chunk-XXDRQBXY-DHuoh-RB.js → chunk-XXDRQBXY-DCaDk-GY.js} +1 -1
  149. package/dist/ui/assets/classDiagram-OUVF2IWQ--Q3UeFsZ.js +1 -0
  150. package/dist/ui/assets/classDiagram-v2-EOCWNBFH--Q3UeFsZ.js +1 -0
  151. package/dist/ui/assets/{clean-CtVj0-EB.js → clean-Cno2Iol9.js} +1 -1
  152. package/dist/ui/assets/{clojure-CZwle60-.js → clojure-CJo86K2y.js} +1 -1
  153. package/dist/ui/assets/{clojure-repl-DJXWH00I.js → clojure-repl-BDUy3x0z.js} +1 -1
  154. package/dist/ui/assets/{cmake-Boxf0e7r.js → cmake-C3lBpnMa.js} +1 -1
  155. package/dist/ui/assets/{coffeescript-h85ZW4Gm.js → coffeescript-D6Gc1Iic.js} +1 -1
  156. package/dist/ui/assets/{c-BsgdDna0.js → coq-DK5Qpymm.js} +1 -1
  157. package/dist/ui/assets/{cos-CL0igafw.js → cos-C9vhICZi.js} +1 -1
  158. package/dist/ui/assets/{cose-bilkent-JH36ORCC-CnXyotYB.js → cose-bilkent-JH36ORCC-BsX7zIIX.js} +1 -1
  159. package/dist/ui/assets/{cpp-vite1NvJ.js → cpp-B2THrLw2.js} +1 -1
  160. package/dist/ui/assets/{crmsh-DqT9g0Iq.js → crmsh-Cidhwnbv.js} +1 -1
  161. package/dist/ui/assets/{crystal-Oans-K8G.js → crystal-D4UzipzS.js} +1 -1
  162. package/dist/ui/assets/{csharp-sCaDAzIB.js → csharp-sHzRBXom.js} +1 -1
  163. package/dist/ui/assets/{csp-rMcp93pK.js → csp-RR_2otDZ.js} +1 -1
  164. package/dist/ui/assets/{css-BwDLHi_h.js → css-CwufTY20.js} +1 -1
  165. package/dist/ui/assets/{cynefin-VYW2F7L2-D8Bmecdd.js → cynefin-VYW2F7L2-BdPPij9L.js} +1 -1
  166. package/dist/ui/assets/{cynefinDiagram-TSTJHNR4-BT2YFmPZ.js → cynefinDiagram-TSTJHNR4-Y8HasE5a.js} +1 -1
  167. package/dist/ui/assets/{d-BFgZm0RV.js → d-DeXSSL8w.js} +1 -1
  168. package/dist/ui/assets/{dagre-VKFMJZFB-BeJU73ex.js → dagre-VKFMJZFB-B_nm4MgH.js} +1 -1
  169. package/dist/ui/assets/{dart-rIo85iL3.js → dart-DhBp0MgA.js} +1 -1
  170. package/dist/ui/assets/{delphi-Bi2Rfp1o.js → delphi-B5k-wYBj.js} +1 -1
  171. package/dist/ui/assets/{diagram-FQU43EPY-CHQiS5Fr.js → diagram-FQU43EPY-CgBlXe2t.js} +1 -1
  172. package/dist/ui/assets/{diagram-G47NLZAW-EVerd4V8.js → diagram-G47NLZAW-BebzwVx5.js} +1 -1
  173. package/dist/ui/assets/{diagram-NH7WQ7WH-DMP0VOAs.js → diagram-NH7WQ7WH-DzWivpuq.js} +1 -1
  174. package/dist/ui/assets/{diagram-OA4YK3LP-CAur5jK9.js → diagram-OA4YK3LP-Cb_lMSnX.js} +1 -1
  175. package/dist/ui/assets/{diagram-WEI45ONY-DvmKkPH7.js → diagram-WEI45ONY-C_Y9GQ0N.js} +1 -1
  176. package/dist/ui/assets/{diff-CZZCIG00.js → diff-COhluegM.js} +1 -1
  177. package/dist/ui/assets/{django-D88PKHy-.js → django-C7XlHtBx.js} +1 -1
  178. package/dist/ui/assets/{dns-DX4hzjUh.js → dns-wjwUM-Uq.js} +1 -1
  179. package/dist/ui/assets/{dockerfile-1lgzEXn1.js → dockerfile-Bc-WqdkT.js} +1 -1
  180. package/dist/ui/assets/{dos-CwrC1ROy.js → dos-mEp9A4Hm.js} +1 -1
  181. package/dist/ui/assets/{dsconfig-tvVdBv4w.js → dsconfig-Dgs83FGD.js} +1 -1
  182. package/dist/ui/assets/{dts-DTgQkdRs.js → dts-C3Ds2O26.js} +1 -1
  183. package/dist/ui/assets/{dust-BbLlyCpf.js → dust-CyQO5OHb.js} +1 -1
  184. package/dist/ui/assets/{ebnf-D6Dc4oRr.js → ebnf-CNogRDO4.js} +1 -1
  185. package/dist/ui/assets/{ebnfDiagram-CCIWWBDH-Kvilk1RF.js → ebnfDiagram-CCIWWBDH-ZlE-AFZT.js} +1 -1
  186. package/dist/ui/assets/{elixir-CnMolQVs.js → elixir-3SLljiDu.js} +1 -1
  187. package/dist/ui/assets/{elm-BQ7VQFn7.js → elm-BPBZeCUB.js} +1 -1
  188. package/dist/ui/assets/{erDiagram-Q63AITRT-C-S9oHZd.js → erDiagram-Q63AITRT-CXuGvWcB.js} +1 -1
  189. package/dist/ui/assets/{erb-B_1g6fXE.js → erb-DqbIyjtE.js} +1 -1
  190. package/dist/ui/assets/{erlang-repl-Cy6Z3TdH.js → erlang-repl-e_6K45XY.js} +1 -1
  191. package/dist/ui/assets/{erlang-3b3ITXJu.js → erlang-y0z0xXo_.js} +1 -1
  192. package/dist/ui/assets/{excel-DtkATto8.js → excel-RwNCmSYM.js} +1 -1
  193. package/dist/ui/assets/{fix-DsEG7TDI.js → fix-DNXnlXQP.js} +1 -1
  194. package/dist/ui/assets/{flix-CQ-rKwGO.js → flix-rdcWVVc-.js} +1 -1
  195. package/dist/ui/assets/{flowDiagram-23GEKE2U-EbHDNMCC.js → flowDiagram-23GEKE2U-BuKpfhyd.js} +1 -1
  196. package/dist/ui/assets/{fortran-AqzaRCEt.js → fortran-CjB2gctQ.js} +1 -1
  197. package/dist/ui/assets/{fsharp-CCzWGasu.js → fsharp-DPGDnrod.js} +1 -1
  198. package/dist/ui/assets/{gams-Bqa6CB_r.js → gams-d97ChOge.js} +1 -1
  199. package/dist/ui/assets/{ganttDiagram-NO4QXBWP-B6jvc6O7.js → ganttDiagram-NO4QXBWP-CThfmoNX.js} +1 -1
  200. package/dist/ui/assets/{gauss-D4Utubeh.js → gauss-Ckbq9pov.js} +1 -1
  201. package/dist/ui/assets/{gcode-By3KwWjb.js → gcode-C8rxWIBi.js} +1 -1
  202. package/dist/ui/assets/{gherkin-PXOPjT7Y.js → gherkin-Cb88ENJ2.js} +1 -1
  203. package/dist/ui/assets/{gitGraphDiagram-IHSO6WYX-C5l6rHvK.js → gitGraphDiagram-IHSO6WYX-Ch4mA1xX.js} +1 -1
  204. package/dist/ui/assets/{glsl-KmmyBk93.js → glsl-D75QPnvr.js} +1 -1
  205. package/dist/ui/assets/{gml-C1Qw_Nrt.js → gml-BYM-XcrL.js} +1 -1
  206. package/dist/ui/assets/{go-DaBQtdp1.js → go-C0q3a0K-.js} +1 -1
  207. package/dist/ui/assets/{golo-D7PDzNpb.js → golo-BN-kAS6i.js} +1 -1
  208. package/dist/ui/assets/{gradle-nXueCYH-.js → gradle-CsmhRGnx.js} +1 -1
  209. package/dist/ui/assets/{groovy-DFDsQDhl.js → groovy-CVvlYgLe.js} +1 -1
  210. package/dist/ui/assets/{haml-B_zxHzy_.js → haml-BZ1z9lT4.js} +1 -1
  211. package/dist/ui/assets/{handlebars-BdMY-8KA.js → handlebars-ByoXIUsU.js} +1 -1
  212. package/dist/ui/assets/{haskell-CftsIPps.js → haskell-bKtVloMo.js} +1 -1
  213. package/dist/ui/assets/{haxe-BFZb0OIE.js → haxe-7YhuN0qz.js} +1 -1
  214. package/dist/ui/assets/{hsp-EPTuqwtZ.js → hsp-Bgvcm6F3.js} +1 -1
  215. package/dist/ui/assets/{htmlbars-B7ZSC-iN.js → htmlbars-BpuFL8Dv.js} +1 -1
  216. package/dist/ui/assets/{http-BxSd_aa1.js → http-BdkFJc_6.js} +1 -1
  217. package/dist/ui/assets/{hy-D-rBN9MQ.js → hy-fLVT9AqM.js} +1 -1
  218. package/dist/ui/assets/{index-Dlp8uGHu.js → index-DfWIGcNl.js} +3 -3
  219. package/dist/ui/assets/index-DpS8gUTx.css +10 -0
  220. package/dist/ui/assets/{index-DSGZBcd1.js → index-Dsue7VlR.js} +302 -352
  221. package/dist/ui/assets/{infoDiagram-FWYZ7A6U-BOF_kBqe.js → infoDiagram-FWYZ7A6U-DBgU6pXz.js} +1 -1
  222. package/dist/ui/assets/{inform7-OjpbRXZf.js → inform7-CiZzJ9ba.js} +1 -1
  223. package/dist/ui/assets/{ini-Dc-QApXQ.js → ini-Cnt_l57a.js} +1 -1
  224. package/dist/ui/assets/{irpf90-C4OfYiST.js → irpf90-tpOLGqpx.js} +1 -1
  225. package/dist/ui/assets/{isbl-9km6K6Sf.js → isbl-CP9CH5cc.js} +1 -1
  226. package/dist/ui/assets/{ishikawaDiagram-FXEZZL3T-BvKSD8LY.js → ishikawaDiagram-FXEZZL3T-Cq-UEF7t.js} +1 -1
  227. package/dist/ui/assets/{java-C2mOf3QX.js → java-kyhtR5gA.js} +1 -1
  228. package/dist/ui/assets/{javascript-_i0Q5MkQ.js → javascript-Dt9hxK6y.js} +1 -1
  229. package/dist/ui/assets/{jboss-cli-BS5ipQOv.js → jboss-cli-BJZewHIt.js} +1 -1
  230. package/dist/ui/assets/{journeyDiagram-5HDEW3XC-yKdSl63P.js → journeyDiagram-5HDEW3XC-iLTD7hUv.js} +1 -1
  231. package/dist/ui/assets/{json-Dci0MO4x.js → json-B784rDGN.js} +1 -1
  232. package/dist/ui/assets/{julia-bEqo4nlV.js → julia-BBZWRf_K.js} +1 -1
  233. package/dist/ui/assets/{julia-repl-Co6hf47q.js → julia-repl-ChQ_anXf.js} +1 -1
  234. package/dist/ui/assets/{kanban-definition-HUTT4EX6-B7BbZCd6.js → kanban-definition-HUTT4EX6-DnmU4pyp.js} +1 -1
  235. package/dist/ui/assets/{kotlin-krx8WewB.js → kotlin-Ca3cQqj9.js} +1 -1
  236. package/dist/ui/assets/{lasso-d3ZTv9Tj.js → lasso-68xMTGCI.js} +1 -1
  237. package/dist/ui/assets/{latex-BNWbHYxK.js → latex-BJAvHrS-.js} +1 -1
  238. package/dist/ui/assets/{ldif-Bs8eb63L.js → ldif-BozIkxE8.js} +1 -1
  239. package/dist/ui/assets/{leaf-BTbRDVWB.js → leaf-DeAYBX7h.js} +1 -1
  240. package/dist/ui/assets/{less-DH5cqJTD.js → less-Bc0jcew8.js} +1 -1
  241. package/dist/ui/assets/{lisp-CBUvBYtR.js → lisp-ffZdTilE.js} +1 -1
  242. package/dist/ui/assets/{livecodeserver-CkM7-E4a.js → livecodeserver-DKyXE2lg.js} +1 -1
  243. package/dist/ui/assets/{livescript-DomXyXUO.js → livescript-CeVSdP5j.js} +1 -1
  244. package/dist/ui/assets/{llvm-e_-ff59-.js → llvm-CA19rs9e.js} +1 -1
  245. package/dist/ui/assets/{lsl-BNDsGOmv.js → lsl-De1V90GL.js} +1 -1
  246. package/dist/ui/assets/{lua-_ZmkXwc_.js → lua-Ckc_sOAg.js} +1 -1
  247. package/dist/ui/assets/{makefile-BhG7cThe.js → makefile-BlkvlESW.js} +1 -1
  248. package/dist/ui/assets/{markdown-ClW2SRy6.js → markdown-BsHfdULh.js} +1 -1
  249. package/dist/ui/assets/{mathematica-kqoCR611.js → mathematica-BdVzKfdF.js} +1 -1
  250. package/dist/ui/assets/{matlab-DqawyK3q.js → matlab-BE1b3EYS.js} +1 -1
  251. package/dist/ui/assets/{maxima-B0qzCXe1.js → maxima-C7hoTDGn.js} +1 -1
  252. package/dist/ui/assets/{mel-BZaSas3B.js → mel-DNZ4AX0h.js} +1 -1
  253. package/dist/ui/assets/{mercury-ByD0wyJH.js → mercury-DnbIrIOF.js} +1 -1
  254. package/dist/ui/assets/{mindmap-definition-LN4V7U3C-Ce6QsaH5.js → mindmap-definition-LN4V7U3C-Df0J4YS6.js} +1 -1
  255. package/dist/ui/assets/{mipsasm-B08lqZSo.js → mipsasm-vRzAjdOa.js} +1 -1
  256. package/dist/ui/assets/{mizar-7iaUqWPq.js → mizar-_COCUpjs.js} +1 -1
  257. package/dist/ui/assets/{mojolicious-CbH-d8Wh.js → mojolicious-BXSqEUhN.js} +1 -1
  258. package/dist/ui/assets/{monkey-D5z6-hFH.js → monkey-DdaFErmE.js} +1 -1
  259. package/dist/ui/assets/{moonscript-DuLd7pdm.js → moonscript-ylkEnmhz.js} +1 -1
  260. package/dist/ui/assets/{n1ql-EbVfQMfD.js → n1ql-CmU80AjO.js} +1 -1
  261. package/dist/ui/assets/{nginx-D-4AxpHP.js → nginx-Xq7ZP4_a.js} +1 -1
  262. package/dist/ui/assets/{nim-wPHQEX5v.js → nim-9UGxbeVX.js} +1 -1
  263. package/dist/ui/assets/{nix-6SVkxAXi.js → nix-DF4g-5JC.js} +1 -1
  264. package/dist/ui/assets/{node-repl-CaFKEOyj.js → node-repl-Cuy9El0l.js} +1 -1
  265. package/dist/ui/assets/{nsis-BmqbwVv_.js → nsis-O_u_AJ8R.js} +1 -1
  266. package/dist/ui/assets/{objectivec-BX0R-sI2.js → objectivec-CGRDK5jQ.js} +1 -1
  267. package/dist/ui/assets/{ocaml-CyfdrIqo.js → ocaml-CbQcAD-R.js} +1 -1
  268. package/dist/ui/assets/{openscad-B5qfaF1E.js → openscad-DT2CMIqE.js} +1 -1
  269. package/dist/ui/assets/{oxygene-CmlCgXLr.js → oxygene-B9Ei-fnj.js} +1 -1
  270. package/dist/ui/assets/{parser3-DdpPyZkn.js → parser3-CuVObcEZ.js} +1 -1
  271. package/dist/ui/assets/{pegDiagram-2B236MQR-ByyVqaXh.js → pegDiagram-2B236MQR-k8i-gID4.js} +1 -1
  272. package/dist/ui/assets/{perl-D3qc2wEe.js → perl-dVGJ8bE1.js} +1 -1
  273. package/dist/ui/assets/{pf-Bv3zza37.js → pf-X2PQAhR-.js} +1 -1
  274. package/dist/ui/assets/{pgsql-BZIppw1a.js → pgsql-DVzCzD92.js} +1 -1
  275. package/dist/ui/assets/{php-D1ScecZC.js → php-DocTOgNe.js} +1 -1
  276. package/dist/ui/assets/{php-template-sEqzzKWJ.js → php-template-dP8srdEx.js} +1 -1
  277. package/dist/ui/assets/{pieDiagram-ENE6RG2P-T1OgWN3l.js → pieDiagram-ENE6RG2P-C76s3Fdz.js} +1 -1
  278. package/dist/ui/assets/{plaintext-DO7Jy_T2.js → plaintext-vjpxtrpz.js} +1 -1
  279. package/dist/ui/assets/{pony-CTXTp2Tb.js → pony-z-bq7AaS.js} +1 -1
  280. package/dist/ui/assets/{powershell-C9lzZsbj.js → powershell-DW0_Tsne.js} +1 -1
  281. package/dist/ui/assets/{processing-hzJAP_Li.js → processing-bDmnj3oy.js} +1 -1
  282. package/dist/ui/assets/{profile-bFiAkh7e.js → profile-DJ-L-V1f.js} +1 -1
  283. package/dist/ui/assets/{prolog-CE0trHSn.js → prolog-InNU9tFQ.js} +1 -1
  284. package/dist/ui/assets/{properties-MeANnTVc.js → properties-EkF7cZTJ.js} +1 -1
  285. package/dist/ui/assets/{protobuf-S-rp7SK0.js → protobuf-BBRUbDYu.js} +1 -1
  286. package/dist/ui/assets/{puppet-B5YT8Ct1.js → puppet-fnCmZBIC.js} +1 -1
  287. package/dist/ui/assets/{purebasic-DO-5HeDl.js → purebasic-CgWDuH3f.js} +1 -1
  288. package/dist/ui/assets/{python-DVGTQbwU.js → python-CYT42SmK.js} +1 -1
  289. package/dist/ui/assets/{python-repl-CQ4VlKLC.js → python-repl-Wc3MvYdm.js} +1 -1
  290. package/dist/ui/assets/{q-nS96imov.js → q-C0agAWLY.js} +1 -1
  291. package/dist/ui/assets/{qml-BkzkCgUU.js → qml-BiFendDb.js} +1 -1
  292. package/dist/ui/assets/{quadrantDiagram-ABIIQ3AL-BkaCzlXD.js → quadrantDiagram-ABIIQ3AL-B0fDeX13.js} +1 -1
  293. package/dist/ui/assets/{r-y4Q5t85r.js → r-CcAL_gsb.js} +1 -1
  294. package/dist/ui/assets/{railroadDiagram-RFXS5EU6-C1lbwk19.js → railroadDiagram-RFXS5EU6-DOciFfD8.js} +1 -1
  295. package/dist/ui/assets/{reasonml-Bzhzc5Ao.js → reasonml-DnTQ-jkN.js} +1 -1
  296. package/dist/ui/assets/{requirementDiagram-TGXJPOKE-C8Rw6N2I.js → requirementDiagram-TGXJPOKE-BhpERBEw.js} +1 -1
  297. package/dist/ui/assets/{rib-BP3Y9dW3.js → rib-DRQBJUku.js} +1 -1
  298. package/dist/ui/assets/{roboconf-87QE7cIh.js → roboconf-Dt4hxDSc.js} +1 -1
  299. package/dist/ui/assets/{routeros-BV3nt8wW.js → routeros-DrysyAvp.js} +1 -1
  300. package/dist/ui/assets/{rsl-DfQf4CW_.js → rsl-BhobC4bl.js} +1 -1
  301. package/dist/ui/assets/{ruby-DQxFKbgX.js → ruby-B0gNTjSn.js} +1 -1
  302. package/dist/ui/assets/{ruleslanguage-B8oCm_aw.js → ruleslanguage-BJHWtkQf.js} +1 -1
  303. package/dist/ui/assets/{rust-DzZgPf9W.js → rust-bxFjTZl9.js} +1 -1
  304. package/dist/ui/assets/{sankeyDiagram-HTMAVEWB-Dxiuo8Hz.js → sankeyDiagram-HTMAVEWB-BJGvRvK8.js} +1 -1
  305. package/dist/ui/assets/{sas-CFh-Rsrv.js → sas-C1h9GlCk.js} +1 -1
  306. package/dist/ui/assets/{scala-3UDyJBiS.js → scala-GaqOsYzZ.js} +1 -1
  307. package/dist/ui/assets/{scheme-KaUTge9W.js → scheme-BgOgLp78.js} +1 -1
  308. package/dist/ui/assets/{scilab-CLSBZzuh.js → scilab-Dn2TX-KQ.js} +1 -1
  309. package/dist/ui/assets/{scss-DaEkfHWX.js → scss-CCOm-PWq.js} +1 -1
  310. package/dist/ui/assets/{sequenceDiagram-DBY2YBRQ-Cv__zR2v.js → sequenceDiagram-DBY2YBRQ-69vZi4Ut.js} +1 -1
  311. package/dist/ui/assets/{shell-B0d4cZTk.js → shell-C3U6YWrg.js} +1 -1
  312. package/dist/ui/assets/{sizeCapture-X5ZJPWSS-C4nD-ShQ.js → sizeCapture-X5ZJPWSS-D27KIrz7.js} +1 -1
  313. package/dist/ui/assets/{smali-CLhfky4R.js → smali-CvsTVdr_.js} +1 -1
  314. package/dist/ui/assets/{smalltalk-B4aaTMO5.js → smalltalk-kAQkohW_.js} +1 -1
  315. package/dist/ui/assets/{sml-x4CTxWEZ.js → sml-ve8o4sD9.js} +1 -1
  316. package/dist/ui/assets/{sqf-G_0vdVVs.js → sqf-BEX8EUHQ.js} +1 -1
  317. package/dist/ui/assets/{sql-C--WH0Fo.js → sql-BnvvIWzM.js} +1 -1
  318. package/dist/ui/assets/{sql_more-B4LrzCtd.js → sql_more-BiYWeUQi.js} +1 -1
  319. package/dist/ui/assets/{stan-CACDFOA0.js → stan-CL8TzbqV.js} +1 -1
  320. package/dist/ui/assets/{stata-BP9M7sZt.js → stata-9Ttgn33g.js} +1 -1
  321. package/dist/ui/assets/{stateDiagram-2N3HPSRC-z3-31Cr2.js → stateDiagram-2N3HPSRC-DUQdHUod.js} +1 -1
  322. package/dist/ui/assets/stateDiagram-v2-6OUMAXLB-DahROKNQ.js +1 -0
  323. package/dist/ui/assets/{step21-MAOu4dNb.js → step21-LuiZBROI.js} +1 -1
  324. package/dist/ui/assets/{stylus-CpuP3pvE.js → stylus-DMxCDGKP.js} +1 -1
  325. package/dist/ui/assets/{subunit-NWzuqFhT.js → subunit-BqTiWQgg.js} +1 -1
  326. package/dist/ui/assets/{swift-DuFKNmKv.js → swift-Vgcl7epB.js} +1 -1
  327. package/dist/ui/assets/{swimlanes-5IMT3BWC-E463-rXd.js → swimlanes-5IMT3BWC-BYUDE9bR.js} +2 -2
  328. package/dist/ui/assets/swimlanesDiagram-G3AALYLV-B5Lf8M0k.js +8 -0
  329. package/dist/ui/assets/{taggerscript-BDnv2jvg.js → taggerscript-CQct0uSB.js} +1 -1
  330. package/dist/ui/assets/{tap-aB2cLXdf.js → tap-C3D-iaMR.js} +1 -1
  331. package/dist/ui/assets/{tcl-7WepIaIa.js → tcl-pAGWRV8F.js} +1 -1
  332. package/dist/ui/assets/{thrift-BLh6pdjc.js → thrift-BMf3WY_-.js} +1 -1
  333. package/dist/ui/assets/{timeline-definition-FHXFAJF6-FA_RNhFQ.js → timeline-definition-FHXFAJF6-CUxhbtkg.js} +1 -1
  334. package/dist/ui/assets/{tp-D1rt5u_j.js → tp-CWlQ8HXb.js} +1 -1
  335. package/dist/ui/assets/{twig-DgfeYg4W.js → twig-D49EnTd7.js} +1 -1
  336. package/dist/ui/assets/{typescript-oU560Q8V.js → typescript-O1NhTsg4.js} +1 -1
  337. package/dist/ui/assets/{vala-DlXsaz2B.js → vala-ChgJAi6T.js} +1 -1
  338. package/dist/ui/assets/{vbnet-BjpxjeMZ.js → vbnet-DoMTvpOU.js} +1 -1
  339. package/dist/ui/assets/{vbscript-DfNdtdO3.js → vbscript-COqQ-XLI.js} +1 -1
  340. package/dist/ui/assets/{vbscript-html-D09WPsgK.js → vbscript-html-C6hlND5y.js} +1 -1
  341. package/dist/ui/assets/{vennDiagram-L72KCM5P-zaCDWwTs.js → vennDiagram-L72KCM5P-zdR45Fxo.js} +1 -1
  342. package/dist/ui/assets/{verilog-B9vENtLK.js → verilog-D_vJtQo2.js} +1 -1
  343. package/dist/ui/assets/{vhdl-CJLTZOu1.js → vhdl-P1OS5AdC.js} +1 -1
  344. package/dist/ui/assets/{vim-FuPhupu9.js → vim-Dta1cE1i.js} +1 -1
  345. package/dist/ui/assets/{wardleyDiagram-EHGQE667-BS8ApwmV.js → wardleyDiagram-EHGQE667-DGVhZURT.js} +1 -1
  346. package/dist/ui/assets/{x86asm-kX_Cp6wB.js → x86asm-0uxjBhIR.js} +1 -1
  347. package/dist/ui/assets/{xl-MuHNmLUj.js → xl-A4qrusE8.js} +1 -1
  348. package/dist/ui/assets/{xml-Mbn2z12n.js → xml-BWIS8Du3.js} +1 -1
  349. package/dist/ui/assets/{xquery-Dy4lt-m-.js → xquery-DteVIK7u.js} +1 -1
  350. package/dist/ui/assets/{xychartDiagram-FW5EYKEG-DoNZtZus.js → xychartDiagram-FW5EYKEG-Bi0bMVkV.js} +1 -1
  351. package/dist/ui/assets/{yaml-CxxAisfE.js → yaml-Sfd5lnBk.js} +1 -1
  352. package/dist/ui/assets/{zephir-WWG8qyld.js → zephir-DN0VT2-6.js} +1 -1
  353. package/dist/ui/index.html +2 -2
  354. package/dist/utils/__tests__/knowledge-store.test.d.ts +1 -0
  355. package/dist/utils/__tests__/knowledge-store.test.js +53 -0
  356. package/dist/utils/knowledge-store.d.ts +29 -0
  357. package/dist/utils/knowledge-store.js +144 -0
  358. package/dist/utils/pi-browser-tools.d.ts +10 -0
  359. package/dist/utils/pi-browser-tools.js +246 -0
  360. package/dist/utils/pi-runtime.d.ts +8 -0
  361. package/dist/utils/pi-runtime.js +236 -0
  362. package/dist/utils/pi-sandbox-ops.d.ts +40 -0
  363. package/dist/utils/pi-sandbox-ops.js +205 -0
  364. package/package.json +4 -2
  365. package/dist/docs/assets/chunks/channel.Cc6zpfFP.js +0 -1
  366. package/dist/docs/assets/chunks/classDiagram-OUVF2IWQ.DV5B4KLJ.js +0 -1
  367. package/dist/docs/assets/chunks/classDiagram-v2-EOCWNBFH.DV5B4KLJ.js +0 -1
  368. package/dist/docs/assets/chunks/stateDiagram-v2-6OUMAXLB.B9v-Vq5L.js +0 -1
  369. package/dist/docs/assets/chunks/swimlanesDiagram-G3AALYLV.Kb9LnCTH.js +0 -8
  370. package/dist/ui/assets/channel-_rFUXR2i.js +0 -1
  371. package/dist/ui/assets/classDiagram-OUVF2IWQ-DqgbMzM1.js +0 -1
  372. package/dist/ui/assets/classDiagram-v2-EOCWNBFH-DqgbMzM1.js +0 -1
  373. package/dist/ui/assets/index-CWFn1h-J.css +0 -10
  374. package/dist/ui/assets/stateDiagram-v2-6OUMAXLB-BKIXFHzO.js +0 -1
  375. package/dist/ui/assets/swimlanesDiagram-G3AALYLV-CkQvBOYs.js +0 -8
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-VKFMJZFB.D4vaA23X.js","assets/chunks/chunk-RYQCIY6F.Ch_NfMTR.js","assets/chunks/graph.C2PyVmSI.js","assets/chunks/map.DwDi8XlU.js","assets/chunks/layout.BG3qr61M.js","assets/chunks/framework.D_Xv2a7c.js","assets/chunks/swimlanes-5IMT3BWC.Dy9SffeT.js","assets/chunks/cose-bilkent-JH36ORCC.BeFuOTgi.js","assets/chunks/cytoscape.esm.CUqq0XTU.js","assets/chunks/c4Diagram-LMCZKHZV.gSbgoaJo.js","assets/chunks/chunk-32BRIVSS.BYzKapof.js","assets/chunks/flowDiagram-23GEKE2U.BZLu-WUl.js","assets/chunks/chunk-5VM5RSS4.c3oeF0uS.js","assets/chunks/chunk-XXDRQBXY.CSXBN12Y.js","assets/chunks/chunk-VR4S4FIN.DG8DIrH3.js","assets/chunks/channel.Cc6zpfFP.js","assets/chunks/swimlanesDiagram-G3AALYLV.Kb9LnCTH.js","assets/chunks/erDiagram-Q63AITRT.C6qmOrvh.js","assets/chunks/gitGraphDiagram-IHSO6WYX.BqLfYTI7.js","assets/chunks/chunk-2Q5K7J3B.HRSdtksv.js","assets/chunks/chunk-JWPE2WC7.DtJxsA7-.js","assets/chunks/cynefin-VYW2F7L2.DaXIfh7Y.js","assets/chunks/ganttDiagram-NO4QXBWP.DUzsw4Yr.js","assets/chunks/linear.hFjgYGMN.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/defaultLocale.DX6XiGOO.js","assets/chunks/infoDiagram-FWYZ7A6U.CiKWveW9.js","assets/chunks/pieDiagram-ENE6RG2P.Bb0MqerK.js","assets/chunks/arc.C9NMazfV.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-ABIIQ3AL.Do6HK_yb.js","assets/chunks/xychartDiagram-FW5EYKEG.aKgxZVbK.js","assets/chunks/requirementDiagram-TGXJPOKE.DMtjRYUg.js","assets/chunks/sequenceDiagram-DBY2YBRQ.CLZ0rZTY.js","assets/chunks/classDiagram-OUVF2IWQ.DV5B4KLJ.js","assets/chunks/chunk-V7JOEXUC.CHrHyPoW.js","assets/chunks/classDiagram-v2-EOCWNBFH.DV5B4KLJ.js","assets/chunks/stateDiagram-2N3HPSRC.DY8sDkI0.js","assets/chunks/chunk-EX3LRPZG.Cz5AKl7t.js","assets/chunks/stateDiagram-v2-6OUMAXLB.B9v-Vq5L.js","assets/chunks/journeyDiagram-5HDEW3XC.Cqzvo6I_.js","assets/chunks/timeline-definition-FHXFAJF6.CH6uzgIu.js","assets/chunks/mindmap-definition-LN4V7U3C.ChC5FJW6.js","assets/chunks/kanban-definition-HUTT4EX6.BzJ4OPe5.js","assets/chunks/sankeyDiagram-HTMAVEWB.dfXDu62B.js","assets/chunks/diagram-NH7WQ7WH.CxjBEGZX.js","assets/chunks/diagram-WEI45ONY.yXgVkURA.js","assets/chunks/blockDiagram-677ZJIJ3.DdHVir7t.js","assets/chunks/diagram-OA4YK3LP.CU1jGXMi.js","assets/chunks/architectureDiagram-ZJ3FMSHR.u2IZtOa6.js","assets/chunks/diagram-FQU43EPY.uwRFLKRx.js","assets/chunks/ishikawaDiagram-FXEZZL3T.jerUXEXA.js","assets/chunks/vennDiagram-L72KCM5P.7EBCJmyP.js","assets/chunks/diagram-G47NLZAW.Byfc9d0H.js","assets/chunks/wardleyDiagram-EHGQE667.DPHAQssL.js","assets/chunks/cynefinDiagram-TSTJHNR4.BrJcHEEe.js","assets/chunks/railroadDiagram-RFXS5EU6.D35m6hQn.js","assets/chunks/chunk-MOJQB5TN.h5kO0Dtu.js","assets/chunks/ebnfDiagram-CCIWWBDH.UucqGQ_d.js","assets/chunks/abnfDiagram-VRR7QNED.RG1C5NpS.js","assets/chunks/pegDiagram-2B236MQR.ClnjsRYs.js"])))=>i.map(i=>d[i]);
2
- var Ay=Object.defineProperty;var Ey=(e,t,r)=>t in e?Ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ft=(e,t,r)=>Ey(e,typeof t!="symbol"?t+"":t,r);import{V as mt}from"./framework.D_Xv2a7c.js";var Nc=Object.defineProperty,p=(e,t)=>Nc(e,"name",{value:t,configurable:!0}),My=(e,t)=>{for(var r in t)Nc(e,r,{get:t[r],enumerable:!0})},$y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})($y,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",y="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var A=["th","st","nd","rd"],B=O%100;return"["+O+(A[(B-20)%10]||A[B]||A[0])+"]"}},k=function(O,A,B){var $=String(O);return!$||$.length>=A?O:""+Array(A+1-$.length).join(B)+O},w={s:k,z:function(O){var A=-O.utcOffset(),B=Math.abs(A),$=Math.floor(B/60),E=B%60;return(A<=0?"+":"-")+k($,2,"0")+":"+k(E,2,"0")},m:function O(A,B){if(A.date()<B.date())return-O(B,A);var $=12*(B.year()-A.year())+(B.month()-A.month()),E=A.clone().add($,u),q=B-E<0,Y=A.clone().add($+(q?-1:1),u);return+(-($+(B-E)/(q?E-Y:Y-E))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:u,y:d,w:h,d:c,D:y,h:l,m:n,s:o,ms:a,Q:f}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},S="en",_={};_[S]=b;var F="$isDayjsObject",v=function(O){return O instanceof U||!(!O||!O[F])},z=function O(A,B,$){var E;if(!A)return S;if(typeof A=="string"){var q=A.toLowerCase();_[q]&&(E=q),B&&(_[q]=B,E=q);var Y=A.split("-");if(!E&&Y.length>1)return O(Y[0])}else{var G=A.name;_[G]=A,E=G}return!$&&E&&(S=E),E||!$&&S},N=function(O,A){if(v(O))return O.clone();var B=typeof A=="object"?A:{};return B.date=O,B.args=arguments,new U(B)},M=w;M.l=z,M.i=v,M.w=function(O,A){return N(O,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var U=function(){function O(B){this.$L=z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[F]=!0}var A=O.prototype;return A.parse=function(B){this.$d=function($){var E=$.date,q=$.utc;if(E===null)return new Date(NaN);if(M.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(m);if(Y){var G=Y[2]-1||0,et=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)}}return new Date(E)}(B),this.init()},A.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()},A.$utils=function(){return M},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(B,$){var E=N(B);return this.startOf($)<=E&&E<=this.endOf($)},A.isAfter=function(B,$){return N(B)<this.startOf($)},A.isBefore=function(B,$){return this.endOf($)<N(B)},A.$g=function(B,$,E){return M.u(B)?this[$]:this.set(E,B)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(B,$){var E=this,q=!!M.u($)||$,Y=M.p(B),G=function(Lt,Z){var V=M.w(E.$u?Date.UTC(E.$y,Z,Lt):new Date(E.$y,Z,Lt),E);return q?V:V.endOf(c)},et=function(Lt,Z){return M.w(E.toDate()[Lt].apply(E.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Z)),E)},lt=this.$W,ot=this.$M,ct=this.$D,bt="set"+(this.$u?"UTC":"");switch(Y){case d:return q?G(1,0):G(31,11);case u:return q?G(1,ot):G(0,ot+1);case h:var Ct=this.$locale().weekStart||0,Bt=(lt<Ct?lt+7:lt)-Ct;return G(q?ct-Bt:ct+(6-Bt),ot);case c:case y:return et(bt+"Hours",0);case l:return et(bt+"Minutes",1);case n:return et(bt+"Seconds",2);case o:return et(bt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(B){return this.startOf(B,!1)},A.$set=function(B,$){var E,q=M.p(B),Y="set"+(this.$u?"UTC":""),G=(E={},E[c]=Y+"Date",E[y]=Y+"Date",E[u]=Y+"Month",E[d]=Y+"FullYear",E[l]=Y+"Hours",E[n]=Y+"Minutes",E[o]=Y+"Seconds",E[a]=Y+"Milliseconds",E)[q],et=q===c?this.$D+($-this.$W):$;if(q===u||q===d){var lt=this.clone().set(y,1);lt.$d[G](et),lt.init(),this.$d=lt.set(y,Math.min(this.$D,lt.daysInMonth())).$d}else G&&this.$d[G](et);return this.init(),this},A.set=function(B,$){return this.clone().$set(B,$)},A.get=function(B){return this[M.p(B)]()},A.add=function(B,$){var E,q=this;B=Number(B);var Y=M.p($),G=function(ot){var ct=N(q);return M.w(ct.date(ct.date()+Math.round(ot*B)),q)};if(Y===u)return this.set(u,this.$M+B);if(Y===d)return this.set(d,this.$y+B);if(Y===c)return G(1);if(Y===h)return G(7);var et=(E={},E[n]=i,E[l]=s,E[o]=r,E)[Y]||1,lt=this.$d.getTime()+B*et;return M.w(lt,this)},A.subtract=function(B,$){return this.add(-1*B,$)},A.format=function(B){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||g;var q=B||"YYYY-MM-DDTHH:mm:ssZ",Y=M.z(this),G=this.$H,et=this.$m,lt=this.$M,ot=E.weekdays,ct=E.months,bt=E.meridiem,Ct=function(Z,V,gt,nt){return Z&&(Z[V]||Z($,q))||gt[V].slice(0,nt)},Bt=function(Z){return M.s(G%12||12,Z,"0")},Lt=bt||function(Z,V,gt){var nt=Z<12?"AM":"PM";return gt?nt.toLowerCase():nt};return q.replace(C,function(Z,V){return V||function(gt){switch(gt){case"YY":return String($.$y).slice(-2);case"YYYY":return M.s($.$y,4,"0");case"M":return lt+1;case"MM":return M.s(lt+1,2,"0");case"MMM":return Ct(E.monthsShort,lt,ct,3);case"MMMM":return Ct(ct,lt);case"D":return $.$D;case"DD":return M.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Ct(E.weekdaysMin,$.$W,ot,2);case"ddd":return Ct(E.weekdaysShort,$.$W,ot,3);case"dddd":return ot[$.$W];case"H":return String(G);case"HH":return M.s(G,2,"0");case"h":return Bt(1);case"hh":return Bt(2);case"a":return Lt(G,et,!0);case"A":return Lt(G,et,!1);case"m":return String(et);case"mm":return M.s(et,2,"0");case"s":return String($.$s);case"ss":return M.s($.$s,2,"0");case"SSS":return M.s($.$ms,3,"0");case"Z":return Y}return null}(Z)||Y.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(B,$,E){var q,Y=this,G=M.p($),et=N(B),lt=(et.utcOffset()-this.utcOffset())*i,ot=this-et,ct=function(){return M.m(Y,et)};switch(G){case d:q=ct()/12;break;case u:q=ct();break;case f:q=ct()/3;break;case h:q=(ot-lt)/6048e5;break;case c:q=(ot-lt)/864e5;break;case l:q=ot/s;break;case n:q=ot/i;break;case o:q=ot/r;break;default:q=ot}return E?q:M.a(q)},A.daysInMonth=function(){return this.endOf(u).$D},A.$locale=function(){return _[this.$L]},A.locale=function(B,$){if(!B)return this.$L;var E=this.clone(),q=z(B,$,!0);return q&&(E.$L=q),E},A.clone=function(){return M.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},O}(),W=U.prototype;return N.prototype=W,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",y]].forEach(function(O){W[O[1]]=function(A){return this.$g(A,O[0],O[1])}}),N.extend=function(O,A){return O.$i||(O(A,U,N),O.$i=!0),N},N.locale=z,N.isDayjs=v,N.unix=function(O){return N(1e3*O)},N.en=_[S],N.Ls=_,N.p={},N})})(qc);var Iy=qc.exports;const Dy=Oy(Iy);var Ye={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},In=p(function(e="fatal"){let t=Ye.fatal;typeof e=="string"?e.toLowerCase()in Ye&&(t=Ye[e]):typeof e=="number"&&(t=e),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},t<=Ye.fatal&&(H.fatal=console.error?console.error.bind(console,ge("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ge("FATAL"))),t<=Ye.error&&(H.error=console.error?console.error.bind(console,ge("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ge("ERROR"))),t<=Ye.warn&&(H.warn=console.warn?console.warn.bind(console,ge("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ge("WARN"))),t<=Ye.info&&(H.info=console.info?console.info.bind(console,ge("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ge("INFO"))),t<=Ye.debug&&(H.debug=console.debug?console.debug.bind(console,ge("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("DEBUG"))),t<=Ye.trace&&(H.trace=console.debug?console.debug.bind(console,ge("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("TRACE")))},"setLogLevel"),ge=p(e=>`%c${Dy().format("ss.SSS")} : ${e} : `,"format");const qs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return qs.hue2rgb(a,s,e+1/3)*255;case"g":return qs.hue2rgb(a,s,e)*255;case"b":return qs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Py={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},Ry={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},pt={channel:qs,lang:Py,unit:Ry},ir={};for(let e=0;e<=255;e++)ir[e]=pt.unit.dec2hex(e);const Zt={ALL:0,RGB:1,HSL:2};class Ny{constructor(){this.type=Zt.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=Zt.ALL}is(t){return this.type===t}}class qy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ny}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=pt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=pt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=pt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=pt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=pt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=pt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Aa=new qy({r:0,g:0,b:0,a:0},"transparent"),Qr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Qr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Aa.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${ir[Math.round(t)]}${ir[Math.round(r)]}${ir[Math.round(i)]}${ir[Math.round(s*255)]}`:`#${ir[Math.round(t)]}${ir[Math.round(r)]}${ir[Math.round(i)]}`}},Tr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Tr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return pt.channel.clamp.h(parseFloat(r)*.9);case"rad":return pt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return pt.channel.clamp.h(parseFloat(r)*360)}}return pt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Tr.re);if(!r)return;const[,i,s,a,o,n]=r;return Aa.set({h:Tr._hue2deg(i),s:pt.channel.clamp.s(parseFloat(s)),l:pt.channel.clamp.l(parseFloat(a)),a:o?pt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%, ${s})`:`hsl(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%)`}},Xi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Xi.colors[e];if(t)return Qr.parse(t)},stringify:e=>{const t=Qr.stringify(e);for(const r in Xi.colors)if(Xi.colors[r]===t)return r}},Ni={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ni.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return Aa.set({r:pt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:pt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:pt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?pt.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(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)}, ${pt.lang.round(s)})`:`rgb(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)})`}},De={format:{keyword:Xi,hex:Qr,rgb:Ni,rgba:Ni,hsl:Tr,hsla:Tr},parse:e=>{if(typeof e!="string")return e;const t=Qr.parse(e)||Ni.parse(e)||Tr.parse(e)||Xi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Zt.HSL)||e.data.r===void 0?Tr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ni.stringify(e):Qr.stringify(e)},Wc=(e,t)=>{const r=De.parse(e);for(const i in t)r[i]=pt.channel.clamp[i](t[i]);return De.stringify(r)},lr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Wc(e,{a:t});const s=Aa.set({r:pt.channel.clamp.r(e),g:pt.channel.clamp.g(t),b:pt.channel.clamp.b(r),a:pt.channel.clamp.a(i)});return De.stringify(s)},Wy=e=>{const{r:t,g:r,b:i}=De.parse(e),s=.2126*pt.channel.toLinear(t)+.7152*pt.channel.toLinear(r)+.0722*pt.channel.toLinear(i);return pt.lang.round(s)},zy=e=>Wy(e)>=.5,Be=e=>!zy(e),zc=(e,t,r)=>{const i=De.parse(e),s=i[t],a=pt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),De.stringify(i)},P=(e,t)=>zc(e,"l",t),R=(e,t)=>zc(e,"l",-t),x=(e,t)=>{const r=De.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Wc(e,i)},Hy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=De.parse(e),{r:n,g:l,b:c,a:h}=De.parse(t),u=r/100,f=u*2-1,d=o-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-g,C=i*g+n*m,b=s*g+l*m,k=a*g+c*m,w=o*u+h*(1-u);return lr(C,b,k,w)},L=(e,t=100)=>{const r=De.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Hy(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Yy(e){if(Array.isArray(e))return e}function Uy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return n}}function Gy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jy(e,t){return Yy(e)||Uy(e,t)||Xy(e,t)||Gy()}function Xy(e,t){if(e){if(typeof e=="string")return sh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sh(e,t):void 0}}const Hc=Object.entries,ah=Object.setPrototypeOf,Vy=Object.isFrozen,Zy=Object.getPrototypeOf,Ky=Object.getOwnPropertyDescriptor;let Xt=Object.freeze,Vt=Object.seal,Gr=Object.create,Yc=typeof Reflect<"u"&&Reflect,Oo=Yc.apply,Io=Yc.construct;Xt||(Xt=function(t){return t});Vt||(Vt=function(t){return t});Oo||(Oo=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Io||(Io=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Fi=Pt(Array.prototype.forEach),Qy=Pt(Array.prototype.lastIndexOf),oh=Pt(Array.prototype.pop),zr=Pt(Array.prototype.push),Jy=Pt(Array.prototype.splice),ar=Array.isArray,qi=Pt(String.prototype.toLowerCase),po=Pt(String.prototype.toString),nh=Pt(String.prototype.match),Ai=Pt(String.prototype.replace),lh=Pt(String.prototype.indexOf),t0=Pt(String.prototype.trim),e0=Pt(Number.prototype.toString),r0=Pt(Boolean.prototype.toString),hh=typeof BigInt>"u"?null:Pt(BigInt.prototype.toString),ch=typeof Symbol>"u"?null:Pt(Symbol.prototype.toString),Wt=Pt(Object.prototype.hasOwnProperty),Ei=Pt(Object.prototype.toString),Ut=Pt(RegExp.prototype.test),yr=i0(TypeError);function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return Oo(e,t,i)}}function i0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Io(e,r)}}function Tt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qi;if(ah&&ah(e,null),!ar(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(Vy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function s0(e){for(let t=0;t<e.length;t++)Wt(e,t)||(e[t]=null);return e}function re(e){const t=Gr(null);for(const i of Hc(e)){var r=jy(i,2);const s=r[0],a=r[1];Wt(e,s)&&(ar(a)?t[s]=s0(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=re(a):t[s]=a)}return t}function a0(e){switch(typeof e){case"string":return e;case"number":return e0(e);case"boolean":return r0(e);case"bigint":return hh?hh(e):"0";case"symbol":return ch?ch(e):"Symbol()";case"undefined":return Ei(e);case"function":case"object":{if(e===null)return Ei(e);const t=e,r=Ee(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Ei(i)}return Ei(e)}default:return Ei(e)}}function Ee(e,t){for(;e!==null;){const i=Ky(e,t);if(i){if(i.get)return Pt(i.get);if(typeof i.value=="function")return Pt(i.value)}e=Zy(e)}function r(){return null}return r}function o0(e){try{return Ut(e,""),!0}catch{return!1}}const uh=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),go=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mo=Xt(["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"]),n0=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yo=Xt(["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"]),l0=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dh=Xt(["#text"]),fh=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Co=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ph=Xt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ls=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),h0=Vt(/{{[\w\W]*|^[\w\W]*}}/g),c0=Vt(/<%[\w\W]*|^[\w\W]*%>/g),u0=Vt(/\${[\w\W]*/g),d0=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),f0=Vt(/^aria-[\-\w]+$/),gh=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),p0=Vt(/^(?:\w+script|data):/i),g0=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),m0=Vt(/^html$/i),y0=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),mh=Vt(/<[/\w!]/g),C0=Vt(/<[/\w]/g),x0=Vt(/<\/no(script|embed|frames)/i),b0=Vt(/\/>/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},k0=function(){return typeof window>"u"?null:window},T0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},yh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rr=function(t,r,i,s){return Wt(t,r)&&ar(t[r])?Tt(s.base?re(s.base):{},t[r],s.transform):i};function Uc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k0();const t=X=>Uc(X);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Ae.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,f=n.prototype,d=Ee(f,"cloneNode"),y=Ee(f,"remove"),g=Ee(f,"nextSibling"),m=Ee(f,"childNodes"),C=Ee(f,"parentNode"),b=Ee(f,"shadowRoot"),k=Ee(f,"attributes"),w=o&&o.prototype?Ee(o.prototype,"nodeType"):null,S=o&&o.prototype?Ee(o.prototype,"nodeName"):null;if(typeof a=="function"){const X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let _,F="",v,z=!1,N=0;const M=function(){if(N>0)throw yr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},U=function(T){M(),N++;try{return _.createHTML(T)}finally{N--}},W=function(T){M(),N++;try{return _.createScriptURL(T)}finally{N--}},O=function(){return z||(v=T0(u,s),z=!0),v},A=r,B=A.implementation,$=A.createNodeIterator,E=A.createDocumentFragment,q=A.getElementsByTagName,Y=i.importNode;let G=yh();t.isSupported=typeof Hc=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;const et=h0,lt=c0,ot=u0,ct=d0,bt=f0,Ct=p0,Bt=g0,Lt=y0;let Z=gh,V=null;const gt=Tt({},[...uh,...go,...mo,...yo,...dh]);let nt=null;const D=Tt({},[...fh,...Co,...ph,...Ls]);let K=Object.seal(Gr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,Va=null;const fe=Object.seal(Gr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pl=!0,Za=!0,Rl=!1,Nl=!0,tr=!1,Bi=!0,gr=!1,Ka=!1,Qa=null,Ja=null,to=!1,Pr=!1,ks=!1,Ts=!1,ql=!0,Wl=!1;const zl="user-content-";let eo=!0,ro=!1,Rr={},Le=null;const io=Tt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Hl=null;const Yl=Tt({},["audio","video","img","source","image","track"]);let so=null;const Ul=Tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ws="http://www.w3.org/1998/Math/MathML",Ss="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let Nr=Fe,ao=!1,oo=null;const py=Tt({},[ws,Ss,Fe],po),Gl=Xt(["mi","mo","mn","ms","mtext"]);let no=Tt({},Gl);const jl=Xt(["annotation-xml"]);let lo=Tt({},jl);const gy=Tt({},["title","style","font","a","script"]);let vi=null;const my=["application/xhtml+xml","text/html"],yy="text/html";let Mt=null,qr=null;const Cy=r.createElement("form"),Xl=function(T){return T instanceof RegExp||T instanceof Function},ho=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(qr&&qr===T)return;(!T||typeof T!="object")&&(T={}),T=re(T),vi=my.indexOf(T.PARSER_MEDIA_TYPE)===-1?yy:T.PARSER_MEDIA_TYPE,Mt=vi==="application/xhtml+xml"?po:qi,V=rr(T,"ALLOWED_TAGS",gt,{transform:Mt}),nt=rr(T,"ALLOWED_ATTR",D,{transform:Mt}),oo=rr(T,"ALLOWED_NAMESPACES",py,{transform:po}),so=rr(T,"ADD_URI_SAFE_ATTR",Ul,{transform:Mt,base:Ul}),Hl=rr(T,"ADD_DATA_URI_TAGS",Yl,{transform:Mt,base:Yl}),Le=rr(T,"FORBID_CONTENTS",io,{transform:Mt}),Je=rr(T,"FORBID_TAGS",re({}),{transform:Mt}),Va=rr(T,"FORBID_ATTR",re({}),{transform:Mt}),Rr=Wt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?re(T.USE_PROFILES):T.USE_PROFILES:!1,Pl=T.ALLOW_ARIA_ATTR!==!1,Za=T.ALLOW_DATA_ATTR!==!1,Rl=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Nl=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tr=T.SAFE_FOR_TEMPLATES||!1,Bi=T.SAFE_FOR_XML!==!1,gr=T.WHOLE_DOCUMENT||!1,Pr=T.RETURN_DOM||!1,ks=T.RETURN_DOM_FRAGMENT||!1,Ts=T.RETURN_TRUSTED_TYPE||!1,to=T.FORCE_BODY||!1,ql=T.SANITIZE_DOM!==!1,Wl=T.SANITIZE_NAMED_PROPS||!1,eo=T.KEEP_CONTENT!==!1,ro=T.IN_PLACE||!1,Z=o0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:gh,Nr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Fe,no=Wt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?re(T.MATHML_TEXT_INTEGRATION_POINTS):Tt({},Gl),lo=Wt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?re(T.HTML_INTEGRATION_POINTS):Tt({},jl);const I=Wt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?re(T.CUSTOM_ELEMENT_HANDLING):Gr(null);if(K=Gr(null),Wt(I,"tagNameCheck")&&Xl(I.tagNameCheck)&&(K.tagNameCheck=I.tagNameCheck),Wt(I,"attributeNameCheck")&&Xl(I.attributeNameCheck)&&(K.attributeNameCheck=I.attributeNameCheck),Wt(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),Vt(K),tr&&(Za=!1),ks&&(Pr=!0),Rr&&(V=Tt({},dh),nt=Gr(null),Rr.html===!0&&(Tt(V,uh),Tt(nt,fh)),Rr.svg===!0&&(Tt(V,go),Tt(nt,Co),Tt(nt,Ls)),Rr.svgFilters===!0&&(Tt(V,mo),Tt(nt,Co),Tt(nt,Ls)),Rr.mathMl===!0&&(Tt(V,yo),Tt(nt,ph),Tt(nt,Ls))),fe.tagCheck=null,fe.attributeCheck=null,Wt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?fe.tagCheck=T.ADD_TAGS:ar(T.ADD_TAGS)&&(V===gt&&(V=re(V)),Tt(V,T.ADD_TAGS,Mt))),Wt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?fe.attributeCheck=T.ADD_ATTR:ar(T.ADD_ATTR)&&(nt===D&&(nt=re(nt)),Tt(nt,T.ADD_ATTR,Mt))),Wt(T,"ADD_URI_SAFE_ATTR")&&ar(T.ADD_URI_SAFE_ATTR)&&Tt(so,T.ADD_URI_SAFE_ATTR,Mt),Wt(T,"FORBID_CONTENTS")&&ar(T.FORBID_CONTENTS)&&(Le===io&&(Le=re(Le)),Tt(Le,T.FORBID_CONTENTS,Mt)),Wt(T,"ADD_FORBID_CONTENTS")&&ar(T.ADD_FORBID_CONTENTS)&&(Le===io&&(Le=re(Le)),Tt(Le,T.ADD_FORBID_CONTENTS,Mt)),eo&&(V["#text"]=!0),gr&&Tt(V,["html","head","body"]),V.table&&(Tt(V,["tbody"]),delete Je.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const j=_;_=T.TRUSTED_TYPES_POLICY;try{F=U("")}catch(st){throw _=j,st}}else T.TRUSTED_TYPES_POLICY===null?(_=void 0,F=""):(_===void 0&&(_=O()),_&&typeof F=="string"&&(F=U("")));Xt&&Xt(T),qr=T},Vl=Tt({},[...go,...mo,...n0]),Zl=Tt({},[...yo,...l0]),xy=function(T,I,j){return I.namespaceURI===Fe?T==="svg":I.namespaceURI===ws?T==="svg"&&(j==="annotation-xml"||no[j]):!!Vl[T]},by=function(T,I,j){return I.namespaceURI===Fe?T==="math":I.namespaceURI===Ss?T==="math"&&lo[j]:!!Zl[T]},ky=function(T,I,j){return I.namespaceURI===Ss&&!lo[j]||I.namespaceURI===ws&&!no[j]?!1:!Zl[T]&&(gy[T]||!Vl[T])},Ty=function(T){let I=C(T);(!I||!I.tagName)&&(I={namespaceURI:Nr,tagName:"template"});const j=qi(T.tagName),st=qi(I.tagName);return oo[T.namespaceURI]?T.namespaceURI===Ss?xy(j,I,st):T.namespaceURI===ws?by(j,I,st):T.namespaceURI===Fe?ky(j,I,st):!!(vi==="application/xhtml+xml"&&oo[T.namespaceURI]):!1},er=function(T){zr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(y(T),!C(T))throw yr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Kl=function(T){const I=m(T);if(I){const st=[];Fi(I,xt=>{zr(st,xt)}),Fi(st,xt=>{try{y(xt)}catch{}})}const j=k(T);if(j)for(let st=j.length-1;st>=0;--st){const xt=j[st],wt=xt&&xt.name;if(typeof wt=="string")try{T.removeAttribute(wt)}catch{}}},mr=function(T,I){try{zr(t.removed,{attribute:I.getAttributeNode(T),from:I})}catch{zr(t.removed,{attribute:null,from:I})}if(I.removeAttribute(T),T==="is")if(Pr||ks)try{er(I)}catch{}else try{I.setAttribute(T,"")}catch{}},wy=function(T){const I=k(T);if(I)for(let j=I.length-1;j>=0;--j){const st=I[j],xt=st&&st.name;if(!(typeof xt!="string"||nt[Mt(xt)]))try{T.removeAttribute(xt)}catch{}}},Sy=function(T){const I=[T];for(;I.length>0;){const j=I.pop();(w?w(j):j.nodeType)===Ae.element&&wy(j);const xt=m(j);if(xt)for(let wt=xt.length-1;wt>=0;--wt)I.push(xt[wt])}},Ql=function(T){let I=null,j=null;if(to)T="<remove></remove>"+T;else{const wt=nh(T,/^[\r\n\t ]+/);j=wt&&wt[0]}vi==="application/xhtml+xml"&&Nr===Fe&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const st=_?U(T):T;if(Nr===Fe)try{I=new h().parseFromString(st,vi)}catch{}if(!I||!I.documentElement){I=B.createDocument(Nr,"template",null);try{I.documentElement.innerHTML=ao?F:st}catch{}}const xt=I.body||I.documentElement;return T&&j&&xt.insertBefore(r.createTextNode(j),xt.childNodes[0]||null),Nr===Fe?q.call(I,gr?"html":"body")[0]:gr?I.documentElement:xt},Jl=function(T){return $.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},_s=function(T){return T=Ai(T,et," "),T=Ai(T,lt," "),T=Ai(T,ot," "),T},co=function(T){var I;T.normalize();const j=$.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let st=j.nextNode();for(;st;)st.data=_s(st.data),st=j.nextNode();const xt=(I=T.querySelectorAll)===null||I===void 0?void 0:I.call(T,"template");xt&&Fi(xt,wt=>{Wr(wt.content)&&co(wt.content)})},Bs=function(T){const I=S?S(T):null;return typeof I!="string"||Mt(I)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==m(T)},Wr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Ae.documentFragment}catch{return!1}},Li=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function He(X,T,I){X.length!==0&&Fi(X,j=>{j.call(t,T,I,qr)})}const _y=function(T,I){return!!(Bi&&T.hasChildNodes()&&!Li(T.firstElementChild)&&Ut(mh,T.textContent)&&Ut(mh,T.innerHTML)||Bi&&T.namespaceURI===Fe&&I==="style"&&Li(T.firstElementChild)||T.nodeType===Ae.processingInstruction||Bi&&T.nodeType===Ae.comment&&Ut(C0,T.data))},By=function(T,I){if(!Je[I]&&rh(I)&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,I)||K.tagNameCheck instanceof Function&&K.tagNameCheck(I)))return!1;if(eo&&!Le[I]){const j=C(T),st=m(T);if(st&&j){const xt=st.length;for(let wt=xt-1;wt>=0;--wt){const qt=ro?st[wt]:d(st[wt],!0);j.insertBefore(qt,g(T))}}}return er(T),!0},th=function(T){if(He(G.beforeSanitizeElements,T,null),Bs(T))return er(T),!0;const I=Mt(S?S(T):T.nodeName);if(He(G.uponSanitizeElement,T,{tagName:I,allowedTags:V}),_y(T,I))return er(T),!0;if(Je[I]||!(fe.tagCheck instanceof Function&&fe.tagCheck(I))&&!V[I])return By(T,I);if((w?w(T):T.nodeType)===Ae.element&&!Ty(T)||(I==="noscript"||I==="noembed"||I==="noframes")&&Ut(x0,T.innerHTML))return er(T),!0;if(tr&&T.nodeType===Ae.text){const st=_s(T.textContent);T.textContent!==st&&(zr(t.removed,{element:T.cloneNode()}),T.textContent=st)}return He(G.afterSanitizeElements,T,null),!1},eh=function(T,I,j){if(Va[I]||ql&&(I==="id"||I==="name")&&(j in r||j in Cy))return!1;const st=nt[I]||fe.attributeCheck instanceof Function&&fe.attributeCheck(I,T);if(!(Za&&Ut(ct,I))){if(!(Pl&&Ut(bt,I))){if(st){if(!so[I]){if(!Ut(Z,Ai(j,Bt,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&T!=="script"&&lh(j,"data:")===0&&Hl[T])){if(!(Rl&&!Ut(Ct,Ai(j,Bt,"")))){if(j)return!1}}}}}else if(!(rh(T)&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,T)||K.tagNameCheck instanceof Function&&K.tagNameCheck(T))&&(K.attributeNameCheck instanceof RegExp&&Ut(K.attributeNameCheck,I)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(I,T))||I==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,j)||K.tagNameCheck instanceof Function&&K.tagNameCheck(j))))return!1}}return!0},vy=Tt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rh=function(T){return!vy[qi(T)]&&Ut(Lt,T)},Ly=function(T,I,j,st){if(_&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!j)switch(u.getAttributeType(T,I)){case"TrustedHTML":return U(st);case"TrustedScriptURL":return W(st)}return st},Fy=function(T,I,j,st){try{j?T.setAttributeNS(j,I,st):T.setAttribute(I,st),Bs(T)?er(T):oh(t.removed)}catch{mr(I,T)}},ih=function(T){He(G.beforeSanitizeAttributes,T,null);const I=T.attributes;if(!I||Bs(T))return;const j={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let st=I.length;const xt=Mt(T.nodeName);for(;st--;){const wt=I[st],qt=wt.name,It=wt.namespaceURI,pe=wt.value,ye=Mt(qt),fo=pe;let ee=qt==="value"?fo:t0(fo);if(j.attrName=ye,j.attrValue=ee,j.keepAttr=!0,j.forceKeepAttr=void 0,He(G.uponSanitizeAttribute,T,j),ee=j.attrValue,Wl&&(ye==="id"||ye==="name")&&lh(ee,zl)!==0&&(mr(qt,T),ee=zl+ee),Bi&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ee)){mr(qt,T);continue}if(ye==="attributename"&&nh(ee,"href")){mr(qt,T);continue}if(!j.forceKeepAttr){if(!j.keepAttr){mr(qt,T);continue}if(!Nl&&Ut(b0,ee)){mr(qt,T);continue}if(tr&&(ee=_s(ee)),!eh(xt,ye,ee)){mr(qt,T);continue}ee=Ly(xt,ye,It,ee),ee!==fo&&Fy(T,qt,It,ee)}}He(G.afterSanitizeAttributes,T,null)},vs=function(T){let I=null;const j=Jl(T);for(He(G.beforeSanitizeShadowDOM,T,null);I=j.nextNode();)if(He(G.uponSanitizeShadowNode,I,null),th(I),ih(I),Wr(I.content)&&vs(I.content),(w?w(I):I.nodeType)===Ae.element){const xt=b(I);Wr(xt)&&(uo(xt),vs(xt))}He(G.afterSanitizeShadowDOM,T,null)},uo=function(T){const I=[{node:T,shadow:null}];for(;I.length>0;){const j=I.pop();if(j.shadow){vs(j.shadow);continue}const st=j.node,wt=(w?w(st):st.nodeType)===Ae.element,qt=m(st);if(qt)for(let It=qt.length-1;It>=0;--It)I.push({node:qt[It],shadow:null});if(wt){const It=S?S(st):null;if(typeof It=="string"&&Mt(It)==="template"){const pe=st.content;Wr(pe)&&I.push({node:pe,shadow:null})}}if(wt){const It=b(st);Wr(It)&&I.push({node:null,shadow:It},{node:It,shadow:null})}}};return t.sanitize=function(X){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,j=null,st=null,xt=null;if(ao=!X,ao&&(X="<!-->"),typeof X!="string"&&!Li(X)&&(X=a0(X),typeof X!="string"))throw yr("dirty is not a string, aborting");if(!t.isSupported)return X;Ka?(V=Qa,nt=Ja):ho(T),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(V=re(V)),G.uponSanitizeAttribute.length>0&&(nt=re(nt)),t.removed=[];const wt=ro&&typeof X!="string"&&Li(X);if(wt){const pe=S?S(X):X.nodeName;if(typeof pe=="string"){const ye=Mt(pe);if(!V[ye]||Je[ye])throw yr("root node is forbidden and cannot be sanitized in-place")}if(Bs(X))throw yr("root node is clobbered and cannot be sanitized in-place");try{uo(X)}catch(ye){throw Kl(X),ye}}else if(Li(X))I=Ql("<!---->"),j=I.ownerDocument.importNode(X,!0),j.nodeType===Ae.element&&j.nodeName==="BODY"||j.nodeName==="HTML"?I=j:I.appendChild(j),uo(j);else{if(!Pr&&!tr&&!gr&&X.indexOf("<")===-1)return _&&Ts?U(X):X;if(I=Ql(X),!I)return Pr?null:Ts?F:""}I&&to&&er(I.firstChild);const qt=Jl(wt?X:I);try{for(;st=qt.nextNode();)th(st),ih(st),Wr(st.content)&&vs(st.content)}catch(pe){throw wt&&Kl(X),pe}if(wt)return Fi(t.removed,pe=>{pe.element&&Sy(pe.element)}),tr&&co(X),X;if(Pr){if(tr&&co(I),ks)for(xt=E.call(I.ownerDocument);I.firstChild;)xt.appendChild(I.firstChild);else xt=I;return(nt.shadowroot||nt.shadowrootmode)&&(xt=Y.call(i,xt,!0)),xt}let It=gr?I.outerHTML:I.innerHTML;return gr&&V["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ut(m0,I.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
4
- `+It),tr&&(It=_s(It)),_&&Ts?U(It):It},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ho(X),Ka=!0,Qa=V,Ja=nt},t.clearConfig=function(){qr=null,Ka=!1,Qa=null,Ja=null,_=v,F=""},t.isValidAttribute=function(X,T,I){qr||ho({});const j=Mt(X),st=Mt(T);return eh(j,st,I)},t.addHook=function(X,T){typeof T=="function"&&Wt(G,X)&&zr(G[X],T)},t.removeHook=function(X,T){if(Wt(G,X)){if(T!==void 0){const I=Qy(G[X],T);return I===-1?void 0:Jy(G[X],I,1)[0]}return oh(G[X])}},t.removeHooks=function(X){Wt(G,X)&&(G[X]=[])},t.removeAllHooks=function(){G=yh()},t}var gi=Uc(),Do=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Do(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Do(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Rt=Do,Re="#ffffff",Ne="#f2f2f2",ft=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),ei,w0=(ei=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScale"+K]=R(this["cScale"+K],75);else for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScale"+K]=R(this["cScale"+K],25);for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScaleInv"+K]=this["cScaleInv"+K]||L(this["cScale"+K]);for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this.darkMode?this["cScalePeer"+K]=this["cScalePeer"+K]||P(this["cScale"+K],10):this["cScalePeer"+K]=this["cScalePeer"+K]||R(this["cScale"+K],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScaleLabel"+K]=this["cScaleLabel"+K]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let K=0;K<5;K++)this["surface"+K]=this["surface"+K]||x(this.mainBkg,{h:180,s:-15,l:t*(5+K*3)}),this["surfacePeer"+K]=this["surfacePeer"+K]||x(this.mainBkg,{h:180,s:-15,l:t*(8+K*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.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:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((B=this.wardley)==null?void 0:B.componentStroke)||this.lineColor,componentLabelColor:(($=this.wardley)==null?void 0:$.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((q=this.wardley)==null?void 0:q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((G=this.wardley)==null?void 0:G.annotationTextColor)||this.primaryTextColor,annotationFill:((et=this.wardley)==null?void 0:et.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((ot=this.xyChart)==null?void 0:ot.titleColor)||this.primaryTextColor,dataLabelColor:((ct=this.xyChart)==null?void 0:ct.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((bt=this.xyChart)==null?void 0:bt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Z=this.xyChart)==null?void 0:Z.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((V=this.xyChart)==null?void 0:V.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((gt=this.xyChart)==null?void 0:gt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((nt=this.xyChart)==null?void 0:nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ei,"Theme"),ei),S0=p(e=>{const t=new w0;return t.calculate(e),t},"getThemeVariables"),ri,_0=(ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=lr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=lr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.secondBkg=P(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=P(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=P(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=L(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??P(this["cScale"+D],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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((ct=this.wardley)==null?void 0:ct.gridColor)||this.gridColor,componentFill:((bt=this.wardley)==null?void 0:bt.componentFill)||this.mainBkg,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((gt=this.wardley)==null?void 0:gt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||P("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||P("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||P("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||P("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||P(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||P(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(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),B0=p(e=>{const t=new _0;return t.calculate(e),t},"getThemeVariables"),ii,v0=(ii=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=lr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=R(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||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||P(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||P(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((gt=this.xyChart)==null?void 0:gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ii,"Theme"),ii),L0=p(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),si,F0=(si=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=P("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.actorBorder=R(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=R(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(8+D*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||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((gt=this.xyChart)==null?void 0:gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(si,"Theme"),si),A0=p(e=>{const t=new F0;return t.calculate(e),t},"getThemeVariables"),ai,E0=(ai=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.secondBkg=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(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 D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{l:-(8+D*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=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=R(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((ct=this.wardley)==null?void 0:ct.gridColor)||this.gridColor,componentFill:((bt=this.wardley)==null?void 0:bt.componentFill)||this.background,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((gt=this.wardley)==null?void 0:gt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ai,"Theme"),ai),M0=p(e=>{const t=new E0;return t.calculate(e),t},"getThemeVariables"),oi,$0=(oi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,f,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||P(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||R(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(oi,"Theme"),oi),O0=p(e=>{const t=new $0;return t.calculate(e),t},"getThemeVariables"),ni,I0=(ni=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ni,"Theme"),ni),D0=p(e=>{const t=new I0;return t.calculate(e),t},"getThemeVariables"),li,P0=(li=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,f,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||P(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||R(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(li,"Theme"),li),R0=p(e=>{const t=new P0;return t.calculate(e),t},"getThemeVariables"),hi,N0=(hi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(hi,"Theme"),hi),q0=p(e=>{const t=new N0;return t.calculate(e),t},"getThemeVariables"),ci,W0=(ci=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,f,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||P(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||R(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ci,"Theme"),ci),z0=p(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),ui,H0=(ui=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ui,"Theme"),ui),Y0=p(e=>{const t=new H0;return t.calculate(e),t},"getThemeVariables"),Xe={base:{getThemeVariables:S0},dark:{getThemeVariables:B0},default:{getThemeVariables:L0},forest:{getThemeVariables:A0},neutral:{getThemeVariables:M0},neo:{getThemeVariables:O0},"neo-dark":{getThemeVariables:D0},redux:{getThemeVariables:R0},"redux-dark":{getThemeVariables:q0},"redux-color":{getThemeVariables:z0},"redux-dark-color":{getThemeVariables:Y0}},Yt={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,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},Gc={...Yt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Xe.default.getThemeVariables(),sequence:{...Yt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Yt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yt.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:{...Yt.pie,useWidth:984},xyChart:{...Yt.xyChart,useWidth:void 0},requirement:{...Yt.requirement,useWidth:void 0},packet:{...Yt.packet},eventmodeling:{...Yt.eventmodeling},treeView:{...Yt.treeView,useWidth:void 0},radar:{...Yt.radar},railroad:{...Yt.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:{...Yt.ishikawa},sankey:{...Yt.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:{...Yt.venn},cynefin:{...Yt.cynefin}},jc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...jc(e[i],"")]:[...r,t+i],[]),"keyify"),U0=new Set(jc(Gc,"")),Xc=Gc,G0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},j0=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))&&(H.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Js=p(e=>{if(H.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Js(t));return}for(const t of Object.keys(e)){if(H.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!U0.has(t)||e[t]==null){H.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=G0[t];i?j0(e[t],i):(H.debug("sanitizing object",t),Js(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(H.debug("sanitizing css option",t),e[t]=Vc(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]="")}H.debug("After sanitization",e)}},"sanitizeDirective"),Vc=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"),mi=Object.freeze(Xc),qe=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ne=Rt({},mi),ta,Lr=[],Vi=Rt({},mi),Ea=p((e,t)=>{let r=Rt({},e),i={};for(const s of t)Qc(s),i=Rt(i,s);if(r=Rt(r,i),i.theme&&i.theme in Xe){const s=Rt({},ta),a=Rt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Xe&&(r.themeVariables=Xe[r.theme].getThemeVariables(a))}return Vi=r,tu(Vi),Vi},"updateCurrentConfig"),X0=p(e=>(ne=Rt({},mi),ne=Rt(ne,e),e.theme&&Xe[e.theme]&&(ne.themeVariables=Xe[e.theme].getThemeVariables(e.themeVariables)),Ea(ne,Lr),ne),"setSiteConfig"),V0=p(e=>{ta=Rt({},e)},"saveConfigFromInitialize"),Z0=p(e=>(ne=Rt(ne,e),Ea(ne,Lr),ne),"updateSiteConfig"),Zc=p(()=>Rt({},ne),"getSiteConfig"),Kc=p(e=>(tu(e),Rt(Vi,e),Et()),"setConfig"),Et=p(()=>Rt({},Vi),"getConfig"),Qc=p(e=>{e&&(["secure",...ne.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(H.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"&&Qc(e[t])}))},"sanitize"),K0=p(e=>{var t;Js(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Lr.push(e),Ea(ne,Lr)},"addDirective"),ea=p((e=ne)=>{Lr=[],Ea(e,Lr)},"reset"),Q0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Ch={},Jc=p(e=>{Ch[e]||(H.warn(Q0[e]),Ch[e]=!0)},"issueWarning"),tu=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Jc("LAZY_LOAD_DEPRECATED")},"checkConfig"),NL=p(()=>{let e={};ta&&(e=Rt(e,ta));for(const t of Lr)e=Rt(e,t);return e},"getUserDefinedConfig"),ae=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Jc("FLOWCHART_HTML_LABELS_DEPRECATED"),qe(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),eu=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Zi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,J0=/\s*%%.*\n/gm,di,ru=(di=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(di,"UnknownDiagramError"),di),Fr={},Dn=p(function(e,t){e=e.replace(eu,"").replace(Zi,"").replace(J0,`
5
- `);for(const[r,{detector:i}]of Object.entries(Fr))if(i(e,t))return r;throw new ru(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Po=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)iu(t,r,i)},"registerLazyLoadedDiagrams"),iu=p((e,t,r)=>{Fr[e]&&H.warn(`Detector with key ${e} already exists. Overwriting.`),Fr[e]={detector:t,loader:r},H.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),tC=p(e=>Fr[e].loader,"getDiagramLoader"),ds=/<br\s*\/?>/gi,eC=p(e=>e?ou(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),rC=(()=>{let e=!1;return()=>{e||(su(),e=!0)}})();function su(){const e="data-temp-href-target";gi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),gi.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(su,"setupDompurifyHooks");var au=p(e=>(rC(),gi.sanitize(e)),"removeScript"),xh=p((e,t)=>{if(ae(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=au(e):r!=="loose"&&(e=ou(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=oC(e))}return e},"sanitizeMore"),_e=p((e,t)=>e&&(t.dompurifyConfig?e=gi.sanitize(xh(e,t),t.dompurifyConfig).toString():e=gi.sanitize(xh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),iC=p((e,t)=>typeof e=="string"?_e(e,t):e.flat().map(r=>_e(r,t)),"sanitizeTextOrArray"),sC=p(e=>ds.test(e),"hasBreaks"),aC=p(e=>e.split(ds),"splitBreaks"),oC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ou=p(e=>e.replace(ds,"#br#"),"breakToPlaceholder"),nC=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"),lC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),hC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),bh=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 a=t[i-1],o=t[i+1];cC(a,o)&&(s=a+","+o,i++,r.pop())}r.push(uC(s))}return r.join("")},"parseGenericTypes"),Ro=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),cC=p((e,t)=>{const r=Ro(e,"~"),i=Ro(t,"~");return r===1&&i===1},"shouldCombineSets"),uC=p(e=>{const t=Ro(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),kh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),No=/\$\$(.*?)\$\$/g,ts=p(e=>{var t;return(((t=e.match(No))==null?void 0:t.length)??0)>0},"hasKatex"),qL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await nu(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),dC=p(async(e,t)=>{if(!ts(e))return e;if(!(kh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(No,"MathML is unsupported in this environment.");{const{default:r}=await mt(async()=>{const{default:s}=await import("./katex.C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!kh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ds).map(s=>ts(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(No,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),nu=p(async(e,t)=>_e(await dC(e,t),t),"renderKatexSanitized"),fs={getRows:eC,sanitizeText:_e,sanitizeTextOrArray:iC,hasBreaks:sC,splitBreaks:aC,lineBreakRegex:ds,removeScript:au,getUrl:nC,evaluate:qe,getMax:lC,getMin:hC},fC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),pC=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"),lu=p(function(e,t,r,i){const s=pC(t,r,i);fC(e,s)},"configureSvgSize"),gC=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;H.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;H.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,H.info(`Calculated bounds: ${n}x${l}`),lu(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"),Ws={};function qo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
- `)}p(qo,"cssStyleSheetToString");var mC=p((e,t,r,i)=>{let s="";return e in Ws&&Ws[e]?s=Ws[e]({...r,svgId:i}):H.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-VKFMJZFB.erCsZJb8.js","assets/chunks/chunk-RYQCIY6F.CZafA9pg.js","assets/chunks/graph.C2PyVmSI.js","assets/chunks/map.DwDi8XlU.js","assets/chunks/layout.BG3qr61M.js","assets/chunks/framework.D_Xv2a7c.js","assets/chunks/swimlanes-5IMT3BWC.dfhQuNQg.js","assets/chunks/cose-bilkent-JH36ORCC.Ddhn5b9l.js","assets/chunks/cytoscape.esm.CUqq0XTU.js","assets/chunks/c4Diagram-LMCZKHZV.WD7qpLTf.js","assets/chunks/chunk-32BRIVSS.CbP8heQ0.js","assets/chunks/flowDiagram-23GEKE2U.cnCU0na-.js","assets/chunks/chunk-5VM5RSS4.Dlc2iAaG.js","assets/chunks/chunk-XXDRQBXY.Dwra-T5p.js","assets/chunks/chunk-VR4S4FIN.DA1An2TL.js","assets/chunks/channel.nWTiHmYA.js","assets/chunks/swimlanesDiagram-G3AALYLV.CdD0ADbF.js","assets/chunks/erDiagram-Q63AITRT.BOAH1mBM.js","assets/chunks/gitGraphDiagram-IHSO6WYX.WUBTiDD1.js","assets/chunks/chunk-2Q5K7J3B.Bgt7N_Co.js","assets/chunks/chunk-JWPE2WC7.B52h3S9L.js","assets/chunks/cynefin-VYW2F7L2.DaXIfh7Y.js","assets/chunks/ganttDiagram-NO4QXBWP.CzSToCFq.js","assets/chunks/linear.zokB3L6J.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/defaultLocale.DX6XiGOO.js","assets/chunks/infoDiagram-FWYZ7A6U.Bz5y9qpB.js","assets/chunks/pieDiagram-ENE6RG2P.CDpZrox4.js","assets/chunks/arc.D6Q1WZEU.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-ABIIQ3AL.Bz0dhK1l.js","assets/chunks/xychartDiagram-FW5EYKEG.DDT1UX32.js","assets/chunks/requirementDiagram-TGXJPOKE.YLD-NuJw.js","assets/chunks/sequenceDiagram-DBY2YBRQ.D6E2oY7U.js","assets/chunks/classDiagram-OUVF2IWQ.RsrQkeM_.js","assets/chunks/chunk-V7JOEXUC.DMlMAq_a.js","assets/chunks/classDiagram-v2-EOCWNBFH.RsrQkeM_.js","assets/chunks/stateDiagram-2N3HPSRC.Cqc4HEHT.js","assets/chunks/chunk-EX3LRPZG.Cr0sQbRc.js","assets/chunks/stateDiagram-v2-6OUMAXLB.D8rYKDmp.js","assets/chunks/journeyDiagram-5HDEW3XC.BclISEWC.js","assets/chunks/timeline-definition-FHXFAJF6.SOgdni8I.js","assets/chunks/mindmap-definition-LN4V7U3C.DeNvpAwd.js","assets/chunks/kanban-definition-HUTT4EX6.CMwsG4gj.js","assets/chunks/sankeyDiagram-HTMAVEWB.R2uEIhmV.js","assets/chunks/diagram-NH7WQ7WH.BRv6nOgk.js","assets/chunks/diagram-WEI45ONY.CDZlR-fM.js","assets/chunks/blockDiagram-677ZJIJ3.C0el4zil.js","assets/chunks/diagram-OA4YK3LP.DBS8iZPq.js","assets/chunks/architectureDiagram-ZJ3FMSHR.vHAxAkhu.js","assets/chunks/diagram-FQU43EPY.B0zbjZsr.js","assets/chunks/ishikawaDiagram-FXEZZL3T.DX9mwIpB.js","assets/chunks/vennDiagram-L72KCM5P.BvlXlHJf.js","assets/chunks/diagram-G47NLZAW.B4S_wuz1.js","assets/chunks/wardleyDiagram-EHGQE667.t3t8sFvo.js","assets/chunks/cynefinDiagram-TSTJHNR4.BlUCFIAV.js","assets/chunks/railroadDiagram-RFXS5EU6.C2h0Mxo5.js","assets/chunks/chunk-MOJQB5TN.CphhXnWQ.js","assets/chunks/ebnfDiagram-CCIWWBDH.z_nUDDWm.js","assets/chunks/abnfDiagram-VRR7QNED.CO3oJlfv.js","assets/chunks/pegDiagram-2B236MQR.D5O5vyDS.js"])))=>i.map(i=>d[i]);
2
+ var My=Object.defineProperty;var $y=(e,t,r)=>t in e?My(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ft=(e,t,r)=>$y(e,typeof t!="symbol"?t+"":t,r);import{V as mt}from"./framework.D_Xv2a7c.js";var zc=Object.defineProperty,p=(e,t)=>zc(e,"name",{value:t,configurable:!0}),Oy=(e,t)=>{for(var r in t)zc(e,r,{get:t[r],enumerable:!0})},Iy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Iy,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var A=["th","st","nd","rd"],B=O%100;return"["+O+(A[(B-20)%10]||A[B]||A[0])+"]"}},k=function(O,A,B){var $=String(O);return!$||$.length>=A?O:""+Array(A+1-$.length).join(B)+O},w={s:k,z:function(O){var A=-O.utcOffset(),B=Math.abs(A),$=Math.floor(B/60),E=B%60;return(A<=0?"+":"-")+k($,2,"0")+":"+k(E,2,"0")},m:function O(A,B){if(A.date()<B.date())return-O(B,A);var $=12*(B.year()-A.year())+(B.month()-A.month()),E=A.clone().add($,u),q=B-E<0,Y=A.clone().add($+(q?-1:1),u);return+(-($+(B-E)/(q?E-Y:Y-E))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:u,y:d,w:h,d:c,D:g,h:l,m:n,s:o,ms:a,Q:f}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},S="en",_={};_[S]=b;var v="$isDayjsObject",F=function(O){return O instanceof U||!(!O||!O[v])},z=function O(A,B,$){var E;if(!A)return S;if(typeof A=="string"){var q=A.toLowerCase();_[q]&&(E=q),B&&(_[q]=B,E=q);var Y=A.split("-");if(!E&&Y.length>1)return O(Y[0])}else{var G=A.name;_[G]=A,E=G}return!$&&E&&(S=E),E||!$&&S},N=function(O,A){if(F(O))return O.clone();var B=typeof A=="object"?A:{};return B.date=O,B.args=arguments,new U(B)},M=w;M.l=z,M.i=F,M.w=function(O,A){return N(O,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var U=function(){function O(B){this.$L=z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[v]=!0}var A=O.prototype;return A.parse=function(B){this.$d=function($){var E=$.date,q=$.utc;if(E===null)return new Date(NaN);if(M.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(m);if(Y){var G=Y[2]-1||0,et=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)}}return new Date(E)}(B),this.init()},A.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()},A.$utils=function(){return M},A.isValid=function(){return this.$d.toString()!==y},A.isSame=function(B,$){var E=N(B);return this.startOf($)<=E&&E<=this.endOf($)},A.isAfter=function(B,$){return N(B)<this.startOf($)},A.isBefore=function(B,$){return this.endOf($)<N(B)},A.$g=function(B,$,E){return M.u(B)?this[$]:this.set(E,B)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(B,$){var E=this,q=!!M.u($)||$,Y=M.p(B),G=function(Lt,Z){var V=M.w(E.$u?Date.UTC(E.$y,Z,Lt):new Date(E.$y,Z,Lt),E);return q?V:V.endOf(c)},et=function(Lt,Z){return M.w(E.toDate()[Lt].apply(E.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Z)),E)},lt=this.$W,ot=this.$M,ct=this.$D,bt="set"+(this.$u?"UTC":"");switch(Y){case d:return q?G(1,0):G(31,11);case u:return q?G(1,ot):G(0,ot+1);case h:var Ct=this.$locale().weekStart||0,Bt=(lt<Ct?lt+7:lt)-Ct;return G(q?ct-Bt:ct+(6-Bt),ot);case c:case g:return et(bt+"Hours",0);case l:return et(bt+"Minutes",1);case n:return et(bt+"Seconds",2);case o:return et(bt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(B){return this.startOf(B,!1)},A.$set=function(B,$){var E,q=M.p(B),Y="set"+(this.$u?"UTC":""),G=(E={},E[c]=Y+"Date",E[g]=Y+"Date",E[u]=Y+"Month",E[d]=Y+"FullYear",E[l]=Y+"Hours",E[n]=Y+"Minutes",E[o]=Y+"Seconds",E[a]=Y+"Milliseconds",E)[q],et=q===c?this.$D+($-this.$W):$;if(q===u||q===d){var lt=this.clone().set(g,1);lt.$d[G](et),lt.init(),this.$d=lt.set(g,Math.min(this.$D,lt.daysInMonth())).$d}else G&&this.$d[G](et);return this.init(),this},A.set=function(B,$){return this.clone().$set(B,$)},A.get=function(B){return this[M.p(B)]()},A.add=function(B,$){var E,q=this;B=Number(B);var Y=M.p($),G=function(ot){var ct=N(q);return M.w(ct.date(ct.date()+Math.round(ot*B)),q)};if(Y===u)return this.set(u,this.$M+B);if(Y===d)return this.set(d,this.$y+B);if(Y===c)return G(1);if(Y===h)return G(7);var et=(E={},E[n]=i,E[l]=s,E[o]=r,E)[Y]||1,lt=this.$d.getTime()+B*et;return M.w(lt,this)},A.subtract=function(B,$){return this.add(-1*B,$)},A.format=function(B){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||y;var q=B||"YYYY-MM-DDTHH:mm:ssZ",Y=M.z(this),G=this.$H,et=this.$m,lt=this.$M,ot=E.weekdays,ct=E.months,bt=E.meridiem,Ct=function(Z,V,gt,nt){return Z&&(Z[V]||Z($,q))||gt[V].slice(0,nt)},Bt=function(Z){return M.s(G%12||12,Z,"0")},Lt=bt||function(Z,V,gt){var nt=Z<12?"AM":"PM";return gt?nt.toLowerCase():nt};return q.replace(C,function(Z,V){return V||function(gt){switch(gt){case"YY":return String($.$y).slice(-2);case"YYYY":return M.s($.$y,4,"0");case"M":return lt+1;case"MM":return M.s(lt+1,2,"0");case"MMM":return Ct(E.monthsShort,lt,ct,3);case"MMMM":return Ct(ct,lt);case"D":return $.$D;case"DD":return M.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Ct(E.weekdaysMin,$.$W,ot,2);case"ddd":return Ct(E.weekdaysShort,$.$W,ot,3);case"dddd":return ot[$.$W];case"H":return String(G);case"HH":return M.s(G,2,"0");case"h":return Bt(1);case"hh":return Bt(2);case"a":return Lt(G,et,!0);case"A":return Lt(G,et,!1);case"m":return String(et);case"mm":return M.s(et,2,"0");case"s":return String($.$s);case"ss":return M.s($.$s,2,"0");case"SSS":return M.s($.$ms,3,"0");case"Z":return Y}return null}(Z)||Y.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(B,$,E){var q,Y=this,G=M.p($),et=N(B),lt=(et.utcOffset()-this.utcOffset())*i,ot=this-et,ct=function(){return M.m(Y,et)};switch(G){case d:q=ct()/12;break;case u:q=ct();break;case f:q=ct()/3;break;case h:q=(ot-lt)/6048e5;break;case c:q=(ot-lt)/864e5;break;case l:q=ot/s;break;case n:q=ot/i;break;case o:q=ot/r;break;default:q=ot}return E?q:M.a(q)},A.daysInMonth=function(){return this.endOf(u).$D},A.$locale=function(){return _[this.$L]},A.locale=function(B,$){if(!B)return this.$L;var E=this.clone(),q=z(B,$,!0);return q&&(E.$L=q),E},A.clone=function(){return M.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},O}(),W=U.prototype;return N.prototype=W,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach(function(O){W[O[1]]=function(A){return this.$g(A,O[0],O[1])}}),N.extend=function(O,A){return O.$i||(O(A,U,N),O.$i=!0),N},N.locale=z,N.isDayjs=F,N.unix=function(O){return N(1e3*O)},N.en=_[S],N.Ls=_,N.p={},N})})(Hc);var Ry=Hc.exports;const Py=Dy(Ry);var Ye={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Rn=p(function(e="fatal"){let t=Ye.fatal;typeof e=="string"?e.toLowerCase()in Ye&&(t=Ye[e]):typeof e=="number"&&(t=e),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},t<=Ye.fatal&&(H.fatal=console.error?console.error.bind(console,ge("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ge("FATAL"))),t<=Ye.error&&(H.error=console.error?console.error.bind(console,ge("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ge("ERROR"))),t<=Ye.warn&&(H.warn=console.warn?console.warn.bind(console,ge("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ge("WARN"))),t<=Ye.info&&(H.info=console.info?console.info.bind(console,ge("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ge("INFO"))),t<=Ye.debug&&(H.debug=console.debug?console.debug.bind(console,ge("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("DEBUG"))),t<=Ye.trace&&(H.trace=console.debug?console.debug.bind(console,ge("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("TRACE")))},"setLogLevel"),ge=p(e=>`%c${Py().format("ss.SSS")} : ${e} : `,"format");const zs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return zs.hue2rgb(a,s,e+1/3)*255;case"g":return zs.hue2rgb(a,s,e)*255;case"b":return zs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Ny={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},qy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},pt={channel:zs,lang:Ny,unit:qy},sr={};for(let e=0;e<=255;e++)sr[e]=pt.unit.dec2hex(e);const Zt={ALL:0,RGB:1,HSL:2};class Wy{constructor(){this.type=Zt.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=Zt.ALL}is(t){return this.type===t}}class zy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Wy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=pt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=pt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=pt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=pt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=pt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=pt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ma=new zy({r:0,g:0,b:0,a:0},"transparent"),ei={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ei.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ma.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${sr[Math.round(t)]}${sr[Math.round(r)]}${sr[Math.round(i)]}${sr[Math.round(s*255)]}`:`#${sr[Math.round(t)]}${sr[Math.round(r)]}${sr[Math.round(i)]}`}},Sr={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(Sr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return pt.channel.clamp.h(parseFloat(r)*.9);case"rad":return pt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return pt.channel.clamp.h(parseFloat(r)*360)}}return pt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Sr.re);if(!r)return;const[,i,s,a,o,n]=r;return Ma.set({h:Sr._hue2deg(i),s:pt.channel.clamp.s(parseFloat(s)),l:pt.channel.clamp.l(parseFloat(a)),a:o?pt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%, ${s})`:`hsl(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%)`}},Qi={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=Qi.colors[e];if(t)return ei.parse(t)},stringify:e=>{const t=ei.stringify(e);for(const r in Qi.colors)if(Qi.colors[r]===t)return r}},zi={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(zi.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return Ma.set({r:pt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:pt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:pt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?pt.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(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)}, ${pt.lang.round(s)})`:`rgb(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)})`}},De={format:{keyword:Qi,hex:ei,rgb:zi,rgba:zi,hsl:Sr,hsla:Sr},parse:e=>{if(typeof e!="string")return e;const t=ei.parse(e)||zi.parse(e)||Sr.parse(e)||Qi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Zt.HSL)||e.data.r===void 0?Sr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?zi.stringify(e):ei.stringify(e)},Yc=(e,t)=>{const r=De.parse(e);for(const i in t)r[i]=pt.channel.clamp[i](t[i]);return De.stringify(r)},hr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Yc(e,{a:t});const s=Ma.set({r:pt.channel.clamp.r(e),g:pt.channel.clamp.g(t),b:pt.channel.clamp.b(r),a:pt.channel.clamp.a(i)});return De.stringify(s)},Hy=e=>{const{r:t,g:r,b:i}=De.parse(e),s=.2126*pt.channel.toLinear(t)+.7152*pt.channel.toLinear(r)+.0722*pt.channel.toLinear(i);return pt.lang.round(s)},Yy=e=>Hy(e)>=.5,Be=e=>!Yy(e),Uc=(e,t,r)=>{const i=De.parse(e),s=i[t],a=pt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),De.stringify(i)},R=(e,t)=>Uc(e,"l",t),P=(e,t)=>Uc(e,"l",-t),x=(e,t)=>{const r=De.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Yc(e,i)},Uy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=De.parse(e),{r:n,g:l,b:c,a:h}=De.parse(t),u=r/100,f=u*2-1,d=o-h,y=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-y,C=i*y+n*m,b=s*y+l*m,k=a*y+c*m,w=o*u+h*(1-u);return hr(C,b,k,w)},L=(e,t=100)=>{const r=De.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Uy(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function oh(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 Gy(e){if(Array.isArray(e))return e}function jy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return n}}function Xy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vy(e,t){return Gy(e)||jy(e,t)||Zy(e,t)||Xy()}function Zy(e,t){if(e){if(typeof e=="string")return oh(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)?oh(e,t):void 0}}const Gc=Object.entries,nh=Object.setPrototypeOf,Qy=Object.isFrozen,Ky=Object.getPrototypeOf,Jy=Object.getOwnPropertyDescriptor;let Xt=Object.freeze,Vt=Object.seal,Vr=Object.create,jc=typeof Reflect<"u"&&Reflect,Do=jc.apply,Ro=jc.construct;Xt||(Xt=function(t){return t});Vt||(Vt=function(t){return t});Do||(Do=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Ro||(Ro=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 $i=Rt(Array.prototype.forEach),t0=Rt(Array.prototype.lastIndexOf),lh=Rt(Array.prototype.pop),Yr=Rt(Array.prototype.push),e0=Rt(Array.prototype.splice),or=Array.isArray,Hi=Rt(String.prototype.toLowerCase),mo=Rt(String.prototype.toString),hh=Rt(String.prototype.match),Oi=Rt(String.prototype.replace),ch=Rt(String.prototype.indexOf),r0=Rt(String.prototype.trim),i0=Rt(Number.prototype.toString),s0=Rt(Boolean.prototype.toString),uh=typeof BigInt>"u"?null:Rt(BigInt.prototype.toString),dh=typeof Symbol>"u"?null:Rt(Symbol.prototype.toString),Wt=Rt(Object.prototype.hasOwnProperty),Ii=Rt(Object.prototype.toString),Ut=Rt(RegExp.prototype.test),Cr=a0(TypeError);function Rt(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 Do(e,t,i)}}function a0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ro(e,r)}}function Tt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hi;if(nh&&nh(e,null),!or(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(Qy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function o0(e){for(let t=0;t<e.length;t++)Wt(e,t)||(e[t]=null);return e}function ie(e){const t=Vr(null);for(const i of Gc(e)){var r=Vy(i,2);const s=r[0],a=r[1];Wt(e,s)&&(or(a)?t[s]=o0(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=ie(a):t[s]=a)}return t}function n0(e){switch(typeof e){case"string":return e;case"number":return i0(e);case"boolean":return s0(e);case"bigint":return uh?uh(e):"0";case"symbol":return dh?dh(e):"Symbol()";case"undefined":return Ii(e);case"function":case"object":{if(e===null)return Ii(e);const t=e,r=Ee(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Ii(i)}return Ii(e)}default:return Ii(e)}}function Ee(e,t){for(;e!==null;){const i=Jy(e,t);if(i){if(i.get)return Rt(i.get);if(typeof i.value=="function")return Rt(i.value)}e=Ky(e)}function r(){return null}return r}function l0(e){try{return Ut(e,""),!0}catch{return!1}}const fh=Xt(["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"]),yo=Xt(["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"]),Co=Xt(["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"]),h0=Xt(["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"]),xo=Xt(["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"]),c0=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ph=Xt(["#text"]),gh=Xt(["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"]),bo=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mh=Xt(["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"]),As=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),u0=Vt(/{{[\w\W]*|^[\w\W]*}}/g),d0=Vt(/<%[\w\W]*|^[\w\W]*%>/g),f0=Vt(/\${[\w\W]*/g),p0=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),g0=Vt(/^aria-[\-\w]+$/),yh=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),m0=Vt(/^(?:\w+script|data):/i),y0=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),C0=Vt(/^html$/i),x0=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),Ch=Vt(/<[/\w!]/g),b0=Vt(/<[/\w]/g),k0=Vt(/<\/no(script|embed|frames)/i),T0=Vt(/\/>/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},w0=function(){return typeof window>"u"?null:window},S0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},xh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rr=function(t,r,i,s){return Wt(t,r)&&or(t[r])?Tt(s.base?ie(s.base):{},t[r],s.transform):i};function Xc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w0();const t=X=>Xc(X);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Ae.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,f=n.prototype,d=Ee(f,"cloneNode"),g=Ee(f,"remove"),y=Ee(f,"nextSibling"),m=Ee(f,"childNodes"),C=Ee(f,"parentNode"),b=Ee(f,"shadowRoot"),k=Ee(f,"attributes"),w=o&&o.prototype?Ee(o.prototype,"nodeType"):null,S=o&&o.prototype?Ee(o.prototype,"nodeName"):null;if(typeof a=="function"){const X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let _,v="",F,z=!1,N=0;const M=function(){if(N>0)throw Cr('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.')},U=function(T){M(),N++;try{return _.createHTML(T)}finally{N--}},W=function(T){M(),N++;try{return _.createScriptURL(T)}finally{N--}},O=function(){return z||(F=S0(u,s),z=!0),F},A=r,B=A.implementation,$=A.createNodeIterator,E=A.createDocumentFragment,q=A.getElementsByTagName,Y=i.importNode;let G=xh();t.isSupported=typeof Gc=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;const et=u0,lt=d0,ot=f0,ct=p0,bt=g0,Ct=m0,Bt=y0,Lt=x0;let Z=yh,V=null;const gt=Tt({},[...fh,...yo,...Co,...xo,...ph]);let nt=null;const D=Tt({},[...gh,...bo,...mh,...As]);let Q=Object.seal(Vr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,Qa=null;const fe=Object.seal(Vr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Nl=!0,Ka=!0,ql=!1,Wl=!0,tr=!1,Ai=!0,mr=!1,Ja=!1,to=null,eo=null,ro=!1,Nr=!1,ws=!1,Ss=!1,zl=!0,Hl=!1;const Yl="user-content-";let io=!0,so=!1,qr={},Le=null;const ao=Tt({},["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 Ul=null;const Gl=Tt({},["audio","video","img","source","image","track"]);let oo=null;const jl=Tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_s="http://www.w3.org/1998/Math/MathML",Bs="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let Wr=Fe,no=!1,lo=null;const my=Tt({},[_s,Bs,Fe],mo),Xl=Xt(["mi","mo","mn","ms","mtext"]);let ho=Tt({},Xl);const Vl=Xt(["annotation-xml"]);let co=Tt({},Vl);const yy=Tt({},["title","style","font","a","script"]);let Ei=null;const Cy=["application/xhtml+xml","text/html"],xy="text/html";let Mt=null,zr=null;const by=r.createElement("form"),Zl=function(T){return T instanceof RegExp||T instanceof Function},uo=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(zr&&zr===T)return;(!T||typeof T!="object")&&(T={}),T=ie(T),Ei=Cy.indexOf(T.PARSER_MEDIA_TYPE)===-1?xy:T.PARSER_MEDIA_TYPE,Mt=Ei==="application/xhtml+xml"?mo:Hi,V=rr(T,"ALLOWED_TAGS",gt,{transform:Mt}),nt=rr(T,"ALLOWED_ATTR",D,{transform:Mt}),lo=rr(T,"ALLOWED_NAMESPACES",my,{transform:mo}),oo=rr(T,"ADD_URI_SAFE_ATTR",jl,{transform:Mt,base:jl}),Ul=rr(T,"ADD_DATA_URI_TAGS",Gl,{transform:Mt,base:Gl}),Le=rr(T,"FORBID_CONTENTS",ao,{transform:Mt}),Je=rr(T,"FORBID_TAGS",ie({}),{transform:Mt}),Qa=rr(T,"FORBID_ATTR",ie({}),{transform:Mt}),qr=Wt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?ie(T.USE_PROFILES):T.USE_PROFILES:!1,Nl=T.ALLOW_ARIA_ATTR!==!1,Ka=T.ALLOW_DATA_ATTR!==!1,ql=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Wl=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tr=T.SAFE_FOR_TEMPLATES||!1,Ai=T.SAFE_FOR_XML!==!1,mr=T.WHOLE_DOCUMENT||!1,Nr=T.RETURN_DOM||!1,ws=T.RETURN_DOM_FRAGMENT||!1,Ss=T.RETURN_TRUSTED_TYPE||!1,ro=T.FORCE_BODY||!1,zl=T.SANITIZE_DOM!==!1,Hl=T.SANITIZE_NAMED_PROPS||!1,io=T.KEEP_CONTENT!==!1,so=T.IN_PLACE||!1,Z=l0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:yh,Wr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Fe,ho=Wt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?ie(T.MATHML_TEXT_INTEGRATION_POINTS):Tt({},Xl),co=Wt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?ie(T.HTML_INTEGRATION_POINTS):Tt({},Vl);const I=Wt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?ie(T.CUSTOM_ELEMENT_HANDLING):Vr(null);if(Q=Vr(null),Wt(I,"tagNameCheck")&&Zl(I.tagNameCheck)&&(Q.tagNameCheck=I.tagNameCheck),Wt(I,"attributeNameCheck")&&Zl(I.attributeNameCheck)&&(Q.attributeNameCheck=I.attributeNameCheck),Wt(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),Vt(Q),tr&&(Ka=!1),ws&&(Nr=!0),qr&&(V=Tt({},ph),nt=Vr(null),qr.html===!0&&(Tt(V,fh),Tt(nt,gh)),qr.svg===!0&&(Tt(V,yo),Tt(nt,bo),Tt(nt,As)),qr.svgFilters===!0&&(Tt(V,Co),Tt(nt,bo),Tt(nt,As)),qr.mathMl===!0&&(Tt(V,xo),Tt(nt,mh),Tt(nt,As))),fe.tagCheck=null,fe.attributeCheck=null,Wt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?fe.tagCheck=T.ADD_TAGS:or(T.ADD_TAGS)&&(V===gt&&(V=ie(V)),Tt(V,T.ADD_TAGS,Mt))),Wt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?fe.attributeCheck=T.ADD_ATTR:or(T.ADD_ATTR)&&(nt===D&&(nt=ie(nt)),Tt(nt,T.ADD_ATTR,Mt))),Wt(T,"ADD_URI_SAFE_ATTR")&&or(T.ADD_URI_SAFE_ATTR)&&Tt(oo,T.ADD_URI_SAFE_ATTR,Mt),Wt(T,"FORBID_CONTENTS")&&or(T.FORBID_CONTENTS)&&(Le===ao&&(Le=ie(Le)),Tt(Le,T.FORBID_CONTENTS,Mt)),Wt(T,"ADD_FORBID_CONTENTS")&&or(T.ADD_FORBID_CONTENTS)&&(Le===ao&&(Le=ie(Le)),Tt(Le,T.ADD_FORBID_CONTENTS,Mt)),io&&(V["#text"]=!0),mr&&Tt(V,["html","head","body"]),V.table&&(Tt(V,["tbody"]),delete Je.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Cr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Cr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const j=_;_=T.TRUSTED_TYPES_POLICY;try{v=U("")}catch(st){throw _=j,st}}else T.TRUSTED_TYPES_POLICY===null?(_=void 0,v=""):(_===void 0&&(_=O()),_&&typeof v=="string"&&(v=U("")));Xt&&Xt(T),zr=T},Ql=Tt({},[...yo,...Co,...h0]),Kl=Tt({},[...xo,...c0]),ky=function(T,I,j){return I.namespaceURI===Fe?T==="svg":I.namespaceURI===_s?T==="svg"&&(j==="annotation-xml"||ho[j]):!!Ql[T]},Ty=function(T,I,j){return I.namespaceURI===Fe?T==="math":I.namespaceURI===Bs?T==="math"&&co[j]:!!Kl[T]},wy=function(T,I,j){return I.namespaceURI===Bs&&!co[j]||I.namespaceURI===_s&&!ho[j]?!1:!Kl[T]&&(yy[T]||!Ql[T])},Sy=function(T){let I=C(T);(!I||!I.tagName)&&(I={namespaceURI:Wr,tagName:"template"});const j=Hi(T.tagName),st=Hi(I.tagName);return lo[T.namespaceURI]?T.namespaceURI===Bs?ky(j,I,st):T.namespaceURI===_s?Ty(j,I,st):T.namespaceURI===Fe?wy(j,I,st):!!(Ei==="application/xhtml+xml"&&lo[T.namespaceURI]):!1},er=function(T){Yr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(g(T),!C(T))throw Cr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Jl=function(T){const I=m(T);if(I){const st=[];$i(I,xt=>{Yr(st,xt)}),$i(st,xt=>{try{g(xt)}catch{}})}const j=k(T);if(j)for(let st=j.length-1;st>=0;--st){const xt=j[st],St=xt&&xt.name;if(typeof St=="string")try{T.removeAttribute(St)}catch{}}},yr=function(T,I){try{Yr(t.removed,{attribute:I.getAttributeNode(T),from:I})}catch{Yr(t.removed,{attribute:null,from:I})}if(I.removeAttribute(T),T==="is")if(Nr||ws)try{er(I)}catch{}else try{I.setAttribute(T,"")}catch{}},_y=function(T){const I=k(T);if(I)for(let j=I.length-1;j>=0;--j){const st=I[j],xt=st&&st.name;if(!(typeof xt!="string"||nt[Mt(xt)]))try{T.removeAttribute(xt)}catch{}}},By=function(T){const I=[T];for(;I.length>0;){const j=I.pop();(w?w(j):j.nodeType)===Ae.element&&_y(j);const xt=m(j);if(xt)for(let St=xt.length-1;St>=0;--St)I.push(xt[St])}},th=function(T){let I=null,j=null;if(ro)T="<remove></remove>"+T;else{const St=hh(T,/^[\r\n\t ]+/);j=St&&St[0]}Ei==="application/xhtml+xml"&&Wr===Fe&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const st=_?U(T):T;if(Wr===Fe)try{I=new h().parseFromString(st,Ei)}catch{}if(!I||!I.documentElement){I=B.createDocument(Wr,"template",null);try{I.documentElement.innerHTML=no?v:st}catch{}}const xt=I.body||I.documentElement;return T&&j&&xt.insertBefore(r.createTextNode(j),xt.childNodes[0]||null),Wr===Fe?q.call(I,mr?"html":"body")[0]:mr?I.documentElement:xt},eh=function(T){return $.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},vs=function(T){return T=Oi(T,et," "),T=Oi(T,lt," "),T=Oi(T,ot," "),T},fo=function(T){var I;T.normalize();const j=$.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let st=j.nextNode();for(;st;)st.data=vs(st.data),st=j.nextNode();const xt=(I=T.querySelectorAll)===null||I===void 0?void 0:I.call(T,"template");xt&&$i(xt,St=>{Hr(St.content)&&fo(St.content)})},Ls=function(T){const I=S?S(T):null;return typeof I!="string"||Mt(I)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==m(T)},Hr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Ae.documentFragment}catch{return!1}},Mi=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function He(X,T,I){X.length!==0&&$i(X,j=>{j.call(t,T,I,zr)})}const vy=function(T,I){return!!(Ai&&T.hasChildNodes()&&!Mi(T.firstElementChild)&&Ut(Ch,T.textContent)&&Ut(Ch,T.innerHTML)||Ai&&T.namespaceURI===Fe&&I==="style"&&Mi(T.firstElementChild)||T.nodeType===Ae.processingInstruction||Ai&&T.nodeType===Ae.comment&&Ut(b0,T.data))},Ly=function(T,I){if(!Je[I]&&sh(I)&&(Q.tagNameCheck instanceof RegExp&&Ut(Q.tagNameCheck,I)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(I)))return!1;if(io&&!Le[I]){const j=C(T),st=m(T);if(st&&j){const xt=st.length;for(let St=xt-1;St>=0;--St){const qt=so?st[St]:d(st[St],!0);j.insertBefore(qt,y(T))}}}return er(T),!0},rh=function(T){if(He(G.beforeSanitizeElements,T,null),Ls(T))return er(T),!0;const I=Mt(S?S(T):T.nodeName);if(He(G.uponSanitizeElement,T,{tagName:I,allowedTags:V}),vy(T,I))return er(T),!0;if(Je[I]||!(fe.tagCheck instanceof Function&&fe.tagCheck(I))&&!V[I])return Ly(T,I);if((w?w(T):T.nodeType)===Ae.element&&!Sy(T)||(I==="noscript"||I==="noembed"||I==="noframes")&&Ut(k0,T.innerHTML))return er(T),!0;if(tr&&T.nodeType===Ae.text){const st=vs(T.textContent);T.textContent!==st&&(Yr(t.removed,{element:T.cloneNode()}),T.textContent=st)}return He(G.afterSanitizeElements,T,null),!1},ih=function(T,I,j){if(Qa[I]||zl&&(I==="id"||I==="name")&&(j in r||j in by))return!1;const st=nt[I]||fe.attributeCheck instanceof Function&&fe.attributeCheck(I,T);if(!(Ka&&Ut(ct,I))){if(!(Nl&&Ut(bt,I))){if(st){if(!oo[I]){if(!Ut(Z,Oi(j,Bt,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&T!=="script"&&ch(j,"data:")===0&&Ul[T])){if(!(ql&&!Ut(Ct,Oi(j,Bt,"")))){if(j)return!1}}}}}else if(!(sh(T)&&(Q.tagNameCheck instanceof RegExp&&Ut(Q.tagNameCheck,T)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(T))&&(Q.attributeNameCheck instanceof RegExp&&Ut(Q.attributeNameCheck,I)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(I,T))||I==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Ut(Q.tagNameCheck,j)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(j))))return!1}}return!0},Fy=Tt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),sh=function(T){return!Fy[Hi(T)]&&Ut(Lt,T)},Ay=function(T,I,j,st){if(_&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!j)switch(u.getAttributeType(T,I)){case"TrustedHTML":return U(st);case"TrustedScriptURL":return W(st)}return st},Ey=function(T,I,j,st){try{j?T.setAttributeNS(j,I,st):T.setAttribute(I,st),Ls(T)?er(T):lh(t.removed)}catch{yr(I,T)}},ah=function(T){He(G.beforeSanitizeAttributes,T,null);const I=T.attributes;if(!I||Ls(T))return;const j={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let st=I.length;const xt=Mt(T.nodeName);for(;st--;){const St=I[st],qt=St.name,It=St.namespaceURI,pe=St.value,ye=Mt(qt),go=pe;let re=qt==="value"?go:r0(go);if(j.attrName=ye,j.attrValue=re,j.keepAttr=!0,j.forceKeepAttr=void 0,He(G.uponSanitizeAttribute,T,j),re=j.attrValue,Hl&&(ye==="id"||ye==="name")&&ch(re,Yl)!==0&&(yr(qt,T),re=Yl+re),Ai&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,re)){yr(qt,T);continue}if(ye==="attributename"&&hh(re,"href")){yr(qt,T);continue}if(!j.forceKeepAttr){if(!j.keepAttr){yr(qt,T);continue}if(!Wl&&Ut(T0,re)){yr(qt,T);continue}if(tr&&(re=vs(re)),!ih(xt,ye,re)){yr(qt,T);continue}re=Ay(xt,ye,It,re),re!==go&&Ey(T,qt,It,re)}}He(G.afterSanitizeAttributes,T,null)},Fs=function(T){let I=null;const j=eh(T);for(He(G.beforeSanitizeShadowDOM,T,null);I=j.nextNode();)if(He(G.uponSanitizeShadowNode,I,null),rh(I),ah(I),Hr(I.content)&&Fs(I.content),(w?w(I):I.nodeType)===Ae.element){const xt=b(I);Hr(xt)&&(po(xt),Fs(xt))}He(G.afterSanitizeShadowDOM,T,null)},po=function(T){const I=[{node:T,shadow:null}];for(;I.length>0;){const j=I.pop();if(j.shadow){Fs(j.shadow);continue}const st=j.node,St=(w?w(st):st.nodeType)===Ae.element,qt=m(st);if(qt)for(let It=qt.length-1;It>=0;--It)I.push({node:qt[It],shadow:null});if(St){const It=S?S(st):null;if(typeof It=="string"&&Mt(It)==="template"){const pe=st.content;Hr(pe)&&I.push({node:pe,shadow:null})}}if(St){const It=b(st);Hr(It)&&I.push({node:null,shadow:It},{node:It,shadow:null})}}};return t.sanitize=function(X){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,j=null,st=null,xt=null;if(no=!X,no&&(X="<!-->"),typeof X!="string"&&!Mi(X)&&(X=n0(X),typeof X!="string"))throw Cr("dirty is not a string, aborting");if(!t.isSupported)return X;Ja?(V=to,nt=eo):uo(T),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(V=ie(V)),G.uponSanitizeAttribute.length>0&&(nt=ie(nt)),t.removed=[];const St=so&&typeof X!="string"&&Mi(X);if(St){const pe=S?S(X):X.nodeName;if(typeof pe=="string"){const ye=Mt(pe);if(!V[ye]||Je[ye])throw Cr("root node is forbidden and cannot be sanitized in-place")}if(Ls(X))throw Cr("root node is clobbered and cannot be sanitized in-place");try{po(X)}catch(ye){throw Jl(X),ye}}else if(Mi(X))I=th("<!---->"),j=I.ownerDocument.importNode(X,!0),j.nodeType===Ae.element&&j.nodeName==="BODY"||j.nodeName==="HTML"?I=j:I.appendChild(j),po(j);else{if(!Nr&&!tr&&!mr&&X.indexOf("<")===-1)return _&&Ss?U(X):X;if(I=th(X),!I)return Nr?null:Ss?v:""}I&&ro&&er(I.firstChild);const qt=eh(St?X:I);try{for(;st=qt.nextNode();)rh(st),ah(st),Hr(st.content)&&Fs(st.content)}catch(pe){throw St&&Jl(X),pe}if(St)return $i(t.removed,pe=>{pe.element&&By(pe.element)}),tr&&fo(X),X;if(Nr){if(tr&&fo(I),ws)for(xt=E.call(I.ownerDocument);I.firstChild;)xt.appendChild(I.firstChild);else xt=I;return(nt.shadowroot||nt.shadowrootmode)&&(xt=Y.call(i,xt,!0)),xt}let It=mr?I.outerHTML:I.innerHTML;return mr&&V["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ut(C0,I.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
4
+ `+It),tr&&(It=vs(It)),_&&Ss?U(It):It},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uo(X),Ja=!0,to=V,eo=nt},t.clearConfig=function(){zr=null,Ja=!1,to=null,eo=null,_=F,v=""},t.isValidAttribute=function(X,T,I){zr||uo({});const j=Mt(X),st=Mt(T);return ih(j,st,I)},t.addHook=function(X,T){typeof T=="function"&&Wt(G,X)&&Yr(G[X],T)},t.removeHook=function(X,T){if(Wt(G,X)){if(T!==void 0){const I=t0(G[X],T);return I===-1?void 0:e0(G[X],I,1)[0]}return lh(G[X])}},t.removeHooks=function(X){Wt(G,X)&&(G[X]=[])},t.removeAllHooks=function(){G=xh()},t}var Ci=Xc(),Po=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Po(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Po(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Pt=Po,Pe="#ffffff",Ne="#f2f2f2",ft=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),si,_0=(si=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f,d,g,y,m,C,b,k,w,S,_,v,F,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=P(this["cScale"+Q],75);else for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=P(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||L(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this.darkMode?this["cScalePeer"+Q]=this["cScalePeer"+Q]||R(this["cScale"+Q],10):this["cScalePeer"+Q]=this["cScalePeer"+Q]||P(this["cScale"+Q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+Q*3)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+Q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.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:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((B=this.wardley)==null?void 0:B.componentStroke)||this.lineColor,componentLabelColor:(($=this.wardley)==null?void 0:$.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((q=this.wardley)==null?void 0:q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((G=this.wardley)==null?void 0:G.annotationTextColor)||this.primaryTextColor,annotationFill:((et=this.wardley)==null?void 0:et.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(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:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((ot=this.xyChart)==null?void 0:ot.titleColor)||this.primaryTextColor,dataLabelColor:((ct=this.xyChart)==null?void 0:ct.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((bt=this.xyChart)==null?void 0:bt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Z=this.xyChart)==null?void 0:Z.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((V=this.xyChart)==null?void 0:V.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((gt=this.xyChart)==null?void 0:gt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((nt=this.xyChart)==null?void 0:nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(si,"Theme"),si),B0=p(e=>{const t=new _0;return t.calculate(e),t},"getThemeVariables"),ai,v0=(ai=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=hr(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=P("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=P(this.sectionBkgColor,10),this.taskBorderColor=hr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=hr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,g,y,m,C,b,k,w,S,_,v,F,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.secondBkg=R(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=R(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=R(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=L(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??R(this["cScale"+D],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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(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:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((F=this.xyChart)==null?void 0:F.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((ct=this.wardley)==null?void 0:ct.gridColor)||this.gridColor,componentFill:((bt=this.wardley)==null?void 0:bt.componentFill)||this.mainBkg,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((gt=this.wardley)==null?void 0:gt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.secondaryColor,20),this.git1=R(this.pie2||this.secondaryColor,20),this.git2=R(this.pie3||this.tertiaryColor,20),this.git3=R(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=R(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=R(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=R(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=R(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||R("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||R("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||R("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||R("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||R(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||R(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||R(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ai,"Theme"),ai),L0=p(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),oi,F0=(oi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ft(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=hr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,g,y,m,C,b,k,w,S,_,v,F,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||P(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||P(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=P(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||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||R(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||R(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(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:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((gt=this.xyChart)==null?void 0:gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||P(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(oi,"Theme"),oi),A0=p(e=>{const t=new F0;return t.calculate(e),t},"getThemeVariables"),ni,E0=(ni=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=R("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,g,y,m,C,b,k,w,S,_,v,F,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.actorBorder=P(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||P(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||P(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=P(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(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:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((gt=this.xyChart)==null?void 0:gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ni,"Theme"),ni),M0=p(e=>{const t=new E0;return t.calculate(e),t},"getThemeVariables"),li,$0=(li=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,f,d,g,y,m,C,b,k,w,S,_,v,F,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,ot,ct,bt,Ct,Bt,Lt,Z,V,gt,nt;this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.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 D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=R(this.contrast,30),this.sectionBkgColor2=R(this.contrast,30),this.taskBorderColor=P(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=R(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=P(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(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:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((F=this.xyChart)==null?void 0:F.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((ct=this.wardley)==null?void 0:ct.gridColor)||this.gridColor,componentFill:((bt=this.wardley)==null?void 0:bt.componentFill)||this.background,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((gt=this.wardley)==null?void 0:gt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.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=P(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(li,"Theme"),li),O0=p(e=>{const t=new $0;return t.calculate(e),t},"getThemeVariables"),hi,I0=(hi=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=ft(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,f,d,g,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=P(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=P(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||P(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(hi,"Theme"),hi),D0=p(e=>{const t=new I0;return t.calculate(e),t},"getThemeVariables"),ci,R0=(ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(L("#323D47"),10),this.border1="#ccc",this.border2=hr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=P(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=P(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ci,"Theme"),ci),P0=p(e=>{const t=new R0;return t.calculate(e),t},"getThemeVariables"),ui,N0=(ui=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=ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,f,d,g,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=P(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=P(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||P(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ui,"Theme"),ui),q0=p(e=>{const t=new N0;return t.calculate(e),t},"getThemeVariables"),di,W0=(di=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(L("#323D47"),10),this.border1="#ccc",this.border2=hr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=P(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=P(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(di,"Theme"),di),z0=p(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),fi,H0=(fi=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=ft(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,f,d,g,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||P(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(fi,"Theme"),fi),Y0=p(e=>{const t=new H0;return t.calculate(e),t},"getThemeVariables"),pi,U0=(pi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(L("#323D47"),10),this.border1="#ccc",this.border2=hr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?P(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||P(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=P(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?R(this.quadrant1Fill):P(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.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?P(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(pi,"Theme"),pi),G0=p(e=>{const t=new U0;return t.calculate(e),t},"getThemeVariables"),Xe={base:{getThemeVariables:B0},dark:{getThemeVariables:L0},default:{getThemeVariables:A0},forest:{getThemeVariables:M0},neutral:{getThemeVariables:O0},neo:{getThemeVariables:D0},"neo-dark":{getThemeVariables:P0},redux:{getThemeVariables:q0},"redux-dark":{getThemeVariables:z0},"redux-color":{getThemeVariables:Y0},"redux-dark-color":{getThemeVariables:G0}},Yt={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,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},Vc={...Yt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Xe.default.getThemeVariables(),sequence:{...Yt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Yt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yt.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:{...Yt.pie,useWidth:984},xyChart:{...Yt.xyChart,useWidth:void 0},requirement:{...Yt.requirement,useWidth:void 0},packet:{...Yt.packet},eventmodeling:{...Yt.eventmodeling},treeView:{...Yt.treeView,useWidth:void 0},radar:{...Yt.radar},railroad:{...Yt.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:{...Yt.ishikawa},sankey:{...Yt.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:{...Yt.venn},cynefin:{...Yt.cynefin}},Zc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Zc(e[i],"")]:[...r,t+i],[]),"keyify"),j0=new Set(Zc(Vc,"")),Qc=Vc,X0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},V0=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))&&(H.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ea=p(e=>{if(H.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ea(t));return}for(const t of Object.keys(e)){if(H.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!j0.has(t)||e[t]==null){H.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=X0[t];i?V0(e[t],i):(H.debug("sanitizing object",t),ea(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(H.debug("sanitizing css option",t),e[t]=Kc(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]="")}H.debug("After sanitization",e)}},"sanitizeDirective"),Kc=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"),xi=Object.freeze(Qc),qe=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ne=Pt({},xi),ra,Ar=[],Ki=Pt({},xi),$a=p((e,t)=>{let r=Pt({},e),i={};for(const s of t)eu(s),i=Pt(i,s);if(r=Pt(r,i),i.theme&&i.theme in Xe){const s=Pt({},ra),a=Pt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Xe&&(r.themeVariables=Xe[r.theme].getThemeVariables(a))}return Ki=r,iu(Ki),Ki},"updateCurrentConfig"),Z0=p(e=>(ne=Pt({},xi),ne=Pt(ne,e),e.theme&&Xe[e.theme]&&(ne.themeVariables=Xe[e.theme].getThemeVariables(e.themeVariables)),$a(ne,Ar),ne),"setSiteConfig"),Q0=p(e=>{ra=Pt({},e)},"saveConfigFromInitialize"),K0=p(e=>(ne=Pt(ne,e),$a(ne,Ar),ne),"updateSiteConfig"),Jc=p(()=>Pt({},ne),"getSiteConfig"),tu=p(e=>(iu(e),Pt(Ki,e),Et()),"setConfig"),Et=p(()=>Pt({},Ki),"getConfig"),eu=p(e=>{e&&(["secure",...ne.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(H.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&eu(e[t])}))},"sanitize"),J0=p(e=>{var t;ea(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ar.push(e),$a(ne,Ar)},"addDirective"),ia=p((e=ne)=>{Ar=[],$a(e,Ar)},"reset"),tC={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."},bh={},ru=p(e=>{bh[e]||(H.warn(tC[e]),bh[e]=!0)},"issueWarning"),iu=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ru("LAZY_LOAD_DEPRECATED")},"checkConfig"),jL=p(()=>{let e={};ra&&(e=Pt(e,ra));for(const t of Ar)e=Pt(e,t);return e},"getUserDefinedConfig"),ae=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&ru("FLOWCHART_HTML_LABELS_DEPRECATED"),qe(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),su=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ji=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,eC=/\s*%%.*\n/gm,gi,au=(gi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(gi,"UnknownDiagramError"),gi),Er={},Pn=p(function(e,t){e=e.replace(su,"").replace(Ji,"").replace(eC,`
5
+ `);for(const[r,{detector:i}]of Object.entries(Er))if(i(e,t))return r;throw new au(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),No=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)ou(t,r,i)},"registerLazyLoadedDiagrams"),ou=p((e,t,r)=>{Er[e]&&H.warn(`Detector with key ${e} already exists. Overwriting.`),Er[e]={detector:t,loader:r},H.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),rC=p(e=>Er[e].loader,"getDiagramLoader"),ps=/<br\s*\/?>/gi,iC=p(e=>e?hu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),sC=(()=>{let e=!1;return()=>{e||(nu(),e=!0)}})();function nu(){const e="data-temp-href-target";Ci.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ci.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(nu,"setupDompurifyHooks");var lu=p(e=>(sC(),Ci.sanitize(e)),"removeScript"),kh=p((e,t)=>{if(ae(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=lu(e):r!=="loose"&&(e=hu(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=lC(e))}return e},"sanitizeMore"),_e=p((e,t)=>e&&(t.dompurifyConfig?e=Ci.sanitize(kh(e,t),t.dompurifyConfig).toString():e=Ci.sanitize(kh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),aC=p((e,t)=>typeof e=="string"?_e(e,t):e.flat().map(r=>_e(r,t)),"sanitizeTextOrArray"),oC=p(e=>ps.test(e),"hasBreaks"),nC=p(e=>e.split(ps),"splitBreaks"),lC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),hu=p(e=>e.replace(ps,"#br#"),"breakToPlaceholder"),hC=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"),cC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),uC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Th=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 a=t[i-1],o=t[i+1];dC(a,o)&&(s=a+","+o,i++,r.pop())}r.push(fC(s))}return r.join("")},"parseGenericTypes"),qo=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),dC=p((e,t)=>{const r=qo(e,"~"),i=qo(t,"~");return r===1&&i===1},"shouldCombineSets"),fC=p(e=>{const t=qo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),wh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wo=/\$\$(.*?)\$\$/g,rs=p(e=>{var t;return(((t=e.match(Wo))==null?void 0:t.length)??0)>0},"hasKatex"),XL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await cu(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"),pC=p(async(e,t)=>{if(!rs(e))return e;if(!(wh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Wo,"MathML is unsupported in this environment.");{const{default:r}=await mt(async()=>{const{default:s}=await import("./katex.C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!wh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ps).map(s=>rs(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Wo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),cu=p(async(e,t)=>_e(await pC(e,t),t),"renderKatexSanitized"),gs={getRows:iC,sanitizeText:_e,sanitizeTextOrArray:aC,hasBreaks:oC,splitBreaks:nC,lineBreakRegex:ps,removeScript:lu,getUrl:hC,evaluate:qe,getMax:cC,getMin:uC},gC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),mC=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"),uu=p(function(e,t,r,i){const s=mC(t,r,i);gC(e,s)},"configureSvgSize"),yC=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;H.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;H.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,H.info(`Calculated bounds: ${n}x${l}`),uu(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"),Hs={};function zo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}p(zo,"cssStyleSheetToString");var CC=p((e,t,r,i)=>{let s="";return e in Hs&&Hs[e]?s=Hs[e]({...r,svgId:i}):H.warn(`No theme found for ${e}`),` & {
7
7
  font-family: ${r.fontFamily};
8
8
  font-size: ${r.fontSize};
9
9
  fill: ${r.textColor}
@@ -124,83 +124,88 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
124
124
  }
125
125
 
126
126
  ${t}
127
- `},"getStyles"),yC=p((e,t)=>{t!==void 0&&(Ws[e]=t)},"addStylesForDiagram"),CC=mC,hu={};My(hu,{clear:()=>xC,getAccDescription:()=>wC,getAccTitle:()=>kC,getDiagramTitle:()=>_C,setAccDescription:()=>TC,setAccTitle:()=>bC,setDiagramTitle:()=>SC});var Pn="",Rn="",Nn="",qn=p(e=>_e(e,Et()),"sanitizeText"),xC=p(()=>{Pn="",Nn="",Rn=""},"clear"),bC=p(e=>{Pn=qn(e).replace(/^\s+/g,"")},"setAccTitle"),kC=p(()=>Pn,"getAccTitle"),TC=p(e=>{Nn=qn(e).replace(/\n\s+/g,`
128
- `)},"setAccDescription"),wC=p(()=>Nn,"getAccDescription"),SC=p(e=>{Rn=qn(e)},"setDiagramTitle"),_C=p(()=>Rn,"getDiagramTitle"),Th=H,BC=In,St=Et,WL=Kc,zL=mi,Wn=p(e=>_e(e,St()),"sanitizeText"),vC=gC,LC=p(()=>hu,"getCommonDb"),ra={},ia=p((e,t,r)=>{var i;ra[e]&&Th.warn(`Diagram with id ${e} already registered. Overwriting.`),ra[e]=t,r&&iu(e,r),yC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Th,BC,St,Wn,vC,LC(),()=>{})},"registerDiagram"),Wo=p(e=>{if(e in ra)return ra[e];throw new FC(e)},"getDiagram"),fi,FC=(fi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(fi,"DiagramNotFoundError"),fi),AC={value:()=>{}};function cu(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new zs(r)}function zs(e){this._=e}function EC(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}})}zs.prototype=cu.prototype={constructor:zs,on:function(e,t){var r=this._,i=EC(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=MC(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=wh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=wh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new zs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function MC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function wh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=AC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var zo="http://www.w3.org/1999/xhtml";const Sh={svg:"http://www.w3.org/2000/svg",xhtml:zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ma(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Sh.hasOwnProperty(t)?{space:Sh[t],local:e}:e}function $C(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===zo&&t.documentElement.namespaceURI===zo?t.createElement(e):t.createElementNS(r,e)}}function OC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uu(e){var t=Ma(e);return(t.local?OC:$C)(t)}function IC(){}function zn(e){return e==null?IC:function(){return this.querySelector(e)}}function DC(e){typeof e!="function"&&(e=zn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new de(i,this._parents)}function PC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function RC(){return[]}function du(e){return e==null?RC:function(){return this.querySelectorAll(e)}}function NC(e){return function(){return PC(e.apply(this,arguments))}}function qC(e){typeof e=="function"?e=NC(e):e=du(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),s.push(l));return new de(i,s)}function fu(e){return function(){return this.matches(e)}}function pu(e){return function(t){return t.matches(e)}}var WC=Array.prototype.find;function zC(e){return function(){return WC.call(this.children,e)}}function HC(){return this.firstElementChild}function YC(e){return this.select(e==null?HC:zC(typeof e=="function"?e:pu(e)))}var UC=Array.prototype.filter;function GC(){return Array.from(this.children)}function jC(e){return function(){return UC.call(this.children,e)}}function XC(e){return this.selectAll(e==null?GC:jC(typeof e=="function"?e:pu(e)))}function VC(e){typeof e!="function"&&(e=fu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new de(i,this._parents)}function gu(e){return new Array(e.length)}function ZC(){return new de(this._enter||this._groups.map(gu),this._parents)}function sa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}sa.prototype={constructor:sa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function KC(e){return function(){return e}}function QC(e,t,r,i,s,a){for(var o=0,n,l=t.length,c=a.length;o<c;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new sa(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function JC(e,t,r,i,s,a,o){var n,l,c=new Map,h=t.length,u=a.length,f=new Array(h),d;for(n=0;n<h;++n)(l=t[n])&&(f[n]=d=o.call(l,l.__data__,n,t)+"",c.has(d)?s[n]=l:c.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=c.get(d))?(i[n]=l,l.__data__=a[n],c.delete(d)):r[n]=new sa(e,a[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function tx(e){return e.__data__}function ex(e,t){if(!arguments.length)return Array.from(this,tx);var r=t?JC:QC,i=this._parents,s=this._groups;typeof e!="function"&&(e=KC(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=s[c],f=u.length,d=rx(e.call(h,h&&h.__data__,c,i)),y=d.length,g=n[c]=new Array(y),m=o[c]=new Array(y),C=l[c]=new Array(f);r(h,u,g,m,C,d,t);for(var b=0,k=0,w,S;b<y;++b)if(w=g[b]){for(b>=k&&(k=b+1);!(S=m[k])&&++k<y;);w._next=S||null}}return o=new de(o,i),o._enter=n,o._exit=l,o}function rx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ix(){return new de(this._exit||this._groups.map(gu),this._parents)}function sx(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function ax(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=n[l]=new Array(u),d,y=0;y<u;++y)(d=c[y]||h[y])&&(f[y]=d);for(;l<s;++l)n[l]=r[l];return new de(n,this._parents)}function ox(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function nx(e){e||(e=lx);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),c,h=0;h<n;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new de(s,this._parents).order()}function lx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function hx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cx(){return Array.from(this)}function ux(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function dx(){let e=0;for(const t of this)++e;return e}function fx(){return!this.node()}function px(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function gx(e){return function(){this.removeAttribute(e)}}function mx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yx(e,t){return function(){this.setAttribute(e,t)}}function Cx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function xx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function bx(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 kx(e,t){var r=Ma(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?mx:gx:typeof t=="function"?r.local?bx:xx:r.local?Cx:yx)(r,t))}function mu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Tx(e){return function(){this.style.removeProperty(e)}}function wx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Sx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function _x(e,t,r){return arguments.length>1?this.each((t==null?Tx:typeof t=="function"?Sx:wx)(e,t,r??"")):yi(this.node(),e)}function yi(e,t){return e.style.getPropertyValue(t)||mu(e).getComputedStyle(e,null).getPropertyValue(t)}function Bx(e){return function(){delete this[e]}}function vx(e,t){return function(){this[e]=t}}function Lx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Fx(e,t){return arguments.length>1?this.each((t==null?Bx:typeof t=="function"?Lx:vx)(e,t)):this.node()[e]}function yu(e){return e.trim().split(/^|\s+/)}function Hn(e){return e.classList||new Cu(e)}function Cu(e){this._node=e,this._names=yu(e.getAttribute("class")||"")}Cu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function xu(e,t){for(var r=Hn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function bu(e,t){for(var r=Hn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function Ax(e){return function(){xu(this,e)}}function Ex(e){return function(){bu(this,e)}}function Mx(e,t){return function(){(t.apply(this,arguments)?xu:bu)(this,e)}}function $x(e,t){var r=yu(e+"");if(arguments.length<2){for(var i=Hn(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Mx:t?Ax:Ex)(r,t))}function Ox(){this.textContent=""}function Ix(e){return function(){this.textContent=e}}function Dx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Px(e){return arguments.length?this.each(e==null?Ox:(typeof e=="function"?Dx:Ix)(e)):this.node().textContent}function Rx(){this.innerHTML=""}function Nx(e){return function(){this.innerHTML=e}}function qx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Wx(e){return arguments.length?this.each(e==null?Rx:(typeof e=="function"?qx:Nx)(e)):this.node().innerHTML}function zx(){this.nextSibling&&this.parentNode.appendChild(this)}function Hx(){return this.each(zx)}function Yx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ux(){return this.each(Yx)}function Gx(e){var t=typeof e=="function"?e:uu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function jx(){return null}function Xx(e,t){var r=typeof e=="function"?e:uu(e),i=t==null?jx:typeof t=="function"?t:zn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Vx(){var e=this.parentNode;e&&e.removeChild(this)}function Zx(){return this.each(Vx)}function Kx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Jx(e){return this.select(e?Qx:Kx)}function tb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function eb(e){return function(t){e.call(this,t,this.__data__)}}function rb(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 ib(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function sb(e,t,r){return function(){var i=this.__on,s,a=eb(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function ab(e,t,r){var i=rb(e+""),s,a=i.length,o;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<a;++s)if((o=i[s]).type===h.type&&o.name===h.name)return h.value}return}for(n=t?sb:ib,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function ku(e,t,r){var i=mu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function ob(e,t){return function(){return ku(this,e,t)}}function nb(e,t){return function(){return ku(this,e,t.apply(this,arguments))}}function lb(e,t){return this.each((typeof t=="function"?nb:ob)(e,t))}function*hb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var Tu=[null];function de(e,t){this._groups=e,this._parents=t}function ps(){return new de([[document.documentElement]],Tu)}function cb(){return this}de.prototype=ps.prototype={constructor:de,select:DC,selectAll:qC,selectChild:YC,selectChildren:XC,filter:VC,data:ex,enter:ZC,exit:ix,join:sx,merge:ax,selection:cb,order:ox,sort:nx,call:hx,nodes:cx,node:ux,size:dx,empty:fx,each:px,attr:kx,style:_x,property:Fx,classed:$x,text:Px,html:Wx,raise:Hx,lower:Ux,append:Gx,insert:Xx,remove:Zx,clone:Jx,datum:tb,on:ab,dispatch:lb,[Symbol.iterator]:hb};function yt(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],Tu)}function Yn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function gs(){}var es=.7,aa=1/es,Jr="\\s*([+-]?\\d+)\\s*",rs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ub=/^#([0-9a-f]{3,8})$/,db=new RegExp(`^rgb\\(${Jr},${Jr},${Jr}\\)$`),fb=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),pb=new RegExp(`^rgba\\(${Jr},${Jr},${Jr},${rs}\\)$`),gb=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${rs}\\)$`),mb=new RegExp(`^hsl\\(${rs},${Ie},${Ie}\\)$`),yb=new RegExp(`^hsla\\(${rs},${Ie},${Ie},${rs}\\)$`),_h={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Yn(gs,is,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bh,formatHex:Bh,formatHex8:Cb,formatHsl:xb,formatRgb:vh,toString:vh});function Bh(){return this.rgb().formatHex()}function Cb(){return this.rgb().formatHex8()}function xb(){return Su(this).formatHsl()}function vh(){return this.rgb().formatRgb()}function is(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ub.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Lh(t):r===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=db.exec(e))?new he(t[1],t[2],t[3],1):(t=fb.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pb.exec(e))?Fs(t[1],t[2],t[3],t[4]):(t=gb.exec(e))?Fs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mb.exec(e))?Eh(t[1],t[2]/100,t[3]/100,1):(t=yb.exec(e))?Eh(t[1],t[2]/100,t[3]/100,t[4]):_h.hasOwnProperty(e)?Lh(_h[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function Lh(e){return new he(e>>16&255,e>>8&255,e&255,1)}function Fs(e,t,r,i){return i<=0&&(e=t=r=NaN),new he(e,t,r,i)}function bb(e){return e instanceof gs||(e=is(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function Ho(e,t,r,i){return arguments.length===1?bb(e):new he(e,t,r,i??1)}function he(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Yn(he,Ho,wu(gs,{brighter(e){return e=e==null?aa:Math.pow(aa,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?es:Math.pow(es,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(Br(this.r),Br(this.g),Br(this.b),oa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fh,formatHex:Fh,formatHex8:kb,formatRgb:Ah,toString:Ah}));function Fh(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}`}function kb(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}${wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ah(){const e=oa(this.opacity);return`${e===1?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${e===1?")":`, ${e})`}`}function oa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Br(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wr(e){return e=Br(e),(e<16?"0":"")+e.toString(16)}function Eh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,i)}function Su(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof gs||(e=is(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new ke(o,n,l,e.opacity)}function Tb(e,t,r,i){return arguments.length===1?Su(e):new ke(e,t,r,i??1)}function ke(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Yn(ke,Tb,wu(gs,{brighter(e){return e=e==null?aa:Math.pow(aa,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?es:Math.pow(es,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new he(xo(e>=240?e-240:e+120,s,i),xo(e,s,i),xo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ke(Mh(this.h),As(this.s),As(this.l),oa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oa(this.opacity);return`${e===1?"hsl(":"hsla("}${Mh(this.h)}, ${As(this.s)*100}%, ${As(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mh(e){return e=(e||0)%360,e<0?e+360:e}function As(e){return Math.max(0,Math.min(1,e||0))}function xo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Un=e=>()=>e;function _u(e,t){return function(r){return e+r*t}}function wb(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 HL(e,t){var r=t-e;return r?_u(e,r>180||r<-180?r-360*Math.round(r/360):r):Un(isNaN(e)?t:e)}function Sb(e){return(e=+e)==1?Bu:function(t,r){return r-t?wb(t,r,e):Un(isNaN(t)?r:t)}}function Bu(e,t){var r=t-e;return r?_u(e,r):Un(isNaN(e)?t:e)}const $h=function e(t){var r=Sb(t);function i(s,a){var o=r((s=Ho(s)).r,(a=Ho(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),c=Bu(s.opacity,a.opacity);return function(h){return s.r=o(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i}(1);function sr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Yo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bo=new RegExp(Yo.source,"g");function _b(e){return function(){return e}}function Bb(e){return function(t){return e(t)+""}}function vb(e,t){var r=Yo.lastIndex=bo.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Yo.exec(e))&&(s=bo.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:sr(i,s)})),r=bo.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Bb(l[0].x):_b(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 Oh=180/Math.PI,Uo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vu(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*Oh,skewX:Math.atan(l)*Oh,scaleX:o,scaleY:n}}var Es;function Lb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Uo:vu(t.a,t.b,t.c,t.d,t.e,t.f)}function Fb(e){return e==null||(Es||(Es=document.createElementNS("http://www.w3.org/2000/svg","g")),Es.setAttribute("transform",e),!(e=Es.transform.baseVal.consolidate()))?Uo:(e=e.matrix,vu(e.a,e.b,e.c,e.d,e.e,e.f))}function Lu(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function a(c,h,u,f,d,y){if(c!==u||h!==f){var g=d.push("translate(",null,t,null,r);y.push({i:g-4,x:sr(c,u)},{i:g-2,x:sr(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(s(u)+"rotate(",null,i)-2,x:sr(c,h)})):h&&u.push(s(u)+"rotate("+h+i)}function n(c,h,u,f){c!==h?f.push({i:u.push(s(u)+"skewX(",null,i)-2,x:sr(c,h)}):h&&u.push(s(u)+"skewX("+h+i)}function l(c,h,u,f,d,y){if(c!==u||h!==f){var g=d.push(s(d)+"scale(",null,",",null,")");y.push({i:g-4,x:sr(c,u)},{i:g-2,x:sr(h,f)})}else(u!==1||f!==1)&&d.push(s(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),n(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var y=-1,g=f.length,m;++y<g;)u[(m=f[y]).i]=m.x(d);return u.join("")}}}var Ab=Lu(Lb,"px, ","px)","deg)"),Eb=Lu(Fb,", ",")",")"),Ci=0,Wi=0,Mi=0,Fu=1e3,na,zi,la=0,Ar=0,$a=0,ss=typeof performance=="object"&&performance.now?performance:Date,Au=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gn(){return Ar||(Au(Mb),Ar=ss.now()+$a)}function Mb(){Ar=0}function ha(){this._call=this._time=this._next=null}ha.prototype=Eu.prototype={constructor:ha,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Gn():+r)+(t==null?0:+t),!this._next&&zi!==this&&(zi?zi._next=this:na=this,zi=this),this._call=e,this._time=r,Go()},stop:function(){this._call&&(this._call=null,this._time=1/0,Go())}};function Eu(e,t,r){var i=new ha;return i.restart(e,t,r),i}function $b(){Gn(),++Ci;for(var e=na,t;e;)(t=Ar-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ci}function Ih(){Ar=(la=ss.now())+$a,Ci=Wi=0;try{$b()}finally{Ci=0,Ib(),Ar=0}}function Ob(){var e=ss.now(),t=e-la;t>Fu&&($a-=t,la=e)}function Ib(){for(var e,t=na,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:na=r);zi=e,Go(i)}function Go(e){if(!Ci){Wi&&(Wi=clearTimeout(Wi));var t=e-Ar;t>24?(e<1/0&&(Wi=setTimeout(Ih,e-ss.now()-$a)),Mi&&(Mi=clearInterval(Mi))):(Mi||(la=ss.now(),Mi=setInterval(Ob,Fu)),Ci=1,Au(Ih))}}function Dh(e,t,r){var i=new ha;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Db=cu("start","end","cancel","interrupt"),Pb=[],Mu=0,Ph=1,jo=2,Hs=3,Rh=4,Xo=5,Ys=6;function Oa(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Rb(e,r,{name:t,index:i,group:s,on:Db,tween:Pb,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Mu})}function jn(e,t){var r=ve(e,t);if(r.state>Mu)throw new Error("too late; already scheduled");return r}function We(e,t){var r=ve(e,t);if(r.state>Hs)throw new Error("too late; already running");return r}function ve(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Rb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Eu(a,0,r.time);function a(c){r.state=Ph,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==Ph)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Hs)return Dh(o);d.state===Rh?(d.state=Ys,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Ys,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Dh(function(){r.state===Hs&&(r.state=Rh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=jo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===jo){for(r.state=Hs,s=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);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=Xo,1),u=-1,f=s.length;++u<f;)s[u].call(e,h);r.state===Xo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ys,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Nb(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>jo&&i.state<Xo,i.state=Ys,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function qb(e){return this.each(function(){Nb(this,e)})}function Wb(e,t){var r,i;return function(){var s=We(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function zb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=We(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}a.tween=s}}function Hb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ve(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?Wb:zb)(r,e,t))}function Xn(e,t,r){var i=e._id;return e.each(function(){var s=We(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return ve(s,i).value[t]}}function $u(e,t){var r;return(typeof t=="number"?sr:t instanceof is?$h:(r=is(t))?(t=r,$h):vb)(e,t)}function Yb(e){return function(){this.removeAttribute(e)}}function Ub(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function jb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function Xb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Vb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Zb(e,t){var r=Ma(e),i=r==="transform"?Eb:$u;return this.attrTween(e,typeof t=="function"?(r.local?Vb:Xb)(r,i,Xn(this,"attr."+e,t)):t==null?(r.local?Ub:Yb)(r):(r.local?jb:Gb)(r,i,t))}function Kb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Qb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Jb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Qb(e,a)),r}return s._value=t,s}function tk(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Kb(e,a)),r}return s._value=t,s}function ek(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ma(e);return this.tween(r,(i.local?Jb:tk)(i,t))}function rk(e,t){return function(){jn(this,e).delay=+t.apply(this,arguments)}}function ik(e,t){return t=+t,function(){jn(this,e).delay=t}}function sk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rk:ik)(t,e)):ve(this.node(),t).delay}function ak(e,t){return function(){We(this,e).duration=+t.apply(this,arguments)}}function ok(e,t){return t=+t,function(){We(this,e).duration=t}}function nk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ak:ok)(t,e)):ve(this.node(),t).duration}function lk(e,t){if(typeof t!="function")throw new Error;return function(){We(this,e).ease=t}}function hk(e){var t=this._id;return arguments.length?this.each(lk(t,e)):ve(this.node(),t).ease}function ck(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;We(this,e).ease=r}}function uk(e){if(typeof e!="function")throw new Error;return this.each(ck(this._id,e))}function dk(e){typeof e!="function"&&(e=fu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new Ze(i,this._parents,this._name,this._id)}function fk(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],c=r[n],h=l.length,u=o[n]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;n<i;++n)o[n]=t[n];return new Ze(o,this._parents,this._name,this._id)}function pk(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 gk(e,t,r){var i,s,a=pk(t)?jn:We;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function mk(e,t){var r=this._id;return arguments.length<2?ve(this.node(),r).on.on(e):this.each(gk(r,e,t))}function yk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ck(){return this.on("end.remove",yk(this._id))}function xk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=zn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,c=a[o]=new Array(l),h,u,f=0;f<l;++f)(h=n[f])&&(u=e.call(h,h.__data__,f,n))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Oa(c[f],t,r,f,c,ve(h,r)));return new Ze(a,this._parents,t,r)}function bk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=du(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,y=ve(h,r),g=0,m=f.length;g<m;++g)(d=f[g])&&Oa(d,t,r,g,f,y);a.push(f),o.push(h)}return new Ze(a,o,t,r)}var kk=ps.prototype.constructor;function Tk(){return new kk(this._groups,this._parents)}function wk(e,t){var r,i,s;return function(){var a=yi(this,e),o=(this.style.removeProperty(e),yi(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function Ou(e){return function(){this.style.removeProperty(e)}}function Sk(e,t,r){var i,s=r+"",a;return function(){var o=yi(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function _k(e,t,r){var i,s,a;return function(){var o=yi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),yi(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Bk(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=We(this,e),c=l.on,h=l.value[a]==null?n||(n=Ou(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(o,s=h),l.on=i}}function vk(e,t,r){var i=(e+="")=="transform"?Ab:$u;return t==null?this.styleTween(e,wk(e,i)).on("end.style."+e,Ou(e)):typeof t=="function"?this.styleTween(e,_k(e,i,Xn(this,"style."+e,t))).each(Bk(this._id,e)):this.styleTween(e,Sk(e,i,t),r).on("end.style."+e,null)}function Lk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Fk(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Lk(e,o,r)),i}return a._value=t,a}function Ak(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,Fk(e,t,r??""))}function Ek(e){return function(){this.textContent=e}}function Mk(e){return function(){var t=e(this);this.textContent=t??""}}function $k(e){return this.tween("text",typeof e=="function"?Mk(Xn(this,"text",e)):Ek(e==null?"":e+""))}function Ok(e){return function(t){this.textContent=e.call(this,t)}}function Ik(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Ok(s)),t}return i._value=e,i}function Dk(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,Ik(e))}function Pk(){for(var e=this._name,t=this._id,r=Iu(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)if(l=o[c]){var h=ve(l,t);Oa(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ze(i,this._parents,e,r)}function Rk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var c=We(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&&a()})}var Nk=0;function Ze(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Iu(){return++Nk}var Ue=ps.prototype;Ze.prototype={constructor:Ze,select:xk,selectAll:bk,selectChild:Ue.selectChild,selectChildren:Ue.selectChildren,filter:dk,merge:fk,selection:Tk,transition:Pk,call:Ue.call,nodes:Ue.nodes,node:Ue.node,size:Ue.size,empty:Ue.empty,each:Ue.each,on:mk,attr:Zb,attrTween:ek,style:vk,styleTween:Ak,text:$k,textTween:Dk,remove:Ck,tween:Hb,delay:sk,duration:nk,ease:hk,easeVarying:uk,end:Rk,[Symbol.iterator]:Ue[Symbol.iterator]};function qk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Wk={time:null,delay:0,duration:250,ease:qk};function zk(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 Hk(e){var t,r;e instanceof Ze?(t=e._id,e=e._name):(t=Iu(),(r=Wk).time=Gn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&Oa(l,e,t,c,o,r||zk(l,t));return new Ze(i,this._parents,e,t)}ps.prototype.interrupt=qb;ps.prototype.transition=Hk;const Vo=Math.PI,Zo=2*Vo,br=1e-6,Yk=Zo-br;function Du(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Uk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Du;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Gk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Du:Uk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,c=s-r,h=o-t,u=n-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>br)if(!(Math.abs(u*l-c*h)>br)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,y=s-n,g=l*l+c*c,m=d*d+y*y,C=Math.sqrt(g),b=Math.sqrt(f),k=a*Math.tan((Vo-Math.acos((g+f-m)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>br&&this._append`L${t+w*h},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>h*y)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,u=1^o,f=o?s-a:a-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>br||Math.abs(this._y1-h)>br)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Zo+Zo),f>Yk?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>br&&this._append`A${i},${i},0,${+(f>=Vo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Hr(e){return function(){return e}}const YL=Math.abs,UL=Math.atan2,GL=Math.cos,jL=Math.max,XL=Math.min,VL=Math.sin,ZL=Math.sqrt,Nh=1e-12,Vn=Math.PI,qh=Vn/2,KL=2*Vn;function QL(e){return e>1?0:e<-1?Vn:Math.acos(e)}function JL(e){return e>=1?qh:e<=-1?-qh:Math.asin(e)}function jk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Gk(t)}function Xk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pu(e){this._context=e}Pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ki(e){return new Pu(e)}function Vk(e){return e[0]}function Zk(e){return e[1]}function Kk(e,t){var r=Hr(!0),i=null,s=Ki,a=null,o=jk(n);e=typeof e=="function"?e:e===void 0?Vk:Hr(e),t=typeof t=="function"?t:t===void 0?Zk:Hr(t);function n(l){var c,h=(l=Xk(l)).length,u,f=!1,d;for(i==null&&(a=s(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Hr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Hr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Hr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class Ru{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Nu(e){return new Ru(e,!0)}function qu(e){return new Ru(e,!1)}function cr(){}function ca(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ia(e){this._context=e}Ia.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ca(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ko(e){return new Ia(e)}function Wu(e){this._context=e}Wu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qk(e){return new Wu(e)}function zu(e){this._context=e}zu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jk(e){return new zu(e)}function Hu(e,t){this._basis=new Ia(e),this._beta=t}Hu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const t1=function e(t){function r(i){return t===1?new Ia(i):new Hu(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ua(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Zn(e,t){this._context=e,this._k=(1-t)/6}Zn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ua(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ua(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yu=function e(t){function r(i){return new Zn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Kn(e,t){this._context=e,this._k=(1-t)/6}Kn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ua(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e1=function e(t){function r(i){return new Kn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Qn(e,t){this._context=e,this._k=(1-t)/6}Qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ua(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r1=function e(t){function r(i){return new Qn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Jn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Nh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Nh){var 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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Uu(e,t){this._context=e,this._alpha=t}Uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Gu=function e(t){function r(i){return t?new Uu(i,t):new Zn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ju(e,t){this._context=e,this._alpha=t}ju.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i1=function e(t){function r(i){return t?new ju(i,t):new Kn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Xu(e,t){this._context=e,this._alpha=t}Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s1=function e(t){function r(i){return t?new Xu(i,t):new Qn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Vu(e){this._context=e}Vu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function a1(e){return new Vu(e)}function Wh(e){return e<0?-1:1}function zh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(Wh(a)+Wh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Hh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ko(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function da(e){this._context=e}da.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ko(this,this._t0,Hh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ko(this,Hh(this,r=zh(this,e,t)),r);break;default:ko(this,this._t0,r=zh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Zu(e){this._context=new Ku(e)}(Zu.prototype=Object.create(da.prototype)).point=function(e,t){da.prototype.point.call(this,t,e)};function Ku(e){this._context=e}Ku.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Qu(e){return new da(e)}function Ju(e){return new Zu(e)}function td(e){this._context=e}td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Yh(e),s=Yh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Yh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function ed(e){return new td(e)}function Da(e,t){this._context=e,this._t=t}Da.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function rd(e){return new Da(e,.5)}function id(e){return new Da(e,0)}function sd(e){return new Da(e,1)}function Hi(e,t,r){this.k=e,this.x=t,this.y=r}Hi.prototype={constructor:Hi,scale:function(e){return e===1?this:new Hi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Hi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Hi.prototype;var o1=p(e=>{var s;const{securityLevel:t}=St();let r=yt("body");if(t==="sandbox"){const o=((s=yt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=yt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function tl(e){return typeof e>"u"||e===null}p(tl,"isNothing");function ad(e){return typeof e=="object"&&e!==null}p(ad,"isObject");function od(e){return Array.isArray(e)?e:tl(e)?[]:[e]}p(od,"toArray");function nd(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}p(nd,"extend");function ld(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(ld,"repeat");function hd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(hd,"isNegativeZero");var n1=tl,l1=ad,h1=od,c1=ld,u1=hd,d1=nd,Nt={isNothing:n1,isObject:l1,toArray:h1,repeat:c1,isNegativeZero:u1,extend:d1};function el(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
127
+ `},"getStyles"),xC=p((e,t)=>{t!==void 0&&(Hs[e]=t)},"addStylesForDiagram"),bC=CC,du={};Oy(du,{clear:()=>kC,getAccDescription:()=>_C,getAccTitle:()=>wC,getDiagramTitle:()=>vC,setAccDescription:()=>SC,setAccTitle:()=>TC,setDiagramTitle:()=>BC});var Nn="",qn="",Wn="",zn=p(e=>_e(e,Et()),"sanitizeText"),kC=p(()=>{Nn="",Wn="",qn=""},"clear"),TC=p(e=>{Nn=zn(e).replace(/^\s+/g,"")},"setAccTitle"),wC=p(()=>Nn,"getAccTitle"),SC=p(e=>{Wn=zn(e).replace(/\n\s+/g,`
128
+ `)},"setAccDescription"),_C=p(()=>Wn,"getAccDescription"),BC=p(e=>{qn=zn(e)},"setDiagramTitle"),vC=p(()=>qn,"getDiagramTitle"),Sh=H,LC=Rn,_t=Et,VL=tu,ZL=xi,Hn=p(e=>_e(e,_t()),"sanitizeText"),FC=yC,AC=p(()=>du,"getCommonDb"),sa={},aa=p((e,t,r)=>{var i;sa[e]&&Sh.warn(`Diagram with id ${e} already registered. Overwriting.`),sa[e]=t,r&&ou(e,r),xC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Sh,LC,_t,Hn,FC,AC(),()=>{})},"registerDiagram"),Ho=p(e=>{if(e in sa)return sa[e];throw new EC(e)},"getDiagram"),mi,EC=(mi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(mi,"DiagramNotFoundError"),mi),MC={value:()=>{}};function fu(){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 Ys(r)}function Ys(e){this._=e}function $C(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}})}Ys.prototype=fu.prototype={constructor:Ys,on:function(e,t){var r=this._,i=$C(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=OC(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=_h(r[s],e.name,t);else if(t==null)for(s in r)r[s]=_h(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 Ys(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function OC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function _h(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=MC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Yo="http://www.w3.org/1999/xhtml";const Bh={svg:"http://www.w3.org/2000/svg",xhtml:Yo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Bh.hasOwnProperty(t)?{space:Bh[t],local:e}:e}function IC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Yo&&t.documentElement.namespaceURI===Yo?t.createElement(e):t.createElementNS(r,e)}}function DC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pu(e){var t=Oa(e);return(t.local?DC:IC)(t)}function RC(){}function Yn(e){return e==null?RC:function(){return this.querySelector(e)}}function PC(e){typeof e!="function"&&(e=Yn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new de(i,this._parents)}function NC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function qC(){return[]}function gu(e){return e==null?qC:function(){return this.querySelectorAll(e)}}function WC(e){return function(){return NC(e.apply(this,arguments))}}function zC(e){typeof e=="function"?e=WC(e):e=gu(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),s.push(l));return new de(i,s)}function mu(e){return function(){return this.matches(e)}}function yu(e){return function(t){return t.matches(e)}}var HC=Array.prototype.find;function YC(e){return function(){return HC.call(this.children,e)}}function UC(){return this.firstElementChild}function GC(e){return this.select(e==null?UC:YC(typeof e=="function"?e:yu(e)))}var jC=Array.prototype.filter;function XC(){return Array.from(this.children)}function VC(e){return function(){return jC.call(this.children,e)}}function ZC(e){return this.selectAll(e==null?XC:VC(typeof e=="function"?e:yu(e)))}function QC(e){typeof e!="function"&&(e=mu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new de(i,this._parents)}function Cu(e){return new Array(e.length)}function KC(){return new de(this._enter||this._groups.map(Cu),this._parents)}function oa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}oa.prototype={constructor:oa,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 JC(e){return function(){return e}}function tx(e,t,r,i,s,a){for(var o=0,n,l=t.length,c=a.length;o<c;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new oa(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function ex(e,t,r,i,s,a,o){var n,l,c=new Map,h=t.length,u=a.length,f=new Array(h),d;for(n=0;n<h;++n)(l=t[n])&&(f[n]=d=o.call(l,l.__data__,n,t)+"",c.has(d)?s[n]=l:c.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=c.get(d))?(i[n]=l,l.__data__=a[n],c.delete(d)):r[n]=new oa(e,a[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function rx(e){return e.__data__}function ix(e,t){if(!arguments.length)return Array.from(this,rx);var r=t?ex:tx,i=this._parents,s=this._groups;typeof e!="function"&&(e=JC(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=s[c],f=u.length,d=sx(e.call(h,h&&h.__data__,c,i)),g=d.length,y=n[c]=new Array(g),m=o[c]=new Array(g),C=l[c]=new Array(f);r(h,u,y,m,C,d,t);for(var b=0,k=0,w,S;b<g;++b)if(w=y[b]){for(b>=k&&(k=b+1);!(S=m[k])&&++k<g;);w._next=S||null}}return o=new de(o,i),o._enter=n,o._exit=l,o}function sx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ax(){return new de(this._exit||this._groups.map(Cu),this._parents)}function ox(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function nx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=n[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<s;++l)n[l]=r[l];return new de(n,this._parents)}function lx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function hx(e){e||(e=cx);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),c,h=0;h<n;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new de(s,this._parents).order()}function cx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ux(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function dx(){return Array.from(this)}function fx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function px(){let e=0;for(const t of this)++e;return e}function gx(){return!this.node()}function mx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function yx(e){return function(){this.removeAttribute(e)}}function Cx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xx(e,t){return function(){this.setAttribute(e,t)}}function bx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Tx(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 wx(e,t){var r=Oa(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?Cx:yx:typeof t=="function"?r.local?Tx:kx:r.local?bx:xx)(r,t))}function xu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Sx(e){return function(){this.style.removeProperty(e)}}function _x(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Bx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function vx(e,t,r){return arguments.length>1?this.each((t==null?Sx:typeof t=="function"?Bx:_x)(e,t,r??"")):bi(this.node(),e)}function bi(e,t){return e.style.getPropertyValue(t)||xu(e).getComputedStyle(e,null).getPropertyValue(t)}function Lx(e){return function(){delete this[e]}}function Fx(e,t){return function(){this[e]=t}}function Ax(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Ex(e,t){return arguments.length>1?this.each((t==null?Lx:typeof t=="function"?Ax:Fx)(e,t)):this.node()[e]}function bu(e){return e.trim().split(/^|\s+/)}function Un(e){return e.classList||new ku(e)}function ku(e){this._node=e,this._names=bu(e.getAttribute("class")||"")}ku.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 Tu(e,t){for(var r=Un(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function wu(e,t){for(var r=Un(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function Mx(e){return function(){Tu(this,e)}}function $x(e){return function(){wu(this,e)}}function Ox(e,t){return function(){(t.apply(this,arguments)?Tu:wu)(this,e)}}function Ix(e,t){var r=bu(e+"");if(arguments.length<2){for(var i=Un(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Ox:t?Mx:$x)(r,t))}function Dx(){this.textContent=""}function Rx(e){return function(){this.textContent=e}}function Px(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Nx(e){return arguments.length?this.each(e==null?Dx:(typeof e=="function"?Px:Rx)(e)):this.node().textContent}function qx(){this.innerHTML=""}function Wx(e){return function(){this.innerHTML=e}}function zx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Hx(e){return arguments.length?this.each(e==null?qx:(typeof e=="function"?zx:Wx)(e)):this.node().innerHTML}function Yx(){this.nextSibling&&this.parentNode.appendChild(this)}function Ux(){return this.each(Yx)}function Gx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jx(){return this.each(Gx)}function Xx(e){var t=typeof e=="function"?e:pu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Vx(){return null}function Zx(e,t){var r=typeof e=="function"?e:pu(e),i=t==null?Vx:typeof t=="function"?t:Yn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Qx(){var e=this.parentNode;e&&e.removeChild(this)}function Kx(){return this.each(Qx)}function Jx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eb(e){return this.select(e?tb:Jx)}function rb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ib(e){return function(t){e.call(this,t,this.__data__)}}function sb(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 ab(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function ob(e,t,r){return function(){var i=this.__on,s,a=ib(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function nb(e,t,r){var i=sb(e+""),s,a=i.length,o;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<a;++s)if((o=i[s]).type===h.type&&o.name===h.name)return h.value}return}for(n=t?ob:ab,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Su(e,t,r){var i=xu(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 lb(e,t){return function(){return Su(this,e,t)}}function hb(e,t){return function(){return Su(this,e,t.apply(this,arguments))}}function cb(e,t){return this.each((typeof t=="function"?hb:lb)(e,t))}function*ub(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var _u=[null];function de(e,t){this._groups=e,this._parents=t}function ms(){return new de([[document.documentElement]],_u)}function db(){return this}de.prototype=ms.prototype={constructor:de,select:PC,selectAll:zC,selectChild:GC,selectChildren:ZC,filter:QC,data:ix,enter:KC,exit:ax,join:ox,merge:nx,selection:db,order:lx,sort:hx,call:ux,nodes:dx,node:fx,size:px,empty:gx,each:mx,attr:wx,style:vx,property:Ex,classed:Ix,text:Nx,html:Hx,raise:Ux,lower:jx,append:Xx,insert:Zx,remove:Kx,clone:eb,datum:rb,on:nb,dispatch:cb,[Symbol.iterator]:ub};function yt(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],_u)}function Gn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Bu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ys(){}var is=.7,na=1/is,ri="\\s*([+-]?\\d+)\\s*",ss="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fb=/^#([0-9a-f]{3,8})$/,pb=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),gb=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),mb=new RegExp(`^rgba\\(${ri},${ri},${ri},${ss}\\)$`),yb=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${ss}\\)$`),Cb=new RegExp(`^hsl\\(${ss},${Ie},${Ie}\\)$`),xb=new RegExp(`^hsla\\(${ss},${Ie},${Ie},${ss}\\)$`),vh={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};Gn(ys,as,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:bb,formatHsl:kb,formatRgb:Fh,toString:Fh});function Lh(){return this.rgb().formatHex()}function bb(){return this.rgb().formatHex8()}function kb(){return vu(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function as(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=fb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ah(t):r===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Es(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Es(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=pb.exec(e))?new he(t[1],t[2],t[3],1):(t=gb.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mb.exec(e))?Es(t[1],t[2],t[3],t[4]):(t=yb.exec(e))?Es(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Cb.exec(e))?$h(t[1],t[2]/100,t[3]/100,1):(t=xb.exec(e))?$h(t[1],t[2]/100,t[3]/100,t[4]):vh.hasOwnProperty(e)?Ah(vh[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function Ah(e){return new he(e>>16&255,e>>8&255,e&255,1)}function Es(e,t,r,i){return i<=0&&(e=t=r=NaN),new he(e,t,r,i)}function Tb(e){return e instanceof ys||(e=as(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function Uo(e,t,r,i){return arguments.length===1?Tb(e):new he(e,t,r,i??1)}function he(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Gn(he,Uo,Bu(ys,{brighter(e){return e=e==null?na:Math.pow(na,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?is:Math.pow(is,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(Lr(this.r),Lr(this.g),Lr(this.b),la(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:Eh,formatHex:Eh,formatHex8:wb,formatRgb:Mh,toString:Mh}));function Eh(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}`}function wb(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}${_r((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mh(){const e=la(this.opacity);return`${e===1?"rgb(":"rgba("}${Lr(this.r)}, ${Lr(this.g)}, ${Lr(this.b)}${e===1?")":`, ${e})`}`}function la(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Lr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _r(e){return e=Lr(e),(e<16?"0":"")+e.toString(16)}function $h(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,i)}function vu(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof ys||(e=as(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new ke(o,n,l,e.opacity)}function Sb(e,t,r,i){return arguments.length===1?vu(e):new ke(e,t,r,i??1)}function ke(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Gn(ke,Sb,Bu(ys,{brighter(e){return e=e==null?na:Math.pow(na,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?is:Math.pow(is,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new he(ko(e>=240?e-240:e+120,s,i),ko(e,s,i),ko(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ke(Oh(this.h),Ms(this.s),Ms(this.l),la(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=la(this.opacity);return`${e===1?"hsl(":"hsla("}${Oh(this.h)}, ${Ms(this.s)*100}%, ${Ms(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Oh(e){return e=(e||0)%360,e<0?e+360:e}function Ms(e){return Math.max(0,Math.min(1,e||0))}function ko(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 jn=e=>()=>e;function Lu(e,t){return function(r){return e+r*t}}function _b(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 QL(e,t){var r=t-e;return r?Lu(e,r>180||r<-180?r-360*Math.round(r/360):r):jn(isNaN(e)?t:e)}function Bb(e){return(e=+e)==1?Fu:function(t,r){return r-t?_b(t,r,e):jn(isNaN(t)?r:t)}}function Fu(e,t){var r=t-e;return r?Lu(e,r):jn(isNaN(e)?t:e)}const Ih=function e(t){var r=Bb(t);function i(s,a){var o=r((s=Uo(s)).r,(a=Uo(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),c=Fu(s.opacity,a.opacity);return function(h){return s.r=o(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i}(1);function ar(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Go=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,To=new RegExp(Go.source,"g");function vb(e){return function(){return e}}function Lb(e){return function(t){return e(t)+""}}function Fb(e,t){var r=Go.lastIndex=To.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Go.exec(e))&&(s=To.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:ar(i,s)})),r=To.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Lb(l[0].x):vb(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 Dh=180/Math.PI,jo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Au(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*Dh,skewX:Math.atan(l)*Dh,scaleX:o,scaleY:n}}var $s;function Ab(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?jo:Au(t.a,t.b,t.c,t.d,t.e,t.f)}function Eb(e){return e==null||($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",e),!(e=$s.transform.baseVal.consolidate()))?jo:(e=e.matrix,Au(e.a,e.b,e.c,e.d,e.e,e.f))}function Eu(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function a(c,h,u,f,d,g){if(c!==u||h!==f){var y=d.push("translate(",null,t,null,r);g.push({i:y-4,x:ar(c,u)},{i:y-2,x:ar(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(s(u)+"rotate(",null,i)-2,x:ar(c,h)})):h&&u.push(s(u)+"rotate("+h+i)}function n(c,h,u,f){c!==h?f.push({i:u.push(s(u)+"skewX(",null,i)-2,x:ar(c,h)}):h&&u.push(s(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var y=d.push(s(d)+"scale(",null,",",null,")");g.push({i:y-4,x:ar(c,u)},{i:y-2,x:ar(h,f)})}else(u!==1||f!==1)&&d.push(s(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),n(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,y=f.length,m;++g<y;)u[(m=f[g]).i]=m.x(d);return u.join("")}}}var Mb=Eu(Ab,"px, ","px)","deg)"),$b=Eu(Eb,", ",")",")"),ki=0,Yi=0,Di=0,Mu=1e3,ha,Ui,ca=0,Mr=0,Ia=0,os=typeof performance=="object"&&performance.now?performance:Date,$u=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Xn(){return Mr||($u(Ob),Mr=os.now()+Ia)}function Ob(){Mr=0}function ua(){this._call=this._time=this._next=null}ua.prototype=Ou.prototype={constructor:ua,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Xn():+r)+(t==null?0:+t),!this._next&&Ui!==this&&(Ui?Ui._next=this:ha=this,Ui=this),this._call=e,this._time=r,Xo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xo())}};function Ou(e,t,r){var i=new ua;return i.restart(e,t,r),i}function Ib(){Xn(),++ki;for(var e=ha,t;e;)(t=Mr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ki}function Rh(){Mr=(ca=os.now())+Ia,ki=Yi=0;try{Ib()}finally{ki=0,Rb(),Mr=0}}function Db(){var e=os.now(),t=e-ca;t>Mu&&(Ia-=t,ca=e)}function Rb(){for(var e,t=ha,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:ha=r);Ui=e,Xo(i)}function Xo(e){if(!ki){Yi&&(Yi=clearTimeout(Yi));var t=e-Mr;t>24?(e<1/0&&(Yi=setTimeout(Rh,e-os.now()-Ia)),Di&&(Di=clearInterval(Di))):(Di||(ca=os.now(),Di=setInterval(Db,Mu)),ki=1,$u(Rh))}}function Ph(e,t,r){var i=new ua;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Pb=fu("start","end","cancel","interrupt"),Nb=[],Iu=0,Nh=1,Vo=2,Us=3,qh=4,Zo=5,Gs=6;function Da(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;qb(e,r,{name:t,index:i,group:s,on:Pb,tween:Nb,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Iu})}function Vn(e,t){var r=ve(e,t);if(r.state>Iu)throw new Error("too late; already scheduled");return r}function We(e,t){var r=ve(e,t);if(r.state>Us)throw new Error("too late; already running");return r}function ve(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function qb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Ou(a,0,r.time);function a(c){r.state=Nh,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==Nh)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Us)return Ph(o);d.state===qh?(d.state=Gs,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Gs,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Ph(function(){r.state===Us&&(r.state=qh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Vo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Vo){for(r.state=Us,s=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);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=Zo,1),u=-1,f=s.length;++u<f;)s[u].call(e,h);r.state===Zo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Gs,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Wb(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>Vo&&i.state<Zo,i.state=Gs,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function zb(e){return this.each(function(){Wb(this,e)})}function Hb(e,t){var r,i;return function(){var s=We(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function Yb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=We(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}a.tween=s}}function Ub(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ve(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?Hb:Yb)(r,e,t))}function Zn(e,t,r){var i=e._id;return e.each(function(){var s=We(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return ve(s,i).value[t]}}function Du(e,t){var r;return(typeof t=="number"?ar:t instanceof as?Ih:(r=as(t))?(t=r,Ih):Fb)(e,t)}function Gb(e){return function(){this.removeAttribute(e)}}function jb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function Vb(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function Zb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Qb(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function Kb(e,t){var r=Oa(e),i=r==="transform"?$b:Du;return this.attrTween(e,typeof t=="function"?(r.local?Qb:Zb)(r,i,Zn(this,"attr."+e,t)):t==null?(r.local?jb:Gb)(r):(r.local?Vb:Xb)(r,i,t))}function Jb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function tk(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function ek(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&tk(e,a)),r}return s._value=t,s}function rk(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Jb(e,a)),r}return s._value=t,s}function ik(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=Oa(e);return this.tween(r,(i.local?ek:rk)(i,t))}function sk(e,t){return function(){Vn(this,e).delay=+t.apply(this,arguments)}}function ak(e,t){return t=+t,function(){Vn(this,e).delay=t}}function ok(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sk:ak)(t,e)):ve(this.node(),t).delay}function nk(e,t){return function(){We(this,e).duration=+t.apply(this,arguments)}}function lk(e,t){return t=+t,function(){We(this,e).duration=t}}function hk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nk:lk)(t,e)):ve(this.node(),t).duration}function ck(e,t){if(typeof t!="function")throw new Error;return function(){We(this,e).ease=t}}function uk(e){var t=this._id;return arguments.length?this.each(ck(t,e)):ve(this.node(),t).ease}function dk(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;We(this,e).ease=r}}function fk(e){if(typeof e!="function")throw new Error;return this.each(dk(this._id,e))}function pk(e){typeof e!="function"&&(e=mu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new Ze(i,this._parents,this._name,this._id)}function gk(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],c=r[n],h=l.length,u=o[n]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;n<i;++n)o[n]=t[n];return new Ze(o,this._parents,this._name,this._id)}function mk(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 yk(e,t,r){var i,s,a=mk(t)?Vn:We;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function Ck(e,t){var r=this._id;return arguments.length<2?ve(this.node(),r).on.on(e):this.each(yk(r,e,t))}function xk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function bk(){return this.on("end.remove",xk(this._id))}function kk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Yn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,c=a[o]=new Array(l),h,u,f=0;f<l;++f)(h=n[f])&&(u=e.call(h,h.__data__,f,n))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Da(c[f],t,r,f,c,ve(h,r)));return new Ze(a,this._parents,t,r)}function Tk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gu(e));for(var i=this._groups,s=i.length,a=[],o=[],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 f=e.call(h,h.__data__,u,l),d,g=ve(h,r),y=0,m=f.length;y<m;++y)(d=f[y])&&Da(d,t,r,y,f,g);a.push(f),o.push(h)}return new Ze(a,o,t,r)}var wk=ms.prototype.constructor;function Sk(){return new wk(this._groups,this._parents)}function _k(e,t){var r,i,s;return function(){var a=bi(this,e),o=(this.style.removeProperty(e),bi(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function Ru(e){return function(){this.style.removeProperty(e)}}function Bk(e,t,r){var i,s=r+"",a;return function(){var o=bi(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function vk(e,t,r){var i,s,a;return function(){var o=bi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),bi(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Lk(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=We(this,e),c=l.on,h=l.value[a]==null?n||(n=Ru(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(o,s=h),l.on=i}}function Fk(e,t,r){var i=(e+="")=="transform"?Mb:Du;return t==null?this.styleTween(e,_k(e,i)).on("end.style."+e,Ru(e)):typeof t=="function"?this.styleTween(e,vk(e,i,Zn(this,"style."+e,t))).each(Lk(this._id,e)):this.styleTween(e,Bk(e,i,t),r).on("end.style."+e,null)}function Ak(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Ek(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Ak(e,o,r)),i}return a._value=t,a}function Mk(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,Ek(e,t,r??""))}function $k(e){return function(){this.textContent=e}}function Ok(e){return function(){var t=e(this);this.textContent=t??""}}function Ik(e){return this.tween("text",typeof e=="function"?Ok(Zn(this,"text",e)):$k(e==null?"":e+""))}function Dk(e){return function(t){this.textContent=e.call(this,t)}}function Rk(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Dk(s)),t}return i._value=e,i}function Pk(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,Rk(e))}function Nk(){for(var e=this._name,t=this._id,r=Pu(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)if(l=o[c]){var h=ve(l,t);Da(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ze(i,this._parents,e,r)}function qk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var c=We(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&&a()})}var Wk=0;function Ze(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Pu(){return++Wk}var Ue=ms.prototype;Ze.prototype={constructor:Ze,select:kk,selectAll:Tk,selectChild:Ue.selectChild,selectChildren:Ue.selectChildren,filter:pk,merge:gk,selection:Sk,transition:Nk,call:Ue.call,nodes:Ue.nodes,node:Ue.node,size:Ue.size,empty:Ue.empty,each:Ue.each,on:Ck,attr:Kb,attrTween:ik,style:Fk,styleTween:Mk,text:Ik,textTween:Pk,remove:bk,tween:Ub,delay:ok,duration:hk,ease:uk,easeVarying:fk,end:qk,[Symbol.iterator]:Ue[Symbol.iterator]};function zk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Hk={time:null,delay:0,duration:250,ease:zk};function Yk(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 Uk(e){var t,r;e instanceof Ze?(t=e._id,e=e._name):(t=Pu(),(r=Hk).time=Xn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&Da(l,e,t,c,o,r||Yk(l,t));return new Ze(i,this._parents,e,t)}ms.prototype.interrupt=zb;ms.prototype.transition=Uk;const Qo=Math.PI,Ko=2*Qo,kr=1e-6,Gk=Ko-kr;function Nu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function jk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Nu;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Xk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Nu:jk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,c=s-r,h=o-t,u=n-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>kr)if(!(Math.abs(u*l-c*h)>kr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=s-n,y=l*l+c*c,m=d*d+g*g,C=Math.sqrt(y),b=Math.sqrt(f),k=a*Math.tan((Qo-Math.acos((y+f-m)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>kr&&this._append`L${t+w*h},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>h*g)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,u=1^o,f=o?s-a:a-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>kr||Math.abs(this._y1-h)>kr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ko+Ko),f>Gk?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>kr&&this._append`A${i},${i},0,${+(f>=Qo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ur(e){return function(){return e}}const KL=Math.abs,JL=Math.atan2,tF=Math.cos,eF=Math.max,rF=Math.min,iF=Math.sin,sF=Math.sqrt,Wh=1e-12,Qn=Math.PI,zh=Qn/2,aF=2*Qn;function oF(e){return e>1?0:e<-1?Qn:Math.acos(e)}function nF(e){return e>=1?zh:e<=-1?-zh:Math.asin(e)}function Vk(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 Xk(t)}function Zk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qu(e){this._context=e}qu.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 ts(e){return new qu(e)}function Qk(e){return e[0]}function Kk(e){return e[1]}function Jk(e,t){var r=Ur(!0),i=null,s=ts,a=null,o=Vk(n);e=typeof e=="function"?e:e===void 0?Qk:Ur(e),t=typeof t=="function"?t:t===void 0?Kk:Ur(t);function n(l){var c,h=(l=Zk(l)).length,u,f=!1,d;for(i==null&&(a=s(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ur(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ur(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ur(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class Wu{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 zu(e){return new Wu(e,!0)}function Hu(e){return new Wu(e,!1)}function ur(){}function da(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 Ra(e){this._context=e}Ra.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:da(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:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jo(e){return new Ra(e)}function Yu(e){this._context=e}Yu.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:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function t1(e){return new Yu(e)}function Uu(e){this._context=e}Uu.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:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e1(e){return new Uu(e)}function Gu(e,t){this._basis=new Ra(e),this._beta=t}Gu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const r1=function e(t){function r(i){return t===1?new Ra(i):new Gu(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function fa(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 Kn(e,t){this._context=e,this._k=(1-t)/6}Kn.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:fa(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:fa(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 ju=function e(t){function r(i){return new Kn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Jn(e,t){this._context=e,this._k=(1-t)/6}Jn.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:fa(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 i1=function e(t){function r(i){return new Jn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function tl(e,t){this._context=e,this._k=(1-t)/6}tl.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:fa(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 s1=function e(t){function r(i){return new tl(i,t)}return r.tension=function(i){return e(+i)},r}(0);function el(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Wh){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>Wh){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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Xu(e,t){this._context=e,this._alpha=t}Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){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:el(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 Vu=function e(t){function r(i){return t?new Xu(i,t):new Kn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Zu(e,t){this._context=e,this._alpha=t}Zu.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:el(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 a1=function e(t){function r(i){return t?new Zu(i,t):new Jn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Qu(e,t){this._context=e,this._alpha=t}Qu.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:el(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 o1=function e(t){function r(i){return t?new Qu(i,t):new tl(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Ku(e){this._context=e}Ku.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 n1(e){return new Ku(e)}function Hh(e){return e<0?-1:1}function Yh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(Hh(a)+Hh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Uh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function pa(e){this._context=e}pa.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:wo(this,this._t0,Uh(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,wo(this,Uh(this,r=Yh(this,e,t)),r);break;default:wo(this,this._t0,r=Yh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ju(e){this._context=new td(e)}(Ju.prototype=Object.create(pa.prototype)).point=function(e,t){pa.prototype.point.call(this,t,e)};function td(e){this._context=e}td.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function ed(e){return new pa(e)}function rd(e){return new Ju(e)}function id(e){this._context=e}id.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=Gh(e),s=Gh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Gh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function sd(e){return new id(e)}function Pa(e,t){this._context=e,this._t=t}Pa.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 ad(e){return new Pa(e,.5)}function od(e){return new Pa(e,0)}function nd(e){return new Pa(e,1)}function Gi(e,t,r){this.k=e,this.x=t,this.y=r}Gi.prototype={constructor:Gi,scale:function(e){return e===1?this:new Gi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gi(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+")"}};Gi.prototype;var l1=p(e=>{var s;const{securityLevel:t}=_t();let r=yt("body");if(t==="sandbox"){const o=((s=yt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=yt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function rl(e){return typeof e>"u"||e===null}p(rl,"isNothing");function ld(e){return typeof e=="object"&&e!==null}p(ld,"isObject");function hd(e){return Array.isArray(e)?e:rl(e)?[]:[e]}p(hd,"toArray");function cd(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}p(cd,"extend");function ud(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(ud,"repeat");function dd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(dd,"isNegativeZero");var h1=rl,c1=ld,u1=hd,d1=ud,f1=dd,p1=cd,Nt={isNothing:h1,isObject:c1,toArray:u1,repeat:d1,isNegativeZero:f1,extend:p1};function il(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
129
129
 
130
- `+e.mark.snippet),i+" "+r):i}p(el,"formatError");function xi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=el(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(xi,"YAMLException$1");xi.prototype=Object.create(Error.prototype);xi.prototype.constructor=xi;xi.prototype.toString=p(function(t){return this.name+": "+el(this,t)},"toString");var le=xi;function Us(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(Us,"getLine");function Gs(e,t){return Nt.repeat(" ",t-e.length)+e}p(Gs,"padStart");function cd(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Us(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Nt.repeat(" ",t.indent)+Gs((e.line-l+1).toString(),h)+" | "+c.str+`
131
- `+n;for(c=Us(e.buffer,i[o],s[o],e.position,u),n+=Nt.repeat(" ",t.indent)+Gs((e.line+1).toString(),h)+" | "+c.str+`
130
+ `+e.mark.snippet),i+" "+r):i}p(il,"formatError");function Ti(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=il(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Ti,"YAMLException$1");Ti.prototype=Object.create(Error.prototype);Ti.prototype.constructor=Ti;Ti.prototype.toString=p(function(t){return this.name+": "+il(this,t)},"toString");var le=Ti;function js(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(js,"getLine");function Xs(e,t){return Nt.repeat(" ",t-e.length)+e}p(Xs,"padStart");function fd(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=js(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Nt.repeat(" ",t.indent)+Xs((e.line-l+1).toString(),h)+" | "+c.str+`
131
+ `+n;for(c=js(e.buffer,i[o],s[o],e.position,u),n+=Nt.repeat(" ",t.indent)+Xs((e.line+1).toString(),h)+" | "+c.str+`
132
132
  `,n+=Nt.repeat("-",t.indent+h+3+c.pos)+`^
133
- `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)c=Us(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Nt.repeat(" ",t.indent)+Gs((e.line+l+1).toString(),h)+" | "+c.str+`
134
- `;return n.replace(/\n$/,"")}p(cd,"makeSnippet");var f1=cd,p1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],g1=["scalar","sequence","mapping"];function ud(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(ud,"compileStyleAliases");function dd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(p1.indexOf(r)===-1)throw new le('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=ud(t.styleAliases||null),g1.indexOf(this.kind)===-1)throw new le('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(dd,"Type$1");var Jt=dd;function Qo(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}p(Qo,"compileList");function fd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(fd,"compileMap");function fa(e){return this.extend(e)}p(fa,"Schema$1");fa.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Jt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Jt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Jt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(fa.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Qo(s,"implicit"),s.compiledExplicit=Qo(s,"explicit"),s.compiledTypeMap=fd(s.compiledImplicit,s.compiledExplicit),s},"extend");var m1=fa,y1=new Jt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),C1=new Jt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),x1=new Jt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),b1=new m1({explicit:[y1,C1,x1]});function pd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(pd,"resolveYamlNull");function gd(){return null}p(gd,"constructYamlNull");function md(e){return e===null}p(md,"isNull");var k1=new Jt("tag:yaml.org,2002:null",{kind:"scalar",resolve:pd,construct:gd,predicate:md,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function yd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(yd,"resolveYamlBoolean");function Cd(e){return e==="true"||e==="True"||e==="TRUE"}p(Cd,"constructYamlBoolean");function xd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(xd,"isBoolean");var T1=new Jt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yd,construct:Cd,predicate:xd,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function bd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(bd,"isHexCode");function kd(e){return 48<=e&&e<=55}p(kd,"isOctCode");function Td(e){return 48<=e&&e<=57}p(Td,"isDecCode");function wd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!bd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!kd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Td(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}p(wd,"resolveYamlInteger");function Sd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Sd,"constructYamlInteger");function _d(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Nt.isNegativeZero(e)}p(_d,"isInteger");var w1=new Jt("tag:yaml.org,2002:int",{kind:"scalar",resolve:wd,construct:Sd,predicate:_d,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),S1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Bd(e){return!(e===null||!S1.test(e)||e[e.length-1]==="_")}p(Bd,"resolveYamlFloat");function vd(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(vd,"constructYamlFloat");var _1=/^[-+]?[0-9]+e/;function Ld(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Nt.isNegativeZero(e))return"-0.0";return r=e.toString(10),_1.test(r)?r.replace("e",".e"):r}p(Ld,"representYamlFloat");function Fd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Nt.isNegativeZero(e))}p(Fd,"isFloat");var B1=new Jt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Bd,construct:vd,predicate:Fd,represent:Ld,defaultStyle:"lowercase"}),Ad=b1.extend({implicit:[k1,T1,w1,B1]}),v1=Ad,Ed=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Md=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function $d(e){return e===null?!1:Ed.exec(e)!==null||Md.exec(e)!==null}p($d,"resolveYamlTimestamp");function Od(e){var t,r,i,s,a,o,n,l=0,c=null,h,u,f;if(t=Ed.exec(e),t===null&&(t=Md.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,a,o,n,l)),c&&f.setTime(f.getTime()-c),f}p(Od,"constructYamlTimestamp");function Id(e){return e.toISOString()}p(Id,"representYamlTimestamp");var L1=new Jt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$d,construct:Od,instanceOf:Date,represent:Id});function Dd(e){return e==="<<"||e===null}p(Dd,"resolveYamlMerge");var F1=new Jt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Dd}),rl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
135
- \r`;function Pd(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=rl;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Pd,"resolveYamlBinary");function Rd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=rl,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}p(Rd,"constructYamlBinary");function Nd(e){var t="",r=0,i,s,a=e.length,o=rl;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Nd,"representYamlBinary");function qd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(qd,"isBinary");var A1=new Jt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pd,construct:Rd,predicate:qd,represent:Nd}),E1=Object.prototype.hasOwnProperty,M1=Object.prototype.toString;function Wd(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,M1.call(s)!=="[object Object]")return!1;for(a in s)if(E1.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Wd,"resolveYamlOmap");function zd(e){return e!==null?e:[]}p(zd,"constructYamlOmap");var $1=new Jt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Wd,construct:zd}),O1=Object.prototype.toString;function Hd(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],O1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}p(Hd,"resolveYamlPairs");function Yd(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}p(Yd,"constructYamlPairs");var I1=new Jt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hd,construct:Yd}),D1=Object.prototype.hasOwnProperty;function Ud(e){if(e===null)return!0;var t,r=e;for(t in r)if(D1.call(r,t)&&r[t]!==null)return!1;return!0}p(Ud,"resolveYamlSet");function Gd(e){return e!==null?e:{}}p(Gd,"constructYamlSet");var P1=new Jt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ud,construct:Gd}),jd=v1.extend({implicit:[L1,F1],explicit:[A1,$1,I1,P1]}),ur=Object.prototype.hasOwnProperty,pa=1,Xd=2,Vd=3,ga=4,To=1,R1=2,Uh=3,N1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,q1=/[\x85\u2028\u2029]/,W1=/[,\[\]\{\}]/,Zd=/^(?:!|!!|![a-z\-]+!)$/i,Kd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jo(e){return Object.prototype.toString.call(e)}p(Jo,"_class");function we(e){return e===10||e===13}p(we,"is_EOL");function hr(e){return e===9||e===32}p(hr,"is_WHITE_SPACE");function ie(e){return e===9||e===32||e===10||e===13}p(ie,"is_WS_OR_EOL");function Sr(e){return e===44||e===91||e===93||e===123||e===125}p(Sr,"is_FLOW_INDICATOR");function Qd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Qd,"fromHexCode");function Jd(e){return e===120?2:e===117?4:e===85?8:0}p(Jd,"escapedHexLen");function tf(e){return 48<=e&&e<=57?e-48:-1}p(tf,"fromDecimalCode");function tn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
136
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(tn,"simpleEscapeSequence");function ef(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ef,"charFromCodepoint");function il(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(il,"setProperty");var rf=new Array(256),sf=new Array(256);for(Cr=0;Cr<256;Cr++)rf[Cr]=tn(Cr)?1:0,sf[Cr]=tn(Cr);var Cr;function af(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||jd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(af,"State$1");function sl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=f1(r),new le(t,r)}p(sl,"generateError");function at(e,t){throw sl(e,t)}p(at,"throwError");function as(e,t){e.onWarning&&e.onWarning.call(null,sl(e,t))}p(as,"throwWarning");var Gh={YAML:p(function(t,r,i){var s,a,o;t.version!==null&&at(t,"duplication of %YAML directive"),i.length!==1&&at(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&at(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&at(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&as(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var s,a;i.length!==2&&at(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Zd.test(s)||at(t,"ill-formed tag handle (first argument) of the TAG directive"),ur.call(t.tagMap,s)&&at(t,'there is a previously declared suffix for "'+s+'" tag handle'),Kd.test(a)||at(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{at(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function Ve(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||at(e,"expected valid JSON character");else N1.test(n)&&at(e,"the stream contains non-printable characters");e.result+=n}}p(Ve,"captureSegment");function en(e,t,r,i){var s,a,o,n;for(Nt.isObject(r)||at(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],ur.call(t,a)||(il(t,a,r[a]),i[a]=!0)}p(en,"mergeMappings");function _r(e,t,r,i,s,a,o,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&at(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Jo(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&Jo(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)en(e,t,a[c],r);else en(e,t,a,r);else!e.json&&!ur.call(r,s)&&ur.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,at(e,"duplicated mapping key")),il(t,s,a),delete r[s];return t}p(_r,"storeMappingPair");function Pa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):at(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Pa,"readLineBreak");function Ot(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;hr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(we(s))for(Pa(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&as(e,"deficient indentation"),i}p(Ot,"skipSeparationSpace");function ms(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ie(r)))}p(ms,"testDocumentSeparator");function Ra(e,t){t===1?e.result+=" ":t>1&&(e.result+=Nt.repeat(`
137
- `,t-1))}p(Ra,"writeFoldedLines");function of(e,t,r){var i,s,a,o,n,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),ie(d)||Sr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),ie(s)||r&&Sr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),ie(s)||r&&Sr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),ie(i))break}else{if(e.position===e.lineStart&&ms(e)||r&&Sr(d))break;if(we(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Ot(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ve(e,a,o,!1),Ra(e,e.line-l),a=o=e.position,n=!1),hr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ve(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(of,"readPlainScalar");function nf(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ve(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else we(r)?(Ve(e,i,s,!0),Ra(e,Ot(e,!1,t)),i=s=e.position):e.position===e.lineStart&&ms(e)?at(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);at(e,"unexpected end of the stream within a single quoted scalar")}p(nf,"readSingleQuotedScalar");function lf(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ve(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ve(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),we(n))Ot(e,!1,t);else if(n<256&&rf[n])e.result+=sf[n],e.position++;else if((o=Jd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=Qd(n))>=0?a=(a<<4)+o:at(e,"expected hexadecimal character");e.result+=ef(a),e.position++}else at(e,"unknown escape sequence");r=i=e.position}else we(n)?(Ve(e,r,i,!0),Ra(e,Ot(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ms(e)?at(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}at(e,"unexpected end of the stream within a double quoted scalar")}p(lf,"readDoubleQuotedScalar");function hf(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,c,h,u,f,d,y=Object.create(null),g,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,n=[];else if(b===123)h=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Ot(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&at(e,"expected the node content, but found ','"):at(e,"missed comma between flow collection entries"),m=g=C=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),ie(c)&&(u=f=!0,e.position++,Ot(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Er(e,t,pa,!1,!0),m=e.tag,g=e.result,Ot(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Ot(e,!0,t),Er(e,t,pa,!1,!0),C=e.result),d?_r(e,n,y,m,g,C,i,s,a):u?n.push(_r(e,null,y,m,g,C,i,s,a)):n.push(g),Ot(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}at(e,"unexpected end of the stream within a flow collection")}p(hf,"readFlowCollection");function cf(e,t){var r,i,s=To,a=!1,o=!1,n=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)To===s?s=u===43?Uh:R1:at(e,"repeat of a chomping mode identifier");else if((h=tf(u))>=0)h===0?at(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?at(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(hr(u)){do u=e.input.charCodeAt(++e.position);while(hr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!we(u)&&u!==0)}for(;u!==0;){for(Pa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),we(u)){l++;continue}if(e.lineIndent<n){s===Uh?e.result+=Nt.repeat(`
138
- `,a?1+l:l):s===To&&a&&(e.result+=`
139
- `);break}for(i?hr(u)?(c=!0,e.result+=Nt.repeat(`
133
+ `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)c=js(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Nt.repeat(" ",t.indent)+Xs((e.line+l+1).toString(),h)+" | "+c.str+`
134
+ `;return n.replace(/\n$/,"")}p(fd,"makeSnippet");var g1=fd,m1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],y1=["scalar","sequence","mapping"];function pd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(pd,"compileStyleAliases");function gd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(m1.indexOf(r)===-1)throw new le('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=pd(t.styleAliases||null),y1.indexOf(this.kind)===-1)throw new le('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(gd,"Type$1");var te=gd;function tn(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}p(tn,"compileList");function md(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(md,"compileMap");function ga(e){return this.extend(e)}p(ga,"Schema$1");ga.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof te)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof te))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof te))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(ga.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=tn(s,"implicit"),s.compiledExplicit=tn(s,"explicit"),s.compiledTypeMap=md(s.compiledImplicit,s.compiledExplicit),s},"extend");var C1=ga,x1=new te("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),b1=new te("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),k1=new te("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),T1=new C1({explicit:[x1,b1,k1]});function yd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(yd,"resolveYamlNull");function Cd(){return null}p(Cd,"constructYamlNull");function xd(e){return e===null}p(xd,"isNull");var w1=new te("tag:yaml.org,2002:null",{kind:"scalar",resolve:yd,construct:Cd,predicate:xd,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function bd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(bd,"resolveYamlBoolean");function kd(e){return e==="true"||e==="True"||e==="TRUE"}p(kd,"constructYamlBoolean");function Td(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Td,"isBoolean");var S1=new te("tag:yaml.org,2002:bool",{kind:"scalar",resolve:bd,construct:kd,predicate:Td,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function wd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(wd,"isHexCode");function Sd(e){return 48<=e&&e<=55}p(Sd,"isOctCode");function _d(e){return 48<=e&&e<=57}p(_d,"isDecCode");function Bd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!wd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Sd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!_d(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}p(Bd,"resolveYamlInteger");function vd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(vd,"constructYamlInteger");function Ld(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Nt.isNegativeZero(e)}p(Ld,"isInteger");var _1=new te("tag:yaml.org,2002:int",{kind:"scalar",resolve:Bd,construct:vd,predicate:Ld,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),B1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Fd(e){return!(e===null||!B1.test(e)||e[e.length-1]==="_")}p(Fd,"resolveYamlFloat");function Ad(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Ad,"constructYamlFloat");var v1=/^[-+]?[0-9]+e/;function Ed(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Nt.isNegativeZero(e))return"-0.0";return r=e.toString(10),v1.test(r)?r.replace("e",".e"):r}p(Ed,"representYamlFloat");function Md(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Nt.isNegativeZero(e))}p(Md,"isFloat");var L1=new te("tag:yaml.org,2002:float",{kind:"scalar",resolve:Fd,construct:Ad,predicate:Md,represent:Ed,defaultStyle:"lowercase"}),$d=T1.extend({implicit:[w1,S1,_1,L1]}),F1=$d,Od=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Id=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 Dd(e){return e===null?!1:Od.exec(e)!==null||Id.exec(e)!==null}p(Dd,"resolveYamlTimestamp");function Rd(e){var t,r,i,s,a,o,n,l=0,c=null,h,u,f;if(t=Od.exec(e),t===null&&(t=Id.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,a,o,n,l)),c&&f.setTime(f.getTime()-c),f}p(Rd,"constructYamlTimestamp");function Pd(e){return e.toISOString()}p(Pd,"representYamlTimestamp");var A1=new te("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Dd,construct:Rd,instanceOf:Date,represent:Pd});function Nd(e){return e==="<<"||e===null}p(Nd,"resolveYamlMerge");var E1=new te("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Nd}),sl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
135
+ \r`;function qd(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=sl;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(qd,"resolveYamlBinary");function Wd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=sl,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}p(Wd,"constructYamlBinary");function zd(e){var t="",r=0,i,s,a=e.length,o=sl;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(zd,"representYamlBinary");function Hd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Hd,"isBinary");var M1=new te("tag:yaml.org,2002:binary",{kind:"scalar",resolve:qd,construct:Wd,predicate:Hd,represent:zd}),$1=Object.prototype.hasOwnProperty,O1=Object.prototype.toString;function Yd(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,O1.call(s)!=="[object Object]")return!1;for(a in s)if($1.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Yd,"resolveYamlOmap");function Ud(e){return e!==null?e:[]}p(Ud,"constructYamlOmap");var I1=new te("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Yd,construct:Ud}),D1=Object.prototype.toString;function Gd(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],D1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}p(Gd,"resolveYamlPairs");function jd(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}p(jd,"constructYamlPairs");var R1=new te("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Gd,construct:jd}),P1=Object.prototype.hasOwnProperty;function Xd(e){if(e===null)return!0;var t,r=e;for(t in r)if(P1.call(r,t)&&r[t]!==null)return!1;return!0}p(Xd,"resolveYamlSet");function Vd(e){return e!==null?e:{}}p(Vd,"constructYamlSet");var N1=new te("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xd,construct:Vd}),Zd=F1.extend({implicit:[A1,E1],explicit:[M1,I1,R1,N1]}),dr=Object.prototype.hasOwnProperty,ma=1,Qd=2,Kd=3,ya=4,So=1,q1=2,jh=3,W1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,z1=/[\x85\u2028\u2029]/,H1=/[,\[\]\{\}]/,Jd=/^(?:!|!!|![a-z\-]+!)$/i,tf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function en(e){return Object.prototype.toString.call(e)}p(en,"_class");function we(e){return e===10||e===13}p(we,"is_EOL");function cr(e){return e===9||e===32}p(cr,"is_WHITE_SPACE");function se(e){return e===9||e===32||e===10||e===13}p(se,"is_WS_OR_EOL");function Br(e){return e===44||e===91||e===93||e===123||e===125}p(Br,"is_FLOW_INDICATOR");function ef(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(ef,"fromHexCode");function rf(e){return e===120?2:e===117?4:e===85?8:0}p(rf,"escapedHexLen");function sf(e){return 48<=e&&e<=57?e-48:-1}p(sf,"fromDecimalCode");function rn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
136
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(rn,"simpleEscapeSequence");function af(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(af,"charFromCodepoint");function al(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(al,"setProperty");var of=new Array(256),nf=new Array(256);for(xr=0;xr<256;xr++)of[xr]=rn(xr)?1:0,nf[xr]=rn(xr);var xr;function lf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(lf,"State$1");function ol(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=g1(r),new le(t,r)}p(ol,"generateError");function at(e,t){throw ol(e,t)}p(at,"throwError");function ns(e,t){e.onWarning&&e.onWarning.call(null,ol(e,t))}p(ns,"throwWarning");var Xh={YAML:p(function(t,r,i){var s,a,o;t.version!==null&&at(t,"duplication of %YAML directive"),i.length!==1&&at(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&at(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&at(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&ns(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var s,a;i.length!==2&&at(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Jd.test(s)||at(t,"ill-formed tag handle (first argument) of the TAG directive"),dr.call(t.tagMap,s)&&at(t,'there is a previously declared suffix for "'+s+'" tag handle'),tf.test(a)||at(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{at(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function Ve(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||at(e,"expected valid JSON character");else W1.test(n)&&at(e,"the stream contains non-printable characters");e.result+=n}}p(Ve,"captureSegment");function sn(e,t,r,i){var s,a,o,n;for(Nt.isObject(r)||at(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],dr.call(t,a)||(al(t,a,r[a]),i[a]=!0)}p(sn,"mergeMappings");function vr(e,t,r,i,s,a,o,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&at(e,"nested arrays are not supported inside keys"),typeof s=="object"&&en(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&en(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)sn(e,t,a[c],r);else sn(e,t,a,r);else!e.json&&!dr.call(r,s)&&dr.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,at(e,"duplicated mapping key")),al(t,s,a),delete r[s];return t}p(vr,"storeMappingPair");function Na(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):at(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Na,"readLineBreak");function Ot(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;cr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(we(s))for(Na(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&ns(e,"deficient indentation"),i}p(Ot,"skipSeparationSpace");function Cs(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||se(r)))}p(Cs,"testDocumentSeparator");function qa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Nt.repeat(`
137
+ `,t-1))}p(qa,"writeFoldedLines");function hf(e,t,r){var i,s,a,o,n,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),se(d)||Br(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),se(s)||r&&Br(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),se(s)||r&&Br(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),se(i))break}else{if(e.position===e.lineStart&&Cs(e)||r&&Br(d))break;if(we(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Ot(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ve(e,a,o,!1),qa(e,e.line-l),a=o=e.position,n=!1),cr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ve(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(hf,"readPlainScalar");function cf(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ve(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else we(r)?(Ve(e,i,s,!0),qa(e,Ot(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Cs(e)?at(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);at(e,"unexpected end of the stream within a single quoted scalar")}p(cf,"readSingleQuotedScalar");function uf(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ve(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ve(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),we(n))Ot(e,!1,t);else if(n<256&&of[n])e.result+=nf[n],e.position++;else if((o=rf(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=ef(n))>=0?a=(a<<4)+o:at(e,"expected hexadecimal character");e.result+=af(a),e.position++}else at(e,"unknown escape sequence");r=i=e.position}else we(n)?(Ve(e,r,i,!0),qa(e,Ot(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Cs(e)?at(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}at(e,"unexpected end of the stream within a double quoted scalar")}p(uf,"readDoubleQuotedScalar");function df(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,c,h,u,f,d,g=Object.create(null),y,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,n=[];else if(b===123)h=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Ot(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&at(e,"expected the node content, but found ','"):at(e,"missed comma between flow collection entries"),m=y=C=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),se(c)&&(u=f=!0,e.position++,Ot(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,$r(e,t,ma,!1,!0),m=e.tag,y=e.result,Ot(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Ot(e,!0,t),$r(e,t,ma,!1,!0),C=e.result),d?vr(e,n,g,m,y,C,i,s,a):u?n.push(vr(e,null,g,m,y,C,i,s,a)):n.push(y),Ot(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}at(e,"unexpected end of the stream within a flow collection")}p(df,"readFlowCollection");function ff(e,t){var r,i,s=So,a=!1,o=!1,n=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)So===s?s=u===43?jh:q1:at(e,"repeat of a chomping mode identifier");else if((h=sf(u))>=0)h===0?at(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?at(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(cr(u)){do u=e.input.charCodeAt(++e.position);while(cr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!we(u)&&u!==0)}for(;u!==0;){for(Na(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),we(u)){l++;continue}if(e.lineIndent<n){s===jh?e.result+=Nt.repeat(`
138
+ `,a?1+l:l):s===So&&a&&(e.result+=`
139
+ `);break}for(i?cr(u)?(c=!0,e.result+=Nt.repeat(`
140
140
  `,a?1+l:l)):c?(c=!1,e.result+=Nt.repeat(`
141
141
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=Nt.repeat(`
142
142
  `,l):e.result+=Nt.repeat(`
143
- `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!we(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ve(e,r,e.position,!1)}return!0}p(cf,"readBlockScalar");function rn(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!ie(o))));){if(n=!0,e.position++,Ot(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Er(e,t,Vd,!1,!0),a.push(e.result),Ot(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)at(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}p(rn,"readBlockSequence");function uf(e,t,r){var i,s,a,o,n,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,y=null,g=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&ie(i))b===63?(m&&(_r(e,u,f,d,y,null,o,n,l),d=y=g=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):at(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!Er(e,r,Xd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);hr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),ie(b)||at(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(_r(e,u,f,d,y,null,o,n,l),d=y=g=null),C=!0,m=!1,s=!1,d=e.tag,y=e.result;else if(C)at(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)at(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(m&&(o=e.line,n=e.lineStart,l=e.position),Er(e,t,ga,!0,s)&&(m?y=e.result:g=e.result),m||(_r(e,u,f,d,y,g,o,n,l),d=y=g=null),Ot(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)at(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&_r(e,u,f,d,y,null,o,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),C}p(uf,"readBlockMapping");function df(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&at(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):at(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ie(o);)o===33&&(i?at(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Zd.test(s)||at(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),W1.test(a)&&at(e,"tag suffix cannot contain flow indicator characters")}a&&!Kd.test(a)&&at(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{at(e,"tag name is malformed: "+a)}return r?e.tag=a:ur.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:at(e,'undeclared tag handle "'+s+'"'),!0}p(df,"readTagProperty");function ff(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&at(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ie(r)&&!Sr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(ff,"readAnchorProperty");function pf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ie(i)&&!Sr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ur.call(e.anchorMap,r)||at(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ot(e,!0,-1),!0}p(pf,"readAlias");function Er(e,t,r,i,s){var a,o,n,l=1,c=!1,h=!1,u,f,d,y,g,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=ga===r||Vd===r,i&&Ot(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;df(e)||ff(e);)Ot(e,!0,-1)?(c=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||ga===r)&&(pa===r||Xd===r?g=t:g=t+1,m=e.position-e.lineStart,l===1?n&&(rn(e,m)||uf(e,m,g))||hf(e,g)?h=!0:(o&&cf(e,g)||nf(e,g)||lf(e,g)?h=!0:pf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&at(e,"alias node should not have any properties")):of(e,g,pa===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&rn(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&at(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(y=e.implicitTypes[u],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ur.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){y=d[u];break}y||at(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&at(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):at(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(Er,"composeNode");function gf(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Ot(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!ie(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&at(e,"directive name must not be less than one character in length");o!==0;){for(;hr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!we(o));break}if(we(o))break;for(r=e.position;o!==0&&!ie(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Pa(e),ur.call(Gh,i)?Gh[i](e,i,s):as(e,'unknown document directive "'+i+'"')}if(Ot(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ot(e,!0,-1)):a&&at(e,"directives end mark is expected"),Er(e,e.lineIndent-1,ga,!1,!0),Ot(e,!0,-1),e.checkLineBreaks&&q1.test(e.input.slice(t,e.position))&&as(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ms(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ot(e,!0,-1));return}if(e.position<e.length-1)at(e,"end of the stream or a document separator is expected");else return}p(gf,"readDocument");function al(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
144
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new af(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,at(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)gf(r);return r.documents}p(al,"loadDocuments");function z1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=al(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}p(z1,"loadAll$1");function mf(e,t){var r=al(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new le("expected a single document in the stream, but found more")}}p(mf,"load$1");var H1=mf,Y1={load:H1},yf=Object.prototype.toString,Cf=Object.prototype.hasOwnProperty,ol=65279,U1=9,os=10,G1=13,j1=32,X1=33,V1=34,sn=35,Z1=37,K1=38,Q1=39,J1=42,xf=44,t2=45,ma=58,e2=61,r2=62,i2=63,s2=64,bf=91,kf=93,a2=96,Tf=123,o2=124,wf=125,te={};te[0]="\\0";te[7]="\\a";te[8]="\\b";te[9]="\\t";te[10]="\\n";te[11]="\\v";te[12]="\\f";te[13]="\\r";te[27]="\\e";te[34]='\\"';te[92]="\\\\";te[133]="\\N";te[160]="\\_";te[8232]="\\L";te[8233]="\\P";var n2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],l2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Sf(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Cf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}p(Sf,"compileStyleMap");function _f(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new le("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Nt.repeat("0",i-t.length)+t}p(_f,"encodeHex");var h2=1,ns=2;function Bf(e){this.schema=e.schema||jd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Nt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Sf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ns:h2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Bf,"State");function an(e,t){for(var r=Nt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
143
+ `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!we(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ve(e,r,e.position,!1)}return!0}p(ff,"readBlockScalar");function an(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!se(o))));){if(n=!0,e.position++,Ot(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,$r(e,t,Kd,!1,!0),a.push(e.result),Ot(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)at(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}p(an,"readBlockSequence");function pf(e,t,r){var i,s,a,o,n,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,y=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&se(i))b===63?(m&&(vr(e,u,f,d,g,null,o,n,l),d=g=y=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):at(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!$r(e,r,Qd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);cr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),se(b)||at(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(vr(e,u,f,d,g,null,o,n,l),d=g=y=null),C=!0,m=!1,s=!1,d=e.tag,g=e.result;else if(C)at(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)at(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(m&&(o=e.line,n=e.lineStart,l=e.position),$r(e,t,ya,!0,s)&&(m?g=e.result:y=e.result),m||(vr(e,u,f,d,g,y,o,n,l),d=g=y=null),Ot(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)at(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&vr(e,u,f,d,g,null,o,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),C}p(pf,"readBlockMapping");function gf(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&at(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):at(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!se(o);)o===33&&(i?at(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Jd.test(s)||at(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),H1.test(a)&&at(e,"tag suffix cannot contain flow indicator characters")}a&&!tf.test(a)&&at(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{at(e,"tag name is malformed: "+a)}return r?e.tag=a:dr.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:at(e,'undeclared tag handle "'+s+'"'),!0}p(gf,"readTagProperty");function mf(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&at(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!se(r)&&!Br(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(mf,"readAnchorProperty");function yf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!se(i)&&!Br(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),dr.call(e.anchorMap,r)||at(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ot(e,!0,-1),!0}p(yf,"readAlias");function $r(e,t,r,i,s){var a,o,n,l=1,c=!1,h=!1,u,f,d,g,y,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=ya===r||Kd===r,i&&Ot(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;gf(e)||mf(e);)Ot(e,!0,-1)?(c=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||ya===r)&&(ma===r||Qd===r?y=t:y=t+1,m=e.position-e.lineStart,l===1?n&&(an(e,m)||pf(e,m,y))||df(e,y)?h=!0:(o&&ff(e,y)||cf(e,y)||uf(e,y)?h=!0:yf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&at(e,"alias node should not have any properties")):hf(e,y,ma===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&an(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&at(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(dr.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||at(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&at(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):at(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p($r,"composeNode");function Cf(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Ot(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!se(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&at(e,"directive name must not be less than one character in length");o!==0;){for(;cr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!we(o));break}if(we(o))break;for(r=e.position;o!==0&&!se(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Na(e),dr.call(Xh,i)?Xh[i](e,i,s):ns(e,'unknown document directive "'+i+'"')}if(Ot(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ot(e,!0,-1)):a&&at(e,"directives end mark is expected"),$r(e,e.lineIndent-1,ya,!1,!0),Ot(e,!0,-1),e.checkLineBreaks&&z1.test(e.input.slice(t,e.position))&&ns(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Cs(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ot(e,!0,-1));return}if(e.position<e.length-1)at(e,"end of the stream or a document separator is expected");else return}p(Cf,"readDocument");function nl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
144
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new lf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,at(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Cf(r);return r.documents}p(nl,"loadDocuments");function Y1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=nl(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}p(Y1,"loadAll$1");function xf(e,t){var r=nl(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new le("expected a single document in the stream, but found more")}}p(xf,"load$1");var U1=xf,G1={load:U1},bf=Object.prototype.toString,kf=Object.prototype.hasOwnProperty,ll=65279,j1=9,ls=10,X1=13,V1=32,Z1=33,Q1=34,on=35,K1=37,J1=38,t2=39,e2=42,Tf=44,r2=45,Ca=58,i2=61,s2=62,a2=63,o2=64,wf=91,Sf=93,n2=96,_f=123,l2=124,Bf=125,ee={};ee[0]="\\0";ee[7]="\\a";ee[8]="\\b";ee[9]="\\t";ee[10]="\\n";ee[11]="\\v";ee[12]="\\f";ee[13]="\\r";ee[27]="\\e";ee[34]='\\"';ee[92]="\\\\";ee[133]="\\N";ee[160]="\\_";ee[8232]="\\L";ee[8233]="\\P";var h2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],c2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function vf(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&kf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}p(vf,"compileStyleMap");function Lf(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new le("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Nt.repeat("0",i-t.length)+t}p(Lf,"encodeHex");var u2=1,hs=2;function Ff(e){this.schema=e.schema||Zd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Nt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=vf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?hs:u2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Ff,"State");function nn(e,t){for(var r=Nt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
145
145
  `,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
146
- `&&(a+=r),a+=o;return a}p(an,"indentString");function ya(e,t){return`
147
- `+Nt.repeat(" ",e.indent*t)}p(ya,"generateNextLine");function vf(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}p(vf,"testImplicitResolving");function ls(e){return e===j1||e===U1}p(ls,"isWhitespace");function bi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ol||65536<=e&&e<=1114111}p(bi,"isPrintable");function on(e){return bi(e)&&e!==ol&&e!==G1&&e!==os}p(on,"isNsCharOrWhitespace");function nn(e,t,r){var i=on(e),s=i&&!ls(e);return(r?i:i&&e!==xf&&e!==bf&&e!==kf&&e!==Tf&&e!==wf)&&e!==sn&&!(t===ma&&!s)||on(t)&&!ls(t)&&e===sn||t===ma&&s}p(nn,"isPlainSafe");function Lf(e){return bi(e)&&e!==ol&&!ls(e)&&e!==t2&&e!==i2&&e!==ma&&e!==xf&&e!==bf&&e!==kf&&e!==Tf&&e!==wf&&e!==sn&&e!==K1&&e!==J1&&e!==X1&&e!==o2&&e!==e2&&e!==r2&&e!==Q1&&e!==V1&&e!==Z1&&e!==s2&&e!==a2}p(Lf,"isPlainSafeFirst");function Ff(e){return!ls(e)&&e!==ma}p(Ff,"isPlainSafeLast");function Zr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Zr,"codePointAt");function nl(e){var t=/^\n* /;return t.test(e)}p(nl,"needIndentIndicator");var Af=1,ln=2,Ef=3,Mf=4,jr=5;function $f(e,t,r,i,s,a,o,n){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,y=-1,g=Lf(Zr(e,0))&&Ff(Zr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Zr(e,l),!bi(c))return jr;g=g&&nn(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Zr(e,l),c===os)u=!0,d&&(f=f||l-y-1>i&&e[y+1]!==" ",y=l);else if(!bi(c))return jr;g=g&&nn(c,h,n),h=c}f=f||d&&l-y-1>i&&e[y+1]!==" "}return!u&&!f?g&&!o&&!s(e)?Af:a===ns?jr:ln:r>9&&nl(e)?jr:o?a===ns?jr:ln:f?Mf:Ef}p($f,"chooseScalarStyle");function Of(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===ns?'""':"''";if(!e.noCompatMode&&(n2.indexOf(t)!==-1||l2.test(t)))return e.quotingType===ns?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return vf(e,c)}switch(p(l,"testAmbiguity"),$f(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Af:return t;case ln:return"'"+t.replace(/'/g,"''")+"'";case Ef:return"|"+hn(t,e.indent)+cn(an(t,a));case Mf:return">"+hn(t,e.indent)+cn(an(If(t,o),a));case jr:return'"'+Df(t)+'"';default:throw new le("impossible error: invalid scalar style")}}()}p(Of,"writeScalar");function hn(e,t){var r=nl(e)?String(t):"",i=e[e.length-1]===`
146
+ `&&(a+=r),a+=o;return a}p(nn,"indentString");function xa(e,t){return`
147
+ `+Nt.repeat(" ",e.indent*t)}p(xa,"generateNextLine");function Af(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}p(Af,"testImplicitResolving");function cs(e){return e===V1||e===j1}p(cs,"isWhitespace");function wi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ll||65536<=e&&e<=1114111}p(wi,"isPrintable");function ln(e){return wi(e)&&e!==ll&&e!==X1&&e!==ls}p(ln,"isNsCharOrWhitespace");function hn(e,t,r){var i=ln(e),s=i&&!cs(e);return(r?i:i&&e!==Tf&&e!==wf&&e!==Sf&&e!==_f&&e!==Bf)&&e!==on&&!(t===Ca&&!s)||ln(t)&&!cs(t)&&e===on||t===Ca&&s}p(hn,"isPlainSafe");function Ef(e){return wi(e)&&e!==ll&&!cs(e)&&e!==r2&&e!==a2&&e!==Ca&&e!==Tf&&e!==wf&&e!==Sf&&e!==_f&&e!==Bf&&e!==on&&e!==J1&&e!==e2&&e!==Z1&&e!==l2&&e!==i2&&e!==s2&&e!==t2&&e!==Q1&&e!==K1&&e!==o2&&e!==n2}p(Ef,"isPlainSafeFirst");function Mf(e){return!cs(e)&&e!==Ca}p(Mf,"isPlainSafeLast");function Jr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Jr,"codePointAt");function hl(e){var t=/^\n* /;return t.test(e)}p(hl,"needIndentIndicator");var $f=1,cn=2,Of=3,If=4,Zr=5;function Df(e,t,r,i,s,a,o,n){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,y=Ef(Jr(e,0))&&Mf(Jr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Jr(e,l),!wi(c))return Zr;y=y&&hn(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Jr(e,l),c===ls)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!wi(c))return Zr;y=y&&hn(c,h,n),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?y&&!o&&!s(e)?$f:a===hs?Zr:cn:r>9&&hl(e)?Zr:o?a===hs?Zr:cn:f?If:Of}p(Df,"chooseScalarStyle");function Rf(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===hs?'""':"''";if(!e.noCompatMode&&(h2.indexOf(t)!==-1||c2.test(t)))return e.quotingType===hs?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Af(e,c)}switch(p(l,"testAmbiguity"),Df(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case $f:return t;case cn:return"'"+t.replace(/'/g,"''")+"'";case Of:return"|"+un(t,e.indent)+dn(nn(t,a));case If:return">"+un(t,e.indent)+dn(nn(Pf(t,o),a));case Zr:return'"'+Nf(t)+'"';default:throw new le("impossible error: invalid scalar style")}}()}p(Rf,"writeScalar");function un(e,t){var r=hl(e)?String(t):"",i=e[e.length-1]===`
148
148
  `,s=i&&(e[e.length-2]===`
149
149
  `||e===`
150
150
  `),a=s?"+":i?"":"-";return r+a+`
151
- `}p(hn,"blockHeader");function cn(e){return e[e.length-1]===`
152
- `?e.slice(0,-1):e}p(cn,"dropEndingNewline");function If(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
153
- `);return c=c!==-1?c:e.length,r.lastIndex=c,un(e.slice(0,c),t)}(),s=e[0]===`
151
+ `}p(un,"blockHeader");function dn(e){return e[e.length-1]===`
152
+ `?e.slice(0,-1):e}p(dn,"dropEndingNewline");function Pf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
153
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,fn(e.slice(0,c),t)}(),s=e[0]===`
154
154
  `||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
155
- `:"")+un(l,t),s=a}return i}p(If,"foldString");function un(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
155
+ `:"")+fn(l,t),s=a}return i}p(Pf,"foldString");function fn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
156
156
  `+e.slice(s,a),s=a+1),o=n;return l+=`
157
157
  `,e.length-s>t&&o>s?l+=e.slice(s,o)+`
158
- `+e.slice(o+1):l+=e.slice(s),l.slice(1)}p(un,"foldLine");function Df(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Zr(e,s),i=te[r],!i&&bi(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||_f(r);return t}p(Df,"escapeString");function Pf(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Pe(e,t,n,!1,!1)||typeof n>"u"&&Pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}p(Pf,"writeFlowSequence");function dn(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Pe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ya(e,t)),e.dump&&os===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}p(dn,"writeBlockSequence");function Rf(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,c,h;for(o=0,n=a.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Pe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Pe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}p(Rf,"writeFlowMapping");function Nf(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new le("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=ya(e,t)),c=o[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Pe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&os===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=ya(e,t)),Pe(e,t+1,h,!0,u)&&(e.dump&&os===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=a,e.dump=s||"{}"}p(Nf,"writeBlockMapping");function fn(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,yf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Cf.call(n.represent,l))i=n.represent[l](t,l);else throw new le("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(fn,"detectType");function Pe(e,t,r,i,s,a,o){e.tag=null,e.dump=r,fn(e,r,!1)||fn(e,r,!0);var n=yf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Nf(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(Rf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?dn(e,t-1,e.dump,s):dn(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(Pf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Of(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new le("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Pe,"writeNode");function qf(e,t){var r=[],i=[],s,a;for(Ca(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}p(qf,"getDuplicateReferences");function Ca(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Ca(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)Ca(e[i[s]],t,r)}p(Ca,"inspectNode");function c2(e,t){t=t||{};var r=new Bf(t);r.noRefs||qf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Pe(r,0,i,!0,!0)?r.dump+`
159
- `:""}p(c2,"dump$1");function u2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(u2,"renamed");var d2=Ad,f2=Y1.load;/*! Bundled license information:
158
+ `+e.slice(o+1):l+=e.slice(s),l.slice(1)}p(fn,"foldLine");function Nf(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Jr(e,s),i=ee[r],!i&&wi(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Lf(r);return t}p(Nf,"escapeString");function qf(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Re(e,t,n,!1,!1)||typeof n>"u"&&Re(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}p(qf,"writeFlowSequence");function pn(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Re(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Re(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=xa(e,t)),e.dump&&ls===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}p(pn,"writeBlockSequence");function Wf(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,c,h;for(o=0,n=a.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Re(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Re(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}p(Wf,"writeFlowMapping");function zf(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new le("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=xa(e,t)),c=o[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Re(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ls===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=xa(e,t)),Re(e,t+1,h,!0,u)&&(e.dump&&ls===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=a,e.dump=s||"{}"}p(zf,"writeBlockMapping");function gn(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,bf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(kf.call(n.represent,l))i=n.represent[l](t,l);else throw new le("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(gn,"detectType");function Re(e,t,r,i,s,a,o){e.tag=null,e.dump=r,gn(e,r,!1)||gn(e,r,!0);var n=bf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(zf(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(Wf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?pn(e,t-1,e.dump,s):pn(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(qf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Rf(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new le("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Re,"writeNode");function Hf(e,t){var r=[],i=[],s,a;for(ba(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}p(Hf,"getDuplicateReferences");function ba(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)ba(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)ba(e[i[s]],t,r)}p(ba,"inspectNode");function d2(e,t){t=t||{};var r=new Ff(t);r.noRefs||Hf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Re(r,0,i,!0,!0)?r.dump+`
159
+ `:""}p(d2,"dump$1");function f2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(f2,"renamed");var p2=$d,g2=G1.load;/*! Bundled license information:
160
160
 
161
161
  js-yaml/dist/js-yaml.mjs:
162
162
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
163
- */var p2=p(e=>{const{handDrawnSeed:t}=St();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),wi=p(e=>{const t=g2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),g2=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"),Wf=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"),rt=p(e=>{const{stylesArray:t}=wi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Wf(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),J=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=St(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=wi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:m2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),m2=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"),zf={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.BLANK_URL=zt.relativeFirstCharacters=zt.whitespaceEscapeCharsRegex=zt.urlSchemeRegex=zt.ctrlCharactersRegex=zt.htmlCtrlEntityRegex=zt.htmlEntitiesRegex=zt.invalidProtocolRegex=void 0;zt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;zt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;zt.htmlCtrlEntityRegex=/&(newline|tab);/gi;zt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;zt.urlSchemeRegex=/^.+(:|&colon;)/gim;zt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;zt.relativeFirstCharacters=[".","/"];zt.BLANK_URL="about:blank";Object.defineProperty(zf,"__esModule",{value:!0});var y2=zf.sanitizeUrl=k2,Kt=zt;function C2(e){return Kt.relativeFirstCharacters.indexOf(e[0])>-1}function x2(e){var t=e.replace(Kt.ctrlCharactersRegex,"");return t.replace(Kt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function b2(e){return URL.canParse(e)}function jh(e){try{return decodeURIComponent(e)}catch{return e}}function k2(e){if(!e)return Kt.BLANK_URL;var t,r=jh(e.trim());do r=x2(r).replace(Kt.htmlCtrlEntityRegex,"").replace(Kt.ctrlCharactersRegex,"").replace(Kt.whitespaceEscapeCharsRegex,"").trim(),r=jh(r),t=r.match(Kt.ctrlCharactersRegex)||r.match(Kt.htmlEntitiesRegex)||r.match(Kt.htmlCtrlEntityRegex)||r.match(Kt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Kt.BLANK_URL;if(C2(i))return i;var s=i.trimStart(),a=s.match(Kt.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Kt.invalidProtocolRegex.test(o))return Kt.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!b2(n))return Kt.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function wo(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function T2(){}function Hf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ll(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const w2="[object RegExp]",Yf="[object String]",Uf="[object Number]",Gf="[object Boolean]",jf="[object Arguments]",S2="[object Symbol]",_2="[object Date]",B2="[object Map]",v2="[object Set]",L2="[object Array]",F2="[object ArrayBuffer]",A2="[object Object]",E2="[object DataView]",M2="[object Uint8Array]",$2="[object Uint8ClampedArray]",O2="[object Uint16Array]",I2="[object Uint32Array]",D2="[object Int8Array]",P2="[object Int16Array]",R2="[object Int32Array]",N2="[object Float32Array]",q2="[object Float64Array]",Xh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function hl(e){return typeof Xh.Buffer<"u"&&Xh.Buffer.isBuffer(e)}function W2(e){return Number.isSafeInteger(e)&&e>=0}function Xf(e){return e!=null&&typeof e!="function"&&W2(e.length)}function z2(e){return e==="__proto__"}function cl(e){return e==null||typeof e!="object"&&typeof e!="function"}function ul(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function H2(e,t){return Kr(e,void 0,e,new Map,t)}function Kr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(cl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Kr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Kr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Kr(n,void 0,r,i,s));return o}if(hl(e))return e.subarray();if(ul(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Kr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,Ce(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof e=="object"&&Y2(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),Ce(o,e,r,i,s),o}return e}function Ce(e,t,r=e,i,s){const a=[...Object.keys(t),...Hf(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Kr(t[n],n,r,i,s))}}function Y2(e){switch(ll(e)){case jf:case L2:case F2:case E2:case Gf:case _2:case N2:case q2:case D2:case P2:case R2:case B2:case Uf:case A2:case w2:case v2:case Yf:case S2:case M2:case $2:case O2:case I2:return!0;default:return!1}}function U2(e,t){return H2(e,(r,i,s,a)=>{if(typeof e=="object"){if(ll(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),Ce(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Uf:case Yf:case Gf:{const o=new e.constructor(e==null?void 0:e.valueOf());return Ce(o,e),o}case jf:{const o={};return Ce(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Vh(e){return U2(e)}function pn(e){return e!==null&&typeof e=="object"&&ll(e)==="[object Arguments]"}function gn(e){return typeof e=="object"&&e!==null}function G2(e){return gn(e)&&Xf(e)}function ys(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],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(ys.Cache||Map),r}ys.Cache=Map;function js(e){return ul(e)}function j2(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function X2(e){if(cl(e))return e;if(Array.isArray(e)||ul(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}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 V2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=Xs(s,o,i,new Map)}return s}function Xs(e,t,r,i){if(cl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return X2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Hf(t)];for(let a=0;a<s.length;a++){const o=s[a];if(z2(o))continue;let n=t[o],l=e[o];if(pn(n)&&(n={...n}),pn(l)&&(l={...l}),hl(n)&&(n=Vh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const d=u[f];h[d]=l[d]}l=h}else if(G2(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||gn(l)&&gn(n)&&(wo(l)||wo(n)||js(l)||js(n))?e[o]=Xs(l,n,r,i):l==null&&wo(n)?e[o]=Xs({},n,r,i):l==null&&js(n)?e[o]=Vh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function Z2(e,...t){return V2(e,...t,T2)}function Zh(e){if(e==null)return!0;if(Xf(e))return typeof e.splice!="function"&&typeof e!="string"&&!hl(e)&&!js(e)&&!pn(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 j2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var K2="​",Q2={curveBasis:Ko,curveBasisClosed:Qk,curveBasisOpen:Jk,curveBumpX:Nu,curveBumpY:qu,curveBundle:t1,curveCardinalClosed:e1,curveCardinalOpen:r1,curveCardinal:Yu,curveCatmullRomClosed:i1,curveCatmullRomOpen:s1,curveCatmullRom:Gu,curveLinear:Ki,curveLinearClosed:a1,curveMonotoneX:Qu,curveMonotoneY:Ju,curveNatural:ed,curveStep:rd,curveStepAfter:sd,curveStepBefore:id},J2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,tT=p(function(e,t){const r=Vf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Js(o),i=Rt(i,[...o])}else i=r.args;if(!i)return;let s=Dn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Vf=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${J2.source})(?=[}][%]{2}).*
164
- `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Zi.exec(e))!==null;)if(a.index===Zi.lastIndex&&Zi.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return H.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),eT=p(function(e){return e.replace(Zi,"")},"removeDirectives"),rT=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function dl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Q2[r]??t}p(dl,"interpolateToCurve");function Zf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?y2(r):r}p(Zf,"formatUrl");var iT=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){H.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function fl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(fl,"distance");function Kf(e){let t,r=0;e.forEach(s=>{r+=fl(s,t),t=s});const i=r/2;return pl(e,i)}p(Kf,"traverseEdge");function Qf(e){return e.length===1?e[0]:Kf(e)}p(Qf,"calcLabelPosition");var Kh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),pl=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=fl(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Kh((1-o)*r.x+o*s.x,5),y:Kh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sT=p((e,t,r)=>{H.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=pl(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Jf(e,t,r){const i=structuredClone(r);H.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=pl(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}p(Jf,"calcTerminalLabelPosition");function tp(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(tp,"getStylesFromArray");var Qh=0,aT=p(()=>(Qh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Qh),"generateId");function ep(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(ep,"makeRandomHex");var oT=p(e=>ep(e.length),"random"),nT=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"),lT=p(function(e,t){const r=t.text.replace(fs.lineBreakRegex," "),[,i]=Na(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),hT=ys((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),fs.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ke(`${o} `,r),c=Ke(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=cT(o,t,"-",r);s.push(a,...f),a=d}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),cT=ys((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(Ke(c,i)>=t){const u=l+1,f=s.length===u,d=`${c}${r}`;a.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function rp(e,t){return gl(e,t).height}p(rp,"calculateTextHeight");function Ke(e,t){return gl(e,t).width}p(Ke,"calculateTextWidth");var gl=ys((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Na(r),o=["sans-serif",i],n=e.split(fs.lineBreakRegex),l=[],c=yt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const y={width:0,height:0,lineHeight:0};for(const g of n){const m=nT();m.text=g||K2;const C=lT(h,m).style("font-size",a).style("font-weight",s).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),d=Math.round(b.height),y.height+=d,y.lineHeight=Math.round(Math.max(y.lineHeight,d))}l.push(y)}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}`),pi,uT=(pi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(pi,"InitIDGenerator"),pi),Ms,dT=p(function(e){return Ms=Ms||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ms.innerHTML=e,unescape(Ms.textContent)},"entityDecode");function ml(e){return"str"in e}p(ml,"isDetailedError");var fT=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Na=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 yl(e,t){return Z2({},e,t)}p(yl,"cleanAndMerge");var Te={assignWithDepth:Rt,wrapLabel:hT,calculateTextHeight:rp,calculateTextWidth:Ke,calculateTextDimensions:gl,cleanAndMerge:yl,detectInit:tT,detectDirective:Vf,isSubstringInArray:rT,interpolateToCurve:dl,calcLabelPosition:Qf,calcCardinalityPosition:sT,calcTerminalLabelPosition:Jf,formatUrl:Zf,getStylesFromArray:tp,generateId:aT,random:oT,runFunc:iT,entityDecode:dT,insertTitle:fT,isLabelCoordinateInPath:ip,parseFontSize:Na,InitIDGenerator:uT},pT=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"),Mr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tF=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ht(e){return e??null}p(Ht,"handleUndefinedAttr");function ip(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(ip,"isLabelCoordinateInPath");var Cl=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function sp(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=St().fontSize?St().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Xc.fontSize]=Na(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";a(s)}p(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}p(sp,"configureLabelImages");const gT=Object.freeze({left:0,top:0,width:16,height:16}),xa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ap=Object.freeze({...gT,...xa}),mT=Object.freeze({...ap,body:"",hidden:!1}),yT=Object.freeze({width:null,height:null}),CT=Object.freeze({...yT,...xa}),xT=(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 So(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return So(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return So(n,r)?n:null}return null},So=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function bT(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 Jh(e,t){const r=bT(e,t);for(const i in mT)i in xa?i in e&&!(i in r)&&(r[i]=xa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function kT(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function tc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Jh(i[n]||s[n],a)}return o(t),r.forEach(o),Jh(e,a)}function TT(e,t){if(e.icons[t])return tc(e,t,[]);const r=kT(e,[t])[t];return r?tc(e,t,r):null}const wT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ST=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ec(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(wT);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=ST.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function _T(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function BT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function vT(e,t,r){const i=_T(e);return BT(i.defs,t+i.content+r)}const LT=e=>e==="unset"||e==="undefined"||e==="none";function FT(e,t){const r={...ap,...e},i={...CT,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const m=[],C=g.hFlip,b=g.vFlip;let k=g.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),m.length&&(a=vT(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=ec(u,l/c)):(h=o==="auto"?l:o,u=n===null?ec(h,c/l):n==="auto"?c:n);const f={},d=(g,m)=>{LT(m)||(f[g]=m.toString())};d("width",h),d("height",u);const y=[s.left,s.top,l,c];return f.viewBox=y.join(" "),{attributes:f,viewBox:y,body:a}}const AT=/\sid="(\S+)"/g,rc=new Map;function ET(e){e=e.replace(/[0-9]+$/,"")||"a";const t=rc.get(e)||0;return rc.set(e,t+1),t?`${e}${t}`:e}function MT(e){const t=[];let r;for(;r=AT.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=ET(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function $T(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 OT={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},mn=new Map,op=new Map,IT=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(H.debug("Registering icon pack:",t.name),"loader"in t)op.set(t.name,t.loader);else if("icons"in t)mn.set(t.name,t.icons);else throw H.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),np=p(async(e,t)=>{const r=xT(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=mn.get(i);if(!s){const o=op.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},mn.set(i,s)}catch(n){throw H.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=TT(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),DT=p(async e=>{try{return await np(e),!0}catch{return!1}},"isIconAvailable"),Cs=p(async(e,t,r)=>{let i;try{i=await np(e,t==null?void 0:t.fallbackPrefix)}catch(o){H.error(o),i=OT}const s=FT(i,t),a=$T(MT(s.body),{...s.attributes,...r});return _e(a,Et())},"getIconSVG");function xl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ir=xl();function lp(e){Ir=e}var Qi={exec:()=>null};function _t(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(se.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var PT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),se={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")},RT=/^(?:[ \t]*(?:\n|$))+/,NT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,WT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bl=/(?:[*+-]|\d{1,9}[.)])/,hp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cp=_t(hp).replace(/bull/g,bl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),zT=_t(hp).replace(/bull/g,bl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),kl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,HT=/^[^\n]+/,Tl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,YT=_t(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),UT=_t(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bl).getRegex(),qa="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,GT=_t("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wl).replace("tag",qa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),up=_t(kl).replace("hr",xs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qa).getRegex(),jT=_t(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",up).getRegex(),Sl={blockquote:jT,code:NT,def:YT,fences:qT,heading:WT,hr:xs,html:GT,lheading:cp,list:UT,newline:RT,paragraph:up,table:Qi,text:HT},ic=_t("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qa).getRegex(),XT={...Sl,lheading:zT,table:ic,paragraph:_t(kl).replace("hr",xs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ic).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qa).getRegex()},VT={...Sl,html:_t(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_t(kl).replace("hr",xs).replace("heading",` *#{1,6} *[^
165
- ]`).replace("lheading",cp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ZT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,KT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dp=/^( {2,}|\\)\n(?!\s*$)/,QT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wa=/[\p{P}\p{S}]/u,_l=/[\s\p{P}\p{S}]/u,fp=/[^\s\p{P}\p{S}]/u,JT=_t(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_l).getRegex(),pp=/(?!~)[\p{P}\p{S}]/u,tw=/(?!~)[\s\p{P}\p{S}]/u,ew=/(?:[^\s\p{P}\p{S}]|~)/u,rw=_t(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",PT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),gp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,iw=_t(gp,"u").replace(/punct/g,Wa).getRegex(),sw=_t(gp,"u").replace(/punct/g,pp).getRegex(),mp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",aw=_t(mp,"gu").replace(/notPunctSpace/g,fp).replace(/punctSpace/g,_l).replace(/punct/g,Wa).getRegex(),ow=_t(mp,"gu").replace(/notPunctSpace/g,ew).replace(/punctSpace/g,tw).replace(/punct/g,pp).getRegex(),nw=_t("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fp).replace(/punctSpace/g,_l).replace(/punct/g,Wa).getRegex(),lw=_t(/\\(punct)/,"gu").replace(/punct/g,Wa).getRegex(),hw=_t(/^<(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(),cw=_t(wl).replace("(?:-->|$)","-->").getRegex(),uw=_t("^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",cw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ba=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,dw=_t(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ba).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yp=_t(/^!?\[(label)\]\[(ref)\]/).replace("label",ba).replace("ref",Tl).getRegex(),Cp=_t(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tl).getRegex(),fw=_t("reflink|nolink(?!\\()","g").replace("reflink",yp).replace("nolink",Cp).getRegex(),sc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bl={_backpedal:Qi,anyPunctuation:lw,autolink:hw,blockSkip:rw,br:dp,code:KT,del:Qi,emStrongLDelim:iw,emStrongRDelimAst:aw,emStrongRDelimUnd:nw,escape:ZT,link:dw,nolink:Cp,punctuation:JT,reflink:yp,reflinkSearch:fw,tag:uw,text:QT,url:Qi},pw={...Bl,link:_t(/^!?\[(label)\]\((.*?)\)/).replace("label",ba).getRegex(),reflink:_t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ba).getRegex()},yn={...Bl,emStrongRDelimAst:ow,emStrongLDelim:sw,url:_t(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sc).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:_t(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",sc).getRegex()},gw={...yn,br:_t(dp).replace("{2,}","*").getRegex(),text:_t(yn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$s={normal:Sl,gfm:XT,pedantic:VT},$i={normal:Bl,gfm:yn,breaks:gw,pedantic:pw},mw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ac=e=>mw[e];function Me(e,t){if(t){if(se.escapeTest.test(e))return e.replace(se.escapeReplace,ac)}else if(se.escapeTestNoEncode.test(e))return e.replace(se.escapeReplaceNoEncode,ac);return e}function oc(e){try{e=encodeURI(e).replace(se.percentDecode,"%")}catch{return null}return e}function nc(e,t){var a;let r=e.replace(se.findPipe,(o,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(se.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(se.slashPipe,"|");return i}function Oi(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 yw(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 lc(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Cw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
163
+ */var m2=p(e=>{const{handDrawnSeed:t}=_t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Bi=p(e=>{const t=y2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),y2=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"),Yf=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"),rt=p(e=>{const{stylesArray:t}=Bi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Yf(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),J=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=_t(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=Bi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:C2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),C2=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"),Uf={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.BLANK_URL=zt.relativeFirstCharacters=zt.whitespaceEscapeCharsRegex=zt.urlSchemeRegex=zt.ctrlCharactersRegex=zt.htmlCtrlEntityRegex=zt.htmlEntitiesRegex=zt.invalidProtocolRegex=void 0;zt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;zt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;zt.htmlCtrlEntityRegex=/&(newline|tab);/gi;zt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;zt.urlSchemeRegex=/^.+(:|&colon;)/gim;zt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;zt.relativeFirstCharacters=[".","/"];zt.BLANK_URL="about:blank";Object.defineProperty(Uf,"__esModule",{value:!0});var x2=Uf.sanitizeUrl=w2,Qt=zt;function b2(e){return Qt.relativeFirstCharacters.indexOf(e[0])>-1}function k2(e){var t=e.replace(Qt.ctrlCharactersRegex,"");return t.replace(Qt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function T2(e){return URL.canParse(e)}function Vh(e){try{return decodeURIComponent(e)}catch{return e}}function w2(e){if(!e)return Qt.BLANK_URL;var t,r=Vh(e.trim());do r=k2(r).replace(Qt.htmlCtrlEntityRegex,"").replace(Qt.ctrlCharactersRegex,"").replace(Qt.whitespaceEscapeCharsRegex,"").trim(),r=Vh(r),t=r.match(Qt.ctrlCharactersRegex)||r.match(Qt.htmlEntitiesRegex)||r.match(Qt.htmlCtrlEntityRegex)||r.match(Qt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Qt.BLANK_URL;if(b2(i))return i;var s=i.trimStart(),a=s.match(Qt.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Qt.invalidProtocolRegex.test(o))return Qt.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!T2(n))return Qt.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function _o(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 S2(){}function Gf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function cl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const _2="[object RegExp]",jf="[object String]",Xf="[object Number]",Vf="[object Boolean]",Zf="[object Arguments]",B2="[object Symbol]",v2="[object Date]",L2="[object Map]",F2="[object Set]",A2="[object Array]",E2="[object ArrayBuffer]",M2="[object Object]",$2="[object DataView]",O2="[object Uint8Array]",I2="[object Uint8ClampedArray]",D2="[object Uint16Array]",R2="[object Uint32Array]",P2="[object Int8Array]",N2="[object Int16Array]",q2="[object Int32Array]",W2="[object Float32Array]",z2="[object Float64Array]",Zh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function ul(e){return typeof Zh.Buffer<"u"&&Zh.Buffer.isBuffer(e)}function H2(e){return Number.isSafeInteger(e)&&e>=0}function Qf(e){return e!=null&&typeof e!="function"&&H2(e.length)}function Y2(e){return e==="__proto__"}function dl(e){return e==null||typeof e!="object"&&typeof e!="function"}function fl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function U2(e,t){return ti(e,void 0,e,new Map,t)}function ti(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(dl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=ti(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,ti(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(ti(n,void 0,r,i,s));return o}if(ul(e))return e.subarray();if(fl(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=ti(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,Ce(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),Ce(o,e,r,i,s),o}if(typeof e=="object"&&G2(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),Ce(o,e,r,i,s),o}return e}function Ce(e,t,r=e,i,s){const a=[...Object.keys(t),...Gf(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=ti(t[n],n,r,i,s))}}function G2(e){switch(cl(e)){case Zf:case A2:case E2:case $2:case Vf:case v2:case W2:case z2:case P2:case N2:case q2:case L2:case Xf:case M2:case _2:case F2:case jf:case B2:case O2:case I2:case D2:case R2:return!0;default:return!1}}function j2(e,t){return U2(e,(r,i,s,a)=>{if(typeof e=="object"){if(cl(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),Ce(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Xf:case jf:case Vf:{const o=new e.constructor(e==null?void 0:e.valueOf());return Ce(o,e),o}case Zf:{const o={};return Ce(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Qh(e){return j2(e)}function mn(e){return e!==null&&typeof e=="object"&&cl(e)==="[object Arguments]"}function yn(e){return typeof e=="object"&&e!==null}function X2(e){return yn(e)&&Qf(e)}function xs(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],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(xs.Cache||Map),r}xs.Cache=Map;function Vs(e){return fl(e)}function V2(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Z2(e){if(dl(e))return e;if(Array.isArray(e)||fl(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 Q2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=Zs(s,o,i,new Map)}return s}function Zs(e,t,r,i){if(dl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return Z2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Gf(t)];for(let a=0;a<s.length;a++){const o=s[a];if(Y2(o))continue;let n=t[o],l=e[o];if(mn(n)&&(n={...n}),mn(l)&&(l={...l}),ul(n)&&(n=Qh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const d=u[f];h[d]=l[d]}l=h}else if(X2(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||yn(l)&&yn(n)&&(_o(l)||_o(n)||Vs(l)||Vs(n))?e[o]=Zs(l,n,r,i):l==null&&_o(n)?e[o]=Zs({},n,r,i):l==null&&Vs(n)?e[o]=Qh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function K2(e,...t){return Q2(e,...t,S2)}function Kh(e){if(e==null)return!0;if(Qf(e))return typeof e.splice!="function"&&typeof e!="string"&&!ul(e)&&!Vs(e)&&!mn(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 V2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var J2="​",tT={curveBasis:Jo,curveBasisClosed:t1,curveBasisOpen:e1,curveBumpX:zu,curveBumpY:Hu,curveBundle:r1,curveCardinalClosed:i1,curveCardinalOpen:s1,curveCardinal:ju,curveCatmullRomClosed:a1,curveCatmullRomOpen:o1,curveCatmullRom:Vu,curveLinear:ts,curveLinearClosed:n1,curveMonotoneX:ed,curveMonotoneY:rd,curveNatural:sd,curveStep:ad,curveStepAfter:nd,curveStepBefore:od},eT=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,rT=p(function(e,t){const r=Kf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);ea(o),i=Pt(i,[...o])}else i=r.args;if(!i)return;let s=Pn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Kf=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${eT.source})(?=[}][%]{2}).*
164
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Ji.exec(e))!==null;)if(a.index===Ji.lastIndex&&Ji.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return H.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),iT=p(function(e){return e.replace(Ji,"")},"removeDirectives"),sT=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function pl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return tT[r]??t}p(pl,"interpolateToCurve");function Jf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?x2(r):r}p(Jf,"formatUrl");var aT=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){H.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function gl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(gl,"distance");function tp(e){let t,r=0;e.forEach(s=>{r+=gl(s,t),t=s});const i=r/2;return ml(e,i)}p(tp,"traverseEdge");function ep(e){return e.length===1?e[0]:tp(e)}p(ep,"calcLabelPosition");var Jh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),ml=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=gl(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Jh((1-o)*r.x+o*s.x,5),y:Jh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),oT=p((e,t,r)=>{H.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=ml(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function rp(e,t,r){const i=structuredClone(r);H.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=ml(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}p(rp,"calcTerminalLabelPosition");function ip(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(ip,"getStylesFromArray");var tc=0,nT=p(()=>(tc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tc),"generateId");function sp(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(sp,"makeRandomHex");var lT=p(e=>sp(e.length),"random"),hT=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"),cT=p(function(e,t){const r=t.text.replace(gs.lineBreakRegex," "),[,i]=Wa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),uT=xs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),gs.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Qe(`${o} `,r),c=Qe(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=dT(o,t,"-",r);s.push(a,...f),a=d}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),dT=xs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(Qe(c,i)>=t){const u=l+1,f=s.length===u,d=`${c}${r}`;a.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ap(e,t){return yl(e,t).height}p(ap,"calculateTextHeight");function Qe(e,t){return yl(e,t).width}p(Qe,"calculateTextWidth");var yl=xs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Wa(r),o=["sans-serif",i],n=e.split(gs.lineBreakRegex),l=[],c=yt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const y of n){const m=hT();m.text=y||J2;const C=cT(h,m).style("font-size",a).style("font-weight",s).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}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}`),yi,fT=(yi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(yi,"InitIDGenerator"),yi),Os,pT=p(function(e){return Os=Os||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Os.innerHTML=e,unescape(Os.textContent)},"entityDecode");function Cl(e){return"str"in e}p(Cl,"isDetailedError");var gT=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Wa=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 xl(e,t){return K2({},e,t)}p(xl,"cleanAndMerge");var Te={assignWithDepth:Pt,wrapLabel:uT,calculateTextHeight:ap,calculateTextWidth:Qe,calculateTextDimensions:yl,cleanAndMerge:xl,detectInit:rT,detectDirective:Kf,isSubstringInArray:sT,interpolateToCurve:pl,calcLabelPosition:ep,calcCardinalityPosition:oT,calcTerminalLabelPosition:rp,formatUrl:Jf,getStylesFromArray:ip,generateId:nT,random:lT,runFunc:aT,entityDecode:pT,insertTitle:gT,isLabelCoordinateInPath:op,parseFontSize:Wa,InitIDGenerator:fT},mT=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"),Or=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),lF=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ht(e){return e??null}p(Ht,"handleUndefinedAttr");function op(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(op,"isLabelCoordinateInPath");var bl=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function np(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=_t().fontSize?_t().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Qc.fontSize]=Wa(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";a(s)}p(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}p(np,"configureLabelImages");const yT=Object.freeze({left:0,top:0,width:16,height:16}),ka=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),lp=Object.freeze({...yT,...ka}),CT=Object.freeze({...lp,body:"",hidden:!1}),xT=Object.freeze({width:null,height:null}),bT=Object.freeze({...xT,...ka}),kT=(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 Bo(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Bo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return Bo(n,r)?n:null}return null},Bo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function TT(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 ec(e,t){const r=TT(e,t);for(const i in CT)i in ka?i in e&&!(i in r)&&(r[i]=ka[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function wT(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function rc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=ec(i[n]||s[n],a)}return o(t),r.forEach(o),ec(e,a)}function ST(e,t){if(e.icons[t])return rc(e,t,[]);const r=wT(e,[t])[t];return r?rc(e,t,r):null}const _T=/(-?[0-9.]*[0-9]+[0-9.]*)/g,BT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ic(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(_T);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=BT.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function vT(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function LT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function FT(e,t,r){const i=vT(e);return LT(i.defs,t+i.content+r)}const AT=e=>e==="unset"||e==="undefined"||e==="none";function ET(e,t){const r={...lp,...e},i={...bT,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const m=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),m.length&&(a=FT(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=ic(u,l/c)):(h=o==="auto"?l:o,u=n===null?ic(h,c/l):n==="auto"?c:n);const f={},d=(y,m)=>{AT(m)||(f[y]=m.toString())};d("width",h),d("height",u);const g=[s.left,s.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const MT=/\sid="(\S+)"/g,sc=new Map;function $T(e){e=e.replace(/[0-9]+$/,"")||"a";const t=sc.get(e)||0;return sc.set(e,t+1),t?`${e}${t}`:e}function OT(e){const t=[];let r;for(;r=MT.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=$T(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function IT(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 DT={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},Cn=new Map,hp=new Map,RT=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(H.debug("Registering icon pack:",t.name),"loader"in t)hp.set(t.name,t.loader);else if("icons"in t)Cn.set(t.name,t.icons);else throw H.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),cp=p(async(e,t)=>{const r=kT(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=Cn.get(i);if(!s){const o=hp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},Cn.set(i,s)}catch(n){throw H.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=ST(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),PT=p(async e=>{try{return await cp(e),!0}catch{return!1}},"isIconAvailable"),bs=p(async(e,t,r)=>{let i;try{i=await cp(e,t==null?void 0:t.fallbackPrefix)}catch(o){H.error(o),i=DT}const s=ET(i,t),a=IT(OT(s.body),{...s.attributes,...r});return _e(a,Et())},"getIconSVG");function kl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Rr=kl();function up(e){Rr=e}var wr={exec:()=>null};function Gr(e){let t=[];return r=>{let i=Math.max(0,Math.min(3,r-1)),s=t[i];return s||(s=e(i),t[i]=s),s}}function wt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Jt.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var NT=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Jt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,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:Gr(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Gr(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Gr(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Gr(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Gr(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Gr(e=>new RegExp(`^ {0,${e}}>`))},qT=/^(?:[ \t]*(?:\n|$))+/,WT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ks=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,HT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Tl=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,dp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fp=wt(dp).replace(/bull/g,Tl).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),YT=wt(dp).replace(/bull/g,Tl).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,UT=/^[^\n]+/,Sl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,GT=wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jT=wt(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Tl).getRegex(),za="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",_l=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,XT=wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\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",_l).replace("tag",za).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pp=e=>wt(wl).replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex(),VT=pp(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ZT=pp(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),QT=wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZT).getRegex(),Bl={blockquote:QT,code:WT,def:GT,fences:zT,heading:HT,hr:ks,html:XT,lheading:fp,list:jT,newline:qT,paragraph:VT,table:wr,text:UT},ac=wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex(),KT={...Bl,lheading:YT,table:ac,paragraph:wt(wl).replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ac).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex()},JT={...Bl,html:wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_l).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:wr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:wt(wl).replace("hr",ks).replace("heading",` *#{1,6} *[^
165
+ ]`).replace("lheading",fp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ew=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gp=/^( {2,}|\\)\n(?!\s*$)/,rw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vi=/[\p{P}\p{S}]/u,Ha=/[\s\p{P}\p{S}]/u,vl=/[^\s\p{P}\p{S}]/u,iw=wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ha).getRegex(),mp=/(?!~)[\p{P}\p{S}]/u,sw=/(?!~)[\s\p{P}\p{S}]/u,aw=/(?:[^\s\p{P}\p{S}]|~)/u,ow=wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",NT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yp=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,nw=wt(yp,"u").replace(/punct/g,vi).getRegex(),lw=wt(yp,"u").replace(/punct/g,mp).getRegex(),Cp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hw=wt(Cp,"gu").replace(/notPunctSpace/g,vl).replace(/punctSpace/g,Ha).replace(/punct/g,vi).getRegex(),cw=wt(Cp,"gu").replace(/notPunctSpace/g,aw).replace(/punctSpace/g,sw).replace(/punct/g,mp).getRegex(),uw=wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vl).replace(/punctSpace/g,Ha).replace(/punct/g,vi).getRegex(),dw=wt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vi).getRegex(),fw="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",pw=wt(fw,"gu").replace(/notPunctSpace/g,vl).replace(/punctSpace/g,Ha).replace(/punct/g,vi).getRegex(),gw=wt(/\\(punct)/,"gu").replace(/punct/g,vi).getRegex(),mw=wt(/^<(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(),yw=wt(_l).replace("(?:-->|$)","-->").getRegex(),Cw=wt("^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",yw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ta=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,xw=wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ta).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xp=wt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ta).replace("ref",Sl).getRegex(),bp=wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sl).getRegex(),bw=wt("reflink|nolink(?!\\()","g").replace("reflink",xp).replace("nolink",bp).getRegex(),oc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ll={_backpedal:wr,anyPunctuation:gw,autolink:mw,blockSkip:ow,br:gp,code:ew,del:wr,delLDelim:wr,delRDelim:wr,emStrongLDelim:nw,emStrongRDelimAst:hw,emStrongRDelimUnd:uw,escape:tw,link:xw,nolink:bp,punctuation:iw,reflink:xp,reflinkSearch:bw,tag:Cw,text:rw,url:wr},kw={...Ll,link:wt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ta).getRegex(),reflink:wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ta).getRegex()},xn={...Ll,emStrongRDelimAst:cw,emStrongLDelim:lw,delLDelim:dw,delRDelim:pw,url:wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",oc).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:wt(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",oc).getRegex()},Tw={...xn,br:wt(gp).replace("{2,}","*").getRegex(),text:wt(xn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Is={normal:Bl,gfm:KT,pedantic:JT},Ri={normal:Ll,gfm:xn,breaks:Tw,pedantic:kw},ww={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nc=e=>ww[e];function Me(e,t){if(t){if(Jt.escapeTest.test(e))return e.replace(Jt.escapeReplace,nc)}else if(Jt.escapeTestNoEncode.test(e))return e.replace(Jt.escapeReplaceNoEncode,nc);return e}function lc(e){try{e=encodeURI(e).replace(Jt.percentDecode,"%")}catch{return null}return e}function hc(e,t){var a;let r=e.replace(Jt.findPipe,(o,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Jt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Jt.slashPipe,"|");return i}function ir(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 cc(e){let t=e.split(`
166
+ `),r=t.length-1;for(;r>=0&&Jt.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
167
+ `)}function Sw(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 _w(e,t=0){let r=t,i="";for(let s of e)if(s===" "){let a=4-r%4;i+=" ".repeat(a),r+=a}else i+=s,r++;return i}function uc(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Bw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
166
168
  `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
167
- `)}var ka=class{constructor(t){Ft(this,"options");Ft(this,"rules");Ft(this,"lexer");this.options=t||Ir}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Oi(i,`
168
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Cw(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=Oi(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:Oi(r[0],`
169
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Oi(r[0],`
169
+ `)}var wa=class{constructor(t){Ft(this,"options");Ft(this,"rules");Ft(this,"lexer");this.options=t||Rr}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=this.options.pedantic?r[0]:cc(r[0]),s=i.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i,codeBlockStyle:"indented",text:s}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Bw(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=ir(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:ir(r[0],`
170
+ `),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:ir(r[0],`
171
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ir(r[0],`
170
172
  `).split(`
171
173
  `),s="",a="",o=[];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(`
172
174
  `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
173
175
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
174
176
  ${h}`:h,a=a?`${a}
175
- ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let y=d,g=y.raw+`
177
+ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,y=g.raw+`
176
178
  `+i.join(`
177
- `),m=this.blockquote(g);o[o.length-1]=m,s=s.substring(0,s.length-y.raw.length)+m.raw,a=a.substring(0,a.length-y.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let y=d,g=y.raw+`
179
+ `),m=this.blockquote(y);o[o.length-1]=m,s=s.substring(0,s.length-g.raw.length)+m.raw,a=a.substring(0,a.length-g.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,y=g.raw+`
178
180
  `+i.join(`
179
- `),m=this.list(g);o[o.length-1]=m,s=s.substring(0,s.length-d.raw.length)+m.raw,a=a.substring(0,a.length-y.raw.length)+m.raw,i=g.substring(o.at(-1).raw.length).split(`
180
- `);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={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 o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
181
- `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
182
- `,1)[0],y=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):y?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=r[1].length),y&&this.rules.other.blankLine.test(d)&&(h+=d+`
183
- `,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g);for(;t;){let F=t.split(`
184
- `,1)[0],v;if(d=F,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||_.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
185
- `+v.slice(g);else{if(y||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||S.test(f)||k.test(f))break;u+=`
186
- `+d}!y&&!d.trim()&&(y=!0),h+=F+`
187
- `,t=t.substring(F.length+1),f=v.slice(g)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=nc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
188
- `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(nc(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
189
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Oi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=yw(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),lc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return lc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,f=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let y=f.slice(1,-1);return{type:"em",raw:f,text:y,tokens:this.lexer.inlineTokens(y)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},xe=class Cn{constructor(t){Ft(this,"tokens");Ft(this,"options");Ft(this,"state");Ft(this,"tokenizer");Ft(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ir,this.options.tokenizer=this.options.tokenizer||new ka,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:se,block:$s.normal,inline:$i.normal};this.options.pedantic?(r.block=$s.pedantic,r.inline=$i.pedantic):this.options.gfm&&(r.block=$s.gfm,this.options.breaks?r.inline=$i.breaks:r.inline=$i.gfm),this.tokenizer.rules=r}static get rules(){return{block:$s,inline:$i}}static lex(t,r){return new Cn(r).lex(t)}static lexInline(t,r){return new Cn(r).inlineTokens(t)}lex(t){t=t.replace(se.carriageReturn,`
190
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(se.tabCharGlobal," ").replace(se.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.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+=`
191
- `: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(`
181
+ `),m=this.list(y);o[o.length-1]=m,s=s.substring(0,s.length-d.raw.length)+m.raw,a=a.substring(0,a.length-g.raw.length)+m.raw,i=y.substring(o.at(-1).raw.length).split(`
182
+ `);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={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 o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=_w(r[2].split(`
183
+ `,1)[0],r[1].length),d=t.split(`
184
+ `,1)[0],g=!f.trim(),y=0;if(this.options.pedantic?(y=2,u=f.trimStart()):g?y=r[1].length+1:(y=f.search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=f.slice(y),y+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
185
+ `,t=t.substring(d.length+1),c=!0),!c){let m=this.rules.other.nextBulletRegex(y),C=this.rules.other.hrRegex(y),b=this.rules.other.fencesBeginRegex(y),k=this.rules.other.headingBeginRegex(y),w=this.rules.other.htmlBeginRegex(y),S=this.rules.other.blockquoteBeginRegex(y);for(;t;){let _=t.split(`
186
+ `,1)[0],v;if(d=_,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),b.test(d)||k.test(d)||w.test(d)||S.test(d)||m.test(d)||C.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
187
+ `+v.slice(y);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||k.test(f)||C.test(f))break;u+=`
188
+ `+d}g=!d.trim(),h+=_+`
189
+ `,t=t.substring(_.length+1),f=v.slice(y)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0)),a.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let h=c.tokens[0];if(c.task&&((h==null?void 0:h.type)==="text"||(h==null?void 0:h.type)==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let f={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=f.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=f.raw+c.tokens[0].raw,c.tokens[0].text=f.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(f)):c.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):c.tokens.unshift(f)}}else c.task&&(c.task=!1);if(!a.loose){let u=c.tokens.filter(d=>d.type==="space"),f=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=f}}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(t){let r=this.rules.block.html.exec(t);if(r){let i=cc(r[0]);return{type:"html",block:!0,raw:i,pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:i}}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:ir(r[0],`
190
+ `),href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=hc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
191
+ `):[],o={type:"table",raw:ir(r[0],`
192
+ `),header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(hc(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r){let i=r[1].trim();return{type:"heading",raw:ir(r[0],`
193
+ `),depth:r[2].charAt(0)==="="?1:2,text:i,tokens:this.lexer.inline(i)}}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
194
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=ir(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Sw(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),uc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return uc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,f=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t,r,i=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=this.rules.inline.delRDelim;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(n=[...o].length,n!==a))continue;if(s[3]||s[4]){l+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l);let h=[...s[0]][0].length,u=t.slice(0,a+s.index+h+n),f=u.slice(a,-a);return{type:"del",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},xe=class bn{constructor(t){Ft(this,"tokens");Ft(this,"options");Ft(this,"state");Ft(this,"inlineQueue");Ft(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Rr,this.options.tokenizer=this.options.tokenizer||new wa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Jt,block:Is.normal,inline:Ri.normal};this.options.pedantic?(r.block=Is.pedantic,r.inline=Ri.pedantic):this.options.gfm&&(r.block=Is.gfm,this.options.breaks?r.inline=Ri.breaks:r.inline=Ri.gfm),this.tokenizer.rules=r}static get rules(){return{block:Is,inline:Ri}}static lex(t,r){return new bn(r).lex(t)}static lexInline(t,r){return new bn(r).inlineTokens(t)}lex(t){t=t.replace(Jt.carriageReturn,`
195
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,o,n;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Jt.tabCharGlobal," ").replace(Jt.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let l;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let h=r.at(-1);l.raw.length===1&&h!==void 0?h.raw+=`
196
+ `:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
192
197
  `)?"":`
193
- `)+n.raw,c.text+=`
194
- `+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(`
198
+ `)+l.raw,h.text+=`
199
+ `+l.text,this.inlineQueue.at(-1).src=h.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
195
200
  `)?"":`
196
- `)+n.raw,c.text+=`
197
- `+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((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.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(`
201
+ `)+l.raw,h.text+=`
202
+ `+l.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},r.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,u=t.slice(1),f;this.options.extensions.startBlock.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
198
203
  `)?"":`
199
- `)+n.raw,c.text+=`
200
- `+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(`
204
+ `)+l.raw,h.text+=`
205
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(l),i=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
201
206
  `)?"":`
202
- `)+n.raw,c.text+=`
203
- `+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,f;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let y=t;if((f=this.options.extensions)!=null&&f.startInline){let g=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(y=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(y)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ta=class{constructor(t){Ft(this,"options");Ft(this,"parser");this.options=t||Ir}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(se.notSpaceStart))==null?void 0:o[0],a=t.replace(se.endingNewline,"")+`
207
+ `)+l.raw,h.text+=`
208
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var n,l,c,h,u;this.tokenizer.lexer=this;let i=t;if(this.tokens.links){let f=Object.keys(this.tokens.links);f.length>0&&(i=i.replace(this.tokenizer.rules.inline.reflinkSearch,d=>f.includes(d.slice(d.lastIndexOf("[")+1,-1))?"["+"a".repeat(d.length-2)+"]":d))}i=i.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),i=i.replace(this.tokenizer.rules.inline.blockSkip,(f,d,g)=>{let y=g?g.length:0;return f.slice(0,y)+"["+"a".repeat(f.length-y-2)+"]"}),i=((l=(n=this.options.hooks)==null?void 0:n.emStrongMask)==null?void 0:l.call({lexer:this},i))??i;let s=!1,a="",o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}s||(a=""),s=!1;let f;if((h=(c=this.options.extensions)==null?void 0:c.inline)!=null&&h.some(g=>(f=g.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 g=r.at(-1);f.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(t,i,a)){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,i,a)){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 d=t;if((u=this.options.extensions)!=null&&u.startInline){let g=1/0,y=t.slice(1),m;this.options.extensions.startInline.forEach(C=>{m=C.call({lexer:this},y),typeof m=="number"&&m>=0&&(g=Math.min(g,m))}),g<1/0&&g>=0&&(d=t.substring(0,g+1))}if(f=this.tokenizer.inlineText(d)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(a=f.raw.slice(-1)),s=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):r.push(f);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(this.options.silent)console.error(r);else throw new Error(r)}},Sa=class{constructor(t){Ft(this,"options");Ft(this,"parser");this.options=t||Rr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Jt.notSpaceStart))==null?void 0:o[0],a=t.replace(Jt.endingNewline,"")+`
204
209
  `;return s?'<pre><code class="language-'+Me(s)+'">'+(i?a:Me(a,!0))+`</code></pre>
205
210
  `:"<pre><code>"+(i?a:Me(a,!0))+`</code></pre>
206
211
  `}blockquote({tokens:t}){return`<blockquote>
@@ -209,8 +214,8 @@ ${this.parser.parse(t)}</blockquote>
209
214
  `}hr(t){return`<hr>
210
215
  `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
211
216
  `+s+"</"+a+`>
212
- `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Me(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
213
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
217
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
218
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
214
219
  `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
215
220
  <thead>
216
221
  `+r+`</thead>
@@ -218,46 +223,45 @@ ${this.parser.parse(t)}</blockquote>
218
223
  `}tablerow({text:t}){return`<tr>
219
224
  ${t}</tr>
220
225
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
221
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Me(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=oc(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Me(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=oc(t);if(a===null)return Me(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Me(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Me(t.text)}},vl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},be=class xn{constructor(t){Ft(this,"options");Ft(this,"renderer");Ft(this,"textRenderer");this.options=t||Ir,this.options.renderer=this.options.renderer||new Ta,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vl}static parse(t,r){return new xn(r).parse(t)}static parseInline(t,r){return new xn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let 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(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],h+=`
222
- `+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,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let 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}},Ns,Yi=(Ns=class{constructor(t){Ft(this,"options");Ft(this,"block");this.options=t||Ir}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?xe.lex:xe.lexInline}provideParser(){return this.block?be.parse:be.parseInline}},Ft(Ns,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ft(Ns,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ns),xw=class{constructor(...t){Ft(this,"defaults",xl());Ft(this,"options",this.setOptions);Ft(this,"parse",this.parseMarkdown(!0));Ft(this,"parseInline",this.parseMarkdown(!1));Ft(this,"Parser",be);Ft(this,"Renderer",Ta);Ft(this,"TextRenderer",vl);Ft(this,"Lexer",xe);Ft(this,"Tokenizer",ka);Ft(this,"Hooks",Yi);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let 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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Ta(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new ka(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Yi;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=a[n];Yi.passThroughHooks.has(o)?a[n]=h=>{if(this.defaults.async&&Yi.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return xe.lex(t,r??this.defaults)}parser(t,r){return be.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?xe.lex:xe.lexInline)(n,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?be.parse:be.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?xe.lex:xe.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?be.parse:be.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
223
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Me(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},$r=new xw;function vt(e,t){return $r.parse(e,t)}vt.options=vt.setOptions=function(e){return $r.setOptions(e),vt.defaults=$r.defaults,lp(vt.defaults),vt};vt.getDefaults=xl;vt.defaults=Ir;vt.use=function(...e){return $r.use(...e),vt.defaults=$r.defaults,lp(vt.defaults),vt};vt.walkTokens=function(e,t){return $r.walkTokens(e,t)};vt.parseInline=$r.parseInline;vt.Parser=be;vt.parser=be.parse;vt.Renderer=Ta;vt.TextRenderer=vl;vt.Lexer=xe;vt.lexer=xe.lex;vt.Tokenizer=ka;vt.Hooks=Yi;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;be.parse;xe.lex;function xp(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,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var a=new RegExp(`
226
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Me(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=lc(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Me(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=lc(t);if(a===null)return Me(i);t=a;let o=`<img src="${t}" alt="${Me(i)}"`;return r&&(o+=` title="${Me(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Me(t.text)}},Fl=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""}checkbox({raw:t}){return t}},be=class kn{constructor(t){Ft(this,"options");Ft(this,"renderer");Ft(this,"textRenderer");this.options=t||Rr,this.options.renderer=this.options.renderer||new Sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Fl}static parse(t,r){return new kn(r).parse(t)}static parseInline(t,r){return new kn(r).parseInline(t)}parse(t){var i,s;this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[o.type]){let l=o,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){r+=c||"";continue}}let n=o;switch(n.type){case"space":{r+=this.renderer.space(n);break}case"hr":{r+=this.renderer.hr(n);break}case"heading":{r+=this.renderer.heading(n);break}case"code":{r+=this.renderer.code(n);break}case"table":{r+=this.renderer.table(n);break}case"blockquote":{r+=this.renderer.blockquote(n);break}case"list":{r+=this.renderer.list(n);break}case"checkbox":{r+=this.renderer.checkbox(n);break}case"html":{r+=this.renderer.html(n);break}case"def":{r+=this.renderer.def(n);break}case"paragraph":{r+=this.renderer.paragraph(n);break}case"text":{r+=this.renderer.text(n);break}default:{let l='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,r=this.renderer){var s,a;this.renderer.parser=this;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let 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"checkbox":{i+=r.checkbox(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}},Ws,ji=(Ws=class{constructor(t){Ft(this,"options");Ft(this,"block");this.options=t||Rr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?xe.lex:xe.lexInline}provideParser(t=this.block){return t?be.parse:be.parseInline}},Ft(Ws,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ft(Ws,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ws),vw=class{constructor(...t){Ft(this,"defaults",kl());Ft(this,"options",this.setOptions);Ft(this,"parse",this.parseMarkdown(!0));Ft(this,"parseInline",this.parseMarkdown(!1));Ft(this,"Parser",be);Ft(this,"Renderer",Sa);Ft(this,"TextRenderer",Fl);Ft(this,"Lexer",xe);Ft(this,"Tokenizer",wa);Ft(this,"Hooks",ji);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let 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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Sa(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new wa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ji;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=a[n];ji.passThroughHooks.has(o)?a[n]=h=>{if(this.defaults.async&&ji.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return xe.lex(t,r??this.defaults)}parser(t,r){return be.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer(t):t?xe.lex:xe.lexInline)(n,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser(t):t?be.parse:be.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer(t):t?xe.lex:xe.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser(t):t?be.parse:be.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
227
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Me(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Ir=new vw;function vt(e,t){return Ir.parse(e,t)}vt.options=vt.setOptions=function(e){return Ir.setOptions(e),vt.defaults=Ir.defaults,up(vt.defaults),vt};vt.getDefaults=kl;vt.defaults=Rr;vt.use=function(...e){return Ir.use(...e),vt.defaults=Ir.defaults,up(vt.defaults),vt};vt.walkTokens=function(e,t){return Ir.walkTokens(e,t)};vt.parseInline=Ir.parseInline;vt.Parser=be;vt.parser=be.parse;vt.Renderer=Sa;vt.TextRenderer=Fl;vt.Lexer=xe;vt.lexer=xe.lex;vt.Tokenizer=wa;vt.Hooks=ji;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;be.parse;xe.lex;function kp(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,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var a=new RegExp(`
224
228
  [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(a,`
225
229
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
226
230
  `)&&(u=String(n).split(`
227
231
  `).map(function(f,d){return d===0?f:"".concat(h).concat(f)}).join(`
228
- `)),o+=u+i[l+1]}),o}function bp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
232
+ `)),o+=u+i[l+1]}),o}function Tp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
229
233
  `).replace(/\n{2,}/g,`
230
- `);return xp(i)}p(bp,"preprocessMarkdown");function kp(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(kp,"nonMarkdownToLines");function Tp(e,t={}){const r=bp(e,t),i=vt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
231
- `).forEach((h,u)=>{u!==0&&(a++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[a].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}p(Tp,"markdownToLines");function wp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(wp,"nonMarkdownToHTML");function Sp(e,{markdownAutoWrap:t}={}){const r=vt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(H.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Sp,"markdownToHTML");function _p(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(_p,"splitTextToChars");function Bp(e,t){const r=_p(t.content);return Ll(e,[],r,t.type)}p(Bp,"splitWordToFitWidth");function Ll(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?Ll(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Ll,"splitWordToFitWidthRecursion");function vp(e,t){if(e.some(({content:r})=>r.includes(`
232
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return wa(e,t)}p(vp,"splitLineToFitWidth");function wa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return wa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Bp(t,a);r.push([n]),l.content&&e.unshift(l)}return wa(e,t,r)}p(wa,"splitLineToFitWidthRecursion");function bn(e,t){t&&e.attr("style",t)}p(bn,"applyStyle");var hc=16384;async function Lp(e,t,r,i,s=!1,a=Et()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,hc)}px`),o.attr("height",`${Math.min(10*r,hc)}px`);const n=o.append("xhtml:div"),l=ts(t.label)?await nu(t.label.replace(fs.lineBreakRegex,`
233
- `),a):_e(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),bn(h,t.labelStyle),h.attr("class",`${c} ${i}`),bn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}p(Lp,"addHtmlSpan");function za(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(za,"createTspan");function Fp(e,t,r){const i=e.append("text"),s=za(i,1,t);Ha(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Fp,"computeWidthOfText");function bw(e,t,r){var o;const i=e.append("text"),s=za(i,1,t);Ha(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}p(bw,"computeDimensionOfText");function Ap(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(d=>Fp(o,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:vp(h,u);for(const d of f){const y=za(l,c,1.1,s);Ha(y,d),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),o.node()}else return l.node()}p(Ap,"createFormattedText");function kn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(kn,"decodeHTMLEntities");function Ha(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(kn(r.content)):s.text(" "+kn(r.content))})}p(Ha,"updateTextContentAndStyles");async function Ep(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await DT(n)?await Cs(n,void 0,{class:"label-icon"}):`<i class='${_e(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Ep,"replaceIconSubstring");var ze=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(H.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?Sp(t,h):wp(t),f=await Ep(Mr(u),h),d=t.replace(/\\\\/g,"\\"),y={isNode:n,label:ts(t)?d:f,labelStyle:r.replace("fill:","color:")};return await Lp(e,y,l,s,c,h)}else{const u=Mr(t.replace(/<br\s*\/?>/g,"<br/>")),f=o?Tp(u.replace("<br>","<br/>"),h):kp(u),d=Ap(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");yt(d).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");yt(d).select("rect").attr("style",y.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");yt(d).select("text").attr("style",g)}return i?yt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):yt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function _o(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function kw(e,t){return e[0]===t[0]&&e[1]===t[1]}function Tw(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)_o(c,n,s);const l=function(c,h,u){const f=[];for(const b of c){const k=[...b];kw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];h=Math.max(h,.1);const y=[];for(const b of f)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const _=Math.min(w[1],S[1]);y.push({ymin:_,ymax:Math.max(w[1],S[1]),x:_===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(y.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!y.length)return d;let g=[],m=y[0].ymin,C=0;for(;g.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach(k=>{g.push({s:m,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=m)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%h==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const w=g[b].edge,S=g[k].edge;d.push([[Math.round(w.x),m],[Math.round(S.x),m]])}m+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(o,a,i);if(s){for(const c of o)_o(c,n,-s);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),_o(f,h,u)})(l,n,-s)}return l}function bs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),Tw(e,s,i,a||1)}class Fl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=bs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Ya(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class ww extends Fl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=bs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)Ya([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Sw extends Fl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class _w{constructor(t){this.helper=t}fillPolygons(t,r){const i=bs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Ya(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let y=0;y<h;y++){const g=d+u+y*s,m=f-o+2*Math.random()*o,C=g-o+2*Math.random()*o,b=this.helper.ellipse(m,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Bw{constructor(t){this.helper=t}fillPolygons(t,r){const i=bs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=Ya(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const y=d*(i+s),g=y+i,m=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)],C=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)];a.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}}),a}}class vw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=bs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=Ya(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,y=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[g[0]+y*Math.cos(h+Math.PI/4),g[1]+y*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}}),s}}const oe={};class Lw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Fw=0,Bo=1,cc=2,Os={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function vo(e,t){return e.type===t}function Al(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Fw,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Bo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:cc,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!vo(a,cc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Al("M0,0"+e);s++,o=Os[a.text],i=a.text}else vo(a,Bo)?o=Os[i]:(s++,o=Os[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!vo(c,Bo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Os[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Mp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((c,h)=>h%2?c+r:c+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((c,h)=>h%2?c+r:c+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((c,h)=>h%2?c+r:c+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function $p(e){const t=[];let r="",i=0,s=0,a=0,o=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,[a,o]=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,f=0;r==="C"||r==="S"?(u=i+(i-n),f=s+(s-l)):(u=i,f=s),t.push({key:"C",data:[u,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,f]=h;let d=0,y=0;r==="Q"||r==="T"?(d=i+(i-n),y=s+(s-l)):(d=i,y=s);const g=i+2*(d-i)/3,m=s+2*(y-s)/3,C=u+2*(d-u)/3,b=f+2*(y-f)/3;t.push({key:"C",data:[g,m,C,b,u,f]}),n=d,l=y,i=u,s=f;break}case"Q":{const[u,f,d,y]=h,g=i+2*(u-i)/3,m=s+2*(f-s)/3,C=d+2*(u-d)/3,b=y+2*(f-y)/3;t.push({key:"C",data:[g,m,C,b,d,y]}),n=u,l=f,i=d,s=y;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],y=h[3],g=h[4],m=h[5],C=h[6];u===0||f===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Op(i,s,m,C,u,f,d,y,g).forEach(function(b){t.push({key:"C",data:b})}),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Ii(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Op(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,y=0,g=0,m=0;if(c)[d,y,g,m]=c;else{[e,t]=Ii(e,t,-h),[r,i]=Ii(r,i,-h);const W=(e-r)/2,O=(t-i)/2;let A=W*W/(s*s)+O*O/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const B=s*s,$=a*a,E=B*$-B*O*O-$*W*W,q=B*O*O+$*W*W,Y=(n===l?-1:1)*Math.sqrt(Math.abs(E/q));g=Y*s*O/a+(e+r)/2,m=Y*-a*W/s+(t+i)/2,d=Math.asin(parseFloat(((t-m)/a).toFixed(9))),y=Math.asin(parseFloat(((i-m)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(y=Math.PI-y),d<0&&(d=2*Math.PI+d),y<0&&(y=2*Math.PI+y),l&&d>y&&(d-=2*Math.PI),!l&&y>d&&(y-=2*Math.PI)}let C=y-d;if(Math.abs(C)>120*Math.PI/180){const W=y,O=r,A=i;y=l&&y>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Op(r=g+s*Math.cos(y),i=m+a*Math.sin(y),O,A,s,a,o,0,l,[y,W,g,m])}C=y-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(y),S=Math.sin(y),_=Math.tan(C/4),F=4/3*s*_,v=4/3*a*_,z=[e,t],N=[e+F*k,t-v*b],M=[r+F*S,i-v*w],U=[r,i];if(N[0]=2*z[0]-N[0],N[1]=2*z[1]-N[1],c)return[N,M,U].concat(f);{f=[N,M,U].concat(f);const W=[];for(let O=0;O<f.length;O+=3){const A=Ii(f[O][0],f[O][1],h),B=Ii(f[O+1][0],f[O+1][1],h),$=Ii(f[O+2][0],f[O+2][1],h);W.push([A[0],A[1],B[0],B[1],$[0],$[1]])}return W}}const Aw={randOffset:function(e,t){return dt(e,t)},randOffsetWithRange:function(e,t,r){return Sa(e,t,r)},ellipse:function(e,t,r,i,s){const a=Dp(r,i,s);return Tn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return dr(e,t,r,i,s,!0)}};function Ip(e,t,r,i,s){return{type:"path",ops:dr(e,t,r,i,s)}}function Vs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...dr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...dr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Ip(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Ew(e,t,r,i,s){return function(a,o){return Vs(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function uc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Is(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Is(r[0],1.5*(1+.22*t.roughness),pc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Is(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Is(o,1.5*(1+.22*t.roughness),pc(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 Dp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=dt(o*l,r),n+=dt(n*l,r),{increment:a,rx:o,ry:n}}function Tn(e,t,r,i){const[s,a]=gc(i.increment,e,t,i.rx,i.ry,1,i.increment*Sa(.1,Sa(.4,1,r),r),r);let o=_a(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=gc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=_a(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function dc(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=dt(.01*u,l),f+=dt(.01*f,l);let d=s,y=a;for(;d<0;)d+=2*Math.PI,y+=2*Math.PI;y-d>2*Math.PI&&(d=0,y=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(y-d)/2),C=mc(m,c,h,u,f,d,y,1,l);if(!l.disableMultiStroke){const b=mc(m,c,h,u,f,d,y,1.5,l);C.push(...b)}return o&&(n?C.push(...dr(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...dr(c,h,c+u*Math.cos(y),h+f*Math.sin(y),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:C}}function fc(e,t){const r=$p(Mp(Al(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...dr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,f,d]=n;i.push(...Mw(l,c,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...dr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Lo(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+dt(s,t),i[0][1]+dt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+dt(s,t),i[o][1]+dt(s,t)]})}}return{type:"fillPath",ops:r}}function Yr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!oe[s])switch(s){case"zigzag":oe[s]||(oe[s]=new ww(i));break;case"cross-hatch":oe[s]||(oe[s]=new Sw(i));break;case"dots":oe[s]||(oe[s]=new _w(i));break;case"dashed":oe[s]||(oe[s]=new Bw(i));break;case"zigzag-line":oe[s]||(oe[s]=new vw(i));break;default:s="hachure",oe[s]||(oe[s]=new Fl(i))}return oe[s]}(t,Aw).fillPolygons(e,t)}function pc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Pp(e){return e.randomizer||(e.randomizer=new Lw(e.seed||0)),e.randomizer.next()}function Sa(e,t,r,i=1){return r.roughness*i*(Pp(r)*(t-e)+e)}function dt(e,t,r=1){return Sa(-e,e,t,r)}function dr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=wn(e,t,r,i,s,!0,!1);if(o)return n;const l=wn(e,t,r,i,s,!0,!0);return n.concat(l)}function wn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let 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,f=.2+.2*Pp(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=dt(d,s,c),y=dt(y,s,c);const g=[],m=()=>dt(u,s,c),C=()=>dt(h,s,c),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):g.push({op:"move",data:[e+(b?0:dt(h,s,c)),t+(b?0:dt(h,s,c))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),y+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),y+t+2*(i-t)*f+m(),r+(b?0:m()),i+(b?0:m())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),y+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),y+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Is(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+dt(t,r),e[0][1]+dt(t,r)]),i.push([e[0][0]+dt(t,r),e[0][1]+dt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+dt(t,r),e[s][1]+dt(t,r)]),s===e.length-1&&i.push([e[s][0]+dt(t,r),e[s][1]+dt(t,r)]);return _a(i,null,r)}function _a(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...wn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function gc(e,t,r,i,s,a,o,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=dt(.5,n)-Math.PI/2;c.push([dt(a,n)+t+.9*i*Math.cos(h-e),dt(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[dt(a,n)+t+i*Math.cos(f),dt(a,n)+r+s*Math.sin(f)];l.push(d),c.push(d)}c.push([dt(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),dt(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([dt(a,n)+t+.98*i*Math.cos(h+o),dt(a,n)+r+.98*s*Math.sin(h+o)]),c.push([dt(a,n)+t+.9*i*Math.cos(h+.5*o),dt(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function mc(e,t,r,i,s,a,o,n,l){const c=a+dt(.1,l),h=[];h.push([dt(n,l)+t+.9*i*Math.cos(c-e),dt(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([dt(n,l)+t+i*Math.cos(u),dt(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),_a(h,null,l)}function Mw(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:dt(c[0],n)),o[1]+(f?0:dt(c[0],n))]}),h=f?[s,a]:[s+dt(c[d],n),a+dt(c[d],n)],l.push({op:"bcurveTo",data:[e+dt(c[d],n),t+dt(c[d],n),r+dt(c[d],n),i+dt(c[d],n),h[0],h[1]]});return l}function Di(e){return[...e]}function yc(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(Di(e[0]),Di(e[1]),Di(e[2]),Di(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Di(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Zs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function $w(e,t,r){const i=Zs(t,r);if(i===0)return Zs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Zs(e,kr(t,r,s))}function kr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Sn(e,t,r,i){const s=i||[];if(function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],f=n[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let y=3*h[1]-2*c[1]-f[1];y*=y;let g=3*u[0]-2*f[0]-c[0];g*=g;let m=3*u[1]-2*f[1]-c[1];return m*=m,d<g&&(d=g),y<m&&(y=m),d+y}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Zs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=kr(l,c,.5),d=kr(c,h,.5),y=kr(h,u,.5),g=kr(f,d,.5),m=kr(d,y,.5),C=kr(g,m,.5);Sn([l,f,g,C],0,r,s),Sn([C,m,y,u],0,r,s)}var a,o;return s}function Ow(e,t){return Ba(e,0,e.length,t)}function Ba(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=$w(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Ba(e,t,c+1,i,a),Ba(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Fo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Sn(e,3*a,t,i);return r&&r>0?Ba(i,0,i.length,r):i}const ce="none";class va{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Ip(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=Ew(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Lo([c],o)):n.push(Yr([c],o))}return o.stroke!==ce&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Dp(i,s,o),c=Tn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Tn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Yr([c.estimatedPoints],o));return o.stroke!==ce&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Vs(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=dc(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=dc(t,r,i,s,a,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,y,g,m,C,b){const k=f,w=d;let S=Math.abs(y/2),_=Math.abs(g/2);S+=dt(.01*S,b),_+=dt(.01*_,b);let F=m,v=C;for(;F<0;)F+=2*Math.PI,v+=2*Math.PI;v-F>2*Math.PI&&(F=0,v=2*Math.PI);const z=(v-F)/b.curveStepCount,N=[];for(let M=F;M<=v;M+=z)N.push([k+S*Math.cos(M),w+_*Math.sin(M)]);return N.push([k+S*Math.cos(v),w+_*Math.sin(v)]),N.push([k,w]),Yr([N],b)}(t,r,i,s,a,o,c));return c.stroke!==ce&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=uc(t,i);if(i.fill&&i.fill!==ce)if(i.fillStyle==="solid"){const o=uc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Fo(yc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Fo(yc(c),10,(1+i.roughness)/2))}o.length&&s.push(Yr([o],i))}return i.stroke!==ce&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Vs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Lo([t],i)):s.push(Yr([t],i))),i.stroke!==ce&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ce,o=i.stroke!==ce,n=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=$p(Mp(Al(h))),y=[];let g=[],m=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...Fo(C,u)),C=[]},k=()=>{b(),g.length&&(y.push(g),g=[])};for(const{key:S,data:_}of d)switch(S){case"M":k(),m=[_[0],_[1]],g.push(m);break;case"L":b(),g.push([_[0],_[1]]);break;case"C":if(!C.length){const F=g.length?g[g.length-1]:m;C.push([F[0],F[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),g.push([m[0],m[1]])}if(k(),!f)return y;const w=[];for(const S of y){const _=Ow(S,f);_.length&&w.push(_)}return w}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=fc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=fc(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(Lo(l,i));else s.push(Yr(l,i));return o&&(n?l.forEach(h=>{s.push(Vs(h,!1,i))}):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ce};break;case"fillPath":o={d:this.opsToPath(a),stroke:ce,strokeWidth:0,fill:i.fill||ce};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ce,strokeWidth:i,fill:ce}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class Iw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 Ds="http://www.w3.org/2000/svg";class Dw{constructor(t,r){this.svg=t,this.gen=new va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Ds,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ds,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Ds,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Ds,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 tt={canvas:(e,t)=>new Iw(e,t),svg:(e,t)=>new Dw(e,t),generator:e=>new va(e),newSeed:()=>va.newSeed()},ut=p(async(e,t,r)=>{var d,y;let i;const s=t.useHtmlLabels||qe((d=St())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Ht(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 ze(o,_e(Mr(n),St()),{useHtmlLabels:s,width:t.width||((y=St().flowchart)==null?void 0:y.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},St());let u=h.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(s){const g=h.children[0],m=yt(h);await sp(g,n),u=g.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return s?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},"labelHelper"),Ao=p(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??ae(St()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ze(s,_e(Mr(t),St()),{useHtmlLabels:i,width:r.width||((c=(l=St())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ae(St())){const h=a.children[0],u=yt(a);o=h.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),it=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ht=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function kt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(kt,"createPathFromPoints");function fr(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const y=d/50,g=e+y*l,m=f+s*Math.sin(u*(g-e));o.push({x:g,y:m})}return o}p(fr,"generateFullSineWavePoints");function hs(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);o.push({x:-d,y:-y})}return o}p(hs,"generateCirclePoints");function _n(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=p((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(_n,"mergePaths");var Pw=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),Dr=Pw,Rw=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=St(),n=ae(o);return await ze(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),or=Rw,pr=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"),Nw=p(async(e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=rt(t),f=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),d=qe(r.flowchart.htmlLabels),y=t.direction==="LR",g=f.insert("g").attr("class","cluster-label swimlane-label"),m=await ze(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=m.getBBox();if(d){const W=m.children[0],O=yt(m);C=W.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const b=t.padding??0,k=t.width<=C.width+b?C.width+b:t.width;t.width<=C.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const w=t.height,S=t.y-w/2,_=t.y+w/2,F=t.x-k/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+w/3,z=y?4:0,N=C.height+2*z;let M,U;if(y){const W=Math.max(N,C.height+2*z),O=F+W,A=Math.max(0,k-W);if(t.look==="handDrawn"){const E=tt.svg(f),q=J(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Y=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),G=E.rectangle(F,S,W,w,q);M=f.insert(()=>G,":first-child");const et=E.rectangle(O,S,A,w,Y);U=f.insert(()=>et,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",u.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",S).attr("width",W).attr("height",w).attr("fill",a).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",O).attr("y",S).attr("width",A).attr("height",w).attr("fill","none").attr("stroke",n);const B=F+W/2,$=t.y;g.attr("transform",`translate(${B}, ${$}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const W=Math.max(0,v-S),O=Math.min(N,W),A=S+O,B=Math.max(0,_-A),$=t.x-k/2;if(t.look==="handDrawn"){const Y=tt.svg(f),G=J(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),et=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),lt=Y.rectangle($,S,k,O,G);M=f.insert(()=>lt,":first-child");const ot=Y.rectangle($,A,k,B,et);U=f.insert(()=>ot,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",u.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",$).attr("y",S).attr("width",k).attr("height",O).attr("fill",a).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",$).attr("y",A).attr("width",k).attr("height",B).attr("fill","none").attr("stroke",n);const E=t.x-C.width/2,q=S+(O-C.height)/2;g.attr("transform",`translate(${E}, ${q})`)}if(H.trace("Swimlane data ",t,JSON.stringify(t)),l){const W=g.select("span");W&&W.attr("style",l)}return t.offsetX=0,t.width=k,t.height=w,t.offsetY=C.height-b/2,t.intersect=function(W){return Dr(t,W)},{cluster:f,labelBBox:C}},"swimlane"),Rp=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ae(r),d=u.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):y=await or(d,t.label,t.labelStyle||"",!1,!0);let g=y.getBBox();if(ae(r)){const F=y.children[0],v=yt(y);g=F.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const F=tt.svg(u),v=J(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),z=F.path(pr(b,k,m,C,0),v);w=u.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=Cl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const F=d.select("span");F&&F.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(F){return Dr(t,F)},{cluster:u,labelBBox:g}},"rect"),qw=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,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Dr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Ww=p(async(e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,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 f=c.append("rect");const d=await or(u,t.label,t.labelStyle,void 0,!0);let y=d.getBBox();if(ae(r)){const z=d.children[0],N=yt(d);y=z.getBoundingClientRect(),N.attr("width",y.width),N.attr("height",y.height)}const g=0*t.padding,m=g/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+g;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-y.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const _=t.y-t.height/2-m+y.height+2;let F;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),N=tt.svg(c),M=t.rx||t.ry?N.path(pr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(w,S,C,b,{seed:s});F=c.insert(()=>M,":first-child");const U=N.rectangle(w,_,C,k,{fill:z?a:o,fillStyle:z?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>M,":first-child"),f=c.insert(()=>U)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",_).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-y.width/2}, ${S+1-(ae(r)?0:3)})`);const v=F.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(z){return Dr(t,z)},{cluster:c,labelBBox:y}},"roundedWithTitle"),zw=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ae(r),d=u.insert("g").attr("class","cluster-label "),y=await ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=y.getBBox();if(ae(r)){const F=y.children[0],v=yt(y);g=F.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const F=tt.svg(u),v=J(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),z=F.path(pr(b,k,m,C,t.rx),v);w=u.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=Cl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const F=d.select("span");F&&F.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(F){return Dr(t,F)},{cluster:u,labelBBox:g}},"kanbanSection"),Hw=p((e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const m=tt.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>m,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const y=d.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Dr(t,g)},{cluster:o,labelBBox:{}}},"divider"),Yw=Rp,Uw={rect:Rp,squareRect:Yw,roundedWithTitle:Ww,noteGroup:qw,divider:Hw,kanbanSection:zw,swimlane:Nw},Np=new Map,Gw=p(async(e,t)=>{const r=t.shape||"rect",i=await Uw[r](e,t);return Np.set(t.id,i),i},"insertCluster"),oF=p(()=>{Np=new Map},"clear");function qp(e,t){return e.intersect(t)}p(qp,"intersectNode");var jw=qp;function Wp(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}p(Wp,"intersectEllipse");var zp=Wp;function Hp(e,t,r){return zp(e,t,t,r)}p(Hp,"intersectCircle");var Xw=Hp;function Yp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&Bn(n,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,y=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(y)<c&&Bn(d,y))return;const g=s*u-h*a;if(g===0)return;const m=Math.abs(g/2);let C=a*f-u*o;const b=C<0?(C-m)/g:(C+m)/g;C=h*o-s*f;const k=C<0?(C-m)/g:(C+m)/g;return{x:b,y:k}}}p(Yp,"intersectLine");function Bn(e,t){return e*t>0}p(Bn,"sameSign");var Vw=Yp;function Up(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=Vw(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,y=Math.sqrt(f*f+d*d),g=u.x-r.x,m=u.y-r.y,C=Math.sqrt(g*g+m*m);return y<C?-1:y===C?0:1}),a[0]):e}p(Up,"intersectPolygon");var Zw=Up,Q={node:jw,circle:Xw,ellipse:zp,polygon:Zw,rect:Dr};function Gp(e,t){const{labelStyles:r}=rt(t);t.labelStyle=r;const i=ht(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=tt.svg(a),c=J(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Ht(n)),it(t,u),t.intersect=function(f){return H.info("Circle intersect",t,o,f),Q.circle(t,o,f)},a}p(Gp,"anchor");function vn(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/s,y=f/a,g=Math.sqrt(d**2+y**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-g**2),C=l+m*a*Math.sin(h)*(o?-1:1),b=c-m*s*Math.cos(h)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let S=Math.atan2((i-b)/a,(r-C)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const _=[];for(let F=0;F<20;F++){const v=F/19,z=k+v*S,N=C+s*Math.cos(z),M=b+a*Math.sin(z);_.push({x:N,y:M})}return _}p(vn,"generateArcPoints");function jp(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(jp,"calculateArcSagitta");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=p(z=>z+o,"calcTotalHeight"),l=p(z=>{const N=z/2;return[N/(2.5+z/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[f,d]=l(u),y=jp(u,f,d),m=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+y-y,C=u,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...vn(-m/2,-C/2,-m/2,C/2,f,d,!1),{x:m/2,y:C/2},...vn(m/2,C/2,m/2,-C/2,f,d,!0)],w=tt.svg(c),S=J(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=kt(k),F=w.path(_,S),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${f/2}, 0)`),it(t,v),t.intersect=function(z){return Q.polygon(t,k,z)},c}p(Xp,"bowTieRect");function Qe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Qe,"insertPolygonShape");var Ps=12;async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Ps),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,f=c,d=-h,y=0,g=[{x:u+Ps,y:d},{x:f,y:d},{x:f,y},{x:u,y},{x:u,y:d+Ps},{x:u+Ps,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(n),k=J(t,{}),w=kt(g),S=b.path(w,k);m=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&m.attr("style",C)}else m=Qe(n,c,h,g);return i&&m.attr("style",i),it(t,m),t.intersect=function(b){return Q.polygon(t,g,b)},n}p(Vp,"card");function Zp(e,t){const{nodeStyles:r}=rt(t);t.label="";const i=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=tt.svg(i),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=kt(o),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(f){return Q.polygon(t,o,f)},i}p(Zp,"choice");async function El(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await ut(e,t,ht(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=tt.svg(a),y=J(t,{}),g=d.circle(0,0,h*2,y);u=a.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Ht(f))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return it(t,u),t.calcIntersect=function(d,y){const g=d.width/2;return Q.circle(d,g,y)},t.intersect=function(d){return H.info("Circle intersect",t,h,d),Q.circle(t,h,d)},a}p(El,"circle");function Kp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
234
- M ${s.x},${s.y} L ${o.x},${o.y}`}p(Kp,"createLine");function Qp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=tt.svg(s),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=Kp(a),u=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),it(t,f),t.intersect=function(d){return H.info("crossedCircle intersect",t,{radius:a,point:d}),Q.circle(t,a,d)},s}p(Qp,"crossedCircle");function Ge(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);o.push({x:-d,y:-y})}return o}p(Ge,"generateCirclePoints");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...Ge(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ge(c/2+u*2,-u,u,20,-180,-270),...Ge(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ge(c/2,h/2,u,20,0,90)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ge(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ge(c/2+c*.1,-u,u,20,-180,-270),...Ge(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ge(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],g=tt.svg(s),m=J(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),k=g.path(b,m),w=kt(y),S=g.path(w,{...m}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),it(t,_),t.intersect=function(F){return Q.polygon(t,y,F)},s}p(Jp,"curlyBraceLeft");function je(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);o.push({x:d,y})}return o}p(je,"generateCirclePoints");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90)],y=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],g=tt.svg(s),m=J(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),k=g.path(b,m),w=kt(y),S=g.path(w,{...m}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),it(t,_),t.intersect=function(F){return Q.polygon(t,y,F)},s}p(tg,"curlyBraceRight");function Gt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);o.push({x:-d,y:-y})}return o}p(Gt,"generateCirclePoints");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...Gt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Gt(c/2+u*2,-u,u,20,-180,-270),...Gt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Gt(c/2,h/2,u,20,0,90)],y=[...Gt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Gt(-c/2-u/2,-u,u,20,0,90),...Gt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Gt(-c/2+u+u/2,h/2,u,30,-180,-270)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Gt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Gt(c/2+u*2,-u,u,20,-180,-270),...Gt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Gt(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},...Gt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Gt(-c/2-u/2,-u,u,20,0,90),...Gt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Gt(-c/2+u+u/2,h/2,u,30,-180,-270)],m=tt.svg(s),C=J(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=kt(d).replace("Z",""),w=m.path(k,C),_=kt(y).replace("Z",""),F=m.path(_,C),v=kt(g),z=m.path(v,{...C}),N=s.insert("g",":first-child");return N.insert(()=>z,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>F,":first-child"),N.attr("class","text"),f&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),it(t,N),t.intersect=function(M){return Q.polygon(t,g,M)},s}p(eg,"curlyBraces");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:y}=t,g=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,b=f,k=C-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...hs(-k,-b/2,d,50,270,90)],_=kt(S),F=g.path(_,m),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-u/2}, ${-f/2})`),it(t,v),t.intersect=function(z){return Q.polygon(t,S,z)},c}p(rg,"curvedTrapezoid");var Kw=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Qw=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Jw=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Cc=8,xc=8;async function ig(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<xc&&(t.width=xc);const b=m/2/(2.5+m/50);t.height=(t.height??0)-a-b*3,t.height<Cc&&(t.height=Cc)}const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t.width?t.width:l.width)+o,u=h/2,f=u/(2.5+h/50),d=(t.height?t.height:l.height)+a+f;let y;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=tt.svg(n),C=Qw(0,0,h,d,u,f),b=Jw(0,f,h,d,u,f),k=J(t,{}),w=m.path(C,k),S=m.path(b,J(t,{fill:"none"}));y=n.insert(()=>S,":first-child"),y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const m=Kw(0,0,h,d,u,f);y=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",Ht(g)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),it(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=Q.rect(t,m),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=f-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}p(ig,"cylinder");async function Si(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await ut(e,t,ht(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=tt.svg(a),m=J(t,{}),C=f||d?g.path(pr(c,h,n,l,f||0),m):g.rectangle(c,h,n,l,m);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Ht(y))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Ht(f)).attr("ry",Ht(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return it(t,u),t.calcIntersect=function(g,m){return Q.rect(g,m)},t.intersect=function(g){return Q.rect(t,g)},a}p(Si,"drawRect");async function sg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await Si(e,t,l);if(t.look==="handDrawn"){const d=tt.svg(c),y=J(t,{}),g=c.select(".basic.label-container > path:nth-child(2)"),m=g.node();if(!m)return c;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return c;return c.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),c.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),g.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,f=(Number(h.attr("height"))||n)??0;return u>0&&f>0&&h.attr("stroke-dasharray",`${u} ${f}`),c}p(sg,"datastore");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=n.width+s,h=n.height+a,u=h*.2,f=-c/2,d=-h/2-u/2,{cssStyles:y}=t,g=tt.svg(o),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=g.polygon(C.map(w=>[w.x,w.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),it(t,k),t.intersect=function(w){return Q.rect(t,w)},o}p(ag,"dividedRectangle");async function og(e,t){var d,y;const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=tt.svg(n),m=J(t,{roughness:.2,strokeWidth:2.5}),C=J(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,c*2,m),k=g.circle(0,0,h*2,C);u=n.insert("g",":first-child"),u.attr("class",Ht(t.cssClasses)).attr("style",Ht(f)),(d=u.node())==null||d.appendChild(b),(y=u.node())==null||y.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return it(t,u),t.intersect=function(g){return H.info("DoubleCircle intersect",t,c,g),Q.circle(t,c,g)},n}p(og,"doublecircle");function ng(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=tt.svg(a),{nodeBorder:c}=r,h=J(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),it(t,f),t.intersect=function(d){return H.info("filledCircle intersect",t,{radius:o,point:d}),Q.circle(t,o,d)},a}p(ng,"filledCircle");var bc=10,kc=10;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<bc&&(t.height=bc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<kc&&(t.width=kc));const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,f=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,y=tt.svg(o),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=kt(f),C=y.path(m,g),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,it(t,b),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(k){return H.info("Triangle intersect",t,f,k),Q.polygon(t,f,k)},o}p(lg,"flippedTriangle");function hg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=rt(t);t.label="";const o=e.insert("g").attr("class",ht(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,f=tt.svg(o),d=J(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=f.rectangle(h,u,l,c,d),g=o.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),it(t,g);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return Q.rect(t,C)},o}p(hg,"forkJoin");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,f=u/2,{cssStyles:d}=t,y=tt.svg(l),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-h/2,y:-u/2},{x:h/2-f,y:-u/2},...hs(-h/2+f,0,f,50,90,270),{x:h/2-f,y:u/2},{x:-h/2,y:u/2}],C=kt(m),b=y.path(C,g),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),it(t,k),t.intersect=function(w){return H.info("Pill intersect",t,{radius:f,point:w}),Q.polygon(t,m,w)},l}p(cg,"halfRoundedRectangle");var tS=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 ug(e,t){const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await ut(e,t,ht(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/s,y=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,g=[{x:d,y:0},{x:y-d,y:0},{x:y,y:-f/2},{x:y-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(h),k=J(t,{}),w=tS(0,0,y,f,d),S=b.path(w,k);m=h.insert(()=>S,":first-child").attr("transform",`translate(${-y/2}, ${f/2})`),C&&m.attr("style",C)}else m=Qe(h,y,f,g);return i&&m.attr("style",i),t.width=y,t.height=f,it(t,m),t.intersect=function(b){return Q.polygon(t,g,b)},h}p(ug,"hexagon");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await ut(e,t,ht(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=tt.svg(s),c=J(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=kt(h),f=l.path(u,c),d=s.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),it(t,d),t.intersect=function(y){return H.info("Pill intersect",t,{points:h}),Q.polygon(t,h,y)},s}p(dg,"hourglass");async function fg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await ut(e,t,"icon-shape default"),f=t.pos==="t",d=n,y=n,{nodeBorder:g}=r,{stylesMap:m}=wi(t),C=-y/2,b=-d/2,k=t.label?8:0,w=tt.svg(c),S=J(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=w.rectangle(C,b,y,d,S),F=Math.max(y,h.width),v=d+h.height+k,z=w.rectangle(-F/2,-v/2,F,v,{...S,fill:"transparent",stroke:"none"}),N=c.insert(()=>_,":first-child"),M=c.insert(()=>z);if(t.icon){const U=c.append("g");U.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const W=U.node().getBBox(),O=W.width,A=W.height,B=W.x,$=W.y;U.attr("transform",`translate(${-O/2-B},${f?h.height/2+k/2-A/2-$:-h.height/2-k/2-A/2-$})`),U.attr("style",`color: ${m.get("stroke")??g};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-v/2:v/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),it(t,M),t.intersect=function(U){if(H.info("iconSquare intersect",t,U),!t.label)return Q.rect(t,U);const W=t.x??0,O=t.y??0,A=t.height??0;let B=[];return f?B=[{x:W-h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2+h.height+k},{x:W+y/2,y:O-A/2+h.height+k},{x:W+y/2,y:O+A/2},{x:W-y/2,y:O+A/2},{x:W-y/2,y:O-A/2+h.height+k},{x:W-h.width/2,y:O-A/2+h.height+k}]:B=[{x:W-y/2,y:O-A/2},{x:W+y/2,y:O-A/2},{x:W+y/2,y:O-A/2+d},{x:W+h.width/2,y:O-A/2+d},{x:W+h.width/2/2,y:O+A/2},{x:W-h.width/2,y:O+A/2},{x:W-h.width/2,y:O-A/2+d},{x:W-y/2,y:O-A/2+d}],Q.polygon(t,B,U)},c}p(fg,"icon");async function pg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await ut(e,t,"icon-shape default"),f=20,d=t.label?8:0,y=t.pos==="t",{nodeBorder:g,mainBkg:m}=r,{stylesMap:C}=wi(t),b=tt.svg(c),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??m;const S=c.append("g");t.icon&&S.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),F=_.width,v=_.height,z=_.x,N=_.y,M=Math.max(F,v)*Math.SQRT2+f*2,U=b.circle(0,0,M,k),W=Math.max(M,h.width),O=M+h.height+d,A=b.rectangle(-W/2,-O/2,W,O,{...k,fill:"transparent",stroke:"none"}),B=c.insert(()=>U,":first-child"),$=c.insert(()=>A);return S.attr("transform",`translate(${-F/2-z},${y?h.height/2+d/2-v/2-N:-h.height/2-d/2-v/2-N})`),S.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${y?-O/2:O/2-h.height})`),B.attr("transform",`translate(0,${y?h.height/2+d/2:-h.height/2-d/2})`),it(t,$),t.intersect=function(E){return H.info("iconSquare intersect",t,E),Q.rect(t,E)},c}p(pg,"iconCircle");async function gg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ut(e,t,"icon-shape default"),d=t.pos==="t",y=n+u*2,g=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=wi(t),k=-g/2,w=-y/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=b.get("fill");F.stroke=v??C;const z=_.path(pr(k,w,g,y,5),F),N=Math.max(g,h.width),M=y+h.height+S,U=_.rectangle(-N/2,-M/2,N,M,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child").attr("class","icon-shape2"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;A.attr("transform",`translate(${-$/2-q},${d?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),it(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return Q.rect(t,A);const B=t.x??0,$=t.y??0,E=t.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+S},{x:B+g/2,y:$-E/2+h.height+S},{x:B+g/2,y:$+E/2},{x:B-g/2,y:$+E/2},{x:B-g/2,y:$-E/2+h.height+S},{x:B-h.width/2,y:$-E/2+h.height+S}]:q=[{x:B-g/2,y:$-E/2},{x:B+g/2,y:$-E/2},{x:B+g/2,y:$-E/2+y},{x:B+h.width/2,y:$-E/2+y},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+y},{x:B-g/2,y:$-E/2+y}],Q.polygon(t,q,A)},c}p(gg,"iconRounded");async function mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ut(e,t,"icon-shape default"),d=t.pos==="t",y=n+u*2,g=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=wi(t),k=-g/2,w=-y/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=b.get("fill");F.stroke=v??C;const z=_.path(pr(k,w,g,y,.1),F),N=Math.max(g,h.width),M=y+h.height+S,U=_.rectangle(-N/2,-M/2,N,M,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;A.attr("transform",`translate(${-$/2-q},${d?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),it(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return Q.rect(t,A);const B=t.x??0,$=t.y??0,E=t.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+S},{x:B+g/2,y:$-E/2+h.height+S},{x:B+g/2,y:$+E/2},{x:B-g/2,y:$+E/2},{x:B-g/2,y:$-E/2+h.height+S},{x:B-h.width/2,y:$-E/2+h.height+S}]:q=[{x:B-g/2,y:$-E/2},{x:B+g/2,y:$-E/2},{x:B+g/2,y:$-E/2+y},{x:B+h.width/2,y:$-E/2+y},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+y},{x:B-g/2,y:$-E/2+y}],Q.polygon(t,q,A)},c}p(mg,"iconSquare");async function yg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=rt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),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)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:f,label:d}=await ut(e,t,"image-shape default"),y=t.pos==="t",g=-c/2,m=-h/2,C=t.label?8:0,b=tt.svg(u),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(g,m,c,h,k),S=Math.max(c,f.width),_=h+f.height+C,F=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>w,":first-child"),z=u.insert(()=>F);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${y?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-h/2-f.height/2-C/2:h/2-f.height/2+C/2})`),v.attr("transform",`translate(0,${y?f.height/2+C/2:-f.height/2-C/2})`),it(t,z),t.intersect=function(N){if(H.info("iconSquare intersect",t,N),!t.label)return Q.rect(t,N);const M=t.x??0,U=t.y??0,W=t.height??0;let O=[];return y?O=[{x:M-f.width/2,y:U-W/2},{x:M+f.width/2,y:U-W/2},{x:M+f.width/2,y:U-W/2+f.height+C},{x:M+c/2,y:U-W/2+f.height+C},{x:M+c/2,y:U+W/2},{x:M-c/2,y:U+W/2},{x:M-c/2,y:U-W/2+f.height+C},{x:M-f.width/2,y:U-W/2+f.height+C}]:O=[{x:M-c/2,y:U-W/2},{x:M+c/2,y:U-W/2},{x:M+c/2,y:U-W/2+h},{x:M+f.width/2,y:U-W/2+h},{x:M+f.width/2/2,y:U+W/2},{x:M-f.width/2,y:U+W/2},{x:M-f.width/2,y:U-W/2+h},{x:M-c/2,y:U-W/2+h}],Q.polygon(t,O,N)},u}p(yg,"imageSquare");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),h=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=Qe(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(Cg,"inv_trapezoid");async function xg(e,t){const{shapeSvg:r,bbox:i,label:s}=await ut(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),it(t,a),t.intersect=function(l){return Q.rect(t,l)},r}p(xg,"labelRect");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Qe(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(bg,"lean_left");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Qe(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(kg,"lean_right");function Tg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=tt.svg(s),u=J(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=kt(c),d=h.path(f,u),y=s.insert(()=>d,":first-child");return y.attr("class","outer-path"),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-n})`),it(t,y),t.intersect=function(g){return H.info("lightningBolt intersect",t,g),Q.polygon(t,c,g)},s}p(Tg,"lightningBolt");var eS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),rS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),iS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Tc=10,wc=10;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<wc&&(t.width=wc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<Tc&&(t.height=Tc)}const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,f=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+o*2,y=d*.1;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=tt.svg(n),b=rS(0,0,h,d,u,f,y),k=iS(0,f,h,d,u,f),w=J(t,{}),S=C.path(b,w),_=C.path(k,w);n.insert(()=>_,":first-child").attr("class","line"),g=n.insert(()=>S,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const C=eS(0,0,h,d,u,f,y);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Ht(m)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),it(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=Q.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let w=f*f*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=f-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}p(wg,"linedCylinder");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:y}=t,g=tt.svg(n),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...fr(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,f,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],b=g.polygon(C.map(w=>[w.x,w.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),it(t,k),t.intersect=function(w){return Q.polygon(t,C,w)},n}p(Sg,"linedWaveEdgedRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,d=u-2*n,y=f-2*n,g=-d/2,m=-y/2,{cssStyles:C}=t,b=tt.svg(l),k=J(t,{}),w=[{x:g-n,y:m+n},{x:g-n,y:m+y+n},{x:g+d-n,y:m+y+n},{x:g+d-n,y:m+y},{x:g+d,y:m+y},{x:g+d,y:m+y-n},{x:g+d+n,y:m+y-n},{x:g+d+n,y:m-n},{x:g+n,y:m-n},{x:g+n,y:m},{x:g,y:m},{x:g,y:m+n}],S=[{x:g,y:m+n},{x:g+d-n,y:m+n},{x:g+d-n,y:m+y},{x:g+d,y:m+y},{x:g+d,y:m},{x:g,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=kt(w);let F=b.path(_,k);const v=kt(S);let z=b.path(v,k);t.look!=="handDrawn"&&(F=_n(F),z=_n(z));const N=l.insert("g",":first-child");return N.insert(()=>F),N.insert(()=>z),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.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))})`),it(t,N),t.intersect=function(M){return Q.polygon(t,w,M)},l}p(_g,"multiRect");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(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(a.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?f/4:f/8,y=f+(h?d/2:-d/2),g=-u/2,m=-y/2,C=10,{cssStyles:b}=t,k=fr(g-C,m+y+C,g+u-C,m+y+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:g-C,y:m+C},{x:g-C,y:m+y+C},...k,{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:w.y-2*C},{x:g+u+C,y:w.y-2*C},{x:g+u+C,y:m-C},{x:g+C,y:m-C},{x:g+C,y:m},{x:g,y:m},{x:g,y:m+C}],_=[{x:g,y:m+C},{x:g+u-C,y:m+C},{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:m},{x:g,y:m}],F=tt.svg(s),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const z=kt(S),N=F.path(z,v),M=kt(_),U=F.path(M,v),W=s.insert(()=>N,":first-child");return W.insert(()=>U),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),it(t,W),t.intersect=function(O){return Q.polygon(t,S,O)},s}p(Bg,"multiWaveEdgedRectangle");async function vg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i,t.useHtmlLabels||ae(Et())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(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,f=-h/2,{cssStyles:d}=t,y=tt.svg(o),g=J(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=y.rectangle(u,f,c,h,g),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,C),t.intersect=function(b){return Q.rect(t,b)},o}p(vg,"note");var sS=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 Lg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await ut(e,t,ht(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+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:f}=t;if(t.look==="handDrawn"){const d=tt.svg(s),y=J(t,{}),g=sS(0,0,l),m=d.path(g,y);u=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Qe(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),it(t,u),t.calcIntersect=function(d,y){const g=d.width,m=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=Q.polygon(d,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}p(Lg,"question");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),f=-h/2,d=-u/2,y=d/2,g=[{x:f+y,y:d},{x:f,y:0},{x:f+y,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:m}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=kt(g),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-y/2},0)`),c.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),it(t,S),t.intersect=function(_){return Q.polygon(t,g,_)},n}p(Fg,"rect_left_inv_arrow");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await or(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(ae(St())){const v=h.children[0],z=yt(h);u=v.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}H.info("Text 2",l);const f=l||[],d=h.getBBox(),y=await or(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),g=y.children[0],m=yt(y);u=g.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;yt(y).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),yt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,S=-u.height/2-C;let _,F;if(t.look==="handDrawn"){const v=tt.svg(a),z=J(t,{}),N=v.path(pr(w,S,b,k,t.rx||0),z),M=v.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,z);F=a.insert(()=>(H.debug("Rough node insert CXC",N),M),":first-child"),_=a.insert(()=>(H.debug("Rough node insert CXC",N),N),":first-child")}else _=o.insert("rect",":first-child"),F=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return it(t,_),t.intersect=function(v){return Q.rect(t,v)},a}p(Ag,"rectWithTitle");async function Eg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Si(e,t,s)}p(Eg,"roundedRect");var xr=8;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?xr:xr*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-xr,f=h,d=xr-c/2,y=-h/2,{cssStyles:g}=t,m=tt.svg(o),C=J(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y},{x:d+u,y},{x:d+u,y:y+f},{x:d-xr,y:y+f},{x:d-xr,y},{x:d,y},{x:d,y:y+f}],k=m.polygon(b.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Ht(g)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${xr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,w),t.intersect=function(S){return Q.rect(t,S)},o}p(Mg,"shadedProcess");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,f=h,d=u/1.5,y=-f/2,g=-d/2,{cssStyles:m}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:g},{x:y,y:g+d},{x:y+f,y:g+d},{x:y+f,y:g-d/2}],w=kt(k),S=C.path(w,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),it(t,_),t.intersect=function(F){return Q.polygon(t,k,F)},n}p($g,"slopedRect");async function Og(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Si(e,t,a)}p(Og,"squareRect");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:f}=t,d=tt.svg(n),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const g=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...hs(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...hs(h/2-u,0,u,50,270,450)],m=kt(g),C=d.path(m,y),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),it(t,b),t.intersect=function(k){return Q.polygon(t,g,k)},n}p(Ig,"stadium");async function Dg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Si(e,t,r)}p(Dg,"state");function Pg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,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=tt.svg(h),f=J(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),y=n??l,g=(t.width??0)*5/14,m=u.circle(0,0,g,{...f,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return it(t,C),t.intersect=function(w){return Q.circle(t,(t.width??0)/2,w)},h}p(Pg,"stateEnd");function Rg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=tt.svg(a).circle(0,0,t.width,p2(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return it(t,o),t.intersect=function(c){return Q.circle(t,(t.width??7)/2,c)},a}p(Rg,"stateStart");var Ur=8;async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+2*Ur+a,h=((t==null?void 0:t.height)??l.height)+o,u=c-2*Ur,f=h,d=-c/2,y=-h/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const m=tt.svg(n),C=J(t,{}),b=m.rectangle(d,y,u+16,f,C),k=m.line(d+Ur,y,d+Ur,y+f,C),w=m.line(d+Ur+u,y,d+Ur+u,y+f,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ht(_)),it(t,S)}else{const m=Qe(n,u,f,g);i&&m.attr("style",i),it(t,m)}return t.intersect=function(m){return Q.polygon(t,g,m)},n}p(Ng,"subroutine");var Eo=.2;async function qg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Eo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=Eo*c,u=Eo*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,y=c,g=-d/2,m=-y/2,{cssStyles:C}=t,b=tt.svg(n),k=J(t,{}),w=[{x:g-h/2,y:m},{x:g+d+h/2,y:m},{x:g+d+h/2,y:m+y},{x:g-h/2,y:m+y}],S=[{x:g+d-h/2,y:m+y},{x:g+d+h/2,y:m+y},{x:g+d+h/2,y:m+y-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=kt(w),F=b.path(_,k),v=kt(S),z=b.path(v,{...k,fillStyle:"solid"}),N=n.insert(()=>z,":first-child");return N.insert(()=>F,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),it(t,N),t.intersect=function(M){return Q.polygon(t,w,M)},n}p(qg,"taggedRect");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,f=l+c,{cssStyles:d}=t,y=tt.svg(s),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:f/2},...fr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,b=-f/2-u*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...fr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],w=kt(m),S=y.path(w,g),_=kt(k),F=y.path(_,{...g,fillStyle:"solid"}),v=s.insert(()=>F,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),it(t,v),t.intersect=function(z){return Q.polygon(t,m,z)},s}p(Wg,"taggedWaveEdgedRectangle");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await ut(e,t,ht(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,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",o).attr("height",n),it(t,h),t.intersect=function(u){return Q.rect(t,u)},s}p(zg,"text");var aS=p((e,t,r,i,s,a)=>`M${e},${t}
234
+ `);return kp(i)}p(Tp,"preprocessMarkdown");function wp(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(wp,"nonMarkdownToLines");function Sp(e,t={}){const r=Tp(e,t),i=vt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
235
+ `).forEach((h,u)=>{u!==0&&(a++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[a].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}p(Sp,"markdownToLines");function _p(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(_p,"nonMarkdownToHTML");function Bp(e,{markdownAutoWrap:t}={}){const r=vt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(H.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Bp,"markdownToHTML");function vp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(vp,"splitTextToChars");function Lp(e,t){const r=vp(t.content);return Al(e,[],r,t.type)}p(Lp,"splitWordToFitWidth");function Al(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?Al(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Al,"splitWordToFitWidthRecursion");function Fp(e,t){if(e.some(({content:r})=>r.includes(`
236
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return _a(e,t)}p(Fp,"splitLineToFitWidth");function _a(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return _a(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Lp(t,a);r.push([n]),l.content&&e.unshift(l)}return _a(e,t,r)}p(_a,"splitLineToFitWidthRecursion");function Tn(e,t){t&&e.attr("style",t)}p(Tn,"applyStyle");var dc=16384;async function Ap(e,t,r,i,s=!1,a=Et()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,dc)}px`),o.attr("height",`${Math.min(10*r,dc)}px`);const n=o.append("xhtml:div"),l=rs(t.label)?await cu(t.label.replace(gs.lineBreakRegex,`
237
+ `),a):_e(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Tn(h,t.labelStyle),h.attr("class",`${c} ${i}`),Tn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}p(Ap,"addHtmlSpan");function Ya(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(Ya,"createTspan");function Ep(e,t,r){const i=e.append("text"),s=Ya(i,1,t);Ua(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Ep,"computeWidthOfText");function Lw(e,t,r){var o;const i=e.append("text"),s=Ya(i,1,t);Ua(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}p(Lw,"computeDimensionOfText");function Mp(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(d=>Ep(o,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:Fp(h,u);for(const d of f){const g=Ya(l,c,1.1,s);Ua(g,d),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),o.node()}else return l.node()}p(Mp,"createFormattedText");function wn(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(wn,"decodeHTMLEntities");function Ua(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(wn(r.content)):s.text(" "+wn(r.content))})}p(Ua,"updateTextContentAndStyles");async function $p(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await PT(n)?await bs(n,void 0,{class:"label-icon"}):`<i class='${_e(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p($p,"replaceIconSubstring");var ze=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(H.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?Bp(t,h):_p(t),f=await $p(Or(u),h),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:rs(t)?d:f,labelStyle:r.replace("fill:","color:")};return await Ap(e,g,l,s,c,h)}else{const u=Or(t.replace(/<br\s*\/?>/g,"<br/>")),f=o?Sp(u.replace("<br>","<br/>"),h):wp(u),d=Mp(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");yt(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");yt(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");yt(d).select("text").attr("style",y)}return i?yt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):yt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function vo(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function Fw(e,t){return e[0]===t[0]&&e[1]===t[1]}function Aw(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)vo(c,n,s);const l=function(c,h,u){const f=[];for(const b of c){const k=[...b];Fw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const _=Math.min(w[1],S[1]);g.push({ymin:_,ymax:Math.max(w[1],S[1]),x:_===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(g.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!g.length)return d;let y=[],m=g[0].ymin,C=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>m);k++)b=k;g.splice(0,b+1).forEach(k=>{y.push({s:m,edge:k})})}if(y=y.filter(b=>!(b.edge.ymax<=m)),y.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%h==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const w=y[b].edge,S=y[k].edge;d.push([[Math.round(w.x),m],[Math.round(S.x),m]])}m+=u,y.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(o,a,i);if(s){for(const c of o)vo(c,n,-s);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),vo(f,h,u)})(l,n,-s)}return l}function Ts(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),Aw(e,s,i,a||1)}class El{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ts(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 Ga(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 Ew extends El{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ts(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)Ga([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Mw extends El{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class $w{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ts(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Ga(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const y=d+u+g*s,m=f-o+2*Math.random()*o,C=y-o+2*Math.random()*o,b=this.helper.ellipse(m,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Ow{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ts(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=Ga(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+s),y=g+i,m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],C=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];a.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}}),a}}class Iw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Ts(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=Ga(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}}),s}}const oe={};class Dw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Rw=0,Lo=1,fc=2,Ds={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 Fo(e,t){return e.type===t}function Ml(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Rw,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Lo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:fc,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!Fo(a,fc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Ml("M0,0"+e);s++,o=Ds[a.text],i=a.text}else Fo(a,Lo)?o=Ds[i]:(s++,o=Ds[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!Fo(c,Lo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Ds[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Op(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((c,h)=>h%2?c+r:c+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((c,h)=>h%2?c+r:c+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((c,h)=>h%2?c+r:c+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Ip(e){const t=[];let r="",i=0,s=0,a=0,o=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,[a,o]=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,f=0;r==="C"||r==="S"?(u=i+(i-n),f=s+(s-l)):(u=i,f=s),t.push({key:"C",data:[u,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=s+(s-l)):(d=i,g=s);const y=i+2*(d-i)/3,m=s+2*(g-s)/3,C=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[y,m,C,b,u,f]}),n=d,l=g,i=u,s=f;break}case"Q":{const[u,f,d,g]=h,y=i+2*(u-i)/3,m=s+2*(f-s)/3,C=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[y,m,C,b,d,g]}),n=u,l=f,i=d,s=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],y=h[4],m=h[5],C=h[6];u===0||f===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Dp(i,s,m,C,u,f,d,g,y).forEach(function(b){t.push({key:"C",data:b})}),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Pi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Dp(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,y=0,m=0;if(c)[d,g,y,m]=c;else{[e,t]=Pi(e,t,-h),[r,i]=Pi(r,i,-h);const W=(e-r)/2,O=(t-i)/2;let A=W*W/(s*s)+O*O/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const B=s*s,$=a*a,E=B*$-B*O*O-$*W*W,q=B*O*O+$*W*W,Y=(n===l?-1:1)*Math.sqrt(Math.abs(E/q));y=Y*s*O/a+(e+r)/2,m=Y*-a*W/s+(t+i)/2,d=Math.asin(parseFloat(((t-m)/a).toFixed(9))),g=Math.asin(parseFloat(((i-m)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let C=g-d;if(Math.abs(C)>120*Math.PI/180){const W=g,O=r,A=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Dp(r=y+s*Math.cos(g),i=m+a*Math.sin(g),O,A,s,a,o,0,l,[g,W,y,m])}C=g-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(g),S=Math.sin(g),_=Math.tan(C/4),v=4/3*s*_,F=4/3*a*_,z=[e,t],N=[e+v*k,t-F*b],M=[r+v*S,i-F*w],U=[r,i];if(N[0]=2*z[0]-N[0],N[1]=2*z[1]-N[1],c)return[N,M,U].concat(f);{f=[N,M,U].concat(f);const W=[];for(let O=0;O<f.length;O+=3){const A=Pi(f[O][0],f[O][1],h),B=Pi(f[O+1][0],f[O+1][1],h),$=Pi(f[O+2][0],f[O+2][1],h);W.push([A[0],A[1],B[0],B[1],$[0],$[1]])}return W}}const Pw={randOffset:function(e,t){return dt(e,t)},randOffsetWithRange:function(e,t,r){return Ba(e,t,r)},ellipse:function(e,t,r,i,s){const a=Pp(r,i,s);return Sn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return fr(e,t,r,i,s,!0)}};function Rp(e,t,r,i,s){return{type:"path",ops:fr(e,t,r,i,s)}}function Qs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...fr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...fr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Rp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Nw(e,t,r,i,s){return function(a,o){return Qs(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function pc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Rs(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Rs(r[0],1.5*(1+.22*t.roughness),yc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Rs(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Rs(o,1.5*(1+.22*t.roughness),yc(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 Pp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=dt(o*l,r),n+=dt(n*l,r),{increment:a,rx:o,ry:n}}function Sn(e,t,r,i){const[s,a]=Cc(i.increment,e,t,i.rx,i.ry,1,i.increment*Ba(.1,Ba(.4,1,r),r),r);let o=va(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Cc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=va(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function gc(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=dt(.01*u,l),f+=dt(.01*f,l);let d=s,g=a;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(g-d)/2),C=xc(m,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=xc(m,c,h,u,f,d,g,1.5,l);C.push(...b)}return o&&(n?C.push(...fr(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...fr(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:C}}function mc(e,t){const r=Ip(Op(Ml(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...fr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,f,d]=n;i.push(...qw(l,c,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...fr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Ao(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+dt(s,t),i[0][1]+dt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+dt(s,t),i[o][1]+dt(s,t)]})}}return{type:"fillPath",ops:r}}function jr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!oe[s])switch(s){case"zigzag":oe[s]||(oe[s]=new Ew(i));break;case"cross-hatch":oe[s]||(oe[s]=new Mw(i));break;case"dots":oe[s]||(oe[s]=new $w(i));break;case"dashed":oe[s]||(oe[s]=new Ow(i));break;case"zigzag-line":oe[s]||(oe[s]=new Iw(i));break;default:s="hachure",oe[s]||(oe[s]=new El(i))}return oe[s]}(t,Pw).fillPolygons(e,t)}function yc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Np(e){return e.randomizer||(e.randomizer=new Dw(e.seed||0)),e.randomizer.next()}function Ba(e,t,r,i=1){return r.roughness*i*(Np(r)*(t-e)+e)}function dt(e,t,r=1){return Ba(-e,e,t,r)}function fr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=_n(e,t,r,i,s,!0,!1);if(o)return n;const l=_n(e,t,r,i,s,!0,!0);return n.concat(l)}function _n(e,t,r,i,s,a,o){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,f=.2+.2*Np(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,g=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=dt(d,s,c),g=dt(g,s,c);const y=[],m=()=>dt(u,s,c),C=()=>dt(h,s,c),b=s.preserveVertices;return o?y.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):y.push({op:"move",data:[e+(b?0:dt(h,s,c)),t+(b?0:dt(h,s,c))]}),o?y.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),g+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),g+t+2*(i-t)*f+m(),r+(b?0:m()),i+(b?0:m())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),g+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),g+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),y}function Rs(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+dt(t,r),e[0][1]+dt(t,r)]),i.push([e[0][0]+dt(t,r),e[0][1]+dt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+dt(t,r),e[s][1]+dt(t,r)]),s===e.length-1&&i.push([e[s][0]+dt(t,r),e[s][1]+dt(t,r)]);return va(i,null,r)}function va(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(..._n(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Cc(e,t,r,i,s,a,o,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=dt(.5,n)-Math.PI/2;c.push([dt(a,n)+t+.9*i*Math.cos(h-e),dt(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[dt(a,n)+t+i*Math.cos(f),dt(a,n)+r+s*Math.sin(f)];l.push(d),c.push(d)}c.push([dt(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),dt(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([dt(a,n)+t+.98*i*Math.cos(h+o),dt(a,n)+r+.98*s*Math.sin(h+o)]),c.push([dt(a,n)+t+.9*i*Math.cos(h+.5*o),dt(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function xc(e,t,r,i,s,a,o,n,l){const c=a+dt(.1,l),h=[];h.push([dt(n,l)+t+.9*i*Math.cos(c-e),dt(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([dt(n,l)+t+i*Math.cos(u),dt(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),va(h,null,l)}function qw(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:dt(c[0],n)),o[1]+(f?0:dt(c[0],n))]}),h=f?[s,a]:[s+dt(c[d],n),a+dt(c[d],n)],l.push({op:"bcurveTo",data:[e+dt(c[d],n),t+dt(c[d],n),r+dt(c[d],n),i+dt(c[d],n),h[0],h[1]]});return l}function Ni(e){return[...e]}function bc(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(Ni(e[0]),Ni(e[1]),Ni(e[2]),Ni(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Ni(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Ks(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Ww(e,t,r){const i=Ks(t,r);if(i===0)return Ks(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)),Ks(e,Tr(t,r,s))}function Tr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Bn(e,t,r,i){const s=i||[];if(function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],f=n[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let y=3*u[0]-2*f[0]-c[0];y*=y;let m=3*u[1]-2*f[1]-c[1];return m*=m,d<y&&(d=y),g<m&&(g=m),d+g}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Ks(a,o))>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],f=Tr(l,c,.5),d=Tr(c,h,.5),g=Tr(h,u,.5),y=Tr(f,d,.5),m=Tr(d,g,.5),C=Tr(y,m,.5);Bn([l,f,y,C],0,r,s),Bn([C,m,g,u],0,r,s)}var a,o;return s}function zw(e,t){return La(e,0,e.length,t)}function La(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=Ww(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(La(e,t,c+1,i,a),La(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Eo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Bn(e,3*a,t,i);return r&&r>0?La(i,0,i.length,r):i}const ce="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,a){const o=this._o(a);return this._d("line",[Rp(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=Nw(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Ao([c],o)):n.push(jr([c],o))}return o.stroke!==ce&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Pp(i,s,o),c=Sn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Sn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(jr([c.estimatedPoints],o));return o.stroke!==ce&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Qs(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=gc(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=gc(t,r,i,s,a,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,g,y,m,C,b){const k=f,w=d;let S=Math.abs(g/2),_=Math.abs(y/2);S+=dt(.01*S,b),_+=dt(.01*_,b);let v=m,F=C;for(;v<0;)v+=2*Math.PI,F+=2*Math.PI;F-v>2*Math.PI&&(v=0,F=2*Math.PI);const z=(F-v)/b.curveStepCount,N=[];for(let M=v;M<=F;M+=z)N.push([k+S*Math.cos(M),w+_*Math.sin(M)]);return N.push([k+S*Math.cos(F),w+_*Math.sin(F)]),N.push([k,w]),jr([N],b)}(t,r,i,s,a,o,c));return c.stroke!==ce&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=pc(t,i);if(i.fill&&i.fill!==ce)if(i.fillStyle==="solid"){const o=pc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Eo(bc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Eo(bc(c),10,(1+i.roughness)/2))}o.length&&s.push(jr([o],i))}return i.stroke!==ce&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Qs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Ao([t],i)):s.push(jr([t],i))),i.stroke!==ce&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ce,o=i.stroke!==ce,n=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=Ip(Op(Ml(h))),g=[];let y=[],m=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...Eo(C,u)),C=[]},k=()=>{b(),y.length&&(g.push(y),y=[])};for(const{key:S,data:_}of d)switch(S){case"M":k(),m=[_[0],_[1]],y.push(m);break;case"L":b(),y.push([_[0],_[1]]);break;case"C":if(!C.length){const v=y.length?y[y.length-1]:m;C.push([v[0],v[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),y.push([m[0],m[1]])}if(k(),!f)return g;const w=[];for(const S of g){const _=zw(S,f);_.length&&w.push(_)}return w}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=mc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=mc(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(Ao(l,i));else s.push(jr(l,i));return o&&(n?l.forEach(h=>{s.push(Qs(h,!1,i))}):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ce};break;case"fillPath":o={d:this.opsToPath(a),stroke:ce,strokeWidth:0,fill:i.fill||ce};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ce,strokeWidth:i,fill:ce}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class Hw{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,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 Ps="http://www.w3.org/2000/svg";class Yw{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,a=s.createElementNS(Ps,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ps,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Ps,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Ps,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 tt={canvas:(e,t)=>new Hw(e,t),svg:(e,t)=>new Yw(e,t),generator:e=>new Fa(e),newSeed:()=>Fa.newSeed()},ut=p(async(e,t,r)=>{var d,g;let i;const s=t.useHtmlLabels||qe((d=_t())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Ht(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 ze(o,_e(Or(n),_t()),{useHtmlLabels:s,width:t.width||((g=_t().flowchart)==null?void 0:g.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},_t());let u=h.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(s){const y=h.children[0],m=yt(h);await np(y,n),u=y.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return s?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},"labelHelper"),Mo=p(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??ae(_t()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ze(s,_e(Or(t),_t()),{useHtmlLabels:i,width:r.width||((c=(l=_t())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ae(_t())){const h=a.children[0],u=yt(a);o=h.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),it=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ht=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function kt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(kt,"createPathFromPoints");function pr(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,y=e+g*l,m=f+s*Math.sin(u*(y-e));o.push({x:y,y:m})}return o}p(pr,"generateFullSineWavePoints");function us(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(us,"generateCirclePoints");function vn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=p((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(vn,"mergePaths");var Uw=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),Pr=Uw,Gw=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=_t(),n=ae(o);return await ze(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),nr=Gw,gr=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"),jw=p(async(e,t)=>{const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=rt(t),f=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),d=qe(r.flowchart.htmlLabels),g=t.direction==="LR",y=f.insert("g").attr("class","cluster-label swimlane-label"),m=await ze(y,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=m.getBBox();if(d){const W=m.children[0],O=yt(m);C=W.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const b=t.padding??0,k=t.width<=C.width+b?C.width+b:t.width;t.width<=C.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const w=t.height,S=t.y-w/2,_=t.y+w/2,v=t.x-k/2,F=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+w/3,z=g?4:0,N=C.height+2*z;let M,U;if(g){const W=Math.max(N,C.height+2*z),O=v+W,A=Math.max(0,k-W);if(t.look==="handDrawn"){const E=tt.svg(f),q=J(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Y=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),G=E.rectangle(v,S,W,w,q);M=f.insert(()=>G,":first-child");const et=E.rectangle(O,S,A,w,Y);U=f.insert(()=>et,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",u.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",v).attr("y",S).attr("width",W).attr("height",w).attr("fill",a).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",O).attr("y",S).attr("width",A).attr("height",w).attr("fill","none").attr("stroke",n);const B=v+W/2,$=t.y;y.attr("transform",`translate(${B}, ${$}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const W=Math.max(0,F-S),O=Math.min(N,W),A=S+O,B=Math.max(0,_-A),$=t.x-k/2;if(t.look==="handDrawn"){const Y=tt.svg(f),G=J(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),et=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),lt=Y.rectangle($,S,k,O,G);M=f.insert(()=>lt,":first-child");const ot=Y.rectangle($,A,k,B,et);U=f.insert(()=>ot,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",u.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",$).attr("y",S).attr("width",k).attr("height",O).attr("fill",a).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",$).attr("y",A).attr("width",k).attr("height",B).attr("fill","none").attr("stroke",n);const E=t.x-C.width/2,q=S+(O-C.height)/2;y.attr("transform",`translate(${E}, ${q})`)}if(H.trace("Swimlane data ",t,JSON.stringify(t)),l){const W=y.select("span");W&&W.attr("style",l)}return t.offsetX=0,t.width=k,t.height=w,t.offsetY=C.height-b/2,t.intersect=function(W){return Pr(t,W)},{cluster:f,labelBBox:C}},"swimlane"),qp=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ae(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await nr(d,t.label,t.labelStyle||"",!1,!0);let y=g.getBBox();if(ae(r)){const v=g.children[0],F=yt(g);y=v.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=tt.svg(u),F=J(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),z=v.path(gr(b,k,m,C,0),F);w=u.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=bl(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+S})`),n){const v=d.select("span");v&&v.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=y.height-t.padding/2,t.intersect=function(v){return Pr(t,v)},{cluster:u,labelBBox:y}},"rect"),Xw=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,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Pr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Vw=p(async(e,t)=>{const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,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 f=c.append("rect");const d=await nr(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(ae(r)){const z=d.children[0],N=yt(d);g=z.getBoundingClientRect(),N.attr("width",g.width),N.attr("height",g.height)}const y=0*t.padding,m=y/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+y;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+y,k=t.height+y-g.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const _=t.y-t.height/2-m+g.height+2;let v;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),N=tt.svg(c),M=t.rx||t.ry?N.path(gr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(w,S,C,b,{seed:s});v=c.insert(()=>M,":first-child");const U=N.rectangle(w,_,C,k,{fill:z?a:o,fillStyle:z?"hachure":"solid",stroke:l,seed:s});v=c.insert(()=>M,":first-child"),f=c.insert(()=>U)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",_).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(ae(r)?0:3)})`);const F=v.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(z){return Pr(t,z)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Zw=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ae(r),d=u.insert("g").attr("class","cluster-label "),g=await ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let y=g.getBBox();if(ae(r)){const v=g.children[0],F=yt(g);y=v.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=tt.svg(u),F=J(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),z=v.path(gr(b,k,m,C,t.rx),F);w=u.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=bl(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+S})`),n){const v=d.select("span");v&&v.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=y.height-t.padding/2,t.intersect=function(v){return Pr(t,v)},{cluster:u,labelBBox:y}},"kanbanSection"),Qw=p((e,t)=>{const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const m=tt.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>m,":first-child")}else{d=n.insert("rect",":first-child");let y="outer";t.look,y="divider",d.attr("class",y).attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return Pr(t,y)},{cluster:o,labelBBox:{}}},"divider"),Kw=qp,Jw={rect:qp,squareRect:Kw,roundedWithTitle:Vw,noteGroup:Xw,divider:Qw,kanbanSection:Zw,swimlane:jw},Wp=new Map,tS=p(async(e,t)=>{const r=t.shape||"rect",i=await Jw[r](e,t);return Wp.set(t.id,i),i},"insertCluster"),pF=p(()=>{Wp=new Map},"clear");function zp(e,t){return e.intersect(t)}p(zp,"intersectNode");var eS=zp;function Hp(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}p(Hp,"intersectEllipse");var Yp=Hp;function Up(e,t,r){return Yp(e,t,t,r)}p(Up,"intersectCircle");var rS=Up;function Gp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&Ln(n,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&Ln(d,g))return;const y=s*u-h*a;if(y===0)return;const m=Math.abs(y/2);let C=a*f-u*o;const b=C<0?(C-m)/y:(C+m)/y;C=h*o-s*f;const k=C<0?(C-m)/y:(C+m)/y;return{x:b,y:k}}}p(Gp,"intersectLine");function Ln(e,t){return e*t>0}p(Ln,"sameSign");var iS=Gp;function jp(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=iS(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),y=u.x-r.x,m=u.y-r.y,C=Math.sqrt(y*y+m*m);return g<C?-1:g===C?0:1}),a[0]):e}p(jp,"intersectPolygon");var sS=jp,K={node:eS,circle:rS,ellipse:Yp,polygon:sS,rect:Pr};function Xp(e,t){const{labelStyles:r}=rt(t);t.labelStyle=r;const i=ht(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=tt.svg(a),c=J(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Ht(n)),it(t,u),t.intersect=function(f){return H.info("Circle intersect",t,o,f),K.circle(t,o,f)},a}p(Xp,"anchor");function Fn(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/s,g=f/a,y=Math.sqrt(d**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-y**2),C=l+m*a*Math.sin(h)*(o?-1:1),b=c-m*s*Math.cos(h)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let S=Math.atan2((i-b)/a,(r-C)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const _=[];for(let v=0;v<20;v++){const F=v/19,z=k+F*S,N=C+s*Math.cos(z),M=b+a*Math.sin(z);_.push({x:N,y:M})}return _}p(Fn,"generateArcPoints");function Vp(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Vp,"calculateArcSagitta");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=p(z=>z+o,"calcTotalHeight"),l=p(z=>{const N=z/2;return[N/(2.5+z/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[f,d]=l(u),g=Vp(u,f,d),m=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+g-g,C=u,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...Fn(-m/2,-C/2,-m/2,C/2,f,d,!1),{x:m/2,y:C/2},...Fn(m/2,C/2,m/2,-C/2,f,d,!0)],w=tt.svg(c),S=J(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=kt(k),v=w.path(_,S),F=c.insert(()=>v,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${f/2}, 0)`),it(t,F),t.intersect=function(z){return K.polygon(t,k,z)},c}p(Zp,"bowTieRect");function Ke(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(Ke,"insertPolygonShape");var Ns=12;async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Ns),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,f=c,d=-h,g=0,y=[{x:u+Ns,y:d},{x:f,y:d},{x:f,y:g},{x:u,y:g},{x:u,y:d+Ns},{x:u+Ns,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(n),k=J(t,{}),w=kt(y),S=b.path(w,k);m=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&m.attr("style",C)}else m=Ke(n,c,h,y);return i&&m.attr("style",i),it(t,m),t.intersect=function(b){return K.polygon(t,y,b)},n}p(Qp,"card");function Kp(e,t){const{nodeStyles:r}=rt(t);t.label="";const i=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=tt.svg(i),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=kt(o),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(f){return K.polygon(t,o,f)},i}p(Kp,"choice");async function $l(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await ut(e,t,ht(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=tt.svg(a),g=J(t,{}),y=d.circle(0,0,h*2,g);u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",Ht(f))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return it(t,u),t.calcIntersect=function(d,g){const y=d.width/2;return K.circle(d,y,g)},t.intersect=function(d){return H.info("Circle intersect",t,h,d),K.circle(t,h,d)},a}p($l,"circle");function Jp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
238
+ M ${s.x},${s.y} L ${o.x},${o.y}`}p(Jp,"createLine");function tg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=tt.svg(s),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=Jp(a),u=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),it(t,f),t.intersect=function(d){return H.info("crossedCircle intersect",t,{radius:a,point:d}),K.circle(t,a,d)},s}p(tg,"crossedCircle");function Ge(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Ge,"generateCirclePoints");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...Ge(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ge(c/2+u*2,-u,u,20,-180,-270),...Ge(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ge(c/2,h/2,u,20,0,90)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ge(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ge(c/2+c*.1,-u,u,20,-180,-270),...Ge(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ge(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=tt.svg(s),m=J(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),k=y.path(b,m),w=kt(g),S=y.path(w,{...m}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),it(t,_),t.intersect=function(v){return K.polygon(t,g,v)},s}p(eg,"curlyBraceLeft");function je(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(je,"generateCirclePoints");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90)],g=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=tt.svg(s),m=J(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),k=y.path(b,m),w=kt(g),S=y.path(w,{...m}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),it(t,_),t.intersect=function(v){return K.polygon(t,g,v)},s}p(rg,"curlyBraceRight");function Gt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Gt,"generateCirclePoints");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...Gt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Gt(c/2+u*2,-u,u,20,-180,-270),...Gt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Gt(c/2,h/2,u,20,0,90)],g=[...Gt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Gt(-c/2-u/2,-u,u,20,0,90),...Gt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Gt(-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},...Gt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Gt(c/2+u*2,-u,u,20,-180,-270),...Gt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Gt(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},...Gt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Gt(-c/2-u/2,-u,u,20,0,90),...Gt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Gt(-c/2+u+u/2,h/2,u,30,-180,-270)],m=tt.svg(s),C=J(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=kt(d).replace("Z",""),w=m.path(k,C),_=kt(g).replace("Z",""),v=m.path(_,C),F=kt(y),z=m.path(F,{...C}),N=s.insert("g",":first-child");return N.insert(()=>z,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>v,":first-child"),N.attr("class","text"),f&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),it(t,N),t.intersect=function(M){return K.polygon(t,y,M)},s}p(ig,"curlyBraces");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:g}=t,y=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,b=f,k=C-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...us(-k,-b/2,d,50,270,90)],_=kt(S),v=y.path(_,m),F=c.insert(()=>v,":first-child");return F.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(${-u/2}, ${-f/2})`),it(t,F),t.intersect=function(z){return K.polygon(t,S,z)},c}p(sg,"curvedTrapezoid");var aS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),oS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),nS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),kc=8,Tc=8;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<Tc&&(t.width=Tc);const b=m/2/(2.5+m/50);t.height=(t.height??0)-a-b*3,t.height<kc&&(t.height=kc)}const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t.width?t.width:l.width)+o,u=h/2,f=u/(2.5+h/50),d=(t.height?t.height:l.height)+a+f;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const m=tt.svg(n),C=oS(0,0,h,d,u,f),b=nS(0,f,h,d,u,f),k=J(t,{}),w=m.path(C,k),S=m.path(b,J(t,{fill:"none"}));g=n.insert(()=>S,":first-child"),g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const m=aS(0,0,h,d,u,f);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",Ht(y)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),it(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=K.rect(t,m),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=f-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}p(ag,"cylinder");async function Li(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await ut(e,t,ht(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const y=tt.svg(a),m=J(t,{}),C=f||d?y.path(gr(c,h,n,l,f||0),m):y.rectangle(c,h,n,l,m);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Ht(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Ht(f)).attr("ry",Ht(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return it(t,u),t.calcIntersect=function(y,m){return K.rect(y,m)},t.intersect=function(y){return K.rect(t,y)},a}p(Li,"drawRect");async function og(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await Li(e,t,l);if(t.look==="handDrawn"){const d=tt.svg(c),g=J(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),m=y.node();if(!m)return c;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return c;return c.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),c.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,f=(Number(h.attr("height"))||n)??0;return u>0&&f>0&&h.attr("stroke-dasharray",`${u} ${f}`),c}p(og,"datastore");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=n.width+s,h=n.height+a,u=h*.2,f=-c/2,d=-h/2-u/2,{cssStyles:g}=t,y=tt.svg(o),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=y.polygon(C.map(w=>[w.x,w.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),it(t,k),t.intersect=function(w){return K.rect(t,w)},o}p(ng,"dividedRectangle");async function lg(e,t){var d,g;const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=tt.svg(n),m=J(t,{roughness:.2,strokeWidth:2.5}),C=J(t,{roughness:.2,strokeWidth:1.5}),b=y.circle(0,0,c*2,m),k=y.circle(0,0,h*2,C);u=n.insert("g",":first-child"),u.attr("class",Ht(t.cssClasses)).attr("style",Ht(f)),(d=u.node())==null||d.appendChild(b),(g=u.node())==null||g.appendChild(k)}else{u=n.insert("g",":first-child");const y=u.insert("circle",":first-child"),m=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),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return it(t,u),t.intersect=function(y){return H.info("DoubleCircle intersect",t,c,y),K.circle(t,c,y)},n}p(lg,"doublecircle");function hg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=tt.svg(a),{nodeBorder:c}=r,h=J(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),it(t,f),t.intersect=function(d){return H.info("filledCircle intersect",t,{radius:o,point:d}),K.circle(t,o,d)},a}p(hg,"filledCircle");var wc=10,Sc=10;async function cg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<wc&&(t.height=wc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Sc&&(t.width=Sc));const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,f=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,g=tt.svg(o),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=kt(f),C=g.path(m,y),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,it(t,b),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(k){return H.info("Triangle intersect",t,f,k),K.polygon(t,f,k)},o}p(cg,"flippedTriangle");function ug(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=rt(t);t.label="";const o=e.insert("g").attr("class",ht(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,f=tt.svg(o),d=J(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),y=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),it(t,y);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return K.rect(t,C)},o}p(ug,"forkJoin");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,f=u/2,{cssStyles:d}=t,g=tt.svg(l),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-h/2,y:-u/2},{x:h/2-f,y:-u/2},...us(-h/2+f,0,f,50,90,270),{x:h/2-f,y:u/2},{x:-h/2,y:u/2}],C=kt(m),b=g.path(C,y),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),it(t,k),t.intersect=function(w){return H.info("Pill intersect",t,{radius:f,point:w}),K.polygon(t,m,w)},l}p(dg,"halfRoundedRectangle");var lS=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 fg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await ut(e,t,ht(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/s,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,y=[{x:d,y:0},{x:g-d,y:0},{x:g,y:-f/2},{x:g-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(h),k=J(t,{}),w=lS(0,0,g,f,d),S=b.path(w,k);m=h.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${f/2})`),C&&m.attr("style",C)}else m=Ke(h,g,f,y);return i&&m.attr("style",i),t.width=g,t.height=f,it(t,m),t.intersect=function(b){return K.polygon(t,y,b)},h}p(fg,"hexagon");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await ut(e,t,ht(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=tt.svg(s),c=J(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=kt(h),f=l.path(u,c),d=s.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),it(t,d),t.intersect=function(g){return H.info("Pill intersect",t,{points:h}),K.polygon(t,h,g)},s}p(pg,"hourglass");async function gg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await ut(e,t,"icon-shape default"),f=t.pos==="t",d=n,g=n,{nodeBorder:y}=r,{stylesMap:m}=Bi(t),C=-g/2,b=-d/2,k=t.label?8:0,w=tt.svg(c),S=J(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=w.rectangle(C,b,g,d,S),v=Math.max(g,h.width),F=d+h.height+k,z=w.rectangle(-v/2,-F/2,v,F,{...S,fill:"transparent",stroke:"none"}),N=c.insert(()=>_,":first-child"),M=c.insert(()=>z);if(t.icon){const U=c.append("g");U.html(`<g>${await bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const W=U.node().getBBox(),O=W.width,A=W.height,B=W.x,$=W.y;U.attr("transform",`translate(${-O/2-B},${f?h.height/2+k/2-A/2-$:-h.height/2-k/2-A/2-$})`),U.attr("style",`color: ${m.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-F/2:F/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),it(t,M),t.intersect=function(U){if(H.info("iconSquare intersect",t,U),!t.label)return K.rect(t,U);const W=t.x??0,O=t.y??0,A=t.height??0;let B=[];return f?B=[{x:W-h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2+h.height+k},{x:W+g/2,y:O-A/2+h.height+k},{x:W+g/2,y:O+A/2},{x:W-g/2,y:O+A/2},{x:W-g/2,y:O-A/2+h.height+k},{x:W-h.width/2,y:O-A/2+h.height+k}]:B=[{x:W-g/2,y:O-A/2},{x:W+g/2,y:O-A/2},{x:W+g/2,y:O-A/2+d},{x:W+h.width/2,y:O-A/2+d},{x:W+h.width/2/2,y:O+A/2},{x:W-h.width/2,y:O+A/2},{x:W-h.width/2,y:O-A/2+d},{x:W-g/2,y:O-A/2+d}],K.polygon(t,B,U)},c}p(gg,"icon");async function mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await ut(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=Bi(t),b=tt.svg(c),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??m;const S=c.append("g");t.icon&&S.html(`<g>${await bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),v=_.width,F=_.height,z=_.x,N=_.y,M=Math.max(v,F)*Math.SQRT2+f*2,U=b.circle(0,0,M,k),W=Math.max(M,h.width),O=M+h.height+d,A=b.rectangle(-W/2,-O/2,W,O,{...k,fill:"transparent",stroke:"none"}),B=c.insert(()=>U,":first-child"),$=c.insert(()=>A);return S.attr("transform",`translate(${-v/2-z},${g?h.height/2+d/2-F/2-N:-h.height/2-d/2-F/2-N})`),S.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-O/2:O/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),it(t,$),t.intersect=function(E){return H.info("iconSquare intersect",t,E),K.rect(t,E)},c}p(mg,"iconCircle");async function yg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ut(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,y=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=Bi(t),k=-y/2,w=-g/2,S=t.label?8:0,_=tt.svg(c),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const F=b.get("fill");v.stroke=F??C;const z=_.path(gr(k,w,y,g,5),v),N=Math.max(y,h.width),M=g+h.height+S,U=_.rectangle(-N/2,-M/2,N,M,{...v,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child").attr("class","icon-shape2"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;A.attr("transform",`translate(${-$/2-q},${d?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),it(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const B=t.x??0,$=t.y??0,E=t.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+S},{x:B+y/2,y:$-E/2+h.height+S},{x:B+y/2,y:$+E/2},{x:B-y/2,y:$+E/2},{x:B-y/2,y:$-E/2+h.height+S},{x:B-h.width/2,y:$-E/2+h.height+S}]:q=[{x:B-y/2,y:$-E/2},{x:B+y/2,y:$-E/2},{x:B+y/2,y:$-E/2+g},{x:B+h.width/2,y:$-E/2+g},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+g},{x:B-y/2,y:$-E/2+g}],K.polygon(t,q,A)},c}p(yg,"iconRounded");async function Cg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ut(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,y=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=Bi(t),k=-y/2,w=-g/2,S=t.label?8:0,_=tt.svg(c),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const F=b.get("fill");v.stroke=F??C;const z=_.path(gr(k,w,y,g,.1),v),N=Math.max(y,h.width),M=g+h.height+S,U=_.rectangle(-N/2,-M/2,N,M,{...v,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;A.attr("transform",`translate(${-$/2-q},${d?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),it(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const B=t.x??0,$=t.y??0,E=t.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+S},{x:B+y/2,y:$-E/2+h.height+S},{x:B+y/2,y:$+E/2},{x:B-y/2,y:$+E/2},{x:B-y/2,y:$-E/2+h.height+S},{x:B-h.width/2,y:$-E/2+h.height+S}]:q=[{x:B-y/2,y:$-E/2},{x:B+y/2,y:$-E/2},{x:B+y/2,y:$-E/2+g},{x:B+h.width/2,y:$-E/2+g},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+g},{x:B-y/2,y:$-E/2+g}],K.polygon(t,q,A)},c}p(Cg,"iconSquare");async function xg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=rt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),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)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:f,label:d}=await ut(e,t,"image-shape default"),g=t.pos==="t",y=-c/2,m=-h/2,C=t.label?8:0,b=tt.svg(u),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(y,m,c,h,k),S=Math.max(c,f.width),_=h+f.height+C,v=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),F=u.insert(()=>w,":first-child"),z=u.insert(()=>v);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${g?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-C/2:h/2-f.height/2+C/2})`),F.attr("transform",`translate(0,${g?f.height/2+C/2:-f.height/2-C/2})`),it(t,z),t.intersect=function(N){if(H.info("iconSquare intersect",t,N),!t.label)return K.rect(t,N);const M=t.x??0,U=t.y??0,W=t.height??0;let O=[];return g?O=[{x:M-f.width/2,y:U-W/2},{x:M+f.width/2,y:U-W/2},{x:M+f.width/2,y:U-W/2+f.height+C},{x:M+c/2,y:U-W/2+f.height+C},{x:M+c/2,y:U+W/2},{x:M-c/2,y:U+W/2},{x:M-c/2,y:U-W/2+f.height+C},{x:M-f.width/2,y:U-W/2+f.height+C}]:O=[{x:M-c/2,y:U-W/2},{x:M+c/2,y:U-W/2},{x:M+c/2,y:U-W/2+h},{x:M+f.width/2,y:U-W/2+h},{x:M+f.width/2/2,y:U+W/2},{x:M-f.width/2,y:U+W/2},{x:M-f.width/2,y:U-W/2+h},{x:M-c/2,y:U-W/2+h}],K.polygon(t,O,N)},u}p(xg,"imageSquare");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),h=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=tt.svg(n),y=J(t,{}),m=kt(u),C=g.path(m,y);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=Ke(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,it(t,f),t.intersect=function(g){return K.polygon(t,u,g)},n}p(bg,"inv_trapezoid");async function kg(e,t){const{shapeSvg:r,bbox:i,label:s}=await ut(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),it(t,a),t.intersect=function(l){return K.rect(t,l)},r}p(kg,"labelRect");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=tt.svg(n),y=J(t,{}),m=kt(u),C=g.path(m,y);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ke(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(g){return K.polygon(t,u,g)},n}p(Tg,"lean_left");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=tt.svg(n),y=J(t,{}),m=kt(u),C=g.path(m,y);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ke(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(g){return K.polygon(t,u,g)},n}p(wg,"lean_right");function Sg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=tt.svg(s),u=J(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=kt(c),d=h.path(f,u),g=s.insert(()=>d,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),it(t,g),t.intersect=function(y){return H.info("lightningBolt intersect",t,y),K.polygon(t,c,y)},s}p(Sg,"lightningBolt");var hS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),cS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),uS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),_c=10,Bc=10;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Bc&&(t.width=Bc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<_c&&(t.height=_c)}const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,f=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+o*2,g=d*.1;let y;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=tt.svg(n),b=cS(0,0,h,d,u,f,g),k=uS(0,f,h,d,u,f),w=J(t,{}),S=C.path(b,w),_=C.path(k,w);n.insert(()=>_,":first-child").attr("class","line"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=hS(0,0,h,d,u,f,g);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Ht(m)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),it(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=K.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let w=f*f*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=f-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}p(_g,"linedCylinder");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:g}=t,y=tt.svg(n),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...pr(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,f,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],b=y.polygon(C.map(w=>[w.x,w.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),it(t,k),t.intersect=function(w){return K.polygon(t,C,w)},n}p(Bg,"linedWaveEdgedRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,d=u-2*n,g=f-2*n,y=-d/2,m=-g/2,{cssStyles:C}=t,b=tt.svg(l),k=J(t,{}),w=[{x:y-n,y:m+n},{x:y-n,y:m+g+n},{x:y+d-n,y:m+g+n},{x:y+d-n,y:m+g},{x:y+d,y:m+g},{x:y+d,y:m+g-n},{x:y+d+n,y:m+g-n},{x:y+d+n,y:m-n},{x:y+n,y:m-n},{x:y+n,y:m},{x:y,y:m},{x:y,y:m+n}],S=[{x:y,y:m+n},{x:y+d-n,y:m+n},{x:y+d-n,y:m+g},{x:y+d,y:m+g},{x:y+d,y:m},{x:y,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=kt(w);let v=b.path(_,k);const F=kt(S);let z=b.path(F,k);t.look!=="handDrawn"&&(v=vn(v),z=vn(z));const N=l.insert("g",":first-child");return N.insert(()=>v),N.insert(()=>z),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.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))})`),it(t,N),t.intersect=function(M){return K.polygon(t,w,M)},l}p(vg,"multiRect");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(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(a.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?f/4:f/8,g=f+(h?d/2:-d/2),y=-u/2,m=-g/2,C=10,{cssStyles:b}=t,k=pr(y-C,m+g+C,y+u-C,m+g+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:y-C,y:m+C},{x:y-C,y:m+g+C},...k,{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:w.y-2*C},{x:y+u+C,y:w.y-2*C},{x:y+u+C,y:m-C},{x:y+C,y:m-C},{x:y+C,y:m},{x:y,y:m},{x:y,y:m+C}],_=[{x:y,y:m+C},{x:y+u-C,y:m+C},{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:m},{x:y,y:m}],v=tt.svg(s),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=kt(S),N=v.path(z,F),M=kt(_),U=v.path(M,F),W=s.insert(()=>N,":first-child");return W.insert(()=>U),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),it(t,W),t.intersect=function(O){return K.polygon(t,S,O)},s}p(Lg,"multiWaveEdgedRectangle");async function Fg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i,t.useHtmlLabels||ae(Et())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(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,f=-h/2,{cssStyles:d}=t,g=tt.svg(o),y=J(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=g.rectangle(u,f,c,h,y),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,C),t.intersect=function(b){return K.rect(t,b)},o}p(Fg,"note");var dS=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 Ag(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await ut(e,t,ht(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+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:f}=t;if(t.look==="handDrawn"){const d=tt.svg(s),g=J(t,{}),y=dS(0,0,l),m=d.path(y,g);u=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Ke(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),it(t,u),t.calcIntersect=function(d,g){const y=d.width,m=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=K.polygon(d,m,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}p(Ag,"question");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),f=-h/2,d=-u/2,g=d/2,y=[{x:f+g,y:d},{x:f,y:0},{x:f+g,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:m}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=kt(y),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-g/2},0)`),c.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),it(t,S),t.intersect=function(_){return K.polygon(t,y,_)},n}p(Eg,"rect_left_inv_arrow");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await nr(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(ae(_t())){const F=h.children[0],z=yt(h);u=F.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}H.info("Text 2",l);const f=l||[],d=h.getBBox(),g=await nr(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),y=g.children[0],m=yt(g);u=y.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;yt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),yt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,S=-u.height/2-C;let _,v;if(t.look==="handDrawn"){const F=tt.svg(a),z=J(t,{}),N=F.path(gr(w,S,b,k,t.rx||0),z),M=F.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,z);v=a.insert(()=>(H.debug("Rough node insert CXC",N),M),":first-child"),_=a.insert(()=>(H.debug("Rough node insert CXC",N),N),":first-child")}else _=o.insert("rect",":first-child"),v=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return it(t,_),t.intersect=function(F){return K.rect(t,F)},a}p(Mg,"rectWithTitle");async function $g(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 Li(e,t,s)}p($g,"roundedRect");var br=8;async function Og(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?br:br*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-br,f=h,d=br-c/2,g=-h/2,{cssStyles:y}=t,m=tt.svg(o),C=J(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+f},{x:d-br,y:g+f},{x:d-br,y:g},{x:d,y:g},{x:d,y:g+f}],k=m.polygon(b.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Ht(y)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${br/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,w),t.intersect=function(S){return K.rect(t,S)},o}p(Og,"shadedProcess");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,f=h,d=u/1.5,g=-f/2,y=-d/2,{cssStyles:m}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y},{x:g,y:y+d},{x:g+f,y:y+d},{x:g+f,y:y-d/2}],w=kt(k),S=C.path(w,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),it(t,_),t.intersect=function(v){return K.polygon(t,k,v)},n}p(Ig,"slopedRect");async function Dg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Li(e,t,a)}p(Dg,"squareRect");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:f}=t,d=tt.svg(n),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...us(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...us(h/2-u,0,u,50,270,450)],m=kt(y),C=d.path(m,g),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),it(t,b),t.intersect=function(k){return K.polygon(t,y,k)},n}p(Rg,"stadium");async function Pg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Li(e,t,r)}p(Pg,"state");function Ng(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,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=tt.svg(h),f=J(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),g=n??l,y=(t.width??0)*5/14,m=u.circle(0,0,y,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return it(t,C),t.intersect=function(w){return K.circle(t,(t.width??0)/2,w)},h}p(Ng,"stateEnd");function qg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=tt.svg(a).circle(0,0,t.width,m2(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return it(t,o),t.intersect=function(c){return K.circle(t,(t.width??7)/2,c)},a}p(qg,"stateStart");var Xr=8;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+2*Xr+a,h=((t==null?void 0:t.height)??l.height)+o,u=c-2*Xr,f=h,d=-c/2,g=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const m=tt.svg(n),C=J(t,{}),b=m.rectangle(d,g,u+16,f,C),k=m.line(d+Xr,g,d+Xr,g+f,C),w=m.line(d+Xr+u,g,d+Xr+u,g+f,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ht(_)),it(t,S)}else{const m=Ke(n,u,f,y);i&&m.attr("style",i),it(t,m)}return t.intersect=function(m){return K.polygon(t,y,m)},n}p(Wg,"subroutine");var $o=.2;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-$o*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=$o*c,u=$o*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,g=c,y=-d/2,m=-g/2,{cssStyles:C}=t,b=tt.svg(n),k=J(t,{}),w=[{x:y-h/2,y:m},{x:y+d+h/2,y:m},{x:y+d+h/2,y:m+g},{x:y-h/2,y:m+g}],S=[{x:y+d-h/2,y:m+g},{x:y+d+h/2,y:m+g},{x:y+d+h/2,y:m+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=kt(w),v=b.path(_,k),F=kt(S),z=b.path(F,{...k,fillStyle:"solid"}),N=n.insert(()=>z,":first-child");return N.insert(()=>v,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),it(t,N),t.intersect=function(M){return K.polygon(t,w,M)},n}p(zg,"taggedRect");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await ut(e,t,ht(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,f=l+c,{cssStyles:d}=t,g=tt.svg(s),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:f/2},...pr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,b=-f/2-u*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...pr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],w=kt(m),S=g.path(w,y),_=kt(k),v=g.path(_,{...y,fillStyle:"solid"}),F=s.insert(()=>v,":first-child");return F.insert(()=>S,":first-child"),F.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),it(t,F),t.intersect=function(z){return K.polygon(t,m,z)},s}p(Hg,"taggedWaveEdgedRectangle");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await ut(e,t,ht(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,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",o).attr("height",n),it(t,h),t.intersect=function(u){return K.rect(t,u)},s}p(Yg,"text");var fS=p((e,t,r,i,s,a)=>`M${e},${t}
235
239
  a${s},${a} 0,0,1 0,${-i}
236
240
  l${r},0
237
241
  a${s},${a} 0,0,1 0,${i}
238
242
  M${r},${-i}
239
243
  a${s},${a} 0,0,0 0,${i}
240
- l${-r},0`,"createCylinderPathD"),oS=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),nS=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Sc=5,_c=10;async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.height<Sc&&(t.height=Sc);const C=g/2/(2.5+g/50);t.width=(t.width??0)-a-C*3,t.width<_c&&(t.width=_c)}const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=(t.height?t.height:n.height)+a,h=c/2,u=h/(2.5+c/50),f=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let y;if(t.look==="handDrawn"){const g=tt.svg(o),m=oS(0,0,f,c,u,h),C=nS(0,0,f,c,u,h),b=g.path(m,J(t,{})),k=g.path(C,J(t,{fill:"none"}));y=o.insert(()=>k,":first-child"),y=o.insert(()=>b,":first-child"),y.attr("class","basic label-container"),d&&y.attr("style",d)}else{const g=aS(0,0,f,c,u,h);y=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Ht(d)).attr("style",i),y.attr("class","basic label-container outer-path"),d&&y.selectAll("path").attr("style",d),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",u),y.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,y),t.intersect=function(g){const m=Q.rect(t,g),C=m.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},o}p(Hg,"tiltedCylinder");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Qe(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(Yg,"trapezoid");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:d}=t,y=tt.svg(c),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=kt(m),b=y.path(C,g),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),it(t,k),t.intersect=function(w){return Q.polygon(t,m,w)},c}p(Ug,"trapezoidalPentagon");var Bc=10,vc=10;async function Gg(e,t){var w;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<vc&&(t.width=vc),t.height=(t==null?void 0:t.height)??0,t.height<Bc&&(t.height=Bc));const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=qe((w=St().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:y}=t,g=tt.svg(o),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=kt(d),b=g.path(C,m),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=u,it(t,k),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(S){return H.info("Triangle intersect",t,d,S),Q.polygon(t,d,S)},o}p(Gg,"triangle");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,d=t.look==="neo"?f/4:f/8,y=f+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=tt.svg(l),w=J(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:y/2},...fr(-u/2-b,y/2,u/2+b,y/2,d,.8),{x:u/2+b,y:-y/2},{x:-u/2-b,y:-y/2}],_=kt(S),F=k.path(_,w),v=l.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-d-(c.y-(c.top??0))})`),it(t,v),t.intersect=function(z){return Q.polygon(t,S,z)},l}p(jg,"waveEdgedRectangle");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=h/8,f=h+u*2,{cssStyles:d}=t,y=tt.svg(n),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2,y:f/2},...fr(-c/2,f/2,c/2,f/2,u,1),{x:c/2,y:-f/2},...fr(c/2,-f/2,-c/2,-f/2,u,-1)],C=kt(m),b=y.path(C,g),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),it(t,k),t.intersect=function(w){return Q.polygon(t,m,w)},n}p(Xg,"waveRectangle");var $t=10;async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-$t,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-$t,10));const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+$t,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+$t,u=c-$t,f=h-$t,d=-u/2,y=-f/2,{cssStyles:g}=t,m=tt.svg(o),C=J(t,{}),b=[{x:d-$t,y:y-$t},{x:d-$t,y:y+f},{x:d+u,y:y+f},{x:d+u,y:y-$t}],k=`M${d-$t},${y-$t} L${d+u},${y-$t} L${d+u},${y+f} L${d-$t},${y+f} L${d-$t},${y-$t}
241
- M${d-$t},${y} L${d+u},${y}
242
- M${d},${y-$t} L${d},${y+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=m.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${$t/2}, ${$t/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+$t/2-(n.x-(n.left??0))}, ${-(n.height/2)+$t/2-(n.y-(n.top??0))})`),it(t,S),t.intersect=function(_){return Q.polygon(t,b,_)},o}p(Vg,"windowPane");var Lc=new Set(["redux-color","redux-dark-color"]),lS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ml(e,t){var bt,Ct,Bt,Lt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Et(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Z}=Et(),{background:V}=Z,gt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await Ml(e,gt)}const c=Et();t.useHtmlLabels=c.htmlLabels;let h=((bt=c.er)==null?void 0:bt.diagramPadding)??10,u=((Ct=c.er)==null?void 0:Ct.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:y}=rt(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ke(t.label,c)+Z.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const V=await Si(e,t,Z);if(i!=null&&Lc.has(i)){const gt=r.colorIndex??0;V.attr("data-color-id",`color-${gt%l.length}`)}if(!qe(c.htmlLabels)){const gt=V.select("text"),nt=(Bt=gt.node())==null?void 0:Bt.getBBox();gt.attr("transform",`translate(${-nt.width/2}, 0)`)}return V}c.htmlLabels||(h*=1.25,u*=1.25);let g=ht(t);g||(g="node default");const m=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Xr(m,t.label??"",c,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let S=0,_=0,F=0,v=0,z=!0,N=!0;for(const Z of r.attributes){const V=await Xr(m,Z.type,c,0,b,["attribute-type"],d);S=Math.max(S,V.width+h);const gt=await Xr(m,Z.name,c,0,b,["attribute-name"],d);_=Math.max(_,gt.width+h);const nt=await Xr(m,Z.keys.join(),c,0,b,["attribute-keys"],d);F=Math.max(F,nt.width+h);const D=await Xr(m,Z.comment,c,0,b,["attribute-comment"],d);v=Math.max(v,D.width+h);const K=Math.max(V.height,gt.height,nt.height,D.height)+u;w.push({yOffset:b,rowHeight:K}),b+=K}let M=4;F<=h&&(z=!1,F=0,M--),v<=h&&(N=!1,v=0,M--);const U=m.node().getBBox();if(C.width+h*2-(S+_+F+v)>0){const Z=C.width+h*2-(S+_+F+v);S+=Z/M,_+=Z/M,F>0&&(F+=Z/M),v>0&&(v+=Z/M)}const W=S+_+F+v,O=tt.svg(m),A=J(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=0;w.length>0&&(B=w.reduce((Z,V)=>Z+((V==null?void 0:V.rowHeight)??0),0));const $=Math.max(U.width+h*2,(t==null?void 0:t.width)||0,W),E=Math.max((B??0)+C.height,(t==null?void 0:t.height)||0),q=-$/2,Y=-E/2;if(m.selectAll("g:not(:first-child)").each((Z,V,gt)=>{const nt=yt(gt[V]),D=nt.attr("transform");let K=0,Je=0;if(D){const fe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);fe&&(K=parseFloat(fe[1]),Je=parseFloat(fe[2]),nt.attr("class").includes("attribute-name")?K+=S:nt.attr("class").includes("attribute-keys")?K+=S+_:nt.attr("class").includes("attribute-comment")&&(K+=S+_+F))}nt.attr("transform",`translate(${q+h/2+K}, ${Je+Y+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+u/2)+")"),i!=null&&Lc.has(i)){const Z=r.colorIndex??0;m.attr("data-color-id",`color-${Z%l.length}`)}const G=O.rectangle(q,Y,$,E,A),et=m.insert(()=>G,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Z,V]of w.entries()){const nt=(Z+1)%2===0&&V.yOffset!==0,D=O.rectangle(q,C.height+Y+(V==null?void 0:V.yOffset),$,V==null?void 0:V.rowHeight,{...A,fill:nt?a:o,stroke:n});m.insert(()=>D,"g.label").attr("style",f.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}const lt=1e-4;let ot=Vr(q,C.height+Y,$+q,C.height+Y,lt),ct=O.polygon(ot.map(Z=>[Z.x,Z.y]),A);if(m.insert(()=>ct).attr("class","divider"),ot=Vr(S+q,C.height+Y,S+q,E+Y,lt),ct=O.polygon(ot.map(Z=>[Z.x,Z.y]),A),m.insert(()=>ct).attr("class","divider"),z){const Z=S+_+q;ot=Vr(Z,C.height+Y,Z,E+Y,lt),ct=O.polygon(ot.map(V=>[V.x,V.y]),A),m.insert(()=>ct).attr("class","divider")}if(N){const Z=S+_+F+q;ot=Vr(Z,C.height+Y,Z,E+Y,lt),ct=O.polygon(ot.map(V=>[V.x,V.y]),A),m.insert(()=>ct).attr("class","divider")}for(const Z of k){const V=C.height+Y+Z;ot=Vr(q,V,$+q,V,lt),ct=O.polygon(ot.map(gt=>[gt.x,gt.y]),A),m.insert(()=>ct).attr("class","divider")}if(it(t,et),y&&t.look!=="handDrawn")if(i!=null&&lS.has(i))m.selectAll("path").attr("style",y);else{const Z=y.split(";"),V=(Lt=Z==null?void 0:Z.filter(gt=>gt.includes("stroke")))==null?void 0:Lt.map(gt=>`${gt}`).join("; ");m.selectAll("path").attr("style",V??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(Z){return Q.rect(t,Z)},m}p(Ml,"erBox");async function Xr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==bh(t)&&(t=bh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ze(n,t,{width:Ke(t,r)+100,style:o,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(qe(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=yt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Xr,"addText");function Vr(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(Vr,"lineToPolygon");async function Zg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",ht(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,f=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ui(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Ui(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();f=y.height,c=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Ui(c,b,g,[b.parseClassifier()]);g+=k+a}d=c.node().getBBox().height,d<=0&&(d=s/2),h=o.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Ui(h,b,m,[b.parseClassifier()]);m+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${u})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+s*2})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}p(Zg,"textHelper");async function Ui(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Et();let o="useHtmlLabels"in t?t.useHtmlLabels:qe(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),ts(n)&&(o=!0);const l=await ze(s,Wn(Mr(n)),{width:Ke(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],f=yt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(m=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",y){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";m(g)}p(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&yt(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(Ui,"addText");async function Kg(e,t){var O,A;const r=St(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??qe(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Zg(e,t,r,n,o),{labelStyles:u,nodeStyles:f}=rt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((O=l.styles)==null?void 0:O.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),g=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const w=-C/2,S=-b/2;let _=y?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(_=a*2);const F=g.rectangle(w-a,S-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+_,m),v=c.insert(()=>F,":first-child");v.attr("class","basic label-container outer-path");const z=v.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(y?a/2:0)||0,M=c.select(".label-group").node().getBBox().height-(y?a/2:0)||0,U=c.select(".members-group").node().getBBox().height-(y?a/2:0)||0,W=(N+M+S+a-(S-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((B,$,E)=>{var ot,ct;const q=yt(E[$]),Y=q.attr("transform");let G=0;if(Y){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);Ct&&(G=parseFloat(Ct[2]))}let et=G+S+a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(q.attr("class").includes("methods-group")){const bt=Math.max(U,o/2);k?et=Math.max(W,N+M+bt+S+o*2+a)+o*2:et=N+M+bt+S+o*4+a}l.members.length===0&&l.methods.length===0&&((ot=r.class)!=null&&ot.hideEmptyMembersBox)&&(l.annotations.length>0?et=G-o:et=G),n||(et-=4);let lt=w;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(lt=-((ct=q.node())==null?void 0:ct.getBBox().width)/2||0,c.selectAll("text").each(function(bt,Ct,Bt){window.getComputedStyle(Bt[Ct]).textAnchor==="middle"&&(lt=0)})),q.attr("transform",`translate(${lt}, ${et})`)}),l.members.length>0||l.methods.length>0||y){const B=N+M+S+a,$=g.line(z.x,B,z.x+z.width,B+.001,m);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(y||l.members.length>0||l.methods.length>0){const B=N+M+U+S+o*2+a,$=g.line(z.x,k?Math.max(W,B):B,z.x+z.width,(k?Math.max(W,B):B)+.001,m);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),v.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const B=RegExp(/color\s*:\s*([^;]*)/),$=B.exec(d);if($){const E=$[0].replace("color","fill");c.selectAll("tspan").attr("style",E)}else if(u){const E=B.exec(u);if(E){const q=E[0].replace("color","fill");c.selectAll("tspan").attr("style",q)}}}return it(t,v),t.intersect=function(B){return Q.rect(t,B)},c}p(Kg,"classBox");async function Qg(e,t){var z,N;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=ht(t),{themeVariables:h}=St(),{borderColorArray:u,requirementEdgeLabelBackground:f}=h,d=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let y;l?y=await $e(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):y=await $e(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let g=y;const m=await $e(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=m+n,l){const M=await $e(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=M;const U=await $e(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=U;const W=await $e(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=W,await $e(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const M=await $e(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=M,await $e(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,t.labelStyle)}const C=(((z=d.node())==null?void 0:z.getBBox().width)??200)+o,b=(((N=d.node())==null?void 0:N.getBBox().height)??200)+o,k=-C/2,w=-b/2,S=tt.svg(d),_=J(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=S.rectangle(k,w,C,b,_),v=d.insert(()=>F,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const M=t.colorIndex??0;d.attr("data-color-id",`color-${M%u.length}`)}if(d.selectAll(".label").each((M,U,W)=>{const O=yt(W[U]),A=O.attr("transform");let B=0,$=0;if(A){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);G&&(B=parseFloat(G[1]),$=parseFloat(G[2]))}const E=$-b/2;let q=k+o/2;(U===0||U===1)&&(q=B),O.attr("transform",`translate(${q}, ${E+o})`)}),g>y+m+n){const M=w+y+m+n;let U;if(t.look==="neo"){const A=[[k,M],[k+C,M],[k+C,M+.001],[k,M+.001]];U=S.polygon(A,_)}else U=S.line(k,M,k+C,M,_);d.insert(()=>U).attr("class","divider")}return it(t,v),t.intersect=function(M){return Q.rect(t,M)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}p(Qg,"requirementBox");async function $e(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=St(),o=a.htmlLabels??!0,n=await ze(s,Wn(Mr(t)),{width:Ke(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=n.children[0],h=yt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p($e,"addText");var hS=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 Jg(e,t,{config:r}){var U,W;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(u=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,g;f?{label:y,bbox:g}=await Ao(f,"ticket"in t&&t.ticket||"",d):{label:y,bbox:g}=await Ao(n,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await Ao(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(g.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,_=-k/2,F=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-w-l.height/2)+")"),y.attr("transform","translate("+(h-k/2)+", "+(-w+l.height/2)+")"),m.attr("transform","translate("+(h+k/2-C.width-2*a)+", "+(-w+l.height/2)+")");let v;const{rx:z,ry:N}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const O=tt.svg(n),A=J(t,{}),B=z||N?O.path(pr(_,F,k,S,z||0),A):O.rectangle(_,F,k,S,A);v=n.insert(()=>B,":first-child"),v.attr("class","basic label-container").attr("style",M||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",N??5).attr("x",_).attr("y",F).attr("width",k).attr("height",S);const O="priority"in t&&t.priority;if(O){const A=n.append("line"),B=_+2,$=F+Math.floor((z??0)/2),E=F+S-Math.floor((z??0)/2);A.attr("x1",B).attr("y1",$).attr("x2",B).attr("y2",E).attr("stroke-width","4").attr("stroke",hS(O))}}return it(t,v),t.height=S,t.intersect=function(O){return Q.rect(t,O)},n}p(Jg,"kanbanItem");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ut(e,t,ht(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,f=a.width+20,d=a.height+20,y=Math.max(l,f),g=Math.max(c,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let m;const C=`M0 0
243
- a${h},${h} 1 0,0 ${y*.25},${-1*g*.1}
244
- a${h},${h} 1 0,0 ${y*.25},0
245
- a${h},${h} 1 0,0 ${y*.25},0
246
- a${h},${h} 1 0,0 ${y*.25},${g*.1}
244
+ l${-r},0`,"createCylinderPathD"),pS=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),gS=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),vc=5,Lc=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const y=t.height??0;t.height=(t.height??0)-a,t.height<vc&&(t.height=vc);const C=y/2/(2.5+y/50);t.width=(t.width??0)-a-C*3,t.width<Lc&&(t.width=Lc)}const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=(t.height?t.height:n.height)+a,h=c/2,u=h/(2.5+c/50),f=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const y=tt.svg(o),m=pS(0,0,f,c,u,h),C=gS(0,0,f,c,u,h),b=y.path(m,J(t,{})),k=y.path(C,J(t,{fill:"none"}));g=o.insert(()=>k,":first-child"),g=o.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const y=fS(0,0,f,c,u,h);g=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Ht(d)).attr("style",i),g.attr("class","basic label-container outer-path"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,g),t.intersect=function(y){const m=K.rect(t,y),C=m.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,y.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},o}p(Ug,"tiltedCylinder");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=tt.svg(n),y=J(t,{}),m=kt(u),C=g.path(m,y);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ke(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(g){return K.polygon(t,u,g)},n}p(Gg,"trapezoid");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:d}=t,g=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=kt(m),b=g.path(C,y),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),it(t,k),t.intersect=function(w){return K.polygon(t,m,w)},c}p(jg,"trapezoidalPentagon");var Fc=10,Ac=10;async function Xg(e,t){var w;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Ac&&(t.width=Ac),t.height=(t==null?void 0:t.height)??0,t.height<Fc&&(t.height=Fc));const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=qe((w=_t().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:g}=t,y=tt.svg(o),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=kt(d),b=y.path(C,m),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=u,it(t,k),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(S){return H.info("Triangle intersect",t,d,S),K.polygon(t,d,S)},o}p(Xg,"triangle");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,d=t.look==="neo"?f/4:f/8,g=f+(n?d:-d),{cssStyles:y}=t,C=14-u,b=C>0?C/2:0,k=tt.svg(l),w=J(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:g/2},...pr(-u/2-b,g/2,u/2+b,g/2,d,.8),{x:u/2+b,y:-g/2},{x:-u/2-b,y:-g/2}],_=kt(S),v=k.path(_,w),F=l.insert(()=>v,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-d-(c.y-(c.top??0))})`),it(t,F),t.intersect=function(z){return K.polygon(t,S,z)},l}p(Vg,"waveEdgedRectangle");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=h/8,f=h+u*2,{cssStyles:d}=t,g=tt.svg(n),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-c/2,y:f/2},...pr(-c/2,f/2,c/2,f/2,u,1),{x:c/2,y:-f/2},...pr(c/2,-f/2,-c/2,-f/2,u,-1)],C=kt(m),b=g.path(C,y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),it(t,k),t.intersect=function(w){return K.polygon(t,m,w)},n}p(Zg,"waveRectangle");var $t=10;async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-$t,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-$t,10));const{shapeSvg:o,bbox:n,label:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+$t,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+$t,u=c-$t,f=h-$t,d=-u/2,g=-f/2,{cssStyles:y}=t,m=tt.svg(o),C=J(t,{}),b=[{x:d-$t,y:g-$t},{x:d-$t,y:g+f},{x:d+u,y:g+f},{x:d+u,y:g-$t}],k=`M${d-$t},${g-$t} L${d+u},${g-$t} L${d+u},${g+f} L${d-$t},${g+f} L${d-$t},${g-$t}
245
+ M${d-$t},${g} L${d+u},${g}
246
+ M${d},${g-$t} L${d},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=m.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${$t/2}, ${$t/2})`),S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+$t/2-(n.x-(n.left??0))}, ${-(n.height/2)+$t/2-(n.y-(n.top??0))})`),it(t,S),t.intersect=function(_){return K.polygon(t,b,_)},o}p(Qg,"windowPane");var Ec=new Set(["redux-color","redux-dark-color"]),mS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ol(e,t){var bt,Ct,Bt,Lt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Et(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Z}=Et(),{background:V}=Z,gt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await Ol(e,gt)}const c=Et();t.useHtmlLabels=c.htmlLabels;let h=((bt=c.er)==null?void 0:bt.diagramPadding)??10,u=((Ct=c.er)==null?void 0:Ct.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:g}=rt(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Qe(t.label,c)+Z.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const V=await Li(e,t,Z);if(i!=null&&Ec.has(i)){const gt=r.colorIndex??0;V.attr("data-color-id",`color-${gt%l.length}`)}if(!qe(c.htmlLabels)){const gt=V.select("text"),nt=(Bt=gt.node())==null?void 0:Bt.getBBox();gt.attr("transform",`translate(${-nt.width/2}, 0)`)}return V}c.htmlLabels||(h*=1.25,u*=1.25);let y=ht(t);y||(y="node default");const m=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await Qr(m,t.label??"",c,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let S=0,_=0,v=0,F=0,z=!0,N=!0;for(const Z of r.attributes){const V=await Qr(m,Z.type,c,0,b,["attribute-type"],d);S=Math.max(S,V.width+h);const gt=await Qr(m,Z.name,c,0,b,["attribute-name"],d);_=Math.max(_,gt.width+h);const nt=await Qr(m,Z.keys.join(),c,0,b,["attribute-keys"],d);v=Math.max(v,nt.width+h);const D=await Qr(m,Z.comment,c,0,b,["attribute-comment"],d);F=Math.max(F,D.width+h);const Q=Math.max(V.height,gt.height,nt.height,D.height)+u;w.push({yOffset:b,rowHeight:Q}),b+=Q}let M=4;v<=h&&(z=!1,v=0,M--),F<=h&&(N=!1,F=0,M--);const U=m.node().getBBox();if(C.width+h*2-(S+_+v+F)>0){const Z=C.width+h*2-(S+_+v+F);S+=Z/M,_+=Z/M,v>0&&(v+=Z/M),F>0&&(F+=Z/M)}const W=S+_+v+F,O=tt.svg(m),A=J(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=0;w.length>0&&(B=w.reduce((Z,V)=>Z+((V==null?void 0:V.rowHeight)??0),0));const $=Math.max(U.width+h*2,(t==null?void 0:t.width)||0,W),E=Math.max((B??0)+C.height,(t==null?void 0:t.height)||0),q=-$/2,Y=-E/2;if(m.selectAll("g:not(:first-child)").each((Z,V,gt)=>{const nt=yt(gt[V]),D=nt.attr("transform");let Q=0,Je=0;if(D){const fe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);fe&&(Q=parseFloat(fe[1]),Je=parseFloat(fe[2]),nt.attr("class").includes("attribute-name")?Q+=S:nt.attr("class").includes("attribute-keys")?Q+=S+_:nt.attr("class").includes("attribute-comment")&&(Q+=S+_+v))}nt.attr("transform",`translate(${q+h/2+Q}, ${Je+Y+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+u/2)+")"),i!=null&&Ec.has(i)){const Z=r.colorIndex??0;m.attr("data-color-id",`color-${Z%l.length}`)}const G=O.rectangle(q,Y,$,E,A),et=m.insert(()=>G,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Z,V]of w.entries()){const nt=(Z+1)%2===0&&V.yOffset!==0,D=O.rectangle(q,C.height+Y+(V==null?void 0:V.yOffset),$,V==null?void 0:V.rowHeight,{...A,fill:nt?a:o,stroke:n});m.insert(()=>D,"g.label").attr("style",f.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}const lt=1e-4;let ot=Kr(q,C.height+Y,$+q,C.height+Y,lt),ct=O.polygon(ot.map(Z=>[Z.x,Z.y]),A);if(m.insert(()=>ct).attr("class","divider"),ot=Kr(S+q,C.height+Y,S+q,E+Y,lt),ct=O.polygon(ot.map(Z=>[Z.x,Z.y]),A),m.insert(()=>ct).attr("class","divider"),z){const Z=S+_+q;ot=Kr(Z,C.height+Y,Z,E+Y,lt),ct=O.polygon(ot.map(V=>[V.x,V.y]),A),m.insert(()=>ct).attr("class","divider")}if(N){const Z=S+_+v+q;ot=Kr(Z,C.height+Y,Z,E+Y,lt),ct=O.polygon(ot.map(V=>[V.x,V.y]),A),m.insert(()=>ct).attr("class","divider")}for(const Z of k){const V=C.height+Y+Z;ot=Kr(q,V,$+q,V,lt),ct=O.polygon(ot.map(gt=>[gt.x,gt.y]),A),m.insert(()=>ct).attr("class","divider")}if(it(t,et),g&&t.look!=="handDrawn")if(i!=null&&mS.has(i))m.selectAll("path").attr("style",g);else{const Z=g.split(";"),V=(Lt=Z==null?void 0:Z.filter(gt=>gt.includes("stroke")))==null?void 0:Lt.map(gt=>`${gt}`).join("; ");m.selectAll("path").attr("style",V??""),m.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(Z){return K.rect(t,Z)},m}p(Ol,"erBox");async function Qr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Th(t)&&(t=Th(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ze(n,t,{width:Qe(t,r)+100,style:o,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(qe(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=yt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Qr,"addText");function Kr(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(Kr,"lineToPolygon");async function Kg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",ht(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,f=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Xi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Xi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Xi(c,b,y,[b.parseClassifier()]);y+=k+a}d=c.node().getBBox().height,d<=0&&(d=s/2),h=o.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Xi(h,b,m,[b.parseClassifier()]);m+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+s*2})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}p(Kg,"textHelper");async function Xi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Et();let o="useHtmlLabels"in t?t.useHtmlLabels:qe(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),rs(n)&&(o=!0);const l=await ze(s,Hn(Or(n)),{width:Qe(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],f=yt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(y=>new Promise(m=>{function C(){var b;if(y.style.display="flex",y.style.flexDirection="column",g){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";m(y)}p(C,"setupImage"),setTimeout(()=>{y.complete&&C()}),y.addEventListener("error",C),y.addEventListener("load",C)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&yt(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(Xi,"addText");async function Jg(e,t){var O,A;const r=_t(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??qe(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Kg(e,t,r,n,o),{labelStyles:u,nodeStyles:f}=rt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((O=l.styles)==null?void 0:O.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),y=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const w=-C/2,S=-b/2;let _=g?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(_=a*2);const v=y.rectangle(w-a,S-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+_,m),F=c.insert(()=>v,":first-child");F.attr("class","basic label-container outer-path");const z=F.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,M=c.select(".label-group").node().getBBox().height-(g?a/2:0)||0,U=c.select(".members-group").node().getBBox().height-(g?a/2:0)||0,W=(N+M+S+a-(S-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((B,$,E)=>{var ot,ct;const q=yt(E[$]),Y=q.attr("transform");let G=0;if(Y){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);Ct&&(G=parseFloat(Ct[2]))}let et=G+S+a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(q.attr("class").includes("methods-group")){const bt=Math.max(U,o/2);k?et=Math.max(W,N+M+bt+S+o*2+a)+o*2:et=N+M+bt+S+o*4+a}l.members.length===0&&l.methods.length===0&&((ot=r.class)!=null&&ot.hideEmptyMembersBox)&&(l.annotations.length>0?et=G-o:et=G),n||(et-=4);let lt=w;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(lt=-((ct=q.node())==null?void 0:ct.getBBox().width)/2||0,c.selectAll("text").each(function(bt,Ct,Bt){window.getComputedStyle(Bt[Ct]).textAnchor==="middle"&&(lt=0)})),q.attr("transform",`translate(${lt}, ${et})`)}),l.members.length>0||l.methods.length>0||g){const B=N+M+S+a,$=y.line(z.x,B,z.x+z.width,B+.001,m);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const B=N+M+U+S+o*2+a,$=y.line(z.x,k?Math.max(W,B):B,z.x+z.width,(k?Math.max(W,B):B)+.001,m);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),F.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const B=RegExp(/color\s*:\s*([^;]*)/),$=B.exec(d);if($){const E=$[0].replace("color","fill");c.selectAll("tspan").attr("style",E)}else if(u){const E=B.exec(u);if(E){const q=E[0].replace("color","fill");c.selectAll("tspan").attr("style",q)}}}return it(t,F),t.intersect=function(B){return K.rect(t,B)},c}p(Jg,"classBox");async function tm(e,t){var z,N;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=ht(t),{themeVariables:h}=_t(),{borderColorArray:u,requirementEdgeLabelBackground:f}=h,d=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let g;l?g=await $e(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):g=await $e(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let y=g;const m=await $e(d,s.name,y,t.labelStyle+"; font-weight: bold;");if(y+=m+n,l){const M=await $e(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,y,t.labelStyle);y+=M;const U=await $e(d,`${s.text?`Text: ${s.text}`:""}`,y,t.labelStyle);y+=U;const W=await $e(d,`${s.risk?`Risk: ${s.risk}`:""}`,y,t.labelStyle);y+=W,await $e(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,y,t.labelStyle)}else{const M=await $e(d,`${a.type?`Type: ${a.type}`:""}`,y,t.labelStyle);y+=M,await $e(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,y,t.labelStyle)}const C=(((z=d.node())==null?void 0:z.getBBox().width)??200)+o,b=(((N=d.node())==null?void 0:N.getBBox().height)??200)+o,k=-C/2,w=-b/2,S=tt.svg(d),_=J(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=S.rectangle(k,w,C,b,_),F=d.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const M=t.colorIndex??0;d.attr("data-color-id",`color-${M%u.length}`)}if(d.selectAll(".label").each((M,U,W)=>{const O=yt(W[U]),A=O.attr("transform");let B=0,$=0;if(A){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);G&&(B=parseFloat(G[1]),$=parseFloat(G[2]))}const E=$-b/2;let q=k+o/2;(U===0||U===1)&&(q=B),O.attr("transform",`translate(${q}, ${E+o})`)}),y>g+m+n){const M=w+g+m+n;let U;if(t.look==="neo"){const A=[[k,M],[k+C,M],[k+C,M+.001],[k,M+.001]];U=S.polygon(A,_)}else U=S.line(k,M,k+C,M,_);d.insert(()=>U).attr("class","divider")}return it(t,F),t.intersect=function(M){return K.rect(t,M)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}p(tm,"requirementBox");async function $e(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=_t(),o=a.htmlLabels??!0,n=await ze(s,Hn(Or(t)),{width:Qe(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=n.children[0],h=yt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p($e,"addText");var yS=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 em(e,t,{config:r}){var U,W;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await ut(e,t,ht(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(u=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,y;f?{label:g,bbox:y}=await Mo(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:y}=await Mo(n,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await Mo(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(y.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,_=-k/2,v=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-w+l.height/2)+")"),m.attr("transform","translate("+(h+k/2-C.width-2*a)+", "+(-w+l.height/2)+")");let F;const{rx:z,ry:N}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const O=tt.svg(n),A=J(t,{}),B=z||N?O.path(gr(_,v,k,S,z||0),A):O.rectangle(_,v,k,S,A);F=n.insert(()=>B,":first-child"),F.attr("class","basic label-container").attr("style",M||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",N??5).attr("x",_).attr("y",v).attr("width",k).attr("height",S);const O="priority"in t&&t.priority;if(O){const A=n.append("line"),B=_+2,$=v+Math.floor((z??0)/2),E=v+S-Math.floor((z??0)/2);A.attr("x1",B).attr("y1",$).attr("x2",B).attr("y2",E).attr("stroke-width","4").attr("stroke",yS(O))}}return it(t,F),t.height=S,t.intersect=function(O){return K.rect(t,O)},n}p(em,"kanbanItem");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ut(e,t,ht(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,f=a.width+20,d=a.height+20,g=Math.max(l,f),y=Math.max(c,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let m;const C=`M0 0
247
+ a${h},${h} 1 0,0 ${g*.25},${-1*y*.1}
248
+ a${h},${h} 1 0,0 ${g*.25},0
249
+ a${h},${h} 1 0,0 ${g*.25},0
250
+ a${h},${h} 1 0,0 ${g*.25},${y*.1}
247
251
 
248
- a${h},${h} 1 0,0 ${y*.15},${g*.33}
249
- a${h*.8},${h*.8} 1 0,0 0,${g*.34}
250
- a${h},${h} 1 0,0 ${-1*y*.15},${g*.33}
252
+ a${h},${h} 1 0,0 ${g*.15},${y*.33}
253
+ a${h*.8},${h*.8} 1 0,0 0,${y*.34}
254
+ a${h},${h} 1 0,0 ${-1*g*.15},${y*.33}
251
255
 
252
- a${h},${h} 1 0,0 ${-1*y*.25},${g*.15}
253
- a${h},${h} 1 0,0 ${-1*y*.25},0
254
- a${h},${h} 1 0,0 ${-1*y*.25},0
255
- a${h},${h} 1 0,0 ${-1*y*.25},${-1*g*.15}
256
+ a${h},${h} 1 0,0 ${-1*g*.25},${y*.15}
257
+ a${h},${h} 1 0,0 ${-1*g*.25},0
258
+ a${h},${h} 1 0,0 ${-1*g*.25},0
259
+ a${h},${h} 1 0,0 ${-1*g*.25},${-1*y*.15}
256
260
 
257
- a${h},${h} 1 0,0 ${-1*y*.1},${-1*g*.33}
258
- a${h*.8},${h*.8} 1 0,0 0,${-1*g*.34}
259
- a${h},${h} 1 0,0 ${y*.1},${-1*g*.33}
260
- H0 V0 Z`;if(t.look==="handDrawn"){const b=tt.svg(s),k=J(t,{}),w=b.path(C,k);m=s.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Ht(u))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-y/2}, ${-g/2})`),it(t,m),t.calcIntersect=function(b,k){return Q.rect(b,k)},t.intersect=function(b){return H.info("Bang intersect",t,b),Q.rect(t,b)},s}p(tm,"bang");async function em(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ut(e,t,ht(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:y}=t;let g;const m=`M0 0
261
+ a${h},${h} 1 0,0 ${-1*g*.1},${-1*y*.33}
262
+ a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
263
+ a${h},${h} 1 0,0 ${g*.1},${-1*y*.33}
264
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=tt.svg(s),k=J(t,{}),w=b.path(C,k);m=s.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Ht(u))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-g/2}, ${-y/2})`),it(t,m),t.calcIntersect=function(b,k){return K.rect(b,k)},t.intersect=function(b){return H.info("Bang intersect",t,b),K.rect(t,b)},s}p(rm,"bang");async function im(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ut(e,t,ht(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let y;const m=`M0 0
261
265
  a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
262
266
  a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
263
267
  a${u},${u} 1 0,1 ${l*.35},${l*.2}
@@ -271,7 +275,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
271
275
 
272
276
  a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
273
277
  a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
274
- H0 V0 Z`;if(t.look==="handDrawn"){const C=tt.svg(s),b=J(t,{}),k=C.path(m,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Ht(y))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),it(t,g),t.calcIntersect=function(C,b){return Q.rect(C,b)},t.intersect=function(C){return H.info("Cloud intersect",t,C),Q.rect(t,C)},s}p(em,"cloud");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ut(e,t,ht(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=t.look==="neo"?`
278
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=tt.svg(s),b=J(t,{}),k=C.path(m,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",Ht(g))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),it(t,y),t.calcIntersect=function(C,b){return K.rect(C,b)},t.intersect=function(C){return H.info("Cloud intersect",t,C),K.rect(t,C)},s}p(im,"cloud");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await ut(e,t,ht(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=t.look==="neo"?`
275
279
  M${-l/2} ${c/2-h}
276
280
  v${-c+2*h}
277
281
  q0,-${h} ${h},-${h}
@@ -291,24 +295,24 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
291
295
  h${-(l-2*h)}
292
296
  q${-h},0 ${-h},${-h}
293
297
  Z
294
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=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(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),it(t,f),t.calcIntersect=function(d,y){return Q.rect(d,y)},t.intersect=function(d){return Q.rect(t,d)},s}p(rm,"defaultMindmapNode");async function im(e,t){const r={padding:t.padding??0};return El(e,t,r)}p(im,"mindmapCircle");var cS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Og},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Eg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ig},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ng},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ig},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:sg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:El},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:tm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:em},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Lg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ug},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:kg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:bg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Yg},{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:Cg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:og},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:zg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Vp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Mg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Rg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Pg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:hg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Jp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:eg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Tg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:jg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:cg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Hg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:wg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:rg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ag},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Gg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Vg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ng},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ug},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$g},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Bg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:_g},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Xp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Qp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Wg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:qg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Xg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Fg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Sg}],uS=p(()=>{const t=[...Object.entries({state:Dg,choice:Zp,note:vg,rectWithTitle:Ag,labelRect:xg,iconSquare:mg,iconCircle:pg,icon:fg,iconRounded:gg,imageSquare:yg,anchor:Gp,kanbanItem:Jg,mindmapCircle:im,defaultMindmapNode:rm,classBox:Kg,erBox:Ml,requirementBox:Qg}),...cS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),sm=uS();function dS(e){return e in sm}p(dS,"isValidShape");var Ua=new Map;async function am(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?sm[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Ht(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ua.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(am,"insertNode");var nF=p((e,t)=>{Ua.set(t.id,e)},"setNodeElem"),lF=p(()=>{Ua.clear()},"clear"),hF=p(e=>{const t=Ua.get(e.id);H.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"),Pi=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"),Qt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Fc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Gi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=At(e),t=At(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(Gi,"calculateDeltaAndAngle");var At=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),fS=p(e=>({x:p(function(t,r,i){let s=0;const a=At(i[0]).x<At(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:d,deltaX:y}=Gi(i[0],i[1]);s=Qt[e.arrowTypeStart]*Math.cos(d)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:d,deltaX:y}=Gi(i[i.length-1],i[i.length-2]);s=Qt[e.arrowTypeEnd]*Math.cos(d)*(y>=0?1:-1)}const o=Math.abs(At(t).x-At(i[i.length-1]).x),n=Math.abs(At(t).y-At(i[i.length-1]).y),l=Math.abs(At(t).x-At(i[0]).x),c=Math.abs(At(t).y-At(i[0]).y),h=Qt[e.arrowTypeStart],u=Qt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="right"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="right"?-1:1,s+=d}return At(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=At(i[0]).y<At(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:d,deltaY:y}=Gi(i[0],i[1]);s=Qt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:d,deltaY:y}=Gi(i[i.length-1],i[i.length-2]);s=Qt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(y>=0?1:-1)}const o=Math.abs(At(t).y-At(i[i.length-1]).y),n=Math.abs(At(t).x-At(i[i.length-1]).x),l=Math.abs(At(t).y-At(i[0]).y),c=Math.abs(At(t).x-At(i[0]).x),h=Qt[e.arrowTypeStart],u=Qt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="up"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="up"?-1:1,s+=d}return At(t).y+s},"y")}),"getLineFunctionsWithOffset"),pS=p((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Ac(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Ac(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),gS={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}},mS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ac=p((e,t,r,i,s,a,o=!1,n)=>{var y;const l=gS[r],c=l&&mS.includes(l.type);if(!l){H.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${g}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),yS=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=St())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),La=new Map,jt=new Map,cF=p(()=>{La.clear(),jt.clear()},"clear"),Ri=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),CS=p(async(e,t)=>{const r=St();let i=ae(r);const{labelStyles:s}=rt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ze(e,t.label,{style:Ri(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),H.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],y=yt(c);h=d.getBoundingClientRect(),u=h,y.attr("width",h.width),y.attr("height",h.height)}else{const d=yt(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Pi(u,i)),La.set(t.id,a),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await or(y,t.startLabelLeft,Ri(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Pi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startLeft=d,ji(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await or(y,t.startLabelRight,Ri(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Pi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startRight=d,ji(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await or(d,t.endLabelLeft,Ri(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Pi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endLeft=d,ji(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await or(d,t.endLabelRight,Ri(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Pi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endRight=d,ji(f,t.endLabelRight)}return c},"insertEdgeLabel");function ji(e,t){ae(St())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(ji,"setTerminalWidth");var xS=p((e,t)=>{H.debug("Moving label abc88 ",e.id,e.label,La.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=St(),{subGraphTitleTotalMargin:s}=Cl(i);if(e.label){const a=La.get(e.id);let o=e.x,n=e.y;if(r){const l=Te.calcLabelPosition(r);H.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=jt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=jt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=jt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=jt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),bS=p((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),kS=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),TS=p((e,t,r)=>{H.debug(`intersection calc abc89:
298
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=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(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),it(t,f),t.calcIntersect=function(d,g){return K.rect(d,g)},t.intersect=function(d){return K.rect(t,d)},s}p(sm,"defaultMindmapNode");async function am(e,t){const r={padding:t.padding??0};return $l(e,t,r)}p(am,"mindmapCircle");var CS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Dg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:$g},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Rg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Wg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ag},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:og},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:$l},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:rm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:im},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ag},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Tg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Gg},{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:bg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:lg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Yg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Qp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Og},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:qg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ng},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ug},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ig},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Sg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Vg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ug},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:_g},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ng},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Xg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Qg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:hg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:jg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ig},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Lg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:vg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Zp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Hg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Zg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Eg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Bg}],xS=p(()=>{const t=[...Object.entries({state:Pg,choice:Kp,note:Fg,rectWithTitle:Mg,labelRect:kg,iconSquare:Cg,iconCircle:mg,icon:gg,iconRounded:yg,imageSquare:xg,anchor:Xp,kanbanItem:em,mindmapCircle:am,defaultMindmapNode:sm,classBox:Jg,erBox:Ol,requirementBox:tm}),...CS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),om=xS();function bS(e){return e in om}p(bS,"isValidShape");var ja=new Map;async function nm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?om[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Ht(t.look)),t.tooltip&&s.attr("title",t.tooltip),ja.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(nm,"insertNode");var gF=p((e,t)=>{ja.set(t.id,e)},"setNodeElem"),mF=p(()=>{ja.clear()},"clear"),yF=p(e=>{const t=ja.get(e.id);H.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"),qi=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"),Kt={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},Mc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Vi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=At(e),t=At(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(Vi,"calculateDeltaAndAngle");var At=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),kS=p(e=>({x:p(function(t,r,i){let s=0;const a=At(i[0]).x<At(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Kt,e.arrowTypeStart)){const{angle:d,deltaX:g}=Vi(i[0],i[1]);s=Kt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Kt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Vi(i[i.length-1],i[i.length-2]);s=Kt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(At(t).x-At(i[i.length-1]).x),n=Math.abs(At(t).y-At(i[i.length-1]).y),l=Math.abs(At(t).x-At(i[0]).x),c=Math.abs(At(t).y-At(i[0]).y),h=Kt[e.arrowTypeStart],u=Kt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="right"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="right"?-1:1,s+=d}return At(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=At(i[0]).y<At(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Kt,e.arrowTypeStart)){const{angle:d,deltaY:g}=Vi(i[0],i[1]);s=Kt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Kt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Vi(i[i.length-1],i[i.length-2]);s=Kt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(At(t).y-At(i[i.length-1]).y),n=Math.abs(At(t).x-At(i[i.length-1]).x),l=Math.abs(At(t).y-At(i[0]).y),c=Math.abs(At(t).x-At(i[0]).x),h=Kt[e.arrowTypeStart],u=Kt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="up"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="up"?-1:1,s+=d}return At(t).y+s},"y")}),"getLineFunctionsWithOffset"),TS=p((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&$c(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&$c(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),wS={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}},SS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],$c=p((e,t,r,i,s,a,o=!1,n)=>{var g;const l=wS[r],c=l&&SS.includes(l.type);if(!l){H.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${y}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(g=C.parentNode)==null||g.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),_S=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=_t())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Aa=new Map,jt=new Map,CF=p(()=>{Aa.clear(),jt.clear()},"clear"),Wi=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),BS=p(async(e,t)=>{const r=_t();let i=ae(r);const{labelStyles:s}=rt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ze(e,t.label,{style:Wi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),H.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],g=yt(c);h=d.getBoundingClientRect(),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const d=yt(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",qi(u,i)),Aa.set(t.id,a),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await nr(g,t.startLabelLeft,Wi(t.labelStyle)||"",!1,!1);f=y;let m=y.getBBox();if(i){const C=y.children[0],b=yt(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",qi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startLeft=d,Zi(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await nr(g,t.startLabelRight,Wi(t.labelStyle)||"",!1,!1);f=y;let m=y.getBBox();if(i){const C=y.children[0],b=yt(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",qi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startRight=d,Zi(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await nr(d,t.endLabelLeft,Wi(t.labelStyle)||"",!1,!1);f=y;let m=y.getBBox();if(i){const C=y.children[0],b=yt(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",qi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endLeft=d,Zi(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await nr(d,t.endLabelRight,Wi(t.labelStyle)||"",!1,!1);f=y;let m=y.getBBox();if(i){const C=y.children[0],b=yt(y);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",qi(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endRight=d,Zi(f,t.endLabelRight)}return c},"insertEdgeLabel");function Zi(e,t){ae(_t())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Zi,"setTerminalWidth");var vS=p((e,t)=>{H.debug("Moving label abc88 ",e.id,e.label,Aa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=_t(),{subGraphTitleTotalMargin:s}=bl(i);if(e.label){const a=Aa.get(e.id);let o=e.x,n=e.y;if(r){const l=Te.calcLabelPosition(r);H.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=jt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=jt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=jt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=jt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),LS=p((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),FS=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),AS=p((e,t,r)=>{H.debug(`intersection calc abc89:
295
299
  outsidePoint: ${JSON.stringify(t)}
296
300
  insidePoint : ${JSON.stringify(r)}
297
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const f={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&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),H.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return H.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),Ec=p((e,t)=>{H.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(H.info("abc88 checking point",a,t),!kS(t,a)&&!s){const o=TS(t,i,a);H.debug("abc88 inside",a,i,o),H.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?H.warn("abc88 no intersect",o,r):r.push(o),s=!0}else H.warn("abc88 outside",a,i),i=a,s||r.push(a)}),H.debug("returning points",r),r},"cutPathAtIntersect");function om(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(om,"extractCornerPoints");var Mc=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),wS=p(function(e){const{cornerPointPositions:t}=om(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=Mc(s,o,5),l=Mc(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){H.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?f={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:f={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else H.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),SS=p((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),_S=p(function(e,t,r,i,s,a,o,n=!1){var E;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=St();let h=t.points,u=!1;const f=s;var d=a;const y=[];for(const q in t.cssCompiledStyles)Wf(q)||y.push(t.cssCompiledStyles[q]);if(c==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),d.intersect(h[1])];else{const q=h.slice(1,-1),Y=q[0],G=q[q.length-1],et=.5,lt=Math.abs(h[h.length-1].x-G.x)<et&&Math.abs(h[h.length-1].y-G.y)<et,ot=f.intersect(Y),ct=lt?G:d.intersect(G),bt=Math.abs(ct.x-G.x)<et&&Math.abs(ct.y-G.y)<et,Bt=Math.abs(ot.x-Y.x)<et&&Math.abs(ot.y-Y.y)<et?[]:[ot],Lt=bt?[]:[ct];h=[...Bt,...q,...Lt]}h=bS(t,h)}else d.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const g=btoa(JSON.stringify(h));t.toCluster&&(H.info("to cluster abc88",r.get(t.toCluster)),h=Ec(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(H.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Ec(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let m=h.filter(q=>!Number.isNaN(q.y));const C=yS(t.curve);C!=="rounded"&&(m=wS(m));let b=Ki;switch(C){case"linear":b=Ki;break;case"basis":b=Ko;break;case"cardinal":b=Yu;break;case"bumpX":b=Nu;break;case"bumpY":b=qu;break;case"catmullRom":b=Gu;break;case"monotoneX":b=Qu;break;case"monotoneY":b=Ju;break;case"natural":b=ed;break;case"step":b=rd;break;case"stepAfter":b=sd;break;case"stepBefore":b=id;break;case"rounded":b=Ki;break;default:b=Ko}const{x:k,y:w}=fS(t),S=Kk().x(k).y(w).curve(b);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let F,v=C==="rounded"?nm(lm(m,t),5):S(m);const z=Array.isArray(t.style)?t.style:[t.style];let N=z.find(q=>q==null?void 0:q.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const q=tt.svg(e);Object.assign([],m);const Y=q.path(v,{roughness:.3,seed:l});_+=" transition",F=yt(Y).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",z?z.reduce((et,lt)=>et+";"+lt,""):"");let G=F.attr("d");F.attr("d",G),e.node().appendChild(F.node())}else{const q=y.join(";"),Y=z?z.reduce((bt,Ct)=>bt+Ct+";",""):"",G=(q?q+";"+Y+";":Y)+";"+(z?z.reduce((bt,Ct)=>bt+";"+Ct,""):"");F=e.append("path").attr("d",v).attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",G),N=(E=G.match(/stroke:([^;]+)/))==null?void 0:E[1],U=t.animate===!0||!!t.animation||q.includes("animation");const et=F.node(),lt=typeof et.getTotalLength=="function"?et.getTotalLength():0,ot=Fc[t.arrowTypeStart]||0,ct=Fc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const Ct=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?SS(lt,ot,ct):`0 ${ot} ${lt-ot-ct} ${ct}`}; stroke-dashoffset: 0;`;F.attr("style",Ct+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",g),F.attr("data-look",Ht(t.look)),t.showPoints&&m.forEach(q=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",q.x).attr("cy",q.y)});let W="";(St().flowchart.arrowMarkerAbsolute||St().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),H.info("arrowTypeStart",t.arrowTypeStart),H.info("arrowTypeEnd",t.arrowTypeEnd);const O=!U&&(t==null?void 0:t.look)==="neo";pS(F,t,W,o,i,O,N);const A=Math.floor(h.length/2),B=h[A];Te.isLabelCoordinateInPath(B,F.attr("d"))||(u=!0);let $={};return u&&($.updatedPath=h),$.originalPath=t.points,$},"insertEdge");function nm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(c,h),y=Math.hypot(u,f);if(d<s||y<s){r+=`L${o.x},${o.y}`;continue}const g=c/d,m=h/d,C=u/y,b=f/y,k=g*C+m*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${o.x},${o.y}`;continue}const _=Math.min(t/Math.sin(S/2),d/2,y/2),F=o.x-g*_,v=o.y-m*_,z=o.x+C*_,N=o.y+b*_;r+=`L${F},${v}`,r+=`Q${o.x},${o.y} ${z},${N}`}}return r}p(nm,"generateRoundedPath");function Ln(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Ln,"calculateDeltaAndAngle");function lm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Qt[t.arrowTypeStart]){const s=Qt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Ln(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Qt[t.arrowTypeEnd]){const s=Qt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Ln(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(lm,"applyMarkerOffsetsToPoints");var BS=p((e,t,r,i)=>{t.forEach(s=>{VS[s](e,r,i)})},"insertMarkers"),vS=p((e,t,r)=>{H.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),LS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),FS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),AS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),ES=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),MS=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"),$S=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"),OS=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"),IS=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"),DS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),PS=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"),RS=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"),NS=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"),qS=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"),WS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),zS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),HS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),YS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),US=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
301
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const f={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&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),H.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return H.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),Oc=p((e,t)=>{H.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(H.info("abc88 checking point",a,t),!FS(t,a)&&!s){const o=AS(t,i,a);H.debug("abc88 inside",a,i,o),H.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?H.warn("abc88 no intersect",o,r):r.push(o),s=!0}else H.warn("abc88 outside",a,i),i=a,s||r.push(a)}),H.debug("returning points",r),r},"cutPathAtIntersect");function lm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(lm,"extractCornerPoints");var Ic=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),ES=p(function(e){const{cornerPointPositions:t}=lm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=Ic(s,o,5),l=Ic(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){H.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?f={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:f={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else H.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),MS=p((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),$S=p(function(e,t,r,i,s,a,o,n=!1){var E;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=_t();let h=t.points,u=!1;const f=s;var d=a;const g=[];for(const q in t.cssCompiledStyles)Yf(q)||g.push(t.cssCompiledStyles[q]);if(c==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),d.intersect(h[1])];else{const q=h.slice(1,-1),Y=q[0],G=q[q.length-1],et=.5,lt=Math.abs(h[h.length-1].x-G.x)<et&&Math.abs(h[h.length-1].y-G.y)<et,ot=f.intersect(Y),ct=lt?G:d.intersect(G),bt=Math.abs(ct.x-G.x)<et&&Math.abs(ct.y-G.y)<et,Bt=Math.abs(ot.x-Y.x)<et&&Math.abs(ot.y-Y.y)<et?[]:[ot],Lt=bt?[]:[ct];h=[...Bt,...q,...Lt]}h=LS(t,h)}else d.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(H.info("to cluster abc88",r.get(t.toCluster)),h=Oc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(H.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Oc(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let m=h.filter(q=>!Number.isNaN(q.y));const C=_S(t.curve);C!=="rounded"&&(m=ES(m));let b=ts;switch(C){case"linear":b=ts;break;case"basis":b=Jo;break;case"cardinal":b=ju;break;case"bumpX":b=zu;break;case"bumpY":b=Hu;break;case"catmullRom":b=Vu;break;case"monotoneX":b=ed;break;case"monotoneY":b=rd;break;case"natural":b=sd;break;case"step":b=ad;break;case"stepAfter":b=nd;break;case"stepBefore":b=od;break;case"rounded":b=ts;break;default:b=Jo}const{x:k,y:w}=kS(t),S=Jk().x(k).y(w).curve(b);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let v,F=C==="rounded"?hm(cm(m,t),5):S(m);const z=Array.isArray(t.style)?t.style:[t.style];let N=z.find(q=>q==null?void 0:q.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const q=tt.svg(e);Object.assign([],m);const Y=q.path(F,{roughness:.3,seed:l});_+=" transition",v=yt(Y).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",z?z.reduce((et,lt)=>et+";"+lt,""):"");let G=v.attr("d");v.attr("d",G),e.node().appendChild(v.node())}else{const q=g.join(";"),Y=z?z.reduce((bt,Ct)=>bt+Ct+";",""):"",G=(q?q+";"+Y+";":Y)+";"+(z?z.reduce((bt,Ct)=>bt+";"+Ct,""):"");v=e.append("path").attr("d",F).attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",G),N=(E=G.match(/stroke:([^;]+)/))==null?void 0:E[1],U=t.animate===!0||!!t.animation||q.includes("animation");const et=v.node(),lt=typeof et.getTotalLength=="function"?et.getTotalLength():0,ot=Mc[t.arrowTypeStart]||0,ct=Mc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const Ct=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?MS(lt,ot,ct):`0 ${ot} ${lt-ot-ct} ${ct}`}; stroke-dashoffset: 0;`;v.attr("style",Ct+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",y),v.attr("data-look",Ht(t.look)),t.showPoints&&m.forEach(q=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",q.x).attr("cy",q.y)});let W="";(_t().flowchart.arrowMarkerAbsolute||_t().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),H.info("arrowTypeStart",t.arrowTypeStart),H.info("arrowTypeEnd",t.arrowTypeEnd);const O=!U&&(t==null?void 0:t.look)==="neo";TS(v,t,W,o,i,O,N);const A=Math.floor(h.length/2),B=h[A];Te.isLabelCoordinateInPath(B,v.attr("d"))||(u=!0);let $={};return u&&($.updatedPath=h),$.originalPath=t.points,$},"insertEdge");function hm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(c,h),g=Math.hypot(u,f);if(d<s||g<s){r+=`L${o.x},${o.y}`;continue}const y=c/d,m=h/d,C=u/g,b=f/g,k=y*C+m*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${o.x},${o.y}`;continue}const _=Math.min(t/Math.sin(S/2),d/2,g/2),v=o.x-y*_,F=o.y-m*_,z=o.x+C*_,N=o.y+b*_;r+=`L${v},${F}`,r+=`Q${o.x},${o.y} ${z},${N}`}}return r}p(hm,"generateRoundedPath");function An(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(An,"calculateDeltaAndAngle");function cm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Kt[t.arrowTypeStart]){const s=Kt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=An(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Kt[t.arrowTypeEnd]){const s=Kt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=An(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(cm,"applyMarkerOffsetsToPoints");var OS=p((e,t,r,i)=>{t.forEach(s=>{i_[s](e,r,i)})},"insertMarkers"),IS=p((e,t,r)=>{H.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),DS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),RS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),PS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),NS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),qS=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"),WS=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"),zS=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"),HS=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"),YS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),US=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"),GS=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"),jS=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"),XS=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"),VS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),ZS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),QS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),KS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),JS=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
298
302
  L20,10
299
303
  M20,10
300
- L0,20`)},"requirement_arrow"),GS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
304
+ L0,20`)},"requirement_arrow"),t_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
301
305
  L20,10
302
306
  M20,10
303
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),jS=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"),XS=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),VS={extension:vS,composition:LS,aggregation:FS,dependency:AS,lollipop:ES,point:MS,circle:$S,cross:OS,barb:IS,barbNeo:DS,only_one:PS,zero_or_one:RS,one_or_more:NS,zero_or_more:qS,only_one_neo:WS,zero_or_one_neo:zS,one_or_more_neo:HS,zero_or_more_neo:YS,requirement_arrow:US,requirement_contains:jS,requirement_arrow_neo:GS,requirement_contains_neo:XS},ZS=BS,KS={common:fs,getConfig:Et,insertCluster:Gw,insertEdge:_S,insertEdgeLabel:CS,insertMarkers:ZS,insertNode:am,interpolateToCurve:dl,labelHelper:ut,log:H,positionEdgeLabel:xS},cs={},hm=p(e=>{for(const t of e)cs[t.name]=t},"registerLayoutLoaders"),QS=p(()=>{hm([{name:"dagre",loader:p(async()=>await mt(()=>import("./dagre-VKFMJZFB.D4vaA23X.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"swimlane",loader:p(async()=>await mt(()=>import("./swimlanes-5IMT3BWC.Dy9SffeT.js"),__vite__mapDeps([6,5,1,2,3])),"loader")},{name:"cose-bilkent",loader:p(async()=>await mt(()=>import("./cose-bilkent-JH36ORCC.BeFuOTgi.js"),__vite__mapDeps([7,8,5])),"loader")}])},"registerDefaultLayoutLoaders");QS();var uF=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in cs))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const u of e.nodes){const f=u.domId||u.id;u.domId=`${e.diagramId}-${f}`}const i=cs[e.layoutAlgorithm],s=await i.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),n){const u=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,KS,{algorithm:i.algorithm},r)},"render"),dF=p((e="",{fallback:t="dagre"}={})=>{if(e in cs)return e;if(t in cs)return H.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),$l="comm",cm="rule",um="decl",JS="@media",t_="@import",e_="@supports",r_="@namespace",Fn="@keyframes",dm="@layer",i_="@scope",s_=Math.abs,Ji=String.fromCharCode;function fm(e){return e.trim()}function An(e,t,r){return e.replace(t,r)}function ti(e,t){return e.charCodeAt(t)|0}function ki(e,t,r){return e.slice(t,r)}function Oe(e){return e.length}function pm(e){return e.length}function Rs(e,t){return t.push(e),e}var Ga=1,Ti=1,gm=0,me=0,Dt=0,_i="";function Ol(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Ga,column:Ti,length:o,return:"",siblings:n}}function a_(){return Dt}function o_(){return Dt=me>0?ti(_i,--me):0,Ti--,Dt===10&&(Ti=1,Ga--),Dt}function Se(){return Dt=me<gm?ti(_i,me++):0,Ti++,Dt===10&&(Ti=1,Ga++),Dt}function nr(){return ti(_i,me)}function Ks(){return me}function ja(e,t){return ki(_i,e,t)}function us(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function n_(e){return Ga=Ti=1,gm=Oe(_i=e),me=0,[]}function l_(e){return _i="",e}function Mo(e){return fm(ja(me-1,En(e===91?e+2:e===40?e+1:e)))}function h_(e){for(;(Dt=nr())&&Dt<33;)Se();return us(e)>2||us(Dt)>3?"":" "}function c_(e,t){for(;--t&&Se()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return ja(e,Ks()+(t<6&&nr()==32&&Se()==32))}function En(e){for(;Se();)switch(Dt){case e:return me;case 34:case 39:e!==34&&e!==39&&En(Dt);break;case 40:e===41&&En(e);break;case 92:Se();break}return me}function u_(e,t){for(;Se()&&e+Dt!==57;)if(e+Dt===84&&nr()===47)break;return"/*"+ja(t,me-1)+"*"+Ji(e===47?e:Se())}function d_(e){for(;!us(nr());)Se();return ja(e,me)}function f_(e){return l_(Qs("",null,null,null,[""],e=n_(e),0,[0],e))}function Qs(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,f=0,d=0,y=0,g=1,m=1,C=1,b=0,k=0,w="",S=s,_=a,F=i,v=w;m;)switch(y=k,k=Se()){case 40:y!=108&&ti(v,u-1)==58?(b++,v+="("):v+=Mo(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Mo(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Ji(k);break}v+=h_(y);break;case 92:v+=c_(Ks()-1,7);continue;case 47:switch(nr()){case 42:case 47:Rs(p_(u_(Se(),Ks()),t,r,l),l),(us(y||1)==5||us(nr()||1)==5)&&Oe(v)&&ki(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*g:n[c++]=Oe(v)*C;case 125*g:case 59:case 0:if(b>0&&k){v+=Ji(k);break}switch(k){case 0:case 125:m=0;case 59+h:C==-1&&(v=An(v,/\f/g,"")),d>0&&(Oe(v)-u||g===0)&&Rs(d>32?Oc(v+";",i,r,u-1,l):Oc(An(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Rs(F=$c(v,t,r,c,h,s,n,w,S=[],_=[],u,a),a),k===123)if(h===0)Qs(v,t,F,F,S,a,u,n,_);else{switch(f){case 99:if(ti(v,3)===110)break;case 108:if(ti(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Qs(e,F,F,i&&Rs($c(e,F,F,0,0,s,n,w,s,S=[],u,_),_),s,_,u,n,i?S:_):Qs(v,F,F,F,[""],_,0,n,_)}}c=h=d=0,g=C=1,w=v="",u=o;break;case 58:u=1+Oe(v),d=y;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&o_()==125)continue}switch(v+=Ji(k),k*g){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Oe(v)-1)*C,C=1;break;case 64:nr()===45&&(v+=Mo(Se())),f=nr(),h=u=Oe(w=v+=d_(Ks())),k++;break;case 45:y===45&&Oe(v)==2&&(g=0)}}return a}function $c(e,t,r,i,s,a,o,n,l,c,h,u){for(var f=s-1,d=s===0?a:[""],y=pm(d),g=0,m=0,C=0;g<i;++g)for(var b=0,k=ki(e,f+1,f=s_(m=o[g])),w=e;b<y;++b)(w=fm(m>0?d[b]+" "+k:An(k,/&\f/g,d[b])))&&(l[C++]=w);return Ol(e,t,r,s===0?cm:n,l,c,h,u)}function p_(e,t,r,i){return Ol(e,t,r,$l,Ji(a_()),ki(e,2,-2),0,i)}function Oc(e,t,r,i,s){return Ol(e,t,r,um,ki(e,0,i),ki(e,i+1,-1),i,s)}function Mn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function g_(e,t,r,i){switch(e.type){case dm:if(e.children.length)break;case t_:case r_:case um:return e.return=e.return||e.value;case $l:return"";case Fn:return e.return=e.value+"{"+Mn(e.children,i)+"}";case cm:if(!Oe(e.value=e.props.join(",")))return""}return Oe(r=Mn(e.children,i))?e.return=e.value+"{"+r+"}":""}function m_(e){var t=pm(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var mm="c4",y_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),C_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV.gSbgoaJo.js");return{diagram:t}},__vite__mapDeps([9,10,5]));return{id:mm,diagram:e}},"loader"),x_={id:mm,detector:y_,loader:C_},b_=x_,ym="flowchart",k_=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"),T_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.BZLu-WUl.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:ym,diagram:e}},"loader"),w_={id:ym,detector:k_,loader:T_},S_=w_,Cm="flowchart-v2",__=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"),B_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.BZLu-WUl.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:Cm,diagram:e}},"loader"),v_={id:Cm,detector:__,loader:B_},L_=v_,xm="swimlane",F_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),A_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV.Kb9LnCTH.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,15,5]));return{id:xm,diagram:e}},"loader"),E_={id:xm,detector:F_,loader:A_},M_=E_,bm="er",$_=p(e=>/^\s*erDiagram/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT.C6qmOrvh.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,5]));return{id:bm,diagram:e}},"loader"),I_={id:bm,detector:$_,loader:O_},D_=I_,km="gitGraph",P_=p(e=>/^\s*gitGraph/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX.BqLfYTI7.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,5]));return{id:km,diagram:e}},"loader"),N_={id:km,detector:P_,loader:R_},q_=N_,Tm="gantt",W_=p(e=>/^\s*gantt/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP.DUzsw4Yr.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,5]));return{id:Tm,diagram:e}},"loader"),H_={id:Tm,detector:W_,loader:z_},Y_=H_,wm="info",U_=p(e=>/^\s*info/.test(e),"detector"),G_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U.CiKWveW9.js");return{diagram:t}},__vite__mapDeps([26,21,5]));return{id:wm,diagram:e}},"loader"),j_={id:wm,detector:U_,loader:G_},Sm="pie",X_=p(e=>/^\s*pie/.test(e),"detector"),V_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P.Bb0MqerK.js");return{diagram:t}},__vite__mapDeps([27,20,21,5,28,29,24]));return{id:Sm,diagram:e}},"loader"),Z_={id:Sm,detector:X_,loader:V_},_m="quadrantChart",K_=p(e=>/^\s*quadrantChart/.test(e),"detector"),Q_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL.Do6HK_yb.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,5]));return{id:_m,diagram:e}},"loader"),J_={id:_m,detector:K_,loader:Q_},tB=J_,Bm="xychart",eB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),rB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG.aKgxZVbK.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,5]));return{id:Bm,diagram:e}},"loader"),iB={id:Bm,detector:eB,loader:rB},sB=iB,vm="requirement",aB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE.DMtjRYUg.js");return{diagram:t}},__vite__mapDeps([32,13,14,5]));return{id:vm,diagram:e}},"loader"),nB={id:vm,detector:aB,loader:oB},lB=nB,Lm="sequence",hB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ.CLZ0rZTY.js");return{diagram:t}},__vite__mapDeps([33,19,10,5]));return{id:Lm,diagram:e}},"loader"),uB={id:Lm,detector:hB,loader:cB},dB=uB,Fm="class",fB=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"),pB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ.DV5B4KLJ.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,14,10,5]));return{id:Fm,diagram:e}},"loader"),gB={id:Fm,detector:fB,loader:pB},mB=gB,Am="classDiagram",yB=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"),CB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH.DV5B4KLJ.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,14,10,5]));return{id:Am,diagram:e}},"loader"),xB={id:Am,detector:yB,loader:CB},bB=xB,Em="state",kB=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"),TB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC.DY8sDkI0.js");return{diagram:t}},__vite__mapDeps([37,38,13,14,10,2,4,3,5]));return{id:Em,diagram:e}},"loader"),wB={id:Em,detector:kB,loader:TB},SB=wB,Mm="stateDiagram",_B=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"),BB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB.B9v-Vq5L.js");return{diagram:t}},__vite__mapDeps([39,38,13,14,10,5]));return{id:Mm,diagram:e}},"loader"),vB={id:Mm,detector:_B,loader:BB},LB=vB,$m="journey",FB=p(e=>/^\s*journey/.test(e),"detector"),AB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC.Cqzvo6I_.js");return{diagram:t}},__vite__mapDeps([40,12,10,28,5]));return{id:$m,diagram:e}},"loader"),EB={id:$m,detector:FB,loader:AB},MB=EB,$B=p((e,t,r)=>{H.debug(`rendering svg for syntax error
304
- `);const i=o1(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),lu(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Om={draw:$B},OB=Om,IB={db:{},renderer:Om,parser:{parse:p(()=>{},"parse")}},DB=IB,Im="flowchart-elk",PB=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"),RB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.BZLu-WUl.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:Im,diagram:e}},"loader"),NB={id:Im,detector:PB,loader:RB},qB=NB,Dm="timeline",WB=p(e=>/^\s*timeline/.test(e),"detector"),zB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6.CH6uzgIu.js");return{diagram:t}},__vite__mapDeps([41,28,5]));return{id:Dm,diagram:e}},"loader"),HB={id:Dm,detector:WB,loader:zB},YB=HB,Pm="mindmap",UB=p(e=>/^\s*mindmap/.test(e),"detector"),GB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C.ChC5FJW6.js");return{diagram:t}},__vite__mapDeps([42,13,14,5]));return{id:Pm,diagram:e}},"loader"),jB={id:Pm,detector:UB,loader:GB},XB=jB,Rm="kanban",VB=p(e=>/^\s*kanban/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6.BzJ4OPe5.js");return{diagram:t}},__vite__mapDeps([43,12,5]));return{id:Rm,diagram:e}},"loader"),KB={id:Rm,detector:VB,loader:ZB},QB=KB,Nm="sankey",JB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB.dfXDu62B.js");return{diagram:t}},__vite__mapDeps([44,29,24,5]));return{id:Nm,diagram:e}},"loader"),ev={id:Nm,detector:JB,loader:tv},rv=ev,qm="packet",iv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH.CxjBEGZX.js");return{diagram:t}},__vite__mapDeps([45,20,21,5]));return{id:qm,diagram:e}},"loader"),av={id:qm,detector:iv,loader:sv},Wm="radar",ov=p(e=>/^\s*radar-beta/.test(e),"detector"),nv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY.yXgVkURA.js");return{diagram:t}},__vite__mapDeps([46,20,21,5]));return{id:Wm,diagram:e}},"loader"),lv={id:Wm,detector:ov,loader:nv},zm="block",hv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),cv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3.DdHVir7t.js");return{diagram:t}},__vite__mapDeps([47,12,2,15,5]));return{id:zm,diagram:e}},"loader"),uv={id:zm,detector:hv,loader:cv},dv=uv,Hm="treeView",fv=p(e=>/^\s*treeView-beta/.test(e),"detector"),pv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP.CU1jGXMi.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,5]));return{id:Hm,diagram:e}},"loader"),gv={id:Hm,detector:fv,loader:pv},mv=gv,Ym="architecture",yv=p(e=>/^\s*architecture/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR.u2IZtOa6.js");return{diagram:t}},__vite__mapDeps([49,20,21,5,8]));return{id:Ym,diagram:e}},"loader"),xv={id:Ym,detector:yv,loader:Cv},bv=xv,Um="eventmodeling",kv=p(e=>/^\s*eventmodeling/.test(e),"detector"),Tv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY.uwRFLKRx.js");return{diagram:t}},__vite__mapDeps([50,20,21,5]));return{id:Um,diagram:e}},"loader"),wv={id:Um,detector:kv,loader:Tv},Sv=wv,Gm="ishikawa",_v=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Bv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T.jerUXEXA.js");return{diagram:t}},__vite__mapDeps([51,5]));return{id:Gm,diagram:e}},"loader"),vv={id:Gm,detector:_v,loader:Bv},jm="venn",Lv=p(e=>/^\s*venn-beta/.test(e),"detector"),Fv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P.7EBCJmyP.js");return{diagram:t}},__vite__mapDeps([52,5]));return{id:jm,diagram:e}},"loader"),Av={id:jm,detector:Lv,loader:Fv},Ev=Av,Xm="treemap",Mv=p(e=>/^\s*treemap/.test(e),"detector"),$v=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW.Byfc9d0H.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,5,25,29,24]));return{id:Xm,diagram:e}},"loader"),Ov={id:Xm,detector:Mv,loader:$v},Vm="wardley",Iv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Dv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667.DPHAQssL.js");return{diagram:t}},__vite__mapDeps([54,20,21,5]));return{id:Vm,diagram:e}},"loader"),Pv={id:Vm,detector:Iv,loader:Dv},Rv=Pv,Zm="cynefin",Nv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),qv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4.BrJcHEEe.js");return{diagram:t}},__vite__mapDeps([55,20,21,5]));return{id:Zm,diagram:e}},"loader"),Wv={id:Zm,detector:Nv,loader:qv},Km="railroad",zv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Hv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6.D35m6hQn.js");return{diagram:t}},__vite__mapDeps([56,57,20,21,5]));return{id:Km,diagram:e}},"loader"),Yv={id:Km,detector:zv,loader:Hv},Qm="railroadEbnf",Uv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Gv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH.UucqGQ_d.js");return{diagram:t}},__vite__mapDeps([58,57,20,21,5]));return{id:Qm,diagram:e}},"loader"),jv={id:Qm,detector:Uv,loader:Gv},Jm="railroadAbnf",Xv=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Vv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED.RG1C5NpS.js");return{diagram:t}},__vite__mapDeps([59,57,20,21,5]));return{id:Jm,diagram:e}},"loader"),Zv={id:Jm,detector:Xv,loader:Vv},ty="railroadPeg",Kv=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Qv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR.ClnjsRYs.js");return{diagram:t}},__vite__mapDeps([60,57,20,21,5]));return{id:ty,diagram:e}},"loader"),Jv={id:ty,detector:Kv,loader:Qv},Ic=!1,Xa=p(()=>{Ic||(Ic=!0,ia("error",DB,e=>e.toLowerCase().trim()==="error"),ia("---",{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("---")),Po(qB,XB,bv),Po(b_,QB,bB,mB,D_,Y_,j_,Z_,lB,dB,M_,L_,S_,YB,q_,LB,SB,MB,tB,rv,av,sB,dv,Sv,mv,lv,vv,Ov,Yv,jv,Zv,Jv,Ev,Rv,Wv))},"addDiagrams"),tL=p(async()=>{H.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Fr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Wo(r)}catch{try{const{diagram:a,id:o}=await s();ia(o,a,i)}catch(a){throw H.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Fr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){H.error(`Failed to load ${t.length} external diagrams`);for(const r of t)H.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),eL="graphics-document document";function ey(e,t){e.attr("role",eL),t!==""&&e.attr("aria-roledescription",t)}p(ey,"setA11yDiagramInfo");function ry(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(ry,"addSVGa11yTitleDescription");var vr,$n=(vr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Et(),s=Dn(t,i);t=pT(t)+`
305
- `;try{Wo(s)}catch{const u=tC(s);if(!u)throw new ru(`Diagram ${s} not found.`);const{id:f,diagram:d}=await u();ia(f,d)}const{db:a,parser:o,renderer:n,init:l}=Wo(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new vr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(vr,"Diagram"),vr),Dc=[],rL=p(()=>{Dc.forEach(e=>{e()}),Dc=[]},"attachFunctions"),iL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function iy(e){const t=e.match(eu);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
307
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),e_=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"),r_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),i_={extension:IS,composition:DS,aggregation:RS,dependency:PS,lollipop:NS,point:qS,circle:WS,cross:zS,barb:HS,barbNeo:YS,only_one:US,zero_or_one:GS,one_or_more:jS,zero_or_more:XS,only_one_neo:VS,zero_or_one_neo:ZS,one_or_more_neo:QS,zero_or_more_neo:KS,requirement_arrow:JS,requirement_contains:e_,requirement_arrow_neo:t_,requirement_contains_neo:r_},s_=OS,a_={common:gs,getConfig:Et,insertCluster:tS,insertEdge:$S,insertEdgeLabel:BS,insertMarkers:s_,insertNode:nm,interpolateToCurve:pl,labelHelper:ut,log:H,positionEdgeLabel:vS},ds={},um=p(e=>{for(const t of e)ds[t.name]=t},"registerLayoutLoaders"),o_=p(()=>{um([{name:"dagre",loader:p(async()=>await mt(()=>import("./dagre-VKFMJZFB.erCsZJb8.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"swimlane",loader:p(async()=>await mt(()=>import("./swimlanes-5IMT3BWC.dfhQuNQg.js"),__vite__mapDeps([6,5,1,2,3])),"loader")},{name:"cose-bilkent",loader:p(async()=>await mt(()=>import("./cose-bilkent-JH36ORCC.Ddhn5b9l.js"),__vite__mapDeps([7,8,5])),"loader")}])},"registerDefaultLayoutLoaders");o_();var xF=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in ds))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const u of e.nodes){const f=u.domId||u.id;u.domId=`${e.diagramId}-${f}`}const i=ds[e.layoutAlgorithm],s=await i.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),n){const u=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,a_,{algorithm:i.algorithm},r)},"render"),bF=p((e="",{fallback:t="dagre"}={})=>{if(e in ds)return e;if(t in ds)return H.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"),Il="comm",dm="rule",fm="decl",n_="@media",l_="@import",h_="@supports",c_="@namespace",En="@keyframes",pm="@layer",u_="@scope",d_=Math.abs,es=String.fromCharCode;function gm(e){return e.trim()}function Mn(e,t,r){return e.replace(t,r)}function ii(e,t){return e.charCodeAt(t)|0}function Si(e,t,r){return e.slice(t,r)}function Oe(e){return e.length}function mm(e){return e.length}function qs(e,t){return t.push(e),e}var Xa=1,_i=1,ym=0,me=0,Dt=0,Fi="";function Dl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Xa,column:_i,length:o,return:"",siblings:n}}function f_(){return Dt}function p_(){return Dt=me>0?ii(Fi,--me):0,_i--,Dt===10&&(_i=1,Xa--),Dt}function Se(){return Dt=me<ym?ii(Fi,me++):0,_i++,Dt===10&&(_i=1,Xa++),Dt}function lr(){return ii(Fi,me)}function Js(){return me}function Va(e,t){return Si(Fi,e,t)}function fs(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 g_(e){return Xa=_i=1,ym=Oe(Fi=e),me=0,[]}function m_(e){return Fi="",e}function Oo(e){return gm(Va(me-1,$n(e===91?e+2:e===40?e+1:e)))}function y_(e){for(;(Dt=lr())&&Dt<33;)Se();return fs(e)>2||fs(Dt)>3?"":" "}function C_(e,t){for(;--t&&Se()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return Va(e,Js()+(t<6&&lr()==32&&Se()==32))}function $n(e){for(;Se();)switch(Dt){case e:return me;case 34:case 39:e!==34&&e!==39&&$n(Dt);break;case 40:e===41&&$n(e);break;case 92:Se();break}return me}function x_(e,t){for(;Se()&&e+Dt!==57;)if(e+Dt===84&&lr()===47)break;return"/*"+Va(t,me-1)+"*"+es(e===47?e:Se())}function b_(e){for(;!fs(lr());)Se();return Va(e,me)}function k_(e){return m_(ta("",null,null,null,[""],e=g_(e),0,[0],e))}function ta(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,f=0,d=0,g=0,y=1,m=1,C=1,b=0,k=0,w="",S=s,_=a,v=i,F=w;m;)switch(g=k,k=Se()){case 40:g!=108&&ii(F,u-1)==58?(b++,F+="("):F+=Oo(k);break;case 41:b--,F+=")";break;case 34:case 39:case 91:F+=Oo(k);break;case 9:case 10:case 13:case 32:if(b>0){F+=es(k);break}F+=y_(g);break;case 92:F+=C_(Js()-1,7);continue;case 47:switch(lr()){case 42:case 47:qs(T_(x_(Se(),Js()),t,r,l),l),(fs(g||1)==5||fs(lr()||1)==5)&&Oe(F)&&Si(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:n[c++]=Oe(F)*C;case 125*y:case 59:case 0:if(b>0&&k){F+=es(k);break}switch(k){case 0:case 125:m=0;case 59+h:C==-1&&(F=Mn(F,/\f/g,"")),d>0&&(Oe(F)-u||y===0)&&qs(d>32?Rc(F+";",i,r,u-1,l):Rc(Mn(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(qs(v=Dc(F,t,r,c,h,s,n,w,S=[],_=[],u,a),a),k===123)if(h===0)ta(F,t,v,v,S,a,u,n,_);else{switch(f){case 99:if(ii(F,3)===110)break;case 108:if(ii(F,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ta(e,v,v,i&&qs(Dc(e,v,v,0,0,s,n,w,s,S=[],u,_),_),s,_,u,n,i?S:_):ta(F,v,v,v,[""],_,0,n,_)}}c=h=d=0,y=C=1,w=F="",u=o;break;case 58:u=1+Oe(F),d=g;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&p_()==125)continue}switch(F+=es(k),k*y){case 38:C=h>0?1:(F+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Oe(F)-1)*C,C=1;break;case 64:lr()===45&&(F+=Oo(Se())),f=lr(),h=u=Oe(w=F+=b_(Js())),k++;break;case 45:g===45&&Oe(F)==2&&(y=0)}}return a}function Dc(e,t,r,i,s,a,o,n,l,c,h,u){for(var f=s-1,d=s===0?a:[""],g=mm(d),y=0,m=0,C=0;y<i;++y)for(var b=0,k=Si(e,f+1,f=d_(m=o[y])),w=e;b<g;++b)(w=gm(m>0?d[b]+" "+k:Mn(k,/&\f/g,d[b])))&&(l[C++]=w);return Dl(e,t,r,s===0?dm:n,l,c,h,u)}function T_(e,t,r,i){return Dl(e,t,r,Il,es(f_()),Si(e,2,-2),0,i)}function Rc(e,t,r,i,s){return Dl(e,t,r,fm,Si(e,0,i),Si(e,i+1,-1),i,s)}function On(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function w_(e,t,r,i){switch(e.type){case pm:if(e.children.length)break;case l_:case c_:case fm:return e.return=e.return||e.value;case Il:return"";case En:return e.return=e.value+"{"+On(e.children,i)+"}";case dm:if(!Oe(e.value=e.props.join(",")))return""}return Oe(r=On(e.children,i))?e.return=e.value+"{"+r+"}":""}function S_(e){var t=mm(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var Cm="c4",__=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),B_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV.WD7qpLTf.js");return{diagram:t}},__vite__mapDeps([9,10,5]));return{id:Cm,diagram:e}},"loader"),v_={id:Cm,detector:__,loader:B_},L_=v_,xm="flowchart",F_=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"),A_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.cnCU0na-.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:xm,diagram:e}},"loader"),E_={id:xm,detector:F_,loader:A_},M_=E_,bm="flowchart-v2",$_=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"),O_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.cnCU0na-.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:bm,diagram:e}},"loader"),I_={id:bm,detector:$_,loader:O_},D_=I_,km="swimlane",R_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),P_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV.CdD0ADbF.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,15,5]));return{id:km,diagram:e}},"loader"),N_={id:km,detector:R_,loader:P_},q_=N_,Tm="er",W_=p(e=>/^\s*erDiagram/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT.BOAH1mBM.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,5]));return{id:Tm,diagram:e}},"loader"),H_={id:Tm,detector:W_,loader:z_},Y_=H_,wm="gitGraph",U_=p(e=>/^\s*gitGraph/.test(e),"detector"),G_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX.WUBTiDD1.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,5]));return{id:wm,diagram:e}},"loader"),j_={id:wm,detector:U_,loader:G_},X_=j_,Sm="gantt",V_=p(e=>/^\s*gantt/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP.CzSToCFq.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,5]));return{id:Sm,diagram:e}},"loader"),Q_={id:Sm,detector:V_,loader:Z_},K_=Q_,_m="info",J_=p(e=>/^\s*info/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U.Bz5y9qpB.js");return{diagram:t}},__vite__mapDeps([26,21,5]));return{id:_m,diagram:e}},"loader"),eB={id:_m,detector:J_,loader:tB},Bm="pie",rB=p(e=>/^\s*pie/.test(e),"detector"),iB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P.CDpZrox4.js");return{diagram:t}},__vite__mapDeps([27,20,21,5,28,29,24]));return{id:Bm,diagram:e}},"loader"),sB={id:Bm,detector:rB,loader:iB},vm="quadrantChart",aB=p(e=>/^\s*quadrantChart/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL.Bz0dhK1l.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,5]));return{id:vm,diagram:e}},"loader"),nB={id:vm,detector:aB,loader:oB},lB=nB,Lm="xychart",hB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG.DDT1UX32.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,5]));return{id:Lm,diagram:e}},"loader"),uB={id:Lm,detector:hB,loader:cB},dB=uB,Fm="requirement",fB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),pB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE.YLD-NuJw.js");return{diagram:t}},__vite__mapDeps([32,13,14,5]));return{id:Fm,diagram:e}},"loader"),gB={id:Fm,detector:fB,loader:pB},mB=gB,Am="sequence",yB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),CB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ.D6E2oY7U.js");return{diagram:t}},__vite__mapDeps([33,19,10,5]));return{id:Am,diagram:e}},"loader"),xB={id:Am,detector:yB,loader:CB},bB=xB,Em="class",kB=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"),TB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ.RsrQkeM_.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,14,10,5]));return{id:Em,diagram:e}},"loader"),wB={id:Em,detector:kB,loader:TB},SB=wB,Mm="classDiagram",_B=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"),BB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH.RsrQkeM_.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,14,10,5]));return{id:Mm,diagram:e}},"loader"),vB={id:Mm,detector:_B,loader:BB},LB=vB,$m="state",FB=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"),AB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC.Cqc4HEHT.js");return{diagram:t}},__vite__mapDeps([37,38,13,14,10,2,4,3,5]));return{id:$m,diagram:e}},"loader"),EB={id:$m,detector:FB,loader:AB},MB=EB,Om="stateDiagram",$B=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"),OB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB.D8rYKDmp.js");return{diagram:t}},__vite__mapDeps([39,38,13,14,10,5]));return{id:Om,diagram:e}},"loader"),IB={id:Om,detector:$B,loader:OB},DB=IB,Im="journey",RB=p(e=>/^\s*journey/.test(e),"detector"),PB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC.BclISEWC.js");return{diagram:t}},__vite__mapDeps([40,12,10,28,5]));return{id:Im,diagram:e}},"loader"),NB={id:Im,detector:RB,loader:PB},qB=NB,WB=p((e,t,r)=>{H.debug(`rendering svg for syntax error
308
+ `);const i=l1(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),uu(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"),Dm={draw:WB},zB=Dm,HB={db:{},renderer:Dm,parser:{parse:p(()=>{},"parse")}},YB=HB,Rm="flowchart-elk",UB=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"),GB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.cnCU0na-.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:Rm,diagram:e}},"loader"),jB={id:Rm,detector:UB,loader:GB},XB=jB,Pm="timeline",VB=p(e=>/^\s*timeline/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6.SOgdni8I.js");return{diagram:t}},__vite__mapDeps([41,28,5]));return{id:Pm,diagram:e}},"loader"),QB={id:Pm,detector:VB,loader:ZB},KB=QB,Nm="mindmap",JB=p(e=>/^\s*mindmap/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C.DeNvpAwd.js");return{diagram:t}},__vite__mapDeps([42,13,14,5]));return{id:Nm,diagram:e}},"loader"),ev={id:Nm,detector:JB,loader:tv},rv=ev,qm="kanban",iv=p(e=>/^\s*kanban/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6.CMwsG4gj.js");return{diagram:t}},__vite__mapDeps([43,12,5]));return{id:qm,diagram:e}},"loader"),av={id:qm,detector:iv,loader:sv},ov=av,Wm="sankey",nv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB.R2uEIhmV.js");return{diagram:t}},__vite__mapDeps([44,29,24,5]));return{id:Wm,diagram:e}},"loader"),hv={id:Wm,detector:nv,loader:lv},cv=hv,zm="packet",uv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH.BRv6nOgk.js");return{diagram:t}},__vite__mapDeps([45,20,21,5]));return{id:zm,diagram:e}},"loader"),fv={id:zm,detector:uv,loader:dv},Hm="radar",pv=p(e=>/^\s*radar-beta/.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY.CDZlR-fM.js");return{diagram:t}},__vite__mapDeps([46,20,21,5]));return{id:Hm,diagram:e}},"loader"),mv={id:Hm,detector:pv,loader:gv},Ym="block",yv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3.C0el4zil.js");return{diagram:t}},__vite__mapDeps([47,12,2,15,5]));return{id:Ym,diagram:e}},"loader"),xv={id:Ym,detector:yv,loader:Cv},bv=xv,Um="treeView",kv=p(e=>/^\s*treeView-beta/.test(e),"detector"),Tv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP.DBS8iZPq.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,5]));return{id:Um,diagram:e}},"loader"),wv={id:Um,detector:kv,loader:Tv},Sv=wv,Gm="architecture",_v=p(e=>/^\s*architecture/.test(e),"detector"),Bv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR.vHAxAkhu.js");return{diagram:t}},__vite__mapDeps([49,20,21,5,8]));return{id:Gm,diagram:e}},"loader"),vv={id:Gm,detector:_v,loader:Bv},Lv=vv,jm="eventmodeling",Fv=p(e=>/^\s*eventmodeling/.test(e),"detector"),Av=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY.B0zbjZsr.js");return{diagram:t}},__vite__mapDeps([50,20,21,5]));return{id:jm,diagram:e}},"loader"),Ev={id:jm,detector:Fv,loader:Av},Mv=Ev,Xm="ishikawa",$v=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T.DX9mwIpB.js");return{diagram:t}},__vite__mapDeps([51,5]));return{id:Xm,diagram:e}},"loader"),Iv={id:Xm,detector:$v,loader:Ov},Vm="venn",Dv=p(e=>/^\s*venn-beta/.test(e),"detector"),Rv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P.BvlXlHJf.js");return{diagram:t}},__vite__mapDeps([52,5]));return{id:Vm,diagram:e}},"loader"),Pv={id:Vm,detector:Dv,loader:Rv},Nv=Pv,Zm="treemap",qv=p(e=>/^\s*treemap/.test(e),"detector"),Wv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW.B4S_wuz1.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,5,25,29,24]));return{id:Zm,diagram:e}},"loader"),zv={id:Zm,detector:qv,loader:Wv},Qm="wardley",Hv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Yv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667.t3t8sFvo.js");return{diagram:t}},__vite__mapDeps([54,20,21,5]));return{id:Qm,diagram:e}},"loader"),Uv={id:Qm,detector:Hv,loader:Yv},Gv=Uv,Km="cynefin",jv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Xv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4.BlUCFIAV.js");return{diagram:t}},__vite__mapDeps([55,20,21,5]));return{id:Km,diagram:e}},"loader"),Vv={id:Km,detector:jv,loader:Xv},Jm="railroad",Zv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Qv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6.C2h0Mxo5.js");return{diagram:t}},__vite__mapDeps([56,57,20,21,5]));return{id:Jm,diagram:e}},"loader"),Kv={id:Jm,detector:Zv,loader:Qv},ty="railroadEbnf",Jv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),tL=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH.z_nUDDWm.js");return{diagram:t}},__vite__mapDeps([58,57,20,21,5]));return{id:ty,diagram:e}},"loader"),eL={id:ty,detector:Jv,loader:tL},ey="railroadAbnf",rL=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),iL=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED.CO3oJlfv.js");return{diagram:t}},__vite__mapDeps([59,57,20,21,5]));return{id:ey,diagram:e}},"loader"),sL={id:ey,detector:rL,loader:iL},ry="railroadPeg",aL=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),oL=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR.D5O5vyDS.js");return{diagram:t}},__vite__mapDeps([60,57,20,21,5]));return{id:ry,diagram:e}},"loader"),nL={id:ry,detector:aL,loader:oL},Pc=!1,Za=p(()=>{Pc||(Pc=!0,aa("error",YB,e=>e.toLowerCase().trim()==="error"),aa("---",{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("---")),No(XB,rv,Lv),No(L_,ov,LB,SB,Y_,K_,eB,sB,mB,bB,q_,D_,M_,KB,X_,DB,MB,qB,lB,cv,fv,dB,bv,Mv,Sv,mv,Iv,zv,Kv,eL,sL,nL,Nv,Gv,Vv))},"addDiagrams"),lL=p(async()=>{H.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Er).map(async([r,{detector:i,loader:s}])=>{if(s)try{Ho(r)}catch{try{const{diagram:a,id:o}=await s();aa(o,a,i)}catch(a){throw H.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Er[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){H.error(`Failed to load ${t.length} external diagrams`);for(const r of t)H.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),hL="graphics-document document";function iy(e,t){e.attr("role",hL),t!==""&&e.attr("aria-roledescription",t)}p(iy,"setA11yDiagramInfo");function sy(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(sy,"addSVGa11yTitleDescription");var Fr,In=(Fr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Et(),s=Pn(t,i);t=mT(t)+`
309
+ `;try{Ho(s)}catch{const u=rC(s);if(!u)throw new au(`Diagram ${s} not found.`);const{id:f,diagram:d}=await u();aa(f,d)}const{db:a,parser:o,renderer:n,init:l}=Ho(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new Fr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Fr,"Diagram"),Fr),Nc=[],cL=p(()=>{Nc.forEach(e=>{e()}),Nc=[]},"attachFunctions"),uL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ay(e){const t=e.match(su);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
306
310
  `).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
307
- `):t[2];let s=f2(i,{schema:d2})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}p(iy,"extractFrontMatter");var sL=p(e=>e.replace(/\r\n?/g,`
308
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),aL=p(e=>{const{text:t,metadata:r}=iy(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),oL=p(e=>{const t=Te.detectInit(e)??{},r=Te.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:eT(e),directive:t}},"processDirectives");function Il(e){const t=sL(e),r=aL(t),i=oL(r.text),s=yl(r.config,i.directive);return e=iL(i.text),{code:e,title:r.title,config:s}}p(Il,"preprocessDiagram");function sy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(sy,"toBase64");var nL=5e4,lL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",hL="sandbox",cL="loose",uL="http://www.w3.org/2000/svg",dL="http://www.w3.org/1999/xlink",fL="http://www.w3.org/1999/xhtml",pL="100%",gL="100%",mL="border:0;margin:0;",yL="margin:0",CL="allow-top-navigation-by-user-activation allow-popups",xL='The "iframe" tag is not supported by your browser.',bL=["foreignobject"],kL=["dominant-baseline"];function Dl(e){const t=Il(e);return ea(),K0(t.config??{}),t}p(Dl,"processAndSetConfigs");async function ay(e,t){Xa();try{const{code:r,config:i}=Dl(e);return{diagramType:(await ny(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(ay,"parse");var Pc=p((e,t,r=[])=>{const i=Vc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),TL=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=ae(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Zh(l.styles)||n.forEach(c=>{r.insertRule(Pc(l.id,c,l.styles),r.cssRules.length)}),Zh(l.textStyles)||r.insertRule(Pc(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=qo(s)+`
311
+ `):t[2];let s=g2(i,{schema:p2})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}p(ay,"extractFrontMatter");var dL=p(e=>e.replace(/\r\n?/g,`
312
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fL=p(e=>{const{text:t,metadata:r}=ay(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),pL=p(e=>{const t=Te.detectInit(e)??{},r=Te.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:iT(e),directive:t}},"processDirectives");function Rl(e){const t=dL(e),r=fL(t),i=pL(r.text),s=xl(r.config,i.directive);return e=uL(i.text),{code:e,title:r.title,config:s}}p(Rl,"preprocessDiagram");function oy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(oy,"toBase64");var gL=5e4,mL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",yL="sandbox",CL="loose",xL="http://www.w3.org/2000/svg",bL="http://www.w3.org/1999/xlink",kL="http://www.w3.org/1999/xhtml",TL="100%",wL="100%",SL="border:0;margin:0;",_L="margin:0",BL="allow-top-navigation-by-user-activation allow-popups",vL='The "iframe" tag is not supported by your browser.',LL=["foreignobject"],FL=["dominant-baseline"];function Pl(e){const t=Rl(e);return ia(),J0(t.config??{}),t}p(Pl,"processAndSetConfigs");async function ny(e,t){Za();try{const{code:r,config:i}=Pl(e);return{diagramType:(await hy(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(ny,"parse");var qc=p((e,t,r=[])=>{const i=Kc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),AL=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=ae(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Kh(l.styles)||n.forEach(c=>{r.insertRule(qc(l.id,c,l.styles),r.cssRules.length)}),Kh(l.textStyles)||r.insertRule(qc(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=zo(s)+`
309
313
  `}else i+=`${e.themeCSS}
310
- `;return i+qo(r)},"createCssStyles"),wL=p((e,t)=>Mn(f_(`${e}{${t}}`),m_([p(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Fn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[JS,e_,dm,i_,"@container","@starting-style"],Fn].includes(i.type)||(H.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=$l))},"addNamespace"),g_])),"compileCSS"),SL=p((e,t,r,i)=>{const s=TL(e,r),a=CC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return wL(i,a)},"createUserStyles"),_L=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=Mr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),BL=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":gL,i=sy(`<body style="${yL}">${e}</body>`);return`<iframe style="width:${pL};height:${r};${mL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${CL}">
311
- ${xL}
312
- </iframe>`},"putIntoIFrame"),Rc=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",uL);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function On(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(On,"sandboxedIframe");var vL=p((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),LL=p(async function(e,t,r){var U,W,O,A,B,$;Xa();const i=Dl(t);t=i.code;const s=Et();H.debug(s),t.length>((s==null?void 0:s.maxTextSize)??nL)&&(t=lL);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=p(()=>{const q=yt(f?n:c).node();q&&"remove"in q&&q.remove()},"removeTempElements");let u=yt(document.body);const f=s.securityLevel===hL,d=s.securityLevel===cL,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=On(yt(r),o);u=yt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=yt(r);Rc(u,e,l,`font-family: ${y}`,dL)}else{if(vL(document,e,l,o),f){const E=On(yt(document.body),o);u=yt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=yt("body");Rc(u,e,l)}let g,m;try{g=await $n.fromText(t,{title:i.title})}catch(E){if(s.suppressErrorRendering)throw h(),E;g=await $n.fromText("error"),m=E}const C=u.select(c).node(),b=g.type,k=C.firstChild,w=k.firstChild,S=(W=(U=g.renderer).getClasses)==null?void 0:W.call(U,t,g),_=SL(s,b,S,a),F=document.createElement("style");F.innerHTML=_,k.insertBefore(F,w);try{await g.renderer.draw(t,e,"11.16.0",g)}catch(E){throw s.suppressErrorRendering?h():OB.draw(t,e,"11.16.0"),E}const v=u.select(`${c} svg`),z=(A=(O=g.db).getAccTitle)==null?void 0:A.call(O),N=($=(B=g.db).getAccDescription)==null?void 0:$.call(B);ly(b,v,z,N),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",fL);let M=u.select(c).node().innerHTML;if(H.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),M=_L(M,f,qe(s.arrowMarkerAbsolute)),f){const E=u.select(c+" svg").node();M=BL(M,E)}else d||(M=gi.sanitize(M,{ADD_TAGS:bL,ADD_ATTR:kL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(rL(),m)throw m;return h(),{diagramType:b,svg:M,bindFunctions:g.db.bindFunctions}},"render");function oy(e={}){var i;const t=Rt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),V0(t),t!=null&&t.theme&&t.theme in Xe?t.themeVariables=Xe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Xe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?X0(t):Zc();In(r.logLevel),Xa()}p(oy,"initialize");var ny=p((e,t={})=>{const{code:r}=Il(e);return $n.fromText(r,t)},"getDiagramFromText");function ly(e,t,r,i){ey(t,e),ry(t,r,i,t.attr("id"))}p(ly,"addA11yInfo");var Or=Object.freeze({render:LL,parse:ay,getDiagramFromText:ny,initialize:oy,getConfig:Et,setConfig:Kc,getSiteConfig:Zc,updateSiteConfig:Z0,reset:p(()=>{ea()},"reset"),globalReset:p(()=>{ea(mi)},"globalReset"),defaultConfig:mi});In(Et().logLevel);ea(Et());var FL=p((e,t,r)=>{H.warn(e),ml(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),hy=p(async function(e={querySelector:".mermaid"}){try{await AL(e)}catch(t){if(ml(t)&&H.error(t.str),ue.parseError&&ue.parseError(t),!e.suppressErrors)throw H.error("Use the suppressErrors option to suppress these errors"),t}},"run"),AL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Or.getConfig();H.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");H.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(H.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Or.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Te.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(H.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=xp(Te.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Te.detectInit(o);h&&H.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await fy(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){FL(u,n,ue.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),cy=p(function(e){Or.initialize(e)},"initialize"),EL=p(async function(e,t,r){H.warn("mermaid.init is deprecated. Please use run instead."),e&&cy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await hy(i)},"init"),ML=p(async(e,{lazyLoad:t=!0}={})=>{Xa(),Po(...e),t===!1&&await tL()},"registerExternalDiagrams"),uy=p(function(){if(ue.startOnLoad){const{startOnLoad:e}=Or.getConfig();e&&ue.run().catch(t=>H.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",uy,!1);var $L=p(function(e){ue.parseError=e},"setParseErrorHandler"),Fa=[],$o=!1,dy=p(async()=>{if(!$o){for($o=!0;Fa.length>0;){const e=Fa.shift();if(e)try{await e()}catch(t){H.error("Error executing queue",t)}}$o=!1}},"executeQueue"),OL=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,o)=>{Or.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;H.error("Error parsing",n),(l=ue.parseError)==null||l.call(ue,n),o(n),i(n)})}),"performCall");Fa.push(s),dy().catch(i)}),"parse"),fy=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((o,n)=>{Or.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;H.error("Error parsing",l),(c=ue.parseError)==null||c.call(ue,l),n(l),s(l)})}),"performCall");Fa.push(a),dy().catch(s)}),"render"),IL=p(()=>Object.keys(Fr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ue={startOnLoad:!0,mermaidAPI:Or,parse:OL,render:fy,init:EL,run:hy,registerExternalDiagrams:ML,registerLayoutLoaders:hm,initialize:cy,parseError:void 0,contentLoaded:uy,setParseErrorHandler:$L,detectType:Dn,registerIconPacks:IT,getRegisteredDiagramsMetadata:IL},DL=ue;/*! Check if previously processed *//*!
314
+ `;return i+zo(r)},"createCssStyles"),EL=p((e,t)=>On(k_(`${e}{${t}}`),S_([p(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===En)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[n_,h_,pm,u_,"@container","@starting-style"],En].includes(i.type)||(H.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Il))},"addNamespace"),w_])),"compileCSS"),ML=p((e,t,r,i)=>{const s=AL(e,r),a=bC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return EL(i,a)},"createUserStyles"),$L=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=Or(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),OL=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":wL,i=oy(`<body style="${_L}">${e}</body>`);return`<iframe style="width:${TL};height:${r};${SL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${BL}">
315
+ ${vL}
316
+ </iframe>`},"putIntoIFrame"),Wc=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",xL);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function Dn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Dn,"sandboxedIframe");var IL=p((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),DL=p(async function(e,t,r){var U,W,O,A,B,$;Za();const i=Pl(t);t=i.code;const s=Et();H.debug(s),t.length>((s==null?void 0:s.maxTextSize)??gL)&&(t=mL);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=p(()=>{const q=yt(f?n:c).node();q&&"remove"in q&&q.remove()},"removeTempElements");let u=yt(document.body);const f=s.securityLevel===yL,d=s.securityLevel===CL,g=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=Dn(yt(r),o);u=yt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=yt(r);Wc(u,e,l,`font-family: ${g}`,bL)}else{if(IL(document,e,l,o),f){const E=Dn(yt(document.body),o);u=yt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=yt("body");Wc(u,e,l)}let y,m;try{y=await In.fromText(t,{title:i.title})}catch(E){if(s.suppressErrorRendering)throw h(),E;y=await In.fromText("error"),m=E}const C=u.select(c).node(),b=y.type,k=C.firstChild,w=k.firstChild,S=(W=(U=y.renderer).getClasses)==null?void 0:W.call(U,t,y),_=ML(s,b,S,a),v=document.createElement("style");v.innerHTML=_,k.insertBefore(v,w);try{await y.renderer.draw(t,e,"11.16.0",y)}catch(E){throw s.suppressErrorRendering?h():zB.draw(t,e,"11.16.0"),E}const F=u.select(`${c} svg`),z=(A=(O=y.db).getAccTitle)==null?void 0:A.call(O),N=($=(B=y.db).getAccDescription)==null?void 0:$.call(B);cy(b,F,z,N),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",kL);let M=u.select(c).node().innerHTML;if(H.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),M=$L(M,f,qe(s.arrowMarkerAbsolute)),f){const E=u.select(c+" svg").node();M=OL(M,E)}else d||(M=Ci.sanitize(M,{ADD_TAGS:LL,ADD_ATTR:FL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(cL(),m)throw m;return h(),{diagramType:b,svg:M,bindFunctions:y.db.bindFunctions}},"render");function ly(e={}){var i;const t=Pt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Q0(t),t!=null&&t.theme&&t.theme in Xe?t.themeVariables=Xe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Xe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Z0(t):Jc();Rn(r.logLevel),Za()}p(ly,"initialize");var hy=p((e,t={})=>{const{code:r}=Rl(e);return In.fromText(r,t)},"getDiagramFromText");function cy(e,t,r,i){iy(t,e),sy(t,r,i,t.attr("id"))}p(cy,"addA11yInfo");var Dr=Object.freeze({render:DL,parse:ny,getDiagramFromText:hy,initialize:ly,getConfig:Et,setConfig:tu,getSiteConfig:Jc,updateSiteConfig:K0,reset:p(()=>{ia()},"reset"),globalReset:p(()=>{ia(xi)},"globalReset"),defaultConfig:xi});Rn(Et().logLevel);ia(Et());var RL=p((e,t,r)=>{H.warn(e),Cl(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"),uy=p(async function(e={querySelector:".mermaid"}){try{await PL(e)}catch(t){if(Cl(t)&&H.error(t.str),ue.parseError&&ue.parseError(t),!e.suppressErrors)throw H.error("Use the suppressErrors option to suppress these errors"),t}},"run"),PL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Dr.getConfig();H.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");H.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(H.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Dr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Te.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(H.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=kp(Te.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Te.detectInit(o);h&&H.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await gy(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){RL(u,n,ue.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),dy=p(function(e){Dr.initialize(e)},"initialize"),NL=p(async function(e,t,r){H.warn("mermaid.init is deprecated. Please use run instead."),e&&dy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await uy(i)},"init"),qL=p(async(e,{lazyLoad:t=!0}={})=>{Za(),No(...e),t===!1&&await lL()},"registerExternalDiagrams"),fy=p(function(){if(ue.startOnLoad){const{startOnLoad:e}=Dr.getConfig();e&&ue.run().catch(t=>H.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",fy,!1);var WL=p(function(e){ue.parseError=e},"setParseErrorHandler"),Ea=[],Io=!1,py=p(async()=>{if(!Io){for(Io=!0;Ea.length>0;){const e=Ea.shift();if(e)try{await e()}catch(t){H.error("Error executing queue",t)}}Io=!1}},"executeQueue"),zL=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,o)=>{Dr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;H.error("Error parsing",n),(l=ue.parseError)==null||l.call(ue,n),o(n),i(n)})}),"performCall");Ea.push(s),py().catch(i)}),"parse"),gy=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((o,n)=>{Dr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;H.error("Error parsing",l),(c=ue.parseError)==null||c.call(ue,l),n(l),s(l)})}),"performCall");Ea.push(a),py().catch(s)}),"render"),HL=p(()=>Object.keys(Er).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ue={startOnLoad:!0,mermaidAPI:Dr,parse:zL,render:gy,init:NL,run:uy,registerExternalDiagrams:qL,registerLayoutLoaders:um,initialize:dy,parseError:void 0,contentLoaded:fy,setParseErrorHandler:WL,detectType:Pn,registerIconPacks:RT,getRegisteredDiagramsMetadata:HL},YL=ue;/*! Check if previously processed *//*!
313
317
  * Wait for document loaded before starting the execution
314
- */const fF=Object.freeze(Object.defineProperty({__proto__:null,default:DL},Symbol.toStringTag,{value:"Module"}));export{ts as $,vC as A,yl as B,De as C,Xc as D,oT as E,o1 as F,jk as G,Vn as H,GL as I,VL as J,Hr as K,qh as L,Nh as M,KL as N,ZL as O,XL as P,YL as Q,UL as R,jL as S,JL as T,pt as U,QL as V,L0 as W,WL as X,f2 as Y,d2 as Z,p as _,kC as a,ze as a$,qL as a0,Na as a1,K2 as a2,nC as a3,nu as a4,gi as a5,bh as a6,Kk as a7,Ko as a8,aT as a9,cl as aA,ll as aB,js as aC,I2 as aD,O2 as aE,$2 as aF,M2 as aG,S2 as aH,Yf as aI,v2 as aJ,w2 as aK,A2 as aL,Uf as aM,B2 as aN,R2 as aO,P2 as aP,D2 as aQ,q2 as aR,N2 as aS,_2 as aT,Gf as aU,E2 as aV,F2 as aW,L2 as aX,jf as aY,fS as aZ,ae as a_,Be as aa,P as ab,R as ac,gC as ad,hu as ae,Gw as af,am as ag,hF as ah,Cs as ai,IT as aj,gl as ak,tt as al,ZS as am,lF as an,cF as ao,oF as ap,it as aq,nF as ar,Cl as as,_S as at,xS as au,CS as av,La as aw,jt as ax,Qt as ay,bw as az,bC as b,Pi as b0,tp as b1,Mr as b2,sp as b3,zc as b4,Xk as b5,NL as b6,$y as b7,Oy as b8,OT as b9,zL as ba,Un as bb,sr as bc,is as bd,$h as be,vb as bf,rt as bg,Wf as bh,he as bi,bb as bj,Yn as bk,wu as bl,gs as bm,Bu as bn,HL as bo,Dy as bp,dS as bq,fF as br,St as c,yt as d,lu as e,Rt as f,wC as g,Ke as h,_e as i,y2 as j,fs as k,H as l,rp as m,ds as n,SC as o,_C as p,xC as q,tF as r,TC as s,lr as t,My as u,dF as v,hT as w,uF as x,Te as y,Et as z};
318
+ */const kF=Object.freeze(Object.defineProperty({__proto__:null,default:YL},Symbol.toStringTag,{value:"Module"}));export{rs as $,FC as A,xl as B,De as C,Qc as D,lT as E,l1 as F,Vk as G,Qn as H,tF as I,iF as J,Ur as K,zh as L,Wh as M,aF as N,sF as O,rF as P,KL as Q,JL as R,eF as S,nF as T,pt as U,oF as V,A0 as W,VL as X,g2 as Y,p2 as Z,p as _,wC as a,ze as a$,XL as a0,Wa as a1,J2 as a2,hC as a3,cu as a4,Ci as a5,Th as a6,Jk as a7,Jo as a8,nT as a9,dl as aA,cl as aB,Vs as aC,R2 as aD,D2 as aE,I2 as aF,O2 as aG,B2 as aH,jf as aI,F2 as aJ,_2 as aK,M2 as aL,Xf as aM,L2 as aN,q2 as aO,N2 as aP,P2 as aQ,z2 as aR,W2 as aS,v2 as aT,Vf as aU,$2 as aV,E2 as aW,A2 as aX,Zf as aY,kS as aZ,ae as a_,Be as aa,R as ab,P as ac,yC as ad,du as ae,tS as af,nm as ag,yF as ah,bs as ai,RT as aj,yl as ak,tt as al,s_ as am,mF as an,CF as ao,pF as ap,it as aq,gF as ar,bl as as,$S as at,vS as au,BS as av,Aa as aw,jt as ax,Kt as ay,Lw as az,TC as b,qi as b0,ip as b1,Or as b2,np as b3,Uc as b4,Zk as b5,jL as b6,Iy as b7,Dy as b8,DT as b9,ZL as ba,jn as bb,ar as bc,as as bd,Ih as be,Fb as bf,rt as bg,Yf as bh,he as bi,Tb as bj,Gn as bk,Bu as bl,ys as bm,Fu as bn,QL as bo,Py as bp,bS as bq,kF as br,_t as c,yt as d,uu as e,Pt as f,_C as g,Qe as h,_e as i,x2 as j,gs as k,H as l,ap as m,ps as n,BC as o,vC as p,kC as q,lF as r,SC as s,hr as t,Oy as u,bF as v,uT as w,xF as x,Te as y,Et as z};