@myagentroam/server 0.14.12 → 0.14.14

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 (507) hide show
  1. package/node_modules/@myagentroam/protocol/package.json +1 -1
  2. package/node_modules/@myagentroam/server-core/package.json +2 -2
  3. package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
  4. package/package.json +5 -5
  5. package/web/THIRD_PARTY_NOTICES.txt +0 -202
  6. package/web/assets/AuditManagementPage-DdSFvSrU.css +1 -0
  7. package/web/assets/AuditManagementPage-xkz11y0T.js +1 -0
  8. package/web/assets/AuthEntryPanel-2RmEvgPK.js +45 -0
  9. package/web/assets/AuthEntryPanel-DRCYZXlp.css +1 -0
  10. package/web/assets/{BusyIndicator-CkmNTzP_.js → BusyIndicator-ioUVqyOU.js} +1 -1
  11. package/web/assets/{CodeFileEditor-Dhbf0aWN.js → CodeFileEditor-CfOJ0R9I.js} +3 -3
  12. package/web/assets/{CodeFileEditor-C1nsen9d.css → CodeFileEditor-DOTdiDdP.css} +1 -1
  13. package/web/assets/ConversationTemplateManagementPage-D7KwZltL.js +1 -0
  14. package/web/assets/ConversationTemplateManagementPage-DYpRP2CZ.css +1 -0
  15. package/web/assets/ConversationTemplateManagementPage-DzPF9J7i.js +1 -0
  16. package/web/assets/ConversationTemplateManagementPage-zmRrOr4L.css +1 -0
  17. package/web/assets/EnterpriseUserManagementPage-AR_Tfq3R.css +1 -0
  18. package/web/assets/EnterpriseUserManagementPage-CEH37Fgt.js +1 -0
  19. package/web/assets/EnvironmentSecretManager-BR4WUysp.css +1 -0
  20. package/web/assets/EnvironmentSecretManager-TN7goLG1.js +1 -0
  21. package/web/assets/FilePreviewLoading-DBHsOXhV.css +1 -0
  22. package/web/assets/FilePreviewLoading-es8YT3AE.js +23 -0
  23. package/web/assets/HtmlPreviewFrame-C-UQP5Kx.js +6 -0
  24. package/web/assets/HtmlPreviewFrame-DgODUBJD.css +1 -0
  25. package/web/assets/LicenseManagementPage-BI4IslV7.js +1 -0
  26. package/web/assets/LicenseManagementPage-DXwm-duU.css +1 -0
  27. package/web/assets/ManagementPagination-BYt4qkTV.js +1 -0
  28. package/web/assets/ManagementPagination-I-9QufQH.css +1 -0
  29. package/web/assets/MarAgentModelManagementPage-BFVlk-4R.css +1 -0
  30. package/web/assets/MarAgentModelManagementPage-C5KQRwZF.js +1 -0
  31. package/web/assets/MarAgentModelManagementPage-CLHwnOlN.css +1 -0
  32. package/web/assets/MarAgentModelManagementPage-COeAewpl.js +1 -0
  33. package/web/assets/MarAlert-Cd9UQ3Nb.js +1 -0
  34. package/web/assets/MarAlert-Rzb0-bOv.css +1 -0
  35. package/web/assets/MarCascader-BtOyCcnf.css +1 -0
  36. package/web/assets/MarCascader-CkPUKKSU.js +1 -0
  37. package/web/assets/MarCheckboxGroup-BeoAUtAX.js +1 -0
  38. package/web/assets/MarCheckboxGroup-DkmFKLjl.css +1 -0
  39. package/web/assets/MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-DkLInv-o.js +1 -0
  40. package/web/assets/MarDatePicker-C4dn1W94.js +1 -0
  41. package/web/assets/MarDatePicker-CPheHWyo.css +1 -0
  42. package/web/assets/MarDescriptionsItem-DZlA06Bs.js +1 -0
  43. package/web/assets/MarDescriptionsItem-Dv4h1Q7h.css +1 -0
  44. package/web/assets/MarFormItem-E1c9DvaF.css +1 -0
  45. package/web/assets/MarFormItem.vue_vue_type_script_setup_true_lang-DR9vLmUF.js +12 -0
  46. package/web/assets/MarInputNumber-C3s8idO0.css +1 -0
  47. package/web/assets/MarInputNumber-Cj9eIAOI.js +1 -0
  48. package/web/assets/MarOptionGroup-kPGjsCsv.css +1 -0
  49. package/web/assets/MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-toYIflmN.js +1 -0
  50. package/web/assets/MarSwitch-CnzyH7nM.js +1 -0
  51. package/web/assets/MarSwitch-D1d-qHkV.css +1 -0
  52. package/web/assets/MarTableColumn-9hG09SCW.css +1 -0
  53. package/web/assets/MarTableColumn.vue_vue_type_script_setup_true_lang-R6PlEya3.js +1 -0
  54. package/web/assets/MarTabs-C9xSpZpp.js +1 -0
  55. package/web/assets/MarTabs-DAlqb7in.css +1 -0
  56. package/web/assets/MarTag-Bqa2l4XX.css +1 -0
  57. package/web/assets/MarTag-DJs119DS.js +1 -0
  58. package/web/assets/MarkdownFilePreview-DbAE_2gM.js +2 -0
  59. package/web/assets/McpDetailsDialog-DDeblEzR.css +1 -0
  60. package/web/assets/McpDetailsDialog-DulmlCuF.js +1 -0
  61. package/web/assets/McpSourceManagementPage-2-l-gwmY.js +1 -0
  62. package/web/assets/McpSourceManagementPage-BoE5DUTk.js +1 -0
  63. package/web/assets/McpSourceManagementPage-DtlKXyoi.css +1 -0
  64. package/web/assets/NodeDetailsDialogs-D18Hc9Si.js +1 -0
  65. package/web/assets/NodeDetailsDialogs-DGvkZsiw.css +1 -0
  66. package/web/assets/NodeManagementPage-DXpkxBRT.js +1 -0
  67. package/web/assets/NodeManagementPage-ygBG-C-u.js +1 -0
  68. package/web/assets/OAuthManagementPage-BX1BaUso.js +2 -0
  69. package/web/assets/OAuthManagementPage-PZThmGZo.css +1 -0
  70. package/web/assets/OrganizationManagementPage-BdKOJAyQ.js +1 -0
  71. package/web/assets/OrganizationManagementPage-CKRrtBnJ.css +1 -0
  72. package/web/assets/RemoteDesktopPage-DRio-7WI.css +1 -0
  73. package/web/assets/RemoteDesktopPage-mtDu_xfs.js +5 -0
  74. package/web/assets/ResourceManagementPanel-DxgpQohB.css +1 -0
  75. package/web/assets/ResourceManagementPanel-S4DxgU7P.css +1 -0
  76. package/web/assets/ResourceManagementPanel-cSwgfMaN.js +2 -0
  77. package/web/assets/ResourceManagementPanel.vue_vue_type_script_setup_true_lang-OE3mC4EM.js +1 -0
  78. package/web/assets/SecretManagementPage-BUNy_q8f.js +1 -0
  79. package/web/assets/SecretManagementPage-CWM35C17.js +1 -0
  80. package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-CkzJvm_3.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-wdkxGSpN.js} +1 -1
  81. package/web/assets/SessionSharePage-C-jdxuqs.js +2 -0
  82. package/web/assets/SessionSharePage-D_egrbL-.css +1 -0
  83. package/web/assets/SettingsContent-1cXlLDfp.js +1 -0
  84. package/web/assets/SettingsContent-BGPfO8se.css +1 -0
  85. package/web/assets/SettingsContent-BtSX-IJ7.js +1 -0
  86. package/web/assets/SettingsContent-DnSL8cs4.css +1 -0
  87. package/web/assets/SkillCenterPage-BWZ1Kuwk.js +1 -0
  88. package/web/assets/SkillCenterPage-CCisqDWN.js +1 -0
  89. package/web/assets/SkillCenterPage-CyQmlEB4.css +1 -0
  90. package/web/assets/SkillDetailsDialog-C0_4_KU4.js +1 -0
  91. package/web/assets/SkillDetailsDialog-CLwwbvCq.css +1 -0
  92. package/web/assets/SkillSourceManagementPage-ToB4Wi7G.js +1 -0
  93. package/web/assets/SkillSourceManagementPage-hmRcmngS.css +1 -0
  94. package/web/assets/SkillSourceManagementPage-pUo-KVhP.js +1 -0
  95. package/web/assets/{StandaloneFilePreviewPage-C0MQvJCM.css → StandaloneFilePreviewPage-ByAe63vc.css} +1 -1
  96. package/web/assets/StandaloneFilePreviewPage-DES3Vief.js +1 -0
  97. package/web/assets/SystemConfigurationPage-BVl0Q1mw.js +1 -0
  98. package/web/assets/SystemConfigurationPage-CQ6u7UgX.js +1 -0
  99. package/web/assets/SystemConfigurationPage-CmVdXe_T.css +1 -0
  100. package/web/assets/SystemInformationPage-BbiC_REW.css +1 -0
  101. package/web/assets/SystemInformationPage-DdPjIXMo.js +1 -0
  102. package/web/assets/{TerminalTabView-CNTFZaQR.css → TerminalTabView-CEYeT8xN.css} +1 -1
  103. package/web/assets/{TerminalTabView-xpKPeDb7.js → TerminalTabView-CnuEt3ND.js} +13 -13
  104. package/web/assets/WorkbenchPage-CorQjhSF.css +1 -0
  105. package/web/assets/WorkbenchPage-CyEI3Yln.js +22 -0
  106. package/web/assets/WorkspaceManagementPage-Cdk7zUmV.js +1 -0
  107. package/web/assets/WorkspaceManagementPage-CgLA0Tb-.js +1 -0
  108. package/web/assets/abnfDiagram-VCTEODGH-DktdKdMP.js +1 -0
  109. package/web/assets/{arc-CJOYSigO.js → arc-DYfzA9yu.js} +1 -1
  110. package/web/assets/architectureDiagram-5GKGNRK7-CskxB0k3.js +36 -0
  111. package/web/assets/{blockDiagram-OSKFZWR5-Dr6fQmIN.js → blockDiagram-OSKFZWR5-Xpyuk_R_.js} +2 -2
  112. package/web/assets/{c4Diagram-7LVT6UL2-jrqjerIx.js → c4Diagram-7LVT6UL2-BdBrdIh7.js} +2 -2
  113. package/web/assets/{catalog-ownership-service-Bz3b5_tH.js → catalog-ownership-service-DQLCHjkb.js} +1 -1
  114. package/web/assets/{catalog-page-service-C7UJzBmm.js → catalog-page-service-DfBXj8UO.js} +1 -1
  115. package/web/assets/channel-SICih3KJ.js +1 -0
  116. package/web/assets/{chunk-2Q5K7J3B-B29-7eTI.js → chunk-2Q5K7J3B-DMWOmjwT.js} +1 -1
  117. package/web/assets/{chunk-5VM5RSS4-PAl2dCY6.js → chunk-5VM5RSS4-RNe_7tdZ.js} +1 -1
  118. package/web/assets/{chunk-F27PBJKO-CJazVc92.js → chunk-F27PBJKO-DBTemRQp.js} +1 -1
  119. package/web/assets/{chunk-HLEWEB6X-CHLSCk4e.js → chunk-HLEWEB6X-Bvz-ooi6.js} +1 -1
  120. package/web/assets/{chunk-JWPE2WC7-8EHrQSbL.js → chunk-JWPE2WC7-BLZTbN2h.js} +1 -1
  121. package/web/assets/{chunk-POPQ4Y6H-IEdv-dKV.js → chunk-POPQ4Y6H-BX4VA4e8.js} +1 -1
  122. package/web/assets/{chunk-SVP7TREG-DDTfCf13.js → chunk-SVP7TREG-xT5KSFIv.js} +1 -1
  123. package/web/assets/{chunk-XXDRQBXY-CD0m8obf.js → chunk-XXDRQBXY-d6EOJo4n.js} +1 -1
  124. package/web/assets/{chunk-ZLD2IHE6-DSvSebI_.js → chunk-ZLD2IHE6-NM2ziQWG.js} +1 -1
  125. package/web/assets/classDiagram-CYGNFDIV-BJhEPuc7.js +1 -0
  126. package/web/assets/classDiagram-v2-TLXNO2FR-BJhEPuc7.js +1 -0
  127. package/web/assets/{conversation-history-DuDY2dxA.js → conversation-history-Cfjf31Eh.js} +3 -3
  128. package/web/assets/cose-bilkent-JH36ORCC-D7vpaSiq.js +1 -0
  129. package/web/assets/{cynefin-OW5HDTMX-CXjdl3AE.js → cynefin-OW5HDTMX-CRlsUX-V.js} +1 -1
  130. package/web/assets/cynefinDiagram-5FMLGOSQ-C0zvJdmJ.js +62 -0
  131. package/web/assets/{dagre-OS7QT2EB-98Qq0zkD.js → dagre-OS7QT2EB-llnyjObi.js} +2 -2
  132. package/web/assets/{diagram-S7CK7UJ4-iRjRsXyq.js → diagram-S7CK7UJ4-2JgAYCu_.js} +6 -6
  133. package/web/assets/diagram-UQ7AKVKN-Cecsm_uW.js +41 -0
  134. package/web/assets/{diagram-VSXAHHWV-DM2XbVde.js → diagram-VSXAHHWV-C3VSImZi.js} +2 -2
  135. package/web/assets/diagram-VX7I27RA-B_-1XPN_.js +24 -0
  136. package/web/assets/diagram-Z3DM3KII-Dad6nlKG.js +24 -0
  137. package/web/assets/ebnfDiagram-PWID7BFC-C7uocL5X.js +1 -0
  138. package/web/assets/{enterprise-management-service-BHgkHcmJ.js → enterprise-management-service-D6TGnQqg.js} +1 -1
  139. package/web/assets/{erDiagram-2YWLMYGG-D9UJiA3b.js → erDiagram-2YWLMYGG-sYj25Lh-.js} +2 -2
  140. package/web/assets/{error-presentation-TCrmKOaX.js → error-presentation-zku4f4Na.js} +1 -1
  141. package/web/assets/{flowDiagram-T62WH6J4-CJvzSJaH.js → flowDiagram-T62WH6J4-BYrJI8qA.js} +5 -5
  142. package/web/assets/ganttDiagram-EL5Y4UJY-CbbM1HWv.js +292 -0
  143. package/web/assets/gitGraphDiagram-WWUBYQGX-CmMsWWvP.js +106 -0
  144. package/web/assets/{hosted-conversation-template-client-CNJ44FK9.js → hosted-conversation-template-client-JIui_x4a.js} +1 -1
  145. package/web/assets/{index-B6vk7eXL.js → index-9AFvDAsj.js} +1 -1
  146. package/web/assets/{index-Def4tYlg.js → index-9xW5hIzI.js} +1 -1
  147. package/web/assets/{index-qFUEtE8-.js → index-BAp4jQ2P.js} +1 -1
  148. package/web/assets/{index-CGxeygqm.js → index-BAy8GZSy.js} +1 -1
  149. package/web/assets/{index-CEdb0cRx.js → index-BQBtWzmd.js} +1 -1
  150. package/web/assets/{index-CQWrnAU7.js → index-B_C8LZPz.js} +1 -1
  151. package/web/assets/{index-D2fACDBd.js → index-BcTFR7dB.js} +1 -1
  152. package/web/assets/{index-CHCplQFI.js → index-BsynB1QZ.js} +1 -1
  153. package/web/assets/{index-DDwc_rac.js → index-C2gk6wUR.js} +1 -1
  154. package/web/assets/{index-CDugyaEp.js → index-C34cxK_p.js} +1 -1
  155. package/web/assets/{index-ZS3XNvKT.js → index-CC2XNQF9.js} +1 -1
  156. package/web/assets/index-COk3Og3A.css +1 -0
  157. package/web/assets/{index-yKnI2qbx.js → index-CW9KiHI3.js} +1 -1
  158. package/web/assets/index-CXYo0aZg.js +24 -0
  159. package/web/assets/{index-101FfQe_.js → index-CY5_MaD9.js} +1 -1
  160. package/web/assets/{index-CesBEm8X.js → index-CbndX7Cm.js} +1 -1
  161. package/web/assets/{index-DygkBwem.js → index-Cqwwldhn.js} +1 -1
  162. package/web/assets/{index-BMDj0X1f.js → index-CxINOeGi.js} +1 -1
  163. package/web/assets/{index-BDkVrSCu.js → index-D2CBJtpC.js} +1 -1
  164. package/web/assets/{index-DS00bsI_.js → index-DCjNcqOd.js} +1 -1
  165. package/web/assets/{index-C0U4_RfA.js → index-DH2DgA88.js} +1 -1
  166. package/web/assets/{index-CLfvK8Zc.js → index-DO-vPiJ-.js} +1 -1
  167. package/web/assets/{index-ChD8URmP.js → index-DOdM1hrk.js} +1 -1
  168. package/web/assets/{index--P_l2hBG.js → index-DOwk78qo.js} +1 -1
  169. package/web/assets/{index-TjEslssr.js → index-EfVODvAX.js} +1 -1
  170. package/web/assets/{index-BvyWDyCo.js → index-WVUYMZGr.js} +5 -5
  171. package/web/assets/{index-ZOsm52g4.js → index-rmLuGZaC.js} +1 -1
  172. package/web/assets/{index-fVYtCZY4.js → index-ycWuqeba.js} +1 -1
  173. package/web/assets/infoDiagram-FKFFQAWI-CMUxwVCy.js +2 -0
  174. package/web/assets/{ishikawaDiagram-5VMMS53U-Cpmxihq8.js → ishikawaDiagram-5VMMS53U-CgePNWLO.js} +6 -6
  175. package/web/assets/{journeyDiagram-EYS64GPL-BAZxxKR_.js → journeyDiagram-EYS64GPL-cgUNryqu.js} +4 -4
  176. package/web/assets/{kanban-definition-UXKFOSKX-_vYotbgl.js → kanban-definition-UXKFOSKX-D4aobA2-.js} +2 -2
  177. package/web/assets/layout-BjqRkOqP.js +1 -0
  178. package/web/assets/{linear-DQoI-VQC.js → linear-BB8qFJdD.js} +1 -1
  179. package/web/assets/management-url-service-BgjJY2L9.js +1 -0
  180. package/web/assets/mcp-center-service-CzwAD1yH.js +1 -0
  181. package/web/assets/mcp-center-service-DaswFG-J.css +1 -0
  182. package/web/assets/mermaid.core-CQKmvtuY.js +308 -0
  183. package/web/assets/{mindmap-definition-THT77NOG-BExnUzDC.js → mindmap-definition-THT77NOG-0gbaRj3X.js} +2 -2
  184. package/web/assets/mobile-dialog-return-service-B9Umx6Ja.js +1 -0
  185. package/web/assets/{oauth-callback-CtodvLDd.js → oauth-callback-0bvLvnZ5.js} +1 -1
  186. package/web/assets/pegDiagram-XKGWAZYB-6IaijsHn.js +1 -0
  187. package/web/assets/{pieDiagram-E7YTZNPT-CMRcyI7O.js → pieDiagram-E7YTZNPT-BDwpnpAN.js} +2 -2
  188. package/web/assets/{quadrantDiagram-AXDQQJYC-hOWMoCpb.js → quadrantDiagram-AXDQQJYC-DTHbaV_E.js} +2 -2
  189. package/web/assets/railroadDiagram-O6MQD6OU-Bu9b0Olt.js +1 -0
  190. package/web/assets/{requirementDiagram-IS5BZ75X-CXe-Ctnb.js → requirementDiagram-IS5BZ75X-DAklrryn.js} +9 -9
  191. package/web/assets/{runner-presentation-CNGxIy2N.js → runner-presentation-C-cTPbeM.js} +1 -1
  192. package/web/assets/sankeyDiagram-P5KCCOFB-DgNah1hF.js +40 -0
  193. package/web/assets/{sequenceDiagram-WJ2MYXX4-DQ5T7b6S.js → sequenceDiagram-WJ2MYXX4-DDsyMCfI.js} +2 -2
  194. package/web/assets/{session-share-client-service-BbWGDu98.js → session-share-client-service-bdoizmjD.js} +1 -1
  195. package/web/assets/sizeCapture-INFHLROL-B1euY0bk.js +1 -0
  196. package/web/assets/stateDiagram-XQSTLZYL-CwjTbB_i.js +1 -0
  197. package/web/assets/stateDiagram-v2-IH3M54BS-CAAuya7O.js +1 -0
  198. package/web/assets/swimlanes-V6O3JKXN-VuD7hpBC.js +1 -0
  199. package/web/assets/swimlanesDiagram-JKAHXJPX-CNf6ouPi.js +8 -0
  200. package/web/assets/{time-presentation-Q05oEf0I.js → time-presentation-BZYgfA5o.js} +1 -1
  201. package/web/assets/{timeline-definition-24CTP7MA-C5ehmNql.js → timeline-definition-24CTP7MA-D_V_tYRM.js} +2 -2
  202. package/web/assets/{vennDiagram-4TSXK5OY-CJhBecmB.js → vennDiagram-4TSXK5OY-jshUno_M.js} +2 -2
  203. package/web/assets/{wardleyDiagram-VM6X3IG4-DNyTsJz4.js → wardleyDiagram-VM6X3IG4-DZHVP425.js} +3 -3
  204. package/web/assets/{workbench-live-service-Dn0AH63S.js → workbench-live-service-O2xlmfOF.js} +1 -1
  205. package/web/assets/workbench-presentation-Bon-njr-.css +1 -0
  206. package/web/assets/workbench-presentation-CV7WEE4p.js +1 -0
  207. package/web/assets/{xychartDiagram-S5SC5T6Z-BEfVfpB4.js → xychartDiagram-S5SC5T6Z-C7Rgv3Ly.js} +2 -2
  208. package/web/docs/404.html +2 -2
  209. package/web/docs/administration/account.html +3 -3
  210. package/web/docs/administration/audit.html +3 -3
  211. package/web/docs/administration/conversation-templates.html +3 -3
  212. package/web/docs/administration/email-notifications.html +3 -3
  213. package/web/docs/administration/license.html +3 -3
  214. package/web/docs/administration/nodes-workspaces.html +3 -3
  215. package/web/docs/administration/oauth.html +3 -3
  216. package/web/docs/administration/secrets.html +3 -3
  217. package/web/docs/administration/template-workspace-maintenance.html +3 -3
  218. package/web/docs/administration/users-organizations.html +3 -3
  219. package/web/docs/assets/{app.Cr_dPl0w.js → app.D6T8f4Xi.js} +1 -1
  220. package/web/docs/assets/chunks/@localSearchIndexen-US.C3JXCVRL.js +1 -0
  221. package/web/docs/assets/chunks/@localSearchIndexroot.B5rZAuDE.js +1 -0
  222. package/web/docs/assets/chunks/{VPLocalSearchBox.BIc6urzt.js → VPLocalSearchBox.BY8dAd2K.js} +1 -1
  223. package/web/docs/assets/chunks/{theme.CZ7eII5y.js → theme.CwBg9EXL.js} +2 -2
  224. package/web/docs/assets/en-US_runners_runner-troubleshooting.md.BVp1H8Ez.js +1 -0
  225. package/web/docs/assets/{en-US_runners_runner-troubleshooting.md.BvJ6yGrw.lean.js → en-US_runners_runner-troubleshooting.md.BVp1H8Ez.lean.js} +1 -1
  226. package/web/docs/assets/runners_runner-troubleshooting.md.x-gG5ZND.js +1 -0
  227. package/web/docs/assets/{runners_runner-troubleshooting.md.CIWCfGkf.lean.js → runners_runner-troubleshooting.md.x-gG5ZND.lean.js} +1 -1
  228. package/web/docs/concepts/architecture.html +3 -3
  229. package/web/docs/concepts/data-and-security.html +3 -3
  230. package/web/docs/concepts/files-git-terminal.html +3 -3
  231. package/web/docs/concepts/node-and-workspace.html +3 -3
  232. package/web/docs/concepts/permissions-and-sharing.html +3 -3
  233. package/web/docs/concepts/runner-control.html +3 -3
  234. package/web/docs/concepts/secrets.html +3 -3
  235. package/web/docs/concepts/session-run-turn.html +3 -3
  236. package/web/docs/deployment/backup-restore.html +3 -3
  237. package/web/docs/deployment/network.html +3 -3
  238. package/web/docs/deployment/node-installation.html +3 -3
  239. package/web/docs/deployment/node-linux.html +3 -3
  240. package/web/docs/deployment/node-macos.html +3 -3
  241. package/web/docs/deployment/node-windows.html +3 -3
  242. package/web/docs/deployment/production.html +3 -3
  243. package/web/docs/deployment/security-checklist.html +3 -3
  244. package/web/docs/deployment/upgrade.html +3 -3
  245. package/web/docs/en-US/administration/account.html +3 -3
  246. package/web/docs/en-US/administration/audit.html +3 -3
  247. package/web/docs/en-US/administration/conversation-templates.html +3 -3
  248. package/web/docs/en-US/administration/email-notifications.html +3 -3
  249. package/web/docs/en-US/administration/license.html +3 -3
  250. package/web/docs/en-US/administration/nodes-workspaces.html +3 -3
  251. package/web/docs/en-US/administration/oauth.html +3 -3
  252. package/web/docs/en-US/administration/secrets.html +3 -3
  253. package/web/docs/en-US/administration/template-workspace-maintenance.html +3 -3
  254. package/web/docs/en-US/administration/users-organizations.html +3 -3
  255. package/web/docs/en-US/concepts/architecture.html +3 -3
  256. package/web/docs/en-US/concepts/data-and-security.html +3 -3
  257. package/web/docs/en-US/concepts/files-git-terminal.html +3 -3
  258. package/web/docs/en-US/concepts/node-and-workspace.html +3 -3
  259. package/web/docs/en-US/concepts/permissions-and-sharing.html +3 -3
  260. package/web/docs/en-US/concepts/runner-control.html +3 -3
  261. package/web/docs/en-US/concepts/secrets.html +3 -3
  262. package/web/docs/en-US/concepts/session-run-turn.html +3 -3
  263. package/web/docs/en-US/deployment/backup-restore.html +3 -3
  264. package/web/docs/en-US/deployment/network.html +3 -3
  265. package/web/docs/en-US/deployment/node-installation.html +3 -3
  266. package/web/docs/en-US/deployment/node-linux.html +3 -3
  267. package/web/docs/en-US/deployment/node-macos.html +3 -3
  268. package/web/docs/en-US/deployment/node-windows.html +3 -3
  269. package/web/docs/en-US/deployment/production.html +3 -3
  270. package/web/docs/en-US/deployment/security-checklist.html +3 -3
  271. package/web/docs/en-US/deployment/upgrade.html +3 -3
  272. package/web/docs/en-US/getting-started/connect-node.html +3 -3
  273. package/web/docs/en-US/getting-started/first-agent-session.html +3 -3
  274. package/web/docs/en-US/getting-started/first-login.html +3 -3
  275. package/web/docs/en-US/getting-started/next-steps.html +3 -3
  276. package/web/docs/en-US/getting-started/npm-quick-start.html +3 -3
  277. package/web/docs/en-US/getting-started/overview.html +3 -3
  278. package/web/docs/en-US/getting-started/prerequisites.html +3 -3
  279. package/web/docs/en-US/getting-started/register-workspace.html +3 -3
  280. package/web/docs/en-US/getting-started/server-installation.html +3 -3
  281. package/web/docs/en-US/operations/marctl.html +3 -3
  282. package/web/docs/en-US/reference/configuration.html +3 -3
  283. package/web/docs/en-US/reference/keyboard-shortcuts.html +3 -3
  284. package/web/docs/en-US/reference/limits.html +3 -3
  285. package/web/docs/en-US/reference/ports-paths-data.html +3 -3
  286. package/web/docs/en-US/reference/status-and-errors.html +3 -3
  287. package/web/docs/en-US/runners/claude-code.html +3 -3
  288. package/web/docs/en-US/runners/codex.html +3 -3
  289. package/web/docs/en-US/runners/mar-agent.html +3 -3
  290. package/web/docs/en-US/runners/opencode.html +3 -3
  291. package/web/docs/en-US/runners/overview.html +3 -3
  292. package/web/docs/en-US/runners/runner-troubleshooting.html +5 -5
  293. package/web/docs/en-US/troubleshooting/node-offline.html +3 -3
  294. package/web/docs/en-US/troubleshooting/quick-diagnosis.html +3 -3
  295. package/web/docs/en-US/troubleshooting/session-run.html +3 -3
  296. package/web/docs/en-US/troubleshooting/terminal.html +3 -3
  297. package/web/docs/en-US/troubleshooting/workspace-files.html +3 -3
  298. package/web/docs/en-US/workbench/composer.html +3 -3
  299. package/web/docs/en-US/workbench/context-and-plan.html +3 -3
  300. package/web/docs/en-US/workbench/conversation.html +3 -3
  301. package/web/docs/en-US/workbench/file-reference-and-attachment.html +3 -3
  302. package/web/docs/en-US/workbench/files.html +3 -3
  303. package/web/docs/en-US/workbench/git-changes.html +3 -3
  304. package/web/docs/en-US/workbench/git-history.html +3 -3
  305. package/web/docs/en-US/workbench/hosted-conversations.html +3 -3
  306. package/web/docs/en-US/workbench/mobile.html +3 -3
  307. package/web/docs/en-US/workbench/navigation.html +3 -3
  308. package/web/docs/en-US/workbench/remote-desktop.html +3 -3
  309. package/web/docs/en-US/workbench/sessions.html +3 -3
  310. package/web/docs/en-US/workbench/skills.html +3 -3
  311. package/web/docs/en-US/workbench/terminal.html +3 -3
  312. package/web/docs/getting-started/connect-node.html +3 -3
  313. package/web/docs/getting-started/first-agent-session.html +3 -3
  314. package/web/docs/getting-started/first-login.html +3 -3
  315. package/web/docs/getting-started/next-steps.html +3 -3
  316. package/web/docs/getting-started/npm-quick-start.html +3 -3
  317. package/web/docs/getting-started/overview.html +3 -3
  318. package/web/docs/getting-started/prerequisites.html +3 -3
  319. package/web/docs/getting-started/register-workspace.html +3 -3
  320. package/web/docs/getting-started/server-installation.html +3 -3
  321. package/web/docs/hashmap.json +1 -1
  322. package/web/docs/operations/marctl.html +3 -3
  323. package/web/docs/reference/configuration.html +3 -3
  324. package/web/docs/reference/keyboard-shortcuts.html +3 -3
  325. package/web/docs/reference/limits.html +3 -3
  326. package/web/docs/reference/ports-paths-data.html +3 -3
  327. package/web/docs/reference/status-and-errors.html +3 -3
  328. package/web/docs/runners/claude-code.html +3 -3
  329. package/web/docs/runners/codex.html +3 -3
  330. package/web/docs/runners/mar-agent.html +3 -3
  331. package/web/docs/runners/opencode.html +3 -3
  332. package/web/docs/runners/overview.html +3 -3
  333. package/web/docs/runners/runner-troubleshooting.html +5 -5
  334. package/web/docs/troubleshooting/node-offline.html +3 -3
  335. package/web/docs/troubleshooting/quick-diagnosis.html +3 -3
  336. package/web/docs/troubleshooting/session-run.html +3 -3
  337. package/web/docs/troubleshooting/terminal.html +3 -3
  338. package/web/docs/troubleshooting/workspace-files.html +3 -3
  339. package/web/docs/workbench/composer.html +3 -3
  340. package/web/docs/workbench/context-and-plan.html +3 -3
  341. package/web/docs/workbench/conversation.html +3 -3
  342. package/web/docs/workbench/file-reference-and-attachment.html +3 -3
  343. package/web/docs/workbench/files.html +3 -3
  344. package/web/docs/workbench/git-changes.html +3 -3
  345. package/web/docs/workbench/git-history.html +3 -3
  346. package/web/docs/workbench/hosted-conversations.html +3 -3
  347. package/web/docs/workbench/mobile.html +3 -3
  348. package/web/docs/workbench/navigation.html +3 -3
  349. package/web/docs/workbench/remote-desktop.html +3 -3
  350. package/web/docs/workbench/sessions.html +3 -3
  351. package/web/docs/workbench/skills.html +3 -3
  352. package/web/docs/workbench/terminal.html +3 -3
  353. package/web/index.html +3 -3
  354. package/web/service-worker.js +1 -1
  355. package/web/web-version.json +1 -1
  356. package/web/assets/AuditManagementPage-B3qaapei.js +0 -1
  357. package/web/assets/AuditManagementPage-CCT1TwDi.css +0 -1
  358. package/web/assets/AuthEntryPanel-CGpUcF54.js +0 -45
  359. package/web/assets/AuthEntryPanel-tmwbR_cP.css +0 -1
  360. package/web/assets/ConversationTemplateManagementPage-B2RfZm3F.js +0 -1
  361. package/web/assets/ConversationTemplateManagementPage-BNFnQcXK.css +0 -1
  362. package/web/assets/ConversationTemplateManagementPage-CMyqaCIy.js +0 -1
  363. package/web/assets/ConversationTemplateManagementPage-D9ensD8p.css +0 -1
  364. package/web/assets/EnterpriseUserManagementPage-B_8q9-_0.js +0 -1
  365. package/web/assets/EnterpriseUserManagementPage-DPqV5zOg.css +0 -1
  366. package/web/assets/EnvironmentSecretManager-CQ4Jq2g7.js +0 -1
  367. package/web/assets/EnvironmentSecretManager-Dw4d5loZ.css +0 -1
  368. package/web/assets/FilePreviewLoading-BB7BqLfM.js +0 -23
  369. package/web/assets/FilePreviewLoading-Cxn0bDjD.css +0 -1
  370. package/web/assets/HtmlPreviewFrame-BpZTgaYt.css +0 -1
  371. package/web/assets/HtmlPreviewFrame-BsPyA31z.js +0 -6
  372. package/web/assets/LicenseManagementPage-BRQZUU16.css +0 -1
  373. package/web/assets/LicenseManagementPage-COaC6G8o.js +0 -1
  374. package/web/assets/ManagementPagination-DazknMFC.css +0 -1
  375. package/web/assets/ManagementPagination-mp7u62Ec.js +0 -1
  376. package/web/assets/MarAgentModelManagementPage-DuXtnpsD.css +0 -1
  377. package/web/assets/MarAgentModelManagementPage-Dw26mlsY.js +0 -1
  378. package/web/assets/MarAgentModelManagementPage-O5io0Qw1.css +0 -1
  379. package/web/assets/MarAgentModelManagementPage-e_RH6zU7.js +0 -1
  380. package/web/assets/MarIcon-aPIFZI-D.css +0 -1
  381. package/web/assets/MarIcon-zRNKNNWm.js +0 -1
  382. package/web/assets/MarkdownFilePreview-Da9aknEg.js +0 -2
  383. package/web/assets/McpDetailsDialog-BQywxEJx.css +0 -1
  384. package/web/assets/McpDetailsDialog-KPf2HtVb.js +0 -1
  385. package/web/assets/McpSourceManagementPage-BH743WCr.css +0 -1
  386. package/web/assets/McpSourceManagementPage-BTS25Df_.js +0 -1
  387. package/web/assets/McpSourceManagementPage-BcHmBG_c.js +0 -1
  388. package/web/assets/NodeDetailsDialogs-D0O-Bpe_.js +0 -6
  389. package/web/assets/NodeDetailsDialogs-DN4NQ6QY.css +0 -1
  390. package/web/assets/NodeManagementPage-B7kPJ2vk.js +0 -1
  391. package/web/assets/NodeManagementPage-s9HFmyHE.js +0 -1
  392. package/web/assets/OAuthManagementPage-D_avaUqp.js +0 -2
  393. package/web/assets/OAuthManagementPage-Dp2FX_G6.css +0 -1
  394. package/web/assets/OrganizationManagementPage-BYl2Zu-Z.css +0 -1
  395. package/web/assets/OrganizationManagementPage-C-eQ-t8b.js +0 -1
  396. package/web/assets/RemoteDesktopPage-C8coI4Gr.js +0 -5
  397. package/web/assets/RemoteDesktopPage-CBJ5tTYz.css +0 -1
  398. package/web/assets/ResourceManagementPanel-CjGfQ5Jl.css +0 -1
  399. package/web/assets/ResourceManagementPanel-Dk-l51CQ.css +0 -1
  400. package/web/assets/ResourceManagementPanel-LGznQG16.js +0 -2
  401. package/web/assets/ResourceManagementPanel.vue_vue_type_script_setup_true_lang-B0A9Rmyq.js +0 -1
  402. package/web/assets/SecretManagementPage-BHo73jaj.js +0 -1
  403. package/web/assets/SecretManagementPage-BrG14qmP.js +0 -1
  404. package/web/assets/SessionSharePage-DNzDO88Q.js +0 -2
  405. package/web/assets/SessionSharePage-TAsoyhjA.css +0 -1
  406. package/web/assets/SettingsContent-B98WZKeX.css +0 -1
  407. package/web/assets/SettingsContent-BYvS1xq7.js +0 -1
  408. package/web/assets/SettingsContent-CNbyIUPh.css +0 -1
  409. package/web/assets/SettingsContent-DKC_XhLh.js +0 -1
  410. package/web/assets/SkillCenterPage-B6woSHOS.css +0 -1
  411. package/web/assets/SkillCenterPage-B7OEhY6b.js +0 -1
  412. package/web/assets/SkillCenterPage-Dhz0dHwK.js +0 -1
  413. package/web/assets/SkillDetailsDialog-CWt4SchU.css +0 -1
  414. package/web/assets/SkillDetailsDialog-D-DoHn_C.js +0 -1
  415. package/web/assets/SkillSourceManagementPage-BRfmUgj1.css +0 -1
  416. package/web/assets/SkillSourceManagementPage-BWDkcehO.js +0 -1
  417. package/web/assets/SkillSourceManagementPage-DqyDTa-I.js +0 -1
  418. package/web/assets/StandaloneFilePreviewPage-ZfXXGhOn.js +0 -1
  419. package/web/assets/SystemConfigurationPage-B7mQ6Vnn.js +0 -1
  420. package/web/assets/SystemConfigurationPage-CmKl8RM3.js +0 -1
  421. package/web/assets/SystemConfigurationPage-HVB1OG86.css +0 -1
  422. package/web/assets/SystemInformationPage-C9qhYKmf.css +0 -1
  423. package/web/assets/SystemInformationPage-Ccr_-doz.js +0 -1
  424. package/web/assets/WorkbenchPage-0Y0Aha-6.css +0 -1
  425. package/web/assets/WorkbenchPage-D89Xu7zc.js +0 -22
  426. package/web/assets/WorkspaceManagementPage-3mKy2VBS.js +0 -1
  427. package/web/assets/WorkspaceManagementPage-DQq7JqhI.js +0 -1
  428. package/web/assets/_baseFindIndex-D7XfJLKM.js +0 -1
  429. package/web/assets/_baseIteratee-BBpnSKUD.js +0 -1
  430. package/web/assets/abnfDiagram-VCTEODGH-DWmupz8z.js +0 -1
  431. package/web/assets/advancedFormat-mPncmCfy.js +0 -1
  432. package/web/assets/architectureDiagram-5GKGNRK7-DAHpP5xc.js +0 -36
  433. package/web/assets/channel-vb08qcED.js +0 -1
  434. package/web/assets/classDiagram-CYGNFDIV-DZ1oAWcg.js +0 -1
  435. package/web/assets/classDiagram-v2-TLXNO2FR-DZ1oAWcg.js +0 -1
  436. package/web/assets/cose-bilkent-JH36ORCC-K8lJw6sz.js +0 -1
  437. package/web/assets/cynefinDiagram-5FMLGOSQ-D8jGprOP.js +0 -62
  438. package/web/assets/diagram-UQ7AKVKN-B054aybv.js +0 -41
  439. package/web/assets/diagram-VX7I27RA-BJjLjQ_5.js +0 -24
  440. package/web/assets/diagram-Z3DM3KII-DHTx_db-.js +0 -24
  441. package/web/assets/ebnfDiagram-PWID7BFC-mvxd2eQy.js +0 -1
  442. package/web/assets/el-alert-2k5y8yxj.js +0 -1
  443. package/web/assets/el-alert-B6UgayC7.css +0 -1
  444. package/web/assets/el-cascader-Bt6blBkS.js +0 -12
  445. package/web/assets/el-cascader-Y4U47xEI.css +0 -1
  446. package/web/assets/el-checkbox-BkOEHkIf.js +0 -1
  447. package/web/assets/el-checkbox-CzNtyWdF.css +0 -1
  448. package/web/assets/el-checkbox-group-D_6SYB2i.css +0 -1
  449. package/web/assets/el-date-picker-BsrAVvYx.css +0 -1
  450. package/web/assets/el-date-picker-Lzp0O-0u.js +0 -1
  451. package/web/assets/el-descriptions-BIYbwPZI.js +0 -1
  452. package/web/assets/el-descriptions-BpDzfuC8.css +0 -1
  453. package/web/assets/el-form-item-D_relxjU.css +0 -1
  454. package/web/assets/el-form-item-ixxOkcxt.js +0 -12
  455. package/web/assets/el-input-59MCq4T2.js +0 -3
  456. package/web/assets/el-input-8ehKRrZb.css +0 -1
  457. package/web/assets/el-input-number-BbNSYiiD.js +0 -1
  458. package/web/assets/el-input-number-DExoAqKP.css +0 -1
  459. package/web/assets/el-radio-B4O75OaI.css +0 -1
  460. package/web/assets/el-radio-C5Q8ovsd.js +0 -1
  461. package/web/assets/el-scrollbar-D3fUkDa-.js +0 -1
  462. package/web/assets/el-scrollbar-GF-yQkxY.css +0 -1
  463. package/web/assets/el-select-BT8E2Pcl.js +0 -1
  464. package/web/assets/el-select-D5zQ8kOe.css +0 -1
  465. package/web/assets/el-switch-C6QtgDW2.js +0 -1
  466. package/web/assets/el-switch-DpR9-s4E.css +0 -1
  467. package/web/assets/el-tab-pane-BdFesfwg.js +0 -1
  468. package/web/assets/el-tab-pane-LzsQQ_QK.css +0 -1
  469. package/web/assets/el-table-column-B0MDmiTm.js +0 -1
  470. package/web/assets/el-table-column-Dp73S2HR.css +0 -1
  471. package/web/assets/el-tag-1VV9QMa7.css +0 -1
  472. package/web/assets/ganttDiagram-EL5Y4UJY-DPlX4CQj.js +0 -292
  473. package/web/assets/gitGraphDiagram-WWUBYQGX-uWbyAvUy.js +0 -106
  474. package/web/assets/index-BX01RdqE.js +0 -29
  475. package/web/assets/index-C0Shszax.js +0 -1
  476. package/web/assets/index-C2xYNV80.js +0 -1
  477. package/web/assets/index-CTf-xFX2.css +0 -1
  478. package/web/assets/infoDiagram-FKFFQAWI-CYVpFIQd.js +0 -2
  479. package/web/assets/isArrayLikeObject-B9hsxew6.js +0 -1
  480. package/web/assets/last-DXTTfs9a.js +0 -1
  481. package/web/assets/layout-BuFhrKfQ.js +0 -1
  482. package/web/assets/management-url-service-Cv5OUDKf.js +0 -1
  483. package/web/assets/mcp-center-service-DjUMHPu4.js +0 -1
  484. package/web/assets/merge-BaHsYC7C.js +0 -1
  485. package/web/assets/mermaid.core-CLuWonle.js +0 -308
  486. package/web/assets/message-box-service-DI88XwVP.js +0 -1
  487. package/web/assets/message-box-service-amIz9eLF.css +0 -1
  488. package/web/assets/mobile-dialog-return-service-BqmtbwHA.js +0 -1
  489. package/web/assets/mobile-dialog-return-service-TSZfE1b8.css +0 -1
  490. package/web/assets/pegDiagram-XKGWAZYB-B5gYrfy-.js +0 -1
  491. package/web/assets/railroadDiagram-O6MQD6OU-DcIAdapN.js +0 -1
  492. package/web/assets/sankeyDiagram-P5KCCOFB-DZbIcZsi.js +0 -40
  493. package/web/assets/sizeCapture-INFHLROL-CK3iq_fM.js +0 -1
  494. package/web/assets/stateDiagram-XQSTLZYL-M21gs3ef.js +0 -1
  495. package/web/assets/stateDiagram-v2-IH3M54BS-yfF1fJDr.js +0 -1
  496. package/web/assets/swimlanes-V6O3JKXN-DLwODYSJ.js +0 -1
  497. package/web/assets/swimlanesDiagram-JKAHXJPX-VqS22HlO.js +0 -8
  498. package/web/assets/union-CTBUe0LT.js +0 -1
  499. package/web/assets/use-form-common-props-BTIqQl-H.js +0 -1
  500. package/web/assets/use-wheel-CZhJTzyb.js +0 -1
  501. package/web/assets/vnode-BVQ0FsA4.js +0 -1
  502. package/web/assets/workbench-presentation-CPQZ-olG.css +0 -1
  503. package/web/assets/workbench-presentation-D0mJAs5u.js +0 -1
  504. package/web/docs/assets/chunks/@localSearchIndexen-US.CLlIp1bF.js +0 -1
  505. package/web/docs/assets/chunks/@localSearchIndexroot.x6v4SaQk.js +0 -1
  506. package/web/docs/assets/en-US_runners_runner-troubleshooting.md.BvJ6yGrw.js +0 -1
  507. package/web/docs/assets/runners_runner-troubleshooting.md.CIWCfGkf.js +0 -1
@@ -1,308 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-CK3iq_fM.js","assets/index-BX01RdqE.js","assets/index-CTf-xFX2.css","assets/FilePreviewLoading-BB7BqLfM.js","assets/use-form-common-props-BTIqQl-H.js","assets/el-scrollbar-D3fUkDa-.js","assets/el-input-59MCq4T2.js","assets/el-input-8ehKRrZb.css","assets/el-scrollbar-GF-yQkxY.css","assets/mobile-dialog-return-service-BqmtbwHA.js","assets/mobile-dialog-return-service-TSZfE1b8.css","assets/BusyIndicator-CkmNTzP_.js","assets/FilePreviewLoading-Cxn0bDjD.css","assets/isArrayLikeObject-B9hsxew6.js","assets/_baseIteratee-BBpnSKUD.js","assets/union-CTBUe0LT.js","assets/_baseFindIndex-D7XfJLKM.js","assets/dagre-OS7QT2EB-98Qq0zkD.js","assets/layout-BuFhrKfQ.js","assets/merge-BaHsYC7C.js","assets/last-DXTTfs9a.js","assets/el-form-item-ixxOkcxt.js","assets/el-form-item-D_relxjU.css","assets/swimlanes-V6O3JKXN-DLwODYSJ.js","assets/cose-bilkent-JH36ORCC-K8lJw6sz.js","assets/cytoscape.esm-yzknjiTM.js","assets/c4Diagram-7LVT6UL2-jrqjerIx.js","assets/chunk-F27PBJKO-CJazVc92.js","assets/flowDiagram-T62WH6J4-CJvzSJaH.js","assets/chunk-5VM5RSS4-PAl2dCY6.js","assets/chunk-XXDRQBXY-CD0m8obf.js","assets/chunk-POPQ4Y6H-IEdv-dKV.js","assets/channel-vb08qcED.js","assets/swimlanesDiagram-JKAHXJPX-VqS22HlO.js","assets/erDiagram-2YWLMYGG-D9UJiA3b.js","assets/gitGraphDiagram-WWUBYQGX-uWbyAvUy.js","assets/chunk-2Q5K7J3B-B29-7eTI.js","assets/chunk-JWPE2WC7-8EHrQSbL.js","assets/cynefin-OW5HDTMX-CXjdl3AE.js","assets/ganttDiagram-EL5Y4UJY-DPlX4CQj.js","assets/advancedFormat-mPncmCfy.js","assets/linear-DQoI-VQC.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-FKFFQAWI-CYVpFIQd.js","assets/pieDiagram-E7YTZNPT-CMRcyI7O.js","assets/arc-CJOYSigO.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-hOWMoCpb.js","assets/xychartDiagram-S5SC5T6Z-BEfVfpB4.js","assets/requirementDiagram-IS5BZ75X-CXe-Ctnb.js","assets/sequenceDiagram-WJ2MYXX4-DQ5T7b6S.js","assets/classDiagram-CYGNFDIV-DZ1oAWcg.js","assets/chunk-HLEWEB6X-CHLSCk4e.js","assets/classDiagram-v2-TLXNO2FR-DZ1oAWcg.js","assets/stateDiagram-XQSTLZYL-M21gs3ef.js","assets/chunk-ZLD2IHE6-DSvSebI_.js","assets/stateDiagram-v2-IH3M54BS-yfF1fJDr.js","assets/journeyDiagram-EYS64GPL-BAZxxKR_.js","assets/timeline-definition-24CTP7MA-C5ehmNql.js","assets/mindmap-definition-THT77NOG-BExnUzDC.js","assets/kanban-definition-UXKFOSKX-_vYotbgl.js","assets/sankeyDiagram-P5KCCOFB-DZbIcZsi.js","assets/diagram-Z3DM3KII-DHTx_db-.js","assets/diagram-UQ7AKVKN-B054aybv.js","assets/blockDiagram-OSKFZWR5-Dr6fQmIN.js","assets/diagram-S7CK7UJ4-iRjRsXyq.js","assets/architectureDiagram-5GKGNRK7-DAHpP5xc.js","assets/diagram-VSXAHHWV-DM2XbVde.js","assets/ishikawaDiagram-5VMMS53U-Cpmxihq8.js","assets/vennDiagram-4TSXK5OY-CJhBecmB.js","assets/diagram-VX7I27RA-BJjLjQ_5.js","assets/wardleyDiagram-VM6X3IG4-DNyTsJz4.js","assets/cynefinDiagram-5FMLGOSQ-D8jGprOP.js","assets/railroadDiagram-O6MQD6OU-DcIAdapN.js","assets/chunk-SVP7TREG-DDTfCf13.js","assets/ebnfDiagram-PWID7BFC-mvxd2eQy.js","assets/abnfDiagram-VCTEODGH-DWmupz8z.js","assets/pegDiagram-XKGWAZYB-B5gYrfy-.js"])))=>i.map(i=>d[i]);
2
- import{b1 as Pp,bF as Gs,f2 as Ip,bK as Rp,b2 as Qe,b3 as qp,bD as Np,bE as Wp,bH as zp,ee as Hp,e4 as Yp,f3 as jp,dn as Up,av as xt,aa as fc,et as Ki,bI as ll,cu as Tr}from"./index-BX01RdqE.js";import{p as Ur}from"./FilePreviewLoading-BB7BqLfM.js";import{c as Wa}from"./isArrayLikeObject-B9hsxew6.js";import{b as gc}from"./_baseIteratee-BBpnSKUD.js";import{q as Xp}from"./mobile-dialog-return-service-BqmtbwHA.js";import{u as Gp}from"./union-CTBUe0LT.js";function Vp(e,t,r,i){var s=-1,o=e==null?0:e.length;for(i&&o&&(r=e[++s]);++s<o;)r=t(r,e[s],s,e);return r}function Zp(e){return typeof e=="function"?e:Pp}function Ve(e,t){var r=Gs(e)?Xp:Wa;return r(e,Zp(t))}function Kp(e,t){var r=[];return Wa(e,function(i,s,o){t(i,s,o)&&r.push(i)}),r}function Qi(e,t){var r=Gs(e)?Ip:Kp;return r(e,gc(t))}function Qp(e,t){return Rp(t,function(r){return e[r]})}function po(e){return e==null?[]:Qp(e,Qe(e))}var Jp="[object Map]",ty="[object Set]",ey=Object.prototype,ry=ey.hasOwnProperty;function hl(e){if(e==null)return!0;if(qp(e)&&(Gs(e)||typeof e=="string"||typeof e.splice=="function"||Np(e)||Wp(e)||zp(e)))return!e.length;var t=Hp(e);if(t==Jp||t==ty)return!e.size;if(Yp(e))return!jp(e).length;for(var r in e)if(ry.call(e,r))return!1;return!0}function iy(e,t,r,i,s){return s(e,function(o,a,n){r=i?(i=!1,o):t(r,o,a,n)}),r}function sy(e,t,r){var i=Gs(e)?Vp:iy,s=arguments.length<3;return i(e,gc(t),r,s,Wa)}var pc=Object.defineProperty,f=(e,t)=>pc(e,"name",{value:t,configurable:!0}),oy=(e,t)=>{for(var r in t)pc(e,r,{get:t[r],enumerable:!0})},Ee={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},za=f(function(e="fatal"){let t=Ee.fatal;typeof e=="string"?e.toLowerCase()in Ee&&(t=Ee[e]):typeof e=="number"&&(t=e),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},t<=Ee.fatal&&(A.fatal=console.error?console.error.bind(console,se("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",se("FATAL"))),t<=Ee.error&&(A.error=console.error?console.error.bind(console,se("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",se("ERROR"))),t<=Ee.warn&&(A.warn=console.warn?console.warn.bind(console,se("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",se("WARN"))),t<=Ee.info&&(A.info=console.info?console.info.bind(console,se("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",se("INFO"))),t<=Ee.debug&&(A.debug=console.debug?console.debug.bind(console,se("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("DEBUG"))),t<=Ee.trace&&(A.trace=console.debug?console.debug.bind(console,se("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("TRACE")))},"setLogLevel"),se=f(e=>`%c${Up().format("ss.SSS")} : ${e} : `,"format");const ds={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return ds.hue2rgb(o,s,e+1/3)*255;case"g":return ds.hue2rgb(o,s,e)*255;case"b":return ds.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},ay={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},ny={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},yt={channel:ds,lang:ay,unit:ny},Ne={};for(let e=0;e<=255;e++)Ne[e]=yt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};let ly=class{constructor(){this.type=Xt.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=Xt.ALL}is(t){return this.type===t}};class hy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new ly}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=yt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=yt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=yt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=yt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=yt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=yt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),yt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),yt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),yt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),yt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),yt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),yt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Vs=new hy({r:0,g:0,b:0,a:0},"transparent"),Lr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Lr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Vs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}${Ne[Math.round(s*255)]}`:`#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}`}},er={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(er.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return yt.channel.clamp.h(parseFloat(r)*.9);case"rad":return yt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return yt.channel.clamp.h(parseFloat(r)*360)}}return yt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(er.re);if(!r)return;const[,i,s,o,a,n]=r;return Vs.set({h:er._hue2deg(i),s:yt.channel.clamp.s(parseFloat(s)),l:yt.channel.clamp.l(parseFloat(o)),a:a?yt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${yt.lang.round(t)}, ${yt.lang.round(r)}%, ${yt.lang.round(i)}%, ${s})`:`hsl(${yt.lang.round(t)}, ${yt.lang.round(r)}%, ${yt.lang.round(i)}%)`}},Li={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=Li.colors[e];if(t)return Lr.parse(t)},stringify:e=>{const t=Lr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},Ci={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(Ci.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Vs.set({r:yt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:yt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:yt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?yt.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(${yt.lang.round(t)}, ${yt.lang.round(r)}, ${yt.lang.round(i)}, ${yt.lang.round(s)})`:`rgb(${yt.lang.round(t)}, ${yt.lang.round(r)}, ${yt.lang.round(i)})`}},Te={format:{keyword:Li,hex:Lr,rgb:Ci,rgba:Ci,hsl:er,hsla:er},parse:e=>{if(typeof e!="string")return e;const t=Lr.parse(e)||Ci.parse(e)||er.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?er.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ci.stringify(e):Lr.stringify(e)},yc=(e,t)=>{const r=Te.parse(e);for(const i in t)r[i]=yt.channel.clamp[i](t[i]);return Te.stringify(r)},Ye=(e,t,r=0,i=1)=>{if(typeof e!="number")return yc(e,{a:t});const s=Vs.set({r:yt.channel.clamp.r(e),g:yt.channel.clamp.g(t),b:yt.channel.clamp.b(r),a:yt.channel.clamp.a(i)});return Te.stringify(s)},cy=e=>{const{r:t,g:r,b:i}=Te.parse(e),s=.2126*yt.channel.toLinear(t)+.7152*yt.channel.toLinear(r)+.0722*yt.channel.toLinear(i);return yt.lang.round(s)},dy=e=>cy(e)>=.5,ge=e=>!dy(e),mc=(e,t,r)=>{const i=Te.parse(e),s=i[t],o=yt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Te.stringify(i)},O=(e,t)=>mc(e,"l",t),D=(e,t)=>mc(e,"l",-t),b=(e,t)=>{const r=Te.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:o,a}=Te.parse(e),{r:n,g:l,b:c,a:h}=Te.parse(t),d=r/100,u=d*2-1,p=a-h,y=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,x=1-y,C=i*y+n*x,k=s*y+l*x,S=o*y+c*x,T=a*d+h*(1-d);return Ye(C,k,S,T)},B=(e,t=100)=>{const r=Te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,uy(r,e,t)};var ra=f((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ra(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=ra(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),zt=ra,_e="#ffffff",Be="#f2f2f2",pt=f((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Er,fy=(Er=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||O(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=D(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=D(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||D(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Er,"Theme"),Er),gy=f(e=>{const t=new fy;return t.calculate(e),t},"getThemeVariables"),Ar,py=(Ar=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ye(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=D("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=D(this.sectionBkgColor,10),this.taskBorderColor=Ye(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ye(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||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=O(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=O(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=O(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=B(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??O(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(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||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Ar,"Theme"),Ar),yy=f(e=>{const t=new py;return t.calculate(e),t},"getThemeVariables"),$r,my=($r=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=pt(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=Ye(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||B(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||B(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||D(B(this.git0),25),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f($r,"Theme"),$r),xy=f(e=>{const t=new my;return t.calculate(e),t},"getThemeVariables"),Or,Cy=(Or=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=O("#cde498",10),this.primaryBorderColor=pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.primaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=D(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(8+t*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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Or,"Theme"),Or),by=f(e=>{const t=new Cy;return t.calculate(e),t},"getThemeVariables"),Dr,ky=(Dr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{l:-(8+t*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=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=D(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=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=D(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Dr,"Theme"),Dr),wy=f(e=>{const t=new ky;return t.calculate(e),t},"getThemeVariables"),Pr,Sy=(Pr=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=pt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||D(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Pr,"Theme"),Pr),Ty=f(e=>{const t=new Sy;return t.calculate(e),t},"getThemeVariables"),Ir,_y=(Ir=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=D(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=D(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||D(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Ir,"Theme"),Ir),By=f(e=>{const t=new _y;return t.calculate(e),t},"getThemeVariables"),Rr,vy=(Rr=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=pt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||D(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Rr,"Theme"),Rr),Ly=f(e=>{const t=new vy;return t.calculate(e),t},"getThemeVariables"),qr,Fy=(qr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=D(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=D(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||D(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(qr,"Theme"),qr),My=f(e=>{const t=new Fy;return t.calculate(e),t},"getThemeVariables"),Nr,Ey=(Nr=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=pt(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||D(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Nr,"Theme"),Nr),Ay=f(e=>{const t=new Ey;return t.calculate(e),t},"getThemeVariables"),Wr,$y=(Wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=pt(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=B(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||pt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||pt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||pt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||pt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||O(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||D(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=D(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ge(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Wr,"Theme"),Wr),Oy=f(e=>{const t=new $y;return t.calculate(e),t},"getThemeVariables"),De={base:{getThemeVariables:gy},dark:{getThemeVariables:yy},default:{getThemeVariables:xy},forest:{getThemeVariables:by},neutral:{getThemeVariables:wy},neo:{getThemeVariables:Ty},"neo-dark":{getThemeVariables:By},redux:{getThemeVariables:Ly},"redux-dark":{getThemeVariables:My},"redux-color":{getThemeVariables:Ay},"redux-dark-color":{getThemeVariables:Oy}},Ht={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},xc={...Ht,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:De.default.getThemeVariables(),sequence:{...Ht.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ht.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ht.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ht.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ht.pie,useWidth:984},xyChart:{...Ht.xyChart,useWidth:void 0},requirement:{...Ht.requirement,useWidth:void 0},packet:{...Ht.packet},eventmodeling:{...Ht.eventmodeling},treeView:{...Ht.treeView,useWidth:void 0},radar:{...Ht.radar},railroad:{...Ht.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:{...Ht.ishikawa},sankey:{...Ht.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:{...Ht.venn},cynefin:{...Ht.cynefin}},Cc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Cc(e[i],"")]:[...r,t+i],[]),"keyify"),Dy=new Set(Cc(xc,"")),bc=xc,Py={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Iy=f((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))&&(A.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ss=f(e=>{if(A.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ss(t));return}for(const t of Object.keys(e)){if(A.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Dy.has(t)||e[t]==null){A.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Py[t];i?Iy(e[t],i):(A.debug("sanitizing object",t),Ss(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(A.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?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}A.debug("After sanitization",e)}},"sanitizeDirective"),kc=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Xr=Object.freeze(bc),ve=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),te=zt({},Xr),Ts,ar=[],Fi=zt({},Xr),zi=f((e,t)=>{let r=zt({},e),i={};for(const s of t)Tc(s),i=zt(i,s);if(r=zt(r,i),i.theme&&i.theme in De){const s=zt({},Ts),o=zt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in De&&(r.themeVariables=De[r.theme].getThemeVariables(o))}return Fi=r,Hy(Fi),Fi},"updateCurrentConfig"),Ry=f(e=>(te=zt({},Xr),te=zt(te,e),e.theme&&De[e.theme]&&(te.themeVariables=De[e.theme].getThemeVariables(e.themeVariables)),zi(te,ar),te),"setSiteConfig"),qy=f(e=>{Ts=zt({},e)},"saveConfigFromInitialize"),Ny=f(e=>(te=zt(te,e),zi(te,ar),te),"updateSiteConfig"),wc=f(()=>zt({},te),"getSiteConfig"),Sc=f(e=>(zi(Fi,[e]),Dt()),"setConfig"),Dt=f(()=>zt({},Fi),"getConfig"),Tc=f(e=>{e&&(["secure",...te.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(A.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"&&Tc(e[t])}))},"sanitize"),Wy=f(e=>{Ss(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),ar.push(e),zi(te,ar)},"addDirective"),_s=f((e=te)=>{ar=[],zi(e,ar)},"reset"),zy={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."},cl={},_c=f(e=>{cl[e]||(A.warn(zy[e]),cl[e]=!0)},"issueWarning"),Hy=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&_c("LAZY_LOAD_DEPRECATED")},"checkConfig"),eB=f(()=>{let e={};Ts&&(e=zt(e,Ts));for(const t of ar)e=zt(e,t);return e},"getUserDefinedConfig"),Zt=f(e=>(e.flowchart?.htmlLabels!=null&&_c("FLOWCHART_HTML_LABELS_DEPRECATED"),ve(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Bc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Yy=/\s*%%.*\n/gm,zr,vc=(zr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(zr,"UnknownDiagramError"),zr),nr={},Ha=f(function(e,t){e=e.replace(Bc,"").replace(Mi,"").replace(Yy,`
3
- `);for(const[r,{detector:i}]of Object.entries(nr))if(i(e,t))return r;throw new vc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ia=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Lc(t,r,i)},"registerLazyLoadedDiagrams"),Lc=f((e,t,r)=>{nr[e]&&A.warn(`Detector with key ${e} already exists. Overwriting.`),nr[e]={detector:t,loader:r},A.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),jy=f(e=>nr[e].loader,"getDiagramLoader"),Hi=/<br\s*\/?>/gi,Uy=f(e=>e?Ec(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Xy=(()=>{let e=!1;return()=>{e||(Fc(),e=!0)}})();function Fc(){const e="data-temp-href-target";Ur.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ur.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f(Fc,"setupDompurifyHooks");var Mc=f(e=>(Xy(),Ur.sanitize(e)),"removeScript"),dl=f((e,t)=>{if(Zt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Mc(e):r!=="loose"&&(e=Ec(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Ky(e))}return e},"sanitizeMore"),oe=f((e,t)=>e&&(t.dompurifyConfig?e=Ur.sanitize(dl(e,t),t.dompurifyConfig).toString():e=Ur.sanitize(dl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Gy=f((e,t)=>typeof e=="string"?oe(e,t):e.flat().map(r=>oe(r,t)),"sanitizeTextOrArray"),Vy=f(e=>Hi.test(e),"hasBreaks"),Zy=f(e=>e.split(Hi),"splitBreaks"),Ky=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ec=f(e=>e.replace(Hi,"#br#"),"breakToPlaceholder"),Qy=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Jy=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),tm=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ul=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];em(o,a)&&(s=o+","+a,i++,r.pop())}r.push(rm(s))}return r.join("")},"parseGenericTypes"),sa=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),em=f((e,t)=>{const r=sa(e,"~"),i=sa(t,"~");return r===1&&i===1},"shouldCombineSets"),rm=f(e=>{const t=sa(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),fl=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),oa=/\$\$(.*?)\$\$/g,Oi=f(e=>(e.match(oa)?.length??0)>0,"hasKatex"),rB=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ac(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),im=f(async(e,t)=>{if(!Oi(e))return e;if(!(fl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(oa,"MathML is unsupported in this environment.");{const{default:r}=await xt(async()=>{const{default:s}=await import("./katex-HP8lGamR.js");return{default:s}},[]),i=t.forceLegacyMathML||!fl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Hi).map(s=>Oi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(oa,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ac=f(async(e,t)=>oe(await im(e,t),t),"renderKatexSanitized"),Yi={getRows:Uy,sanitizeText:oe,sanitizeTextOrArray:Gy,hasBreaks:Vy,splitBreaks:Zy,lineBreakRegex:Hi,removeScript:Mc,getUrl:Qy,evaluate:ve,getMax:Jy,getMin:tm},sm=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),om=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),$c=f(function(e,t,r,i){const s=om(t,r,i);sm(e,s)},"configureSvgSize"),am=f(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;A.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;A.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,A.info(`Calculated bounds: ${n}x${l}`),$c(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"),us={};function aa(e){return[...e.cssRules].map(t=>t.cssText).join(`
4
- `)}f(aa,"cssStyleSheetToString");var nm=f((e,t,r,i)=>{let s="";return e in us&&us[e]?s=us[e]({...r,svgId:i}):A.warn(`No theme found for ${e}`),`& {
5
- font-family: ${r.fontFamily};
6
- font-size: ${r.fontSize};
7
- fill: ${r.textColor}
8
- }
9
- @keyframes edge-animation-frame {
10
- from {
11
- stroke-dashoffset: 0;
12
- }
13
- }
14
- @keyframes dash {
15
- to {
16
- stroke-dashoffset: 0;
17
- }
18
- }
19
- & .edge-animation-slow {
20
- stroke-dasharray: 9,5 !important;
21
- stroke-dashoffset: 900;
22
- animation: dash 50s linear infinite;
23
- stroke-linecap: round;
24
- }
25
- & .edge-animation-fast {
26
- stroke-dasharray: 9,5 !important;
27
- stroke-dashoffset: 900;
28
- animation: dash 20s linear infinite;
29
- stroke-linecap: round;
30
- }
31
- /* Classes common for multiple diagrams */
32
-
33
- & .error-icon {
34
- fill: ${r.errorBkgColor};
35
- }
36
- & .error-text {
37
- fill: ${r.errorTextColor};
38
- stroke: ${r.errorTextColor};
39
- }
40
-
41
- & .edge-thickness-normal {
42
- stroke-width: ${r.strokeWidth??1}px;
43
- }
44
- & .edge-thickness-thick {
45
- stroke-width: 3.5px
46
- }
47
- & .edge-pattern-solid {
48
- stroke-dasharray: 0;
49
- }
50
- & .edge-thickness-invisible {
51
- stroke-width: 0;
52
- fill: none;
53
- }
54
- & .edge-pattern-dashed{
55
- stroke-dasharray: 3;
56
- }
57
- .edge-pattern-dotted {
58
- stroke-dasharray: 2;
59
- }
60
-
61
- & .marker {
62
- fill: ${r.lineColor};
63
- stroke: ${r.lineColor};
64
- }
65
- & .marker.cross {
66
- stroke: ${r.lineColor};
67
- }
68
-
69
- & svg {
70
- font-family: ${r.fontFamily};
71
- font-size: ${r.fontSize};
72
- }
73
- & p {
74
- margin: 0
75
- }
76
-
77
- ${s}
78
- .node .neo-node {
79
- stroke: ${r.nodeBorder};
80
- }
81
-
82
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
83
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
84
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
85
- }
86
- [data-look="neo"].swimlane.cluster rect {
87
- filter: none;
88
- }
89
-
90
-
91
- [data-look="neo"].node path {
92
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
93
- stroke-width: ${r.strokeWidth??1}px;
94
- }
95
-
96
- [data-look="neo"].node .outer-path {
97
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
98
- }
99
-
100
- [data-look="neo"].node .neo-line path {
101
- stroke: ${r.nodeBorder};
102
- filter: none;
103
- }
104
-
105
- [data-look="neo"].node circle{
106
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
107
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
108
- }
109
-
110
- [data-look="neo"].node circle .state-start{
111
- fill: #000000;
112
- }
113
-
114
- [data-look="neo"].icon-shape .icon {
115
- fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
116
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
117
- }
118
-
119
- [data-look="neo"].icon-shape .icon-neo path {
120
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
121
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
122
- }
123
-
124
- ${t}
125
- `},"getStyles"),lm=f((e,t)=>{t!==void 0&&(us[e]=t)},"addStylesForDiagram"),hm=nm,Oc={};oy(Oc,{clear:()=>cm,getAccDescription:()=>gm,getAccTitle:()=>um,getDiagramTitle:()=>ym,setAccDescription:()=>fm,setAccTitle:()=>dm,setDiagramTitle:()=>pm});var Ya="",ja="",Ua="",Xa=f(e=>oe(e,Dt()),"sanitizeText"),cm=f(()=>{Ya="",Ua="",ja=""},"clear"),dm=f(e=>{Ya=Xa(e).replace(/^\s+/g,"")},"setAccTitle"),um=f(()=>Ya,"getAccTitle"),fm=f(e=>{Ua=Xa(e).replace(/\n\s+/g,`
126
- `)},"setAccDescription"),gm=f(()=>Ua,"getAccDescription"),pm=f(e=>{ja=Xa(e)},"setDiagramTitle"),ym=f(()=>ja,"getDiagramTitle"),gl=A,mm=za,kt=Dt,iB=Sc,sB=Xr,Ga=f(e=>oe(e,kt()),"sanitizeText"),xm=am,Cm=f(()=>Oc,"getCommonDb"),Bs={},vs=f((e,t,r)=>{Bs[e]&&gl.warn(`Diagram with id ${e} already registered. Overwriting.`),Bs[e]=t,r&&Lc(e,r),lm(e,t.styles),t.injectUtils?.(gl,mm,kt,Ga,xm,Cm(),()=>{})},"registerDiagram"),na=f(e=>{if(e in Bs)return Bs[e];throw new bm(e)},"getDiagram"),Hr,bm=(Hr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(Hr,"DiagramNotFoundError"),Hr),km={value:()=>{}};function Dc(){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 fs(r)}function fs(e){this._=e}function wm(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}})}fs.prototype=Dc.prototype={constructor:fs,on:function(e,t){var r=this._,i=wm(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=Sm(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=pl(r[s],e.name,t);else if(t==null)for(s in r)r[s]=pl(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 fs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function Sm(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function pl(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=km,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var la="http://www.w3.org/1999/xhtml";const yl={svg:"http://www.w3.org/2000/svg",xhtml:la,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zs(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),yl.hasOwnProperty(t)?{space:yl[t],local:e}:e}function Tm(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===la&&t.documentElement.namespaceURI===la?t.createElement(e):t.createElementNS(r,e)}}function _m(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Pc(e){var t=Zs(e);return(t.local?_m:Tm)(t)}function Bm(){}function Va(e){return e==null?Bm:function(){return this.querySelector(e)}}function vm(e){typeof e!="function"&&(e=Va(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new ie(i,this._parents)}function Lm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Fm(){return[]}function Ic(e){return e==null?Fm:function(){return this.querySelectorAll(e)}}function Mm(e){return function(){return Lm(e.apply(this,arguments))}}function Em(e){typeof e=="function"?e=Mm(e):e=Ic(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new ie(i,s)}function Rc(e){return function(){return this.matches(e)}}function qc(e){return function(t){return t.matches(e)}}var Am=Array.prototype.find;function $m(e){return function(){return Am.call(this.children,e)}}function Om(){return this.firstElementChild}function Dm(e){return this.select(e==null?Om:$m(typeof e=="function"?e:qc(e)))}var Pm=Array.prototype.filter;function Im(){return Array.from(this.children)}function Rm(e){return function(){return Pm.call(this.children,e)}}function qm(e){return this.selectAll(e==null?Im:Rm(typeof e=="function"?e:qc(e)))}function Nm(e){typeof e!="function"&&(e=Rc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new ie(i,this._parents)}function Nc(e){return new Array(e.length)}function Wm(){return new ie(this._enter||this._groups.map(Nc),this._parents)}function Ls(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ls.prototype={constructor:Ls,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 zm(e){return function(){return e}}function Hm(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new Ls(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function Ym(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,d=o.length,u=new Array(h),p;for(n=0;n<h;++n)(l=t[n])&&(u[n]=p=a.call(l,l.__data__,n,t)+"",c.has(p)?s[n]=l:c.set(p,l));for(n=0;n<d;++n)p=a.call(e,o[n],n,o)+"",(l=c.get(p))?(i[n]=l,l.__data__=o[n],c.delete(p)):r[n]=new Ls(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(u[n])===l&&(s[n]=l)}function jm(e){return e.__data__}function Um(e,t){if(!arguments.length)return Array.from(this,jm);var r=t?Ym:Hm,i=this._parents,s=this._groups;typeof e!="function"&&(e=zm(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],d=s[c],u=d.length,p=Xm(e.call(h,h&&h.__data__,c,i)),m=p.length,y=n[c]=new Array(m),x=a[c]=new Array(m),C=l[c]=new Array(u);r(h,d,y,x,C,p,t);for(var k=0,S=0,T,_;k<m;++k)if(T=y[k]){for(k>=S&&(S=k+1);!(_=x[S])&&++S<m;);T._next=_||null}}return a=new ie(a,i),a._enter=n,a._exit=l,a}function Xm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gm(){return new ie(this._exit||this._groups.map(Nc),this._parents)}function Vm(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function Zm(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,u=n[l]=new Array(d),p,m=0;m<d;++m)(p=c[m]||h[m])&&(u[m]=p);for(;l<s;++l)n[l]=r[l];return new ie(n,this._parents)}function Km(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Qm(e){e||(e=Jm);function t(d,u){return d&&u?e(d.__data__,u.__data__):!d-!u}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new ie(s,this._parents).order()}function Jm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function t0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function e0(){return Array.from(this)}function r0(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function i0(){let e=0;for(const t of this)++e;return e}function s0(){return!this.node()}function o0(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function a0(e){return function(){this.removeAttribute(e)}}function n0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function l0(e,t){return function(){this.setAttribute(e,t)}}function h0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function c0(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function d0(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 u0(e,t){var r=Zs(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?n0:a0:typeof t=="function"?r.local?d0:c0:r.local?h0:l0)(r,t))}function Wc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function f0(e){return function(){this.style.removeProperty(e)}}function g0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function p0(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function y0(e,t,r){return arguments.length>1?this.each((t==null?f0:typeof t=="function"?p0:g0)(e,t,r??"")):Gr(this.node(),e)}function Gr(e,t){return e.style.getPropertyValue(t)||Wc(e).getComputedStyle(e,null).getPropertyValue(t)}function m0(e){return function(){delete this[e]}}function x0(e,t){return function(){this[e]=t}}function C0(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function b0(e,t){return arguments.length>1?this.each((t==null?m0:typeof t=="function"?C0:x0)(e,t)):this.node()[e]}function zc(e){return e.trim().split(/^|\s+/)}function Za(e){return e.classList||new Hc(e)}function Hc(e){this._node=e,this._names=zc(e.getAttribute("class")||"")}Hc.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 Yc(e,t){for(var r=Za(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function jc(e,t){for(var r=Za(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function k0(e){return function(){Yc(this,e)}}function w0(e){return function(){jc(this,e)}}function S0(e,t){return function(){(t.apply(this,arguments)?Yc:jc)(this,e)}}function T0(e,t){var r=zc(e+"");if(arguments.length<2){for(var i=Za(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?S0:t?k0:w0)(r,t))}function _0(){this.textContent=""}function B0(e){return function(){this.textContent=e}}function v0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function L0(e){return arguments.length?this.each(e==null?_0:(typeof e=="function"?v0:B0)(e)):this.node().textContent}function F0(){this.innerHTML=""}function M0(e){return function(){this.innerHTML=e}}function E0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function A0(e){return arguments.length?this.each(e==null?F0:(typeof e=="function"?E0:M0)(e)):this.node().innerHTML}function $0(){this.nextSibling&&this.parentNode.appendChild(this)}function O0(){return this.each($0)}function D0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function P0(){return this.each(D0)}function I0(e){var t=typeof e=="function"?e:Pc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function R0(){return null}function q0(e,t){var r=typeof e=="function"?e:Pc(e),i=t==null?R0:typeof t=="function"?t:Va(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function N0(){var e=this.parentNode;e&&e.removeChild(this)}function W0(){return this.each(N0)}function z0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function H0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Y0(e){return this.select(e?H0:z0)}function j0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function U0(e){return function(t){e.call(this,t,this.__data__)}}function X0(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 G0(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function V0(e,t,r){return function(){var i=this.__on,s,o=U0(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function Z0(e,t,r){var i=X0(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?V0:G0,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function Uc(e,t,r){var i=Wc(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 K0(e,t){return function(){return Uc(this,e,t)}}function Q0(e,t){return function(){return Uc(this,e,t.apply(this,arguments))}}function J0(e,t){return this.each((typeof t=="function"?Q0:K0)(e,t))}function*tx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var Xc=[null];function ie(e,t){this._groups=e,this._parents=t}function ji(){return new ie([[document.documentElement]],Xc)}function ex(){return this}ie.prototype=ji.prototype={constructor:ie,select:vm,selectAll:Em,selectChild:Dm,selectChildren:qm,filter:Nm,data:Um,enter:Wm,exit:Gm,join:Vm,merge:Zm,selection:ex,order:Km,sort:Qm,call:t0,nodes:e0,node:r0,size:i0,empty:s0,each:o0,attr:u0,style:y0,property:b0,classed:T0,text:L0,html:A0,raise:O0,lower:P0,append:I0,insert:q0,remove:W0,clone:Y0,datum:j0,on:Z0,dispatch:J0,[Symbol.iterator]:tx};function mt(e){return typeof e=="string"?new ie([[document.querySelector(e)]],[document.documentElement]):new ie([[e]],Xc)}function Ka(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Gc(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ui(){}var Di=.7,Fs=1/Di,Fr="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Se="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rx=/^#([0-9a-f]{3,8})$/,ix=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),sx=new RegExp(`^rgb\\(${Se},${Se},${Se}\\)$`),ox=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${Pi}\\)$`),ax=new RegExp(`^rgba\\(${Se},${Se},${Se},${Pi}\\)$`),nx=new RegExp(`^hsl\\(${Pi},${Se},${Se}\\)$`),lx=new RegExp(`^hsla\\(${Pi},${Se},${Se},${Pi}\\)$`),ml={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};Ka(Ui,Ii,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xl,formatHex:xl,formatHex8:hx,formatHsl:cx,formatRgb:Cl,toString:Cl});function xl(){return this.rgb().formatHex()}function hx(){return this.rgb().formatHex8()}function cx(){return Vc(this).formatHsl()}function Cl(){return this.rgb().formatRgb()}function Ii(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=rx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?bl(t):r===3?new ee(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ji(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ji(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ix.exec(e))?new ee(t[1],t[2],t[3],1):(t=sx.exec(e))?new ee(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ox.exec(e))?Ji(t[1],t[2],t[3],t[4]):(t=ax.exec(e))?Ji(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nx.exec(e))?Sl(t[1],t[2]/100,t[3]/100,1):(t=lx.exec(e))?Sl(t[1],t[2]/100,t[3]/100,t[4]):ml.hasOwnProperty(e)?bl(ml[e]):e==="transparent"?new ee(NaN,NaN,NaN,0):null}function bl(e){return new ee(e>>16&255,e>>8&255,e&255,1)}function Ji(e,t,r,i){return i<=0&&(e=t=r=NaN),new ee(e,t,r,i)}function dx(e){return e instanceof Ui||(e=Ii(e)),e?(e=e.rgb(),new ee(e.r,e.g,e.b,e.opacity)):new ee}function ha(e,t,r,i){return arguments.length===1?dx(e):new ee(e,t,r,i??1)}function ee(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Ka(ee,ha,Gc(Ui,{brighter(e){return e=e==null?Fs:Math.pow(Fs,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Di:Math.pow(Di,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ee(sr(this.r),sr(this.g),sr(this.b),Ms(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:kl,formatHex:kl,formatHex8:ux,formatRgb:wl,toString:wl}));function kl(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function ux(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function wl(){const e=Ms(this.opacity);return`${e===1?"rgb(":"rgba("}${sr(this.r)}, ${sr(this.g)}, ${sr(this.b)}${e===1?")":`, ${e})`}`}function Ms(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rr(e){return e=sr(e),(e<16?"0":"")+e.toString(16)}function Sl(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ue(e,t,r,i)}function Vc(e){if(e instanceof ue)return new ue(e.h,e.s,e.l,e.opacity);if(e instanceof Ui||(e=Ii(e)),!e)return new ue;if(e instanceof ue)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new ue(a,n,l,e.opacity)}function fx(e,t,r,i){return arguments.length===1?Vc(e):new ue(e,t,r,i??1)}function ue(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Ka(ue,fx,Gc(Ui,{brighter(e){return e=e==null?Fs:Math.pow(Fs,e),new ue(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Di:Math.pow(Di,e),new ue(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 ee(yo(e>=240?e-240:e+120,s,i),yo(e,s,i),yo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ue(Tl(this.h),ts(this.s),ts(this.l),Ms(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=Ms(this.opacity);return`${e===1?"hsl(":"hsla("}${Tl(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tl(e){return e=(e||0)%360,e<0?e+360:e}function ts(e){return Math.max(0,Math.min(1,e||0))}function yo(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 Qa=e=>()=>e;function Zc(e,t){return function(r){return e+r*t}}function gx(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function oB(e,t){var r=t-e;return r?Zc(e,r>180||r<-180?r-360*Math.round(r/360):r):Qa(isNaN(e)?t:e)}function px(e){return(e=+e)==1?Kc:function(t,r){return r-t?gx(t,r,e):Qa(isNaN(t)?r:t)}}function Kc(e,t){var r=t-e;return r?Zc(e,r):Qa(isNaN(e)?t:e)}const _l=(function e(t){var r=px(t);function i(s,o){var a=r((s=ha(s)).r,(o=ha(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=Kc(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i})(1);function We(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var ca=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mo=new RegExp(ca.source,"g");function yx(e){return function(){return e}}function mx(e){return function(t){return e(t)+""}}function xx(e,t){var r=ca.lastIndex=mo.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=ca.exec(e))&&(s=mo.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:We(i,s)})),r=mo.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?mx(l[0].x):yx(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var Bl=180/Math.PI,da={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qc(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Bl,skewX:Math.atan(l)*Bl,scaleX:a,scaleY:n}}var es;function Cx(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?da:Qc(t.a,t.b,t.c,t.d,t.e,t.f)}function bx(e){return e==null||(es||(es=document.createElementNS("http://www.w3.org/2000/svg","g")),es.setAttribute("transform",e),!(e=es.transform.baseVal.consolidate()))?da:(e=e.matrix,Qc(e.a,e.b,e.c,e.d,e.e,e.f))}function Jc(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,d,u,p,m){if(c!==d||h!==u){var y=p.push("translate(",null,t,null,r);m.push({i:y-4,x:We(c,d)},{i:y-2,x:We(h,u)})}else(d||u)&&p.push("translate("+d+t+u+r)}function a(c,h,d,u){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),u.push({i:d.push(s(d)+"rotate(",null,i)-2,x:We(c,h)})):h&&d.push(s(d)+"rotate("+h+i)}function n(c,h,d,u){c!==h?u.push({i:d.push(s(d)+"skewX(",null,i)-2,x:We(c,h)}):h&&d.push(s(d)+"skewX("+h+i)}function l(c,h,d,u,p,m){if(c!==d||h!==u){var y=p.push(s(p)+"scale(",null,",",null,")");m.push({i:y-4,x:We(c,d)},{i:y-2,x:We(h,u)})}else(d!==1||u!==1)&&p.push(s(p)+"scale("+d+","+u+")")}return function(c,h){var d=[],u=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,d,u),a(c.rotate,h.rotate,d,u),n(c.skewX,h.skewX,d,u),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,u),c=h=null,function(p){for(var m=-1,y=u.length,x;++m<y;)d[(x=u[m]).i]=x.x(p);return d.join("")}}}var kx=Jc(Cx,"px, ","px)","deg)"),wx=Jc(bx,", ",")",")"),Vr=0,bi=0,ui=0,td=1e3,Es,ki,As=0,lr=0,Ks=0,Ri=typeof performance=="object"&&performance.now?performance:Date,ed=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ja(){return lr||(ed(Sx),lr=Ri.now()+Ks)}function Sx(){lr=0}function $s(){this._call=this._time=this._next=null}$s.prototype=rd.prototype={constructor:$s,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ja():+r)+(t==null?0:+t),!this._next&&ki!==this&&(ki?ki._next=this:Es=this,ki=this),this._call=e,this._time=r,ua()},stop:function(){this._call&&(this._call=null,this._time=1/0,ua())}};function rd(e,t,r){var i=new $s;return i.restart(e,t,r),i}function Tx(){Ja(),++Vr;for(var e=Es,t;e;)(t=lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Vr}function vl(){lr=(As=Ri.now())+Ks,Vr=bi=0;try{Tx()}finally{Vr=0,Bx(),lr=0}}function _x(){var e=Ri.now(),t=e-As;t>td&&(Ks-=t,As=e)}function Bx(){for(var e,t=Es,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:Es=r);ki=e,ua(i)}function ua(e){if(!Vr){bi&&(bi=clearTimeout(bi));var t=e-lr;t>24?(e<1/0&&(bi=setTimeout(vl,e-Ri.now()-Ks)),ui&&(ui=clearInterval(ui))):(ui||(As=Ri.now(),ui=setInterval(_x,td)),Vr=1,ed(vl))}}function Ll(e,t,r){var i=new $s;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var vx=Dc("start","end","cancel","interrupt"),Lx=[],id=0,Fl=1,fa=2,gs=3,Ml=4,ga=5,ps=6;function Qs(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Fx(e,r,{name:t,index:i,group:s,on:vx,tween:Lx,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:id})}function tn(e,t){var r=pe(e,t);if(r.state>id)throw new Error("too late; already scheduled");return r}function Le(e,t){var r=pe(e,t);if(r.state>gs)throw new Error("too late; already running");return r}function pe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Fx(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=rd(o,0,r.time);function o(c){r.state=Fl,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,u,p;if(r.state!==Fl)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===gs)return Ll(a);p.state===Ml?(p.state=ps,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h<t&&(p.state=ps,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[h])}if(Ll(function(){r.state===gs&&(r.state=Ml,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=fa,r.on.call("start",e,e.__data__,r.index,r.group),r.state===fa){for(r.state=gs,s=new Array(u=r.tween.length),h=0,d=-1;h<u;++h)(p=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=p);s.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=ga,1),d=-1,u=s.length;++d<u;)s[d].call(e,h);r.state===ga&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ps,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Mx(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>fa&&i.state<ga,i.state=ps,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function Ex(e){return this.each(function(){Mx(this,e)})}function Ax(e,t){var r,i;return function(){var s=Le(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function $x(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=Le(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function Ox(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=pe(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?Ax:$x)(r,e,t))}function en(e,t,r){var i=e._id;return e.each(function(){var s=Le(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return pe(s,i).value[t]}}function sd(e,t){var r;return(typeof t=="number"?We:t instanceof Ii?_l:(r=Ii(t))?(t=r,_l):xx)(e,t)}function Dx(e){return function(){this.removeAttribute(e)}}function Px(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ix(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function Rx(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function qx(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function Nx(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function Wx(e,t){var r=Zs(e),i=r==="transform"?wx:sd;return this.attrTween(e,typeof t=="function"?(r.local?Nx:qx)(r,i,en(this,"attr."+e,t)):t==null?(r.local?Px:Dx)(r):(r.local?Rx:Ix)(r,i,t))}function zx(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Hx(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Yx(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Hx(e,o)),r}return s._value=t,s}function jx(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&zx(e,o)),r}return s._value=t,s}function Ux(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=Zs(e);return this.tween(r,(i.local?Yx:jx)(i,t))}function Xx(e,t){return function(){tn(this,e).delay=+t.apply(this,arguments)}}function Gx(e,t){return t=+t,function(){tn(this,e).delay=t}}function Vx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Xx:Gx)(t,e)):pe(this.node(),t).delay}function Zx(e,t){return function(){Le(this,e).duration=+t.apply(this,arguments)}}function Kx(e,t){return t=+t,function(){Le(this,e).duration=t}}function Qx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Zx:Kx)(t,e)):pe(this.node(),t).duration}function Jx(e,t){if(typeof t!="function")throw new Error;return function(){Le(this,e).ease=t}}function tC(e){var t=this._id;return arguments.length?this.each(Jx(t,e)):pe(this.node(),t).ease}function eC(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Le(this,e).ease=r}}function rC(e){if(typeof e!="function")throw new Error;return this.each(eC(this._id,e))}function iC(e){typeof e!="function"&&(e=Rc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Pe(i,this._parents,this._name,this._id)}function sC(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),u,p=0;p<h;++p)(u=l[p]||c[p])&&(d[p]=u);for(;n<i;++n)a[n]=t[n];return new Pe(a,this._parents,this._name,this._id)}function oC(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 aC(e,t,r){var i,s,o=oC(t)?tn:Le;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function nC(e,t){var r=this._id;return arguments.length<2?pe(this.node(),r).on.on(e):this.each(aC(r,e,t))}function lC(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function hC(){return this.on("end.remove",lC(this._id))}function cC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Va(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,d,u=0;u<l;++u)(h=n[u])&&(d=e.call(h,h.__data__,u,n))&&("__data__"in h&&(d.__data__=h.__data__),c[u]=d,Qs(c[u],t,r,u,c,pe(h,r)));return new Pe(o,this._parents,t,r)}function dC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ic(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var u=e.call(h,h.__data__,d,l),p,m=pe(h,r),y=0,x=u.length;y<x;++y)(p=u[y])&&Qs(p,t,r,y,u,m);o.push(u),a.push(h)}return new Pe(o,a,t,r)}var uC=ji.prototype.constructor;function fC(){return new uC(this._groups,this._parents)}function gC(e,t){var r,i,s;return function(){var o=Gr(this,e),a=(this.style.removeProperty(e),Gr(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function od(e){return function(){this.style.removeProperty(e)}}function pC(e,t,r){var i,s=r+"",o;return function(){var a=Gr(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function yC(e,t,r){var i,s,o;return function(){var a=Gr(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Gr(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function mC(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=Le(this,e),c=l.on,h=l.value[o]==null?n||(n=od(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function xC(e,t,r){var i=(e+="")=="transform"?kx:sd;return t==null?this.styleTween(e,gC(e,i)).on("end.style."+e,od(e)):typeof t=="function"?this.styleTween(e,yC(e,i,en(this,"style."+e,t))).each(mC(this._id,e)):this.styleTween(e,pC(e,i,t),r).on("end.style."+e,null)}function CC(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function bC(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&CC(e,a,r)),i}return o._value=t,o}function kC(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,bC(e,t,r??""))}function wC(e){return function(){this.textContent=e}}function SC(e){return function(){var t=e(this);this.textContent=t??""}}function TC(e){return this.tween("text",typeof e=="function"?SC(en(this,"text",e)):wC(e==null?"":e+""))}function _C(e){return function(t){this.textContent=e.call(this,t)}}function BC(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&_C(s)),t}return i._value=e,i}function vC(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,BC(e))}function LC(){for(var e=this._name,t=this._id,r=ad(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=pe(l,t);Qs(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Pe(i,this._parents,e,r)}function FC(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=Le(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var MC=0;function Pe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function ad(){return++MC}var Ae=ji.prototype;Pe.prototype={constructor:Pe,select:cC,selectAll:dC,selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:iC,merge:sC,selection:fC,transition:LC,call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:nC,attr:Wx,attrTween:Ux,style:xC,styleTween:kC,text:TC,textTween:vC,remove:hC,tween:Ox,delay:Vx,duration:Qx,ease:tC,easeVarying:rC,end:FC,[Symbol.iterator]:Ae[Symbol.iterator]};function EC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var AC={time:null,delay:0,duration:250,ease:EC};function $C(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 OC(e){var t,r;e instanceof Pe?(t=e._id,e=e._name):(t=ad(),(r=AC).time=Ja(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Qs(l,e,t,c,a,r||$C(l,t));return new Pe(i,this._parents,e,t)}ji.prototype.interrupt=Ex;ji.prototype.transition=OC;const pa=Math.PI,ya=2*pa,Je=1e-6,DC=ya-Je;function nd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function PC(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nd;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class IC{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nd:PC(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,u=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(u>Je)if(!(Math.abs(d*l-c*h)>Je)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-a,m=s-n,y=l*l+c*c,x=p*p+m*m,C=Math.sqrt(y),k=Math.sqrt(u),S=o*Math.tan((pa-Math.acos((y+u-x)/(2*C*k)))/2),T=S/k,_=S/C;Math.abs(T-1)>Je&&this._append`L${t+T*h},${r+T*d}`,this._append`A${o},${o},0,0,${+(d*p>h*m)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,u=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Je||Math.abs(this._y1-h)>Je)&&this._append`L${c},${h}`,i&&(u<0&&(u=u%ya+ya),u>DC?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:u>Je&&this._append`A${i},${i},0,${+(u>=pa)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function br(e){return function(){return e}}const aB=Math.abs,nB=Math.atan2,lB=Math.cos,hB=Math.max,cB=Math.min,dB=Math.sin,uB=Math.sqrt,El=1e-12,rn=Math.PI,Al=rn/2,fB=2*rn;function gB(e){return e>1?0:e<-1?rn:Math.acos(e)}function pB(e){return e>=1?Al:e<=-1?-Al:Math.asin(e)}function RC(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 IC(t)}function qC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ld(e){this._context=e}ld.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 Ei(e){return new ld(e)}function NC(e){return e[0]}function WC(e){return e[1]}function zC(e,t){var r=br(!0),i=null,s=Ei,o=null,a=RC(n);e=typeof e=="function"?e:e===void 0?NC:br(e),t=typeof t=="function"?t:t===void 0?WC:br(t);function n(l){var c,h=(l=qC(l)).length,d,u=!1,p;for(i==null&&(o=s(p=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+e(d,c,l),+t(d,c,l));if(p)return o=null,p+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:br(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:br(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:br(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class hd{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 cd(e){return new hd(e,!0)}function dd(e){return new hd(e,!1)}function je(){}function Os(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 Js(e){this._context=e}Js.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:Os(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:Os(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ma(e){return new Js(e)}function ud(e){this._context=e}ud.prototype={areaStart:je,areaEnd:je,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:Os(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function HC(e){return new ud(e)}function fd(e){this._context=e}fd.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:Os(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function YC(e){return new fd(e)}function gd(e,t){this._basis=new Js(e),this._beta=t}gd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const jC=(function e(t){function r(i){return t===1?new Js(i):new gd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ds(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 sn(e,t){this._context=e,this._k=(1-t)/6}sn.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:Ds(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:Ds(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 pd=(function e(t){function r(i){return new sn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function on(e,t){this._context=e,this._k=(1-t)/6}on.prototype={areaStart:je,areaEnd:je,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:Ds(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 UC=(function e(t){function r(i){return new on(i,t)}return r.tension=function(i){return e(+i)},r})(0);function an(e,t){this._context=e,this._k=(1-t)/6}an.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:Ds(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 XC=(function e(t){function r(i){return new an(i,t)}return r.tension=function(i){return e(+i)},r})(0);function nn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>El){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>El){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function yd(e,t){this._context=e,this._alpha=t}yd.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:nn(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 md=(function e(t){function r(i){return t?new yd(i,t):new sn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function xd(e,t){this._context=e,this._alpha=t}xd.prototype={areaStart:je,areaEnd:je,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:nn(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 GC=(function e(t){function r(i){return t?new xd(i,t):new on(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cd(e,t){this._context=e,this._alpha=t}Cd.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:nn(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 VC=(function e(t){function r(i){return t?new Cd(i,t):new an(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function bd(e){this._context=e}bd.prototype={areaStart:je,areaEnd:je,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 ZC(e){return new bd(e)}function $l(e){return e<0?-1:1}function Ol(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return($l(o)+$l(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function Dl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function xo(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function Ps(e){this._context=e}Ps.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:xo(this,this._t0,Dl(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,xo(this,Dl(this,r=Ol(this,e,t)),r);break;default:xo(this,this._t0,r=Ol(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kd(e){this._context=new wd(e)}(kd.prototype=Object.create(Ps.prototype)).point=function(e,t){Ps.prototype.point.call(this,t,e)};function wd(e){this._context=e}wd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function Sd(e){return new Ps(e)}function Td(e){return new kd(e)}function _d(e){this._context=e}_d.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=Pl(e),s=Pl(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Pl(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function Bd(e){return new _d(e)}function to(e,t){this._context=e,this._t=t}to.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 vd(e){return new to(e,.5)}function Ld(e){return new to(e,0)}function Fd(e){return new to(e,1)}function wi(e,t,r){this.k=e,this.x=t,this.y=r}wi.prototype={constructor:wi,scale:function(e){return e===1?this:new wi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};wi.prototype;var KC=f(e=>{const{securityLevel:t}=kt();let r=mt("body");if(t==="sandbox"){const o=mt(`#i${e}`).node()?.contentDocument??document;r=mt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),QC=f(e=>{const{handDrawnSeed:t}=kt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),JC=f(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Jr=f(e=>{const t=tb([...e.cssCompiledStyles||[],...e.cssStyles||[],...JC(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),tb=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),Md=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),ot=f(e=>{const{stylesArray:t}=Jr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Md(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),et=f((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=kt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Jr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:eb(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),eb=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const rb=Object.freeze({left:0,top:0,width:16,height:16}),Is=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ed=Object.freeze({...rb,...Is}),ib=Object.freeze({...Ed,body:"",hidden:!1}),sb=Object.freeze({width:null,height:null}),ob=Object.freeze({...sb,...Is}),ab=(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 Co(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Co(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Co(n,r)?n:null}return null},Co=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function nb(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 Il(e,t){const r=nb(e,t);for(const i in ib)i in Is?i in e&&!(i in r)&&(r[i]=Is[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function lb(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function Rl(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Il(i[n]||s[n],o)}return a(t),r.forEach(a),Il(e,o)}function hb(e,t){if(e.icons[t])return Rl(e,t,[]);const r=lb(e,[t])[t];return r?Rl(e,t,r):null}const cb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,db=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ql(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(cb);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=db.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function ub(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function fb(e,t){return e?"<defs>"+e+"</defs>"+t:t}function gb(e,t,r){const i=ub(e);return fb(i.defs,t+i.content+r)}const pb=e=>e==="unset"||e==="undefined"||e==="none";function yb(e,t){const r={...Ed,...e},i={...ob,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,k=y.vFlip;let S=y.rotate;C?k?S+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):k&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let T;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:T=s.height/2+s.top,x.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,x.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}S%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),x.length&&(o=gb(o,'<g transform="'+x.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=ql(d,l/c)):(h=a==="auto"?l:a,d=n===null?ql(h,c/l):n==="auto"?c:n);const u={},p=(y,x)=>{pb(x)||(u[y]=x.toString())};p("width",h),p("height",d);const m=[s.left,s.top,l,c];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:o}}const mb=/\sid="(\S+)"/g,Nl=new Map;function xb(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Nl.get(e)||0;return Nl.set(e,t+1),t?`${e}${t}`:e}function Cb(e){const t=[];let r;for(;r=mb.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=xb(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function bb(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 kb={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},xa=new Map,Ad=new Map,wb=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(A.debug("Registering icon pack:",t.name),"loader"in t)Ad.set(t.name,t.loader);else if("icons"in t)xa.set(t.name,t.icons);else throw A.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),$d=f(async(e,t)=>{const r=ab(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=xa.get(i);if(!s){const a=Ad.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},xa.set(i,s)}catch(n){throw A.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=hb(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Sb=f(async e=>{try{return await $d(e),!0}catch{return!1}},"isIconAvailable"),Xi=f(async(e,t,r)=>{let i;try{i=await $d(e,t?.fallbackPrefix)}catch(a){A.error(a),i=kb}const s=yb(i,t),o=bb(Cb(s.body),{...s.attributes,...r});return oe(o,Dt())},"getIconSVG"),rs={},Wt={},Wl;function Tb(){return Wl||(Wl=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.BLANK_URL=Wt.relativeFirstCharacters=Wt.whitespaceEscapeCharsRegex=Wt.urlSchemeRegex=Wt.ctrlCharactersRegex=Wt.htmlCtrlEntityRegex=Wt.htmlEntitiesRegex=Wt.invalidProtocolRegex=void 0,Wt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Wt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Wt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Wt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Wt.urlSchemeRegex=/^.+(:|&colon;)/gim,Wt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Wt.relativeFirstCharacters=[".","/"],Wt.BLANK_URL="about:blank"),Wt}var zl;function _b(){if(zl)return rs;zl=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.sanitizeUrl=o;var e=Tb();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var u=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var p=h.replace(/\\/g,"/");if(u==="mailto:"||u.includes("://"))return p;if(u==="http:"||u==="https:"){if(!i(p))return e.BLANK_URL;var m=new URL(p);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return p}return rs}var Bb=_b();function bo(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function vb(){}function Od(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ln(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Lb="[object RegExp]",Dd="[object String]",Pd="[object Number]",Id="[object Boolean]",Rd="[object Arguments]",Fb="[object Symbol]",Mb="[object Date]",Eb="[object Map]",Ab="[object Set]",$b="[object Array]",Ob="[object ArrayBuffer]",Db="[object Object]",Pb="[object DataView]",Ib="[object Uint8Array]",Rb="[object Uint8ClampedArray]",qb="[object Uint16Array]",Nb="[object Uint32Array]",Wb="[object Int8Array]",zb="[object Int16Array]",Hb="[object Int32Array]",Yb="[object Float32Array]",jb="[object Float64Array]",Hl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function hn(e){return typeof Hl.Buffer<"u"&&Hl.Buffer.isBuffer(e)}function Ub(e){return Number.isSafeInteger(e)&&e>=0}function qd(e){return e!=null&&typeof e!="function"&&Ub(e.length)}function Xb(e){return e==="__proto__"}function cn(e){return e==null||typeof e!="object"&&typeof e!="function"}function dn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Gb(e,t){return vr(e,void 0,e,new Map,t)}function vr(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(cn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=vr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,vr(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(vr(n,void 0,r,i,s));return a}if(hn(e))return e.subarray();if(dn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=vr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),he(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),he(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),he(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,he(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),he(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),he(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),he(a,e,r,i,s),a}if(typeof e=="object"&&Vb(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),he(a,e,r,i,s),a}return e}function he(e,t,r=e,i,s){const o=[...Object.keys(t),...Od(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=vr(t[n],n,r,i,s))}}function Vb(e){switch(ln(e)){case Rd:case $b:case Ob:case Pb:case Id:case Mb:case Yb:case jb:case Wb:case zb:case Hb:case Eb:case Pd:case Db:case Lb:case Ab:case Dd:case Fb:case Ib:case Rb:case qb:case Nb:return!0;default:return!1}}function Zb(e,t){return Gb(e,(r,i,s,o)=>{if(typeof e=="object"){if(ln(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),he(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Pd:case Dd:case Id:{const a=new e.constructor(e?.valueOf());return he(a,e),a}case Rd:{const a={};return he(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Yl(e){return Zb(e)}function Ca(e){return e!==null&&typeof e=="object"&&ln(e)==="[object Arguments]"}function ba(e){return typeof e=="object"&&e!==null}function Kb(e){return ba(e)&&qd(e)}function ys(e){return dn(e)}function Qb(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Gi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(Gi.Cache||Map),r}Gi.Cache=Map;function Jb(e){if(cn(e))return e;if(Array.isArray(e)||dn(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 tk(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=ms(s,a,i,new Map)}return s}function ms(e,t,r,i){if(cn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return Jb(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...Od(t)];for(let o=0;o<s.length;o++){const a=s[o];if(Xb(a))continue;let n=t[a],l=e[a];if(Ca(n)&&(n={...n}),Ca(l)&&(l={...l}),hn(n)&&(n=Yl(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let u=0;u<d.length;u++){const p=d[u];h[p]=l[p]}l=h}else if(Kb(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||ba(l)&&ba(n)&&(bo(l)||bo(n)||ys(l)||ys(n))?e[a]=ms(l,n,r,i):l==null&&bo(n)?e[a]=ms({},n,r,i):l==null&&ys(n)?e[a]=Yl(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function ek(e,...t){return tk(e,...t,vb)}function jl(e){if(e==null)return!0;if(qd(e))return typeof e.splice!="function"&&typeof e!="string"&&!hn(e)&&!ys(e)&&!Ca(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 Qb(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var rk="​",ik={curveBasis:ma,curveBasisClosed:HC,curveBasisOpen:YC,curveBumpX:cd,curveBumpY:dd,curveBundle:jC,curveCardinalClosed:UC,curveCardinalOpen:XC,curveCardinal:pd,curveCatmullRomClosed:GC,curveCatmullRomOpen:VC,curveCatmullRom:md,curveLinear:Ei,curveLinearClosed:ZC,curveMonotoneX:Sd,curveMonotoneY:Td,curveNatural:Bd,curveStep:vd,curveStepAfter:Fd,curveStepBefore:Ld},sk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ok=f(function(e,t){const r=Nd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Ss(a),i=zt(i,[...a])}else i=r.args;if(!i)return;let s=Ha(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Nd=f(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${sk.source})(?=[}][%]{2}).*
127
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=Mi.exec(e))!==null;)if(i.index===Mi.lastIndex&&Mi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return A.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),ak=f(function(e){return e.replace(Mi,"")},"removeDirectives"),nk=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function un(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return ik[r]??t}f(un,"interpolateToCurve");function Wd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Bb.sanitizeUrl(r):r}f(Wd,"formatUrl");var lk=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){A.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function fn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(fn,"distance");function zd(e){let t,r=0;e.forEach(s=>{r+=fn(s,t),t=s});const i=r/2;return gn(e,i)}f(zd,"traverseEdge");function Hd(e){return e.length===1?e[0]:zd(e)}f(Hd,"calcLabelPosition");var Ul=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),gn=f((e,t)=>{let r,i=t;for(const s of e){if(r){const o=fn(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Ul((1-a)*r.x+a*s.x,5),y:Ul((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),hk=f((e,t,r)=>{A.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=gn(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Yd(e,t,r){const i=structuredClone(r);A.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=gn(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}f(Yd,"calcTerminalLabelPosition");function jd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(jd,"getStylesFromArray");var Xl=0,ck=f(()=>(Xl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Xl),"generateId");function Ud(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Ud,"makeRandomHex");var dk=f(e=>Ud(e.length),"random"),uk=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),fk=f(function(e,t){const r=t.text.replace(Yi.lineBreakRegex," "),[,i]=eo(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),gk=Gi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=Ie(`${a} `,r),c=Ie(o,r);if(l>t){const{hyphenatedStrings:u,remainingWord:p}=pk(a,t,"-",r);s.push(o,...u),o=p}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),pk=Gi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(Ie(c,i)>=t){const d=l+1,u=s.length===d,p=`${c}${r}`;o.push(u?c:p),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Xd(e,t){return pn(e,t).height}f(Xd,"calculateTextHeight");function Ie(e,t){return pn(e,t).width}f(Ie,"calculateTextWidth");var pn=Gi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=eo(r),a=["sans-serif",i],n=e.split(Yi.lineBreakRegex),l=[],c=mt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const u of a){let p=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const x=uk();x.text=y||rk;const C=fk(h,x).style("font-size",o).style("font-weight",s).style("font-family",u),k=(C._groups||C)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),p=Math.round(k.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}h.remove();const d=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[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Yr,yk=(Yr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(Yr,"InitIDGenerator"),Yr),is,mk=f(function(e){return is=is||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),is.innerHTML=e,unescape(is.textContent)},"entityDecode");function yn(e){return"str"in e}f(yn,"isDetailedError");var xk=f((e,t,r,i)=>{if(!i)return;const s=e.node()?.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"),eo=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function mn(e,t){return ek({},e,t)}f(mn,"cleanAndMerge");var Vt={assignWithDepth:zt,wrapLabel:gk,calculateTextHeight:Xd,calculateTextWidth:Ie,calculateTextDimensions:pn,cleanAndMerge:mn,detectInit:ok,detectDirective:Nd,isSubstringInArray:nk,interpolateToCurve:un,calcLabelPosition:Hd,calcCardinalityPosition:hk,calcTerminalLabelPosition:Yd,formatUrl:Wd,getStylesFromArray:jd,generateId:ck,random:dk,runFunc:lk,entityDecode:mk,insertTitle:xk,isLabelCoordinateInPath:Gd,parseFontSize:eo,InitIDGenerator:yk},Ck=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ue=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),yB=f((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Nt(e){return e??null}f(Nt,"handleUndefinedAttr");function Gd(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(Gd,"isLabelCoordinateInPath");var xs={exports:{}},Gl=xs.exports,Vl;function bk(){return Vl||(Vl=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var d;d=h.shift();)d()},measure:function(h,d){var u=d?h.bind(d):h;return this.reads.push(u),o(this),u},mutate:function(h,d){var u=d?h.bind(d):h;return this.writes.push(u),o(this),u},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var d=Object.create(this);return l(d,h),d.fastdom=this,d.initialize&&d.initialize(),d},catch:null};function o(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var d=h.writes,u=h.reads,p;try{r("flushing reads",u.length),h.runTasks(u),r("flushing writes",d.length),h.runTasks(d)}catch(m){p=m}if(h.scheduled=!1,(u.length||d.length)&&o(h),p)if(r("task errored",p.message),h.catch)h.catch(p);else throw p}function n(h,d){var u=h.indexOf(d);return!!~u&&!!h.splice(u,1)}function l(h,d){for(var u in d)d.hasOwnProperty(u)&&(h[u]=d[u])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof Gl<"u"?Gl:globalThis)})(xs)),xs.exports}var kk=bk();const wk=fc(kk);var ko={exports:{}},Zl;function Sk(){return Zl||(Zl=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,o=s.get(i);this.fastdom.clear(o),s.delete(i)}};function r(i,s,o,a){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(d,u){c=l[s](function(){n.delete(h);try{d(a?o.call(a):o())}catch(p){u(p)}},a)});return n.set(h,c),h}e.exports=t})()})(ko)),ko.exports}var Tk=Sk();const _k=fc(Tk);function xn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ur=xn();function Vd(e){ur=e}var Ai={exec:()=>null};function Bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(Qt.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var Bk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Qt={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")},vk=/^(?:[ \t]*(?:\n|$))+/,Lk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cn=/(?:[*+-]|\d{1,9}[.)])/,Zd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kd=Bt(Zd).replace(/bull/g,Cn).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(),Ek=Bt(Zd).replace(/bull/g,Cn).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(),bn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ak=/^[^\n]+/,kn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$k=Bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ok=Bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cn).getRegex(),ro="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",wn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dk=Bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wn).replace("tag",ro).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qd=Bt(bn).replace("hr",Vi).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",ro).getRegex(),Pk=Bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qd).getRegex(),Sn={blockquote:Pk,code:Lk,def:$k,fences:Fk,heading:Mk,hr:Vi,html:Dk,lheading:Kd,list:Ok,newline:vk,paragraph:Qd,table:Ai,text:Ak},Kl=Bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vi).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",ro).getRegex(),Ik={...Sn,lheading:Ek,table:Kl,paragraph:Bt(bn).replace("hr",Vi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kl).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",ro).getRegex()},Rk={...Sn,html:Bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wn).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:Ai,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Bt(bn).replace("hr",Vi).replace("heading",` *#{1,6} *[^
128
- ]`).replace("lheading",Kd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Jd=/^( {2,}|\\)\n(?!\s*$)/,Wk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,io=/[\p{P}\p{S}]/u,Tn=/[\s\p{P}\p{S}]/u,tu=/[^\s\p{P}\p{S}]/u,zk=Bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Tn).getRegex(),eu=/(?!~)[\p{P}\p{S}]/u,Hk=/(?!~)[\s\p{P}\p{S}]/u,Yk=/(?:[^\s\p{P}\p{S}]|~)/u,jk=Bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Bk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ru=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Uk=Bt(ru,"u").replace(/punct/g,io).getRegex(),Xk=Bt(ru,"u").replace(/punct/g,eu).getRegex(),iu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gk=Bt(iu,"gu").replace(/notPunctSpace/g,tu).replace(/punctSpace/g,Tn).replace(/punct/g,io).getRegex(),Vk=Bt(iu,"gu").replace(/notPunctSpace/g,Yk).replace(/punctSpace/g,Hk).replace(/punct/g,eu).getRegex(),Zk=Bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tu).replace(/punctSpace/g,Tn).replace(/punct/g,io).getRegex(),Kk=Bt(/\\(punct)/,"gu").replace(/punct/g,io).getRegex(),Qk=Bt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Jk=Bt(wn).replace("(?:-->|$)","-->").getRegex(),t1=Bt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Jk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Rs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,e1=Bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Rs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),su=Bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Rs).replace("ref",kn).getRegex(),ou=Bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",kn).getRegex(),r1=Bt("reflink|nolink(?!\\()","g").replace("reflink",su).replace("nolink",ou).getRegex(),Ql=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_n={_backpedal:Ai,anyPunctuation:Kk,autolink:Qk,blockSkip:jk,br:Jd,code:Nk,del:Ai,emStrongLDelim:Uk,emStrongRDelimAst:Gk,emStrongRDelimUnd:Zk,escape:qk,link:e1,nolink:ou,punctuation:zk,reflink:su,reflinkSearch:r1,tag:t1,text:Wk,url:Ai},i1={..._n,link:Bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Rs).getRegex(),reflink:Bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Rs).getRegex()},ka={..._n,emStrongRDelimAst:Vk,emStrongLDelim:Xk,url:Bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ql).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ql).getRegex()},s1={...ka,br:Bt(Jd).replace("{2,}","*").getRegex(),text:Bt(ka.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ss={normal:Sn,gfm:Ik,pedantic:Rk},fi={normal:_n,gfm:ka,breaks:s1,pedantic:i1},o1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jl=e=>o1[e];function Ce(e,t){if(t){if(Qt.escapeTest.test(e))return e.replace(Qt.escapeReplace,Jl)}else if(Qt.escapeTestNoEncode.test(e))return e.replace(Qt.escapeReplaceNoEncode,Jl);return e}function th(e){try{e=encodeURI(e).replace(Qt.percentDecode,"%")}catch{return null}return e}function eh(e,t){let r=e.replace(Qt.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Qt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.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(Qt.slashPipe,"|");return i}function gi(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 a1(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 rh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function n1(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
129
- `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
130
- `)}var qs=class{options;rules;lexer;constructor(t){this.options=t||ur}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:gi(i,`
131
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=n1(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=gi(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:gi(r[0],`
132
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=gi(r[0],`
133
- `).split(`
134
- `),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
135
- `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
136
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
137
- ${h}`:h,o=o?`${o}
138
- ${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=u,i.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let m=p,y=m.raw+`
139
- `+i.join(`
140
- `),x=this.blockquote(y);a[a.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,o=o.substring(0,o.length-m.text.length)+x.text;break}else if(p?.type==="list"){let m=p,y=m.raw+`
141
- `+i.join(`
142
- `),x=this.list(y);a[a.length-1]=x,s=s.substring(0,s.length-p.raw.length)+x.raw,o=o.substring(0,o.length-m.raw.length)+x.raw,i=y.substring(a.at(-1).raw.length).split(`
143
- `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let u=r[2].split(`
144
- `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),p=t.split(`
145
- `,1)[0],m=!u.trim(),y=0;if(this.options.pedantic?(y=2,d=u.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=u.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(p)&&(h+=p+`
146
- `,t=t.substring(p.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),_=this.rules.other.headingBeginRegex(y),F=this.rules.other.htmlBeginRegex(y);for(;t;){let L=t.split(`
147
- `,1)[0],v;if(p=L,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),v=p):v=p.replace(this.rules.other.tabCharGlobal," "),T.test(p)||_.test(p)||F.test(p)||k.test(p)||S.test(p))break;if(v.search(this.rules.other.nonSpaceChar)>=y||!p.trim())d+=`
148
- `+v.slice(y);else{if(m||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(u)||_.test(u)||S.test(u))break;d+=`
149
- `+p}!m&&!p.trim()&&(m=!0),h+=L+`
150
- `,t=t.substring(L.length+1),u=v.slice(y)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(C=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!x,checked:C,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(u=>u.type==="space"),d=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=eh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
151
- `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(eh(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
152
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=gi(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=a1(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),rh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return rh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,u=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let m=u.slice(1,-1);return{type:"em",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ce=class wa{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ur,this.options.tokenizer=this.options.tokenizer||new qs,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:Qt,block:ss.normal,inline:fi.normal};this.options.pedantic?(r.block=ss.pedantic,r.inline=fi.pedantic):this.options.gfm&&(r.block=ss.gfm,this.options.breaks?r.inline=fi.breaks:r.inline=fi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ss,inline:fi}}static lex(t,r){return new wa(r).lex(t)}static lexInline(t,r){return new wa(r).inlineTokens(t)}lex(t){t=t.replace(Qt.carriageReturn,`
153
- `),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){for(this.options.pedantic&&(t=t.replace(Qt.tabCharGlobal," ").replace(Qt.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
154
- `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
155
- `)?"":`
156
- `)+s.raw,a.text+=`
157
- `+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
158
- `)?"":`
159
- `)+s.raw,a.text+=`
160
- `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
161
- `)?"":`
162
- `)+s.raw,a.text+=`
163
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
164
- `)?"":`
165
- `)+s.raw,a.text+=`
166
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.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.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),u;this.options.extensions.startInline.forEach(p=>{u=p.call({lexer:this},d),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Ns=class{options;parser;constructor(t){this.options=t||ur}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(Qt.notSpaceStart)?.[0],o=t.replace(Qt.endingNewline,"")+`
167
- `;return s?'<pre><code class="language-'+Ce(s)+'">'+(i?o:Ce(o,!0))+`</code></pre>
168
- `:"<pre><code>"+(i?o:Ce(o,!0))+`</code></pre>
169
- `}blockquote({tokens:t}){return`<blockquote>
170
- ${this.parser.parse(t)}</blockquote>
171
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
172
- `}hr(t){return`<hr>
173
- `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
174
- `+s+"</"+o+`>
175
- `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+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=i+" "+Ce(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
176
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
177
- `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
178
- <thead>
179
- `+r+`</thead>
180
- `+s+`</table>
181
- `}tablerow({text:t}){return`<tr>
182
- ${t}</tr>
183
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
184
- `}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>${Ce(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=th(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+Ce(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=th(t);if(o===null)return Ce(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Ce(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ce(t.text)}},Bn=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""}},de=class Sa{options;renderer;textRenderer;constructor(t){this.options=t||ur,this.options.renderer=this.options.renderer||new Ns,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bn}static parse(t,r){return new Sa(r).parse(t)}static parseInline(t,r){return new Sa(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
185
- `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Si=class{options;block;constructor(t){this.options=t||ur}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ce.lex:ce.lexInline}provideParser(){return this.block?de.parse:de.parseInline}},l1=class{defaults=xn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=de;Renderer=Ns;TextRenderer=Bn;Lexer=ce;Tokenizer=qs;Hooks=Si;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Ns(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new qs(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Si;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];Si.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&Si.passThroughHooksRespectAsync.has(a))return(async()=>{let u=await l.call(o,h);return c.call(o,u)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await l.apply(o,h);return u===!1&&(u=await c.apply(o,h)),u})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ce.lex(t,r??this.defaults)}parser(t,r){return de.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?ce.lex:ce.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?de.parse:de.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ce.lex:ce.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?de.parse:de.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
186
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ce(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},hr=new l1;function Ft(e,t){return hr.parse(e,t)}Ft.options=Ft.setOptions=function(e){return hr.setOptions(e),Ft.defaults=hr.defaults,Vd(Ft.defaults),Ft};Ft.getDefaults=xn;Ft.defaults=ur;Ft.use=function(...e){return hr.use(...e),Ft.defaults=hr.defaults,Vd(Ft.defaults),Ft};Ft.walkTokens=function(e,t){return hr.walkTokens(e,t)};Ft.parseInline=hr.parseInline;Ft.Parser=de;Ft.parser=de.parse;Ft.Renderer=Ns;Ft.TextRenderer=Bn;Ft.Lexer=ce;Ft.lexer=ce.lex;Ft.Tokenizer=qs;Ft.Hooks=Si;Ft.parse=Ft;Ft.options;Ft.setOptions;Ft.use;Ft.walkTokens;Ft.parseInline;de.parse;ce.lex;function au(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 d,u;return(u=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&u!==void 0?u:0})):n},[]);if(s.length){var o=new RegExp(`
187
- [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(o,`
188
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
189
- `)&&(d=String(n).split(`
190
- `).map(function(u,p){return p===0?u:"".concat(h).concat(u)}).join(`
191
- `)),a+=d+i[l+1]}),a}var Ta=typeof performance<"u"&&typeof performance.now=="function",kr=f(()=>Ta?performance.now():0,"now"),wo="🧜 ",h1="Mermaid render",c1="Mermaid",d1={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},jr;jr=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=kr();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(kr()-i)}}async tick(t,r){if(!this.enabled)return r();const i=kr();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(kr()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??t?.name;return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:kr(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Ta&&typeof performance.mark=="function")try{performance.mark(`${wo}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=kr();if(t.duration=r-t.start,Ta&&typeof performance.measure=="function")try{performance.measure(`${wo}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:h1,trackGroup:c1,color:d1[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,o=["ms % phase"],a=f((l,c)=>{const h=" ".repeat(c),d=l.duration.toFixed(1).padStart(8),u=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${d} ${u} ${h}${l.name}`);for(const p of l.children)a(p,c+1);if(l.children.length>0){const p=l.children.reduce((y,x)=>y+x.duration,0),m=l.duration-p;if(m>.5){const y=m.toFixed(1).padStart(8);o.push(`${y} ${h} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){o.push("—— buckets (summed) ——");for(const l of n)o.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${wo}mermaid render profile · ${s}
192
- ${o.join(`
193
- `)}`)}},f(jr,"Profiler");globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var u1=wk.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(_k),cr=u1;function nu(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
194
- `).replace(/\n{2,}/g,`
195
- `);return au(i)}f(nu,"preprocessMarkdown");function lu(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}f(lu,"nonMarkdownToLines");function hu(e,t={}){const r=nu(e,t),i=Ft.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
196
- `).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(u=>{u=u.replace(/&#39;/g,"'"),u&&s[o].push({content:u,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return f(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}f(hu,"markdownToLines");function cu(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(cu,"nonMarkdownToHTML");function du(e,{markdownAutoWrap:t}={}){const r=Ft.lexer(e);function i(s){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>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(A.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(du,"markdownToHTML");function uu(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(uu,"splitTextToChars");function fu(e,t){const r=uu(t.content);return vn(e,[],r,t.type)}f(fu,"splitWordToFitWidth");function vn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?vn(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(vn,"splitWordToFitWidthRecursion");function gu(e,t){if(e.some(({content:r})=>r.includes(`
197
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ws(e,t)}f(gu,"splitLineToFitWidth");function Ws(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return Ws(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=fu(t,o);r.push([n]),l.content&&e.unshift(l)}return Ws(e,t,r)}f(Ws,"splitLineToFitWidthRecursion");function _a(e,t){t&&e.attr("style",t)}f(_a,"applyStyle");var ih=16384;async function pu(e,t,r,i,s=!1,o=Dt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,ih)}px`),a.attr("height",`${Math.min(10*r,ih)}px`);const n=a.append("xhtml:div"),l=Oi(t.label)?await Ac(t.label.replace(Yi.lineBreakRegex,`
198
- `),o):oe(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),_a(h,t.labelStyle),h.attr("class",`${c} ${i}`),_a(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await cr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}f(pu,"addHtmlSpan");function so(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(so,"createTspan");function yu(e,t,r){const i=e.append("text"),s=so(i,1,t);oo(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}f(yu,"computeWidthOfText");function f1(e,t,r){const i=e.append("text"),s=so(i,1,t);oo(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}f(f1,"computeDimensionOfText");function mu(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=f(p=>yu(a,1.1,p)<=e,"checkWidth"),u=d(h)?[h]:gu(h,d);for(const p of u){const m=so(l,c,1.1,s);oo(m,p),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}f(mu,"createFormattedText");function Ba(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(Ba,"decodeHTMLEntities");function oo(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(Ba(r.content)):s.text(" "+Ba(r.content))})}f(oo,"updateTextContentAndStyles");async function xu(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await Sb(n)?await Xi(n,void 0,{class:"label-icon"}):`<i class='${oe(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(xu,"replaceIconSubstring");var ye=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(A.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?du(t,h):cu(t),u=await xu(Ue(d),h),p=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Oi(t)?p:u,labelStyle:r.replace("fill:","color:")};return await pu(e,m,l,s,c,h)}else{const d=Ue(t.replace(/<br\s*\/?>/g,"<br/>")),u=a?hu(d.replace("<br>","<br/>"),h):lu(d),p=mu(l,e,u,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mt(p).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");mt(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mt(p).select("text").attr("style",y)}return i?mt(p).selectAll("tspan.text-outer-tspan").classed("title-row",!0):mt(p).selectAll("tspan.text-outer-tspan").classed("row",!0),p}},"createText");function So(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function g1(e,t){return e[0]===t[0]&&e[1]===t[1]}function p1(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)So(c,n,s);const l=(function(c,h,d){const u=[];for(const k of c){const S=[...k];g1(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&u.push(S)}const p=[];h=Math.max(h,.1);const m=[];for(const k of u)for(let S=0;S<k.length-1;S++){const T=k[S],_=k[S+1];if(T[1]!==_[1]){const F=Math.min(T[1],_[1]);m.push({ymin:F,ymax:Math.max(T[1],_[1]),x:F===T[1]?T[0]:_[0],islope:(_[0]-T[0])/(_[1]-T[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return p;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>x);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:x,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=x))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(d!==1||C%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const T=y[k].edge,_=y[S].edge;p.push([[Math.round(T.x),x],[Math.round(_.x),x]])}x+=d,y.forEach((k=>{k.edge.x=k.edge.x+d*k.edge.islope})),C++}return p})(a,o,i);if(s){for(const c of a)So(c,n,-s);(function(c,h,d){const u=[];c.forEach((p=>u.push(...p))),So(u,h,d)})(l,n,-s)}return l}function Zi(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),p1(e,s,i,o||1)}class Ln{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Zi(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 ao(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 y1 extends Ln{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Zi(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)ao([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class m1 extends Ln{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class x1{constructor(t){this.helper=t}fillPolygons(t,r){const i=Zi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=ao(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,u=(n[0][0]+n[1][0])/2-s/4,p=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=p+d+m*s,x=u-a+2*Math.random()*a,C=y-a+2*Math.random()*a,k=this.helper.ellipse(x,C,o,o,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class C1{constructor(t){this.helper=t}fillPolygons(t,r){const i=Zi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=ao(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const u=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let p=0;p<l;p++){const m=p*(i+s),y=m+i,x=[h[0]+m*Math.cos(u)+c*Math.cos(u),h[1]+m*Math.sin(u)+c*Math.sin(u)],C=[h[0]+y*Math.cos(u)+c*Math.cos(u),h[1]+y*Math.sin(u)+c*Math.sin(u)];o.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),o}}class b1{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=Zi(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=ao(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const u=2*d*r,p=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],x=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],C=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const Jt={};class k1{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const w1=0,To=1,sh=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 _o(e,t){return e.type===t}function Fn(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:w1,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:To,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:sh,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!_o(o,sh);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Fn("M0,0"+e);s++,a=os[o.text],i=o.text}else _o(o,To)?a=os[i]:(s++,a=os[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!_o(c,To))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+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Cu(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function bu(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,u=0;r==="C"||r==="S"?(d=i+(i-n),u=s+(s-l)):(d=i,u=s),t.push({key:"C",data:[d,u,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,u]=h;let p=0,m=0;r==="Q"||r==="T"?(p=i+(i-n),m=s+(s-l)):(p=i,m=s);const y=i+2*(p-i)/3,x=s+2*(m-s)/3,C=d+2*(p-d)/3,k=u+2*(m-u)/3;t.push({key:"C",data:[y,x,C,k,d,u]}),n=p,l=m,i=d,s=u;break}case"Q":{const[d,u,p,m]=h,y=i+2*(d-i)/3,x=s+2*(u-s)/3,C=p+2*(d-p)/3,k=m+2*(u-m)/3;t.push({key:"C",data:[y,x,C,k,p,m]}),n=d,l=u,i=p,s=m;break}case"A":{const d=Math.abs(h[0]),u=Math.abs(h[1]),p=h[2],m=h[3],y=h[4],x=h[5],C=h[6];d===0||u===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(ku(i,s,x,C,d,u,p,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}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 ku(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let u=[],p=0,m=0,y=0,x=0;if(c)[p,m,y,x]=c;else{[e,t]=pi(e,t,-h),[r,i]=pi(r,i,-h);const I=(e-r)/2,q=(t-i)/2;let Z=I*I/(s*s)+q*q/(o*o);Z>1&&(Z=Math.sqrt(Z),s*=Z,o*=Z);const $=s*s,Q=o*o,K=$*Q-$*q*q-Q*I*I,ut=$*q*q+Q*I*I,ht=(n===l?-1:1)*Math.sqrt(Math.abs(K/ut));y=ht*s*q/o+(e+r)/2,x=ht*-o*I/s+(t+i)/2,p=Math.asin(parseFloat(((t-x)/o).toFixed(9))),m=Math.asin(parseFloat(((i-x)/o).toFixed(9))),e<y&&(p=Math.PI-p),r<y&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),l&&p>m&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let C=m-p;if(Math.abs(C)>120*Math.PI/180){const I=m,q=r,Z=i;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=ku(r=y+s*Math.cos(m),i=x+o*Math.sin(m),q,Z,s,o,a,0,l,[m,I,y,x])}C=m-p;const k=Math.cos(p),S=Math.sin(p),T=Math.cos(m),_=Math.sin(m),F=Math.tan(C/4),L=4/3*s*F,v=4/3*o*F,j=[e,t],Y=[e+L*S,t-v*k],N=[r+L*_,i-v*T],J=[r,i];if(Y[0]=2*j[0]-Y[0],Y[1]=2*j[1]-Y[1],c)return[Y,N,J].concat(u);{u=[Y,N,J].concat(u);const I=[];for(let q=0;q<u.length;q+=3){const Z=pi(u[q][0],u[q][1],h),$=pi(u[q+1][0],u[q+1][1],h),Q=pi(u[q+2][0],u[q+2][1],h);I.push([Z[0],Z[1],$[0],$[1],Q[0],Q[1]])}return I}}const S1={randOffset:function(e,t){return gt(e,t)},randOffsetWithRange:function(e,t,r){return zs(e,t,r)},ellipse:function(e,t,r,i,s){const o=Su(r,i,s);return va(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Xe(e,t,r,i,s,!0)}};function wu(e,t,r,i,s){return{type:"path",ops:Xe(e,t,r,i,s)}}function Cs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Xe(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Xe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?wu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function T1(e,t,r,i,s){return(function(o,a){return Cs(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function oh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=as(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:as(r[0],1.5*(1+.22*t.roughness),lh(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=as(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:as(a,1.5*(1+.22*t.roughness),lh(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 Su(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=gt(a*l,r),n+=gt(n*l,r),{increment:o,rx:a,ry:n}}function va(e,t,r,i){const[s,o]=hh(i.increment,e,t,i.rx,i.ry,1,i.increment*zs(.1,zs(.4,1,r),r),r);let a=Hs(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=hh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Hs(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function ah(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),u=Math.abs(i/2);d+=gt(.01*d,l),u+=gt(.01*u,l);let p=s,m=o;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,x=Math.min(y/2,(m-p)/2),C=ch(x,c,h,d,u,p,m,1,l);if(!l.disableMultiStroke){const k=ch(x,c,h,d,u,p,m,1.5,l);C.push(...k)}return a&&(n?C.push(...Xe(c,h,c+d*Math.cos(p),h+u*Math.sin(p),l),...Xe(c,h,c+d*Math.cos(m),h+u*Math.sin(m),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(p),h+u*Math.sin(p)]})),{type:"path",ops:C}}function nh(e,t){const r=bu(Cu(Fn(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Xe(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,u,p]=n;i.push(..._1(l,c,h,d,u,p,o,t)),o=[u,p];break}case"Z":i.push(...Xe(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Bo(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+gt(s,t),i[0][1]+gt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+gt(s,t),i[a][1]+gt(s,t)]})}}return{type:"fillPath",ops:r}}function wr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Jt[s])switch(s){case"zigzag":Jt[s]||(Jt[s]=new y1(i));break;case"cross-hatch":Jt[s]||(Jt[s]=new m1(i));break;case"dots":Jt[s]||(Jt[s]=new x1(i));break;case"dashed":Jt[s]||(Jt[s]=new C1(i));break;case"zigzag-line":Jt[s]||(Jt[s]=new b1(i));break;default:s="hachure",Jt[s]||(Jt[s]=new Ln(i))}return Jt[s]})(t,S1).fillPolygons(e,t)}function lh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Tu(e){return e.randomizer||(e.randomizer=new k1(e.seed||0)),e.randomizer.next()}function zs(e,t,r,i=1){return r.roughness*i*(Tu(r)*(t-e)+e)}function gt(e,t,r=1){return zs(-e,e,t,r)}function Xe(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=La(e,t,r,i,s,!0,!1);if(a)return n;const l=La(e,t,r,i,s,!0,!0);return n.concat(l)}function La(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,u=.2+.2*Tu(s);let p=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;p=gt(p,s,c),m=gt(m,s,c);const y=[],x=()=>gt(d,s,c),C=()=>gt(h,s,c),k=s.preserveVertices;return a?y.push({op:"move",data:[e+(k?0:x()),t+(k?0:x())]}):y.push({op:"move",data:[e+(k?0:gt(h,s,c)),t+(k?0:gt(h,s,c))]}),a?y.push({op:"bcurveTo",data:[p+e+(r-e)*u+x(),m+t+(i-t)*u+x(),p+e+2*(r-e)*u+x(),m+t+2*(i-t)*u+x(),r+(k?0:x()),i+(k?0:x())]}):y.push({op:"bcurveTo",data:[p+e+(r-e)*u+C(),m+t+(i-t)*u+C(),p+e+2*(r-e)*u+C(),m+t+2*(i-t)*u+C(),r+(k?0:C()),i+(k?0:C())]}),y}function as(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+gt(t,r),e[0][1]+gt(t,r)]),i.push([e[0][0]+gt(t,r),e[0][1]+gt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+gt(t,r),e[s][1]+gt(t,r)]),s===e.length-1&&i.push([e[s][0]+gt(t,r),e[s][1]+gt(t,r)]);return Hs(i,null,r)}function Hs(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...La(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function hh(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}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=gt(.5,n)-Math.PI/2;c.push([gt(o,n)+t+.9*i*Math.cos(h-e),gt(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let u=h;u<d;u+=e){const p=[gt(o,n)+t+i*Math.cos(u),gt(o,n)+r+s*Math.sin(u)];l.push(p),c.push(p)}c.push([gt(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),gt(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([gt(o,n)+t+.98*i*Math.cos(h+a),gt(o,n)+r+.98*s*Math.sin(h+a)]),c.push([gt(o,n)+t+.9*i*Math.cos(h+.5*a),gt(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function ch(e,t,r,i,s,o,a,n,l){const c=o+gt(.1,l),h=[];h.push([gt(n,l)+t+.9*i*Math.cos(c-e),gt(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([gt(n,l)+t+i*Math.cos(d),gt(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),Hs(h,null,l)}function _1(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let p=0;p<d;p++)p===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(u?0:gt(c[0],n)),a[1]+(u?0:gt(c[0],n))]}),h=u?[s,o]:[s+gt(c[p],n),o+gt(c[p],n)],l.push({op:"bcurveTo",data:[e+gt(c[p],n),t+gt(c[p],n),r+gt(c[p],n),i+gt(c[p],n),h[0],h[1]]});return l}function yi(e){return[...e]}function dh(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(yi(e[0]),yi(e[1]),yi(e[2]),yi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(yi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function bs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function B1(e,t,r){const i=bs(t,r);if(i===0)return bs(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)),bs(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 Fa(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],u=n[l+3];let p=3*h[0]-2*c[0]-u[0];p*=p;let m=3*h[1]-2*c[1]-u[1];m*=m;let y=3*d[0]-2*u[0]-c[0];y*=y;let x=3*d[1]-2*u[1]-c[1];return x*=x,p<y&&(p=y),m<x&&(m=x),p+m})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(bs(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],u=tr(l,c,.5),p=tr(c,h,.5),m=tr(h,d,.5),y=tr(u,p,.5),x=tr(p,m,.5),C=tr(y,x,.5);Fa([l,u,y,C],0,r,s),Fa([C,x,m,d],0,r,s)}var o,a;return s}function v1(e,t){return Ys(e,0,e.length,t)}function Ys(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=B1(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Ys(e,t,c+1,i,o),Ys(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function vo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)Fa(e,3*o,t,i);return r&&r>0?Ys(i,0,i.length,r):i}const re="none";class js{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[wu(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=T1(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Bo([c],a)):n.push(wr([c],a))}return a.stroke!==re&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Su(i,s,a),c=va(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=va(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(wr([c.estimatedPoints],a));return a.stroke!==re&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Cs(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=ah(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const u=Object.assign({},c);u.disableMultiStroke=!0;const p=ah(t,r,i,s,o,a,!0,!1,u);p.type="fillPath",h.push(p)}else h.push((function(u,p,m,y,x,C,k){const S=u,T=p;let _=Math.abs(m/2),F=Math.abs(y/2);_+=gt(.01*_,k),F+=gt(.01*F,k);let L=x,v=C;for(;L<0;)L+=2*Math.PI,v+=2*Math.PI;v-L>2*Math.PI&&(L=0,v=2*Math.PI);const j=(v-L)/k.curveStepCount,Y=[];for(let N=L;N<=v;N+=j)Y.push([S+_*Math.cos(N),T+F*Math.sin(N)]);return Y.push([S+_*Math.cos(v),T+F*Math.sin(v)]),Y.push([S,T]),wr([Y],k)})(t,r,i,s,o,a,c));return c.stroke!==re&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=oh(t,i);if(i.fill&&i.fill!==re)if(i.fillStyle==="solid"){const a=oh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...vo(dh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...vo(dh(c),10,(1+i.roughness)/2))}a.length&&s.push(wr([a],i))}return i.stroke!==re&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Cs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Bo([t],i)):s.push(wr([t],i))),i.stroke!==re&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==re,a=i.stroke!==re,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,u){const p=bu(Cu(Fn(h))),m=[];let y=[],x=[0,0],C=[];const k=()=>{C.length>=4&&y.push(...vo(C,d)),C=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:_,data:F}of p)switch(_){case"M":S(),x=[F[0],F[1]],y.push(x);break;case"L":k(),y.push([F[0],F[1]]);break;case"C":if(!C.length){const L=y.length?y[y.length-1]:x;C.push([L[0],L[1]])}C.push([F[0],F[1]]),C.push([F[2],F[3]]),C.push([F[4],F[5]]);break;case"Z":k(),y.push([x[0],x[1]])}if(S(),!u)return m;const T=[];for(const _ of m){const F=v1(_,u);F.length&&T.push(F)}return T})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=nh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=nh(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(Bo(l,i));else s.push(wr(l,i));return a&&(n?l.forEach((h=>{s.push(Cs(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:re};break;case"fillPath":a={d:this.opsToPath(o),stroke:re,strokeWidth:0,fill:i.fill||re};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||re,strokeWidth:i,fill:re}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class L1{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new js(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const ns="http://www.w3.org/2000/svg";class F1{constructor(t,r){this.svg=t,this.gen=new js(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(ns,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(ns,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(ns,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(ns,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var rt={canvas:(e,t)=>new L1(e,t),svg:(e,t)=>new F1(e,t),generator:e=>new js(e),newSeed:()=>js.newSeed()},M1=1,E1=3;async function Mn(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!En(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=kt().fontSize?kt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=bc.fontSize]=eo(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}f(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}f(Mn,"configureLabelImages");function En(e){return e.nodeType===E1?e.textContent?.trim()!=="":e.nodeType!==M1||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(En)}f(En,"hasTextBesidesImages");var uh=3,A1=32,$1=f(async(e,t,r)=>{const i=kt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",Nt(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(C=>({text:C,cssClass:"c4-descr"}))].filter(C=>C.text),l=t.width?Math.max(t.width-2*(t.padding??0),A1):kt().flowchart?.wrappingWidth??200,h=i.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,d=await Promise.all(n.map(async C=>{const k=o.append("g").attr("class",C.cssClass),S=await ye(k,oe(Ue(C.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return mt(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),mt(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:k,box:k.node().getBBox()}})),u=Math.max(...d.map(({box:C})=>C.width),0);let p=0;for(const{el:C,box:k}of d)C.attr("transform",`translate(${u/2-k.x-k.width/2}, ${p-k.y})`),p+=k.height+uh;const m=d.length>0?p-uh:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-u/2}, ${-m/2})`);const y=o.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:o}},"c4LabelHelper"),nt=f(async(e,t,r)=>{if(t.stereotype!==void 0)return $1(e,t,r);let i;const s=t.useHtmlLabels||ve(kt()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await ye(a,oe(Ue(n),kt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||kt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},kt()),d=(t?.padding??0)/2;let u;if(s){const p=h.children[0],m=mt(h);await Mn(p),u=await cr.measure(()=>p.getBoundingClientRect()),m.attr("width",u.width),m.attr("height",u.height)}else u=await cr.measure(()=>h.getBBox());return s?a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):a.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:u,halfPadding:d,label:a}},"labelHelper"),Lo=f(async(e,t,r)=>{const i=r.useHtmlLabels??Zt(kt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ye(s,oe(Ue(t),kt()),{useHtmlLabels:i,width:r.width||kt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(Zt(kt())){const l=o.children[0],c=mt(o);n=await cr.measure(()=>l.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await cr.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),st=f((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),lt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Tt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(Tt,"createPathFromPoints");function Ge(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,u=t+c/2;for(let p=0;p<=50;p++){const m=p/50,y=e+m*l,x=u+s*Math.sin(d*(y-e));a.push({x:y,y:x})}return a}f(Ge,"generateFullSineWavePoints");function we(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,p=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:-p,y:-m})}return a}f(we,"generateCirclePoints");function Ma(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=f((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(Ma,"mergePaths");var O1=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),fr=O1,ne=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),D1=f(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=kt(),n=Zt(a);return await ye(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),ze=D1;function _u(e,t){return e.intersect(t)}f(_u,"intersectNode");var P1=_u;function Bu(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}f(Bu,"intersectEllipse");var vu=Bu;function Lu(e,t,r){return vu(e,t,t,r)}f(Lu,"intersectCircle");var I1=Lu;function Fu(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&Ea(n,l))return;const h=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=h*e.x+d*e.y+u,m=h*t.x+d*t.y+u;if(Math.abs(p)<c&&Math.abs(m)<c&&Ea(p,m))return;const y=s*d-h*o;if(y===0)return;const x=Math.abs(y/2);let C=o*u-d*a;const k=C<0?(C-x)/y:(C+x)/y;C=h*a-s*u;const S=C<0?(C-x)/y:(C+x)/y;return{x:k,y:S}}}f(Fu,"intersectLine");function Ea(e,t){return e*t>0}f(Ea,"sameSign");var R1=Fu;function Mu(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],u=t[h<t.length-1?h+1:0],p=R1(e,r,{x:l+d.x,y:c+d.y},{x:l+u.x,y:c+u.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort(function(h,d){let u=h.x-r.x,p=h.y-r.y,m=Math.sqrt(u*u+p*p),y=d.x-r.x,x=d.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),o[0]):e}f(Mu,"intersectPolygon");var q1=Mu,tt={node:P1,circle:I1,ellipse:vu,polygon:q1,rect:fr};function Eu(e,t){const{labelStyles:r}=ot(t);t.labelStyle=r;const i=lt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=rt.svg(o),c=et(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Nt(n)),st(t,d),t.intersect=function(u){return A.info("Circle intersect",t,a,u),tt.circle(t,a,u)},o}f(Eu,"anchor");function Aa(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,u=(i-t)/2,p=d/s,m=u/o,y=Math.sqrt(p**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=l+x*o*Math.sin(h)*(a?-1:1),k=c-x*s*Math.cos(h)*(a?-1:1),S=Math.atan2((t-k)/o,(e-C)/s);let _=Math.atan2((i-k)/o,(r-C)/s)-S;a&&_<0&&(_+=2*Math.PI),!a&&_>0&&(_-=2*Math.PI);const F=[];for(let L=0;L<20;L++){const v=L/19,j=S+v*_,Y=C+s*Math.cos(j),N=k+o*Math.sin(j);F.push({x:Y,y:N})}return F}f(Aa,"generateArcPoints");function Au(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Au,"calculateArcSagitta");async function $u(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=f(j=>j+a,"calcTotalHeight"),l=f(j=>{const Y=j/2;return[Y/(2.5+j/50),Y]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await nt(e,t,lt(t)),d=n(t?.height?t?.height:h.height),[u,p]=l(d),m=Au(d,u,p),x=(t?.width?t?.width:h.width)+o*2+m-m,C=d,{cssStyles:k}=t,S=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...Aa(-x/2,-C/2,-x/2,C/2,u,p,!1),{x:x/2,y:C/2},...Aa(x/2,C/2,x/2,-C/2,u,p,!0)],T=rt.svg(c),_=et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=Tt(S),L=T.path(F,_),v=c.insert(()=>L,":first-child");return v.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${u/2}, 0)`),st(t,v),t.intersect=function(j){return tt.polygon(t,S,j)},c}f($u,"bowTieRect");async function Ou(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await nt(e,t,lt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),d=Math.max(Math.min(h*.08,12),5),u=Math.max(a.height+c*2+d,t.height??0),p=-u/2+d,m=u/2,y=h*.72,x=[`M${-h/2},${p}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${h/2},${p}`,`A${h/2},${d} 0 0 0 ${-h/2},${p}`,"Z"].join(" "),{cssStyles:C}=t,k=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const v=rt.svg(o).path(x,et(t,{}));k.node()?.appendChild(v),C&&k.attr("style",C)}else k.append("path").attr("d",x).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",p).attr("rx",h/2).attr("ry",d).attr("style",`fill:none;stroke:${l};stroke-width:1px`),st(t,k);const S=p+(m-p)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const T=12,_=f((L,v,j)=>Array.from({length:T+1},(Y,N)=>{const J=Math.PI-N*Math.PI/T;return{x:L*Math.cos(J),y:v+j*d*Math.sin(J)}}),"arc"),F=[..._(h/2,p,-1),..._(y/2,m,1).reverse()];return t.intersect=function(L){return tt.polygon(t,F,L)},o}f(Ou,"bucket");var fh=20,gh=8,N1=80,Fo=8;async function Du(e,t){const{themeVariables:r}=kt(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:o}=ot(t),{shapeSvg:a,bbox:n}=await nt(e,t,lt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,N1,t?.width??0),d=Math.max(c+gh+fh+l*2,t?.height??0),u=-h/2,p=-d/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??Zt(kt())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let x;if(t.look==="handDrawn"){const _=rt.svg(a),F=et(t,{fill:i,stroke:s,fillStyle:"solid"}),L=_.path(ne(u,p,h,d,Fo),F);x=a.insert(()=>L,":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",Nt(t.cssStyles))}else x=a.insert("rect",":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",o).attr("rx",Fo).attr("ry",Fo).attr("x",u).attr("y",p).attr("width",h).attr("height",d).attr("fill",i).attr("stroke",s);const C=p+l+c+gh;a.append("line").attr("class","collapsed-separator").attr("x1",u+8).attr("y1",C).attr("x2",u+h-8).attr("y2",C).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=C+fh/2,S=2.5,T=10;for(let _=-1;_<=1;_++)a.append("circle").attr("class","collapsed-indicator").attr("cx",_*T).attr("cy",k).attr("r",S).attr("fill",s);return st(t,x),t.calcIntersect=function(_,F){return tt.rect(_,F)},t.intersect=function(_){return tt.rect(t,_)},a}f(Du,"collapsedGroup");function Fe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Fe,"insertPolygonShape");var W1=["right","left","up","down"],An="point",z1=f(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),H1=f(e=>W1.filter(t=>e.has(t)).join("|")||An,"getDirectionKey"),ph={"right|left|up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":f(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":f(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":f(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[An]:()=>[{x:0,y:0}]},Y1=f((e,t,r,i)=>{const s=z1(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,l=i??t.width+2*n+2*o,c=H1(s);return(ph[c]??ph[An])({height:a,midpoint:n,padding:o,width:l})},"getArrowPoints");async function Pu(e,t){const r=t,{shapeSvg:i,bbox:s}=await nt(e,r,lt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,l=s.width+2*n+o,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,u=Y1(r.directions??[],s,r,d),p=Fe(i,d,a,u);return p.attr("style",r.style??null),st(r,p),r.intersect=function(m){return tt.polygon(r,u,m)},i}f(Pu,"block_arrow");async function Iu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await nt(e,t,lt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=18,d=12,u=Math.max(a.width+c*2,t.width??0,90),p=Math.max(a.height+c*2+h,t.height??0),m=-p/2,{cssStyles:y}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=rt.svg(o).path(ne(-u/2,m,u,p,d),et(t,{}));x.node()?.appendChild(S),y&&x.attr("style",y)}else x.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",p).attr("rx",d).attr("ry",d).attr("style",s);x.append("line").attr("x1",-u/2).attr("y1",m+h).attr("x2",u/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)x.append("circle").attr("cx",-u/2+12+k*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-u/2+44).attr("y",m+4).attr("width",Math.max(u-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),st(t,x);const C=m+h+(p-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return tt.rect(t,k)},o}f(Iu,"browser");var ls=12;async function Ru(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+ls),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,u=c,p=-h,m=0,y=[{x:d+ls,y:p},{x:u,y:p},{x:u,y:m},{x:d,y:m},{x:d,y:p+ls},{x:d+ls,y:p}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=rt.svg(n),S=et(t,{}),T=Tt(y),_=k.path(T,S);x=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&x.attr("style",C)}else x=Fe(n,c,h,y);return i&&x.attr("style",i),st(t,x),t.intersect=function(k){return tt.polygon(t,y,k)},n}f(Ru,"card");function qu(e,t){const{nodeStyles:r}=ot(t);t.label="";const i=e.insert("g").attr("class",lt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=rt.svg(i),l=et(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Tt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(u){return tt.polygon(t,a,u)},i}f(qu,"choice");async function $n(e,t,r){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await nt(e,t,lt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=rt.svg(o),m=et(t,{}),y=p.circle(0,0,h*2,m);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",Nt(u))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return st(t,d),t.calcIntersect=function(p,m){const y=p.width/2;return tt.circle(p,y,m)},t.intersect=function(p){return A.info("Circle intersect",t,h,p),tt.circle(t,h,p)},o}f($n,"circle");async function Nu(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await nt(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:o.width+l,h=r.positioned?r.height??0:o.height+l,d=r.positioned?-c/2:-o.width/2-a,u=r.positioned?-h/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",c).attr("height",h),st(r,n),r.intersect=function(p){return tt.rect(r,p)},s}f(Nu,"composite");async function Wu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await nt(e,t,lt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=20,d=12,u=Math.max(a.width+c*2,t.width??0,90),p=Math.max(a.height+c*2+h,t.height??0),m=-p/2,{cssStyles:y}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=rt.svg(o).path(ne(-u/2,m,u,p,d),et(t,{}));x.node()?.appendChild(S),y&&x.attr("style",y)}else x.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",p).attr("rx",d).attr("ry",d).attr("style",s);x.append("text").attr("x",-u/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),st(t,x);const C=m+h+(p-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return tt.rect(t,k)},o}f(Wu,"consoleWindow");function zu(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
199
- M ${s.x},${s.y} L ${a.x},${a.y}`}f(zu,"createLine");function Hu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",lt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=rt.svg(s),l=et(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=zu(o),d=n.path(h,l),u=s.insert(()=>c,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),st(t,u),t.intersect=function(p){return A.info("crossedCircle intersect",t,{radius:o,point:p}),tt.circle(t,o,p)},s}f(Hu,"crossedCircle");function $e(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,p=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:-p,y:-m})}return a}f($e,"generateCirclePoints");async function Yu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:u}=t,p=[...$e(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...$e(c/2+d*2,-d,d,20,-180,-270),...$e(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...$e(c/2,h/2,d,20,0,90)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...$e(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...$e(c/2+c*.1,-d,d,20,-180,-270),...$e(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...$e(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],y=rt.svg(s),x=et(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=Tt(p).replace("Z",""),S=y.path(k,x),T=Tt(m),_=y.path(T,{...x}),F=s.insert("g",":first-child");return F.insert(()=>_,":first-child").attr("stroke-opacity",0),F.insert(()=>S,":first-child"),F.attr("class","text"),u&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),st(t,F),t.intersect=function(L){return tt.polygon(t,m,L)},s}f(Yu,"curlyBraceLeft");function Oe(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,p=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:p,y:m})}return a}f(Oe,"generateCirclePoints");async function ju(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:u}=t,p=[...Oe(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Oe(c/2+d*2,-d,d,20,-180,-270),...Oe(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Oe(c/2,h/2,d,20,0,90)],m=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Oe(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Oe(c/2+d*2,-d,d,20,-180,-270),...Oe(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Oe(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],y=rt.svg(s),x=et(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=Tt(p).replace("Z",""),S=y.path(k,x),T=Tt(m),_=y.path(T,{...x}),F=s.insert("g",":first-child");return F.insert(()=>_,":first-child").attr("stroke-opacity",0),F.insert(()=>S,":first-child"),F.attr("class","text"),u&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),st(t,F),t.intersect=function(L){return tt.polygon(t,m,L)},s}f(ju,"curlyBraceRight");function Yt(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,p=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:-p,y:-m})}return a}f(Yt,"generateCirclePoints");async function Uu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:u}=t,p=[...Yt(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Yt(c/2+d*2,-d,d,20,-180,-270),...Yt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Yt(c/2,h/2,d,20,0,90)],m=[...Yt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Yt(-c/2-d/2,-d,d,20,0,90),...Yt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Yt(-c/2+d+d/2,h/2,d,30,-180,-270)],y=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Yt(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Yt(c/2+d*2,-d,d,20,-180,-270),...Yt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Yt(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Yt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Yt(-c/2-d/2,-d,d,20,0,90),...Yt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Yt(-c/2+d+d/2,h/2,d,30,-180,-270)],x=rt.svg(s),C=et(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=Tt(p).replace("Z",""),T=x.path(S,C),F=Tt(m).replace("Z",""),L=x.path(F,C),v=Tt(y),j=x.path(v,{...C}),Y=s.insert("g",":first-child");return Y.insert(()=>j,":first-child").attr("stroke-opacity",0),Y.insert(()=>T,":first-child"),Y.insert(()=>L,":first-child"),Y.attr("class","text"),u&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),st(t,Y),t.intersect=function(N){return tt.polygon(t,y,N)},s}f(Uu,"curlyBraces");async function Xu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await nt(e,t,lt(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),u=Math.max(l,h.height+a*2,t?.height??0),p=u/2,{cssStyles:m}=t,y=rt.svg(c),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=d,k=u,S=C-p,T=k/4,_=[{x:S,y:0},{x:T,y:0},{x:0,y:k/2},{x:T,y:k},{x:S,y:k},...we(-S,-k/2,p,50,270,90)],F=Tt(_),L=y.path(F,x),v=c.insert(()=>L,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-u/2})`),st(t,v),t.intersect=function(j){return tt.polygon(t,_,j)},c}f(Xu,"curvedTrapezoid");async function Gu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(t)),n=t.padding??20,l=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,d=Math.max(o.height+n*2,t.height?t.height-(2*c-h):0),u=Math.min(l*.177,d*.45),p=d+2*c-h,m=-p/2,y=m+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const v=rt.svg(s),j=et(t,{}),Y=v.path(ne(-l/2,y,l,d,u),j),N=v.circle(0,m+c,c*2,j);x.insert(()=>N,":first-child"),x.insert(()=>Y,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",d).attr("rx",u).attr("ry",u).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);st(t,x);const k=y+d/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${k-o.height/2-(o.y-(o.top??0))})`);const S=m+c,T=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,L=[...we(0,-S,c,24,180+T,-T),...we(-(-l/2+u),-(y+u),u,12,90,0),...we(-(-l/2+u),-(p/2-u),u,12,360,270),...we(-(l/2-u),-(p/2-u),u,12,270,180),...we(-(l/2-u),-(y+u),u,12,180,90)];return t.intersect=function(v){return tt.polygon(t,L,v)},s}f(Gu,"person");var j1=f((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),U1=f((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),X1=f((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),yh=8,mh=8;async function Vu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<mh&&(t.width=mh)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-o-k*3,t.height<yh&&(t.height=yh)}const{shapeSvg:l,bbox:c,label:h}=await nt(e,t,lt(t)),d=Math.max(t.width??0,c.width)+a,u=d/2,p=u/(2.5+d/50),m=Math.max(t.height??0,c.height)+o+p;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=rt.svg(l),k=U1(0,0,d,m,u,p),S=X1(0,p,d,m,u,p),T=et(t,{}),_=C.path(k,T),F=C.path(S,et(t,{fill:"none"}));y=l.insert(()=>F,":first-child"),y=l.insert(()=>_,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=j1(0,0,d,m,u,p);y=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(x)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),st(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(C){const k=tt.rect(t,C),S=k.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-p)){let T=p*p*(1-S*S/(u*u));T>0&&(T=Math.sqrt(T)),T=p-T,C.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},l}f(Vu,"cylinder");async function ti(e,t,r){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await nt(e,t,lt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:u,ry:p}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(u=r.rx,p=r.ry),t.look==="handDrawn"){const y=rt.svg(o),x=et(t,{}),C=u||p?y.path(ne(c,h,n,l,u||0),x):y.rectangle(c,h,n,l,x);d=o.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Nt(m))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Nt(u)).attr("ry",Nt(p)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return st(t,d,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,x){return tt.rect(y,x)},t.intersect=function(y){return tt.rect(t,y)},o}f(ti,"drawRect");async function Zu(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await ti(e,t,l);if(t.look==="handDrawn"){const p=rt.svg(c),m=et(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>p.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),c.insert(()=>p.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,u=(Number(h.attr("height"))||n)??0;return d>0&&u>0&&h.attr("stroke-dasharray",`${d} ${u}`),c}f(Zu,"datastore");async function Ku(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await nt(e,t,lt(t)),c=n.width+s,h=n.height+o,d=h*.2,u=-c/2,p=-h/2-d/2,{cssStyles:m}=t,y=rt.svg(a),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:u,y:p+d},{x:-u,y:p+d},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+d}],k=y.polygon(C.map(T=>[T.x,T.y]),x),S=a.insert(()=>k,":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),l.attr("transform",`translate(${u+(t.padding??0)/2-(n.x-(n.left??0))}, ${p+d+(t.padding??0)/2-(n.y-(n.top??0))})`),st(t,S),t.intersect=function(T){return tt.rect(t,T)},a}f(Ku,"dividedRectangle");async function Qu(e,t){const{labelStyles:r,nodeStyles:i}=ot(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=rt.svg(n),m=et(t,{roughness:.2,strokeWidth:2.5}),y=et(t,{roughness:.2,strokeWidth:1.5}),x=p.circle(0,0,c*2,m),C=p.circle(0,0,h*2,y);d=n.insert("g",":first-child"),d.attr("class",Nt(t.cssClasses)).attr("style",Nt(u)),d.node()?.appendChild(x),d.node()?.appendChild(C)}else{d=n.insert("g",":first-child");const p=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),p.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 st(t,d),t.intersect=function(p){return A.info("DoubleCircle intersect",t,c,p),tt.circle(t,c,p)},n}f(Qu,"doublecircle");function Ju(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ot(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",lt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=rt.svg(o),{nodeBorder:c}=r,h=et(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),u=o.insert(()=>d,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),st(t,u),t.intersect=function(p){return A.info("filledCircle intersect",t,{radius:a,point:p}),tt.circle(t,a,p)},o}f(Ju,"filledCircle");var xh=10,Ch=10;async function tf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<xh&&(t.height=xh),t.width=(t?.width??0)-o-o/2,t.width<Ch&&(t.width=Ch));const{shapeSvg:a,bbox:n,label:l}=await nt(e,t,lt(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,u=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:p}=t,m=rt.svg(a),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Tt(u),C=m.path(x,y),k=a.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,st(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return A.info("Triangle intersect",t,u,S),tt.polygon(t,u,S)},a}f(tf,"flippedTriangle");async function ef(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(t)),n=t.padding??12,l=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,h=Math.max(Math.min(c*.16,14),8),d=Math.max(c+h,t.height??0),u=d-h,p=Math.max(l*.38,28),m=-d/2,y=[{x:-l/2,y:m},{x:-l/2+p,y:m},{x:-l/2+p,y:m+h},{x:l/2,y:m+h},{x:l/2,y:d/2},{x:-l/2,y:d/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:C}=t;let k;if(t.look==="handDrawn"){const _=rt.svg(s).path(x,et(t,{}));k=s.insert(()=>_,":first-child").attr("class","basic label-container"),C&&k.attr("style",C)}else k=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?st(t,k):st(t,k,{width:l,height:d});const S=m+h+u/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(T){return tt.polygon(t,y,T)},s}f(ef,"folder");function rf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=ot(t);t.label="";const a=e.insert("g").attr("class",lt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,u=rt.svg(a),p=et(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=u.rectangle(h,d,l,c,p),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),st(t,y);const x=i?.padding??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return tt.rect(t,C)},a}f(rf,"forkJoin");async function sf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await nt(e,t,lt(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,u=d/2,{cssStyles:p}=t,m=rt.svg(l),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:-d/2},{x:h/2-u,y:-d/2},...we(-h/2+u,0,u,50,90,270),{x:h/2-u,y:d/2},{x:-h/2,y:d/2}],C=Tt(x),k=m.path(C,y),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),st(t,S),t.intersect=function(T){return A.info("Pill intersect",t,{radius:u,point:T}),tt.polygon(t,x,T)},l}f(sf,"halfRoundedRectangle");var G1=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function of(e,t){const{labelStyles:r,nodeStyles:i}=ot(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const S=(t.height??0)/s;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await nt(e,t,lt(t)),u=(t?.height?t?.height:d.height)+l,p=u/s,m=(t?.width?t?.width:d.width)+2*p+c,y=[{x:p,y:0},{x:m-p,y:0},{x:m,y:-u/2},{x:m-p,y:-u},{x:p,y:-u},{x:0,y:-u/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=rt.svg(h),S=et(t,{}),T=G1(0,0,m,u,p),_=k.path(T,S);x=h.insert(()=>_,":first-child").attr("transform",`translate(${-m/2}, ${u/2})`),C&&x.attr("style",C)}else x=Fe(h,m,u,y);return i&&x.attr("style",i),t.width=m,t.height=u,st(t,x),t.intersect=function(k){return tt.polygon(t,y,k)},h}f(of,"hexagon");async function af(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await nt(e,t,lt(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=rt.svg(s),c=et(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=Tt(h),u=l.path(d,c),p=s.insert(()=>u,":first-child");return p.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-o/2}, ${-a/2})`),st(t,p),t.intersect=function(m){return A.info("Pill intersect",t,{points:h}),tt.polygon(t,h,m)},s}f(af,"hourglass");async function nf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ot(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await nt(e,t,"icon-shape default"),u=t.pos==="t",p=n,m=n,{nodeBorder:y}=r,{stylesMap:x}=Jr(t),C=-m/2,k=-p/2,S=t.label?8:0,T=rt.svg(c),_=et(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=T.rectangle(C,k,m,p,_),L=Math.max(m,h.width),v=p+h.height+S,j=T.rectangle(-L/2,-v/2,L,v,{..._,fill:"transparent",stroke:"none"}),Y=c.insert(()=>F,":first-child"),N=c.insert(()=>j);if(t.icon){const J=c.append("g");J.html(`<g>${await Xi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const I=J.node().getBBox(),q=I.width,Z=I.height,$=I.x,Q=I.y;J.attr("transform",`translate(${-q/2-$},${u?h.height/2+S/2-Z/2-Q:-h.height/2-S/2-Z/2-Q})`),J.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-v/2:v/2-h.height})`),Y.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),st(t,N),t.intersect=function(J){if(A.info("iconSquare intersect",t,J),!t.label)return tt.rect(t,J);const I=t.x??0,q=t.y??0,Z=t.height??0;let $=[];return u?$=[{x:I-h.width/2,y:q-Z/2},{x:I+h.width/2,y:q-Z/2},{x:I+h.width/2,y:q-Z/2+h.height+S},{x:I+m/2,y:q-Z/2+h.height+S},{x:I+m/2,y:q+Z/2},{x:I-m/2,y:q+Z/2},{x:I-m/2,y:q-Z/2+h.height+S},{x:I-h.width/2,y:q-Z/2+h.height+S}]:$=[{x:I-m/2,y:q-Z/2},{x:I+m/2,y:q-Z/2},{x:I+m/2,y:q-Z/2+p},{x:I+h.width/2,y:q-Z/2+p},{x:I+h.width/2/2,y:q+Z/2},{x:I-h.width/2,y:q+Z/2},{x:I-h.width/2,y:q-Z/2+p},{x:I-m/2,y:q-Z/2+p}],tt.polygon(t,$,J)},c}f(nf,"icon");async function lf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ot(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await nt(e,t,"icon-shape default"),u=20,p=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Jr(t),k=rt.svg(c),S=et(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=C.get("fill");S.stroke=T??x;const _=c.append("g");t.icon&&_.html(`<g>${await Xi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=_.node().getBBox(),L=F.width,v=F.height,j=F.x,Y=F.y,N=Math.max(L,v)*Math.SQRT2+u*2,J=k.circle(0,0,N,S),I=Math.max(N,h.width),q=N+h.height+p,Z=k.rectangle(-I/2,-q/2,I,q,{...S,fill:"transparent",stroke:"none"}),$=c.insert(()=>J,":first-child"),Q=c.insert(()=>Z);return _.attr("transform",`translate(${-L/2-j},${m?h.height/2+p/2-v/2-Y:-h.height/2-p/2-v/2-Y})`),_.attr("style",`color: ${C.get("stroke")??y};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-q/2:q/2-h.height})`),$.attr("transform",`translate(0,${m?h.height/2+p/2:-h.height/2-p/2})`),st(t,Q),t.intersect=function(K){return A.info("iconSquare intersect",t,K),tt.rect(t,K)},c}f(lf,"iconCircle");async function hf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ot(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:u}=await nt(e,t,"icon-shape default"),p=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=Jr(t),S=-y/2,T=-m/2,_=t.label?8:0,F=rt.svg(c),L=et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const v=k.get("fill");L.stroke=v??C;const j=F.path(ne(S,T,y,m,5),L),Y=Math.max(y,h.width),N=m+h.height+_,J=F.rectangle(-Y/2,-N/2,Y,N,{...L,fill:"transparent",stroke:"none"}),I=c.insert(()=>j,":first-child").attr("class","icon-shape2"),q=c.insert(()=>J);if(t.icon){const Z=c.append("g");Z.html(`<g>${await Xi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const $=Z.node().getBBox(),Q=$.width,K=$.height,ut=$.x,ht=$.y;Z.attr("transform",`translate(${-Q/2-ut},${p?h.height/2+_/2-K/2-ht:-h.height/2-_/2-K/2-ht})`),Z.attr("style",`color: ${k.get("stroke")??x};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-N/2:N/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+_/2:-h.height/2-_/2})`),st(t,q),t.intersect=function(Z){if(A.info("iconSquare intersect",t,Z),!t.label)return tt.rect(t,Z);const $=t.x??0,Q=t.y??0,K=t.height??0;let ut=[];return p?ut=[{x:$-h.width/2,y:Q-K/2},{x:$+h.width/2,y:Q-K/2},{x:$+h.width/2,y:Q-K/2+h.height+_},{x:$+y/2,y:Q-K/2+h.height+_},{x:$+y/2,y:Q+K/2},{x:$-y/2,y:Q+K/2},{x:$-y/2,y:Q-K/2+h.height+_},{x:$-h.width/2,y:Q-K/2+h.height+_}]:ut=[{x:$-y/2,y:Q-K/2},{x:$+y/2,y:Q-K/2},{x:$+y/2,y:Q-K/2+m},{x:$+h.width/2,y:Q-K/2+m},{x:$+h.width/2/2,y:Q+K/2},{x:$-h.width/2,y:Q+K/2},{x:$-h.width/2,y:Q-K/2+m},{x:$-y/2,y:Q-K/2+m}],tt.polygon(t,ut,Z)},c}f(hf,"iconRounded");async function cf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ot(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:u}=await nt(e,t,"icon-shape default"),p=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=Jr(t),S=-y/2,T=-m/2,_=t.label?8:0,F=rt.svg(c),L=et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const v=k.get("fill");L.stroke=v??C;const j=F.path(ne(S,T,y,m,.1),L),Y=Math.max(y,h.width),N=m+h.height+_,J=F.rectangle(-Y/2,-N/2,Y,N,{...L,fill:"transparent",stroke:"none"}),I=c.insert(()=>j,":first-child"),q=c.insert(()=>J);if(t.icon){const Z=c.append("g");Z.html(`<g>${await Xi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const $=Z.node().getBBox(),Q=$.width,K=$.height,ut=$.x,ht=$.y;Z.attr("transform",`translate(${-Q/2-ut},${p?h.height/2+_/2-K/2-ht:-h.height/2-_/2-K/2-ht})`),Z.attr("style",`color: ${k.get("stroke")??x};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-N/2:N/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+_/2:-h.height/2-_/2})`),st(t,q),t.intersect=function(Z){if(A.info("iconSquare intersect",t,Z),!t.label)return tt.rect(t,Z);const $=t.x??0,Q=t.y??0,K=t.height??0;let ut=[];return p?ut=[{x:$-h.width/2,y:Q-K/2},{x:$+h.width/2,y:Q-K/2},{x:$+h.width/2,y:Q-K/2+h.height+_},{x:$+y/2,y:Q-K/2+h.height+_},{x:$+y/2,y:Q+K/2},{x:$-y/2,y:Q+K/2},{x:$-y/2,y:Q-K/2+h.height+_},{x:$-h.width/2,y:Q-K/2+h.height+_}]:ut=[{x:$-y/2,y:Q-K/2},{x:$+y/2,y:Q-K/2},{x:$+y/2,y:Q-K/2+m},{x:$+h.width/2,y:Q-K/2+m},{x:$+h.width/2/2,y:Q+K/2},{x:$-h.width/2,y:Q+K/2},{x:$-h.width/2,y:Q-K/2+m},{x:$-y/2,y:Q-K/2+m}],tt.polygon(t,ut,Z)},c}f(cf,"iconSquare");async function df(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=ot(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:u,label:p}=await nt(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,x=-h/2,C=t.label?8:0,k=rt.svg(d),S=et(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=k.rectangle(y,x,c,h,S),_=Math.max(c,u.width),F=h+u.height+C,L=k.rectangle(-_/2,-F/2,_,F,{...S,fill:"none",stroke:"none"}),v=d.insert(()=>T,":first-child"),j=d.insert(()=>L);if(t.img){const Y=d.append("image");Y.attr("href",t.img),Y.attr("width",c),Y.attr("height",h),Y.attr("preserveAspectRatio","none"),Y.attr("transform",`translate(${-c/2},${m?F/2-h:-F/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${m?-h/2-u.height/2-C/2:h/2-u.height/2+C/2})`),v.attr("transform",`translate(0,${m?u.height/2+C/2:-u.height/2-C/2})`),st(t,j),t.intersect=function(Y){if(A.info("iconSquare intersect",t,Y),!t.label)return tt.rect(t,Y);const N=t.x??0,J=t.y??0,I=t.height??0;let q=[];return m?q=[{x:N-u.width/2,y:J-I/2},{x:N+u.width/2,y:J-I/2},{x:N+u.width/2,y:J-I/2+u.height+C},{x:N+c/2,y:J-I/2+u.height+C},{x:N+c/2,y:J+I/2},{x:N-c/2,y:J+I/2},{x:N-c/2,y:J-I/2+u.height+C},{x:N-u.width/2,y:J-I/2+u.height+C}]:q=[{x:N-c/2,y:J-I/2},{x:N+c/2,y:J-I/2},{x:N+c/2,y:J-I/2+h},{x:N+u.width/2,y:J-I/2+h},{x:N+u.width/2/2,y:J+I/2},{x:N-u.width/2,y:J+I/2},{x:N-u.width/2,y:J-I/2+h},{x:N-c/2,y:J-I/2+h}],tt.polygon(t,q,Y)},d}f(df,"imageSquare");async function uf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=Math.max(l.height+o*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=rt.svg(n),y=et(t,{}),x=Tt(d),C=m.path(x,y);u=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=Fe(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}f(uf,"inv_trapezoid");async function ff(e,t){const{shapeSvg:r,bbox:i,label:s}=await nt(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),st(t,o),t.intersect=function(l){return tt.rect(t,l)},r}f(ff,"labelRect");async function gf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=rt.svg(n),y=et(t,{}),x=Tt(d),C=m.path(x,y);u=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=Fe(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}f(gf,"lean_left");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=rt.svg(n),y=et(t,{}),x=Tt(d),C=m.path(x,y);u=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=Fe(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}f(pf,"lean_right");function yf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",lt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=rt.svg(s),d=et(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=Tt(c),p=h.path(u,d),m=s.insert(()=>p,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),st(t,m),t.intersect=function(y){return A.info("lightningBolt intersect",t,y),tt.polygon(t,c,y)},s}f(yf,"lightningBolt");var V1=f((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Z1=f((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),K1=f((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),bh=10,kh=10;async function mf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-o,t.width<kh&&(t.width=kh);const S=C/2/(2.5+C/50);t.height=(t.height??0)-a-S*3,t.height<bh&&(t.height=bh)}const{shapeSvg:n,bbox:l,label:c}=await nt(e,t,lt(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,u=d/(2.5+h/50),p=(t?.height?t?.height:l.height)+u+a*2,m=p*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=rt.svg(n),k=Z1(0,0,h,p,d,u,m),S=K1(0,u,h,p,d,u),T=et(t,{}),_=C.path(k,T),F=C.path(S,T);n.insert(()=>F,":first-child").attr("class","line"),y=n.insert(()=>_,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=V1(0,0,h,p,d,u,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(x)).attr("style",i)}return y.attr("label-offset-y",u),y.attr("transform",`translate(${-h/2}, ${-(p/2+u)})`),st(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+u-(l.y-(l.top??0))})`),t.intersect=function(C){const k=tt.rect(t,C),S=k.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-u)){let T=u*u*(1-S*S/(d*d));T>0&&(T=Math.sqrt(T)),T=u-T,C.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},n}f(mf,"linedCylinder");async function xf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await nt(e,t,lt(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,u=t.look==="neo"?d/4:d/8,p=d+u,{cssStyles:m}=t,y=rt.svg(n),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...Ge(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,u,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],k=y.polygon(C.map(T=>[T.x,T.y]),x),S=n.insert(()=>k,":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(0,${-u/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-u/2-(l.y-(l.top??0))})`),st(t,S),t.intersect=function(T){return tt.polygon(t,C,T)},n}f(xf,"linedWaveEdgedRect");async function Cf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await nt(e,t,lt(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,u=(t?.height?t?.height:c.height)+a*2+2*n,p=d-2*n,m=u-2*n,y=-p/2,x=-m/2,{cssStyles:C}=t,k=rt.svg(l),S=et(t,{}),T=[{x:y-n,y:x+n},{x:y-n,y:x+m+n},{x:y+p-n,y:x+m+n},{x:y+p-n,y:x+m},{x:y+p,y:x+m},{x:y+p,y:x+m-n},{x:y+p+n,y:x+m-n},{x:y+p+n,y:x-n},{x:y+n,y:x-n},{x:y+n,y:x},{x:y,y:x},{x:y,y:x+n}],_=[{x:y,y:x+n},{x:y+p-n,y:x+n},{x:y+p-n,y:x+m},{x:y+p,y:x+m},{x:y+p,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const F=Tt(T);let L=k.path(F,S);const v=Tt(_);let j=k.path(v,S);t.look!=="handDrawn"&&(L=Ma(L),j=Ma(j));const Y=l.insert("g",":first-child");return Y.insert(()=>L),Y.insert(()=>j),Y.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&Y.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))})`),st(t,Y),t.intersect=function(N){return tt.polygon(t,T,N)},l}f(Cf,"multiRect");async function bf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(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?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,u=Math.max(o.height,t?.height??0)+c*3,p=t.look==="neo"?u/4:u/8,m=u+(h?p/2:-p/2),y=-d/2,x=-m/2,C=10,{cssStyles:k}=t,S=Ge(y-C,x+m+C,y+d-C,x+m+C,p,.8),T=S?.[S.length-1],_=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...S,{x:y+d-C,y:T.y-C},{x:y+d,y:T.y-C},{x:y+d,y:T.y-2*C},{x:y+d+C,y:T.y-2*C},{x:y+d+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],F=[{x:y,y:x+C},{x:y+d-C,y:x+C},{x:y+d-C,y:T.y-C},{x:y+d,y:T.y-C},{x:y+d,y:x},{x:y,y:x}],L=rt.svg(s),v=et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const j=Tt(_),Y=L.path(j,v),N=Tt(F),J=L.path(N,v),I=s.insert(()=>Y,":first-child");return I.insert(()=>J),I.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-p/2})`),a.attr("transform",`translate(${-(o.width/2)-C-(o.x-(o.left??0))}, ${-(o.height/2)+C-p/2-(o.y-(o.top??0))})`),st(t,I),t.intersect=function(q){return tt.polygon(t,_,q)},s}f(bf,"multiWaveEdgedRectangle");async function kf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i,t.useHtmlLabels||Zt(Dt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await nt(e,t,lt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,u=-h/2,{cssStyles:p}=t,m=rt.svg(a),y=et(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(d,u,c,h,y),C=a.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),p&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",p),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))})`),st(t,C),t.intersect=function(k){return tt.rect(t,k)},a}f(kf,"note");var Q1=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function wf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await nt(e,t,lt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=rt.svg(s),m=et(t,{}),y=Q1(0,0,l),x=p.path(y,m);d=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),u&&d.attr("style",u)}else d=Fe(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),st(t,d),t.calcIntersect=function(p,m){const y=p.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=tt.polygon(p,x,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},s}f(wf,"question");async function Sf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await nt(e,t,lt(t)),h=l.width+(t.look==="neo"?o*2:o),d=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),u=d/4,m=-Math.max(h,(t.width??0)-u)/2,y=-d/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=rt.svg(n),T=et(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=Tt(C),F=S.path(_,T),L=n.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),st(t,L),t.intersect=function(v){return tt.polygon(t,C,v)},n}f(Sf,"rect_left_inv_arrow");async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ze(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Zt(kt())){const v=h.children[0],j=mt(h);d=v.getBoundingClientRect(),j.attr("width",d.width),j.attr("height",d.height)}A.info("Text 2",l);const u=l||[],p=h.getBBox(),m=await ze(n,Array.isArray(u)?u.join("<br/>"):u,t.labelStyle,!0,!0),y=m.children[0],x=mt(m);d=y.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);const C=(t.padding||0)/2;mt(m).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+C+5)+")"),mt(h).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const k=d.width+(t.padding||0),S=d.height+(t.padding||0),T=-d.width/2-C,_=-d.height/2-C;let F,L;if(t.look==="handDrawn"){const v=rt.svg(o),j=et(t,{}),Y=v.path(ne(T,_,k,S,t.rx||0),j),N=v.line(-d.width/2-C,-d.height/2-C+p.height+C,d.width/2+C,-d.height/2-C+p.height+C,j);L=o.insert(()=>(A.debug("Rough node insert CXC",Y),N),":first-child"),F=o.insert(()=>(A.debug("Rough node insert CXC",Y),Y),":first-child")}else F=a.insert("rect",":first-child"),L=a.insert("line"),F.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),L.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+p.height+C).attr("y2",-d.height/2-C+p.height+C);return st(t,F),t.intersect=function(v){return tt.rect(t,v)},o}f(Tf,"rectWithTitle");async function _f(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return ti(e,t,s)}f(_f,"roundedRect");var Ze=8;async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await nt(e,t,lt(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?Ze:Ze*2),h=(t?.height??n.height)+o*2,d=c-Ze,u=h,p=Ze-c/2,m=-h/2,{cssStyles:y}=t,x=rt.svg(a),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+u},{x:p-Ze,y:m+u},{x:p-Ze,y:m},{x:p,y:m},{x:p,y:m+u}],S=x.polygon(k.map(_=>[_.x,_.y]),C),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Nt(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${Ze/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,T),t.intersect=function(_){return tt.rect(t,_)},a}f(Bf,"shadedProcess");async function vf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await nt(e,t,lt(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,u=h,p=d/1.5,m=-u/2,y=-p/2,{cssStyles:x}=t,C=rt.svg(n),k=et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+p},{x:m+u,y:y+p},{x:m+u,y:y-p/2}],T=Tt(S),_=C.path(T,k),F=n.insert(()=>_,":first-child");return F.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(0, ${p/4})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(l.x-(l.left??0))}, ${-p/4+(t.padding??0)-(l.y-(l.top??0))})`),st(t,F),t.intersect=function(L){return tt.polygon(t,S,L)},n}f(vf,"slopedRect");async function Lf(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return ti(e,t,o)}f(Lf,"squareRect");async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:u}=t,p=rt.svg(n),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...we(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...we(h/2-d,0,d,50,270,450)],x=Tt(y),C=p.path(x,m),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),st(t,k),t.intersect=function(S){return tt.polygon(t,y,S)},n}f(Ff,"stadium");async function Mf(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ti(e,t,r)}f(Mf,"state");function Ef(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=rt.svg(h),u=et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=d.circle(0,0,t.width,{...u,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,x=d.circle(0,0,y,{...u,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>p,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),o&&C.selectAll("path").attr("style",o),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const k=e.node()?.ownerSVGElement?.id??"",S=k?`${k}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return st(t,C),t.intersect=function(k){return tt.circle(t,(t.width??0)/2,k)},h}f(Ef,"stateEnd");function Af(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=rt.svg(o).circle(0,0,t.width,QC(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return st(t,a),t.intersect=function(n){return tt.circle(t,(t.width??7)/2,n)},o}f(Af,"stateStart");var Sr=8;async function $f(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=Math.max(l.width+2*Sr+o,t.width??0),h=Math.max(l.height+a,t.height??0),d=c-2*Sr,u=h,p=-c/2,m=-h/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look==="handDrawn"){const x=rt.svg(n),C=et(t,{}),k=x.rectangle(p,m,d+16,u,C),S=x.line(p+Sr,m,p+Sr,m+u,C),T=x.line(p+Sr+d,m,p+Sr+d,m+u,C);n.insert(()=>S,":first-child"),n.insert(()=>T,":first-child");const _=n.insert(()=>k,":first-child"),{cssStyles:F}=t;_.attr("class","basic label-container").attr("style",Nt(F)),st(t,_)}else{const x=Fe(n,d,u,y);i&&x.attr("style",i),st(t,x)}return t.intersect=function(x){return tt.polygon(t,y,x)},n}f($f,"subroutine");var Mo=.2;async function Of(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Mo*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=(t?.height?t?.height:l.height)+a*2,h=Mo*c,d=Mo*c,p=(t?.width?t?.width:l.width)+o*2+h-h,m=c,y=-p/2,x=-m/2,{cssStyles:C}=t,k=rt.svg(n),S=et(t,{}),T=[{x:y-h/2,y:x},{x:y+p+h/2,y:x},{x:y+p+h/2,y:x+m},{x:y-h/2,y:x+m}],_=[{x:y+p-h/2,y:x+m},{x:y+p+h/2,y:x+m},{x:y+p+h/2,y:x+m-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const F=Tt(T),L=k.path(F,S),v=Tt(_),j=k.path(v,{...S,fillStyle:"solid"}),Y=n.insert(()=>j,":first-child");return Y.insert(()=>L,":first-child"),Y.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),st(t,Y),t.intersect=function(N){return tt.polygon(t,T,N)},n}f(Of,"taggedRect");async function Df(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await nt(e,t,lt(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,u=l+c,{cssStyles:p}=t,m=rt.svg(s),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:u/2},...Ge(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,c,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],C=-n/2+n/2*.1,k=-u/2-d*.4,S=[{x:C+n-h,y:(k+l)*1.3},{x:C+n,y:k+l-d},{x:C+n,y:(k+l)*.9},...Ge(C+n,(k+l)*1.25,C+n-h,(k+l)*1.3,-l*.02,.5)],T=Tt(x),_=m.path(T,y),F=Tt(S),L=m.path(F,{...y,fillStyle:"solid"}),v=s.insert(()=>L,":first-child");return v.insert(()=>_,":first-child"),v.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),st(t,v),t.intersect=function(j){return tt.polygon(t,x,j)},s}f(Df,"taggedWaveEdgedRectangle");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await nt(e,t,lt(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),st(t,h),t.intersect=function(d){return tt.rect(t,d)},s}f(Pf,"text");var J1=f((e,t,r,i,s,o)=>`M${e},${t}
200
- a${s},${o} 0,0,1 0,${-i}
201
- l${r},0
202
- a${s},${o} 0,0,1 0,${i}
203
- M${r},${-i}
204
- a${s},${o} 0,0,0 0,${i}
205
- l${-r},0`,"createCylinderPathD"),t2=f((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),e2=f((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),wh=5,Sh=10;async function If(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<wh&&(t.height=wh)),t.width){const C=a/2/(2.5+a/50);t.width=t.width-o-C*3,t.width<Sh&&(t.width=Sh)}const{shapeSvg:n,bbox:l,label:c}=await nt(e,t,lt(t)),h=Math.max(t.height??0,l.height)+o,d=h/2,u=d/(2.5+h/50),p=Math.max(t.width??0,l.width)+u+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=rt.svg(n),C=t2(0,0,p,h,u,d),k=e2(0,0,p,h,u,d),S=x.path(C,et(t,{})),T=x.path(k,et(t,{fill:"none"}));y=n.insert(()=>T,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=J1(0,0,p,h,u,d);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",Nt(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",u),y.attr("transform",`translate(${-p/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-u-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),st(t,y),t.intersect=function(x){const C=tt.rect(t,x),k=C.y-(t.y??0);if(d!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-u)){let S=u*u*(1-k*k/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=u-S,x.x-(t.x??0)>0&&(S=-S),C.x+=S}return C},n}f(If,"tiltedCylinder");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=rt.svg(n),y=et(t,{}),x=Tt(d),C=m.path(x,y);u=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=Fe(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}f(Rf,"trapezoid");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await nt(e,t,lt(t)),d=(t?.width?t?.width:h.width)+o*2,u=(t?.height?t?.height:h.height)+a*2,{cssStyles:p}=t,m=rt.svg(c),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-d/2*.8,y:-u/2},{x:d/2*.8,y:-u/2},{x:d/2,y:-u/2*.6},{x:d/2,y:u/2},{x:-d/2,y:u/2},{x:-d/2,y:-u/2*.6}],C=Tt(x),k=m.path(C,y),S=c.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),st(t,S),t.intersect=function(T){return tt.polygon(t,x,T)},c}f(qf,"trapezoidalPentagon");var Th=10,_h=10;async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<_h&&(t.width=_h),t.height=t?.height??0,t.height<Th&&(t.height=Th));const{shapeSvg:a,bbox:n,label:l}=await nt(e,t,lt(t)),c=ve(kt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,u=d,p=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-d}],{cssStyles:m}=t,y=rt.svg(a),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Tt(p),k=y.path(C,x),S=a.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=d,st(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(T){return A.info("Triangle intersect",t,p,T),tt.polygon(t,p,T)},a}f(Nf,"triangle");async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await nt(e,t,lt(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,u=(t?.height?t?.height:c.height)+(a??0)*2,p=t.look==="neo"?u/4:u/8,m=u+(n?p:-p),{cssStyles:y}=t,C=14-d,k=C>0?C/2:0,S=rt.svg(l),T=et(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:-d/2-k,y:m/2},...Ge(-d/2-k,m/2,d/2+k,m/2,p,.8),{x:d/2+k,y:-m/2},{x:-d/2-k,y:-m/2}],F=Tt(_),L=S.path(F,T),v=l.insert(()=>L,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-u/2+(t.padding??0)-p-(c.y-(c.top??0))})`),st(t,v),t.intersect=function(j){return tt.polygon(t,_,j)},l}f(Wf,"waveEdgedRectangle");async function zf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-T*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await nt(e,t,lt(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,u=h+d*2,{cssStyles:p}=t,m=rt.svg(n),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-c/2,y:u/2},...Ge(-c/2,u/2,c/2,u/2,d,1),{x:c/2,y:-u/2},...Ge(c/2,-u/2,-c/2,-u/2,d,-1)],C=Tt(x),k=m.path(C,y),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),st(t,S),t.intersect=function(T){return tt.polygon(t,x,T)},n}f(zf,"waveRectangle");var Pt=10;async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Pt,10),t.height=Math.max((t?.height??0)-o*2-Pt,10));const{shapeSvg:a,bbox:n,label:l}=await nt(e,t,lt(t)),c=(t?.width?t?.width:n.width)+s*2+Pt,h=(t?.height?t?.height:n.height)+o*2+Pt,d=c-Pt,u=h-Pt,p=-d/2,m=-u/2,{cssStyles:y}=t,x=rt.svg(a),C=et(t,{}),k=[{x:p-Pt,y:m-Pt},{x:p-Pt,y:m+u},{x:p+d,y:m+u},{x:p+d,y:m-Pt}],S=`M${p-Pt},${m-Pt} L${p+d},${m-Pt} L${p+d},${m+u} L${p-Pt},${m+u} L${p-Pt},${m-Pt}
206
- M${p-Pt},${m} L${p+d},${m}
207
- M${p},${m-Pt} L${p},${m+u}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=x.path(S,C),_=a.insert(()=>T,":first-child");return _.attr("transform",`translate(${Pt/2}, ${Pt/2})`),_.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Pt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Pt/2-(n.y-(n.top??0))})`),st(t,_),t.intersect=function(F){return tt.polygon(t,k,F)},a}f(Hf,"windowPane");var Bh=new Set(["redux-color","redux-dark-color"]),r2=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function On(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Dt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:dt}=Dt(),{background:Ct}=dt,Lt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await On(e,Lt)}const c=Dt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:u}=t,{labelStyles:p,nodeStyles:m}=ot(t);if(r.attributes.length===0&&t.label){const dt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ie(t.label,c)+dt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Ct=await ti(e,t,dt);if(i!=null&&Bh.has(i)){const Lt=r.colorIndex??0;Ct.attr("data-color-id",`color-${Lt%l.length}`)}if(!ve(c.htmlLabels)){const Lt=Ct.select("text"),bt=Lt.node()?.getBBox();Lt.attr("transform",`translate(${-bt.width/2}, 0)`)}return Ct}c.htmlLabels||(h*=1.25,d*=1.25);let y=lt(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await _r(x,t.label??"",c,0,0,["name"],p);C.height+=d;let k=0;const S=[],T=[];let _=0,F=0,L=0,v=0,j=!0,Y=!0;for(const dt of r.attributes){const Ct=await _r(x,dt.type,c,0,k,["attribute-type"],p);_=Math.max(_,Ct.width+h);const Lt=await _r(x,dt.name,c,0,k,["attribute-name"],p);F=Math.max(F,Lt.width+h);const bt=await _r(x,dt.keys.join(),c,0,k,["attribute-keys"],p);L=Math.max(L,bt.width+h);const jt=await _r(x,dt.comment,c,0,k,["attribute-comment"],p);v=Math.max(v,jt.width+h);const Rt=Math.max(Ct.height,Lt.height,bt.height,jt.height)+d;T.push({yOffset:k,rowHeight:Rt}),k+=Rt}let N=4;L<=h&&(j=!1,L=0,N--),v<=h&&(Y=!1,v=0,N--);const J=x.node().getBBox();if(C.width+h*2-(_+F+L+v)>0){const dt=C.width+h*2-(_+F+L+v);_+=dt/N,F+=dt/N,L>0&&(L+=dt/N),v>0&&(v+=dt/N)}const I=_+F+L+v,q=rt.svg(x),Z=et(t,{});t.look!=="handDrawn"&&(Z.roughness=0,Z.fillStyle="solid");let $=0;T.length>0&&($=T.reduce((dt,Ct)=>dt+(Ct?.rowHeight??0),0));const Q=Math.max(J.width+h*2,t?.width||0,I),K=Math.max(($??0)+C.height,t?.height||0),ut=-Q/2,ht=-K/2;if(x.selectAll("g:not(:first-child)").each((dt,Ct,Lt)=>{const bt=mt(Lt[Ct]),jt=bt.attr("transform");let Rt=0,Me=0;if(jt){const me=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(jt);me&&(Rt=parseFloat(me[1]),Me=parseFloat(me[2]),bt.attr("class").includes("attribute-name")?Rt+=_:bt.attr("class").includes("attribute-keys")?Rt+=_+F:bt.attr("class").includes("attribute-comment")&&(Rt+=_+F+L))}bt.attr("transform",`translate(${ut+h/2+Rt}, ${Me+ht+C.height+d/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(ht+d/2)+")"),i!=null&&Bh.has(i)){const dt=r.colorIndex??0;x.attr("data-color-id",`color-${dt%l.length}`)}const vt=q.rectangle(ut,ht,Q,K,Z),At=x.insert(()=>vt,":first-child").attr("class","outer-path").attr("style",u.join(""));S.push(0);for(const[dt,Ct]of T.entries()){const bt=(dt+1)%2===0&&Ct.yOffset!==0,jt=q.rectangle(ut,C.height+ht+Ct?.yOffset,Q,Ct?.rowHeight,{...Z,fill:bt?o:a,stroke:n});x.insert(()=>jt,"g.label").attr("style",u.join("")).attr("class",`row-rect-${bt?"even":"odd"}`)}const Mt=1e-4;let Et=Br(ut,C.height+ht,Q+ut,C.height+ht,Mt),_t=q.polygon(Et.map(dt=>[dt.x,dt.y]),Z);if(x.insert(()=>_t).attr("class","divider"),Et=Br(_+ut,C.height+ht,_+ut,K+ht,Mt),_t=q.polygon(Et.map(dt=>[dt.x,dt.y]),Z),x.insert(()=>_t).attr("class","divider"),j){const dt=_+F+ut;Et=Br(dt,C.height+ht,dt,K+ht,Mt),_t=q.polygon(Et.map(Ct=>[Ct.x,Ct.y]),Z),x.insert(()=>_t).attr("class","divider")}if(Y){const dt=_+F+L+ut;Et=Br(dt,C.height+ht,dt,K+ht,Mt),_t=q.polygon(Et.map(Ct=>[Ct.x,Ct.y]),Z),x.insert(()=>_t).attr("class","divider")}for(const dt of S){const Ct=C.height+ht+dt;Et=Br(ut,Ct,Q+ut,Ct,Mt),_t=q.polygon(Et.map(Lt=>[Lt.x,Lt.y]),Z),x.insert(()=>_t).attr("class","divider")}if(st(t,At),m&&t.look!=="handDrawn")if(i!=null&&r2.has(i))x.selectAll("path").attr("style",m);else{const Ct=m.split(";")?.filter(Lt=>Lt.includes("stroke"))?.map(Lt=>`${Lt}`).join("; ");x.selectAll("path").attr("style",Ct??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(dt){return tt.rect(t,dt)},x}f(On,"erBox");async function _r(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==ul(t)&&(t=ul(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ye(n,t,{width:Ie(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(ve(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=mt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}f(_r,"addText");function Br(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(Br,"lineToPolygon");async function Yf(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",lt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,u=0,p=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Ti(n,{text:`«${k}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Ti(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();u=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await Ti(c,k,y,[k.parseClassifier()]);y+=S+o}p=c.node().getBBox().height,p<=0&&(p=s/2),h=a.insert("g").attr("class","methods-group text");let x=0;for(const k of t.methods){const S=await Ti(h,k,x,[k.parseClassifier()]);x+=S+o}let C=a.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${d+u+s*2})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${d+u+(p?p+s*4:s*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}f(Yf,"textHelper");async function Ti(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Dt();let a="useHtmlLabels"in t?t.useHtmlLabels:ve(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Oi(n)&&(a=!0);const l=await ye(s,Ga(Ue(n)),{width:Ie(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],u=mt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1),await Mn(d),c=d.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{i.includes("font-weight: bolder")&&mt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(Ti,"addText");async function jf(e,t){const r=kt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??ve(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Yf(e,t,r,n,a),{labelStyles:d,nodeStyles:u}=ot(t);t.labelStyle=d,t.cssStyles=l.styles||"";const p=l.styles?.join(";")||u||"";t.cssStyles||(t.cssStyles=p.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,y=rt.svg(c),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=a:l.members.length>0&&l.methods.length===0&&(k+=a*2);const T=-C/2,_=-k/2;let F=m?o*2:l.members.length===0&&l.methods.length===0?-o:0;S&&(F=o*2);const L=y.rectangle(T-o,_-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0),C+2*o,k+2*o+F,x),v=c.insert(()=>L,":first-child");v.attr("class","basic label-container outer-path");const j=v.node().getBBox(),Y=c.select(".annotation-group").node().getBBox().height-(m?o/2:0)||0,N=c.select(".label-group").node().getBBox().height-(m?o/2:0)||0,J=c.select(".members-group").node().getBBox().height-(m?o/2:0)||0,I=(Y+N+_+o-(_-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((q,Z,$)=>{const Q=mt($[Z]),K=Q.attr("transform");let ut=0;if(K){const Mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(K);Mt&&(ut=parseFloat(Mt[2]))}let ht=ut+_+o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(Q.attr("class").includes("methods-group")){const At=Math.max(J,a/2);S?ht=Math.max(I,Y+N+At+_+a*2+o)+a*2:ht=Y+N+At+_+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?ht=ut-a:ht=ut),n||(ht-=4);let vt=T;(Q.attr("class").includes("label-group")||Q.attr("class").includes("annotation-group"))&&(vt=-Q.node()?.getBBox().width/2||0,c.selectAll("text").each(function(At,Mt,Et){window.getComputedStyle(Et[Mt]).textAnchor==="middle"&&(vt=0)})),Q.attr("transform",`translate(${vt}, ${ht})`)}),l.members.length>0||l.methods.length>0||m){const q=Y+N+_+o,Z=y.line(j.x,q,j.x+j.width,q+.001,x);c.insert(()=>Z).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",p)}if(m||l.members.length>0||l.methods.length>0){const q=Y+N+J+_+a*2+o,Z=y.line(j.x,S?Math.max(I,q):q,j.x+j.width,(S?Math.max(I,q):q)+.001,x);c.insert(()=>Z).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",p)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",p),v.select(":nth-child(2)").attr("style",p),c.selectAll(".divider").select("path").attr("style",p),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",p),!n){const q=RegExp(/color\s*:\s*([^;]*)/),Z=q.exec(p);if(Z){const $=Z[0].replace("color","fill");c.selectAll("tspan").attr("style",$)}else if(d){const $=q.exec(d);if($){const Q=$[0].replace("color","fill");c.selectAll("tspan").attr("style",Q)}}}return st(t,v),t.intersect=function(q){return tt.rect(t,q)},c}f(jf,"classBox");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=lt(t),h=kt(),{themeVariables:d}=h,{borderColorArray:u,requirementEdgeLabelBackground:p}=d,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await be(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):x=await be(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let C=x;const k=await be(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+n,l){const N=await be(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=N;const J=await be(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=J;const I=await be(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=I,await be(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const N=await be(y,`${o.type?`Type: ${o.type}`:""}`,C,t.labelStyle,m);C+=N,await be(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+a,T=(y.node()?.getBBox().height??200)+a,_=-S/2,F=-T/2,L=rt.svg(y),v=et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const j=L.rectangle(_,F,S,T,v),Y=y.insert(()=>j,":first-child");if(Y.attr("class","basic label-container outer-path").attr("style",i),u?.length){const N=t.colorIndex??0;y.attr("data-color-id",`color-${N%u.length}`)}if(y.selectAll(".label").each((N,J,I)=>{const q=mt(I[J]),Z=q.attr("transform");let $=0,Q=0;if(Z){const vt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Z);vt&&($=parseFloat(vt[1]),Q=parseFloat(vt[2]))}const K=Q-T/2;let ut=_+a/2;(J===0||J===1)&&(ut=$),q.attr("transform",`translate(${ut}, ${K+a})`)}),C>x+k+n){const N=F+x+k+n;let J;if(t.look==="neo"){const Z=[[_,N],[_+S,N],[_+S,N+.001],[_,N+.001]];J=L.polygon(Z,v)}else J=L.line(_,N,_+S,N,v);y.insert(()=>J).attr("class","divider")}return st(t,Y),t.intersect=function(N){return tt.rect(t,N)},i&&t.look!=="handDrawn"&&(p||u?.length)&&y.selectAll("path").attr("style",i),y}f(Uf,"requirementBox");async function be(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=kt(),n=a.htmlLabels??!0,l=await ye(o,Ga(Ue(t)),{width:Ie(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],d=mt(l);s==="start"&&mt(h).style("text-align","left"),c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const h=l.children[0];for(const d of h.children)i&&d.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const d of h.children)d.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}f(be,"addText");var i2=f(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Xf(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=ot(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await nt(e,t,lt(t)),h=t.padding||10;let d="",u;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),u=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;u?{label:m,bbox:y}=await Lo(u,"ticket"in t&&t.ticket||"",p):{label:m,bbox:y}=await Lo(n,"ticket"in t&&t.ticket||"",p);const{label:x,bbox:C}=await Lo(n,"assigned"in t&&t.assigned||"",p);t.width=a;const k=10,S=t?.width||0,T=Math.max(y.height,C.height)/2,_=Math.max(l.height+k*2,t?.height||0)+T,F=-S/2,L=-_/2;c.attr("transform","translate("+(h-S/2)+", "+(-T-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-T+l.height/2)+")"),x.attr("transform","translate("+(h+S/2-C.width-2*o)+", "+(-T+l.height/2)+")");let v;const{rx:j,ry:Y}=t,{cssStyles:N}=t;if(t.look==="handDrawn"){const J=rt.svg(n),I=et(t,{}),q=j||Y?J.path(ne(F,L,S,_,j||0),I):J.rectangle(F,L,S,_,I);v=n.insert(()=>q,":first-child"),v.attr("class","basic label-container").attr("style",N||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",j??5).attr("ry",Y??5).attr("x",F).attr("y",L).attr("width",S).attr("height",_);const J="priority"in t&&t.priority;if(J){const I=n.append("line"),q=F+2,Z=L+Math.floor((j??0)/2),$=L+_-Math.floor((j??0)/2);I.attr("x1",q).attr("y1",Z).attr("x2",q).attr("y2",$).attr("stroke-width","4").attr("stroke",i2(J))}}return st(t,v),t.height=_,t.intersect=function(J){return tt.rect(t,J)},n}f(Xf,"kanbanItem");async function Gf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await nt(e,t,lt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,u=o.width+20,p=o.height+20,m=Math.max(l,u),y=Math.max(c,p);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let x;const C=`M0 0
208
- a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
209
- a${h},${h} 1 0,0 ${m*.25},0
210
- a${h},${h} 1 0,0 ${m*.25},0
211
- a${h},${h} 1 0,0 ${m*.25},${y*.1}
212
-
213
- a${h},${h} 1 0,0 ${m*.15},${y*.33}
214
- a${h*.8},${h*.8} 1 0,0 0,${y*.34}
215
- a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
216
-
217
- a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
218
- a${h},${h} 1 0,0 ${-1*m*.25},0
219
- a${h},${h} 1 0,0 ${-1*m*.25},0
220
- a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
221
-
222
- a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
223
- a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
224
- a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
225
- H0 V0 Z`;if(t.look==="handDrawn"){const k=rt.svg(s),S=et(t,{}),T=k.path(C,S);x=s.insert(()=>T,":first-child"),x.attr("class","basic label-container").attr("style",Nt(d))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),st(t,x),t.calcIntersect=function(k,S){return tt.rect(k,S)},t.intersect=function(k){return A.info("Bang intersect",t,k),tt.rect(t,k)},s}f(Gf,"bang");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await nt(e,t,lt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,u=.35*l,p=.2*l,{cssStyles:m}=t;let y;const x=`M0 0
226
- a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
227
- a${u},${u} 1 0,1 ${l*.4},${-1*l*.1}
228
- a${d},${d} 1 0,1 ${l*.35},${l*.2}
229
-
230
- a${h},${h} 1 0,1 ${l*.15},${c*.35}
231
- a${p},${p} 1 0,1 ${-1*l*.15},${c*.65}
232
-
233
- a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
234
- a${u},${u} 1 0,1 ${-1*l*.5},0
235
- a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
236
-
237
- a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
238
- a${p},${p} 1 0,1 ${l*.1},${-1*c*.65}
239
- H0 V0 Z`;if(t.look==="handDrawn"){const C=rt.svg(s),k=et(t,{}),S=C.path(x,k);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",Nt(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),st(t,y),t.calcIntersect=function(C,k){return tt.rect(C,k)},t.intersect=function(C){return A.info("Cloud intersect",t,C),tt.rect(t,C)},s}f(Vf,"cloud");async function Zf(e,t){const{labelStyles:r,nodeStyles:i}=ot(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await nt(e,t,lt(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
240
- M${-l/2} ${c/2-h}
241
- v${-c+2*h}
242
- q0,-${h} ${h},-${h}
243
- h${l-2*h}
244
- q${h},0 ${h},${h}
245
- v${c-h}
246
- H${-l/2}
247
- Z
248
- `:`
249
- M${-l/2} ${c/2-h}
250
- v${-c+2*h}
251
- q0,-${h} ${h},-${h}
252
- h${l-2*h}
253
- q${h},0 ${h},${h}
254
- v${c-2*h}
255
- q0,${h} ${-h},${h}
256
- h${-(l-2*h)}
257
- q${-h},0 ${-h},${-h}
258
- Z
259
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const u=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),st(t,u),t.calcIntersect=function(p,m){return tt.rect(p,m)},t.intersect=function(p){return tt.rect(t,p)},s}f(Zf,"defaultMindmapNode");async function Kf(e,t){const r={padding:t.padding??0};return $n(e,t,r)}f(Kf,"mindmapCircle");var s2=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Lf},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:_f},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ff},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$f},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Vu},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Zu},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:ef},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Ou},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Wu},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Iu},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Gu},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:$n},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Gf},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Vf},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:wf},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:of},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:gf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Rf},{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:uf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Qu},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Pf},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ru},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Bf},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Af},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ef},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:rf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:af},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Yu},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:ju},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Uu},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:yf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Wf},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:sf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:If},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:mf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Xu},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ku},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Nf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Hf},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Ju},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:qf},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:vf},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:bf},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Cf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:$u},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Hu},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Df},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Of},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:zf},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Sf},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:xf}],o2=f(()=>{const t=[...Object.entries({state:Mf,choice:qu,note:kf,composite:Nu,rectWithTitle:Tf,labelRect:ff,block_arrow:Pu,collapsedGroup:Du,iconSquare:cf,iconCircle:lf,icon:nf,iconRounded:hf,imageSquare:df,anchor:Eu,kanbanItem:Xf,mindmapCircle:Kf,defaultMindmapNode:Zf,classBox:jf,erBox:On,requirementBox:Uf}),...s2.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Qf=o2();function a2(e){return e in Qf}f(a2,"isValidShape");var no=f(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),lo=new Map;async function Dn(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Qf[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",Nt(t.look)),t.tooltip&&s.attr("title",t.tooltip),lo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Dn,"insertNode");var wB=f((e,t)=>{lo.set(t.id,e)},"setNodeElem"),n2=f(()=>{lo.clear()},"clear"),vh=f(e=>{const t=lo.get(e.id);A.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"),l2=f(async(e,t)=>{const r=kt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=ot(t),u=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),p=ve(r.flowchart.htmlLabels),m=t.direction==="LR",y=u.insert("g").attr("class","cluster-label swimlane-label"),x=await ye(y,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let C=x.getBBox();if(p){const I=x.children[0],q=mt(x);C=I.getBoundingClientRect(),q.attr("width",C.width),q.attr("height",C.height)}const k=t.padding??0,S=t.width<=C.width+k?C.width+k:t.width;t.width<=C.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const T=t.height,_=t.y-T/2,F=t.y+T/2,L=t.x-S/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:_+T/3,j=m?4:0,Y=C.height+2*j;let N,J;if(m){const I=Math.max(Y,C.height+2*j),q=L+I,Z=Math.max(0,S-I);if(t.look==="handDrawn"){const K=rt.svg(u),ut=et(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),ht=et(t,{roughness:.7,fill:"none",stroke:n,seed:s}),vt=K.rectangle(L,_,I,T,ut);N=u.insert(()=>vt,":first-child");const At=K.rectangle(q,_,Z,T,ht);J=u.insert(()=>At,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",d.join(";").replace("fill","stroke"))}else N=u.insert("rect",":first-child"),J=u.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",L).attr("y",_).attr("width",I).attr("height",T).attr("fill",o).attr("stroke",n),J.attr("class","swimlane-body").attr("style",c).attr("x",q).attr("y",_).attr("width",Z).attr("height",T).attr("fill","none").attr("stroke",n);const $=L+I/2,Q=t.y;y.attr("transform",`translate(${$}, ${Q}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const I=Math.max(0,v-_),q=Math.min(Y,I),Z=_+q,$=Math.max(0,F-Z),Q=t.x-S/2;if(t.look==="handDrawn"){const ht=rt.svg(u),vt=et(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),At=et(t,{roughness:.7,fill:"none",stroke:n,seed:s}),Mt=ht.rectangle(Q,_,S,q,vt);N=u.insert(()=>Mt,":first-child");const Et=ht.rectangle(Q,Z,S,$,At);J=u.insert(()=>Et,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",d.join(";").replace("fill","stroke"))}else N=u.insert("rect",":first-child"),J=u.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",Q).attr("y",_).attr("width",S).attr("height",q).attr("fill",o).attr("stroke",n),J.attr("class","swimlane-body").attr("style",c).attr("x",Q).attr("y",Z).attr("width",S).attr("height",$).attr("fill","none").attr("stroke",n);const K=t.x-C.width/2,ut=_+(q-C.height)/2;y.attr("transform",`translate(${K}, ${ut})`)}if(A.trace("Swimlane data ",t,JSON.stringify(t)),l){const I=y.select("span");I&&I.attr("style",l)}return t.offsetX=0,t.width=S,t.height=T,t.offsetY=C.height-k/2,t.intersect=function(I){return fr(t,I)},{cluster:u,labelBBox:C}},"swimlane"),Jf=f(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=kt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ot(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=Zt(r),p=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await ye(p,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):m=await ze(p,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(Zt(r)){const L=m.children[0],v=mt(m);y=L.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;A.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const L=rt.svg(d),v=et(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),j=L.path(ne(k,S,x,C,0),v);T=d.insert(()=>(A.debug("Rough node insert CXC",j),j),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:_}=no(r);if(p.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+_})`),n){const L=p.select("span");L&&L.attr("style",n)}const F=T.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return fr(t,L)},{cluster:d,labelBBox:y}},"rect"),h2=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return fr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),c2=f(async(e,t)=>{const r=kt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let u=c.append("rect");const p=await ze(d,t.label,t.labelStyle,void 0,!0);let m=p.getBBox();if(Zt(r)){const j=p.children[0],Y=mt(p);m=j.getBoundingClientRect(),Y.attr("width",m.width),Y.attr("height",m.height)}const y=0*t.padding,x=y/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,T=t.x-C/2,_=t.y-k/2;t.width=C;const F=t.y-t.height/2-x+m.height+2;let L;if(t.look==="handDrawn"){const j=t.cssClasses.includes("statediagram-cluster-alt"),Y=rt.svg(c),N=t.rx||t.ry?Y.path(ne(T,_,C,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):Y.rectangle(T,_,C,k,{seed:s});L=c.insert(()=>N,":first-child");const J=Y.rectangle(T,F,C,S,{fill:j?o:a,fillStyle:j?"hachure":"solid",stroke:l,seed:s});L=c.insert(()=>N,":first-child"),u=c.insert(()=>J)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",T).attr("y",_).attr("width",C).attr("height",k).attr("data-look",t.look),u.attr("class","inner").attr("x",T).attr("y",F).attr("width",C).attr("height",S);d.attr("transform",`translate(${t.x-m.width/2}, ${_+1-(Zt(r)?0:3)})`);const v=L.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(j){return fr(t,j)},{cluster:c,labelBBox:m}},"roundedWithTitle"),d2=f(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=kt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ot(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=Zt(r),p=d.insert("g").attr("class","cluster-label "),m=await ye(p,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let y=m.getBBox();if(Zt(r)){const L=m.children[0],v=mt(m);y=L.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;A.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const L=rt.svg(d),v=et(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),j=L.path(ne(k,S,x,C,t.rx),v);T=d.insert(()=>(A.debug("Rough node insert CXC",j),j),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:_}=no(r);if(p.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+_})`),n){const L=p.select("span");L&&L.attr("style",n)}const F=T.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return fr(t,L)},{cluster:d,labelBBox:y}},"kanbanSection"),u2=f((e,t)=>{const r=kt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,u=t.y-h/2;t.width=c;let p;if(t.look==="handDrawn"){const x=rt.svg(a).rectangle(d,u,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});p=a.insert(()=>x,":first-child")}else{p=n.insert("rect",":first-child");let y="outer";t.look,y="divider",p.attr("class",y).attr("x",d).attr("y",u).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=p.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return fr(t,y)},{cluster:a,labelBBox:{}}},"divider"),f2=Jf,g2={rect:Jf,squareRect:f2,roundedWithTitle:c2,noteGroup:h2,divider:u2,kanbanSection:d2,swimlane:l2},tg=new Map,eg=f(async(e,t)=>{const r=t.shape||"rect",i=await g2[r](e,t);return tg.set(t.id,i),i},"insertCluster"),p2=f(()=>{tg=new Map},"clear"),mi=f((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Gt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Lh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function _i(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ot(e),t=Ot(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}f(_i,"calculateDeltaAndAngle");var Ot=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),y2=f(e=>({x:f(function(t,r,i){let s=0;const o=Ot(i[0]).x<Ot(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:p,deltaX:m}=_i(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.cos(p)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:p,deltaX:m}=_i(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.cos(p)*(m>=0?1:-1)}const a=Math.abs(Ot(t).x-Ot(i[i.length-1]).x),n=Math.abs(Ot(t).y-Ot(i[i.length-1]).y),l=Math.abs(Ot(t).x-Ot(i[0]).x),c=Math.abs(Ot(t).y-Ot(i[0]).y),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],u=1;if(a<d&&a>0&&n<d){let p=d+u-a;p*=o==="right"?-1:1,s-=p}if(l<h&&l>0&&c<h){let p=h+u-l;p*=o==="right"?-1:1,s+=p}return Ot(t).x+s},"x"),y:f(function(t,r,i){let s=0;const o=Ot(i[0]).y<Ot(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:p,deltaY:m}=_i(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.abs(Math.sin(p))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:p,deltaY:m}=_i(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(m>=0?1:-1)}const a=Math.abs(Ot(t).y-Ot(i[i.length-1]).y),n=Math.abs(Ot(t).x-Ot(i[i.length-1]).x),l=Math.abs(Ot(t).y-Ot(i[0]).y),c=Math.abs(Ot(t).x-Ot(i[0]).x),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],u=1;if(a<d&&a>0&&n<d){let p=d+u-a;p*=o==="up"?-1:1,s-=p}if(l<h&&l>0&&c<h){let p=h+u-l;p*=o==="up"?-1:1,s+=p}return Ot(t).y+s},"y")}),"getLineFunctionsWithOffset"),m2=f((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Fh(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Fh(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),x2={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}},C2=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Fh=f((e,t,r,i,s,o,a=!1,n)=>{if(!r||r==="none")return;const l=x2[r],c=l&&C2.includes(l.type);if(!l){A.warn(`Unknown arrow type: ${r}`);return}const h=l.type,p=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${p}_${m}`;if(!document.getElementById(y)){const x=document.getElementById(p);if(x){const C=x.cloneNode(!0);C.id=y,C.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),x.parentNode?.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${p})`)},"addEdgeMarker"),b2=f(e=>typeof e=="string"?e:kt()?.flowchart?.curve,"resolveEdgeCurveType"),Zr=new Map,It=new Map,k2=f(()=>{Zr.clear(),It.clear()},"clear"),rg=f(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),xi=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Pn=f(async(e,t)=>{const r=kt();let i=Zt(r);const{labelStyles:s}=ot(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ye(e,t.label,{style:xi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),A.info("abc82",t,t.labelType);let h,d;if(i){const p=c.children[0],m=mt(c);h=await cr.measure(()=>p.getBoundingClientRect()),d=h,m.attr("width",h.width),m.attr("height",h.height)}else{const p=mt(c).select("text").node();await cr.measure(()=>{h=c.getBBox(),p&&typeof p.getBBox=="function"?d=p.getBBox():d=h})}a.attr("transform",mi(d,i)),Zr.set(t.id,o),t.width=h.width,t.height=h.height;let u;if(t.startLabelLeft){const p=e.insert("g").attr("class","edgeTerminals"),m=p.insert("g").attr("class","inner"),y=await ze(m,t.startLabelLeft,xi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],k=mt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",mi(x,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).startLeft=p,Bi(u,t.startLabelLeft)}if(t.startLabelRight){const p=e.insert("g").attr("class","edgeTerminals"),m=p.insert("g").attr("class","inner"),y=await ze(m,t.startLabelRight,xi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],k=mt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",mi(x,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).startRight=p,Bi(u,t.startLabelRight)}if(t.endLabelLeft){const p=e.insert("g").attr("class","edgeTerminals"),m=p.insert("g").attr("class","inner"),y=await ze(p,t.endLabelLeft,xi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],k=mt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",mi(x,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).endLeft=p,Bi(u,t.endLabelLeft)}if(t.endLabelRight){const p=e.insert("g").attr("class","edgeTerminals"),m=p.insert("g").attr("class","inner"),y=await ze(p,t.endLabelRight,xi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],k=mt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",mi(x,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).endRight=p,Bi(u,t.endLabelRight)}return c},"insertEdgeLabel");function Bi(e,t){Zt(kt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Bi,"setTerminalWidth");var w2=f((e,t)=>{A.debug("Moving label abc88 ",e.id,e.label,Zr.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=kt(),{subGraphTitleTotalMargin:s}=no(i);if(e.label){const o=Zr.get(e.id);let a=e.x,n=e.y;if(r){const l=Vt.calcLabelPosition(r);A.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=It.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=It.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=It.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=It.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),S2=f((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),T2=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),_2=f((e,t,r)=>{A.debug(`intersection calc abc89:
260
- outsidePoint: ${JSON.stringify(t)}
261
- insidePoint : ${JSON.stringify(r)}
262
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const u={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(u.x=t.x,u.y=t.y),h===0&&(u.x=t.x),c===0&&(u.y=t.y),A.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,u),u}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,u=r.x<t.x?r.x+h-n:r.x-h+n,p=r.y<t.y?r.y+d:r.y-d;return A.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:u,_y:p}),n===0&&(u=t.x,p=t.y),h===0&&(u=t.x),c===0&&(p=t.y),{x:u,y:p}}},"intersection"),Mh=f((e,t)=>{A.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(A.info("abc88 checking point",o,t),!T2(t,o)&&!s){const a=_2(t,i,o);A.debug("abc88 inside",o,i,a),A.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?A.warn("abc88 no intersect",a,r):r.push(a),s=!0}else A.warn("abc88 outside",o,i),i=o,s||r.push(o)}),A.debug("returning points",r),r},"cutPathAtIntersect");function ig(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(ig,"extractCornerPoints");var Eh=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),B2=f(function(e){const{cornerPointPositions:t}=ig(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Eh(s,a,5),l=Eh(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let u={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){A.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const p=5;a.x===n.x?u={x:c<0?n.x-p+d:n.x+p-d,y:h<0?n.y-d:n.y+d}:u={x:c<0?n.x-d:n.x+d,y:h<0?n.y-p+d:n.y+p-d}}else A.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(u,l)}else r.push(e[i]);return r},"fixCorners"),v2=f((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),sg=f(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=kt();let h=t.points,d=!1;const u=s;var p=o;const m=[];for(const K in t.cssCompiledStyles)Md(K)||m.push(t.cssCompiledStyles[K]);if(c==="swimlane"){if(p.intersect&&u.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[u.intersect(h[0]),p.intersect(h[1])];else{const K=h.slice(1,-1),ut=K[0],ht=K[K.length-1],vt=.5,At=Math.abs(h[h.length-1].x-ht.x)<vt&&Math.abs(h[h.length-1].y-ht.y)<vt,Mt=u.intersect(ut),Et=At?ht:p.intersect(ht),_t=Math.abs(Et.x-ht.x)<vt&&Math.abs(Et.y-ht.y)<vt,Ct=Math.abs(Mt.x-ut.x)<vt&&Math.abs(Mt.y-ut.y)<vt?[]:[Mt],Lt=_t?[]:[Et];h=[...Ct,...K,...Lt]}h=S2(t,h)}else p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),h.push(p.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(A.info("to cluster abc88",r.get(t.toCluster)),h=Mh(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(A.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Mh(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let x=h.filter(K=>!Number.isNaN(K.y));const C=b2(t.curve);C!=="rounded"&&(x=B2(x));let k=Ei;switch(C){case"linear":k=Ei;break;case"basis":k=ma;break;case"cardinal":k=pd;break;case"bumpX":k=cd;break;case"bumpY":k=dd;break;case"catmullRom":k=md;break;case"monotoneX":k=Sd;break;case"monotoneY":k=Td;break;case"natural":k=Bd;break;case"step":k=vd;break;case"stepAfter":k=Fd;break;case"stepBefore":k=Ld;break;case"rounded":k=Ei;break;default:k=ma}const{x:S,y:T}=y2(t),_=zC().x(S).y(T).curve(k);let F;switch(t.thickness){case"normal":F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible";break;default:F="edge-thickness-normal"}switch(t.pattern){case"solid":F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed";break;default:F+=" edge-pattern-solid"}let L,v=C==="rounded"?og(ag(x,t),5):_(x);const j=Array.isArray(t.style)?t.style:[t.style];let Y=j.find(K=>K?.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let J=!1;if(t.look==="handDrawn"){const K=rt.svg(e);Object.assign([],x);const ut=K.path(v,{roughness:.3,seed:l});F+=" transition",L=mt(ut).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",j?j.reduce((vt,At)=>vt+";"+At,""):"");let ht=L.attr("d");L.attr("d",ht),e.node().appendChild(L.node())}else{const K=m.join(";"),ut=j?j.reduce((_t,dt)=>_t+dt+";",""):"",ht=(K?K+";"+ut+";":ut)+";"+(j?j.reduce((_t,dt)=>_t+";"+dt,""):"");L=e.append("path").attr("d",v).attr("id",`${a}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",ht),Y=ht.match(/stroke:([^;]+)/)?.[1],J=t.animate===!0||!!t.animation||K.includes("animation");const vt=L.node(),At=typeof vt.getTotalLength=="function"?vt.getTotalLength():0,Mt=Lh[t.arrowTypeStart]||0,Et=Lh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!J){const dt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?v2(At,Mt,Et):`0 ${Mt} ${At-Mt-Et} ${Et}`}; stroke-dashoffset: 0;`;L.attr("style",dt+L.attr("style"))}}L.attr("data-edge",!0),L.attr("data-et","edge"),L.attr("data-id",t.id),L.attr("data-points",y),L.attr("data-look",Nt(t.look)),t.showPoints&&x.forEach(K=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",K.x).attr("cy",K.y)});let I="";(kt().flowchart.arrowMarkerAbsolute||kt().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),A.info("arrowTypeStart",t.arrowTypeStart),A.info("arrowTypeEnd",t.arrowTypeEnd);const q=!J&&t?.look==="neo";m2(L,t,I,a,i,q,Y);const Z=Math.floor(h.length/2),$=h[Z];Vt.isLabelCoordinateInPath($,L.attr("d"))||(d=!0);let Q={};return d&&(Q.updatedPath=h),Q.originalPath=t.points,Q},"insertEdge");function og(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,u=l.y-a.y,p=Math.hypot(c,h),m=Math.hypot(d,u);if(p<s||m<s){r+=`L${a.x},${a.y}`;continue}const y=c/p,x=h/p,C=d/m,k=u/m,S=y*C+x*k,T=Math.max(-1,Math.min(1,S)),_=Math.acos(T);if(_<s||Math.abs(Math.PI-_)<s){r+=`L${a.x},${a.y}`;continue}const F=Math.min(t/Math.sin(_/2),p/2,m/2),L=a.x-y*F,v=a.y-x*F,j=a.x+C*F,Y=a.y+k*F;r+=`L${L},${v}`,r+=`Q${a.x},${a.y} ${j},${Y}`}}return r}f(og,"generateRoundedPath");function $a(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f($a,"calculateDeltaAndAngle");function ag(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Gt[t.arrowTypeStart]){const s=Gt[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=$a(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const s=Gt[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=$a(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}f(ag,"applyMarkerOffsetsToPoints");var L2=f((e,t,r,i)=>{t.forEach(s=>{K2[s](e,r,i)})},"insertMarkers"),F2=f((e,t,r)=>{A.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),M2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),E2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),A2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),O2=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),D2=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),P2=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),I2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),R2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),q2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),N2=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),W2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),z2=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),H2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),Y2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),j2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),U2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),X2=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
263
- L20,10
264
- M20,10
265
- L0,20`)},"requirement_arrow"),G2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
266
- L20,10
267
- M20,10
268
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),V2=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Z2=f((e,t,r)=>{const i=Dt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),K2={extension:F2,composition:M2,aggregation:E2,dependency:A2,lollipop:$2,point:O2,circle:D2,cross:P2,barb:I2,barbNeo:R2,only_one:q2,zero_or_one:N2,one_or_more:W2,zero_or_more:z2,only_one_neo:H2,zero_or_one_neo:Y2,one_or_more_neo:j2,zero_or_more_neo:U2,requirement_arrow:X2,requirement_contains:V2,requirement_arrow_neo:G2,requirement_contains_neo:Z2},ng=L2,Q2="\0",Ke="\0",Ah="";class ho{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Ki(void 0),this._defaultEdgeLabelFn=Ki(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ke]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return ll(t)||(t=Ki(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Qe(this._nodes)}sources(){var t=this;return Qi(this.nodes(),function(r){return hl(t._in[r])})}sinks(){var t=this;return Qi(this.nodes(),function(r){return hl(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return Ve(t,function(o){i.length>1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Ke,this._children[t]={},this._children[Ke][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Ve(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Ve(Qe(this._in[t]),r),delete this._in[t],delete this._preds[t],Ve(Qe(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Tr(r))r=Ke;else{r+="";for(var i=r;!Tr(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Ke)return r}}children(t){if(Tr(t)&&(t=Ke),this._isCompound){var r=this._children[t];if(r)return Qe(r)}else{if(t===Ke)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Qe(r)}successors(t){var r=this._sucs[t];if(r)return Qe(r)}neighbors(t){var r=this.predecessors(t);if(r)return Gp(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Ve(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),Ve(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&Ve(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return ll(t)||(t=Ki(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return po(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return sy(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,Tr(i)||(i=""+i);var n=vi(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!Tr(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=J2(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,$h(this._preds[r],t),$h(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):vi(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):vi(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):vi(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Oh(this._preds[r],t),Oh(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=po(i);return r?Qi(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=po(i);return r?Qi(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}ho.prototype._nodeCount=0;ho.prototype._edgeCount=0;function $h(e,t){e[t]?e[t]++:e[t]=1}function Oh(e,t){--e[t]||delete e[t]}function vi(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Ah+o+Ah+(Tr(i)?Q2:i)}function J2(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Eo(e,t){return vi(e,t.v,t.w,t.name)}function lg(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}f(lg,"createLayoutElementGroups");async function hg(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await nt(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}f(hg,"measureGroupLabel");async function cg(e,t,r){const i=await Dn(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}f(cg,"insertMeasuredNode");async function dg(e,t){const r=new ho({multigraph:!0,compound:!0}),i=[...t.edges],s=kt(),o=lg(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await hg(n,h),r.setNode(h.id,{...h});else{if(c){const d=await cg(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&rg(h)&&await Pn(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await xt(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-INFHLROL-CK3iq_fM.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}f(dg,"createGraphWithElements");var St=new Map,ir=new Map,ug=new Map,tw=f(()=>{ir.clear(),ug.clear(),St.clear()},"clear"),qi=f((e,t)=>{const r=ir.get(t)||[];return A.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),ew=f((e,t)=>{const r=ir.get(t)||[];return A.info("Descendants of ",t," is ",r),A.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||qi(e.v,t)||qi(e.w,t)||r.includes(e.w):(A.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),fg=f((e,t,r,i)=>{A.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),A.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)fg(o,t,r,i);else{const a=t.node(o);A.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(A.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(A.debug("Setting parent",o,e),r.setParent(o,e)):(A.info("In copy ",e,"root",i,"data",t.node(e),i),A.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);A.debug("Copying Edges",n),n.forEach(l=>{A.info("Edge",l);const c=t.edge(l.v,l.w,l.name);A.info("Edge data",c,i);try{ew(l,i)?(A.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),A.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):A.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){A.error(h)}})}A.debug("Removing node",o),t.removeNode(o)})},"copy"),gg=f((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)ug.set(s,e),i=[...i,...gg(s,t)];return i},"extractDescendants"),rw=f((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Us=f((e,t,r)=>{const i=t.children(e);if(A.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=Us(o,t,r),n=rw(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Dh=f(e=>!St.has(e)||!St.get(e).externalConnections?e:St.has(e)?St.get(e).id:e,"getAnchorId"),SB=f((e,t)=>{if(!e||t>10){A.debug("Opting out, no graph ");return}else A.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(A.debug("Cluster identified",r," Replacement id in edges: ",Us(r,e,r)),ir.set(r,gg(r,e)),St.set(r,{id:Us(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(A.debug("Cluster identified",r,ir),s.forEach(o=>{const a=qi(o.v,r),n=qi(o.w,r);a^n&&(A.debug("Edge: ",o," leaves cluster ",r),A.debug("Descendants of XXX ",r,": ",ir.get(r)),St.get(r).externalConnections=!0)})):A.debug("Not a cluster ",r,ir)});for(let r of St.keys()){const i=St.get(r).id,s=e.parent(i);s!==r&&St.has(s)&&!St.get(s).externalConnections&&(St.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&St.get(r)?.externalConnections&&o&&mg(e,i,r)){const a=iw(e,r,e.parent(i));a&&(St.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);A.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),A.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(A.debug("Fix XXX",St,"ids:",r.v,r.w,"Translating: ",St.get(r.v)," --- ",St.get(r.w)),St.get(r.v)||St.get(r.w)){if(A.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Dh(r.v),o=Dh(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);St.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);St.get(a).externalConnections=!0,i.toCluster=r.w}A.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),pg(e,0),A.trace(St)},"adjustClustersAndEdges"),pg=f((e,t)=>{if(t>10){A.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){A.debug("Done, no node has children",e.nodes());return}A.debug("Nodes = ",r,t);for(const s of r)if(A.debug("Extracting node",s,St,St.has(s)&&!St.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!St.has(s))A.debug("Not a cluster",s,t);else if(!St.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){A.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";St.get(s)?.clusterData?.dir&&(a=St.get(s).clusterData.dir,A.debug("Fixing dir",St.get(s).clusterData.dir,a));const n=new ho({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});fg(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:St.get(s).clusterData,label:St.get(s).label,graph:n})}else A.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!St.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),A.debug(St);r=e.nodes(),A.debug("New list of nodes",r);for(const s of r){const o=e.node(s);A.debug(" Now next level",s,o),o?.clusterNode&&pg(o.graph,t+1)}},"extractor"),yg=f((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=yg(e,s);r=[...r,...o]}),r},"sorter"),TB=f(e=>yg(e,e.children()),"sortNodesByHierarchy"),mg=f((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=St.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),iw=f((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||qi(s,r))continue;const o=Us(s,e,t);if(o&&!mg(e,o,t))return o}return null},"findSafeAnchorNode");function xg({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??Rn;return f(async function(l,c,h,d){const u=c.select("g");(h?.insertMarkers??ng)(u,l.markers,l.type,l.diagramId),In();const p={element:u,helpers:h,options:d};p.preparedLayout=await e?.(l,p);const m=await a(l,p),y=await r(l,p),x={...p,measure:m};i?await i(l,x,y):await qn(l,x,o),await s?.(l,x,y)},"render")}f(xg,"createCommonLayoutRenderer");function In(){n2(),k2(),p2(),tw()}f(In,"clearLayoutRenderState");async function Rn(e,{element:t}){return await dg(t,e)}f(Rn,"defaultMeasureLayout");async function qn(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Cg(s,a,t,r);const o=kg(e.nodes);for(const a of e.edges)wg(a,r)||await Sg(s,a,o,e,r,t)}f(qn,"paintLayoutData");async function Cg(e,t,r,i){t.clusterNode?vh(t):bg(t,r,i)?await eg(e.clusters,t):vh(t)}f(Cg,"paintLayoutNode");function bg(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}f(bg,"shouldPaintAsCluster");function kg(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}f(kg,"buildNodeLookup");function wg(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}f(wg,"shouldSkipPaintEdge");async function Sg(e,t,r,i,s,o){const a=sg(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Oa(t.start,t,r,o,s),Oa(t.end,t,r,o,s),i.diagramId,Tg(t,s));rg(t)&&(Zr.has(t.id)||await Pn(e.edgeLabels,t),_g(t,a))}f(Sg,"paintLayoutEdge");function Oa(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}f(Oa,"getRenderedNode");function Tg(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}f(Tg,"shouldSkipIntersect");function _g(e,t){const r=t?.updatedPath??t?.originalPath,i=Dt(),{subGraphTitleTotalMargin:s}=no({flowchart:i.flowchart??{}});if(e.label){const o=Zr.get(e.id);let a=e.x,n=e.y;if(r){const l=Vt.calcLabelPosition(r);A.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=It.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=It.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=It.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=It.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}f(_g,"positionRenderedEdgeLabel");function Bg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}f(Bg,"getDefaultExportFromCjs");var Ut={},hs={},qe={},Ph;function ei(){if(Ph)return qe;Ph=1;function e(a){return typeof a>"u"||a===null}f(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}f(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}f(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];a[d]=n[d]}}return a}f(i,"extend");function s(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}f(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return f(o,"isNegativeZero"),qe.isNothing=e,qe.isObject=t,qe.toArray=r,qe.repeat=s,qe.isNegativeZero=o,qe.extend=i,qe}f(ei,"requireCommon");var Ao,Ih;function ri(){if(Ih)return Ao;Ih=1;function e(r,i){let s="";const o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
269
-
270
- `+r.mark.snippet),o+" "+s):o}f(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return f(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=f(function(i){return this.name+": "+e(this,i)},"toString"),Ao=t,Ao}f(ri,"requireException");var $o,Rh;function vg(){if(Rh)return $o;Rh=1;const e=ei();function t(s,o,a,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-o>d&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}f(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}f(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const u=Math.min(s.line+o.linesAfter,l.length).toString().length,p=o.maxLength-(o.indent+u+3);for(let y=1;y<=o.linesBefore&&!(h-y<0);y++){const x=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),p);d=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),u)+" | "+x.str+`
271
- `+d}const m=t(s.buffer,n[h],l[h],s.position,p);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),u)+" | "+m.str+`
272
- `,d+=e.repeat("-",o.indent+u+3+m.pos)+`^
273
- `;for(let y=1;y<=o.linesAfter&&!(h+y>=l.length);y++){const x=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),p);d+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),u)+" | "+x.str+`
274
- `}return d.replace(/\n$/,"")}return f(i,"makeSnippet"),$o=i,$o}f(vg,"requireSnippet");var Oo,qh;function Kt(){if(qh)return Oo;qh=1;const e=ri(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(l){a[String(l)]=n})}),a}f(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return f(s,"Type2"),Oo=s,Oo}f(Kt,"requireType");var Do,Nh;function Nn(){if(Nh)return Do;Nh=1;const e=ri(),t=Kt();function r(o,a){const n=[];return o[a].forEach(function(l){let c=n.length;n.forEach(function(h,d){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=d)}),n[c]=l}),n}f(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}f(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return o}f(i,"compileMap");function s(o){return this.extend(o)}return f(s,"Schema2"),s.prototype.extend=f(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Do=s,Do}f(Nn,"requireSchema");var Po,Wh;function Wn(){if(Wh)return Po;Wh=1;const e=Kt();return Po=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(t){return t!==null?t:""},"construct")}),Po}f(Wn,"requireStr");var Io,zh;function zn(){if(zh)return Io;zh=1;const e=Kt();return Io=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(t){return t!==null?t:[]},"construct")}),Io}f(zn,"requireSeq");var Ro,Hh;function Hn(){if(Hh)return Ro;Hh=1;const e=Kt();return Ro=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(t){return t!==null?t:{}},"construct")}),Ro}f(Hn,"requireMap");var qo,Yh;function Yn(){if(Yh)return qo;Yh=1;const e=Nn();return qo=new e({explicit:[Wn(),zn(),Hn()]}),qo}f(Yn,"requireFailsafe");var No,jh;function jn(){if(jh)return No;jh=1;const e=Kt();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}f(t,"resolveYamlNull");function r(){return null}f(r,"constructYamlNull");function i(s){return s===null}return f(i,"isNull"),No=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"}),No}f(jn,"require_null");var Wo,Uh;function Un(){if(Uh)return Wo;Uh=1;const e=Kt();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}f(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}f(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return f(i,"isBoolean"),Wo=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:f(function(s){return s?"true":"false"},"lowercase"),uppercase:f(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Wo}f(Un,"requireBool");var zo,Xh;function Xn(){if(Xh)return zo;Xh=1;const e=ei(),t=Kt();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}f(r,"isHexCode");function i(c){return c>=48&&c<=55}f(i,"isOctCode");function s(c){return c>=48&&c<=57}f(s,"isDecCode");function o(c){if(c===null)return!1;const h=c.length;let d=0,u=!1;if(!h)return!1;let p=c[d];if((p==="-"||p==="+")&&(p=c[++d]),p==="0"){if(d+1===h)return!0;if(p=c[++d],p==="b"){for(d++;d<h;d++){if(p=c[d],p!=="0"&&p!=="1")return!1;u=!0}return u&&isFinite(a(c))}if(p==="x"){for(d++;d<h;d++){if(!r(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(a(c))}if(p==="o"){for(d++;d<h;d++){if(!i(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(a(c))}}for(;d<h;d++){if(!s(c.charCodeAt(d)))return!1;u=!0}return u?isFinite(a(c)):!1}f(o,"resolveYamlInteger");function a(c){let h=c,d=1,u=h[0];if((u==="-"||u==="+")&&(u==="-"&&(d=-1),h=h.slice(1),u=h[0]),h==="0")return 0;if(u==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}f(a,"parseYamlInteger");function n(c){return a(c)}f(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return f(l,"isInteger"),zo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:l,represent:{binary:f(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:f(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:f(function(c){return c.toString(10)},"decimal"),hexadecimal:f(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),zo}f(Xn,"requireInt");var Ho,Gh;function Gn(){if(Gh)return Ho;Gh=1;const e=ei(),t=Kt(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}f(s,"resolveYamlFloat");function o(c){let h=c.toLowerCase();const d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}f(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return a.test(d)?d.replace("e",".e"):d}f(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return f(l,"isFloat"),Ho=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:n,defaultStyle:"lowercase"}),Ho}f(Gn,"requireFloat");var Yo,Vh;function Vn(){return Vh||(Vh=1,Yo=Yn().extend({implicit:[jn(),Un(),Xn(),Gn()]})),Yo}f(Vn,"requireJson");var jo,Zh;function Zn(){return Zh||(Zh=1,jo=Vn()),jo}f(Zn,"requireCore");var Uo,Kh;function Kn(){if(Kh)return Uo;Kh=1;const e=Kt(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}f(i,"resolveYamlTimestamp");function s(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],d=+c[2]-1,u=+c[3];if(!c[4])return new Date(Date.UTC(h,d,u));const p=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const C=+c[10],k=+(c[11]||0);l=(C*60+k)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,d,u,p,m,y,n));return l&&x.setTime(x.getTime()-l),x}f(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return f(o,"representYamlTimestamp"),Uo=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Uo}f(Kn,"requireTimestamp");var Xo,Qh;function Qn(){if(Qh)return Xo;Qh=1;const e=Kt();function t(r){return r==="<<"||r===null}return f(t,"resolveYamlMerge"),Xo=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Xo}f(Qn,"requireMerge");var Go,Jh;function Jn(){if(Jh)return Go;Jh=1;const e=Kt(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
275
- \r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const d=c.indexOf(a.charAt(h));if(!(d>64)){if(d<0)return!1;n+=6}}return n%8===0}f(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const d=[];for(let p=0;p<l;p++)p%4===0&&p&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|c.indexOf(n.charAt(p));const u=l%4*6;return u===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):u===18?(d.push(h>>10&255),d.push(h>>2&255)):u===12&&d.push(h>>4&255),new Uint8Array(d)}f(i,"constructYamlBinary");function s(a){let n="",l=0;const c=a.length,h=t;for(let u=0;u<c;u++)u%3===0&&u&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[u];const d=c%3;return d===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):d===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):d===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}f(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return f(o,"isBinary"),Go=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),Go}f(Jn,"requireBinary");var Vo,tc;function tl(){if(tc)return Vo;tc=1;const e=Kt(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a=[],n=o;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let d=!1;if(r.call(h)!=="[object Object]")return!1;let u;for(u in h)if(t.call(h,u))if(!d)d=!0;else return!1;if(!d)return!1;if(a.indexOf(u)===-1)a.push(u);else return!1}return!0}f(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return f(s,"constructYamlOmap"),Vo=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Vo}f(tl,"requireOmap");var Zo,ec;function el(){if(ec)return Zo;ec=1;const e=Kt(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}f(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return f(i,"constructYamlPairs"),Zo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Zo}f(el,"requirePairs");var Ko,rc;function rl(){if(rc)return Ko;rc=1;const e=Kt(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}f(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return f(i,"constructYamlSet"),Ko=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Ko}f(rl,"requireSet");var Qo,ic;function co(){return ic||(ic=1,Qo=Zn().extend({implicit:[Kn(),Qn()],explicit:[Jn(),tl(),el(),rl()]})),Qo}f(co,"require_default");var sc;function Lg(){if(sc)return hs;sc=1;const e=ei(),t=ri(),r=vg(),i=co(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,l=4,c=1,h=2,d=3,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(g){return Object.prototype.toString.call(g)}f(C,"_class");function k(g){return g===10||g===13}f(k,"isEol");function S(g){return g===9||g===32}f(S,"isWhiteSpace");function T(g){return g===9||g===32||g===10||g===13}f(T,"isWsOrEol");function _(g){return g===44||g===91||g===93||g===123||g===125}f(_,"isFlowIndicator");function F(g){if(g>=48&&g<=57)return g-48;const M=g|32;return M>=97&&M<=102?M-97+10:-1}f(F,"fromHexCode");function L(g){return g===120?2:g===117?4:g===85?8:0}f(L,"escapedHexLen");function v(g){return g>=48&&g<=57?g-48:-1}f(v,"fromDecimalCode");function j(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
276
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}f(j,"simpleEscapeSequence");function Y(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}f(Y,"charFromCodepoint");function N(g,M,R){M==="__proto__"?Object.defineProperty(g,M,{configurable:!0,enumerable:!0,writable:!0,value:R}):g[M]=R}f(N,"setProperty");const J=new Array(256),I=new Array(256);for(let g=0;g<256;g++)J[g]=j(g)?1:0,I[g]=j(g);function q(g,M){this.input=g,this.filename=M.filename||null,this.schema=M.schema||i,this.onWarning=M.onWarning||null,this.legacy=M.legacy||!1,this.json=M.json||!1,this.listener=M.listener||null,this.maxDepth=typeof M.maxDepth=="number"?M.maxDepth:100,this.maxTotalMergeKeys=typeof M.maxTotalMergeKeys=="number"?M.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}f(q,"State");function Z(g,M){const R={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return R.snippet=r(R),new t(M,R)}f(Z,"generateError");function $(g,M){throw Z(g,M)}f($,"throwError");function Q(g,M){g.onWarning&&g.onWarning.call(null,Z(g,M))}f(Q,"throwWarning");function K(g,M,R){const H=g.anchorMapTransactions;if(H.length!==0){const P=H[H.length-1];s.call(P,M)||(P[M]={existed:s.call(g.anchorMap,M),value:g.anchorMap[M]})}g.anchorMap[M]=R}f(K,"storeAnchor");function ut(g){g.anchorMapTransactions.push(Object.create(null))}f(ut,"beginAnchorTransaction");function ht(g){const M=g.anchorMapTransactions.pop(),R=g.anchorMapTransactions;if(R.length===0)return;const H=R[R.length-1],P=Object.keys(M);for(let V=0,w=P.length;V<w;V+=1){const E=P[V];s.call(H,E)||(H[E]=M[E])}}f(ht,"commitAnchorTransaction");function vt(g){const M=g.anchorMapTransactions.pop(),R=Object.keys(M);for(let H=R.length-1;H>=0;H-=1){const P=M[R[H]];P.existed?g.anchorMap[R[H]]=P.value:delete g.anchorMap[R[H]]}}f(vt,"rollbackAnchorTransaction");function At(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}f(At,"snapshotState");function Mt(g,M){g.position=M.position,g.line=M.line,g.lineStart=M.lineStart,g.lineIndent=M.lineIndent,g.firstTabInLine=M.firstTabInLine,g.tag=M.tag,g.anchor=M.anchor,g.kind=M.kind,g.result=M.result}f(Mt,"restoreState");const Et={YAML:f(function(M,R,H){M.version!==null&&$(M,"duplication of %YAML directive"),H.length!==1&&$(M,"YAML directive accepts exactly one argument");const P=/^([0-9]+)\.([0-9]+)$/.exec(H[0]);P===null&&$(M,"ill-formed argument of the YAML directive");const V=parseInt(P[1],10),w=parseInt(P[2],10);V!==1&&$(M,"unacceptable YAML version of the document"),M.version=H[0],M.checkLineBreaks=w<2,w!==1&&w!==2&&Q(M,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(M,R,H){let P;H.length!==2&&$(M,"TAG directive accepts exactly two arguments");const V=H[0];P=H[1],y.test(V)||$(M,"ill-formed tag handle (first argument) of the TAG directive"),s.call(M.tagMap,V)&&$(M,'there is a previously declared suffix for "'+V+'" tag handle'),x.test(P)||$(M,"ill-formed tag prefix (second argument) of the TAG directive");try{P=decodeURIComponent(P)}catch{$(M,"tag prefix is malformed: "+P)}M.tagMap[V]=P},"handleTagDirective")};function _t(g,M,R,H){if(M<R){const P=g.input.slice(M,R);if(H)for(let V=0,w=P.length;V<w;V+=1){const E=P.charCodeAt(V);E===9||E>=32&&E<=1114111||$(g,"expected valid JSON character")}else u.test(P)&&$(g,"the stream contains non-printable characters");g.result+=P}}f(_t,"captureSegment");function dt(g,M,R,H){e.isObject(R)||$(g,"cannot merge mappings; the provided source object is unacceptable");const P=Object.keys(R);for(let V=0,w=P.length;V<w;V+=1){const E=P[V];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&$(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call(M,E)||(N(M,E,R[E]),H[E]=!0)}}f(dt,"mergeMappings");function Ct(g,M,R,H,P,V,w,E,X){if(Array.isArray(P)){P=Array.prototype.slice.call(P);for(let W=0,z=P.length;W<z;W+=1)Array.isArray(P[W])&&$(g,"nested arrays are not supported inside keys"),typeof P=="object"&&C(P[W])==="[object Object]"&&(P[W]="[object Object]")}if(typeof P=="object"&&C(P)==="[object Object]"&&(P="[object Object]"),P=String(P),M===null&&(M={}),H==="tag:yaml.org,2002:merge")if(Array.isArray(V))for(let W=0,z=V.length;W<z;W+=1)dt(g,M,V[W],R);else dt(g,M,V,R);else!g.json&&!s.call(R,P)&&s.call(M,P)&&(g.line=w||g.line,g.lineStart=E||g.lineStart,g.position=X||g.position,$(g,"duplicated mapping key")),N(M,P,V),delete R[P];return M}f(Ct,"storeMappingPair");function Lt(g){const M=g.input.charCodeAt(g.position);M===10?g.position++:M===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):$(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}f(Lt,"readLineBreak");function bt(g,M,R){let H=0,P=g.input.charCodeAt(g.position);for(;P!==0;){for(;S(P);)P===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),P=g.input.charCodeAt(++g.position);if(M&&P===35)do P=g.input.charCodeAt(++g.position);while(P!==10&&P!==13&&P!==0);if(k(P))for(Lt(g),P=g.input.charCodeAt(g.position),H++,g.lineIndent=0;P===32;)g.lineIndent++,P=g.input.charCodeAt(++g.position);else break}return R!==-1&&H!==0&&g.lineIndent<R&&Q(g,"deficient indentation"),H}f(bt,"skipSeparationSpace");function jt(g){let M=g.position,R=g.input.charCodeAt(M);return!!((R===45||R===46)&&R===g.input.charCodeAt(M+1)&&R===g.input.charCodeAt(M+2)&&(M+=3,R=g.input.charCodeAt(M),R===0||T(R)))}f(jt,"testDocumentSeparator");function Rt(g,M){M===1?g.result+=" ":M>1&&(g.result+=e.repeat(`
277
- `,M-1))}f(Rt,"writeFoldedLines");function Me(g,M,R){let H,P,V,w,E,X;const W=g.kind,z=g.result;let G=g.input.charCodeAt(g.position);if(T(G)||_(G)||G===35||G===38||G===42||G===33||G===124||G===62||G===39||G===34||G===37||G===64||G===96)return!1;if(G===63||G===45){const U=g.input.charCodeAt(g.position+1);if(T(U)||R&&_(U))return!1}for(g.kind="scalar",g.result="",H=P=g.position,V=!1;G!==0;){if(G===58){const U=g.input.charCodeAt(g.position+1);if(T(U)||R&&_(U))break}else if(G===35){const U=g.input.charCodeAt(g.position-1);if(T(U))break}else{if(g.position===g.lineStart&&jt(g)||R&&_(G))break;if(k(G))if(w=g.line,E=g.lineStart,X=g.lineIndent,bt(g,!1,-1),g.lineIndent>=M){V=!0,G=g.input.charCodeAt(g.position);continue}else{g.position=P,g.line=w,g.lineStart=E,g.lineIndent=X;break}}V&&(_t(g,H,P,!1),Rt(g,g.line-w),H=P=g.position,V=!1),S(G)||(P=g.position+1),G=g.input.charCodeAt(++g.position)}return _t(g,H,P,!1),g.result?!0:(g.kind=W,g.result=z,!1)}f(Me,"readPlainScalar");function gr(g,M){let R,H,P=g.input.charCodeAt(g.position);if(P!==39)return!1;for(g.kind="scalar",g.result="",g.position++,R=H=g.position;(P=g.input.charCodeAt(g.position))!==0;)if(P===39)if(_t(g,R,g.position,!0),P=g.input.charCodeAt(++g.position),P===39)R=g.position,g.position++,H=g.position;else return!0;else k(P)?(_t(g,R,H,!0),Rt(g,bt(g,!1,M)),R=H=g.position):g.position===g.lineStart&&jt(g)?$(g,"unexpected end of the document within a single quoted scalar"):(g.position++,S(P)||(H=g.position));$(g,"unexpected end of the stream within a single quoted scalar")}f(gr,"readSingleQuotedScalar");function me(g,M){let R,H,P,V=g.input.charCodeAt(g.position);if(V!==34)return!1;for(g.kind="scalar",g.result="",g.position++,R=H=g.position;(V=g.input.charCodeAt(g.position))!==0;){if(V===34)return _t(g,R,g.position,!0),g.position++,!0;if(V===92){if(_t(g,R,g.position,!0),V=g.input.charCodeAt(++g.position),k(V))bt(g,!1,M);else if(V<256&&J[V])g.result+=I[V],g.position++;else if((P=L(V))>0){let w=P,E=0;for(;w>0;w--)V=g.input.charCodeAt(++g.position),(P=F(V))>=0?E=(E<<4)+P:$(g,"expected hexadecimal character");g.result+=Y(E),g.position++}else $(g,"unknown escape sequence");R=H=g.position}else k(V)?(_t(g,R,H,!0),Rt(g,bt(g,!1,M)),R=H=g.position):g.position===g.lineStart&&jt(g)?$(g,"unexpected end of the document within a double quoted scalar"):(g.position++,S(V)||(H=g.position))}$(g,"unexpected end of the stream within a double quoted scalar")}f(me,"readDoubleQuotedScalar");function si(g,M){let R=!0,H,P,V;const w=g.tag;let E;const X=g.anchor;let W,z,G,U;const at=Object.create(null);let it,ct,ft,wt=g.input.charCodeAt(g.position);if(wt===91)W=93,U=!1,E=[];else if(wt===123)W=125,U=!0,E={};else return!1;for(g.anchor!==null&&K(g,g.anchor,E),wt=g.input.charCodeAt(++g.position);wt!==0;){if(bt(g,!0,M),wt=g.input.charCodeAt(g.position),wt===W)return g.position++,g.tag=w,g.anchor=X,g.kind=U?"mapping":"sequence",g.result=E,!0;if(R?wt===44&&$(g,"expected the node content, but found ','"):$(g,"missed comma between flow collection entries"),ct=it=ft=null,z=G=!1,wt===63){const $t=g.input.charCodeAt(g.position+1);T($t)&&(z=G=!0,g.position++,bt(g,!0,M))}H=g.line,P=g.lineStart,V=g.position,le(g,M,o,!1,!0),ct=g.tag,it=g.result,bt(g,!0,M),wt=g.input.charCodeAt(g.position),(G||g.line===H)&&wt===58&&(z=!0,wt=g.input.charCodeAt(++g.position),bt(g,!0,M),le(g,M,o,!1,!0),ft=g.result),U?Ct(g,E,at,ct,it,ft,H,P,V):z?E.push(Ct(g,null,at,ct,it,ft,H,P,V)):E.push(it),bt(g,!0,M),wt=g.input.charCodeAt(g.position),wt===44?(R=!0,wt=g.input.charCodeAt(++g.position)):R=!1}$(g,"unexpected end of the stream within a flow collection")}f(si,"readFlowCollection");function oi(g,M){let R,H=c,P=!1,V=!1,w=M,E=0,X=!1,W,z=g.input.charCodeAt(g.position);if(z===124)R=!1;else if(z===62)R=!0;else return!1;for(g.kind="scalar",g.result="";z!==0;)if(z=g.input.charCodeAt(++g.position),z===43||z===45)c===H?H=z===43?d:h:$(g,"repeat of a chomping mode identifier");else if((W=v(z))>=0)W===0?$(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):V?$(g,"repeat of an indentation width identifier"):(w=M+W-1,V=!0);else break;if(S(z)){do z=g.input.charCodeAt(++g.position);while(S(z));if(z===35)do z=g.input.charCodeAt(++g.position);while(!k(z)&&z!==0)}for(;z!==0;){for(Lt(g),g.lineIndent=0,z=g.input.charCodeAt(g.position);(!V||g.lineIndent<w)&&z===32;)g.lineIndent++,z=g.input.charCodeAt(++g.position);if(!V&&g.lineIndent>w&&(w=g.lineIndent),k(z)){E++;continue}if(!V&&w===0&&$(g,"missing indentation for block scalar"),g.lineIndent<w){H===d?g.result+=e.repeat(`
278
- `,P?1+E:E):H===c&&P&&(g.result+=`
279
- `);break}R?S(z)?(X=!0,g.result+=e.repeat(`
280
- `,P?1+E:E)):X?(X=!1,g.result+=e.repeat(`
281
- `,E+1)):E===0?P&&(g.result+=" "):g.result+=e.repeat(`
282
- `,E):g.result+=e.repeat(`
283
- `,P?1+E:E),P=!0,V=!0,E=0;const G=g.position;for(;!k(z)&&z!==0;)z=g.input.charCodeAt(++g.position);_t(g,G,g.position,!1)}return!0}f(oi,"readBlockScalar");function xe(g,M){const R=g.tag,H=g.anchor,P=[];let V=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&K(g,g.anchor,P);let w=g.input.charCodeAt(g.position);for(;w!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,$(g,"tab characters must not be used in indentation")),w===45);){const E=g.input.charCodeAt(g.position+1);if(!T(E))break;if(V=!0,g.position++,bt(g,!0,-1)&&g.lineIndent<=M){P.push(null),w=g.input.charCodeAt(g.position);continue}const X=g.line;if(le(g,M,n,!1,!0),P.push(g.result),bt(g,!0,-1),w=g.input.charCodeAt(g.position),(g.line===X||g.lineIndent>M)&&w!==0)$(g,"bad indentation of a sequence entry");else if(g.lineIndent<M)break}return V?(g.tag=R,g.anchor=H,g.kind="sequence",g.result=P,!0):!1}f(xe,"readBlockSequence");function pr(g,M,R){let H,P,V,w;const E=g.tag,X=g.anchor,W={},z=Object.create(null);let G=null,U=null,at=null,it=!1,ct=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&K(g,g.anchor,W);let ft=g.input.charCodeAt(g.position);for(;ft!==0;){!it&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,$(g,"tab characters must not be used in indentation"));const wt=g.input.charCodeAt(g.position+1),$t=g.line;if((ft===63||ft===58)&&T(wt))ft===63?(it&&(Ct(g,W,z,G,U,null,P,V,w),G=U=at=null),ct=!0,it=!0,H=!0):it?(it=!1,H=!0):$(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,ft=wt;else{if(P=g.line,V=g.lineStart,w=g.position,!le(g,R,a,!1,!0))break;if(g.line===$t){for(ft=g.input.charCodeAt(g.position);S(ft);)ft=g.input.charCodeAt(++g.position);if(ft===58)ft=g.input.charCodeAt(++g.position),T(ft)||$(g,"a whitespace character is expected after the key-value separator within a block mapping"),it&&(Ct(g,W,z,G,U,null,P,V,w),G=U=at=null),ct=!0,it=!1,H=!1,G=g.tag,U=g.result;else if(ct)$(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=E,g.anchor=X,!0}else if(ct)$(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=E,g.anchor=X,!0}if((g.line===$t||g.lineIndent>M)&&(it&&(P=g.line,V=g.lineStart,w=g.position),le(g,M,l,!0,H)&&(it?U=g.result:at=g.result),it||(Ct(g,W,z,G,U,at,P,V,w),G=U=at=null),bt(g,!0,-1),ft=g.input.charCodeAt(g.position)),(g.line===$t||g.lineIndent>M)&&ft!==0)$(g,"bad indentation of a mapping entry");else if(g.lineIndent<M)break}return it&&Ct(g,W,z,G,U,null,P,V,w),ct&&(g.tag=E,g.anchor=X,g.kind="mapping",g.result=W),ct}f(pr,"readBlockMapping");function ai(g){let M=!1,R=!1,H,P,V=g.input.charCodeAt(g.position);if(V!==33)return!1;g.tag!==null&&$(g,"duplication of a tag property"),V=g.input.charCodeAt(++g.position),V===60?(M=!0,V=g.input.charCodeAt(++g.position)):V===33?(R=!0,H="!!",V=g.input.charCodeAt(++g.position)):H="!";let w=g.position;if(M){do V=g.input.charCodeAt(++g.position);while(V!==0&&V!==62);g.position<g.length?(P=g.input.slice(w,g.position),V=g.input.charCodeAt(++g.position)):$(g,"unexpected end of the stream within a verbatim tag")}else{for(;V!==0&&!T(V);)V===33&&(R?$(g,"tag suffix cannot contain exclamation marks"):(H=g.input.slice(w-1,g.position+1),y.test(H)||$(g,"named tag handle cannot contain such characters"),R=!0,w=g.position+1)),V=g.input.charCodeAt(++g.position);P=g.input.slice(w,g.position),m.test(P)&&$(g,"tag suffix cannot contain flow indicator characters")}P&&!x.test(P)&&$(g,"tag name cannot contain such characters: "+P);try{P=decodeURIComponent(P)}catch{$(g,"tag name is malformed: "+P)}return M?g.tag=P:s.call(g.tagMap,H)?g.tag=g.tagMap[H]+P:H==="!"?g.tag="!"+P:H==="!!"?g.tag="tag:yaml.org,2002:"+P:$(g,'undeclared tag handle "'+H+'"'),!0}f(ai,"readTagProperty");function yr(g){let M=g.input.charCodeAt(g.position);if(M!==38)return!1;g.anchor!==null&&$(g,"duplication of an anchor property"),M=g.input.charCodeAt(++g.position);const R=g.position;for(;M!==0&&!T(M)&&!_(M);)M=g.input.charCodeAt(++g.position);return g.position===R&&$(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(R,g.position),!0}f(yr,"readAnchorProperty");function mr(g){let M=g.input.charCodeAt(g.position);if(M!==42)return!1;M=g.input.charCodeAt(++g.position);const R=g.position;for(;M!==0&&!T(M)&&!_(M);)M=g.input.charCodeAt(++g.position);g.position===R&&$(g,"name of an alias node must contain at least one character");const H=g.input.slice(R,g.position);return s.call(g.anchorMap,H)||$(g,'unidentified alias "'+H+'"'),g.result=g.anchorMap[H],bt(g,!0,-1),!0}f(mr,"readAlias");function ni(g,M,R,H){const P=At(g);return ut(g),Mt(g,M),g.tag=null,g.anchor=null,g.kind=null,g.result=null,pr(g,R,H)&&g.kind==="mapping"?(ht(g),!0):(vt(g),Mt(g,P),!1)}f(ni,"tryReadBlockMappingFromProperty");function le(g,M,R,H,P){let V,w,E=1,X=!1,W=!1,z=null,G,U,at;g.depth>=g.maxDepth&&$(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const it=V=w=l===R||n===R;if(H&&bt(g,!0,-1)&&(X=!0,g.lineIndent>M?E=1:g.lineIndent===M?E=0:g.lineIndent<M&&(E=-1)),E===1)for(;;){const ct=g.input.charCodeAt(g.position),ft=At(g);if(X&&(ct===33&&g.tag!==null||ct===38&&g.anchor!==null)||!ai(g)&&!yr(g))break;z===null&&(z=ft),bt(g,!0,-1)?(X=!0,w=it,g.lineIndent>M?E=1:g.lineIndent===M?E=0:g.lineIndent<M&&(E=-1)):w=!1}if(w&&(w=X||P),E===1||l===R)if(o===R||a===R?U=M:U=M+1,at=g.position-g.lineStart,E===1)if(w&&(xe(g,at)||pr(g,at,U))||si(g,U))W=!0;else{const ct=g.input.charCodeAt(g.position);z!==null&&it&&!w&&ct!==124&&ct!==62&&ni(g,z,z.position-z.lineStart,U)||V&&oi(g,U)||gr(g,U)||me(g,U)?W=!0:mr(g)?(W=!0,(g.tag!==null||g.anchor!==null)&&$(g,"alias node should not have any properties")):Me(g,U,o===R)&&(W=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&K(g,g.anchor,g.result)}else E===0&&(W=w&&xe(g,at));if(g.tag===null)g.anchor!==null&&K(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&$(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let ct=0,ft=g.implicitTypes.length;ct<ft;ct+=1)if(G=g.implicitTypes[ct],G.resolve(g.result)){g.result=G.construct(g.result),g.tag=G.tag,g.anchor!==null&&K(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))G=g.typeMap[g.kind||"fallback"][g.tag];else{G=null;const ct=g.typeMap.multi[g.kind||"fallback"];for(let ft=0,wt=ct.length;ft<wt;ft+=1)if(g.tag.slice(0,ct[ft].tag.length)===ct[ft].tag){G=ct[ft];break}}G||$(g,"unknown tag !<"+g.tag+">"),g.result!==null&&G.kind!==g.kind&&$(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+G.kind+'", not "'+g.kind+'"'),G.resolve(g.result,g.tag)?(g.result=G.construct(g.result,g.tag),g.anchor!==null&&K(g,g.anchor,g.result)):$(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||W}f(le,"composeNode");function li(g){const M=g.position;let R=!1,H;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(H=g.input.charCodeAt(g.position))!==0&&(bt(g,!0,-1),H=g.input.charCodeAt(g.position),!(g.lineIndent>0||H!==37));){R=!0,H=g.input.charCodeAt(++g.position);let P=g.position;for(;H!==0&&!T(H);)H=g.input.charCodeAt(++g.position);const V=g.input.slice(P,g.position),w=[];for(V.length<1&&$(g,"directive name must not be less than one character in length");H!==0;){for(;S(H);)H=g.input.charCodeAt(++g.position);if(H===35){do H=g.input.charCodeAt(++g.position);while(H!==0&&!k(H));break}if(k(H))break;for(P=g.position;H!==0&&!T(H);)H=g.input.charCodeAt(++g.position);w.push(g.input.slice(P,g.position))}H!==0&&Lt(g),s.call(Et,V)?Et[V](g,V,w):Q(g,'unknown document directive "'+V+'"')}if(bt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,bt(g,!0,-1)):R&&$(g,"directives end mark is expected"),le(g,g.lineIndent-1,l,!1,!0),bt(g,!0,-1),g.checkLineBreaks&&p.test(g.input.slice(M,g.position))&&Q(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&jt(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,bt(g,!0,-1));return}g.position<g.length-1&&$(g,"end of the stream or a document separator is expected")}f(li,"readDocument");function xr(g,M){g=String(g),M=M||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
284
- `),g.charCodeAt(0)===65279&&(g=g.slice(1)));const R=new q(g,M),H=g.indexOf("\0");for(H!==-1&&(R.position=H,$(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;)li(R);return R.documents}f(xr,"loadDocuments");function Cr(g,M,R){M!==null&&typeof M=="object"&&typeof R>"u"&&(R=M,M=null);const H=xr(g,R);if(typeof M!="function")return H;for(let P=0,V=H.length;P<V;P+=1)M(H[P])}f(Cr,"loadAll2");function hi(g,M){const R=xr(g,M);if(R.length!==0){if(R.length===1)return R[0];throw new t("expected a single document in the stream, but found more")}}return f(hi,"load2"),hs.loadAll=Cr,hs.load=hi,hs}f(Lg,"requireLoader");var Jo={},oc;function Fg(){if(oc)return Jo;oc=1;const e=ei(),t=ri(),r=co(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,l=13,c=32,h=33,d=34,u=35,p=37,m=38,y=39,x=42,C=44,k=45,S=58,T=61,_=62,F=63,L=64,v=91,j=93,Y=96,N=123,J=124,I=125,q={};q[0]="\\0",q[7]="\\a",q[8]="\\b",q[9]="\\t",q[10]="\\n",q[11]="\\v",q[12]="\\f",q[13]="\\r",q[27]="\\e",q[34]='\\"',q[92]="\\\\",q[133]="\\N",q[160]="\\_",q[8232]="\\L",q[8233]="\\P";const Z=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Q(w,E){if(E===null)return{};const X={},W=Object.keys(E);for(let z=0,G=W.length;z<G;z+=1){let U=W[z],at=String(E[U]);U.slice(0,2)==="!!"&&(U="tag:yaml.org,2002:"+U.slice(2));const it=w.compiledTypeMap.fallback[U];it&&s.call(it.styleAliases,at)&&(at=it.styleAliases[at]),X[U]=at}return X}f(Q,"compileStyleMap");function K(w){let E,X;const W=w.toString(16).toUpperCase();if(w<=255)E="x",X=2;else if(w<=65535)E="u",X=4;else if(w<=4294967295)E="U",X=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+E+e.repeat("0",X-W.length)+W}f(K,"encodeHex");const ut=1,ht=2;function vt(w){this.schema=w.schema||r,this.indent=Math.max(1,w.indent||2),this.noArrayIndent=w.noArrayIndent||!1,this.skipInvalid=w.skipInvalid||!1,this.flowLevel=e.isNothing(w.flowLevel)?-1:w.flowLevel,this.styleMap=Q(this.schema,w.styles||null),this.sortKeys=w.sortKeys||!1,this.lineWidth=w.lineWidth||80,this.noRefs=w.noRefs||!1,this.noCompatMode=w.noCompatMode||!1,this.condenseFlow=w.condenseFlow||!1,this.quotingType=w.quotingType==='"'?ht:ut,this.forceQuotes=w.forceQuotes||!1,this.replacer=typeof w.replacer=="function"?w.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(vt,"State");function At(w,E){const X=e.repeat(" ",E);let W=0,z="";const G=w.length;for(;W<G;){let U;const at=w.indexOf(`
285
- `,W);at===-1?(U=w.slice(W),W=G):(U=w.slice(W,at+1),W=at+1),U.length&&U!==`
286
- `&&(z+=X),z+=U}return z}f(At,"indentString");function Mt(w,E){return`
287
- `+e.repeat(" ",w.indent*E)}f(Mt,"generateNextLine");function Et(w,E){for(let X=0,W=w.implicitTypes.length;X<W;X+=1)if(w.implicitTypes[X].resolve(E))return!0;return!1}f(Et,"testImplicitResolving");function _t(w){return w===c||w===a}f(_t,"isWhitespace");function dt(w){return w>=32&&w<=126||w>=161&&w<=55295&&w!==8232&&w!==8233||w>=57344&&w<=65533&&w!==o||w>=65536&&w<=1114111}f(dt,"isPrintable");function Ct(w){return dt(w)&&w!==o&&w!==l&&w!==n}f(Ct,"isNsCharOrWhitespace");function Lt(w,E,X){const W=Ct(w),z=W&&!_t(w);return(X?W:W&&w!==C&&w!==v&&w!==j&&w!==N&&w!==I)&&w!==u&&!(E===S&&!z)||Ct(E)&&!_t(E)&&w===u||E===S&&z}f(Lt,"isPlainSafe");function bt(w){return dt(w)&&w!==o&&!_t(w)&&w!==k&&w!==F&&w!==S&&w!==C&&w!==v&&w!==j&&w!==N&&w!==I&&w!==u&&w!==m&&w!==x&&w!==h&&w!==J&&w!==T&&w!==_&&w!==y&&w!==d&&w!==p&&w!==L&&w!==Y}f(bt,"isPlainSafeFirst");function jt(w){return!_t(w)&&w!==S}f(jt,"isPlainSafeLast");function Rt(w,E){const X=w.charCodeAt(E);let W;return X>=55296&&X<=56319&&E+1<w.length&&(W=w.charCodeAt(E+1),W>=56320&&W<=57343)?(X-55296)*1024+W-56320+65536:X}f(Rt,"codePointAt");function Me(w){return/^\n* /.test(w)}f(Me,"needIndentIndicator");const gr=1,me=2,si=3,oi=4,xe=5;function pr(w,E,X,W,z,G,U,at){let it,ct=0,ft=null,wt=!1,$t=!1;const nl=W!==-1;let ci=-1,di=bt(Rt(w,0))&&jt(Rt(w,w.length-1));if(E||U)for(it=0;it<w.length;ct>=65536?it+=2:it++){if(ct=Rt(w,it),!dt(ct))return xe;di=di&&Lt(ct,ft,at),ft=ct}else{for(it=0;it<w.length;ct>=65536?it+=2:it++){if(ct=Rt(w,it),ct===n)wt=!0,nl&&($t=$t||it-ci-1>W&&w[ci+1]!==" ",ci=it);else if(!dt(ct))return xe;di=di&&Lt(ct,ft,at),ft=ct}$t=$t||nl&&it-ci-1>W&&w[ci+1]!==" "}return!wt&&!$t?di&&!U&&!z(w)?gr:G===ht?xe:me:X>9&&Me(w)?xe:U?G===ht?xe:me:$t?oi:si}f(pr,"chooseScalarStyle");function ai(w,E,X,W,z){w.dump=(function(){if(E.length===0)return w.quotingType===ht?'""':"''";if(!w.noCompatMode&&(Z.indexOf(E)!==-1||$.test(E)))return w.quotingType===ht?'"'+E+'"':"'"+E+"'";const G=w.indent*Math.max(1,X),U=w.lineWidth===-1?-1:Math.max(Math.min(w.lineWidth,40),w.lineWidth-G),at=W||w.flowLevel>-1&&X>=w.flowLevel;function it(ct){return Et(w,ct)}switch(f(it,"testAmbiguity"),pr(E,at,w.indent,U,it,w.quotingType,w.forceQuotes&&!W,z)){case gr:return E;case me:return"'"+E.replace(/'/g,"''")+"'";case si:return"|"+yr(E,w.indent)+mr(At(E,G));case oi:return">"+yr(E,w.indent)+mr(At(ni(E,U),G));case xe:return'"'+li(E)+'"';default:throw new t("impossible error: invalid scalar style")}})()}f(ai,"writeScalar");function yr(w,E){const X=Me(w)?String(E):"",W=w[w.length-1]===`
288
- `,G=W&&(w[w.length-2]===`
289
- `||w===`
290
- `)?"+":W?"":"-";return X+G+`
291
- `}f(yr,"blockHeader");function mr(w){return w[w.length-1]===`
292
- `?w.slice(0,-1):w}f(mr,"dropEndingNewline");function ni(w,E){const X=/(\n+)([^\n]*)/g;let W=(function(){let at=w.indexOf(`
293
- `);return at=at!==-1?at:w.length,X.lastIndex=at,le(w.slice(0,at),E)})(),z=w[0]===`
294
- `||w[0]===" ",G,U;for(;U=X.exec(w);){const at=U[1],it=U[2];G=it[0]===" ",W+=at+(!z&&!G&&it!==""?`
295
- `:"")+le(it,E),z=G}return W}f(ni,"foldString");function le(w,E){if(w===""||w[0]===" ")return w;const X=/ [^ ]/g;let W,z=0,G,U=0,at=0,it="";for(;W=X.exec(w);)at=W.index,at-z>E&&(G=U>z?U:at,it+=`
296
- `+w.slice(z,G),z=G+1),U=at;return it+=`
297
- `,w.length-z>E&&U>z?it+=w.slice(z,U)+`
298
- `+w.slice(U+1):it+=w.slice(z),it.slice(1)}f(le,"foldLine");function li(w){let E="",X=0;for(let W=0;W<w.length;X>=65536?W+=2:W++){X=Rt(w,W);const z=q[X];!z&&dt(X)?(E+=w[W],X>=65536&&(E+=w[W+1])):E+=z||K(X)}return E}f(li,"escapeString");function xr(w,E,X){let W="";const z=w.tag;for(let G=0,U=X.length;G<U;G+=1){let at=X[G];w.replacer&&(at=w.replacer.call(X,String(G),at)),(R(w,E,at,!1,!1)||typeof at>"u"&&R(w,E,null,!1,!1))&&(W!==""&&(W+=","+(w.condenseFlow?"":" ")),W+=w.dump)}w.tag=z,w.dump="["+W+"]"}f(xr,"writeFlowSequence");function Cr(w,E,X,W){let z="";const G=w.tag;for(let U=0,at=X.length;U<at;U+=1){let it=X[U];w.replacer&&(it=w.replacer.call(X,String(U),it)),(R(w,E+1,it,!0,!0,!1,!0)||typeof it>"u"&&R(w,E+1,null,!0,!0,!1,!0))&&((!W||z!=="")&&(z+=Mt(w,E)),w.dump&&n===w.dump.charCodeAt(0)?z+="-":z+="- ",z+=w.dump)}w.tag=G,w.dump=z||"[]"}f(Cr,"writeBlockSequence");function hi(w,E,X){let W="";const z=w.tag,G=Object.keys(X);for(let U=0,at=G.length;U<at;U+=1){let it="";W!==""&&(it+=", "),w.condenseFlow&&(it+='"');const ct=G[U];let ft=X[ct];w.replacer&&(ft=w.replacer.call(X,ct,ft)),R(w,E,ct,!1,!1)&&(w.dump.length>1024&&(it+="? "),it+=w.dump+(w.condenseFlow?'"':"")+":"+(w.condenseFlow?"":" "),R(w,E,ft,!1,!1)&&(it+=w.dump,W+=it))}w.tag=z,w.dump="{"+W+"}"}f(hi,"writeFlowMapping");function g(w,E,X,W){let z="";const G=w.tag,U=Object.keys(X);if(w.sortKeys===!0)U.sort();else if(typeof w.sortKeys=="function")U.sort(w.sortKeys);else if(w.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let at=0,it=U.length;at<it;at+=1){let ct="";(!W||z!=="")&&(ct+=Mt(w,E));const ft=U[at];let wt=X[ft];if(w.replacer&&(wt=w.replacer.call(X,ft,wt)),!R(w,E+1,ft,!0,!0,!0))continue;const $t=w.tag!==null&&w.tag!=="?"||w.dump&&w.dump.length>1024;$t&&(w.dump&&n===w.dump.charCodeAt(0)?ct+="?":ct+="? "),ct+=w.dump,$t&&(ct+=Mt(w,E)),R(w,E+1,wt,!0,$t)&&(w.dump&&n===w.dump.charCodeAt(0)?ct+=":":ct+=": ",ct+=w.dump,z+=ct)}w.tag=G,w.dump=z||"{}"}f(g,"writeBlockMapping");function M(w,E,X){const W=X?w.explicitTypes:w.implicitTypes;for(let z=0,G=W.length;z<G;z+=1){const U=W[z];if((U.instanceOf||U.predicate)&&(!U.instanceOf||typeof E=="object"&&E instanceof U.instanceOf)&&(!U.predicate||U.predicate(E))){if(X?U.multi&&U.representName?w.tag=U.representName(E):w.tag=U.tag:w.tag="?",U.represent){const at=w.styleMap[U.tag]||U.defaultStyle;let it;if(i.call(U.represent)==="[object Function]")it=U.represent(E,at);else if(s.call(U.represent,at))it=U.represent[at](E,at);else throw new t("!<"+U.tag+'> tag resolver accepts not "'+at+'" style');w.dump=it}return!0}}return!1}f(M,"detectType");function R(w,E,X,W,z,G,U){w.tag=null,w.dump=X,M(w,X,!1)||M(w,X,!0);const at=i.call(w.dump),it=W;W&&(W=w.flowLevel<0||w.flowLevel>E);const ct=at==="[object Object]"||at==="[object Array]";let ft,wt;if(ct&&(ft=w.duplicates.indexOf(X),wt=ft!==-1),(w.tag!==null&&w.tag!=="?"||wt||w.indent!==2&&E>0)&&(z=!1),wt&&w.usedDuplicates[ft])w.dump="*ref_"+ft;else{if(ct&&wt&&!w.usedDuplicates[ft]&&(w.usedDuplicates[ft]=!0),at==="[object Object]")W&&Object.keys(w.dump).length!==0?(g(w,E,w.dump,z),wt&&(w.dump="&ref_"+ft+w.dump)):(hi(w,E,w.dump),wt&&(w.dump="&ref_"+ft+" "+w.dump));else if(at==="[object Array]")W&&w.dump.length!==0?(w.noArrayIndent&&!U&&E>0?Cr(w,E-1,w.dump,z):Cr(w,E,w.dump,z),wt&&(w.dump="&ref_"+ft+w.dump)):(xr(w,E,w.dump),wt&&(w.dump="&ref_"+ft+" "+w.dump));else if(at==="[object String]")w.tag!=="?"&&ai(w,w.dump,E,G,it);else{if(at==="[object Undefined]")return!1;if(w.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+at)}if(w.tag!==null&&w.tag!=="?"){let $t=encodeURI(w.tag[0]==="!"?w.tag.slice(1):w.tag).replace(/!/g,"%21");w.tag[0]==="!"?$t="!"+$t:$t.slice(0,18)==="tag:yaml.org,2002:"?$t="!!"+$t.slice(18):$t="!<"+$t+">",w.dump=$t+" "+w.dump}}return!0}f(R,"writeNode");function H(w,E){const X=[],W=[];P(w,X,W);const z=W.length;for(let G=0;G<z;G+=1)E.duplicates.push(X[W[G]]);E.usedDuplicates=new Array(z)}f(H,"getDuplicateReferences");function P(w,E,X){if(w!==null&&typeof w=="object"){const W=E.indexOf(w);if(W!==-1)X.indexOf(W)===-1&&X.push(W);else if(E.push(w),Array.isArray(w))for(let z=0,G=w.length;z<G;z+=1)P(w[z],E,X);else{const z=Object.keys(w);for(let G=0,U=z.length;G<U;G+=1)P(w[z[G]],E,X)}}}f(P,"inspectNode");function V(w,E){E=E||{};const X=new vt(E);X.noRefs||H(w,X);let W=w;return X.replacer&&(W=X.replacer.call({"":W},"",W)),R(X,0,W,!0,!0)?X.dump+`
299
- `:""}return f(V,"dump2"),Jo.dump=V,Jo}f(Fg,"requireDumper");var ac;function Mg(){if(ac)return Ut;ac=1;const e=Lg(),t=Fg();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return f(r,"renamed"),Ut.Type=Kt(),Ut.Schema=Nn(),Ut.FAILSAFE_SCHEMA=Yn(),Ut.JSON_SCHEMA=Vn(),Ut.CORE_SCHEMA=Zn(),Ut.DEFAULT_SCHEMA=co(),Ut.load=e.load,Ut.loadAll=e.loadAll,Ut.dump=t.dump,Ut.YAMLException=ri(),Ut.types={binary:Jn(),float:Gn(),map:Hn(),null:jn(),pairs:el(),set:rl(),timestamp:Kn(),bool:Un(),int:Xn(),merge:Qn(),omap:tl(),seq:zn(),str:Wn()},Ut.safeLoad=r("safeLoad","load"),Ut.safeLoadAll=r("safeLoadAll","loadAll"),Ut.safeDump=r("safeDump","dump"),Ut}f(Mg,"requireJsYaml");var sw=Mg(),ow=Bg(sw),{Type:_B,Schema:BB,FAILSAFE_SCHEMA:vB,JSON_SCHEMA:aw,CORE_SCHEMA:LB,DEFAULT_SCHEMA:FB,load:nw,loadAll:MB,dump:EB,YAMLException:AB,types:$B,safeLoad:OB,safeLoadAll:DB,safeDump:PB}=ow,lw={common:Yi,getConfig:Dt,insertCluster:eg,insertEdge:sg,insertEdgeLabel:Pn,insertMarkers:ng,insertNode:Dn,interpolateToCurve:un,labelHelper:nt,log:A,positionEdgeLabel:w2},Ni={},Eg=f(e=>{for(const t of e)Ni[t.name]=t},"registerLayoutLoaders"),hw=f(()=>{Eg([{name:"dagre",loader:f(async()=>await xt(()=>import("./dagre-OS7QT2EB-98Qq0zkD.js"),__vite__mapDeps([17,18,1,2,19,14,13,9,6,4,7,5,8,10,16,20,21,22,3,11,12,15])),"loader")},{name:"swimlane",loader:f(async()=>await xt(()=>import("./swimlanes-V6O3JKXN-DLwODYSJ.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),"loader")},{name:"cose-bilkent",loader:f(async()=>await xt(()=>import("./cose-bilkent-JH36ORCC-K8lJw6sz.js"),__vite__mapDeps([24,25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),"loader")}])},"registerDefaultLayoutLoaders");hw();var IB=f(async(e,t)=>{if(!(e.layoutAlgorithm in Ni))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Ni[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,lw,{algorithm:r.algorithm})},"render"),RB=f((e="",{fallback:t="dagre"}={})=>{if(e in Ni)return e;if(t in Ni)return A.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",Ag="rule",$g="decl",cw="@media",dw="@import",uw="@supports",fw="@namespace",Da="@keyframes",Og="@layer",gw="@scope",pw=Math.abs,$i=String.fromCharCode;function Dg(e){return e.trim()}function Pa(e,t,r){return e.replace(t,r)}function Mr(e,t){return e.charCodeAt(t)|0}function Kr(e,t,r){return e.slice(t,r)}function ke(e){return e.length}function Pg(e){return e.length}function cs(e,t){return t.push(e),e}var uo=1,Qr=1,Ig=0,ae=0,qt=0,ii="";function sl(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:uo,column:Qr,length:a,return:"",siblings:n}}function yw(){return qt}function mw(){return qt=ae>0?Mr(ii,--ae):0,Qr--,qt===10&&(Qr=1,uo--),qt}function fe(){return qt=ae<Ig?Mr(ii,ae++):0,Qr++,qt===10&&(Qr=1,uo++),qt}function He(){return Mr(ii,ae)}function ks(){return ae}function fo(e,t){return Kr(ii,e,t)}function Wi(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 xw(e){return uo=Qr=1,Ig=ke(ii=e),ae=0,[]}function Cw(e){return ii="",e}function ta(e){return Dg(fo(ae-1,Ia(e===91?e+2:e===40?e+1:e)))}function bw(e){for(;(qt=He())&&qt<33;)fe();return Wi(e)>2||Wi(qt)>3?"":" "}function kw(e,t){for(;--t&&fe()&&!(qt<48||qt>102||qt>57&&qt<65||qt>70&&qt<97););return fo(e,ks()+(t<6&&He()==32&&fe()==32))}function Ia(e){for(;fe();)switch(qt){case e:return ae;case 34:case 39:e!==34&&e!==39&&Ia(qt);break;case 40:e===41&&Ia(e);break;case 92:fe();break}return ae}function ww(e,t){for(;fe()&&e+qt!==57;)if(e+qt===84&&He()===47)break;return"/*"+fo(t,ae-1)+"*"+$i(e===47?e:fe())}function Sw(e){for(;!Wi(He());)fe();return fo(e,ae)}function Tw(e){return Cw(ws("",null,null,null,[""],e=xw(e),0,[0],e))}function ws(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,u=0,p=0,m=0,y=1,x=1,C=1,k=0,S=0,T="",_=s,F=o,L=i,v=T;x;)switch(m=S,S=fe()){case 40:m!=108&&Mr(v,d-1)==58?(k++,v+="("):v+=ta(S);break;case 41:k--,v+=")";break;case 34:case 39:case 91:v+=ta(S);break;case 9:case 10:case 13:case 32:if(k>0){v+=$i(S);break}v+=bw(m);break;case 92:v+=kw(ks()-1,7);continue;case 47:switch(He()){case 42:case 47:cs(_w(ww(fe(),ks()),t,r,l),l),(Wi(m||1)==5||Wi(He()||1)==5)&&ke(v)&&Kr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*y:n[c++]=ke(v)*C;case 125*y:case 59:case 0:if(k>0&&S){v+=$i(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(v=Pa(v,/\f/g,"")),p>0&&(ke(v)-d||y===0)&&cs(p>32?lc(v+";",i,r,d-1,l):lc(Pa(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(cs(L=nc(v,t,r,c,h,s,n,T,_=[],F=[],d,o),o),S===123)if(h===0)ws(v,t,L,L,_,o,d,n,F);else{switch(u){case 99:if(Mr(v,3)===110)break;case 108:if(Mr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ws(e,L,L,i&&cs(nc(e,L,L,0,0,s,n,T,s,_=[],d,F),F),s,F,d,n,i?_:F):ws(v,L,L,L,[""],F,0,n,F)}}c=h=p=0,y=C=1,T=v="",d=a;break;case 58:d=1+ke(v),p=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&mw()==125)continue}switch(v+=$i(S),S*y){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(k>0)break;n[c++]=(ke(v)-1)*C,C=1;break;case 64:He()===45&&(v+=ta(fe())),u=He(),h=d=ke(T=v+=Sw(ks())),S++;break;case 45:m===45&&ke(v)==2&&(y=0)}}return o}function nc(e,t,r,i,s,o,a,n,l,c,h,d){for(var u=s-1,p=s===0?o:[""],m=Pg(p),y=0,x=0,C=0;y<i;++y)for(var k=0,S=Kr(e,u+1,u=pw(x=a[y])),T=e;k<m;++k)(T=Dg(x>0?p[k]+" "+S:Pa(S,/&\f/g,p[k])))&&(l[C++]=T);return sl(e,t,r,s===0?Ag:n,l,c,h,d)}function _w(e,t,r,i){return sl(e,t,r,il,$i(yw()),Kr(e,2,-2),0,i)}function lc(e,t,r,i,s){return sl(e,t,r,$g,Kr(e,0,i),Kr(e,i+1,-1),i,s)}function Ra(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Bw(e,t,r,i){switch(e.type){case Og:if(e.children.length)break;case dw:case fw:case $g:return e.return=e.return||e.value;case il:return"";case Da:return e.return=e.value+"{"+Ra(e.children,i)+"}";case Ag:if(!ke(e.value=e.props.join(",")))return""}return ke(r=Ra(e.children,i))?e.return=e.value+"{"+r+"}":""}function vw(e){var t=Pg(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var Rg="c4",Lw=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Fw=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-jrqjerIx.js");return{diagram:t}},__vite__mapDeps([26,27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Rg,diagram:e}},"loader"),Mw={id:Rg,detector:Lw,loader:Fw},Ew=Mw,qg="flowchart",Aw=f((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),$w=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./flowDiagram-T62WH6J4-CJvzSJaH.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([28,29,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,32]));return{id:qg,diagram:e}},"loader"),Ow={id:qg,detector:Aw,loader:$w},Dw=Ow,Ng="flowchart-v2",Pw=f((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),Iw=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./flowDiagram-T62WH6J4-CJvzSJaH.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([28,29,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,32]));return{id:Ng,diagram:e}},"loader"),Rw={id:Ng,detector:Pw,loader:Iw},qw=Rw,Wg="swimlane",Nw=f(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Ww=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-JKAHXJPX-VqS22HlO.js");return{diagram:t}},__vite__mapDeps([33,28,29,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,32,13,14,15,16]));return{id:Wg,diagram:e}},"loader"),zw={id:Wg,detector:Nw,loader:Ww},Hw=zw,zg="er",Yw=f(e=>/^\s*erDiagram/.test(e),"detector"),jw=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./erDiagram-2YWLMYGG-D9UJiA3b.js");return{diagram:t}},__vite__mapDeps([34,30,31,32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:zg,diagram:e}},"loader"),Uw={id:zg,detector:Yw,loader:jw},Xw=Uw,Hg="gitGraph",Gw=f(e=>/^\s*gitGraph/.test(e),"detector"),Vw=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-uWbyAvUy.js");return{diagram:t}},__vite__mapDeps([35,36,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Hg,diagram:e}},"loader"),Zw={id:Hg,detector:Gw,loader:Vw},Kw=Zw,Yg="gantt",Qw=f(e=>/^\s*gantt/.test(e),"detector"),Jw=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-DPlX4CQj.js");return{diagram:t}},__vite__mapDeps([39,1,2,40,41,42,43,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Yg,diagram:e}},"loader"),tS={id:Yg,detector:Qw,loader:Jw},eS=tS,jg="info",rS=f(e=>/^\s*info/.test(e),"detector"),iS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./infoDiagram-FKFFQAWI-CYVpFIQd.js");return{diagram:t}},__vite__mapDeps([44,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:jg,diagram:e}},"loader"),sS={id:jg,detector:rS,loader:iS},Ug="pie",oS=f(e=>/^\s*pie/.test(e),"detector"),aS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-CMRcyI7O.js");return{diagram:t}},__vite__mapDeps([45,37,38,1,2,46,47,42,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Ug,diagram:e}},"loader"),nS={id:Ug,detector:oS,loader:aS},Xg="quadrantChart",lS=f(e=>/^\s*quadrantChart/.test(e),"detector"),hS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-hOWMoCpb.js");return{diagram:t}},__vite__mapDeps([48,41,42,43,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Xg,diagram:e}},"loader"),cS={id:Xg,detector:lS,loader:hS},dS=cS,Gg="xychart",uS=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),fS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-BEfVfpB4.js");return{diagram:t}},__vite__mapDeps([49,42,47,41,43,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Gg,diagram:e}},"loader"),gS={id:Gg,detector:uS,loader:fS},pS=gS,Vg="requirement",yS=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),mS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./requirementDiagram-IS5BZ75X-CXe-Ctnb.js");return{diagram:t}},__vite__mapDeps([50,30,31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Vg,diagram:e}},"loader"),xS={id:Vg,detector:yS,loader:mS},CS=xS,Zg="sequence",bS=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),kS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-DQ5T7b6S.js");return{diagram:t}},__vite__mapDeps([51,36,27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Zg,diagram:e}},"loader"),wS={id:Zg,detector:bS,loader:kS},SS=wS,Kg="class",TS=f((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),_S=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./classDiagram-CYGNFDIV-DZ1oAWcg.js");return{diagram:t}},__vite__mapDeps([52,53,29,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Kg,diagram:e}},"loader"),BS={id:Kg,detector:TS,loader:_S},vS=BS,Qg="classDiagram",LS=f((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),FS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./classDiagram-v2-TLXNO2FR-DZ1oAWcg.js");return{diagram:t}},__vite__mapDeps([54,53,29,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Qg,diagram:e}},"loader"),MS={id:Qg,detector:LS,loader:FS},ES=MS,Jg="state",AS=f((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),$S=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./stateDiagram-XQSTLZYL-M21gs3ef.js");return{diagram:t}},__vite__mapDeps([55,56,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,18,19,14,13,16,20,21,22,15]));return{id:Jg,diagram:e}},"loader"),OS={id:Jg,detector:AS,loader:$S},DS=OS,tp="stateDiagram",PS=f((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),IS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-IH3M54BS-yfF1fJDr.js");return{diagram:t}},__vite__mapDeps([57,56,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:tp,diagram:e}},"loader"),RS={id:tp,detector:PS,loader:IS},qS=RS,ep="journey",NS=f(e=>/^\s*journey/.test(e),"detector"),WS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-BAZxxKR_.js");return{diagram:t}},__vite__mapDeps([58,29,27,1,2,46,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:ep,diagram:e}},"loader"),zS={id:ep,detector:NS,loader:WS},HS=zS,YS=f((e,t,r)=>{A.debug(`rendering svg for syntax error
300
- `);const i=KC(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),$c(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"),rp={draw:YS},jS=rp,US={db:{},renderer:rp,parser:{parse:f(()=>{},"parse")}},XS=US,ip="flowchart-elk",GS=f((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),VS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./flowDiagram-T62WH6J4-CJvzSJaH.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([28,29,30,31,27,3,1,2,4,5,6,7,8,9,10,11,12,32]));return{id:ip,diagram:e}},"loader"),ZS={id:ip,detector:GS,loader:VS},KS=ZS,sp="timeline",QS=f(e=>/^\s*timeline/.test(e),"detector"),JS=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-C5ehmNql.js");return{diagram:t}},__vite__mapDeps([59,46,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:sp,diagram:e}},"loader"),tT={id:sp,detector:QS,loader:JS},eT=tT,op="mindmap",rT=f(e=>/^\s*mindmap/.test(e),"detector"),iT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./mindmap-definition-THT77NOG-BExnUzDC.js");return{diagram:t}},__vite__mapDeps([60,30,31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:op,diagram:e}},"loader"),sT={id:op,detector:rT,loader:iT},oT=sT,ap="kanban",aT=f(e=>/^\s*kanban/.test(e),"detector"),nT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-_vYotbgl.js");return{diagram:t}},__vite__mapDeps([61,29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:ap,diagram:e}},"loader"),lT={id:ap,detector:aT,loader:nT},hT=lT,np="sankey",cT=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),dT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-DZbIcZsi.js");return{diagram:t}},__vite__mapDeps([62,1,2,47,42,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:np,diagram:e}},"loader"),uT={id:np,detector:cT,loader:dT},fT=uT,lp="packet",gT=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),pT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DHTx_db-.js");return{diagram:t}},__vite__mapDeps([63,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:lp,diagram:e}},"loader"),yT={id:lp,detector:gT,loader:pT},hp="radar",mT=f(e=>/^\s*radar-beta/.test(e),"detector"),xT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-B054aybv.js");return{diagram:t}},__vite__mapDeps([64,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:hp,diagram:e}},"loader"),CT={id:hp,detector:mT,loader:xT},cp="block",bT=f(e=>/^\s*block(-beta)?/.test(e),"detector"),kT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./blockDiagram-OSKFZWR5-Dr6fQmIN.js");return{diagram:t}},__vite__mapDeps([65,29,32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:cp,diagram:e}},"loader"),wT={id:cp,detector:bT,loader:kT},ST=wT,dp="treeView",TT=f(e=>/^\s*treeView-beta/.test(e),"detector"),_T=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-iRjRsXyq.js");return{diagram:t}},__vite__mapDeps([66,36,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:dp,diagram:e}},"loader"),BT={id:dp,detector:TT,loader:_T},vT=BT,up="architecture",LT=f(e=>/^\s*architecture/.test(e),"detector"),FT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-DAHpP5xc.js");return{diagram:t}},__vite__mapDeps([67,37,38,1,2,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:up,diagram:e}},"loader"),MT={id:up,detector:LT,loader:FT},ET=MT,fp="eventmodeling",AT=f(e=>/^\s*eventmodeling/.test(e),"detector"),$T=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-DM2XbVde.js");return{diagram:t}},__vite__mapDeps([68,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:fp,diagram:e}},"loader"),OT={id:fp,detector:AT,loader:$T},DT=OT,gp="ishikawa",PT=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),IT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-Cpmxihq8.js");return{diagram:t}},__vite__mapDeps([69,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:gp,diagram:e}},"loader"),RT={id:gp,detector:PT,loader:IT},pp="venn",qT=f(e=>/^\s*venn-beta/.test(e),"detector"),NT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-CJhBecmB.js");return{diagram:t}},__vite__mapDeps([70,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:pp,diagram:e}},"loader"),WT={id:pp,detector:qT,loader:NT},zT=WT,yp="treemap",HT=f(e=>/^\s*treemap/.test(e),"detector"),YT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-BJjLjQ_5.js");return{diagram:t}},__vite__mapDeps([71,37,31,38,1,2,43,47,42,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:yp,diagram:e}},"loader"),jT={id:yp,detector:HT,loader:YT},mp="wardley",UT=f(e=>/^\s*wardley-beta/i.test(e),"detector"),XT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-DNyTsJz4.js");return{diagram:t}},__vite__mapDeps([72,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:mp,diagram:e}},"loader"),GT={id:mp,detector:UT,loader:XT},VT=GT,xp="cynefin",ZT=f(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),KT=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-D8jGprOP.js");return{diagram:t}},__vite__mapDeps([73,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:xp,diagram:e}},"loader"),QT={id:xp,detector:ZT,loader:KT},Cp="railroad",JT=f(e=>/^\s*railroad-beta/i.test(e),"detector"),t_=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DcIAdapN.js");return{diagram:t}},__vite__mapDeps([74,75,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:Cp,diagram:e}},"loader"),e_={id:Cp,detector:JT,loader:t_},bp="railroadEbnf",r_=f(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),i_=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-mvxd2eQy.js");return{diagram:t}},__vite__mapDeps([76,75,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:bp,diagram:e}},"loader"),s_={id:bp,detector:r_,loader:i_},kp="railroadAbnf",o_=f(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),a_=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-DWmupz8z.js");return{diagram:t}},__vite__mapDeps([77,75,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:kp,diagram:e}},"loader"),n_={id:kp,detector:o_,loader:a_},wp="railroadPeg",l_=f(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),h_=f(async()=>{const{diagram:e}=await xt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-B5gYrfy-.js");return{diagram:t}},__vite__mapDeps([78,75,37,38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]));return{id:wp,diagram:e}},"loader"),c_={id:wp,detector:l_,loader:h_},hc=!1,go=f(()=>{hc||(hc=!0,vs("error",XS,e=>e.toLowerCase().trim()==="error"),vs("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ia(KS,oT,ET),ia(Ew,hT,ES,vS,Xw,eS,sS,nS,CS,SS,Hw,qw,Dw,eT,Kw,qS,DS,HS,dS,fT,yT,pS,ST,DT,vT,CT,RT,jT,e_,s_,n_,c_,zT,VT,QT))},"addDiagrams"),d_=f(async()=>{A.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(nr).map(async([r,{detector:i,loader:s}])=>{if(s)try{na(r)}catch{try{const{diagram:o,id:a}=await s();vs(a,o,i)}catch(o){throw A.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete nr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){A.error(`Failed to load ${t.length} external diagrams`);for(const r of t)A.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),u_="graphics-document document";function Sp(e,t){e.attr("role",u_),t!==""&&e.attr("aria-roledescription",t)}f(Sp,"setA11yDiagramInfo");function Tp(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(Tp,"addSVGa11yTitleDescription");var or,qa=(or=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=Dt(),s=Ha(t,i);t=Ck(t)+`
301
- `;try{na(s)}catch{const c=jy(s);if(!c)throw new vc(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();vs(h,d)}const{db:o,parser:a,renderer:n,init:l}=na(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new or(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(or,"Diagram"),or),cc=[],f_=f(()=>{cc.forEach(e=>{e()}),cc=[]},"attachFunctions"),g_=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function _p(e){const t=e.match(Bc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
302
- `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
303
- `):t[2];let s=nw(i,{schema:aw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}f(_p,"extractFrontMatter");var p_=f(e=>e.replace(/\r\n?/g,`
304
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),y_=f(e=>{const{text:t,metadata:r}=_p(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),m_=f(e=>{const t=Vt.detectInit(e)??{},r=Vt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:ak(e),directive:t}},"processDirectives");function ol(e){const t=p_(e),r=y_(t),i=m_(r.text),s=mn(r.config,i.directive);return e=g_(i.text),{code:e,title:r.title,config:s}}f(ol,"preprocessDiagram");function Bp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Bp,"toBase64");var x_=5e4,C_="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",b_="sandbox",k_="loose",w_="http://www.w3.org/2000/svg",S_="http://www.w3.org/1999/xlink",T_="http://www.w3.org/1999/xhtml",__="100%",B_="100%",v_="border:0;margin:0;",L_="margin:0",F_="allow-top-navigation-by-user-activation allow-popups",M_='The "iframe" tag is not supported by your browser.',E_=["foreignobject"],A_=["dominant-baseline"];function al(e){const t=ol(e);return _s(),Wy(t.config??{}),t}f(al,"processAndSetConfigs");async function vp(e,t){go();try{const{code:r,config:i}=al(e);return{diagramType:(await Fp(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}f(vp,"parse");var dc=f((e,t,r=[])=>{const i=kc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),$_=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Zt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{jl(l.styles)||n.forEach(c=>{r.insertRule(dc(l.id,c,l.styles),r.cssRules.length)}),jl(l.textStyles)||r.insertRule(dc(l.id,"tspan",(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=aa(s)+`
305
- `}else i+=`${e.themeCSS}
306
- `;return i+aa(r)},"createCssStyles"),O_=f((e,t)=>Ra(Tw(`${e}{${t}}`),vw([f(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Da)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[cw,uw,Og,gw,"@container","@starting-style"],Da].includes(i.type)||(A.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=il))},"addNamespace"),Bw])),"compileCSS"),D_=f((e,t,r,i)=>{const s=$_(e,r),o=hm(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return O_(i,o)},"createUserStyles"),P_=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ue(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),I_=f((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":B_,i=Bp(`<body style="${L_}">${e}</body>`);return`<iframe style="width:${__};height:${r};${v_}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${F_}">
307
- ${M_}
308
- </iframe>`},"putIntoIFrame"),uc=f((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",w_);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Na(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(Na,"sandboxedIframe");var R_=f((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),q_=f(async function(e,t,r){go();const i=al(t);t=i.code;const s=Dt();A.debug(s),t.length>(s?.maxTextSize??x_)&&(t=C_);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=f(()=>{const q=mt(u?n:c).node();q&&"remove"in q&&q.remove()},"removeTempElements");let d=mt(document.body);const u=s.securityLevel===b_,p=s.securityLevel===k_,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),u){const I=Na(mt(r),a);d=mt(I.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=mt(r);uc(d,e,l,`font-family: ${m}`,S_)}else{if(R_(document,e,l,a),u){const I=Na(mt(document.body),a);d=mt(I.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=mt("body");uc(d,e,l)}let y,x;try{y=await qa.fromText(t,{title:i.title})}catch(I){if(s.suppressErrorRendering)throw h(),I;y=await qa.fromText("error"),x=I}const C=d.select(c).node(),k=y.type,S=C.firstChild,T=S.firstChild,_=y.renderer.getClasses?.(t,y),F=D_(s,k,_,o),L=document.createElement("style");L.innerHTML=F,S.insertBefore(L,T);try{await y.renderer.draw(t,e,"11.17.1",y)}catch(I){throw s.suppressErrorRendering?h():jS.draw(t,e,"11.17.1"),I}const v=d.select(`${c} svg`),j=y.db.getAccTitle?.(),Y=y.db.getAccDescription?.();Mp(k,v,j,Y);const J=f(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",T_);let I=d.select(c).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),I=P_(I,u,ve(s.arrowMarkerAbsolute)),u){const q=d.select(c+" svg").node();I=I_(I,q)}else p||(I=Ur.sanitize(I,{ADD_TAGS:E_,ADD_ATTR:A_,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return f_(),I},"serializeSvg")();if(x)throw x;return h(),{diagramType:k,svg:J,bindFunctions:y.db.bindFunctions}},"render");function Lp(e={}){const t=zt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),qy(t),t?.theme&&t.theme in De?t.themeVariables=De[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=De.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Ry(t):wc();za(r.logLevel),go()}f(Lp,"initialize");var Fp=f((e,t={})=>{const{code:r}=ol(e);return qa.fromText(r,t)},"getDiagramFromText");function Mp(e,t,r,i){Sp(t,e),Tp(t,r,i,t.attr("id"))}f(Mp,"addA11yInfo");var dr=Object.freeze({render:q_,parse:vp,getDiagramFromText:Fp,initialize:Lp,getConfig:Dt,setConfig:Sc,getSiteConfig:wc,updateSiteConfig:Ny,reset:f(()=>{_s()},"reset"),globalReset:f(()=>{_s(Xr)},"globalReset"),defaultConfig:Xr});za(Dt().logLevel);_s(Dt());var N_=f((e,t,r)=>{A.warn(e),yn(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"),Ep=f(async function(e={querySelector:".mermaid"}){try{await W_(e)}catch(t){if(yn(t)&&A.error(t.str),Re.parseError&&Re.parseError(t),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),t}},"run"),W_=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=dr.getConfig();A.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");A.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(A.debug("Start On Load: "+i?.startOnLoad),dr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Vt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(A.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=au(Vt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Vt.detectInit(a);h&&A.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:u}=await Dp(c,a,l);l.innerHTML=d,e&&await e(c),u&&u(l)}catch(d){N_(d,n,Re.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Ap=f(function(e){dr.initialize(e)},"initialize"),z_=f(async function(e,t,r){A.warn("mermaid.init is deprecated. Please use run instead."),e&&Ap(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ep(i)},"init"),H_=f(async(e,{lazyLoad:t=!0}={})=>{go(),ia(...e),t===!1&&await d_()},"registerExternalDiagrams"),$p=f(function(){if(Re.startOnLoad){const{startOnLoad:e}=dr.getConfig();e&&Re.run().catch(t=>A.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",$p,!1);var Y_=f(function(e){Re.parseError=e},"setParseErrorHandler"),Xs=[],ea=!1,Op=f(async()=>{if(!ea){for(ea=!0;Xs.length>0;){const e=Xs.shift();if(e)try{await e()}catch(t){A.error("Error executing queue",t)}}ea=!1}},"executeQueue"),j_=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((o,a)=>{dr.parse(e,t).then(n=>{o(n),r(n)},n=>{A.error("Error parsing",n),Re.parseError?.(n),a(n),i(n)})}),"performCall");Xs.push(s),Op().catch(i)}),"parse"),Dp=f((e,t,r)=>new Promise((i,s)=>{const o=f(()=>new Promise((a,n)=>{dr.render(e,t,r).then(l=>{a(l),i(l)},l=>{A.error("Error parsing",l),Re.parseError?.(l),n(l),s(l)})}),"performCall");Xs.push(o),Op().catch(s)}),"render"),U_=f(()=>Object.keys(nr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Re={startOnLoad:!0,mermaidAPI:dr,parse:j_,render:Dp,init:z_,run:Ep,registerExternalDiagrams:H_,registerLayoutLoaders:Eg,initialize:Ap,parseError:void 0,contentLoaded:$p,setParseErrorHandler:Y_,detectType:Ha,registerIconPacks:wb,getRegisteredDiagramsMetadata:U_},X_=Re;const qB=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:In,createCommonLayoutRenderer:xg,default:X_,defaultMeasureLayout:Rn,paintLayoutData:qn},Symbol.toStringTag,{value:"Module"}));export{aw as $,Dt as A,xm as B,Te as C,mn as D,bc as E,dk as F,KC as G,RC as H,rn as I,lB as J,dB as K,br as L,Al as M,El as N,fB as O,uB as P,cB as Q,aB as R,nB as S,hB as T,yt as U,pB as V,gB as W,xy as X,iB as Y,nw as Z,f as _,um as a,ng as a$,Oi as a0,rB as a1,eo as a2,rk as a3,Qy as a4,Ac as a5,ul as a6,ho as a7,zC as a8,ma as a9,Gt as aA,f1 as aB,cn as aC,ln as aD,ys as aE,Nb as aF,qb as aG,Rb as aH,Ib as aI,Fb as aJ,Dd as aK,Ab as aL,Lb as aM,Db as aN,Pd as aO,Eb as aP,Hb as aQ,zb as aR,Wb as aS,jb as aT,Yb as aU,Mb as aV,Id as aW,Pb as aX,Ob as aY,$b as aZ,Rd as a_,ck as aa,ge as ab,O as ac,D as ad,am as ae,Oc as af,eg as ag,Dn as ah,vh as ai,Xi as aj,wb as ak,pn as al,rt as am,TB as an,SB as ao,xg as ap,St as aq,lg as ar,st as as,wB as at,Us as au,cg as av,no as aw,Pn as ax,sg as ay,w2 as az,dm as b,jd as b0,mc as b1,qC as b2,eB as b3,ye as b4,kb as b5,sB as b6,Qa as b7,We as b8,Ii as b9,_l as ba,xx as bb,ot as bc,Md as bd,ee as be,dx as bf,Ka as bg,Gc as bh,Ui as bi,Kc as bj,oB as bk,Zp as bl,Ve as bm,Qi as bn,po as bo,sy as bp,a2 as bq,qB as br,kt as c,$c as d,zt as e,Ie as f,gm as g,Qf as h,oe as i,mt as j,Yi as k,A as l,Xd as m,Hi as n,Bb as o,pm as p,ym as q,cm as r,fm as s,yB as t,Ye as u,oy as v,gk as w,RB as x,IB as y,Vt as z};